Révision 955
tmp/org.txm.cooccurrence.rcp/src/org/txm/cooccurrence/rcp/messages/CooccurrenceUIMessages.java (revision 955) | ||
---|---|---|
3 | 3 |
import org.eclipse.osgi.util.NLS; |
4 | 4 |
import org.txm.utils.messages.Utf8NLS; |
5 | 5 |
|
6 |
/** |
|
7 |
* Cooccurrence UI messages. |
|
8 |
* |
|
9 |
* @author mdecorde |
|
10 |
* @author sjacquot |
|
11 |
* |
|
12 |
*/ |
|
6 | 13 |
public class CooccurrenceUIMessages extends NLS { |
7 | 14 |
|
8 | 15 |
private static final String BUNDLE_NAME = "org.txm.cooccurrence.rcp.messages.messages"; //$NON-NLS-1$ |
tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java (revision 955) | ||
---|---|---|
117 | 117 |
@Override |
118 | 118 |
public boolean loadParameters() throws Exception { |
119 | 119 |
try { |
120 |
this.persistable = false; // FIXME: remove that later |
|
120 |
//this.persistable = false; // FIXME: remove that later
|
|
121 | 121 |
String p = this.getStringParameterValue(TBXPreferences.UNIT_PROPERTY); |
122 | 122 |
this.pProperty = getCorpus().getProperty(p); |
123 | 123 |
} |
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 955) | ||
---|---|---|
162 | 162 |
if (parent == this) { |
163 | 163 |
throw new IllegalArgumentException("A result can not be parent of itself."); |
164 | 164 |
} |
165 |
// this.parent = parent; |
|
166 | 165 |
if(uuid == null) { |
167 | 166 |
uuid = createUUID(); |
168 | 167 |
} |
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java (revision 955) | ||
---|---|---|
13 | 13 |
import org.eclipse.swt.widgets.Composite; |
14 | 14 |
import org.eclipse.swt.widgets.Group; |
15 | 15 |
import org.eclipse.ui.PlatformUI; |
16 |
import org.eclipse.ui.contexts.IContextActivation; |
|
16 | 17 |
import org.eclipse.ui.contexts.IContextService; |
17 | 18 |
import org.eclipse.ui.part.MultiPageEditorPart; |
18 | 19 |
import org.txm.chartsengine.core.ChartsEngine; |
... | ... | |
34 | 35 |
*/ |
35 | 36 |
public abstract class ChartEditor<T extends ChartResult> extends TXMEditor<ChartResult>{ |
36 | 37 |
|
38 |
|
|
39 |
public final static String CONTEXT_ID_CHART_EDITOR = "org.txm.chartsengine.rcp.editors.ChartEditor"; //$NON-NLS-1$ |
|
40 |
|
|
37 | 41 |
/** |
38 | 42 |
* The tool bar. |
39 | 43 |
*/ |
... | ... | |
70 | 74 |
*/ |
71 | 75 |
protected MultiPageEditorPart parentMultiPagesEditor = null; |
72 | 76 |
|
77 |
|
|
78 |
protected IContextActivation contextActivationToken; |
|
79 |
|
|
73 | 80 |
|
74 | 81 |
/** |
75 | 82 |
* |
... | ... | |
265 | 272 |
|
266 | 273 |
//FIXME: test to contribute to menu only in some context and also for key binding |
267 | 274 |
// create chart editor part context |
268 |
IContextService contextService = (IContextService)getSite().getService(IContextService.class); |
|
269 |
contextService.activateContext("org.txm.chartsengine.rcp.editors.ChartEditor"); //$NON-NLS-1$ |
|
275 |
// this.activateContext(); |
|
276 |
// IContextService contextService = (IContextService)getSite().getService(IContextService.class); |
|
277 |
// this.contextActivationToken = contextService.activateContext(CONTEXT_ID_CHART_EDITOR); |
|
270 | 278 |
// // create chart composite context |
271 | 279 |
// contextService.activateContext(this.chartComposite.getClass().getName()); |
272 | 280 |
|
... | ... | |
285 | 293 |
this.forceFocus(); |
286 | 294 |
} |
287 | 295 |
} |
296 |
|
|
297 |
/** |
|
298 |
* Activates the chart editor context. |
|
299 |
*/ |
|
300 |
public void activateContext() { |
|
301 |
IContextService contextService = (IContextService)getSite().getService(IContextService.class); |
|
302 |
this.contextActivationToken = contextService.activateContext(CONTEXT_ID_CHART_EDITOR); |
|
303 |
} |
|
288 | 304 |
|
305 |
|
|
306 |
/** |
|
307 |
* Deactivates the chart editor context. |
|
308 |
*/ |
|
309 |
public void deactivateContext() { |
|
310 |
IContextService contextService = (IContextService)getSite().getService(IContextService.class); |
|
311 |
contextService.deactivateContext(this.contextActivationToken); |
|
312 |
} |
|
289 | 313 |
|
290 | 314 |
/** |
291 | 315 |
* Registers user entries event call back extensions. |
... | ... | |
391 | 415 |
|
392 | 416 |
|
393 | 417 |
|
394 |
|
|
418 |
|
|
419 |
|
|
420 |
|
|
395 | 421 |
/** |
396 | 422 |
* Initialize Swing/AWT events delegation. |
397 | 423 |
* @param swingComponent |
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java (revision 955) | ||
---|---|---|
39 | 39 |
import org.eclipse.ui.IWorkbenchWindow; |
40 | 40 |
import org.eclipse.ui.PartInitException; |
41 | 41 |
import org.eclipse.ui.PlatformUI; |
42 |
import org.eclipse.ui.contexts.IContextService; |
|
42 | 43 |
import org.eclipse.ui.part.MultiPageEditorPart; |
43 | 44 |
import org.txm.chartsengine.core.ChartsEngine; |
44 | 45 |
import org.txm.chartsengine.core.preferences.ChartsEnginePreferences; |
... | ... | |
935 | 936 |
public void focusLost(FocusEvent e) { |
936 | 937 |
// TODO Auto-generated method stub |
937 | 938 |
swingComponent.setBorder(javax.swing.BorderFactory.createEmptyBorder()); |
939 |
chartEditor.deactivateContext(); |
|
938 | 940 |
} |
939 | 941 |
|
940 | 942 |
@Override |
941 | 943 |
public void focusGained(FocusEvent e) { |
942 | 944 |
// TODO Auto-generated method stub |
943 |
swingComponent.setBorder(new LineBorder(Color.red, 2)); |
|
945 |
swingComponent.setBorder(new LineBorder(Color.red, 1)); |
|
946 |
chartEditor.activateContext(); |
|
944 | 947 |
} |
945 | 948 |
}); |
946 | 949 |
|
Formats disponibles : Unified diff