Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Changing a DiagramRoot Property
Changing a DiagramRoot Property [message #218322] Wed, 11 February 2009 21:31 Go to next message
Raphael is currently offline RaphaelFriend
Messages: 47
Registered: July 2009
Member
Hello everybody!

I would like to edit a property from my diagram root(the one that I select
in my XXX.gmfmap/Canvas/Domain Meta information/Element).

This element has a String property called "name". I would like to know if
there is a way to change the value of this property after the user creates
a new diagram. Example: after the wizard defining the names of the files
for a diagram, the name property of the element root should receive the
same value of the diagram name selected by the user.

Any help is appreciated,
Thanks,
Raphael
Re: Changing a DiagramRoot Property [message #218447 is a reply to message #218322] Thu, 12 February 2009 11:55 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Raphael,

It should be possible from the properties sheet (if you click on the diagram).
Definitely it is possible to change domain model element properties using
custom code.

-----------------
Alex Shatalin
Re: Changing a DiagramRoot Property [message #218492 is a reply to message #218447] Thu, 12 February 2009 13:47 Go to previous messageGo to next message
Raphael is currently offline RaphaelFriend
Messages: 47
Registered: July 2009
Member
Hello Alex,

Thanks for the reply!

When I select the diagramroot, using the "project explorer view" the
properties sheet aren't editable. =(

Do you know which class should I have to modify to change a string
property from diagramroot?

Thanks a lot,
Raphael
Re: Changing a DiagramRoot Property [message #218500 is a reply to message #218492] Thu, 12 February 2009 14:24 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Raphael,

I meant selecting diagram itself in a diagram editor. Just click to the diagram
surface - in this case properties view should be editable.

-----------------
Alex Shatalin
Re: Changing a DiagramRoot Property [message #218734 is a reply to message #218500] Fri, 13 February 2009 13:32 Go to previous messageGo to next message
Danilo is currently offline DaniloFriend
Messages: 6
Registered: July 2009
Junior Member
Alex Shatalin wrote:

> Hello Raphael,

> I meant selecting diagram itself in a diagram editor. Just click to the
diagram
> surface - in this case properties view should be editable.

> -----------------
> Alex ShatalinHello Alex,

i have the same question..
this question is... i have root element, example: class DOMAIN with
atributte name - type string.

In Mapping i set "DOMAIN" in "Element" of "Domain Meta information".

Its ok.. i build my diagram and initialize this..
but the name of DOMAIN in navigator of Package Explorer initialize with
value "null".
I want initialize this name, but i cant put feature seq initializer before
top nodding....

Any ideia?

Thanks,
Danilo
Re: Changing a DiagramRoot Property [message #218768 is a reply to message #218734] Fri, 13 February 2009 14:40 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Danilo,

> Any ideia?
Looks like you can modify generated code + add a request asking to allow
diagram element's initialization description in .gmfmap model.

-----------------
Alex Shatalin
Re: Changing a DiagramRoot Property [message #218847 is a reply to message #218768] Fri, 13 February 2009 18:15 Go to previous messageGo to next message
Danilo is currently offline DaniloFriend
Messages: 6
Registered: July 2009
Junior Member
Alex Shatalin wrote:

> Hello Danilo,

>> Any ideia?
> Looks like you can modify generated code + add a request asking to allow
> diagram element's initialization description in .gmfmap model.

> -----------------
> Alex Shatalin

But.. Where i need modify the code?
Re: Changing a DiagramRoot Property [message #218923 is a reply to message #218847] Mon, 16 February 2009 11:13 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Danilo,

If you have to modify properties of newly created domain diagram element
then you can patch generated ???DiagramEditorUtil.createInitialModel() method.

-----------------
Alex Shatalin
Re: Changing a DiagramRoot Property [message #219014 is a reply to message #218923] Mon, 16 February 2009 18:39 Go to previous message
Danilo is currently offline DaniloFriend
Messages: 6
Registered: July 2009
Junior Member
its works
thanks!
Previous Topic:Making a label non-editable
Next Topic:default font
Goto Forum:
  


Current Time: Fri Apr 19 22:04:06 GMT 2024

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

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

Back to the top