Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Error: EditPart has to be selectable
Error: EditPart has to be selectable [message #1121264] Mon, 30 September 2013 12:41 Go to next message
Phil H is currently offline Phil H
Messages: 267
Registered: November 2012
Senior Member
Hi,

I've got a problem with my GMF editor. When I create a new diagram and click on an item inside the outline, everything thing works as expected. But when I first click inside the diagram and then choose an item from the outine view, I get the following error:

index.php/fa/16327/0/

Any ideas about this? AbstractGraphicalEditPart implements isSelectable(), but I'm not really sure wether this is causing the problems.

	
public boolean isSelectable() {
   return super.isSelectable() && getFigure() != null && getFigure().isShowing();}
  • Attachment: editpart.JPG
    (Size: 39.73KB, Downloaded 208 times)

[Updated on: Mon, 30 September 2013 12:41]

Report message to a moderator

Re: Error: EditPart has to be selectable [message #1122086 is a reply to message #1121264] Tue, 01 October 2013 08:07 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi,

what is shown if you click on details in this dialog? Do you get an exception?

Ralph
Re: Error: EditPart has to be selectable [message #1123335 is a reply to message #1122086] Wed, 02 October 2013 13:06 Go to previous messageGo to next message
Phil H is currently offline Phil H
Messages: 267
Registered: November 2012
Senior Member
"An error has occurred. See error log for more details. An EditPart has to be selectable (isSelectable() == true) in order to get selected."

So, not much informations..The console gave me the following output:

!ENTRY org.eclipse.ui.views 4 2 2013-10-02 15:03:05.870
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.views".
!STACK 0
java.lang.IllegalArgumentException: An EditPart has to be selectable (isSelectable() == true) in order to get selected.
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
	at org.eclipse.gef.editparts.AbstractEditPart.setSelected(AbstractEditPart.java:1060)
	at org.eclipse.gef.SelectionManager.setSelection(SelectionManager.java:273)
	at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setSelection(AbstractEditPartViewer.java:751)
	at org.eclipse.ui.part.MultiPageSelectionProvider.setSelection(MultiPageSelectionProvider.java:166)
	at pld.presentation.PldEditor.handleContentOutlineSelection(PldEditor.java:1383)
	at pld.presentation.PldEditor$10.selectionChanged(PldEditor.java:1311)
	at org.eclipse.ui.views.contentoutline.ContentOutlinePage$1.run(ContentOutlinePage.java:112)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.views.contentoutline.ContentOutlinePage.fireSelectionChanged(ContentOutlinePage.java:110)
	at org.eclipse.ui.views.contentoutline.ContentOutlinePage.selectionChanged(ContentOutlinePage.java:170)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	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:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	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:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

Re: Error: EditPart has to be selectable [message #1127513 is a reply to message #1123335] Sun, 06 October 2013 19:30 Go to previous message
Phil H is currently offline Phil H
Messages: 267
Registered: November 2012
Senior Member
any further suggestions? I tried to implement isSelectable without any success:

@Override
public boolean isSelectable() {
	return true;
}


I found this bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=351433) which seems to be similiar?

[Updated on: Mon, 07 October 2013 10:36]

Report message to a moderator

Previous Topic:How to Apply a Search Filter in GMF tool palette
Next Topic:Add a button (button-menu) to the GMF toolbar
Goto Forum:
  


Current Time: Tue Sep 16 23:37:47 GMT 2014

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

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