Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » remembering Selections between runs.
remembering Selections between runs. [message #539640] Fri, 11 June 2010 15:13 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi,
My model is displayed in a TreeView contained in a MasterBlock.
I would like to record the current Selection to be able to restore it
next time the App is run.

I see the normal serialization uses the pattern:
"#//@node.No/@node.No/@leaf".
The meaning is obvious.
I could use the same notation to save the current Selction to an
IMemento instance.
Is there an (user accessible) API to convert such a notation to EObject
and viceversa? I didn't find it, but there must be something somewhere ;)

TiA
Mauro
Re: remembering Selections between runs. [message #539644 is a reply to message #539640] Fri, 11 June 2010 15:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Mauro,

EcoreUtil.getURI and ResourceSet.getEObject do that work.


Mauro Condarelli wrote:
> Hi,
> My model is displayed in a TreeView contained in a MasterBlock.
> I would like to record the current Selection to be able to restore it
> next time the App is run.
>
> I see the normal serialization uses the pattern:
> "#//@node.No/@node.No/@leaf".
> The meaning is obvious.
> I could use the same notation to save the current Selction to an
> IMemento instance.
> Is there an (user accessible) API to convert such a notation to
> EObject and viceversa? I didn't find it, but there must be something
> somewhere ;)
>
> TiA
> Mauro


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: remembering Selections between runs. [message #539649 is a reply to message #539644] Fri, 11 June 2010 16:00 Go to previous message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Ed,
THANKS.
Works like a champ.

Regards
Mauro

On 11/06/2010 17.21, Ed Merks wrote:
> Mauro,
>
> EcoreUtil.getURI and ResourceSet.getEObject do that work.
>
>
> Mauro Condarelli wrote:
>> Hi,
>> My model is displayed in a TreeView contained in a MasterBlock.
>> I would like to record the current Selection to be able to restore it
>> next time the App is run.
>>
>> I see the normal serialization uses the pattern:
>> "#//@node.No/@node.No/@leaf".
>> The meaning is obvious.
>> I could use the same notation to save the current Selction to an
>> IMemento instance.
>> Is there an (user accessible) API to convert such a notation to
>> EObject and viceversa? I didn't find it, but there must be something
>> somewhere ;)
>>
>> TiA
>> Mauro
Previous Topic:invoke EOperation view
Next Topic:Loading resources associated with specific packages into generated EMF editor.
Goto Forum:
  


Current Time: Thu Apr 25 12:29:53 GMT 2024

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

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

Back to the top