Skip to main content



      Home
Home » Modeling » Graphiti » Create from Custom Feature(Create an object from Custom Feature)
Create from Custom Feature [message #1130707] Wed, 09 October 2013 17:30 Go to next message
Eclipse UserFriend
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 07:37 Go to previous messageGo to next message
Eclipse UserFriend
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 11:23 Go to previous messageGo to next message
Eclipse UserFriend
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 14:15] by Moderator

Re: Create from Custom Feature [message #1151451 is a reply to message #1135997] Wed, 23 October 2013 07:03 Go to previous message
Eclipse UserFriend
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 Jul 25 20:55:20 EDT 2025

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

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

Back to the top