Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Create from Custom Feature(Create an object from Custom Feature)
Create from Custom Feature [message #1130707] Wed, 09 October 2013 21:30 Go to next message
Victor Lopez is currently offline Victor LopezFriend
Messages: 21
Registered: August 2013
Junior Member
Hi everyone,

I have one class (with its AddFeature and CreateFeature) called PositivePattern. From the CustomFeature I want to create a context menu (right click on the PositivePattern) to create another PositivePattern at the left of the first one. The thing is that in the CustomFeature I have a ICustomContext context instead of a IAreaContext that is what I use in the CreatePositivePattern (I need it for the method addGraphicalRepresentation).

The casting does not work so I wonder what can I do.

Any suggestions?

Thanks in advance!

Víctor.
Re: Create from Custom Feature [message #1132781 is a reply to message #1130707] Fri, 11 October 2013 11:37 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Víctor,

you can simply create an AreaContext object for that. In order to set the
coordinates you might query the diagram editor for its mouse location.

Michael
Re: Create from Custom Feature [message #1135997 is a reply to message #1130707] Sun, 13 October 2013 15:23 Go to previous messageGo to next message
Victor Lopez is currently offline Victor LopezFriend
Messages: 21
Registered: August 2013
Junior Member
OOk thank you! I made it like you said. I created the new context and I set the location and its new container.

Thanks

[Updated on: Sun, 13 October 2013 18:15]

Report message to a moderator

Re: Create from Custom Feature [message #1151451 is a reply to message #1135997] Wed, 23 October 2013 11:03 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Victor,

have you checked the coding in your feature provider that might inspect the
context you pass in here?

Michael
Previous Topic: CASE-Tool and Code Generation (NON-EMF)
Next Topic:Problems view not refreshed after undo / redo
Goto Forum:
  


Current Time: Fri Apr 26 22:49:42 GMT 2024

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

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

Back to the top