Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » SimpleIDE example: problem with selection
SimpleIDE example: problem with selection [message #578537] Mon, 05 July 2010 19:08
Reto Urfer is currently offline Reto UrferFriend
Messages: 12
Registered: July 2009
Junior Member
Hi all
i am trying a little bit with the e4 example SimpleIDE. I can select
different resources in the navigator without any problem. Then i open the
Context Menu View and select one of the items there. If i now try to select
a resource in the navigator i get the following exception:

java.lang.IllegalArgumentException: Variable selection is not modifiable in
the context PerspectiveImpl (simpleide.perspective.default) Context
at
org.eclipse.e4.core.internal.contexts.EclipseContext.interna lModify(EclipseContext.java:367)
at
org.eclipse.e4.core.internal.contexts.EclipseContext.interna lModify(EclipseContext.java:377)
at
org.eclipse.e4.core.internal.contexts.EclipseContext.modify( EclipseContext.java:357)
at
org.eclipse.e4.demo.simpleide.navigator.internal.ResourceNav igator$2.selectionChanged(ResourceNavigator.java:132)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
at org.eclipse.jface.util.SafeRunnable$1.run(SafeRunnable.java: 128)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer .java:160)
at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(S tructuredViewer.java:2162)
at
org.eclipse.jface.viewers.StructuredViewer.handleSelect(Stru cturedViewer.java:1190)
at
org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected( StructuredViewer.java:1220)
at
org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenS trategy.java:228)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.ja va:222)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:389)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine $4.run(PartRenderingEngine.java:664)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine .run(PartRenderingEngine.java:589)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRu nUI(E4Workbench.java:103)
at
org.eclipse.e4.ui.internal.workbench.swt.E4Application.start (E4Application.java:124)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)


The problem seams to be in the method SelectionServiceImpl.setSelection:
serviceRoot.getContext().set(IServiceConstants.ACTIVE_SELECT ION,
selection);


What is the difference between using
"context.modify(IServiceConstants.ACTIVE_SELECTION, ...)" and
"setSelection(selection)" on the ESelectionService instance?

Thanks for information
Previous Topic:A breaking model change
Next Topic:SimpleIDE example: problem with selection
Goto Forum:
  


Current Time: Wed Apr 24 19:35:41 GMT 2024

Powered by FUDForum. Page generated in 0.02815 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top