Skip to main content



      Home
Home » Modeling » EMF » DeleteCommand on top level resource contents
DeleteCommand on top level resource contents [message #401427] Mon, 29 May 2006 18:11 Go to next message
Eclipse UserFriend
Hi,
I am trying to make DeleteCommand ( RemoveCommand ) executable on resource
contents. My editor shows a list of top level eobjects in the resource. When
I right-click on an object, I see "delete" command grayed-out. I think, if
the parent is not an EObject, it becomes an Unexecutable command. Is there a
way to enable this command on top level eobjects.

thanks,
Bora
Re: DeleteCommand on top level resource contents [message #401430 is a reply to message #401427] Mon, 29 May 2006 21:04 Go to previous messageGo to next message
Eclipse UserFriend
Bora,

You could specialize the ResourceItemProvider to do this.


Baybora Aksoy wrote:
> Hi,
> I am trying to make DeleteCommand ( RemoveCommand ) executable on resource
> contents. My editor shows a list of top level eobjects in the resource. When
> I right-click on an object, I see "delete" command grayed-out. I think, if
> the parent is not an EObject, it becomes an Unexecutable command. Is there a
> way to enable this command on top level eobjects.
>
> thanks,
> Bora
>
>
>
Re: DeleteCommand on top level resource contents [message #401509 is a reply to message #401430] Sat, 03 June 2006 16:19 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Ed,
that was my original solution. Is there a specific reason, why emf doesn't
allow this command on resources? If not, do you plan to provide a
ResourceItemProvider that supports it?

thanks again,
Bora
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:e5g5le$l5l$2@utils.eclipse.org...
> Bora,
>
> You could specialize the ResourceItemProvider to do this.
>
>
> Baybora Aksoy wrote:
>> Hi,
>> I am trying to make DeleteCommand ( RemoveCommand ) executable on
>> resource contents. My editor shows a list of top level eobjects in the
>> resource. When I right-click on an object, I see "delete" command
>> grayed-out. I think, if the parent is not an EObject, it becomes an
>> Unexecutable command. Is there a way to enable this command on top level
>> eobjects.
>>
>> thanks,
>> Bora
>>
>>
Re: DeleteCommand on top level resource contents [message #401511 is a reply to message #401509] Sun, 04 June 2006 07:56 Go to previous message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------050505020400050102080306
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Bora,

If you allow a delete, it means you likely will end up with an empty
resource. Then there would be the expectation that you could create a
new object, but since the root can allow any EObject, it's hard to offer
useful suggestions without offering to create any type of EObject
possible. We could make it easier by having the command support
factored in to the resource item provider but not yet enabled...


Baybora Aksoy wrote:
> Thanks Ed,
> that was my original solution. Is there a specific reason, why emf doesn't
> allow this command on resources? If not, do you plan to provide a
> ResourceItemProvider that supports it?
>
> thanks again,
> Bora
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:e5g5le$l5l$2@utils.eclipse.org...
>
>> Bora,
>>
>> You could specialize the ResourceItemProvider to do this.
>>
>>
>> Baybora Aksoy wrote:
>>
>>> Hi,
>>> I am trying to make DeleteCommand ( RemoveCommand ) executable on
>>> resource contents. My editor shows a list of top level eobjects in the
>>> resource. When I right-click on an object, I see "delete" command
>>> grayed-out. I think, if the parent is not an EObject, it becomes an
>>> Unexecutable command. Is there a way to enable this command on top level
>>> eobjects.
>>>
>>> thanks,
>>> Bora
>>>
>>>
>>>
>
>
>


--------------050505020400050102080306
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Bora,<br>
<br>
If you allow a delete, it means you likely will end up with an empty
resource.&nbsp; Then there would be the expectation that you could create a
new object, but since the root can allow any EObject, it's hard to
offer useful suggestions without offering to create any type of EObject
possible.&nbsp; We could make it easier by having the command support
factored in to the resource item provider but not yet enabled...<br>
<br>
<br>
Baybora Aksoy wrote:
<blockquote cite="mide5sqf1$j9t$1@utils.eclipse.org" type="cite">
<pre wrap="">Thanks Ed,
that was my original solution. Is there a specific reason, why emf doesn't
allow this command on resources? If not, do you plan to provide a
ResourceItemProvider that supports it?

thanks again,
Bora
"Ed Merks" <a class="moz-txt-link-rfc2396E" href="mailto:merks@ca.ibm.com">&lt;merks@ca.ibm.com&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:e5g5le$l5l$2@utils.eclipse.org">news:e5g5le$l5l$2@utils.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Bora,

You could specialize the ResourceItemProvider to do this.


Baybora Aksoy wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I am trying to make DeleteCommand ( RemoveCommand ) executable on
resource contents. My editor shows a list of top level eobjects in the
resource. When I right-click on an object, I see "delete" command
grayed-out. I think, if the parent is not an EObject, it becomes an
Unexecutable command. Is there a way to enable this command on top level
eobjects.

thanks,
Bora


</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
<br>
</body>
</html>

--------------050505020400050102080306--
Previous Topic:Advice for bulk edits to a model
Next Topic:Problems creating an EMF model from an XML Schema document
Goto Forum:
  


Current Time: Fri Jul 04 12:17:59 EDT 2025

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

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

Back to the top