Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Create Pictogramm Element from Contextmenu
Create Pictogramm Element from Contextmenu [message #683779] Tue, 14 June 2011 12:16 Go to next message
Phillipp  is currently offline Phillipp Friend
Messages: 24
Registered: May 2011
Junior Member
Hi,

again I have come across a problem where I could use some help.

I want to limit the creation of a specific shape to 2-shapes of my diagram and I do not want the user to drag-and-drop the features on the canvas. In this case I want to link a generalization to a shape and therefore need the "owning shape" of the generalization.

The use-case should look like this:
1. select one of the shapes that can have a generalization
2. right click and select the generalization-type from the submenu
3. BO is created in the Model-File
4. the graphical representation is added to the canvas and linked to the BO

I have done the first three steps with CostumFeatures but I don't know how to add a graphical representation to the BO without adding it to the palette.

The second problem is that I would like to add a shape to the canvas an connect it to the shape that is generalized. So the BO gets a Connection and a shape as representation.

Whereas my favorite version would be a connection that can't be selected Smile

I hope someone gets what I mean if not I can also upload a drawing to visualize it better.

Greets,
Phillipp
Re: Create Pictogramm Element from Contextmenu [message #683789 is a reply to message #683779] Tue, 14 June 2011 12:37 Go to previous messageGo to next message
Christian Brand is currently offline Christian BrandFriend
Messages: 36
Registered: July 2009
Location: Walldorf/Germany
Member
Let us solve your first problem: Usually create features appear in the palette. In your case you need to have an add feature to add the graphical representation to a BO. This add feature would then be called indirectly through the framework when calling addGraphicalRepresentation() in your custom feature.

Christian Brand
SAP AG - Walldorf - Germany
Re: Create Pictogramm Element from Contextmenu [message #683800 is a reply to message #683789] Tue, 14 June 2011 12:53 Go to previous messageGo to next message
Phillipp  is currently offline Phillipp Friend
Messages: 24
Registered: May 2011
Junior Member
Thank you very much!
Re: Create Pictogramm Element from Contextmenu [message #684137 is a reply to message #683800] Wed, 15 June 2011 04:50 Go to previous messageGo to next message
Christian Brand is currently offline Christian BrandFriend
Messages: 36
Registered: July 2009
Location: Walldorf/Germany
Member
Problem one seems to be solved. Is it?
Problem two is how to create a connection? Perhaps we need some more details on what exactly does not work.
Three - Disabling the selection of a connection: At least you can disable the move of it. Just switch of the ReconnectionFeature and the CreateBendpointFeature.

Please let us know what is working and where we can help you. Thanx!


Christian Brand
SAP AG - Walldorf - Germany
Re: Create Pictogramm Element from Contextmenu [message #690653 is a reply to message #684137] Wed, 29 June 2011 22:42 Go to previous messageGo to next message
Kalle  is currently offline Kalle Friend
Messages: 3
Registered: June 2011
Junior Member
I'll use this topic for another similar problem I have with the ContextMenu. I'm new to Graphiti, so I'm not sure if I got the right understanding of the structure of Graphiti.
I want to create and add an EClass by using the ContextMenu. I already defined a "AddEClassFeature" and a "CreateEClassFeature". It works for the palette, but when I'm using the ToolBehaviorProvider and want to override the "getContextMenu(ICustomContext context)" I don't have access to a (I)CreateContext or a (I)AddContext. So I'm not able to create a new EClass.
I already got the idea of creating an own custom AddEClassFeature, which extends AbstractCustomFeature. I overrode the execute-method and created a new AddContext. The NewObject of the AddContext is the businessObject of the currently selected pictogramElement, which is the old businessObject. At the end of the method I used the addIfPossible-method, but it seems that now I only added a new EClass to the diagram, which is linked to the old businessObject.

Any suggestions?
I'm grateful for any new approach concerning Graphiti.
Re: Create Pictogramm Element from Contextmenu [message #690893 is a reply to message #690653] Thu, 30 June 2011 11:43 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
You should be able to reuse the CreateEClassFeature in the method
getContextMenu(ICustomContext context) . You can simply create a new
CreateContext, provide the new target (e.g. the Diagram if you want to
display the new object there) and

HTH,
Michael


"Kalle" schrieb im Newsbeitrag news:iug964$d4$1@news.eclipse.org...

I'll use this topic for another similar problem I have with the ContextMenu.
I'm new to Graphiti, so I'm not sure if I got the right understanding of the
structure of Graphiti.
I want to create and add an EClass by using the ContextMenu. I already
defined a "AddEClassFeature" and a "CreateEClassFeature". It works for the
palette, but when I'm using the ToolBehaviorProvider and want to override
the "getContextMenu(ICustomContext context)" I don't have access to a
(I)CreateContext or a (I)AddContext. So I'm not able to create a new EClass.
I already got the idea of creating an own custom AddEClassFeature, which
extends AbstractCustomFeature. I overrode the execute-method and created a
new AddContext. The NewObject of the AddContext is the businessObject of the
currently selected pictogramElement, which is the old businessObject. At the
end of the method I used the addIfPossible-method, but it seems that now I
only added a new EClass to the diagram, which is linked to the old
businessObject.

Any suggestions?
I'm grateful for any new approach concerning Graphiti.
Re: Create Pictogramm Element from Contextmenu [message #693609 is a reply to message #683789] Wed, 06 July 2011 21:03 Go to previous messageGo to next message
Phillipp  is currently offline Phillipp Friend
Messages: 24
Registered: May 2011
Junior Member
Christian Brand wrote on Tue, 14 June 2011 08:37
Let us solve your first problem: Usually create features appear in the palette. In your case you need to have an add feature to add the graphical representation to a BO. This add feature would then be called indirectly through the framework when calling addGraphicalRepresentation() in your custom feature.


sorry that I write back only now. I had to some other more important issues to work on but now I am right back on this topic.

I have one problem in understanding the solution you posted. I just don't get how to call the method.

You said that the method has to be called from within the custom feature so I would call it from within execute(ICustomContext context). My problem is now that I don't get how to perfom the call since it should be called like this.addGraphicalRepresentation(IAreaContext, Object) but i don't know how to get a IAreaContext, since the ICustomContext does not work and I don't know either what object I should pass. Sadly the API does not help me much either in this case. Perhaps somebody could post an example...

I appreciate your help!
Re: Create Pictogramm Element from Contextmenu [message #694341 is a reply to message #693609] Fri, 08 July 2011 11:23 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
You can simply create your own instance of AreaContext, it's a Graphiti API
class. You should set the desired location and size information accordingly:
AreaContext areaContext = new AreaContext();
areaContext.setLocation(x, y);
areaContext.setWidth(100);
areaContext.setHeight(50);
....

HTH,
Michael


"Phillipp" schrieb im Newsbeitrag news:iv2i0d$egb$1@news.eclipse.org...

Christian Brand wrote on Tue, 14 June 2011 08:37
> Let us solve your first problem: Usually create features appear in the
> palette. In your case you need to have an add feature to add the graphical
> representation to a BO. This add feature would then be called indirectly
> through the framework when calling addGraphicalRepresentation() in your
> custom feature.


sorry that I write back only now. I had to some other more important issues
to work on but now I am right back on this topic.

I have one problem in understanding the solution you posted. I just don't
get how to call the method.

You said that the method has to be called from within the custom feature so
I would call it from within execute(ICustomContext context). My problem is
now that I don't get how to perfom the call since it should be called like
this.addGraphicalRepresentation(IAreaContext, Object) but i don't know how
to get a IAreaContext, since the ICustomContext does not work and I don't
know either what object I should pass. Sadly the API does not help me much
either in this case. Perhaps somebody could post an example...

I appreciate your help!
Re: Create Pictogramm Element from Contextmenu [message #695288 is a reply to message #683779] Mon, 11 July 2011 12:36 Go to previous messageGo to next message
Phillipp  is currently offline Phillipp Friend
Messages: 24
Registered: May 2011
Junior Member
Thanks to you.

I can now add a polygon to the diagram via the contextmenu but I don't know how to connect it to my previous selected type since I would like that the connection to have the same BO as the polygon or if possible no BO.


@Override
    public void execute(ICustomContext context) {
	PictogramElement[] pes = context.getPictogramElements();
	if (pes != null && pes.length == 1) {
	    Object bo = getBusinessObjectForPictogramElement(pes[0]);
	    GraphicsAlgorithm graphicsAlgorithm = pes[0].getGraphicsAlgorithm();

	    if (bo instanceof E_Type ^ bo instanceof ER_Type) {
		Type type = (Type) bo;
		List<Generalization> genList = type.getGeneralizations();

		// create Generalization BO
		Generalization generalization = sermFactory.eINSTANCE
			.createGeneralizationImpl();
		generalization.setType(getGeneralizationType());
		generalization.setSource(type);
		genList.add(generalization);

		// create AreaContext for placing the graphical representation
		AreaContext areaContext = new AreaContext();

		// X coordinates from the context and the GA get
		// compared and a appealing X coord gets calculated so
		// that the representation for the generalization is
		// always created right of the parent shape.
		areaContext.setLocation(
			setProperX(context.getX(), graphicsAlgorithm),
			context.getY());
		areaContext.setWidth(30);
		areaContext.setHeight(50);

		addGraphicalRepresentation(areaContext, generalization);

       //some method to add a connection between my generalization and the selected PictogramElement
     }
}

Re: Create Pictogramm Element from Contextmenu [message #696215 is a reply to message #695288] Wed, 13 July 2011 14:15 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Somehow you need to pass the proviously selected object to your custom
feature, you could e.g create your own subclass of CustomContext and add a
field holding the object. That could be filled in the calling feature. This
information can be used to call a the feature that adds such a connection
(if you don't have one you might also place teh coding to create it directly
into the "// some coding..." location.

HTH,
Michael


"Phillipp" schrieb im Newsbeitrag news:iveq6k$idi$1@news.eclipse.org...

Thanks to you.

I can now add a polygon to the diagram via the contextmenu but I don't know
how to connect it to my previous selected type since I would like that the
connection to have the same BO as the polygon or if possible no BO.


@Override
public void execute(ICustomContext context) {
PictogramElement[] pes = context.getPictogramElements();
if (pes != null && pes.length == 1) {
Object bo = getBusinessObjectForPictogramElement(pes[0]);
GraphicsAlgorithm graphicsAlgorithm = pes[0].getGraphicsAlgorithm();

if (bo instanceof E_Type ^ bo instanceof ER_Type) {
Type type = (Type) bo;
List<Generalization> genList = type.getGeneralizations();

// create Generalization BO
Generalization generalization = sermFactory.eINSTANCE
..createGeneralizationImpl();
generalization.setType(getGeneralizationType());
generalization.setSource(type);
genList.add(generalization);

// create AreaContext for placing the graphical representation
AreaContext areaContext = new AreaContext();

// X coordinates from the context and the GA get
// compared and a appealing X coord gets calculated so
// that the representation for the generalization is
// always created right of the parent shape.
areaContext.setLocation(
setProperX(context.getX(), graphicsAlgorithm),
context.getY());
areaContext.setWidth(30);
areaContext.setHeight(50);

addGraphicalRepresentation(areaContext, generalization);

//some method to add a connection between my generalization and the
selected PictogramElement
}
}
Re: Create Pictogramm Element from Contextmenu [message #700498 is a reply to message #696215] Sat, 23 July 2011 15:09 Go to previous messageGo to next message
Phillipp  is currently offline Phillipp Friend
Messages: 24
Registered: May 2011
Junior Member
Hi Michael,

this have a really hard time with getting my idea of adding a shape via the context menu going since I get a error from the draw2d framework and I don't know why.

When I select a special object in my editor the option in the context menu is displayed to add a generalization to it. When you click the entry my cutomFeature is triggered that I posted above your reply. But then I get this error message:
!ENTRY org.eclipse.graphiti 4 0 2011-07-23 16:59:56.992
!MESSAGE refresh edit part problem
!STACK 0
java.lang.NullPointerException
	at org.eclipse.draw2d.Figure.add(Figure.java:148)
	at org.eclipse.draw2d.Figure.add(Figure.java:184)
	at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChildVisual(AbstractGraphicalEditPart.java:209)
	at org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart.addChildVisual(ContainerShapeEditPart.java:161)
	at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:210)
	at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:773)
	at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refreshChildren(ShapeEditPart.java:633)
	at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:718)
	at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:633)
	at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refresh(ShapeEditPart.java:553)
	at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:252)
	at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:223)
	at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:211)
	at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:773)
	at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refreshChildren(ShapeEditPart.java:633)
	at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:718)
	at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:633)
	at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refresh(ShapeEditPart.java:553)
	at org.eclipse.graphiti.ui.internal.parts.DiagramEditPart.refresh(DiagramEditPart.java:181)
	at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.internalRefreshEditPart(DiagramEditorInternal.java:1203)
	at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.refresh(DiagramEditorInternal.java:1287)
	at org.eclipse.graphiti.ui.internal.editor.DiagramRefreshJob.runInUIThread(DiagramRefreshJob.java:99)
	at org.eclipse.graphiti.ui.internal.editor.DiagramChangeListener.resourceSetChanged(DiagramChangeListener.java:140)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$1.run(TransactionalEditingDomainImpl.java:781)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.postcommit(TransactionalEditingDomainImpl.java:771)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:543)
	at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
	at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
	at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:47)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	at org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:39)
	at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:109)
	at org.eclipse.graphiti.ui.internal.action.CustomAction.executeOnCommandStack(CustomAction.java:63)
	at org.eclipse.graphiti.ui.internal.action.CustomAction.run(CustomAction.java:58)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1383)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1195)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3629)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

the interesting thing is that I can see the shape that I defined in the addFeature for the Generalization but I can not select it and therefore not move, resize or delete it.

I really don't get what I'm doing wrong.
Re: Create Pictogramm Element from Contextmenu [message #701641 is a reply to message #700498] Mon, 25 July 2011 11:23 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
This is hardly possible to find out from remote and I'm not sure where the
bug is. It seems as if one of your shapes is lacking its GEF figure.
(Probably the one you added for the generalization).

What you can do to find out which one is toopen the "Graphiti Test
Preferences" (in your runtime via Window-->Proferences) anc switch "Add
debug actions to the context-menu of each shape". After that your context
menu will show some additional context menu entries that can help to reveal
the shape with the missing figure.

Does that help?
Michael

"Phillipp" schrieb im Newsbeitrag news:j0enji$a41$1@news.eclipse.org...

Hi Michael,

this have a really hard time with getting my idea of adding a shape via the
context menu going since I get a error from the draw2d framework and I don't
know why.

When I select a special object in my editor the option in the context menu
is displayed to add a generalization to it. When you click the entry my
cutomFeature is triggered that I posted above your reply. But then I get
this error message:
!ENTRY org.eclipse.graphiti 4 0 2011-07-23 16:59:56.992
!MESSAGE refresh edit part problem
!STACK 0
java.lang.NullPointerException
at org.eclipse.draw2d.Figure.add(Figure.java:148)
at org.eclipse.draw2d.Figure.add(Figure.java:184)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChildVisual(AbstractGraphicalEditPart.java:209)
at
org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart.addChildVisual(ContainerShapeEditPart.java:161)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:210)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:773)
at
org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refreshChildren(ShapeEditPart.java:633)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:718)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:633)
at
org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refresh(ShapeEditPart.java:553)
at
org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:252)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:223)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:211)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:773)
at
org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refreshChildren(ShapeEditPart.java:633)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:718)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:633)
at
org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.refresh(ShapeEditPart.java:553)
at
org.eclipse.graphiti.ui.internal.parts.DiagramEditPart.refresh(DiagramEditPart.java:181)
at
org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.internalRefreshEditPart(DiagramEditorInternal.java:1203)
at
org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.refresh(DiagramEditorInternal.java:1287)
at
org.eclipse.graphiti.ui.internal.editor.DiagramRefreshJob.runInUIThread(DiagramRefreshJob.java:99)
at
org.eclipse.graphiti.ui.internal.editor.DiagramChangeListener.resourceSetChanged(DiagramChangeListener.java:140)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$1.run(TransactionalEditingDomainImpl.java:781)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.postcommit(TransactionalEditingDomainImpl.java:771)
at
org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:543)
at
org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
at
org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
at
org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
at
org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
at
org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at
org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:47)
at
org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at
org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:39)
at
org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:109)
at
org.eclipse.graphiti.ui.internal.action.CustomAction.executeOnCommandStack(CustomAction.java:63)
at
org.eclipse.graphiti.ui.internal.action.CustomAction.run(CustomAction.java:58)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1383)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1195)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3629)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
the interesting thing is that I can see the shape that I defined in the
addFeature for the Generalization but I can not select it and therefore not
move, resize or delete it.

I really don't get what I'm doing wrong.
Re: Create Pictogramm Element from Contextmenu [message #702409 is a reply to message #701641] Tue, 26 July 2011 10:23 Go to previous messageGo to next message
Phillipp  is currently offline Phillipp Friend
Messages: 24
Registered: May 2011
Junior Member
Ok, I tracked the problem down to a boxRelativeAnchor I added to the shape. ChopboxAnchors work but both, BoxRelative and chobox don't.
It would be nice to have both but for now I can live with chopbox only Wink
Re: Create Pictogramm Element from Contextmenu [message #702435 is a reply to message #702409] Tue, 26 July 2011 10:52 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Sounds like a bug. Would you open a Bugzilla describing that?

Thanks,
Michael

"Phillipp" schrieb im Newsbeitrag news:j0m3v7$n2c$1@news.eclipse.org...

Ok, I tracked the problem down to a boxRelativeAnchor I added to the shape.
ChopboxAnchors work but both, BoxRelative and chobox don't.
It would be nice to have both but for now I can live with chopbox only ;)
Previous Topic:Graphiti planning for Juno
Next Topic:GRAPHITI based editor in a RCP
Goto Forum:
  


Current Time: Fri Apr 19 13:02:57 GMT 2024

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

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

Back to the top