Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Read-only resource in resourceset
Read-only resource in resourceset [message #891707] Mon, 25 June 2012 14:45 Go to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 85
Registered: July 2009
Member
I have an Editor of an EMF resource, and in some cases I would like to inform the Resourceset that a particular resource is read-only. I have seen there is a map in the resourceSet for read-only resources, but what is the recommended way to set that information into the resourceSet?


Thanks,

David
Re: Read-only resource in resourceset [message #891724 is a reply to message #891707] Mon, 25 June 2012 15:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30350
Registered: July 2009
Senior Member
Have a look at how EcoreEditor uses that.

On 25/06/2012 4:45 PM, David Michonneau wrote:
> I have an Editor of an EMF resource, and in some cases I would like to
> inform the Resourceset that a particular resource is read-only. I have
> seen there is a map in the resourceSet for read-only resources, but
> what is the recommended way to set that information into the resourceSet?
>
>
> Thanks,
>
> David
Re: Read-only resource in resourceset [message #891822 is a reply to message #891724] Tue, 26 June 2012 07:17 Go to previous messageGo to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 85
Registered: July 2009
Member
EcoreEditor doesn't seem to do anything else than checking the map and clearing it. But how is it populated?
Re: Read-only resource in resourceset [message #891866 is a reply to message #891822] Tue, 26 June 2012 11:30 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30350
Registered: July 2009
Senior Member
David,

It really depends on how you need to populate it. I.e., what's the
basis for deciding if the resource is read only (other than it's
underlying resource in the workspace really being read only). In
EcoreEditor you'll see there is an override of isReadOnly in the
specialized AdapterFactoryEditingDomain so that we don't allow editing
of xcore models.


On 26/06/2012 9:17 AM, David Michonneau wrote:
> EcoreEditor doesn't seem to do anything else than checking the map and
> clearing it. But how is it populated?
Previous Topic:EMF: Creating Children You Didn't Know Existed
Next Topic:[XCore] Overriding implementation of a super class feature in a subclass
Goto Forum:
  


Current Time: Sat Aug 17 17:45:57 GMT 2019

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

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

Back to the top