Home » Modeling » EMF » DeleteCommand on top level resource contents
| |
Re: DeleteCommand on top level resource contents [message #401509 is a reply to message #401430] |
Sat, 03 June 2006 20:19 |
Baybora Aksoy Messages: 26 Registered: July 2009 |
Junior Member |
|
|
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 11:56 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
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. 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...<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"><merks@ca.ibm.com></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--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Tue Sep 24 19:02:18 GMT 2024
Powered by FUDForum. Page generated in 0.03622 seconds
|