How to set Name (or other properties) automatically for a node with empty Name [message #185004] |
Fri, 02 May 2008 05:40 |
Eclipse User |
|
|
|
Originally posted by: mehrdad.saadatmand.gmail.com
Hi,
While a user just puts a new node on the diagram, how is it possible to
detect whether they have set a field; for example Name; and if it is emtpy
and not set, assign something (like random) to it? In which editpart and
methods should we watch for it to check if it is empty or not?
Thanks,
Mehrdad
|
|
|
Re: How to set Name (or other properties) automatically for a node with empty Name [message #185036 is a reply to message #185004] |
Fri, 02 May 2008 11:06 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
You may modify your model so the Name property has a default value or
add feature sequence initializer to the node in gmfmap file.
Mehrdad Saadatmand wrote:
> Hi,
> While a user just puts a new node on the diagram, how is it possible to
> detect whether they have set a field; for example Name; and if it is emtpy
> and not set, assign something (like random) to it? In which editpart and
> methods should we watch for it to check if it is empty or not?
>
> Thanks,
> Mehrdad
>
>
|
|
|
Re: How to set Name (or other properties) automatically for a node with empty Name [message #185131 is a reply to message #185036] |
Sat, 03 May 2008 19:24 |
Eclipse User |
|
|
|
Originally posted by: mehrdad.saadatmand.gmail.com
Well, I tested using feature sequence initializer, however there are two
problems, first is that the node is not shown on the diagram now that I've
added the feature seg init. it's xml code however is added.
Also the main problem is using that all nodes of that type get same name, I
want to initialize names as node1,node2,.... and so on. In what file and
class should I look to add code for this?
"Dmitry Stadnik" <5d5@mail.ru> wrote in message
news:fvesjr$skm$1@build.eclipse.org...
> You may modify your model so the Name property has a default value or add
> feature sequence initializer to the node in gmfmap file.
>
> Mehrdad Saadatmand wrote:
>> Hi,
>> While a user just puts a new node on the diagram, how is it possible to
>> detect whether they have set a field; for example Name; and if it is
>> emtpy and not set, assign something (like random) to it? In which
>> editpart and methods should we watch for it to check if it is empty or
>> not?
>>
>> Thanks,
>> Mehrdad
>>
|
|
|
Re: How to set Name (or other properties) automatically for a node with empty Name [message #185295 is a reply to message #185131] |
Mon, 05 May 2008 09:15 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
If your node is named Tingamajig for example then have a look at
generated TingamajigCreateCommand.
Mehrdad Saadatmand wrote:
> Well, I tested using feature sequence initializer, however there are two
> problems, first is that the node is not shown on the diagram now that I've
> added the feature seg init. it's xml code however is added.
> Also the main problem is using that all nodes of that type get same name, I
> want to initialize names as node1,node2,.... and so on. In what file and
> class should I look to add code for this?
>
>
>
> "Dmitry Stadnik" <5d5@mail.ru> wrote in message
> news:fvesjr$skm$1@build.eclipse.org...
>> You may modify your model so the Name property has a default value or add
>> feature sequence initializer to the node in gmfmap file.
>>
>> Mehrdad Saadatmand wrote:
>>> Hi,
>>> While a user just puts a new node on the diagram, how is it possible to
>>> detect whether they have set a field; for example Name; and if it is
>>> emtpy and not set, assign something (like random) to it? In which
>>> editpart and methods should we watch for it to check if it is empty or
>>> not?
>>>
>>> Thanks,
>>> Mehrdad
>>>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02538 seconds