Révision 1040

tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy (revision 1040)
69 69
writer = tsvFile.newWriter("UTF-8")
70 70
writer.println "text_id\tpb_id\tcb_id\tlb_id\tsign\tchar\tcount\t%/sign"
71 71
Partition p = corpus.createPartition("tmp", text_su,text_id)
72
ConsoleProgressBar cpb = new ConsoleProgressBar(p.getParts().size())
72
ConsoleProgressBar cpb = new ConsoleProgressBar(p.getNPart())
73 73
for (Part part : p.getParts()) {
74 74
	processText(part, part.getName())
75 75
	cpb.tick();
tmp/org.txm.core/src/java/org/txm/Toolbox.java (revision 1040)
235 235

  
236 236
			if (!getPreference(TBXPreferences.LOG_DIR).isEmpty()) {
237 237
				Log.setPrintInFile(TBXPreferences.getInstance().getBoolean(TBXPreferences.LOG_IN_FILE), new File(getPreference(TBXPreferences.LOG_DIR)));
238
			}
239
			else {
238
			} else {
240 239
				Log.setPrintInFile(TBXPreferences.getInstance().getBoolean(TBXPreferences.LOG_IN_FILE));
241 240
			}
242 241

  
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1040)
174 174
		if (parent == this) {
175 175
			throw new IllegalArgumentException("A result can not be parent of itself.");
176 176
		}
177
		if(uuid == null)	{
177
		if (uuid == null)	{
178 178
			uuid = createUUID() + "_" + this.getClass().getSimpleName();
179 179
		}
180 180
		this.uniqueID = uuid;
......
205 205
		
206 206

  
207 207
		// retrieving parent from UUID
208
		if(parent == null && uuid != null && !this.getStringParameterValue(TXMPreferences.PARENT_UUID).isEmpty())	{
209
			Log.warning("Searching parent with UUID: " + this.getStringParameterValue(TXMPreferences.PARENT_UUID) + "...");
210
			TXMResult retrievedParent = TXMResult.getResult(this.getStringParameterValue(TXMPreferences.PARENT_UUID));
208
		String puuid = this.getStringParameterValue(TXMPreferences.PARENT_UUID);
209
		if (parent == null && uuid != null && !puuid.isEmpty())	{
210
			Log.warning("Searching parent with UUID: " + puuid + "...");
211
			TXMResult retrievedParent = TXMResult.getResult(puuid);
211 212
			if (retrievedParent != null) {
212 213
				Log.warning("Parent retrieved from UUID: " + retrievedParent + ".");
213 214
				retrievedParent.addChild(this);
......
976 977
	synchronized public static void deleteAllNonPersistentResults() {
977 978
		ArrayList<TXMResult> results = Toolbox.workspace.getDeepChildren();
978 979
		for (int i = 0; i < results.size(); i++) {
979
			if(!results.get(i).mustBePersisted())	{ 
980
				Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + results.get(i).getSimpleName() + " of type " + results.get(i).getClass().getSimpleName() + ".");
980
			TXMResult r = results.get(i);
981
			if (r.mustBePersisted())	{ 
982
				TXMPreferences.flush(r);
983
			} else {
984
				Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + r.getSimpleName() + " of type " + r.getClass().getSimpleName() + ".");
985
				TXMPreferences.delete(r);
981 986
			}
982 987
		}
983 988
	}
......
1693 1698
	 * @return
1694 1699
	 */
1695 1700
	public boolean mustBePersisted()	{
1696
		if(this.persistable || TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED) || this.userPersistable)	{
1701
		if (this.persistable || TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED) || this.userPersistable)	{
1697 1702
			return true;
1698 1703
		}
1699 1704
		return false;
tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java (revision 1040)
81 81

  
82 82
				Partition partition = (Partition) selection;
83 83

  
84
				// warning to few parts
85
				if (partition.getNPart() < 4) {
84
				if (partition.getNPart() < 4) { // error to few parts
86 85
					MessageDialog d = new MessageDialog(window.getShell(), TXMCoreMessages.error_error2, null,
87 86
							NLS.bind(CAUIMessages.ComputeCorrespondanceAnalysis_4, partition.getNPart()), 0, new String[] { TXMCoreMessages.common_ok}, 0);
88 87
					d.open();
......
101 100

  
102 101
					LexicalTable lexicalTable = new LexicalTable(partition, property, fMin, vMax);
103 102
					ca = new CA(lexicalTable);
104
				}
105
				// aborted
106
				else {
103
				} else { // aborted
107 104
					return null;
108 105
				}
109 106
			}
tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java (revision 1040)
488 488
			String[] colNames;
489 489
			int[] colMargins = null;
490 490
			// from lexical table if they exist
491
			if(lexicalTable.getData() != null)	{
491
			if (lexicalTable.getData() != null)	{
492 492
				colNames = lexicalTable.getColNames().asStringsArray();
493 493
				colMargins = lexicalTable.getColMarginsVector().asIntArray();
494 494
			}
tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/debug/TXMResultDebugView.java (revision 1040)
36 36
import org.eclipse.ui.IWorkbenchWindow;
37 37
import org.eclipse.ui.PlatformUI;
38 38
import org.eclipse.ui.part.ViewPart;
39
import org.txm.core.preferences.TBXPreferences;
39 40
//import org.txm.chartsengine.core.results.ChartResult;
40 41
import org.txm.core.results.TXMResult;
41 42
import org.txm.rcp.views.corpora.CorporaView;
......
124 125
		buffer.append(this.currentResult.dumpPreferences());
125 126
		buffer.append("\n"); //$NON-NLS-1$
126 127
		
127

  
128 128
		// Hierarchy
129 129
		buffer.append("\n"); //$NON-NLS-1$
130 130
		buffer.append("Selected object = " + this.currentResult + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
......
143 143
		displayArea.setText(buffer.toString());
144 144
	}
145 145
	
146
	
147 146
	@Override
148 147
	public void selectionChanged(SelectionChangedEvent event) {
149 148
		
tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java (revision 1040)
620 620
			return null;
621 621
		}
622 622
		
623
		if (p.getParts().size() == 0) {
623
		if (p.getNPart() == 0) {
624 624
			Log.severe(TXMUIMessages.CreatePartitionDialog_10);
625 625
			return null;
626 626
		}
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1040)
659 659
							}
660 660
						}
661 661
					});
662

  
663

  
664

  
665 662
				}
666 663
				// for user direct canceling
667 664
				catch (ThreadDeath td) {
tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java (revision 1040)
120 120
			//this.persistable = false; // FIXME: remove that later
121 121
			String p = this.getStringParameterValue(TBXPreferences.UNIT_PROPERTY);
122 122
			if (p != null && p.length() > 0) {
123
				this.pProperty = getCorpus().getProperty(p);
123
				Corpus corpus = getCorpus();
124
				this.pProperty = corpus.getProperty(p);
124 125
			}
125 126
		}
126 127
		catch (CqiClientException e) {
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/PartitionFocus.java (revision 1040)
105 105
	 */
106 106
	public List<Part> getFocusedParts() {
107 107
		List<Part> focused = new ArrayList<Part>(modality.size());
108
		for (int i = 0; i < partition.getParts().size(); i++) {
108
		for (int i = 0; i < partition.getNPart(); i++) {
109 109
			if (modality.contains(partition.getParts().get(i))) {
110 110
				focused.add(partition.getParts().get(i));
111 111
			}
......
120 120
	 */
121 121
	public List<Part> getNotFocusedParts() {
122 122
		List<Part> notFocused = new ArrayList<Part>(modality.size());
123
		for (int i = 0; i < partition.getParts().size(); i++) {
123
		for (int i = 0; i < partition.getNPart(); i++) {
124 124
			if (!modality.contains(partition.getParts().get(i))) {
125 125
				notFocused.add(partition.getParts().get(i));
126 126
			}
tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java (revision 1040)
99 99
		else if (selection instanceof Partition) {
100 100
			//System.out.println("Compute CAH with Partition : "+((Partition)selection.getFirstElement()).getName());
101 101
			Partition partition = (Partition)selection;
102
			if (partition.getParts().size() < 4) {
102
			if (partition.getNPart() < 4) {
103 103
				MessageDialog d = new MessageDialog(window.getShell(), TXMCoreMessages.error_error2, null,
104 104
						NLS.bind(AHCUIMessages.error_canNotComputeAHCWith, partition.getNPart()), 0, new String[] { TXMCoreMessages.common_ok}, 0);
105 105
				d.open();
tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java (revision 1040)
32 32
//	public Contrast(Partition partition, Property property, int Fmin) throws Exception {
33 33
//		super(partition);
34 34
//		
35
//		if (partition.getParts().size() < 2) {
35
//		if (partition.getNPart() < 2) {
36 36
//			throw new IllegalArgumentException(SpecificitiesCoreMessages.ComputeError_NEED_AT_LEAST_2_PARTS);
37 37
//		}
38 38
//		table = LexicalTableFactory.getLexicalTable(partition, property, Fmin);

Formats disponibles : Unified diff