Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Dealing with resource removals
Dealing with resource removals [message #418059] Fri, 04 April 2008 11:11 Go to next message
Jose Hernandez is currently offline Jose HernandezFriend
Messages: 46
Registered: July 2009
Member
Hi,



I'm trying to deal with scenarios where EMF project A has a resource with a
reference to a resource in EMF project B and the user deletes project B
whilst an editor in the workspace is open on project A.



At the moment EMF closes project A's editor when one completely deletes
project B from the workspace but I would like to change this so that the
editor remains open and I can internally flag all the proxies as missing.



Is there a straightforward way of altering the behaviour of the EMF
generated editor to keep it open when references disappear?



Thanks

Jos
Re: Dealing with resource removals [message #418061 is a reply to message #418059] Fri, 04 April 2008 11:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Jose,

I guess you'd need to specialize the two places in the generated editor
where the editor is being closed; look for closeEditor. Perhaps we
should only be closing the editor when the primary resource (first
resource in the resource set is deleted)...


Jose Hernandez wrote:
> Hi,
>
>
>
> I'm trying to deal with scenarios where EMF project A has a resource with a
> reference to a resource in EMF project B and the user deletes project B
> whilst an editor in the workspace is open on project A.
>
>
>
> At the moment EMF closes project A's editor when one completely deletes
> project B from the workspace but I would like to change this so that the
> editor remains open and I can internally flag all the proxies as missing.
>
>
>
> Is there a straightforward way of altering the behaviour of the EMF
> generated editor to keep it open when references disappear?
>
>
>
> Thanks
>
> José
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Dealing with resource removals [message #418183 is a reply to message #418061] Fri, 04 April 2008 12:46 Go to previous messageGo to next message
Jose Hernandez is currently offline Jose HernandezFriend
Messages: 46
Registered: July 2009
Member
Hi Ed,

Does EMF guarantee the first resource in the resource set to be the primary
resource?



Thanks

Jose

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:ft53gh$3md$1@build.eclipse.org...
> Jose,
>
> I guess you'd need to specialize the two places in the generated editor
> where the editor is being closed; look for closeEditor. Perhaps we should
> only be closing the editor when the primary resource (first resource in
> the resource set is deleted)...
>
>
> Jose Hernandez wrote:
>> Hi,
>>
>>
>>
>> I'm trying to deal with scenarios where EMF project A has a resource with
>> a reference to a resource in EMF project B and the user deletes project B
>> whilst an editor in the workspace is open on project A.
>>
>>
>>
>> At the moment EMF closes project A's editor when one completely deletes
>> project B from the workspace but I would like to change this so that the
>> editor remains open and I can internally flag all the proxies as missing.
>>
>>
>>
>> Is there a straightforward way of altering the behaviour of the EMF
>> generated editor to keep it open when references disappear?
>>
>>
>>
>> Thanks
>>
>> Jos
Re: Dealing with resource removals [message #418187 is a reply to message #418183] Fri, 04 April 2008 14:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000604050908070401070500
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Jose,

The way the editor is written, the editor's input is used to create/load
the initial resource in the resource set and all other resources are
demand loaded as a result of proxy resolution and hence will definitely
appear later in the list of resources.


Jose Hernandez wrote:
> Hi Ed,
>
> Does EMF guarantee the first resource in the resource set to be the primary
> resource?
>
>
>
> Thanks
>
> Jose
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:ft53gh$3md$1@build.eclipse.org...
>
>> Jose,
>>
>> I guess you'd need to specialize the two places in the generated editor
>> where the editor is being closed; look for closeEditor. Perhaps we should
>> only be closing the editor when the primary resource (first resource in
>> the resource set is deleted)...
>>
>>
>> Jose Hernandez wrote:
>>
>>> Hi,
>>>
>>>
>>>
>>> I'm trying to deal with scenarios where EMF project A has a resource with
>>> a reference to a resource in EMF project B and the user deletes project B
>>> whilst an editor in the workspace is open on project A.
>>>
>>>
>>>
>>> At the moment EMF closes project A's editor when one completely deletes
>>> project B from the workspace but I would like to change this so that the
>>> editor remains open and I can internally flag all the proxies as missing.
>>>
>>>
>>>
>>> Is there a straightforward way of altering the behaviour of the EMF
>>> generated editor to keep it open when references disappear?
>>>
>>>
>>>
>>> Thanks
>>>
>>> Jos


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:unsettable and required
Next Topic:DTD to Ecore
Goto Forum:
  


Current Time: Wed Apr 24 15:10:52 GMT 2024

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

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

Back to the top