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 1807)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 1808)
@@ -466,21 +466,24 @@
 		// Debug
 		Log.finest("ChartEditor.setFocus(): giving focus to chart composite..."); //$NON-NLS-1$
 
-		this.parent.setFocus();
-//		this.getEditorSite().getPage().activate(this);
-
-		
+		//this.parent.setFocus();
 		this.chartComposite.setFocus();
-		//this.chartComposite.requestFocusInChartComponent();
-
 		
 	}
 
 	
+
+	public void onPartActivated()	{
+		System.out.println("+++++ ChartEditor.onPartActivated(): " + this.getResult());
+		this.activateContext();
+	}
+
+	public void onPartDeactivated()	{
+		System.out.println("----- ChartEditor.onPartDeactivated(): " + this.getResult());
+		this.deactivateContext();
+	}
+
 	
-	
-	
-	
 	/**
 	 * Initialize Swing/AWT events delegation.
 	 * @param swingComponent
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/SwingChartComposite.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/SwingChartComposite.java	(revision 1807)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/SwingChartComposite.java	(revision 1808)
@@ -15,17 +15,25 @@
 import java.awt.datatransfer.UnsupportedFlavorException;
 import java.awt.image.BufferedImage;
 import java.io.IOException;
+import java.lang.reflect.Method;
+import java.util.Stack;
 
 import javax.swing.JComponent;
 import javax.swing.JPanel;
+import javax.swing.border.LineBorder;
 
 import org.eclipse.swt.awt.SWT_AWT;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.rcp.IChartComponent;
 import org.txm.chartsengine.rcp.editors.ChartEditor;
 import org.txm.chartsengine.rcp.events.EventCallBackHandler;
 import org.txm.core.messages.TXMCoreMessages;
+import org.txm.core.preferences.TBXPreferences;
+import org.txm.rcp.preferences.RCPPreferences;
 import org.txm.utils.logger.Log;
 
 /**
@@ -68,6 +76,23 @@
 		super(chartEditor, parent, style);
 		
 		this.frame = SWT_AWT.new_Frame(this);
+		
+	
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
+		
 		// Need to add an AWT/Swing Panel to fix mouse events and mouse cursors changes on AWT/Swing chart component panel
 		this.rootPanel = new JPanel(new BorderLayout());
 		
@@ -80,6 +105,73 @@
 
 		this.rootPanel.setBackground(Color.WHITE);
 		
+		
+		
+		
+		// SJ: Workaround to fix a bug with some Java version and some OS where the focus of an embedded Swing component does not delegate to SWT, eg. the Part is not activated.
+		// see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=377104
+		// see: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8203855
+		this.frame.addWindowListener(new java.awt.event.WindowAdapter() {
+			@Override
+			public void windowActivated(java.awt.event.WindowEvent e) {
+				SwingChartComposite.this.getDisplay().asyncExec(new Runnable() {
+					@Override
+					public void run() {
+						if (Display.getCurrent().getFocusControl() == SwingChartComposite.this) {
+							Stack<Control> stack = new Stack<Control>();
+							Control starter = SwingChartComposite.this;
+							Shell shell = SwingChartComposite.this.getShell();
+							while (starter != null && !(starter instanceof Shell)) {
+								stack.push(starter.getParent());
+								starter = starter.getParent();
+							}
+
+							Method m = null;
+							try {
+								// instead of calling the originally proposed
+								// workaround solution (below),
+								//
+								// Event event = new Event();
+								// event.display = Display.getCurrent();
+								// event.type = SWT.Activate;
+								// event.widget = stack.pop();
+								// event.widget.notifyListeners(SWT.Activate,
+								// event);
+								//
+								// which should but does NOT set the active
+								// widget/control on the shell, we had
+								// to call the setActiveControl method directly.
+								// Updating the active control on the shell is
+								// important so that the last active
+								// control, when selected again, get the proper
+								// activation events fired.
+
+								m = shell.getClass().getDeclaredMethod("setActiveControl", Control.class);// $NON-NLS-1$
+								m.setAccessible(true);
+								while (!stack.isEmpty()) {
+									m.invoke(shell, stack.pop());
+								}
+								
+								// force the Swing component focus
+								//setFocus();
+								
+							}
+							catch (Exception e) {
+								Log.severe("** Embedded part was not able to set active control on Shell. This will result in other workbench parts not getting activated."); //$NON-NLS-1$
+								Log.printStackTrace(e);
+							}
+							finally {
+								if (m != null) {
+									m.setAccessible(false);
+								}
+							}
+						}
+					}
+				});
+			}
+		});
+		
+		
 	}
 
 	@Override
@@ -176,19 +268,37 @@
 	
 	@Override
 	public void requestFocusInChartComponent()	{
+		
+		
+		if(chartComponent != null) {
+		
 		EventQueue.invokeLater(new Runnable () {
 			public void run () {
-				if(chartComponent != null && !((Component) chartComponent).isFocusOwner())	{
+				if(!((Component) chartComponent).isFocusOwner())	{
 					
-					//boolean focusState = ((Component) chartComponent).requestFocusInWindow();
-					((JComponent) chartComponent).grabFocus();
+					boolean focusState = ((Component) chartComponent).requestFocusInWindow();
+					//((Component) chartComponent).requestFocus();
+//					((JComponent) chartComponent).grabFocus();
 					
 					// Debug
 					Log.finest(TXMCoreMessages.bind("SwingChartComposite.requestFocusInChartComponent(): AWT component focus given state = {0}.", ((Component) chartComponent).isFocusOwner())); //$NON-NLS-1$
 					
+					// FIXME: For Swing focus debug tests
+					if(RCPPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER))	{
+						if(((Component) chartComponent).isFocusOwner())	{
+							((JComponent) chartComponent).setBorder(new LineBorder(Color.red, 1));
+						}
+						else	{
+							((JComponent) chartComponent).setBorder(javax.swing.BorderFactory.createEmptyBorder());
+						}
+					}
+					
+					
 				}
 			}
 		});
+		
+		}
 	}
 
 	
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java	(revision 1807)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/SWTChartsComponentsProvider.java	(revision 1808)
@@ -23,6 +23,8 @@
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.jface.preference.ComboFieldEditor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
@@ -37,7 +39,10 @@
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
 import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IPartService;
 import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
@@ -80,9 +85,48 @@
 	}
 	
 	
+	static	{
+		
+		// FIXME: SJ: test to fix the Swing focus problem on the 3 OS
+		IPartService service = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService();
+		service.addPartListener(new IPartListener() {
+			
+			@Override
+			public void partOpened(IWorkbenchPart part) {
+				// TODO Auto-generated method stub
+				
+			}
+			
+			@Override
+			public void partDeactivated(IWorkbenchPart part) {
+				if(part instanceof ChartEditor)	{
+					((ChartEditor) part).onPartDeactivated();
+				}
+			}
+			
+			@Override
+			public void partClosed(IWorkbenchPart part) {
+				// TODO Auto-generated method stub
+				
+			}
+			
+			@Override
+			public void partBroughtToTop(IWorkbenchPart part) {
+				// TODO Auto-generated method stub
+				
+			}
+			
+			@Override
+			public void partActivated(IWorkbenchPart part) {
+				if(part instanceof ChartEditor)	{
+					((ChartEditor) part).onPartActivated();
+				}
+			}
+		});
+		
+	}
 	
 	
-	
 	/**
 	 * The charts engine.
 	 */
@@ -152,6 +196,7 @@
 //			// TODO Auto-generated catch block
 //			e.printStackTrace();
 //		}
+		
 	}
 
 	/**
@@ -661,223 +706,225 @@
 	 */
 	public static void initializeAWTDelegationListeners(final ChartEditor chartEditor, final JComponent swingComponent)	{
 
-		// AWT to  SWT
-		swingComponent.addMouseMotionListener(new MouseMotionListener() {
-
-			@Override
-			public void mouseMoved(final MouseEvent e) {
-				if(!chartEditor.getComposite().isDisposed())	{
-					chartEditor.getComposite().getDisplay().asyncExec(new Runnable () {
-						public void run() {
-							chartEditor.getComposite().notifyListeners(SWT.MouseMove, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MouseMove));
-						}
-					});
-				}
-			}
-
-			@Override
-			public void mouseDragged(MouseEvent e) {
-				// TODO Auto-generated method stub
-
-			}
-		});
-
-		swingComponent.addMouseListener(new MouseListener() {
-
-			@Override
-			public void mouseReleased(final MouseEvent e) {
-				chartEditor.getComposite().getDisplay().asyncExec(new Runnable () {
-					public void run() {
-						
-						// FIXME: context menu
-						if(e.isPopupTrigger())	{
-
-							//System.err.println("SWTChartsComponentsProvider.initializeAWTDelegationListeners(...).new MouseListener() {...}.mouseReleased(...).new Runnable() {...}.run(): AWT popup trigger detected");
-							
-
-							
-							// update the mouse over item selection according to the mouse event
-							chartEditor.getComposite().getChartComponent().updateMouseOverItem(e);
-							
-							// manually pop up the menu
-							if(chartEditor.getComposite().getMenu() != null)	{
-								chartEditor.getComposite().getMenu().setLocation(new Point(e.getXOnScreen(), e.getYOnScreen()));
-								chartEditor.getComposite().getMenu().setVisible(true);
-							}
-
-							// FIXME: the SWT.MenuDetect event delegation doesn't work, it would be better than manually pop up the menu (but other problem is the dynamic menu on chart entity item)
-							//chartEditor.getComposite().notifyListeners(SWT.MenuDetect, SWTChartsComponentProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MenuDetect));
-							// FIXME: try to delegate the Menu detect event, DOES NOT SEEM TO WORK
-							//chartEditor.getComposite().notifyListeners(SWT.MenuDetect, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MenuDetect));
-							//chartEditor.getComposite().notifyListeners(SWT.Show, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.Show));
-							
-						}
-						//chartEditor.getComposite().notifyListeners(SWT.MouseUp, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MouseUp));
-						//chartEditor.activate();
-					}
-				});
-			}
-
-			@Override
-			public void mousePressed(final MouseEvent e) {
-
-				// SWT thread
-				chartEditor.getComposite().getDisplay().asyncExec(new Runnable() {
-					@Override
-					public void run() {
-
-						//chartEditor.getComposite().notifyListeners(SWT.MouseDown, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MouseDown));
-						
-						// FIXME: Debug
-//						System.out.println("SWTChartsComponentProvider.initializeAWTDelegationListeners(...).new MouseListener() {...}.mousePressed(...).new Runnable() {...}.run()");
-						// Activate the editor part on AWT mouse pressed event
-						//chartEditor.activate();
-						//chartEditor.getShell().setFocus();
-						chartEditor.setFocus();
-						//chartEditor.getParent().setFocus();
-//						chartEditor.forceFocus();
-					}
-				});
-
-			}
-
-			@Override
-			public void mouseExited(java.awt.event.MouseEvent e) {
-				// TODO Auto-generated method stub
-
-			}
-
-			@Override
-			public void mouseEntered(java.awt.event.MouseEvent e) {
-
-				// TODO: DEbug
-				//System.err.println("SWTChartsComponentProvider.initializeSwingDelegationListeners(...) AWT mouse entered");
-
-				// Force the focus in the component on mouse enter
-				/*if(!swingComponent.isFocusOwner())	{
-
-					// SWT thread
-					if(!chartEditor.getComposite().isDisposed())	{
-						chartEditor.getComposite().getDisplay().asyncExec(new Runnable() {
-							public void run() {
 	
-	
-								// FIXME: this code works on Windows and Linux but activate() the chart editor when mouse enters
-								//chartEditor.activate();
-	
-								EventQueue.invokeLater(new Runnable () {
-									public void run () {
-								
-										// TODO: this code forces to give the focus to the embedded AWT Frame under Windows (#1127 related)
-										// For unknown reason Frame.requestFocusInWindow() doesn't work and always return false here
-										// This code is not sufficient for Linux
-										System.out.println("SWTChartsComponentProvider.initializeAWTDelegationListeners(...) trying to give focus to root embedded frame");
-										try {
-											Frame frame = (Frame) swingComponent.getFocusCycleRootAncestor();
-											//frame.synthesizeWindowActivation(true);
-											Class clazz = frame.getClass();
-											Method method = clazz.getMethod("synthesizeWindowActivation", new Class[]{boolean.class});
-											if(method != null)	{
-												method.invoke(frame, new Object[]{new Boolean(true)});
-												System.out.println("SWTChartsComponentProvider.initializeSwingDelegationListeners(...).new MouseListener() {...}.mouseEntered(...).new Runnable() {...}.run(): " + frame);
-			
-											}
-			
-											//frame.requestFocusInWindow();
-			
-			                            }
-										catch (Throwable e) {
-											Log.printStackTrace(e);
-										}
-									}
-								});
-								
-								
-								//System.out.println("SWTChartsComponentProvider.initializeSwingDelegationListeners) AWT give focus to frame = " + ((JFCComposite)chartEditor.getComposite()).frame.requestFocusInWindow());
-	
-	
-	//							chartEditor.setFocus();
-	//							System.out.println("SWTChartsComponentProvider.initializeSwingDelegationListeners() SWT got focus = " + chartEditor.getComposite().setFocus());
-	
-	//							EventQueue.invokeLater(new Runnable () {
-	//								public void run () {
-										//swingComponent.requestFocusInWindow();
-	
-	//									System.out.println("SWTChartsComponentProvider.initializeSwingDelegationListeners() AWT got focus = " + swingComponent.requestFocusInWindow());
-	//								}
-	//							});
-	
-	
-	
-							}
-						});
-					}
-				}*/
-			}
+//		
+//		// AWT to  SWT
+//		swingComponent.addMouseMotionListener(new MouseMotionListener() {
+//
+//			@Override
+//			public void mouseMoved(final MouseEvent e) {
+//				if(!chartEditor.getComposite().isDisposed())	{
+//					chartEditor.getComposite().getDisplay().asyncExec(new Runnable () {
+//						public void run() {
+//							chartEditor.getComposite().notifyListeners(SWT.MouseMove, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MouseMove));
+//						}
+//					});
+//				}
+//			}
+//
+//			@Override
+//			public void mouseDragged(MouseEvent e) {
+//				// TODO Auto-generated method stub
+//
+//			}
+//		});
+//
+//		swingComponent.addMouseListener(new MouseListener() {
+//
+//			@Override
+//			public void mouseReleased(final MouseEvent e) {
+//				chartEditor.getComposite().getDisplay().asyncExec(new Runnable () {
+//					public void run() {
+//						
+//						// FIXME: context menu
+//						if(e.isPopupTrigger())	{
+//
+//							//System.err.println("SWTChartsComponentsProvider.initializeAWTDelegationListeners(...).new MouseListener() {...}.mouseReleased(...).new Runnable() {...}.run(): AWT popup trigger detected");
+//							
+//
+//							
+//							// update the mouse over item selection according to the mouse event
+//							chartEditor.getComposite().getChartComponent().updateMouseOverItem(e);
+//							
+//							// manually pop up the menu
+//							if(chartEditor.getComposite().getMenu() != null)	{
+//								chartEditor.getComposite().getMenu().setLocation(new Point(e.getXOnScreen(), e.getYOnScreen()));
+//								chartEditor.getComposite().getMenu().setVisible(true);
+//							}
+//
+//							// FIXME: the SWT.MenuDetect event delegation doesn't work, it would be better than manually pop up the menu (but other problem is the dynamic menu on chart entity item)
+//							//chartEditor.getComposite().notifyListeners(SWT.MenuDetect, SWTChartsComponentProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MenuDetect));
+//							// FIXME: try to delegate the Menu detect event, DOES NOT SEEM TO WORK
+//							//chartEditor.getComposite().notifyListeners(SWT.MenuDetect, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MenuDetect));
+//							//chartEditor.getComposite().notifyListeners(SWT.Show, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.Show));
+//							
+//						}
+//						//chartEditor.getComposite().notifyListeners(SWT.MouseUp, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MouseUp));
+//						//chartEditor.activate();
+//					}
+//				});
+//			}
+//
+//			@Override
+//			public void mousePressed(final MouseEvent e) {
+//
+//				// SWT thread
+//				chartEditor.getComposite().getDisplay().asyncExec(new Runnable() {
+//					@Override
+//					public void run() {
+//
+//						//chartEditor.getComposite().notifyListeners(SWT.MouseDown, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.MouseDown));
+//						
+//						// FIXME: Debug
+////						System.out.println("SWTChartsComponentProvider.initializeAWTDelegationListeners(...).new MouseListener() {...}.mousePressed(...).new Runnable() {...}.run()");
+//						// Activate the editor part on AWT mouse pressed event
+//						//chartEditor.activate();
+//						//chartEditor.getShell().setFocus();
+//						chartEditor.setFocus();
+//						//chartEditor.getParent().setFocus();
+////						chartEditor.forceFocus();
+//					}
+//				});
+//
+//			}
+//
+//			@Override
+//			public void mouseExited(java.awt.event.MouseEvent e) {
+//				// TODO Auto-generated method stub
+//
+//			}
+//
+//			@Override
+//			public void mouseEntered(java.awt.event.MouseEvent e) {
+//
+//				// TODO: DEbug
+//				//System.err.println("SWTChartsComponentProvider.initializeSwingDelegationListeners(...) AWT mouse entered");
+//
+//				// Force the focus in the component on mouse enter
+//				/*if(!swingComponent.isFocusOwner())	{
+//
+//					// SWT thread
+//					if(!chartEditor.getComposite().isDisposed())	{
+//						chartEditor.getComposite().getDisplay().asyncExec(new Runnable() {
+//							public void run() {
+//	
+//	
+//								// FIXME: this code works on Windows and Linux but activate() the chart editor when mouse enters
+//								//chartEditor.activate();
+//	
+//								EventQueue.invokeLater(new Runnable () {
+//									public void run () {
+//								
+//										// TODO: this code forces to give the focus to the embedded AWT Frame under Windows (#1127 related)
+//										// For unknown reason Frame.requestFocusInWindow() doesn't work and always return false here
+//										// This code is not sufficient for Linux
+//										System.out.println("SWTChartsComponentProvider.initializeAWTDelegationListeners(...) trying to give focus to root embedded frame");
+//										try {
+//											Frame frame = (Frame) swingComponent.getFocusCycleRootAncestor();
+//											//frame.synthesizeWindowActivation(true);
+//											Class clazz = frame.getClass();
+//											Method method = clazz.getMethod("synthesizeWindowActivation", new Class[]{boolean.class});
+//											if(method != null)	{
+//												method.invoke(frame, new Object[]{new Boolean(true)});
+//												System.out.println("SWTChartsComponentProvider.initializeSwingDelegationListeners(...).new MouseListener() {...}.mouseEntered(...).new Runnable() {...}.run(): " + frame);
+//			
+//											}
+//			
+//											//frame.requestFocusInWindow();
+//			
+//			                            }
+//										catch (Throwable e) {
+//											Log.printStackTrace(e);
+//										}
+//									}
+//								});
+//								
+//								
+//								//System.out.println("SWTChartsComponentProvider.initializeSwingDelegationListeners) AWT give focus to frame = " + ((JFCComposite)chartEditor.getComposite()).frame.requestFocusInWindow());
+//	
+//	
+//	//							chartEditor.setFocus();
+//	//							System.out.println("SWTChartsComponentProvider.initializeSwingDelegationListeners() SWT got focus = " + chartEditor.getComposite().setFocus());
+//	
+//	//							EventQueue.invokeLater(new Runnable () {
+//	//								public void run () {
+//										//swingComponent.requestFocusInWindow();
+//	
+//	//									System.out.println("SWTChartsComponentProvider.initializeSwingDelegationListeners() AWT got focus = " + swingComponent.requestFocusInWindow());
+//	//								}
+//	//							});
+//	
+//	
+//	
+//							}
+//						});
+//					}
+//				}*/
+//			}
+//
+//			@Override
+//			public void mouseClicked(java.awt.event.MouseEvent e) {
+//				// TODO Auto-generated method stub
+//
+//			}
+//		});
+//
+//		// Swing component focus delegation to the SWT chart composite
+//		swingComponent.addFocusListener(new FocusListener() {
+//			
+//			@Override
+//			public void focusLost(final FocusEvent e) {
+//				
+//				// FIXME: For Swing focus debug tests
+//				if(RCPPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER))	{
+//					swingComponent.setBorder(javax.swing.BorderFactory.createEmptyBorder());
+//				}
+//				
+//				Display.getDefault().asyncExec(new Runnable() {
+//					
+//					@Override
+//					public void run() {
+//						
+//						//chartEditor.getComposite().notifyListeners(SWT.FocusOut, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.FocusOut));
+//						
+//						chartEditor.deactivateContext();						
+//					}
+//				});
+//			}
+//			
+//			@Override
+//			public void focusGained(final FocusEvent e) {
+//				
+//				// FIXME: For Swing focus debug tests
+//				if(RCPPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER))	{
+//					swingComponent.setBorder(new LineBorder(Color.red, 1));
+//				}
+//				
+//				Display.getDefault().asyncExec(new Runnable() {
+//					
+//					@Override
+//					public void run() {
+//						
+//						//chartEditor.getComposite().notifyListeners(SWT.FocusIn, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.FocusIn));
+//
+//						//PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(this);
+//						
+////						chartEditor.activate();
+//						//chartEditor.getComposite().setFocus();
+//						//chartEditor.forceFocus();
+//
+//						chartEditor.activateContext();
+//						
+//					}
+//				});
+//			}
+//		});
+//		
 
-			@Override
-			public void mouseClicked(java.awt.event.MouseEvent e) {
-				// TODO Auto-generated method stub
-
-			}
-		});
-
-		// Swing component focus delegation to the SWT chart composite
-		swingComponent.addFocusListener(new FocusListener() {
-			
-			@Override
-			public void focusLost(final FocusEvent e) {
-				
-				// FIXME: For Swing focus debug tests
-				if(RCPPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER))	{
-					swingComponent.setBorder(javax.swing.BorderFactory.createEmptyBorder());
-				}
-				
-				Display.getDefault().asyncExec(new Runnable() {
-					
-					@Override
-					public void run() {
-						
-						//chartEditor.getComposite().notifyListeners(SWT.FocusOut, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.FocusOut));
-						
-						chartEditor.deactivateContext();						
-					}
-				});
-			}
-			
-			@Override
-			public void focusGained(final FocusEvent e) {
-				
-				// FIXME: For Swing focus debug tests
-				if(RCPPreferences.getInstance().getBoolean(TBXPreferences.EXPERT_USER))	{
-					swingComponent.setBorder(new LineBorder(Color.red, 1));
-				}
-				
-				Display.getDefault().asyncExec(new Runnable() {
-					
-					@Override
-					public void run() {
-						
-						//chartEditor.getComposite().notifyListeners(SWT.FocusIn, SWTChartsComponentsProvider.swingEventToSWT(chartEditor.getComposite(), swingComponent, e, SWT.FocusIn));
-
-						//PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(this);
-						
-//						chartEditor.activate();
-						//chartEditor.getComposite().setFocus();
-						//chartEditor.forceFocus();
-
-						chartEditor.activateContext();
-						
-					}
-				});
-			}
-		});
 		
 
-		
 
 
-
 		// SWT
 
 		// SWT Tooltips tests
