Révision 1697
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java (revision 1697) | ||
---|---|---|
342 | 342 |
|
343 | 343 |
/** |
344 | 344 |
* Activates the chart editor context. |
345 |
* The context is used, for example, to enable keyboard shortcut only for ChartEditor. |
|
345 | 346 |
*/ |
346 | 347 |
public void activateContext() { |
347 | 348 |
IContextService contextService = (IContextService)getSite().getService(IContextService.class); |
348 | 349 |
if(contextService != null) { |
349 | 350 |
this.contextActivationToken = contextService.activateContext(CONTEXT_ID_CHART_EDITOR); |
351 |
|
|
352 |
Log.finest(TXMCoreMessages.bind("ChartEditor.activateContext(): context activated (token = {0}).", this.contextActivationToken)); //$NON-NLS-1$ |
|
350 | 353 |
} |
354 |
else { |
|
355 |
Log.finest("ChartEditor.activateContext(): context activation falied."); //$NON-NLS-1$ |
|
356 |
} |
|
351 | 357 |
} |
352 | 358 |
|
353 | 359 |
|
354 | 360 |
/** |
355 | 361 |
* Deactivates the chart editor context. |
362 |
* The context is used, for example, to enable keyboard shortcut only for ChartEditor. |
|
356 | 363 |
*/ |
357 | 364 |
public void deactivateContext() { |
358 | 365 |
IContextService contextService = (IContextService)getSite().getService(IContextService.class); |
359 | 366 |
if(contextService != null) { |
360 | 367 |
contextService.deactivateContext(this.contextActivationToken); |
368 |
|
|
369 |
Log.finest(TXMCoreMessages.bind("ChartEditor.deactivateContext(): context deactivated (token = {0}).", this.contextActivationToken)); //$NON-NLS-1$ |
|
361 | 370 |
} |
371 |
else { |
|
372 |
Log.finest("ChartEditor.activateContext(): context deactivation failed."); //$NON-NLS-1$ |
|
373 |
} |
|
362 | 374 |
} |
363 | 375 |
|
364 | 376 |
/** |
tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java (revision 1697) | ||
---|---|---|
947 | 947 |
|
948 | 948 |
@Override |
949 | 949 |
public void run() { |
950 |
// TODO Auto-generated method stub |
|
951 | 950 |
chartEditor.deactivateContext(); |
952 | 951 |
} |
953 | 952 |
}); |
... | ... | |
965 | 964 |
|
966 | 965 |
@Override |
967 | 966 |
public void run() { |
968 |
// TODO Auto-generated method stub |
|
969 | 967 |
chartEditor.activateContext(); |
970 | 968 |
} |
971 | 969 |
}); |
tmp/org.txm.chartsengine.rcp/plugin.xml (revision 1697) | ||
---|---|---|
154 | 154 |
point="org.eclipse.ui.commands"> |
155 | 155 |
<command |
156 | 156 |
defaultHandler="org.txm.chartsengine.rcp.handlers.ResetChartView" |
157 |
description="Reset tha chart view" |
|
157 | 158 |
id="ResetChartView" |
158 | 159 |
name="%command.name"> |
159 | 160 |
</command> |
160 | 161 |
<command |
161 | 162 |
defaultHandler="org.txm.chartsengine.rcp.handlers.ExportChartEditorView" |
163 |
description="Export the current view" |
|
162 | 164 |
id="ExportChartEditorView" |
163 | 165 |
name="%command.name.0"> |
164 | 166 |
</command> |
165 | 167 |
<command |
166 | 168 |
defaultHandler="org.txm.chartsengine.rcp.handlers.CopyChartViewToClipboard" |
169 |
description="Copy the view to clipbaord" |
|
167 | 170 |
id="CopyChartViewToClipboard" |
168 | 171 |
name="%command.name.1"> |
169 | 172 |
</command> |
Formats disponibles : Unified diff