Index: tmp/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java
===================================================================
--- tmp/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java	(revision 921)
+++ tmp/org.txm.referencer.core/src/org/txm/referencer/core/functions/Referencer.java	(revision 922)
@@ -345,12 +345,12 @@
 	 * @return the name
 	 */
 	public String getName() {
-		if(pQuery != null)	{
+		try {
 			return getCorpus().getName() + ": " + pQuery; //$NON-NLS-1$
 		}
-		else {
+		catch (Exception e) {
 			return this.getEmptyName();
-		}
+		}
 	}
 
 	/**
Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 921)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 922)
@@ -528,12 +528,17 @@
 
 
 	/**
-	 * Number of dif ferent types in the frequency list.
+	 * Number of different types in the frequency list.
 	 * 
 	 * @return number of types in the corpus or subcorpus.
 	 */
 	public int nbrOfType() {
-		return freqs.length;
+		try {
+			return freqs.length;
+		}
+		catch (Exception e) {
+			return 0;
+		}
 	}
 
 	public void setParameters(Property property) {
Index: tmp/org.txm.chartsengine.rcp/plugin.xml
===================================================================
--- tmp/org.txm.chartsengine.rcp/plugin.xml	(revision 921)
+++ tmp/org.txm.chartsengine.rcp/plugin.xml	(revision 922)
@@ -16,20 +16,20 @@
          point="org.eclipse.ui.bindings">
       <key
             commandId="ResetChartView"
-            contextId="org.txm.chartsengine.rcp.editors.ChartEditorPart"
-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            contextId="org.txm.chartsengine.rcp.editors.ChartEditor"
+            schemeId="org.txm.rcp.scheme"
             sequence="M1+R">
       </key>
       <key
             commandId="ExportChartEditorView"
-            contextId="org.txm.chartsengine.rcp.editors.ChartEditorPart"
-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            contextId="org.txm.chartsengine.rcp.editors.ChartEditor"
+            schemeId="org.txm.rcp.scheme"
             sequence="M1+E">
       </key>
       <key
             commandId="CopyChartViewToClipboard"
-            contextId="org.txm.chartsengine.rcp.editors.ChartEditorPart"
-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            contextId="org.txm.chartsengine.rcp.editors.ChartEditor"
+            schemeId="org.txm.rcp.scheme"
             sequence="M1+C">
       </key>
    </extension>
@@ -192,8 +192,9 @@
    <extension
          point="org.eclipse.ui.contexts">
       <context
-            id="org.txm.chartsengine.rcp.editors.ChartEditorPart"
-            name="Chart editor context">
+            id="org.txm.chartsengine.rcp.editors.ChartEditor"
+            name="Chart editor context"
+            parentId="org.eclipse.ui.contexts.window">
       </context>
    </extension>
 
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 921)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 922)
@@ -2,7 +2,6 @@
 
 
 import java.io.File;
-import java.util.ArrayList;
 
 import javax.swing.JComponent;
 
@@ -11,13 +10,10 @@
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.contexts.IContextService;
 import org.eclipse.ui.part.MultiPageEditorPart;
 import org.txm.chartsengine.core.ChartsEngine;
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
@@ -218,12 +214,12 @@
 		// check that the charts engine used for the result matches the SWT components provider otherwise find a suitable components provider
 		if(this.getResult().getChartsEngine() != this.getSWTChartsComponentsProvider().getChartsEngine())	{
 			
-			Log.warning("ChartEditor.__updateEditorFromResult(): result charts engine  = " + this.getResult().getChartsEngine().getName() + " / Editor charts engine = " + this.getSWTChartsComponentsProvider().getChartsEngine().getName() + "."); //$NON-NLS-1$
+			Log.finest("ChartEditor.__updateEditorFromResult(): result charts engine  = " + this.getResult().getChartsEngine().getName() + " / Editor charts engine = " + this.getSWTChartsComponentsProvider().getChartsEngine().getName() + "."); //$NON-NLS-1$
 			
 			this.getEditorInput().setSWTChartsComponentsProvider(SWTChartsComponentsProvider.getComponentsProvider(this.getResult().getChartsEngine()));
 			this.getSWTChartsComponentsProvider().setChartsEngine(this.getResult().getChartsEngine());
 			
-			Log.warning("ChartEditor.__updateEditorFromResult(): charts engine used to create the chart does not match the editor one. The SWT components provider has been changed to match it: " + this.getSWTChartsComponentsProvider() + "."); //$NON-NLS-1$
+			Log.finest("ChartEditor.__updateEditorFromResult(): charts engine used to create the chart does not match the editor one. The SWT components provider has been changed to match it: " + this.getSWTChartsComponentsProvider() + "."); //$NON-NLS-1$
 			
 			// recreating the chart composite
 			Composite parent = this.chartComposite.getParent();
@@ -267,10 +263,10 @@
 					// registers user entries event call back extensions
 					registerEventCallBackExtensions();
 					
-					//FIXME: test to contribute to menu only in some context
+					//FIXME: test to contribute to menu only in some context and also for key binding
 					// create chart editor part context
-	//				IContextService contextService = (IContextService)getSite().getService(IContextService.class);
-	//				contextService.activateContext(ChartEditor.class.getName());
+					IContextService contextService = (IContextService)getSite().getService(IContextService.class);
+					contextService.activateContext("org.txm.chartsengine.rcp.editors.ChartEditor"); //$NON-NLS-1$
 	//				// create chart composite context
 	//				contextService.activateContext(this.chartComposite.getClass().getName());
 					
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/CopyChartViewToClipboard.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/CopyChartViewToClipboard.java	(revision 921)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/CopyChartViewToClipboard.java	(revision 922)
@@ -5,6 +5,7 @@
 import org.eclipse.core.commands.ExecutionException;
 import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
 import org.txm.chartsengine.rcp.editors.ChartEditor;
+import org.txm.utils.logger.Log;
 
 /**
  * Resets the chart view of the active chart editor part.
@@ -18,6 +19,7 @@
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		ChartEditor chartEditor = SWTChartsComponentsProvider.getActiveChartEditor(event);
 		chartEditor.copyChartViewToClipboard();
+		Log.finest("View copied to clipboard.");
 		return null;
 	}
 
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChartEditorView.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChartEditorView.java	(revision 921)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChartEditorView.java	(revision 922)
@@ -54,6 +54,7 @@
 import org.txm.rcp.messages.TXMUIMessages;
 import org.txm.rcp.swt.dialog.LastOpened;
 import org.txm.rcp.utils.JobHandler;
+import org.txm.utils.logger.Log;
 
 /**
  * Exports chart editor view using chart editor export.
