Q7

Investigate the problem with incompatible selection types

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.15
  • Fix Version/s: 1.2.16
  • Component/s: Runtime
  • Labels:
  • Test Mode:
    Manual

Description

Seems like some tree views use custom selections, but we always use StructuredSelection. We should find a way to fix that, I see three options here:

1. Maybe TreeSelection will be enough for trees.
2. Somehow determine and instantiate appropriate selection type at runtime.
3. Maybe there is no need to manage selections for selection providers manually.

First of all, we need to determine the actual selection type used by the tree view causing this:

java.lang.IllegalArgumentException: Invalid selection type
  at com.extol.ebi.ruleset.ui.editor.RulesetEditor.setSelection(RulesetEditor.java:495)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.updateSelectionProviders(Viewers.java:737)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.access$0(Viewers.java:711)
  at com.xored.tesla.internal.ui.player.viewers.Viewers$1.run(Viewers.java:320)
  at com.xored.tesla.internal.ui.player.SWTUIPlayer$8.run(SWTUIPlayer.java:2643)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody0(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure1.run(RunnableLock.java:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39(DisplayAspect.aj:347)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody2(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure3.run(RunnableLock.java:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39(DisplayAspect.aj:60)
  at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
  at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at com.extol.ebi.studio.ui.Application.start(Application.java:83)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:353)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
  at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Activity

Field Original Value New Value
Description Seems like some tree views use custom selections, but we always use StructuredSelection. We should find a way to fix that, I see three options here:

1. Maybe TreeSelection will be enough for trees.
2. Somehow determine and instantiate appropriate selection type at runtime.
3. Maybe there is no need to manage selections for selection providers manually.

First of all, we need to determine actual selection type causing this:
{noformat}
java.lang.IllegalArgumentException: Invalid selection type
  at com.extol.ebi.ruleset.ui.editor.RulesetEditor.setSelection(RulesetEditor.java:495)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.updateSelectionProviders(Viewers.java:737)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.access$0(Viewers.java:711)
  at com.xored.tesla.internal.ui.player.viewers.Viewers$1.run(Viewers.java:320)
  at com.xored.tesla.internal.ui.player.SWTUIPlayer$8.run(SWTUIPlayer.java:2643)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody0(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure1.run(RunnableLock.java:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39(DisplayAspect.aj:347)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody2(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure3.run(RunnableLock.java:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39(DisplayAspect.aj:60)
  at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
  at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at com.extol.ebi.studio.ui.Application.start(Application.java:83)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:353)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
  at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
{noformat}
Seems like some tree views use custom selections, but we always use StructuredSelection. We should find a way to fix that, I see three options here:

1. Maybe TreeSelection will be enough for trees.
2. Somehow determine and instantiate appropriate selection type at runtime.
3. Maybe there is no need to manage selections for selection providers manually.

First of all, we need to determine the actual selection type causing this:
{noformat}
java.lang.IllegalArgumentException: Invalid selection type
  at com.extol.ebi.ruleset.ui.editor.RulesetEditor.setSelection(RulesetEditor.java:495)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.updateSelectionProviders(Viewers.java:737)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.access$0(Viewers.java:711)
  at com.xored.tesla.internal.ui.player.viewers.Viewers$1.run(Viewers.java:320)
  at com.xored.tesla.internal.ui.player.SWTUIPlayer$8.run(SWTUIPlayer.java:2643)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody0(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure1.run(RunnableLock.java:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39(DisplayAspect.aj:347)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody2(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure3.run(RunnableLock.java:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39(DisplayAspect.aj:60)
  at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
  at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at com.extol.ebi.studio.ui.Application.start(Application.java:83)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:353)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
  at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
{noformat}
Description Seems like some tree views use custom selections, but we always use StructuredSelection. We should find a way to fix that, I see three options here:

1. Maybe TreeSelection will be enough for trees.
2. Somehow determine and instantiate appropriate selection type at runtime.
3. Maybe there is no need to manage selections for selection providers manually.

First of all, we need to determine the actual selection type causing this:
{noformat}
java.lang.IllegalArgumentException: Invalid selection type
  at com.extol.ebi.ruleset.ui.editor.RulesetEditor.setSelection(RulesetEditor.java:495)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.updateSelectionProviders(Viewers.java:737)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.access$0(Viewers.java:711)
  at com.xored.tesla.internal.ui.player.viewers.Viewers$1.run(Viewers.java:320)
  at com.xored.tesla.internal.ui.player.SWTUIPlayer$8.run(SWTUIPlayer.java:2643)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody0(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure1.run(RunnableLock.java:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39(DisplayAspect.aj:347)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody2(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure3.run(RunnableLock.java:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39(DisplayAspect.aj:60)
  at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
  at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at com.extol.ebi.studio.ui.Application.start(Application.java:83)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:353)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
  at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
{noformat}
Seems like some tree views use custom selections, but we always use StructuredSelection. We should find a way to fix that, I see three options here:

1. Maybe TreeSelection will be enough for trees.
2. Somehow determine and instantiate appropriate selection type at runtime.
3. Maybe there is no need to manage selections for selection providers manually.

First of all, we need to determine the actual selection type used by the tree view causing this:
{noformat}
java.lang.IllegalArgumentException: Invalid selection type
  at com.extol.ebi.ruleset.ui.editor.RulesetEditor.setSelection(RulesetEditor.java:495)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.updateSelectionProviders(Viewers.java:737)
  at com.xored.tesla.internal.ui.player.viewers.Viewers.access$0(Viewers.java:711)
  at com.xored.tesla.internal.ui.player.viewers.Viewers$1.run(Viewers.java:320)
  at com.xored.tesla.internal.ui.player.SWTUIPlayer$8.run(SWTUIPlayer.java:2643)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody0(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure1.run(RunnableLock.java:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.tesla.swt.aspects.DisplayAspect.ajc$around$com_xored_tesla_swt_aspects_DisplayAspect$10$90b1ba39(DisplayAspect.aj:347)
  at org.eclipse.swt.widgets.RunnableLock.run_aroundBody2(RunnableLock.java:35)
  at org.eclipse.swt.widgets.RunnableLock$AjcClosure3.run(RunnableLock.java:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39proceed(DisplayAspect.aj:1)
  at com.xored.sherlock.aspects.swt.DisplayAspect.ajc$around$com_xored_sherlock_aspects_swt_DisplayAspect$2$90b1ba39(DisplayAspect.aj:60)
  at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
  at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
  at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  at com.extol.ebi.studio.ui.Application.start(Application.java:83)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:353)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
  at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
{noformat}
Hide
sergey added a comment - 30/Jan/13 3:09 PM

Fixed. No more manual selection management through selection providers.

Show
sergey added a comment - 30/Jan/13 3:09 PM Fixed. No more manual selection management through selection providers.
Transition Time In Source Status Execution Times Last Executer Last Execution Date
Open Open Resolved Resolved
4d 4h 28m 1 sergey 30/Jan/13 3:09 PM

People

  • Assignee:
    sergey
    Reporter:
    sergey
Vote (0)
Watch (0)

Dates

  • Created:
    26/Jan/13 10:40 AM
    Updated:
    30/Jan/13 3:09 PM
    Resolved:
    30/Jan/13 3:09 PM