Révision 758

tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/handlers/ComputeLexicalTable.java (revision 758)
52 52
import org.txm.rcp.handlers.BaseAbstractHandler;
53 53
import org.txm.searchengine.cqp.corpus.Partition;
54 54
import org.txm.searchengine.cqp.corpus.Property;
55
import org.txm.searchengine.cqp.corpus.WordProperty;
55 56
import org.txm.utils.logger.Log;
56 57

  
57 58
/**
......
131 132
				}
132 133
			}
133 134
			
134
			List<Property> properties = vocabularies.get(0).getProperties();
135
			List<WordProperty> properties = vocabularies.get(0).getProperties();
135 136
			for (Index voc : vocabularies) {
136 137
				if (!properties.equals(voc.getProperties())) {
137 138
					Log.warning(NLS.bind(LexicalTableUIMessages.ComputeLexicalTable_6, properties));
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditorToolBar.java (revision 758)
8 8
import org.eclipse.swt.events.SelectionListener;
9 9
import org.eclipse.swt.layout.GridData;
10 10
import org.eclipse.swt.layout.RowLayout;
11
import org.eclipse.swt.widgets.Button;
11 12
import org.eclipse.swt.widgets.Composite;
12 13
import org.eclipse.swt.widgets.Control;
13 14
import org.eclipse.swt.widgets.Group;
......
33 34
	 * The linked <code>TXMEditor</code>.
34 35
	 */
35 36
	protected TXMEditor<? extends TXMResult> editorPart;
36
	
37

  
37 38
	/**
38
	 * Contains reference to installed groups and composite.
39
	 * Contains references to installed groups to composite.
39 40
	 */
40 41
	private HashMap<String, Composite> groups = new HashMap<String, Composite>();
41 42

  
42 43
	private GLComposite subWidgetComposite;
44
	/**
45
	 * Contains references to installed groups to ToolItem.
46
	 */
47
	private HashMap<String, ToolItem> buttons = new HashMap<String, ToolItem>();
43 48

  
44 49
	/**
45 50
	 * 
......
89 94
	 * @param composite
90 95
	 * 
91 96
	 */
92
	public void setVisible(Composite composite, boolean visible)	{
97
	public void setVisible(String id, boolean visible)	{
98
		if (groups.containsKey(id)) {
99
			Composite composite = groups.get(id);
100
			ToolItem activationButton = buttons.get(id);
101
			setVisible(composite, activationButton, visible);
102
		}
103
	}
104

  
105
	/**
106
	 * Sets the visibility state of the specified composite.
107
	 * The mechanism is based on GridData.exclude to hide the composite therefore the composite must have a GridData as layout data.
108
	 * 
109
	 * @param composite
110
	 * 
111
	 */
112
	protected void setVisible(Composite composite, ToolItem activationButton, boolean visible)	{
93 113
		((GridData)composite.getLayoutData()).exclude = !visible;
94 114
		composite.setVisible(visible);
95 115
		composite.layout(true);
96 116
		editorPart.parent.layout(true);
117
		activationButton.setSelection(visible);
97 118
	}
98
	
99 119

  
120

  
100 121
	/**
101 122
	 * TODO not generic enough and call editorPart.getParametersGroupsComposite()
102 123
	 * Shows/hides the command parameters group.
103 124
	 * @param visible
104 125
	 */
105 126
	public void setComputingParametersVisible(boolean visible)	{
106
		this.getItems()[0].setSelection(visible);
107
		this.setVisible(((Group) this.editorPart.getParametersGroupsComposite().getChildren()[0]), visible);
127
		setVisible(TXMEditor.COMPUTING_PARAMETERS_GROUP_ID, visible);
108 128
	}
109
	
110
	
129

  
130

  
111 131
	/**
112 132
	 * Adds the specified control to this toolbar.
113 133
	 * Convenience method to add non-ToolItem controls to the toolbar using the SWT.SEPARATOR trick, plus packing and setting the right width.
......
117 137
		ToolItem itemSeparator = new ToolItem(this, SWT.SEPARATOR);
118 138
		control.pack();
119 139
		itemSeparator.setWidth(control.getBounds().width);
120
	    itemSeparator.setControl(control);	
140
		itemSeparator.setControl(control);	
121 141
	}
122
		
142

  
123 143
	/**
124 144
	 * Creates a <code>GLComposite</code> in the toolbar subwidgets container.
125 145
	 * @param groupTitle the composite uniq title in the toolbar 
......
134 154
		comp.getLayout().makeColumnsEqualWidth = makeColumnsEqualWidth;
135 155
		return comp;
136 156
	}
137
	
157

  
138 158
	/**
139 159
	 * Creates a <code>Group</code> with some configuration to make it visible/invisible and a <code>ToolItem</code> attached to the specified tool bar to show/hide this group.
140 160
	 * 
......
144 164
	 * @param groupTitle
145 165
	 * @param buttonToolTip
146 166
	 * @param iconFilePath
147
	 * @return
167
	 * @return the Group widget created
148 168
	 */
149 169
	public Group installGroup(String groupTitle, String buttonToolTip, String iconFilePath, boolean showGroup)	{
150 170

  
151 171
		if (this.groups.containsKey(groupTitle)) {
152 172
			return (Group) this.groups.get(groupTitle);
153 173
		}
154
		
174

  
155 175
		final Group group = new Group(subWidgetComposite, SWT.NONE);
156 176
		group.setText(groupTitle);
157
		
177

  
158 178
		RowLayout layout = new RowLayout();
159 179
		layout.wrap = true;
160 180
		layout.center = true;
161 181
		layout.marginWidth = layout.marginBottom = layout.marginHeight = layout.marginTop = 0;
162 182
		group.setLayout(layout);
163
		
183

  
164 184
		GridData gd2 = new GridData(GridData.FILL_BOTH);
165 185
		gd2.grabExcessVerticalSpace = false;
166 186
		gd2.grabExcessHorizontalSpace = true;
167 187
		gd2.exclude = true;
168 188
		group.setLayoutData(gd2);
169 189
		group.setVisible(false);
170
		
171
		
190

  
191

  
172 192
		// add finally a button to the toolbar to show/hide the Group
173 193
		final ToolItem showParameters = new ToolItem(this, SWT.CHECK | SWT.LEFT);
174
		
194

  
175 195
		if (iconFilePath != null)	{
176 196
			showParameters.setImage(IImageKeys.getImage(iconFilePath));
177 197
		}
......
179 199
		else	{
180 200
			showParameters.setText(groupTitle);
181 201
		}
182
		
202

  
183 203
		if (buttonToolTip != null)	{
184 204
			showParameters.setToolTipText(buttonToolTip);
185 205
		}
186
		
187
		showParameters.setSelection(showGroup);
188
		this.setVisible(group, showGroup);
189
		
206

  
207
		this.setVisible(group, showParameters, showGroup); // default init
208

  
190 209
		showParameters.addSelectionListener(new SelectionListener() {
191
			
210

  
192 211
			@Override
193 212
			public void widgetSelected(SelectionEvent e) {
194
				setVisible(group, showParameters.getSelection());
213
				setVisible(group, showParameters, showParameters.getSelection());
195 214
			}
196
			
215

  
197 216
			@Override
198 217
			public void widgetDefaultSelected(SelectionEvent e) { }
199 218
		});
200
		
219

  
201 220
		this.groups.put(groupTitle, group);
221
		this.buttons.put(groupTitle, showParameters);
202 222
		return group;
203 223
	}
204 224
}
tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 758)
55 55
import org.txm.rcp.utils.SWTEditorsUtils;
56 56
import org.txm.rcp.views.corpora.CorporaView;
57 57
import org.txm.rcp.views.debug.TXMResultDebugView;
58
import org.txm.searchengine.cqp.ReferencePattern;
58 59
import org.txm.searchengine.cqp.corpus.Property;
59 60
import org.txm.searchengine.cqp.corpus.query.Query;
60 61
import org.txm.utils.logger.Log;
......
76 77
	 */
77 78
	public final static String TOP_TOOLBAR_ID = "TXMEditorTopToolBar"; //$NON-NLS-1$
78 79
	public final static String BOTTOM_TOOLBAR_ID = "TXMEditorBottomToolBar"; //$NON-NLS-1$
80
	public final static String COMPUTING_PARAMETERS_GROUP_ID = "Computing parameters";
79 81
	
80 82
	/**
81 83
	 * The editor main tool bar, positioned at the top of the editor.
......
121 123
	 * contains bottom toolbar subwidgets (installed grouped, etc.)
122 124
	 */
123 125
	private GLComposite bottomSubWidgetsComposite;
126
	private GLComposite minimalParameterComposite;
127
	private GLComposite firstLineComposite;
124 128
	
125 129

  
126 130
	
......
136 140
	}
137 141

  
138 142
	/**
143
	 *  
144
	 * @return the composite displayed before the toptoolbar, containing the minimal parameters widgets
145
	 */
146
	public GLComposite getMinimalParametersComposite() {
147
		return minimalParameterComposite;
148
	}
149
	
150
	/**
139 151
	 * Creates the default toolbar (empty) and default result area (empty).
140 152
	 * 
141 153
	 */
......
148 160
			// to hide and display the command parameters composite
149 161
			this.initParentLayout(parent, 1);
150 162

  
163
			// contains the minimal panels and top toolbars
164
			this.firstLineComposite = new GLComposite(parent, SWT.NONE);
165
			firstLineComposite.getLayout().numColumns = 2;
166
			this.firstLineComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
167
			
168
			this.minimalParameterComposite = new GLComposite(firstLineComposite, SWT.NONE);
169
			this.minimalParameterComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
170
			
151 171
			// create the top tool bar
152
			this.topToolBarContainer = new Composite(parent, SWT.NONE);
153
			this.topToolBarContainer.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
172
			this.topToolBarContainer = new Composite(firstLineComposite, SWT.NONE);
173
			this.topToolBarContainer.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));
154 174
			RowLayout rl = new RowLayout(SWT.HORIZONTAL);
155 175
			rl = new RowLayout(SWT.HORIZONTAL);
156 176
			rl.marginTop = rl.marginHeight = rl.marginWidth = rl.marginBottom = 0;
......
172 192
			if(!this.getResult().canCompute() && this.getResult().isDirty())	{
173 193
				showComputingParameters = true;
174 194
			}
175
			this.computingParametersGroup = this.topToolBar.installGroup("Computing parameters", "Show/Hide command parameters", "icons/show_computing_parameters.png", showComputingParameters);
195
			this.computingParametersGroup = this.topToolBar.installGroup(COMPUTING_PARAMETERS_GROUP_ID, "Show/Hide command parameters", "icons/show_computing_parameters.png", showComputingParameters);
176 196

  
177 197

  
178 198
			// display main area
......
607 627

  
608 628
		for (Field f : fields) {
609 629
			Parameter parameter = f.getAnnotation(Parameter.class);
610
			if (parameter == null || parameter.key().isEmpty() || !this.getResult().hasParameterChanged(parameter.key(), this.lastComputingParameters)) {
630
			if (parameter == null
631
					|| parameter.key().isEmpty() || 
632
					!this.getResult().hasParameterChanged(parameter.key(), this.lastComputingParameters)) {
611 633
				continue;
612 634
			}
613 635

  
......
646 668
				}
647 669
				else if(object instanceof PropertiesSelector)	{
648 670
					// multiple
649
					if(value instanceof List)	{
671
					if(value instanceof List || value instanceof ArrayList)	{
650 672
						((PropertiesSelector)object).setSelectedProperties((List) value);	
673
					} else if(value instanceof ReferencePattern)	{
674
						((PropertiesSelector)object).setSelectedProperties(((ReferencePattern) value).getProperties());	
651 675
					}
652 676
					// single
653 677
					else	{
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/PropertiesSelector.java (revision 758)
48 48
import org.txm.searchengine.cqp.corpus.Property;
49 49
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
50 50
import org.txm.utils.logger.Log;
51
// TODO: Auto-generated Javadoc
51
 
52 52
/**
53 53
 * Allow to choose a structural property @ author mdecorde.
54 54
 */
55 55
public class PropertiesSelector<P extends Property> extends Composite {
56 56
	
57
	protected static final int MAXLABELLENGHT = 25;
58

  
57 59
	/** The corpus. */
58 60
	Corpus corpus;
59 61
	
60 62
	/** The properties. */
61 63
	final List<P> selectedProperties = new ArrayList<P>();
62 64
	
63
	/** The availableprops. */
65
	/** The availableProperties: the list is final because we don't want to alter the source list */
64 66
	final List<P> availableProperties = new ArrayList<P>();
65 67
	
66
	/** The maxprops. */
68
	/** The maxprops: the maximum number of selected properties */
67 69
	int maxprops = -1;
68 70

  
69 71
	/** The properties label. */
......
91 93
		// = properties
92 94
		propLabel = new Label(this, SWT.NONE);
93 95
		propLabel.setText(TXMUIMessages.PropertiesSelector_1);
94
		propLabel
95
				.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, true));
96
		propLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, true));
96 97

  
97 98
		// word_pos
98 99
		propertiesLabel = new Label(this, SWT.NONE);
......
118 119
		});
119 120
	}
120 121
	
122
	public void setButtonText(String text) {
123
		if (openeditdialog != null && !openeditdialog.isDisposed()) {
124
			openeditdialog.setText(text);
125
		}
126
	}
127
	
121 128
	/**
122 129
	 * Instantiates a new properties selector.
123 130
	 * @param parent
......
160 167

  
161 168
		}
162 169
		if (buffer.length() > 0) {
163
			propertiesLabel.setText(buffer.substring(0, buffer.length()));
170
			int l = buffer.length();
171
			String s = buffer.substring(0, buffer.length());
172
			if (l > MAXLABELLENGHT) s = s.substring(0, MAXLABELLENGHT)+"...";
173
			propertiesLabel.setText(s);
164 174
			propertiesLabel.getParent().layout();
165 175
			propertiesLabel.getParent().getParent().layout();
166 176
			propertiesLabel.getParent().getParent().getParent().layout();
......
262 272
	}
263 273

  
264 274
	/**
265
	 * Sets the properties.
266
	 * @param available
275
	 * Sets the properties. 
276
	 * @param available a list of properties set to the this.availableProperties list
267 277
	 */
268 278
	public void setProperties(List<P> available) {
269 279
		this.setProperties(available, new ArrayList<P>());
......
304 314
	 *
305 315
	 * @param string the new text
306 316
	 */
307
	public void setText(String string) {
317
	public void setTitle(String string) {
308 318
		propLabel.setText(string);
309 319
		propLabel.update();
310 320
	}
......
321 331
	 * reset available and selected properties
322 332
	 */
323 333
	public void clear() {
324
		setText(""); //$NON-NLS-1$
334
		setTitle(""); //$NON-NLS-1$
325 335
		setProperties(new ArrayList<P>(), new ArrayList<P>());
326 336
	}
327 337

  
tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/structures/PropertiesComboViewer.java (revision 758)
10 10
import org.eclipse.jface.viewers.StructuredSelection;
11 11
import org.eclipse.swt.SWT;
12 12
import org.eclipse.swt.widgets.Composite;
13
import org.txm.core.results.TXMResult;
13 14
import org.txm.rcp.editors.TXMEditor;
14 15
import org.txm.rcp.editors.listeners.ComputeSelectionListener;
15 16
import org.txm.searchengine.cqp.corpus.Property;
......
37 38
	 * @param selectedSUP
38 39
	 * @param addBlankEntry to add an empty blank entry at start of the list to clear property.
39 40
	 */
40
	public PropertiesComboViewer(Composite parent, int style, TXMEditor editor, boolean autoCompute, List<? extends Property> properties, Property selectedProperty, boolean addBlankEntry) {
41
	public PropertiesComboViewer(Composite parent, int style, TXMEditor<? extends TXMResult> editor, boolean autoCompute, List<? extends Property> properties, Property selectedProperty, boolean addBlankEntry) {
41 42
		super(parent, style);
42 43
		
43 44
		this.addBlankEntry = addBlankEntry;
tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 758)
100 100
import org.txm.rcp.preferences.RCPPreferences;
101 101
import org.txm.rcp.swt.dialog.CGUMessageDialog;
102 102
import org.txm.rcp.utils.JobHandler;
103
import org.txm.rcp.views.corpora.CorporaView;
104
import org.txm.searchengine.core.SearchEngines;
105
import org.txm.searchengine.cqp.CQPEngine;
103 106
import org.txm.utils.BundleUtils;
104 107
import org.txm.utils.DeleteDir;
105 108
import org.txm.utils.logger.Log;
......
214 217
			JobHandler jobhandler = new JobHandler(
215 218
					TXMUIMessages.ApplicationWorkbenchAdvisor_1, true) {
216 219
				@Override
217
				protected IStatus run(IProgressMonitor monitor) {
220
				protected IStatus run(final IProgressMonitor monitor) {
218 221
					JobsTimer.start();
219 222
					this.runInit(monitor);
220 223
					try {
......
259 262
						if (txmHomeRestored) {
260 263
							createBackUpDirectory(monitor);
261 264
							reloadCorporaFromBackUpDirectory(monitor);
265
							this.syncExec(new Runnable() {
266
								@Override
267
								public void run() {
268
									try {
269
										SearchEngines.getCQPEngine().stop();
270
										SearchEngines.getCQPEngine().start(monitor);
271
										CorporaView.refresh();
272
									} catch (Exception e) {
273
										// TODO Auto-generated catch block
274
										e.printStackTrace();
275
									}
276
									
277
								}
278
							});
262 279
						}
263 280

  
264 281
						monitor.done();
......
797 814
		ArrayList<String> basenames = new ArrayList<String>();
798 815
		ArrayList<String> sampleCorpusLoaded = new ArrayList<String>();
799 816
		
800
		String installdirpath = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR);
817
		String installdirpath = TXMPreferences.getString(TBXPreferences.INSTALL_DIR, TBXPreferences.PREFERENCES_NODE);
801 818
		File sampleCorporaDirectory = new File(installdirpath, "samples");
802 819
		// load corpora from the install directory
803 820
		if (sampleCorporaDirectory.exists()) { //$NON-NLS-1$
......
1050 1067

  
1051 1068
						@Override
1052 1069
						public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
1070
							
1053 1071
							if (!Toolbox.isInitialized()) {
1054 1072
								try {
1055 1073
									monitor.worked(1);
tmp/org.txm.rcp/src/main/java/org/txm/rcp/Application.java (revision 758)
101 101
		}
102 102
		if (argsList.contains("-run")) { //$NON-NLS-1$
103 103
			//System.out.println("Running TXM");
104
		} else if (argsList.contains("-standalone")) { //$NON-NLS-1$
105
			File userhomeDirectory = new File("workspace").getAbsoluteFile(); // eclipse default workspace directory
106
			File defaultWorkspaceFile = new File("workspace/workspaces/default.xml");
107
			if (!defaultWorkspaceFile.exists()) {
108
				System.out.println("Stand alone launch, creating minimal TXM user home directory in "+userhomeDirectory.getAbsolutePath());
109
				System.out.println("Sample corpora, scripts, import scripts and macros files are not yet installed.");
110
				
111
				Toolbox.setPreference(TBXPreferences.USER_TXM_HOME, userhomeDirectory.getAbsolutePath());
112
				Toolbox.setPreference(TBXPreferences.INSTALL_DIR, userhomeDirectory.getParentFile().getAbsolutePath());
113
				
114
				File corpusworkspaceDirectory = new File(userhomeDirectory, "workspaces");
115
				corpusworkspaceDirectory.mkdirs();
116

  
117
				String createfolders[] = {
118
						"corpora", "clipboard", //$NON-NLS-1$ //$NON-NLS-2$
119
						"workspaces", "css", "scripts", "scripts/lib", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
120
						"scripts/macro", "scripts/user", "xsl", "samples", "schema", "R"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
121

  
122
				for (String folder : createfolders) {
123
					new File(userhomeDirectory, folder).mkdir();
124
				}
125

  
126
				Workspace.createEmptyWorkspaceDefinition(new File(corpusworkspaceDirectory, "default.xml")); //$NON-NLS-1$
127
				BundleUtils.copyFiles("org.txm.core",  "res", "org/txm", "css", new File(userhomeDirectory, "css"));
128
				BundleUtils.copyFiles("org.txm.core",  "res", "org/txm/xml", "xsl", new File(userhomeDirectory, "xsl"));
129
				BundleUtils.copyFiles("org.txm.core",  "res", "org/txm/xml", "schema", new File(userhomeDirectory, "schema"));
130
				File scriptsDirectory = new File(userhomeDirectory, "scripts");
131
				new File(scriptsDirectory, "user").mkdir();
132
				new File(scriptsDirectory, "import").mkdir();
133
				new File(scriptsDirectory, "lib").mkdir();
134
				new File(scriptsDirectory, "macro").mkdir();
135
				new File(scriptsDirectory, "samples").mkdir();
136
			}
104
<<<<<<< .mine
105
//		} else if (argsList.contains("-standalone")) { //$NON-NLS-1$
106
//			File userhomeDirectory = new File("workspace").getAbsoluteFile(); // eclipse default workspace directory
107
//			File defaultWorkspaceFile = new File("workspace/workspaces/default.xml");
108
//			if (!defaultWorkspaceFile.exists()) {
109
//				System.out.println("Stand alone launch, creating minimal TXM user home directory in "+userhomeDirectory.getAbsolutePath());
110
//				System.out.println("Sample corpora, scripts, import scripts and macros files are not yet installed.");
111
//				
112
//				TXMPreferences.put(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME, userhomeDirectory.getAbsolutePath());
113
//				TXMPreferences.put(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR, userhomeDirectory.getParentFile().getAbsolutePath());
114
//				
115
//				File corpusworkspaceDirectory = new File(userhomeDirectory, "workspaces");
116
//				corpusworkspaceDirectory.mkdirs();
117
//
118
//				String createfolders[] = {
119
//						"corpora", "clipboard", //$NON-NLS-1$ //$NON-NLS-2$
120
//						"workspaces", "css", "scripts", "scripts/lib", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
121
//						"scripts/macro", "scripts/user", "xsl", "samples", "schema", "R"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
122
//
123
//				for (String folder : createfolders) {
124
//					new File(userhomeDirectory, folder).mkdir();
125
//				}
126
//
127
//				Workspace.createEmptyWorkspaceDefinition(new File(corpusworkspaceDirectory, "default.xml")); //$NON-NLS-1$
128
//				BundleUtils.copyFiles("org.txm.core",  "res", "org/txm", "css", new File(userhomeDirectory, "css"));
129
//				BundleUtils.copyFiles("org.txm.core",  "res", "org/txm/xml", "xsl", new File(userhomeDirectory, "xsl"));
130
//				BundleUtils.copyFiles("org.txm.core",  "res", "org/txm/xml", "schema", new File(userhomeDirectory, "schema"));
131
//				File scriptsDirectory = new File(userhomeDirectory, "scripts");
132
//				new File(scriptsDirectory, "user").mkdir();
133
//				new File(scriptsDirectory, "import").mkdir();
134
//				new File(scriptsDirectory, "lib").mkdir();
135
//				new File(scriptsDirectory, "macro").mkdir();
136
//				new File(scriptsDirectory, "samples").mkdir();
137
//			}
137 138
		} else {
138 139
			System.out.println("TXM must be launch with the argument '-run' to start."); //$NON-NLS-1$
139 140
			System.out.println(TXMUIMessages.Application_4);
tmp/org.txm.internalview.rcp/src/org/txm/internalview/rcp/editors/InternalViewEditor.java (revision 758)
141 141
		structuralUnitPropertiesSelector = new PropertiesSelector<StructuralUnitProperty>(parametersArea);
142 142
		structuralUnitPropertiesSelector.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, true));
143 143
		structuralUnitPropertiesSelector.setLayout(new GridLayout(3, false));
144
		structuralUnitPropertiesSelector.setText(InternalViewUIMessages.InternalViewEditor_5);
144
		structuralUnitPropertiesSelector.setTitle(InternalViewUIMessages.InternalViewEditor_5);
145 145
		structuralUnitPropertiesSelector.addSelectionListener(computeSelectionListener);
146 146
		
147 147
		navigationPanel = getBottomToolbar().installGLComposite("navigation", 4 , false);
......
184 184
			@Override
185 185
			public Object[] getElements(Object inputElement) {
186 186
				int nlines = internalView.getSegmentLength();
187
				List<Property> props = internalView.getProperties();
187
				List<WordProperty> props = internalView.getProperties();
188 188

  
189 189
				ArrayList<Object[]> lines = new ArrayList<Object[]>();
190 190
				for (int i = 0 ; i < nlines ; i++) {
tmp/org.txm.internalview.core/src/org/txm/internalview/core/functions/InternalView.java (revision 758)
48 48
	 * Word properties to display.
49 49
	 */
50 50
	@Parameter(key=InternalViewPreferences.WORD_PROPERTIES)
51
	protected List<Property> wordProperties;
51
	protected List<WordProperty> wordProperties;
52 52
	
53 53
	/**
54 54
	 * Structural units to display.
......
70 70
	public boolean loadParameters() throws Exception {
71 71
		try {
72 72
			this.structuralUnit = this.getCorpus().getStructuralUnit(this.getStringParameterValue(InternalViewPreferences.STRUCTURAL_UNIT));
73
			this.wordProperties = (List<Property>) Property.stringToProperties(this.getCorpus(), this.getStringParameterValue(InternalViewPreferences.WORD_PROPERTIES));
73
			this.wordProperties = (List<WordProperty>) Property.stringToProperties(this.getCorpus(), this.getStringParameterValue(InternalViewPreferences.WORD_PROPERTIES));
74 74
			this.structuralUnitsProperties = StructuralUnitProperty.stringToProperties(this.getCorpus(), this.getStringParameterValue(InternalViewPreferences.STRUCTURAL_UNIT_PROPERTIES));
75 75
		} catch (CqiClientException e) {
76 76
			Log.printStackTrace(e);
......
231 231
	 * Gets lexical properties to display.
232 232
	 * @return
233 233
	 */
234
	public List<Property> getProperties() {
234
	public List<WordProperty> getProperties() {
235 235
		return wordProperties;
236 236
	}
237 237

  
......
302 302
	}
303 303

  
304 304
	
305
	public void setParameters(List<Property> properties, StructuralUnit struct, List<StructuralUnitProperty> structProperties, Integer currentStructure) {
305
	public void setParameters(List<WordProperty> properties, StructuralUnit struct, List<StructuralUnitProperty> structProperties, Integer currentStructure) {
306 306
		if (properties != null) this.wordProperties = properties;
307 307
		if (struct != null) this.structuralUnit = struct;
308 308
		if (structProperties != null) this.structuralUnitsProperties = structProperties;
......
350 350
	 * Sets the word properties to display.
351 351
	 * @param properties
352 352
	 */
353
	public void setWordProperties(List<Property> properties)	{
353
	public void setWordProperties(List<WordProperty> properties)	{
354 354
		this.wordProperties = properties;
355 355
	}
356 356
	
tmp/org.txm.cooccurrence.core/src/org/txm/cooccurrence/core/functions/Cooccurrence.java (revision 758)
60 60
import org.txm.searchengine.cqp.corpus.Property;
61 61
import org.txm.searchengine.cqp.corpus.QueryResult;
62 62
import org.txm.searchengine.cqp.corpus.StructuralUnit;
63
import org.txm.searchengine.cqp.corpus.WordProperty;
63 64
import org.txm.searchengine.cqp.corpus.query.Match;
64 65
import org.txm.searchengine.cqp.corpus.query.Query;
65 66
import org.txm.searchengine.cqp.serverException.CqiServerError;
......
209 210
	
210 211
	/** The cooccurents properties to show. */
211 212
	@Parameter(key=CooccurrencePreferences.PROPERTIES)
212
	protected List<Property> pProperties;
213
	protected List<WordProperty> pProperties;
213 214
	
214 215
	/** The keyword query. */
215 216
	@Parameter(key=CooccurrencePreferences.QUERY)
......
610 611
	 *
611 612
	 * @return the properties
612 613
	 */
613
	public List<Property> getProperties() {
614
	public List<WordProperty> getProperties() {
614 615
		return pProperties;
615 616
	}
616 617

  
......
773 774
		this.pMinRightContextSize = minright;
774 775
	}
775 776

  
776
	public void setParameters(Query query, List<Property> properties, StructuralUnit limit, int maxLeft, int minLeft, int minRight,
777
	public void setParameters(Query query, List<WordProperty> properties, StructuralUnit limit, int maxLeft, int minLeft, int minRight,
777 778
			int maxRight, int minFreq, double minScore, int minCof, boolean includeXpivot, boolean buildLexicalTableWithCooccurrents) {
778 779

  
779 780
		this.pQuery = query;
......
808 809
			StructuralUnit limit = (StructuralUnit) parameters.get(CooccurrencePreferences.STRUCTURAL_UNIT_LIMIT);
809 810

  
810 811
			Object propsParam = parameters.get(CooccurrencePreferences.PROPERTIES);
811
			List<Property> properties = null;
812
			List<WordProperty> properties = null;
812 813
			if (propsParam instanceof List) {
813
				properties = (List<Property>)propsParam;
814
				properties = (List<WordProperty>)propsParam;
814 815
			}
815 816
			else if (propsParam instanceof String) {
816
				properties = (List<Property>) Property.stringToProperties(corpus, propsParam.toString());
817
				properties = (List<WordProperty>) Property.stringToProperties(corpus, propsParam.toString());
817 818
			}
818 819

  
819 820
			int maxLeft = parameters.getInteger(CooccurrencePreferences.MAX_LEFT);
......
1401 1402
	
1402 1403
	@Override
1403 1404
	public boolean loadParameters() throws CqiClientException {
1404
		pProperties = (List<Property>) Property.stringToProperties(getCorpus(), this.getStringParameterValue(CooccurrencePreferences.PROPERTIES));
1405
		pProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), this.getStringParameterValue(CooccurrencePreferences.PROPERTIES));
1405 1406
		pQuery = new Query(this.getStringParameterValue(CooccurrencePreferences.QUERY));
1406 1407
		pStructuralUnitLimit = this.getCorpus().getStructuralUnit(this.getStringParameterValue(CooccurrencePreferences.STRUCTURAL_UNIT_LIMIT));
1407 1408
		return true;
tmp/org.txm.links.rcp/src/org/txm/rcp/commands/link/CooccurrencesToConcordances.java (revision 758)
48 48
import org.txm.rcp.messages.TXMUIMessages;
49 49
import org.txm.searchengine.cqp.corpus.Corpus;
50 50
import org.txm.searchengine.cqp.corpus.Property;
51
import org.txm.searchengine.cqp.corpus.WordProperty;
51 52
import org.txm.searchengine.cqp.corpus.query.Query;
52 53

  
53 54
// TODO: Auto-generated Javadoc
......
92 93
		Cooccurrence cooc = ((CLine) selection.getFirstElement()).getCooc();
93 94
		
94 95
		int nbProps = cooc.getProperties().size();
95
		List<Property> props = cooc.getProperties();
96
		List<WordProperty> props = cooc.getProperties();
96 97
		List<CLine> list = selection.toList();
97 98
		//System.out.println("Cooc lines "+list);
98 99

  
tmp/org.txm.links.rcp/src/org/txm/rcp/commands/link/ConcordanceToIndex.java (revision 758)
45 45
import org.txm.rcp.messages.TXMUIMessages;
46 46
import org.txm.searchengine.cqp.corpus.Corpus;
47 47
import org.txm.searchengine.cqp.corpus.Property;
48
import org.txm.searchengine.cqp.corpus.WordProperty;
48 49
import org.txm.searchengine.cqp.corpus.query.Query;
49 50

  
50 51
// TODO: Auto-generated Javadoc
......
106 107
		String query = ""; //$NON-NLS-1$
107 108

  
108 109
		Line line = (Line) selection.getFirstElement();
109
		List<Property> props = line.getConcordance().getKeywordViewProperties();
110
		List<WordProperty> props = line.getConcordance().getKeywordViewProperties();
110 111
		int nbToken = line.getKeywordsViewProperties().get(props.get(0)).size();
111 112
		int nbProps = line.getKeywordsAnalysisProperty().size();
112 113
		int nbLines = selection.size();
tmp/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java (revision 758)
183 183
		patternArea = new PropertiesSelector<StructuralUnitProperty>(paramArea, SWT.NONE);
184 184
		patternArea.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false,3,1));
185 185
		patternArea.setLayout(new GridLayout(3, false));
186
		patternArea.setText(ReferencerUIMessages.ReferencerEditor_6);
186
		patternArea.setTitle(ReferencerUIMessages.ReferencerEditor_6);
187 187
		patternArea.addSelectionListener(computeSelectionListener);
188 188

  
189 189
		
tmp/org.txm.treetagger.rcp/src/org/txm/treetagger/rcp/handlers/Train.java (revision 758)
38 38
import org.txm.searchengine.cqp.corpus.Corpus;
39 39
import org.txm.searchengine.cqp.corpus.MainCorpus;
40 40
import org.txm.searchengine.cqp.corpus.Property;
41
import org.txm.searchengine.cqp.corpus.WordProperty;
41 42
import org.txm.searchengine.cqp.corpus.query.Match;
42 43
import org.txm.searchengine.cqp.corpus.query.Query;
43 44
import org.txm.treetagger.core.preferences.TreeTaggerPreferences;
......
137 138
						System.out.println("Warning: no lexicon file or given lexicon file does not exist ("+lexique2+"). Using corpus Index...");
138 139

  
139 140
						File lexiconfile = new File(treetaggerSrcDirectory, "lexicon.txt");
140
						List<Property> corpusProperties = new ArrayList<Property>();
141
						List<WordProperty> corpusProperties = new ArrayList<WordProperty>();
141 142
						corpusProperties.add(mainCorpus.getProperty("word"));
142 143
						for (String p : properties) {
143
							Property prop = mainCorpus.getProperty(p);
144
							WordProperty prop = mainCorpus.getProperty(p);
144 145
							if (prop == null) {
145 146
								System.out.println("Error, a property is missing: "+p);
146 147
								return Status.CANCEL_STATUS;
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/editors/TSIndexEditor.java (revision 758)
97 97
import org.txm.searchengine.cqp.corpus.Partition;
98 98
import org.txm.searchengine.cqp.corpus.Property;
99 99
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
100
import org.txm.searchengine.cqp.corpus.WordProperty;
100 101
import org.txm.searchengine.cqp.corpus.query.Query;
101 102
import org.txm.statsengine.r.rcp.views.RVariablesView;
102 103
import org.txm.utils.logger.Log;
......
134 135
	protected Button go;
135 136

  
136 137
	/** The props area. */
137
	protected PropertiesSelector propsArea;
138
	protected PropertiesSelector<WordProperty> propsArea;
138 139
	// seuils
139 140
	/** The Fmin spinner. */
140 141
	protected Spinner FminSpinner;
......
301 302
		final int Fmin = Integer.parseInt(FminSpinner.getText());
302 303
		final int Fmax = Integer.parseInt(FmaxSpinner.getText());
303 304
		final int Tmax = Integer.parseInt(this.TmaxSpinner.getText());
304
		final List<Property> properties = propsArea.getSelectedProperties();
305
		final List<WordProperty> properties = propsArea.getSelectedProperties();
305 306
		try {
306 307
			title = NLS.bind(IndexUIMessages.IndexEditor_2, new Object[]{
307 308
					query.getQueryString(), properties, corpus.getName()});
......
1050 1051
			// query
1051 1052
			//this.queryWidget.memorize(index.getQuery().getQueryString());
1052 1053
			// props
1053
			ArrayList<Property> availables = new ArrayList<Property>();
1054
			ArrayList<WordProperty> availables = new ArrayList<WordProperty>();
1054 1055
			try {
1055
				for (Property p : index.getCorpus().getOrderedProperties())
1056
				for (WordProperty p : index.getCorpus().getOrderedProperties())
1056 1057
					if (!index.getProperties().contains(p))
1057 1058
						availables.add(p);
1058 1059
			} catch (CqiClientException e) {
1059 1060
				Log.printStackTrace(e);
1060 1061
				initializing = false;
1061 1062
			}
1062
			ArrayList<Property> props = new ArrayList<Property>();
1063
			ArrayList<WordProperty> props = new ArrayList<WordProperty>();
1063 1064
			props.addAll(index.getProperties());
1064 1065
			this.propsArea.setProperties(availables, props);
1065 1066
			// min, max
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette1.java (revision 758)
40 40
import org.txm.searchengine.cqp.corpus.Corpus;
41 41
import org.txm.searchengine.cqp.corpus.Property;
42 42
import org.txm.searchengine.cqp.corpus.Subcorpus;
43
import org.txm.searchengine.cqp.corpus.WordProperty;
43 44
import org.txm.searchengine.cqp.corpus.query.Query;
44 45
import org.txm.searchengine.cqp.serverException.CqiServerError;
45 46

  
......
84 85
		System.out.println("****** RECETTE 1 ******");
85 86
		
86 87
		Query query = new Query("#pivot:[word=/[Cc][ou]m?me?/ & pos=\"CONsub\"]");
87
		ArrayList<Property> props = new ArrayList<Property>();
88
		ArrayList<WordProperty> props = new ArrayList<WordProperty>();
88 89
		props.add(corpus.getProperty("word"));
89 90
		
90 91
		TSIndex tsi = null;
tmp/org.txm.tigersearch.rcp/src/org/txm/tigersearch/commands/ComputeRecette2.java (revision 758)
44 44
import org.txm.searchengine.cqp.corpus.Corpus;
45 45
import org.txm.searchengine.cqp.corpus.Property;
46 46
import org.txm.searchengine.cqp.corpus.Subcorpus;
47
import org.txm.searchengine.cqp.corpus.WordProperty;
47 48
import org.txm.searchengine.cqp.corpus.query.Query;
48 49
import org.txm.searchengine.cqp.serverException.CqiServerError;
49 50
import org.txm.utils.logger.Log;
......
144 145
		System.out.println("****** RECETTE 2 ******");
145 146

  
146 147
		Query query = new Query("#pivot:[word=/[Cc][ou]m?me?/ & pos=\"CONsub\"]");
147
		ArrayList<Property> props = new ArrayList<Property>();
148
		ArrayList<WordProperty> props = new ArrayList<WordProperty>();
148 149
		props.add(corpus1.getProperty("id"));
149 150

  
150 151
		TSIndex tsi = null, tsi2 = null;
......
156 157
		System.out.println("5 first lines: "+tsi.getAllLines());
157 158

  
158 159
		System.out.println("TSIndex with "+query+" and "+corpus2);
159
		props = new ArrayList<Property>();
160
		props = new ArrayList<WordProperty>();
160 161
		props.add(corpus2.getProperty("id"));
161 162
		tsi2 = new TSIndex(corpus2, query, props);
162 163
		System.out.println("T="+tsi2.getT());
tmp/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TSIndex.java (revision 758)
27 27
import org.txm.searchengine.cqp.corpus.Partition;
28 28
import org.txm.searchengine.cqp.corpus.Property;
29 29
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
30
import org.txm.searchengine.cqp.corpus.WordProperty;
30 31
import org.txm.searchengine.cqp.corpus.query.Match;
31 32
import org.txm.searchengine.cqp.corpus.query.Query;
32 33
import org.txm.searchengine.cqp.serverException.CqiServerError;
......
38 39
public class TSIndex extends Index {
39 40

  
40 41

  
41
	public TSIndex(Corpus corpus, List<Property> props)
42
	public TSIndex(Corpus corpus, List<WordProperty> props)
42 43
			throws CqiClientException, IOException, CqiServerError {
43 44
		super(corpus);
44 45
		this.setParameters(new Query("[]"), props, null, null, null, null);
45 46
	}
46 47

  
47
	public TSIndex(Corpus corpus, Query query, List<Property> props)
48
	public TSIndex(Corpus corpus, Query query, List<WordProperty> props)
48 49
			throws CqiClientException, IOException, CqiServerError {
49 50
		super(corpus);
50 51
		this.setParameters(query, props, null, null, null, null);
51 52
	}
52 53

  
53
	public TSIndex(Partition partition, Query query, List<Property> props)
54
	public TSIndex(Partition partition, Query query, List<WordProperty> props)
54 55
			throws CqiClientException, IOException, CqiServerError {
55 56
		super(partition);
56 57
		this.setParameters(query, props, null, null, null, null);
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/handlers/ComputeCooccurrences.java (revision 758)
44 44
import org.txm.searchengine.cqp.corpus.Corpus;
45 45
import org.txm.searchengine.cqp.corpus.Property;
46 46
import org.txm.searchengine.cqp.corpus.StructuralUnit;
47
import org.txm.searchengine.cqp.corpus.WordProperty;
47 48
import org.txm.searchengine.cqp.corpus.query.Query;
48 49
import org.txm.utils.logger.Log;
49 50

  
......
85 86
			
86 87
			StructuralUnit limit = null;
87 88
			Query query = null;
88
			List<Property> properties = null;
89
			List<WordProperty> properties = null;
89 90

  
90 91
			Concordance conc = (Concordance) selection;
91 92
			Corpus corpus = conc.getCorpus();
92 93
			maxleft = conc.getLeftContextSize();
93 94
			maxright = conc.getRightContextSize();
94
			properties = new ArrayList<Property>();
95
			properties = new ArrayList<WordProperty>();
95 96
			properties.addAll(conc.getAnalysisProperty());
96 97
			query = conc.getQuery();
97 98
			
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/editors/CooccurrencesEditor.java (revision 758)
94 94
import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
95 95
import org.txm.searchengine.cqp.corpus.Corpus;
96 96
import org.txm.searchengine.cqp.corpus.Property;
97
import org.txm.searchengine.cqp.corpus.WordProperty;
97 98
import org.txm.statsengine.r.rcp.views.RVariablesView;
98 99
import org.txm.utils.logger.Log;
99 100

  
......
156 157

  
157 158
	/** The props area. */
158 159
	@Parameter(key=CooccurrencePreferences.PROPERTIES)
159
	PropertiesSelector<Property> propertiesSelector;
160
	PropertiesSelector<WordProperty> propertiesSelector;
160 161

  
161 162
	
162 163
	
......
298 299
		filtercontrols.setLayout(layout);
299 300

  
300 301
		// | Properties: word_pos [Edit] |
301
		propertiesSelector = new PropertiesSelector<Property>(filtercontrols, SWT.NONE);
302
		propertiesSelector = new PropertiesSelector<WordProperty>(filtercontrols, SWT.NONE);
302 303
		propertiesSelector.setLayout(new GridLayout(4, false));
303 304
		propertiesSelector.setCorpus(this.getCorpus());
304
		propertiesSelector.setText(CooccurrenceUIMessages.CooccurrencesEditor_3);
305
		propertiesSelector.setTitle(CooccurrenceUIMessages.CooccurrencesEditor_3);
305 306
		//propertiesSelector.addValueChangeListener(new ComputeListener(this));
306 307
		propertiesSelector.addSelectionListener(computeSelectionListener);
307 308

  
......
592 593
	protected void initializeFields() {
593 594

  
594 595
		if (this.cooc.getProperties() != null) {
595
			List<Property> available;
596
			List<WordProperty> available;
596 597
			try {
597
				available = new ArrayList<Property>(this.cooc.getCorpus().getProperties());
598
				available = new ArrayList<WordProperty>(this.cooc.getCorpus().getProperties());
598 599
				available.removeAll(cooc.getProperties());
599 600
				this.propertiesSelector.setProperties(available, cooc.getProperties());
600 601
			} catch (Exception e) {
tmp/org.txm.index.core/groovy/org/txm/test/TestIndex.java (revision 758)
11 11
import org.txm.searchengine.cqp.corpus.CorpusManager;
12 12
import org.txm.searchengine.cqp.corpus.Partition;
13 13
import org.txm.searchengine.cqp.corpus.Property;
14
import org.txm.searchengine.cqp.corpus.WordProperty;
14 15
import org.txm.searchengine.cqp.corpus.query.Query;
15 16

  
16 17
/**
......
57 58
			}
58 59
			Query query = new Query(Query.fixQuery(queryString));
59 60
			
60
			List<Property> properties = new ArrayList<Property>();
61
			List<WordProperty> properties = new ArrayList<WordProperty>();
61 62
			for (String p : propertiesString) properties.add(corpus.getProperty(p));
62 63

  
63 64
			Index index = new Index(corpus);
......
85 86
			
86 87
			Query query = new Query(Query.fixQuery(queryString));
87 88
			
88
			List<Property> properties = new ArrayList<Property>();
89
			List<WordProperty> properties = new ArrayList<WordProperty>();
89 90
			for (String p : propertiesString) properties.add(corpus.getProperty(p));
90 91

  
91 92
			Index index = new Index(partition);
tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 758)
120 120
	 * The word properties shown.
121 121
	 */
122 122
	@Parameter(key=IndexPreferences.PROPERTIES)
123
	protected List<Property> pProperties;
123
	protected List<WordProperty> pProperties;
124 124
	
125 125
	/**
126 126
	 * The string used to separated property values.
......
384 384
	
385 385
	@Override
386 386
	public boolean loadParameters() {
387
		this.pProperties = (List<Property>) Property.stringToProperties(getCorpus(), this.getStringParameterValue(IndexPreferences.PROPERTIES));
387
		this.pProperties = (List<WordProperty>) Property.stringToProperties(getCorpus(), this.getStringParameterValue(IndexPreferences.PROPERTIES));
388 388
		this.pQuery = new Query(this.getStringParameterValue(IndexPreferences.QUERY));
389 389
		return true;
390 390
	}
......
770 770
	 *
771 771
	 * @return the properties
772 772
	 */
773
	public List<Property> getProperties() {
773
	public List<WordProperty> getProperties() {
774 774
		return this.pProperties;
775 775
	}
776 776

  
......
988 988
		this.pNLinesPerPage = Math.max(nLinesPerPage, 1);
989 989
	}
990 990

  
991
	public void setParameters(List<Property> props) {
991
	public void setParameters(List<WordProperty> props) {
992 992
		this.pQuery = new Query("[]"); //$NON-NLS-1$
993 993
		this.pProperties = props;
994 994
		this.lexicon = null;
......
1006 1006
	 * Sets the properties.
1007 1007
	 * @param properties
1008 1008
	 */
1009
	public void setProperties(List<Property> properties)	{
1009
	public void setProperties(List<WordProperty> properties)	{
1010 1010
		this.pProperties = properties;
1011 1011
	}
1012 1012
	
......
1015 1015
	 * Clears all existing properties.
1016 1016
	 * @param property
1017 1017
	 */
1018
	public void setProperty(Property property)	{
1019
		List<Property> properties = new ArrayList<Property>();
1018
	public void setProperty(WordProperty property)	{
1019
		List<WordProperty> properties = new ArrayList<WordProperty>();
1020 1020
		properties.add(property);
1021 1021
		this.setProperties(properties);
1022 1022
	}
1023 1023
	
1024 1024
	
1025 1025
	
1026
	public void setParameters(Query query, List<Property> props, Integer filterFmin, Integer filterFmax, Integer filterVmax, Integer nLinesPerPage) {
1026
	public void setParameters(Query query, List<WordProperty> props, Integer filterFmin, Integer filterFmax, Integer filterVmax, Integer nLinesPerPage) {
1027 1027
		this.pQuery = query;
1028 1028
		this.pProperties = props;
1029 1029
		if (filterFmax != null) this.pFmaxFilter = filterFmax;
......
1035 1035
	@Override
1036 1036
	public boolean setParameters(TXMParameters parameters) {
1037 1037
		try {
1038
			List<Property> props = (List<Property>) parameters.get("props"); //$NON-NLS-1$
1038
			List<WordProperty> props = (List<WordProperty>) parameters.get("props"); //$NON-NLS-1$
1039 1039
			Query query = (Query) parameters.get("query"); //$NON-NLS-1$
1040 1040
			Integer filterFmin = (Integer) parameters.get("filterFmin"); //$NON-NLS-1$
1041 1041
			Integer filterFmax = (Integer) parameters.get("filterFmax"); //$NON-NLS-1$
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Corpus.java (revision 758)
124 124

  
125 125
	protected static String WORD = TXMPreferences.DEFAULT_UNIT_PROPERTY;
126 126

  
127
	protected Property wordProperty = null;
127
	protected WordProperty wordProperty = null;
128 128

  
129 129
	protected static Integer SUBCORPUS_COUNTER = new Integer(0);
130 130

  
......
993 993

  
994 994
	abstract public int[] getStartLimits(String structural_unit_property) throws IOException, CqiServerError, InvalidCqpIdException, CqiClientException;
995 995
	
996
	public Property getWordProperty() throws CqiClientException {
996
	public WordProperty getWordProperty() throws CqiClientException {
997 997
		if (wordProperty == null)
998 998
			wordProperty = getProperty(WORD);
999 999
		return wordProperty;
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/WordProperty.java (revision 758)
22 22
	public String getFullName() {
23 23
		return getName();
24 24
	}
25

  
26

  
27 25
	
28 26
}
tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/ReferencePattern.java (revision 758)
37 37
import org.txm.searchengine.cqp.corpus.Property;
38 38
import org.txm.searchengine.cqp.corpus.StructuralUnit;
39 39
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
40
import org.txm.utils.logger.Log;
40 41

  
41 42
// TODO: Auto-generated Javadoc
42 43
/**
......
85 86
			return null;
86 87
		}
87 88
	}
88
	
89

  
89 90
	/**
90 91
	 * Instantiates a new reference pattern.
91 92
	 */
......
103 104
		properties.add(prop);
104 105
		this.properties = properties;
105 106
	}
106
	
107

  
107 108
	/**
108 109
	 * Instantiates a new reference pattern.
109 110
	 *
......
114 115
		properties.add(prop);
115 116
		this.properties = properties;
116 117
	}
117
	
118

  
118 119
	/**
119 120
	 * Instantiates a new reference pattern.
120 121
	 *
......
123 124
	public ReferencePattern(List<Property> properties) {
124 125
		this.properties = properties;
125 126
	}
126
	
127
	
127

  
128

  
128 129
	/**
129 130
	 * Adds the property.
130 131
	 *
......
173 174
	public String getTitle() {
174 175
		if (this.properties == null) return "none";
175 176
		else if (this.properties.size() == 0) return "none";
176
		
177

  
177 178
		String title = ""; //$NON-NLS-1$
178 179
		for (Property p : this.properties) {
179 180
			if (p == null) continue;
......
206 207
		}
207 208
		return properties.get(0).getCorpus();
208 209
	}
210

  
211
	public static List<Property> getPossibleValues(Corpus corpus) {
212
		List<Property> availableReferenceItems = new ArrayList<Property>();
213
		try {
214
			// add word properties
215
			availableReferenceItems.addAll(corpus.getOrderedProperties());
216

  
217
			// add structural units properties
218
			for (StructuralUnit unit : corpus.getOrderedStructuralUnits()) {
219
				availableReferenceItems.addAll(unit.getProperties());
220
			}
221

  
222
		} catch (Exception e) {
223
			Log.printStackTrace(e);
224
		}
225
		return availableReferenceItems;
226
	}
209 227
}
tmp/org.txm.libs.cqp/src/org/txm/libs/cqp/CQPLibPreferences.java (revision 758)
109 109
			e1.printStackTrace();
110 110
			return;
111 111
		} 
112
		
112
		String[] filenames = {"cqp","cqpserver","cwb-align","cwb-align-encode","cwb-decode","cwb-encode","cwb-makeall","libcqpjni.so"};
113 113
		File execFile = new File(OSDir, "cqpserver"+ext);
114 114
		if (!execFile.canExecute()) { // file rights need to be set
115 115
			Log.info("Setting execution file rights to: "+OSDir.getAbsolutePath()+" files...");
116 116
			//int ret = Runtime.getRuntime().exec("chmod -R +x '"+OSDir.getAbsolutePath()+"'").waitFor();
117
			for (File file : OSDir.listFiles()) {
118
				if (file.getName().endsWith(".gz")) continue;
119

  
120
				file.setExecutable(true); // Java 6, next liens for JAva 7+
117
			for (String filename : filenames) {
118
				new File(OSDir, filename).setExecutable(true);
121 119
			}
122 120
		}
123 121
		
tmp/org.txm.core/src/java/org/txm/Engine.java (revision 758)
23 23
	public abstract boolean start(IProgressMonitor monitor) throws Exception;
24 24
	
25 25
	public abstract boolean stop() throws Exception;
26

  
26 27
}
tmp/org.txm.core/src/java/org/txm/core/results/Parameter.java (revision 758)
34 34
	 * @return
35 35
	 */
36 36
	public String key() default "";
37

  
38 37
	
39 38
	/**
40 39
	 * To determine what kind of parameters has been changed between tWo computing/rendering and do only computing, rendering or both.
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 758)
485 485
			}
486 486

  
487 487
			try {
488
				str.append(name + " = " + f.get(this) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
488
				Object v = f.get(this);
489
				if (v != null) {
490
					str.append(name + "("+v.getClass().getSimpleName()+") = " + v + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
491
				} else {
492
					str.append(name + " = NULL \n"); //$NON-NLS-1$ //$NON-NLS-2$
493
				}
489 494
			}
490 495
			catch (IllegalArgumentException e) {
491 496
				// TODO Auto-generated catch block
tmp/org.txm.core/src/java/org/txm/Toolbox.java (revision 758)
237 237
		try {
238 238
			startsEngineManagers(monitor);
239 239
		} catch (Exception e) {
240
			System.out.println("Error: error during engines start: "+e.getLocalizedMessage());
240 241
			initializing = false;
241 242
			throw e;
242 243
		}
tmp/org.txm.concordance.core/src/org/txm/concordance/core/tests/TestConcordance.java (revision 758)
17 17
import org.txm.searchengine.cqp.corpus.Corpus;
18 18
import org.txm.searchengine.cqp.corpus.CorpusManager;
19 19
import org.txm.searchengine.cqp.corpus.Property;
20
import org.txm.searchengine.cqp.corpus.WordProperty;
20 21
import org.txm.searchengine.cqp.corpus.query.Query;
21 22

  
22 23
/**
......
59 60
			}
60 61
			Query query = new Query(Query.fixQuery(queryString));
61 62
			
62
			List<Property> leftCSortProperties = new ArrayList<Property>();
63
			List<WordProperty> leftCSortProperties = new ArrayList<WordProperty>();
63 64
			for (String p : leftCSortPropertiesString) leftCSortProperties.add(corpus.getProperty(p));
64 65
			
65
			List<Property> rightCSortProperties =  new ArrayList<Property>();
66
			List<WordProperty> rightCSortProperties =  new ArrayList<WordProperty>();
66 67
			for (String p : rightCSortPropertiesString) rightCSortProperties.add(corpus.getProperty(p));
67 68
			
68
			List<Property> keywordSortProperties =  new ArrayList<Property>();
69
			List<WordProperty> keywordSortProperties =  new ArrayList<WordProperty>();
69 70
			for (String p : keywordSortPropertiesString) keywordSortProperties.add(corpus.getProperty(p));
70 71
			
71
			List<Property> leftCViewProperties = new ArrayList<Property>();
72
			List<WordProperty> leftCViewProperties = new ArrayList<WordProperty>();
72 73
			for (String p : leftCViewPropertiesString) leftCViewProperties.add(corpus.getProperty(p));
73 74
			
74
			List<Property> rightCViewProperties =  new ArrayList<Property>();
75
			List<WordProperty> rightCViewProperties =  new ArrayList<WordProperty>();
75 76
			for (String p : rightCViewPropertiesString) rightCViewProperties.add(corpus.getProperty(p));
76 77
			
77
			List<Property> keywordViewProperties =  new ArrayList<Property>();
78
			List<WordProperty> keywordViewProperties =  new ArrayList<WordProperty>();
78 79
			for (String p : keywordViewPropertiesString) keywordViewProperties.add(corpus.getProperty(p));
79 80

  
80 81
			ArrayList<Property> refPatterns = new ArrayList<Property>();
tmp/org.txm.concordance.core/src/org/txm/concordance/core/functions/Concordance.java (revision 758)
94 94
	/** The symbol. */
95 95
	private String symbol;
96 96

  
97
	private ArrayList<Property> availableKeywordViewProperties;
97
	private ArrayList<WordProperty> availableKeywordViewProperties;
98 98

  
99
	private ArrayList<Property> availableLeftViewProperties;
99
	private ArrayList<WordProperty> availableLeftViewProperties;
100 100

  
101
	private ArrayList<Property> availableRightViewProperties;
101
	private ArrayList<WordProperty> availableRightViewProperties;
102 102

  
103
	private ArrayList<Property> availableLeftSortProperties;
103
	private ArrayList<WordProperty> availableLeftSortProperties;
104 104

  
105
	private ArrayList<Property> availableKeywordSortProperties;
105
	private ArrayList<WordProperty> availableKeywordSortProperties;
106 106

  
107
	private ArrayList<Property> availableRightSortProperties;
107
	private ArrayList<WordProperty> availableRightSortProperties;
108 108

  
109 109

  
110 110
	
......
114 114
	
115 115
	
116 116
	/** The keyword analysis properties */
117
	@Parameter
118
	protected List<Property> pAnalysisKeywordProperties;
117
	@Parameter(key=ConcordancePreferences.KEYWORD_ANALYSIS_PROPERTIES)
118
	protected List<WordProperty> pAnalysisKeywordProperties;
119 119
	
120 120
	/** The analysis properties */
121
	@Parameter
122
	protected List<Property> pAnalysisLeftProperties;
121
	@Parameter(key=ConcordancePreferences.LEFT_ANALYSIS_PROPERTIES)
122
	protected List<WordProperty> pAnalysisLeftProperties;
123 123
	
124 124
	/** The ReferncePattern sort properties	 */
125
	@Parameter
125
	@Parameter(key=ConcordancePreferences.ANALYSIS_REFERENCE_PATTERN)
126 126
	protected ReferencePattern pAnalysisRefPattern;
127 127
	
128 128
	/** The right c analysis property. */
129
	@Parameter
130
	protected List<Property> pAnalysisRightProperties;
129
	@Parameter(key=ConcordancePreferences.RIGHT_ANALYSIS_PROPERTIES)
130
	protected List<WordProperty> pAnalysisRightProperties;
131 131
	
132 132
	/** used to limit context to the matches of the CQL limit query	 */
133 133
	@Parameter(key=ConcordancePreferences.LIMIT_CQL)
......
149 149
	protected Integer pNLinesPerPage;
150 150
	
151 151
	/** The keyword view properties. */
152
	@Parameter
153
	protected List<Property> pViewKeywordProperties;
152
	@Parameter(key=ConcordancePreferences.KEYWORD_VIEW_PROPERTIES)
153
	protected List<WordProperty> pViewKeywordProperties;
154 154
	
155 155
	/** The left c view properties. */
156
	@Parameter
157
	protected List<Property> pViewLeftProperties;
156
	@Parameter(key=ConcordancePreferences.LEFT_VIEW_PROPERTIES)
157
	protected List<WordProperty> pViewLeftProperties;
158 158
	
159 159
	/** The reference pattern. */
160
	@Parameter
160
	@Parameter(key=ConcordancePreferences.VIEW_REFERENCE_PATTERN)
161 161
	protected ReferencePattern pViewRefPattern;
162 162
	
163 163
	/** The right c view properties. */
164
	@Parameter
165
	protected List<Property> pViewRightProperties;
164
	@Parameter(key=ConcordancePreferences.RIGHT_VIEW_PROPERTIES)
165
	protected List<WordProperty> pViewRightProperties;
166 166

  
167 167
	/**
168 168
	 * Optional parameterQuery result already resolved. If set the pQuery is optional
......
170 170
	@Parameter
171 171
	private QueryResult pQueryResult;
172 172
	
173
	//	/** The view properties. */
174
	//	private List<Property> pViewKeywordProperties; // contains all the view properties
175

  
176 173
	/**
177 174
	 * 
178 175
	 * @param corpus
......
303 300
	 *
304 301
	 * @return the analysisProperty
305 302
	 */
306
	public List<Property> getAnalysisProperty() {
303
	public List<WordProperty> getAnalysisProperty() {
307 304
		return pAnalysisKeywordProperties;
308 305
	}
309 306

  
......
355 352
	 *
356 353
	 * @return the analysisProperty
357 354
	 */
358
	public List<Property> getKeywordAnalysisProperties() {
355
	public List<WordProperty> getKeywordAnalysisProperties() {
359 356
		return pAnalysisKeywordProperties;
360 357
	}
361 358

  
......
387 384
	 *
388 385
	 * @return the keywordViewProperties
389 386
	 */
390
	public List<Property> getKeywordViewProperties() {
387
	public List<WordProperty> getKeywordViewProperties() {
391 388
		return pViewKeywordProperties;
392 389
	}
393 390

  
......
396 393
	 *
397 394
	 * @return the analysisProperty
398 395
	 */
399
	public List<Property> getLeftAnalysisProperties() {
396
	public List<WordProperty> getLeftAnalysisProperties() {
400 397
		return pAnalysisLeftProperties;
401 398
	}
402 399

  
......
414 411
	 *
415 412
	 * @return the leftCViewProperties
416 413
	 */
417
	public List<Property> getLeftViewProperties() {
414
	public List<WordProperty> getLeftViewProperties() {
418 415
		return pViewLeftProperties;
419 416
	}
420 417

  
......
790 787
	 *
791 788
	 * @return the analysisProperty
792 789
	 */
793
	public List<Property> getRightAnalysisProperties() {
790
	public List<WordProperty> getRightAnalysisProperties() {
794 791
		return pAnalysisRightProperties;
795 792
	}
796 793

  
......
808 805
	 *
809 806
	 * @return the rightCViewProperties
810 807
	 */
811
	public List<Property> getRightViewProperties() {
808
	public List<WordProperty> getRightViewProperties() {
812 809
		return pViewRightProperties;
813 810
	}
814 811

  
......
1029 1026
	 * 
1030 1027
	 * @param list the new analysis property
1031 1028
	 */
1032
	public void setAnalysisProperty(List<Property> list) {
1029
	public void setAnalysisProperty(List<WordProperty> list) {
1033 1030
		this.pAnalysisLeftProperties = list;
1034 1031
		this.pAnalysisRightProperties = list;
1035 1032
		this.pAnalysisKeywordProperties = list;
......
1043 1040
	 * @param keywordProps list the new analysis property
1044 1041
	 * @param rightProps list the new analysis property
1045 1042
	 */
1046
	public void setAnalysisProperty(List<Property> leftProps, List<Property> keywordProps, List<Property> rightProps) {
1043
	public void setAnalysisProperty(List<WordProperty> leftProps, List<WordProperty> keywordProps, List<WordProperty> rightProps) {
1047 1044
		this.pAnalysisLeftProperties = leftProps;
1048 1045
		this.pAnalysisRightProperties = keywordProps;
1049 1046
		this.pAnalysisKeywordProperties = rightProps;
......
1082 1079
	 * @param selectedKeywordSortProperty
1083 1080
	 *            the new analysis property
1084 1081
	 */
1085
	public void setKeywordAnalysisProperties(List<Property> selectedKeywordSortProperty) {
1082
	public void setKeywordAnalysisProperties(List<WordProperty> selectedKeywordSortProperty) {
1086 1083
		//updateDirty(pAnalysisKeywordProperties, selectedKeywordSortProperty);
1087 1084
		this.pAnalysisKeywordProperties = selectedKeywordSortProperty;
1088 1085
		resetLines();
......
1094 1091
	 * @param selectedLeftSortProperty
1095 1092
	 *            the new analysis property
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff