Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » addGraphicalRepresentation returns null in dark mode
addGraphicalRepresentation returns null in dark mode [message #797582] Mon, 13 February 2012 17:07 Go to next message
Patrick Talbot is currently offline Patrick TalbotFriend
Messages: 36
Registered: November 2011
Member
I have AddFeatures that I used in dark mode within a Wizard to create a diagram.
In these features, I'm making use of addGraphicalRepresentation to add a container to later add other shapes in, like this:

PictogramElement pe = addGraphicalRepresentation(context, obj);

This was working fine in 0.8 but now breaks in 0.9 because addGraphicalRepresentation now systematically returns null.

I traced this to be coming from DiagramEditorDummy.executeFeature who is not realizing the IDiagramEditor interface fully, especially the method:

Object executeFeature(IFeature feature, IContext context);

DiagramEditorDummy implementation does:
public Object executeFeature(IFeature feature, IContext context) {
	if (feature != null && context != null && feature.canExecute(context)) {
		feature.execute(context);
	}

	return null;
}


This prevents me from using dark mode entirely.
Is there any way I could achieve the same behavior (getting back a PictogramElement that is created from another AddFeature), am I missing something or is this a bug?

Thanks for you help,
-Patrick
Re: addGraphicalRepresentation returns null in dark mode [message #799116 is a reply to message #797582] Wed, 15 February 2012 13: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
Patrick,

this is a bug. Would you open a bugzilla to track this?

Thanks,
Michael
Re: addGraphicalRepresentation returns null in dark mode [message #799339 is a reply to message #799116] Wed, 15 February 2012 19:19 Go to previous message
Patrick Talbot is currently offline Patrick TalbotFriend
Messages: 36
Registered: November 2011
Member
Done #371671
Previous Topic:Use EEF to generate property sheet editor for Graphiti
Next Topic:Custom "New diagram" wizard
Goto Forum:
  


Current Time: Tue Apr 16 20:45:59 GMT 2024

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

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

Back to the top