import org.eclipse.swt.custom.ScrolledComposite;\r
import org.eclipse.swt.graphics.Point;\r
import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
import org.eclipse.swt.widgets.Group;\r
import org.eclipse.swt.widgets.Label;\r
import org.eclipse.swt.widgets.Spinner;\r
JFreeChartResource jfree = JFreeChartResource.getInstance(graph);\r
Resource plot = graph.syncRequest(new PossibleObjectWithType(chart, l0.ConsistsOf, jfree.Plot));\r
if(plot == null) return;\r
- Resource rangeAxis = graph.getPossibleObject(plot, jfree.Plot_rangeAxis);\r
- if(rangeAxis == null) return;\r
- rangeAxisSupport.fireInput(context, new StructuredSelection(rangeAxis));\r
-\r
- Resource domainAxis = graph.getPossibleObject(plot, jfree.Plot_domainAxis);\r
- if(domainAxis == null) return;\r
- domainAxisSupport.fireInput(context, new StructuredSelection(domainAxis));\r
+ final Resource rangeAxis = graph.getPossibleObject(plot, jfree.Plot_rangeAxis);\r
+ final Resource domainAxis = graph.getPossibleObject(plot, jfree.Plot_domainAxis);\r
+ if(rangeAxis == null && domainAxis == null) return;\r
+ Display.getDefault().asyncExec(new Runnable() {\r
+ \r
+ @Override\r
+ public void run() {\r
+ if (rangeAxis != null)\r
+ rangeAxisSupport.fireInput(context, new StructuredSelection(rangeAxis));\r
+ if (domainAxis != null)\r
+ domainAxisSupport.fireInput(context, new StructuredSelection(domainAxis));\r
+ \r
+ }\r
+ });\r
}\r
});\r
}\r
import org.eclipse.swt.custom.ScrolledComposite;\r
import org.eclipse.swt.graphics.Point;\r
import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
import org.eclipse.swt.widgets.Group;\r
import org.eclipse.swt.widgets.Label;\r
import org.eclipse.ui.IWorkbenchSite;\r
JFreeChartResource jfree = JFreeChartResource.getInstance(graph);\r
Resource plot = graph.syncRequest(new PossibleObjectWithType(chart, l0.ConsistsOf, jfree.Plot));\r
if(plot == null) return;\r
- Resource domainAxis = graph.getPossibleObject(plot, jfree.Plot_domainAxis);\r
+ final Resource domainAxis = graph.getPossibleObject(plot, jfree.Plot_domainAxis);\r
if(domainAxis == null) return;\r
- domainAxisSupport.fireInput(context, new StructuredSelection(domainAxis));\r
+ Display.getDefault().asyncExec(new Runnable() {\r
+ @Override\r
+ public void run() {\r
+ domainAxisSupport.fireInput(context, new StructuredSelection(domainAxis));\r
+ }\r
+ });\r
+ \r
}\r
});\r
}\r