Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Double Click on a Node open another diagram
Double Click on a Node open another diagram [message #121094] Mon, 23 April 2007 02:32 Go to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Hi,
I'd like to implement double clicking on a node open another diagram, if
not present in same directory then create a "new" diagram with that name.
So a few points I guess:-
How do you pick up on a double click on a node.
How do you open another diagram from within a current diagram.
How to you automatically create a new diagram as I have the project (same as
current diagram) and file name.

Thanks for any pointers,

Stuart
Re: Double Click on a Node open another diagram [message #121104 is a reply to message #121094] Mon, 23 April 2007 04:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bhatia1984.yahoo.com

Hi,
I'd like to implement double clicking on a node open another diagram, if
not present in same directory then create a "new" diagram with that name.
So a few points I guess:-
How do you pick up on a double click on a node.
How do you open another diagram from within a current diagram.
How to you automatically create a new diagram as I have the project (same
as
current diagram) and file name.


hiiii

few pointers :

go to *.gmfmap. rite click -> load resource. load the *.gmfmap of another
edeitor i.e which u want to open on double click.

now *.gmfmap top go top node ->node mapping properties. in properties
misc->related diagram.

select the canvas mapping of another editor.be careful while selcting as
the
canvas will have same name.

now generate *.gmfgen.

go to that toplevel node on which u want to perform double click . there
under top level node a open diagarm behaviour policy will be there.in its
properties put the GenEditorGenerator.model id & GenEdiotrView.id there.

now generate the diagarm code.

regards
varun
Re: Double Click on a Node open another diagram [message #122110 is a reply to message #121104] Fri, 27 April 2007 09:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Thanks for this. Had a week off but now back :-)

Just a bit of a hand with the last bit.

I see that the properties of:-
Diagram Kind:
Editor Id:
Edit Policy Name Class: <seems to be pre populated>
Open as eclipse editor: <pre populated to true>

You say set:-
GenEditorGenerator.model id & GenEdiotrView.id
I'm not quite sure where to find these Ids or what field they should go
into.
I assume GenEditorGenerator.model.id should go in Editor id (But I can't
find this class or a generated class similar)
Same with the GenEdiotrView.id << where do I find this class and where
should it go in the properties view.

Thanks,

Stuart



"varun" <bhatia1984@yahoo.com> wrote in message
news:0a4251db18c97d48aff930da81104e53$1@www.eclipse.org...
> Hi,
> I'd like to implement double clicking on a node open another diagram, if
> not present in same directory then create a "new" diagram with that name.
> So a few points I guess:-
> How do you pick up on a double click on a node.
> How do you open another diagram from within a current diagram.
> How to you automatically create a new diagram as I have the project (same
> as current diagram) and file name.
>
>
> hiiii
>
> few pointers :
>
> go to *.gmfmap. rite click -> load resource. load the *.gmfmap of another
> edeitor i.e which u want to open on double click.
>
> now *.gmfmap top go top node ->node mapping properties. in properties
> misc->related diagram.
>
> select the canvas mapping of another editor.be careful while selcting as
> the
> canvas will have same name.
>
> now generate *.gmfgen.
>
> go to that toplevel node on which u want to perform double click . there
> under top level node a open diagarm behaviour policy will be there.in its
> properties put the GenEditorGenerator.model id & GenEdiotrView.id there.
>
> now generate the diagarm code.
>
> regards
> varun
>
Re: Double Click on a Node open another diagram [message #122160 is a reply to message #122110] Fri, 27 April 2007 10:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bhatia1984.yahoo.com

hiii

You say set:-
GenEditorGenerator.model id & GenEdiotrView.id
I'm not quite sure where to find these Ids or what field they should go
into.
I assume GenEditorGenerator.model.id should go in Editor id (But I can't
find this class or a generated class similar)
Same with the GenEdiotrView.id << where do I find this class and where
should it go in the properties view.


these are not classes.

in *.gmfgen u must be having GenEditorGenerator node.GenEditorGenerator
Node will have property Model Id. u have to set this id in Diagaramkind
property.

there is also GenEditorView in *.gmfgen & it has property Id.that id has
to be set in GenEditorView.id feild. this id shud be put in editor id.

These property value shud be of 2nd editor which u want to open on double
click.

regards
varun bhatia
Re: Double Click on a Node open another diagram [message #122185 is a reply to message #122160] Fri, 27 April 2007 10:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Thanks for that.
I was a bit confused - never really edited the .gmfgen much.

The diagram I want to open is of the same type.
I set the ids mentioned below.

I run the plugin, load the resource of the sub-diagram and attached it the
the node object.
I double click on the node object and it flashes up a no access cursor
(cirlce with a line through it) and doesn't open the diagram.

Any clues ?
can you do diagrams with the same type ?

"varun" <bhatia1984@yahoo.com> wrote in message
news:0a7c06569ed98d2e0101133727eee6ca$1@www.eclipse.org...
> hiii
>
> You say set:-
> GenEditorGenerator.model id & GenEdiotrView.id
> I'm not quite sure where to find these Ids or what field they should go
> into.
> I assume GenEditorGenerator.model.id should go in Editor id (But I can't
> find this class or a generated class similar)
> Same with the GenEdiotrView.id << where do I find this class and where
> should it go in the properties view.
>
>
> these are not classes.
>
> in *.gmfgen u must be having GenEditorGenerator node.GenEditorGenerator
> Node will have property Model Id. u have to set this id in Diagaramkind
> property.
> there is also GenEditorView in *.gmfgen & it has property Id.that id has
> to be set in GenEditorView.id feild. this id shud be put in editor id.
>
> These property value shud be of 2nd editor which u want to open on double
> click.
>
> regards
> varun bhatia
>
Re: Double Click on a Node open another diagram [message #122198 is a reply to message #121104] Fri, 27 April 2007 11:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bhatia1984.yahoo.com

hiiiii

hv u set the property related diagram of that node on which u want to
perform double click in the *.gmfgraph file.

if u want to open the same editor on double click then u hv option that u
can leave the open diagram policy feilds empty.

also are u performing any single click action on ur node??


Thanks
Varun Bhatia
Re: Double Click on a Node open another diagram [message #122211 is a reply to message #122198] Fri, 27 April 2007 11:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Thanks for your time.

I want to open up a new diagram of the same type.
The single click action just puts the properties into focus - standard
behaviour.
I have not customised anything around this.


"varun" <bhatia1984@yahoo.com> wrote in message
news:76f9d91b60b08ec29892ba7183299e7e$1@www.eclipse.org...
> hiiiii
>
> hv u set the property related diagram of that node on which u want to
> perform double click in the *.gmfgraph file.
> if u want to open the same editor on double click then u hv option that u
> can leave the open diagram policy feilds empty.
>
> also are u performing any single click action on ur node??
>
>
> Thanks
> Varun Bhatia
>
Re: Double Click on a Node open another diagram [message #122223 is a reply to message #122211] Fri, 27 April 2007 12:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bhatia1984.yahoo.com

hiiiii

hv u set related diagarm property of that node in *.gmfgraph file.

if u done that then chk ur meta- model.sthng must be wrong dere or try
debugging open diagram policy class.

hw u hv define ur meta-model for that node.That node shub also be type of
diagarm also.

u cn refer to taipan example .

Thanks
varun bhatia
Re: Double Click on a Node open another diagram [message #122424 is a reply to message #122223] Sat, 28 April 2007 00:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

Ok finally got it working thanks.

I had the top level object as a reference to my node and not that my node
was of type Top level.

Is there a way of attaching a current separately created diagram to this
node now as before I had a reference object so you could load resource and
select it.
Now its of type Top Level Node you can't do this.

I have a number of existing diagrams that I wish to load in and associate
with the nodes.

Hope this makes sense,

Stuart

"varun" <bhatia1984@yahoo.com> wrote in message
news:ea8dd867dfe88aa54e9903b1f01a9148$1@www.eclipse.org...
> hiiiii
>
> hv u set related diagarm property of that node in *.gmfgraph file.
>
> if u done that then chk ur meta- model.sthng must be wrong dere or try
> debugging open diagram policy class.
>
> hw u hv define ur meta-model for that node.That node shub also be type of
> diagarm also.
>
> u cn refer to taipan example .
>
> Thanks
> varun bhatia
>
>
>
Re: Double Click on a Node open another diagram [message #123443 is a reply to message #122424] Wed, 02 May 2007 13:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bhatia1984.yahoo.com

hi stu

I have one ques regarding double click

My ques is ...
after generating diagram code i invoke an instance of eclipse application.
then i open my gmf editor.on double click of a daiagram element i open
another eitor.

Now i close the eclipse apllication.

Now i once againg invoke eclipse application.
Now what i found is that on both the editor diagarm element of former
editor (i.e editor from which i invoke double click) will be there & now
when i double click on the diagarm element of the editor a new editor gets
opened having diagarm element of later editor.

are u also facing the same problem.

i am trying to reslove this prob but i am nt able to resolve it.

if nt cn u tell me ur openeditpolicy & *matchingstrategy code.

thanks
Varun
Re: Double Click on a Node open another diagram [message #123484 is a reply to message #123443] Wed, 02 May 2007 14:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: evaandoli.dodo.com.au

I gave up using the GMF provided open diagram option.
I didn't want my users to worry about loading resources on a top level
diagram.

Sorry Im not much help here.

I tend to not close eclipse with diagrams open as it tends to cause trouble.


"varun" <bhatia1984@yahoo.com> wrote in message
news:29901d5120ff2f9ffb73490fad66719d$1@www.eclipse.org...
> hi stu
> I have one ques regarding double click
>
> My ques is ...
> after generating diagram code i invoke an instance of eclipse
> application.
> then i open my gmf editor.on double click of a daiagram element i open
> another eitor.
>
> Now i close the eclipse apllication.
>
> Now i once againg invoke eclipse application.
> Now what i found is that on both the editor diagarm element of former
> editor (i.e editor from which i invoke double click) will be there & now
> when i double click on the diagarm element of the editor a new editor gets
> opened having diagarm element of later editor.
>
> are u also facing the same problem.
>
> i am trying to reslove this prob but i am nt able to resolve it.
>
> if nt cn u tell me ur openeditpolicy & *matchingstrategy code.
>
> thanks
> Varun
>
Re: Double Click on a Node open another diagram [message #163074 is a reply to message #121104] Wed, 28 November 2007 15:17 Go to previous message
Eclipse UserFriend
Originally posted by: frogneux.lippmann.lu

varun a écrit :
> Hi,
> I'd like to implement double clicking on a node open another diagram,
> if not present in same directory then create a "new" diagram with that
> name.
> So a few points I guess:-
> How do you pick up on a double click on a node.
> How do you open another diagram from within a current diagram.
> How to you automatically create a new diagram as I have the project
> (same as current diagram) and file name.
>
>
> hiiii
>
> few pointers :
>
> go to *.gmfmap. rite click -> load resource. load the *.gmfmap of
> another edeitor i.e which u want to open on double click.
>
> now *.gmfmap top go top node ->node mapping properties. in properties
> misc->related diagram.
>
> select the canvas mapping of another editor.be careful while selcting as
> the
> canvas will have same name.
>
> now generate *.gmfgen.
>
> go to that toplevel node on which u want to perform double click .
> there under top level node a open diagarm behaviour policy will be
> there.in its properties put the GenEditorGenerator.model id &
> GenEdiotrView.id there.
>
> now generate the diagarm code.
>
> regards
> varun
>

Hi All,

Is it possible to see in the top node what we have added in the sub node.
For example, if I have two elements in sub node, I don't see anything in
the super node. Does it exist anything to resolve that?

thanks a lot
Etienne
Previous Topic:Problem when creating Mapping Model
Next Topic:What are the major alignment, minor alignment, major spacing, minor spacing, match minor size in the
Goto Forum:
  


Current Time: Fri Apr 26 00:29:29 GMT 2024

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

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

Back to the top