Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » [GMF] Cannot open input element
[GMF] Cannot open input element [message #768134] Mon, 19 December 2011 16:27 Go to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
Hello again,

im working with a Model using two kinds of nodes.
In emfatic the model looks like this (just a short piece of it).

@gmf.node(label="identifier", border.width="2", border.color="0,0,0", size="130,50", figure="rectangle", label.icon="false")
class Goal extends StandardNode {
  ref AwayGoal[*]#ReferencedGoal isReferencedByAwayGoals;
}

@gmf.node(label="identifier", border.width="1", border.color="0,0,0", size="130,50", label.icon="false", figure="rectangle")
class AwayGoal extends StandardNode {
  ref Goal[1]#isReferencedByAwayGoals ReferencedGoal;
  attr String AwayGoalModuleIdentifier;
}

@gmf.node(label="identifier")
class StandardNode {
  attr String identifier;
  attr String path;
  attr String content;
}


So i got a bidirectional relation between AwayGoal and Goal. Each AwayGoal must be assigned to one Goal.
And each Goal can be assigned to many AwayGoals.

This should work also between 2 instances of my Model.

Now i wont a Listener on my AwayGoals Objects.
Everytime when the ReferencedGoal is changed it should do something.
Here the specific Attribute of the AwayGoal should be set to the identifier of the referencedGoal.
I do this like this in my AwayGoalImpl Construction.

protected AwayGoalImpl()
  {
    super();
	EContentAdapter adapter = new EContentAdapter() {
		public void notifyChanged(Notification notification) {
			if(notification.getFeature() instanceof EReferenceImpl
					&&notification.getNewValue() != null)
			{
				Goal localReferencedGoal = (Goal) notification.getNewValue();
				TransactionUtil.getEditingDomain(notification.getNotifier()).getCommandStack().execute(
						new SetCommand(TransactionUtil.getEditingDomain(notification.getNotifier()),
								(EObject)notification.getNotifier(),
								GsnModelPackage.Literals.AWAY_GOAL__AWAY_GOAL_MODULE_IDENTIFIER,
								localReferencedGoal.getIdentifier()));
			}
		}
	};
	this.eAdapters().add(adapter);
}


This works great now if i create these references inside a single instance which means one file.

If i now create the AwayGoal in one file(default.gsnmodel) and the Goal in the other(default2.gsnmodel),import the resource default2.gsnmodel in default.gsnmodel and set the Goal in my AwayGoal it still works.
But if i want to open the other File(default2.gsnmodel) now, containing the referencedGoal i got the following popup.

Cannot open input element.
Value 'gsnModel.impl.AwayGoalImpl@5c76d06a (eProxyURI: platform:/resource/testing/default.gsnmodel_diagram#_8ecCkCpZEeGsuMg9LAaJ2A)' is not legal. (platform:/resource/testing/default2.gsnmodel_diagram, 5, 118)


And the following exception:

!ENTRY org.eclipse.ui 4 0 2011-12-19 17:20:46.378
!MESSAGE Unable to create editor ID gsnModel.diagram.part.GsnModelDiagramEditorID: org.eclipse.core.runtime.CoreException: ERROR
!STACK 1
org.eclipse.core.runtime.CoreException: ERROR
	at org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.createPartControl(DiagramDocumentEditor.java:1509)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
	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.StructuredViewer.fireOpen(StructuredViewer.java:864)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
	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.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
!SUBENTRY 1 org.eclipse.gmf.runtime.diagram.ui.resources.editor 4 1 2011-12-19 17:20:46.379
!MESSAGE ERROR

!ENTRY org.eclipse.ui 2 2 2011-12-19 17:20:46.389
!MESSAGE Ignored attempt to add saveable that was already registered
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: unknown saveable: org.eclipse.ui.internal.DefaultSaveable@28b90dba from part: org.eclipse.ui.internal.ErrorEditorPart@28b90dba
	at org.eclipse.ui.internal.SaveablesList.logWarning(SaveablesList.java:187)
	at org.eclipse.ui.internal.SaveablesList.addModel(SaveablesList.java:117)
	at org.eclipse.ui.internal.SaveablesList.addModels(SaveablesList.java:289)
	at org.eclipse.ui.internal.SaveablesList.postOpen(SaveablesList.java:695)
	at org.eclipse.ui.internal.PartList.partOpened(PartList.java:234)
	at org.eclipse.ui.internal.PartList.access$0(PartList.java:210)
	at org.eclipse.ui.internal.PartList$1.propertyChanged(PartList.java:40)
	at org.eclipse.ui.internal.WorkbenchPartReference.fireInternalPropertyChange(WorkbenchPartReference.java:375)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:610)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
	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.StructuredViewer.fireOpen(StructuredViewer.java:864)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
	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.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)



[Updated on: Mon, 19 December 2011 16:32]

Report message to a moderator

Re: [GMF] Cannot open input element [message #768159 is a reply to message #768134] Mon, 19 December 2011 17:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Comments below.

On 19/12/2011 5:27 PM, Snakebyte wrote:
> Hello again,
>
> im working with a Model using two kinds of nodes.
> In emfatic the model looks like this (just a short piece of it).
>
>
> @gmf.node(label="identifier", border.width="2", border.color="0,0,0",
> size="130,50", figure="rectangle", label.icon="false")
> class Goal extends StandardNode {
> ref AwayGoal[*]#ReferencedGoal isReferencedByAwayGoals;
> }
>
> @gmf.node(label="identifier", border.width="1", border.color="0,0,0",
> size="130,50", label.icon="false", figure="rectangle")
> class AwayGoal extends StandardNode {
> ref Goal[1]#isReferencedByAwayGoals ReferencedGoal;
> attr String AwayGoalModuleIdentifier;
> }
>
> @gmf.node(label="identifier")
> class StandardNode {
> attr String identifier;
> attr String path;
> attr String content;
> }
>
> So i got a bidirectional relation between AwayGoal and Goal. Each
> AwayGoal must be assigned to one Goal.
> And each Goal can be assigned to many AwayGoals.
>
> This should work also between 2 instances of my Model.
>
> Now i wont a Listener on my AwayGoals Objects.
> Everytime when the ReferencedGoal is changed it should do something.
> Here the specific Attribute of the AwayGoal should be set to the
> identifier of the referencedGoal.
> I do this like this in my AwayGoalImpl Construction.
>
>
> protected AwayGoalImpl()
> {
> super();
> EContentAdapter adapter = new EContentAdapter() {
You understand that an EContentAdapter attaches itself to all objects in
the containment tree, not just to a single object, right.
> public void notifyChanged(Notification notification) {
You understand that by not calling super, you're completely defeating
the purpose of a content adapter?
> if(notification.getFeature() instanceof EReferenceImpl)
Why are you testing against an implementation class rather than against
EReference?
> {
> Goal localReferencedGoal = (Goal)
> notification.getNewValue();
>
> TransactionUtil.getEditingDomain(notification.getNotifier()).getCommandStack().execute(
> new
> SetCommand(TransactionUtil.getEditingDomain(notification.getNotifier()),
> (EObject)notification.getNotifier(),
>
> GsnModelPackage.Literals.AWAY_GOAL__AWAY_GOAL_MODULE_IDENTIFIER,
> localReferencedGoal.getIdentifier()));
It seems likely you'll be executing a command in the middle of executing
the command that caused this notification. Probably not much good will
come of that.
> }
> }
> };
> this.eAdapters().add(adapter);
> }
>
>
> This works great now if i create these references inside a single
> instance which means one file.
>
> If i now create the AwayGoal in one file(default.gsnmodel) and the
> Goal in the other(default2.gsnmodel),import the resource
> default2.gsnmodel in default.gsnmodel and set the Goal in my AwayGoal
> it still works.
> But if i want to open the other File(default2.gsnmodel) now,
> containing the referencedGoal i got the following popup.
If you have bidirectional references between files you need to save both
files when you add such a reference. Are you doing that?
>
>
> Cannot open input element.
> Value 'gsnModel.impl.AwayGoalImpl@5c76d06a (eProxyURI:
> platform:/resource/testing/default.gsnmodel_diagram#_8ecCkCpZEeGsuMg9LAaJ2A)'
> is not legal. (platform:/resource/testing/default2.gsnmodel_diagram,
> 5, 118)
>
>
> And the following exception:
>
> !ENTRY org.eclipse.ui 4 0 2011-12-19 17:20:46.378
> !MESSAGE Unable to create editor ID
> gsnModel.diagram.part.GsnModelDiagramEditorID:
> org.eclipse.core.runtime.CoreException: ERROR
> !STACK 1
> org.eclipse.core.runtime.CoreException: ERROR
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.createPartControl(DiagramDocumentEditor.java:1509)
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
> at
> org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
> at
> org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
> at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
> at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
> at
> org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
> at
> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
> 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.StructuredViewer.fireOpen(StructuredViewer.java:864)
> at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
> at
> org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
> at
> org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
> at
> org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
> 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.java:4165)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
> 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:344)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> 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:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> !SUBENTRY 1 org.eclipse.gmf.runtime.diagram.ui.resources.editor 4 1
> 2011-12-19 17:20:46.379
> !MESSAGE ERROR
>
> !ENTRY org.eclipse.ui 2 2 2011-12-19 17:20:46.389
> !MESSAGE Ignored attempt to add saveable that was already registered
> !STACK 0
> org.eclipse.core.runtime.AssertionFailedException: unknown saveable:
> org.eclipse.ui.internal.DefaultSaveable@28b90dba from part:
> org.eclipse.ui.internal.ErrorEditorPart@28b90dba
> at
> org.eclipse.ui.internal.SaveablesList.logWarning(SaveablesList.java:187)
> at
> org.eclipse.ui.internal.SaveablesList.addModel(SaveablesList.java:117)
> at
> org.eclipse.ui.internal.SaveablesList.addModels(SaveablesList.java:289)
> at
> org.eclipse.ui.internal.SaveablesList.postOpen(SaveablesList.java:695)
> at org.eclipse.ui.internal.PartList.partOpened(PartList.java:234)
> at org.eclipse.ui.internal.PartList.access$0(PartList.java:210)
> at
> org.eclipse.ui.internal.PartList$1.propertyChanged(PartList.java:40)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.fireInternalPropertyChange(WorkbenchPartReference.java:375)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:610)
> at
> org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
> at
> org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
> at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
> at
> org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
> at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
> at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
> at
> org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
> at
> org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
> at
> org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
> 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.StructuredViewer.fireOpen(StructuredViewer.java:864)
> at
> org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
> at
> org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
> at
> org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
> at
> org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
> 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.java:4165)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
> 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:344)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> 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:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [GMF] Cannot open input element [message #771510 is a reply to message #768134] Tue, 27 December 2011 13:33 Go to previous message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
>> protected AwayGoalImpl()
>> {
>> super();
>> EContentAdapter adapter = new EContentAdapter() {
>You understand that an EContentAdapter attaches itself to all objects in
>the containment tree, not just to a single object, right.

Is there any Adapter that just attaches to the current Object ?
I think i have to use a normal Adapter then ?

>> public void notifyChanged(Notification notification) {
>You understand that by not calling super, you're completely defeating
>the purpose of a content adapter?

I think if i use a normal Adapter i dont need the super call?

>> if(notification.getFeature() instanceof EReferenceImpl)
>Why are you testing against an implementation class rather than against
>EReference?

Hmm ok i should test against EReference.

>> {
>> Goal localReferencedGoal = (Goal)
>> notification.getNewValue();
>>
>> >TransactionUtil.getEditingDomain(notification.getNotifier()).getCommandStack().execute(
>> new
>> SetCommand(TransactionUtil.getEditingDomain(notification.getNotifier()),
>> (EObject)notification.getNotifier(),
>>
>> GsnModelPackage.Literals.AWAY_GOAL__AWAY_GOAL_MODULE_IDENTIFIER,
>> localReferencedGoal.getIdentifier()));
>It seems likely you'll be executing a command in the middle of executing
>the command that caused this notification. Probably not much good will
>come of that.
What Command do you mean ? the getIdentifier Command ?
> }
> }
> };
> this.eAdapters().add(adapter);
> }

Previous Topic:Embedded diagram doesn't appear
Next Topic:Saving GMF Editor programmatically
Goto Forum:
  


Current Time: Sat Apr 20 16:07:37 GMT 2024

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

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

Back to the top