Can I create slightly different diagramnodes from a single model-node? [message #55840] |
Tue, 26 September 2006 10:12  |
Eclipse User |
|
|
|
Hi out there,
I've got a generated GMF-Editor with a palette. In the palette there are
some entries that should create the same modelnode (actionNode from the
model), but with different icon in their figure and a different label.
The created nodes should only differ in their figure (the icon and label
in the diagram) and in a property-entry in the model. By now those
entries create the modelnode with default icon and label.
The Icon and the label are already present in the palette and in the
tool generated for the palette-entry.
1. Is there a way to pass the icon and label through the
node-creation-process so that I can draw the diagram with the correct
icon and label?
2. Is there a way to pass the information (which special actionnode was
created) for the property-entry through the process so that I can
populate the property of the created node in the model with the information?
I'd appreciate every help!
Thanks Alex Haag
|
|
|
|
SOLVED Re: Can I create slightly different diagramnodes from a single model-node? UPDATE [message #57400 is a reply to message #55921] |
Fri, 29 September 2006 03:12  |
Eclipse User |
|
|
|
Servus from Munich Oktoberfest,
to whom it may concern, the problem described below is solved now.
After all it was quite easy to manage. I used the request that is used
to create the createNode-Command after clicking the button in the
palette to pass the needed information. I just used the
Properties-HashMap of the request to transport the information and used
this information in the factory that creates the model-instances.
If someone needs more information about this, please let me know. I
could provide some sample code then
Greets Alex
Alex Haag wrote:
> Hi again,
>
> I just tried to pass the information by the requests that are used
> during command-execution. but as I debugged it, the initial request
> never makes it through the whole process. It always is replaced by other
> requests.
> Is there a way to pass information from request to request? Or would
> that mean to generate subclasses of all requests used during execution?
>
> I'm totally stuck here.
>
> Greets Alex Haag
>
> Alex Haag wrote:
>> Hi out there,
>>
>> I've got a generated GMF-Editor with a palette. In the palette there
>> are some entries that should create the same modelnode (actionNode
>> from the model), but with different icon in their figure and a
>> different label.
>> The created nodes should only differ in their figure (the icon and
>> label in the diagram) and in a property-entry in the model. By now
>> those entries create the modelnode with default icon and label.
>>
>> The Icon and the label are already present in the palette and in the
>> tool generated for the palette-entry.
>>
>> 1. Is there a way to pass the icon and label through the
>> node-creation-process so that I can draw the diagram with the correct
>> icon and label?
>>
>> 2. Is there a way to pass the information (which special actionnode
>> was created) for the property-entry through the process so that I can
>> populate the property of the created node in the model with the
>> information?
>>
>> I'd appreciate every help!
>>
>> Thanks Alex Haag
|
|
|
Powered by
FUDForum. Page generated in 0.03254 seconds