Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » direct edit tutorial/examples?
direct edit tutorial/examples? [message #183787] Tue, 07 June 2005 22:58 Go to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

Hello,

I am trying to make sense of the direct edit support that GEF offers. It
seems that at least some of the code that comes under the "DirectEdit"
label leads into a dead end road. For example, I was not able to find
any place where DirectEditAction is used, and I wonder what role a
DirectEditPolicy will play (except maybe answer true to understandsRequest).

Can someone point me to any kind of "canonical" exmaple/tutorial on the
workings of direct editing?

thanks,
Christian
Re: direct edit tutorial/examples? [message #183794 is a reply to message #183787] Tue, 07 June 2005 23:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Christian Sell wrote:
> Hello,
>
> I am trying to make sense of the direct edit support that GEF offers. It
> seems that at least some of the code that comes under the "DirectEdit"
> label leads into a dead end road. For example, I was not able to find
> any place where DirectEditAction is used, and I wonder what role a
> DirectEditPolicy will play (except maybe answer true to
> understandsRequest).
>
> Can someone point me to any kind of "canonical" exmaple/tutorial on the
> workings of direct editing?
>
> thanks,
> Christian

Check out the logic example.

Cheers,

~ Chris
Re: direct edit tutorial/examples? [message #183876 is a reply to message #183787] Wed, 08 June 2005 09:48 Go to previous messageGo to next message
Andreas Holtz is currently offline Andreas HoltzFriend
Messages: 53
Registered: July 2009
Member
Christian Sell schrieb:
> Hello,
>
> I am trying to make sense of the direct edit support that GEF offers. It
> seems that at least some of the code that comes under the "DirectEdit"
> label leads into a dead end road. For example, I was not able to find
> any place where DirectEditAction is used, and I wonder what role a
> DirectEditPolicy will play (except maybe answer true to
> understandsRequest).
>
> Can someone point me to any kind of "canonical" exmaple/tutorial on the
> workings of direct editing?
>
> thanks,
> Christian

Check the GEF Example on http://www13.plala.or.jp/observe/index.html#draw2d

I don´t remember which HelloWorld Example starts implementing DirectEdit.

Andreas
Re: direct edit tutorial/examples? [message #183973 is a reply to message #183876] Wed, 08 June 2005 17:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

you are joking, right? The page is all in japanese, with about a dozen
"Hello World"s interspersed...

thanks anyway
christian

Andreas Holtz wrote:
> Christian Sell schrieb:
>
>> Hello,
>>
>> I am trying to make sense of the direct edit support that GEF offers.
>> It seems that at least some of the code that comes under the
>> "DirectEdit" label leads into a dead end road. For example, I was not
>> able to find any place where DirectEditAction is used, and I wonder
>> what role a DirectEditPolicy will play (except maybe answer true to
>> understandsRequest).
>>
>> Can someone point me to any kind of "canonical" exmaple/tutorial on
>> the workings of direct editing?
>>
>> thanks,
>> Christian
>
>
> Check the GEF Example on http://www13.plala.or.jp/observe/index.html#draw2d
>
> I don´t remember which HelloWorld Example starts implementing DirectEdit.
>
> Andreas
Re: direct edit tutorial/examples? [message #183977 is a reply to message #183787] Wed, 08 June 2005 18:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

DirectEditAction is if you want to trigger direct-editing from a menu or
something. The logic example doesn't do that. As for DirectEditPolicy, you
can look at its subclasses and their use in the examples to see what role it
plays. Your EditPart's performRequest() method will be called with
REQ_DIRECT_EDIT when direct-edit is triggered. See what the logic label
editpart is doing in this method to see how it triggers the direct edit.
All this has been mentioned on this newsgroup before, so just search for it
on here if you want more details.

"Christian Sell" <christian.sell@netcologne.de> wrote in message
news:d858rb$8sq$1@news.eclipse.org...
> Hello,
>
> I am trying to make sense of the direct edit support that GEF offers. It
> seems that at least some of the code that comes under the "DirectEdit"
> label leads into a dead end road. For example, I was not able to find
> any place where DirectEditAction is used, and I wonder what role a
> DirectEditPolicy will play (except maybe answer true to
understandsRequest).
>
> Can someone point me to any kind of "canonical" exmaple/tutorial on the
> workings of direct editing?
>
> thanks,
> Christian
Re: direct edit tutorial/examples? [message #183995 is a reply to message #183977] Wed, 08 June 2005 22:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

thanks for the help. I have achieved my goals by using the logic example
as an initial template. In the end, my edit policy does nothing else but
provide a command (method getDirectEditCommand), which does the model
manipulation. The separation of responsibilities between these sometimes
seems a little artificial (to me)..

The main implementation focus in my case was in the DirectEditManager
and CellEditorLocator subclasses.

thanks again,
christian

Pratik Shah wrote:
> DirectEditAction is if you want to trigger direct-editing from a menu or
> something. The logic example doesn't do that. As for DirectEditPolicy, you
> can look at its subclasses and their use in the examples to see what role it
> plays. Your EditPart's performRequest() method will be called with
> REQ_DIRECT_EDIT when direct-edit is triggered. See what the logic label
> editpart is doing in this method to see how it triggers the direct edit.
> All this has been mentioned on this newsgroup before, so just search for it
> on here if you want more details.
>
> "Christian Sell" <christian.sell@netcologne.de> wrote in message
> news:d858rb$8sq$1@news.eclipse.org...
>
>>Hello,
>>
>>I am trying to make sense of the direct edit support that GEF offers. It
>>seems that at least some of the code that comes under the "DirectEdit"
>>label leads into a dead end road. For example, I was not able to find
>>any place where DirectEditAction is used, and I wonder what role a
>>DirectEditPolicy will play (except maybe answer true to
>
> understandsRequest).
>
>>Can someone point me to any kind of "canonical" exmaple/tutorial on the
>>workings of direct editing?
>>
>>thanks,
>>Christian
>
>
>
Re: direct edit tutorial/examples? [message #184331 is a reply to message #183973] Sun, 12 June 2005 13:18 Go to previous message
Andreas Holtz is currently offline Andreas HoltzFriend
Messages: 53
Registered: July 2009
Member
Christian Sell schrieb am 08.06.2005 19:49:
> you are joking, right? The page is all in japanese, with about a dozen
> "Hello World"s interspersed...
>
> thanks anyway
> christian
>

No, i´m not joking!
Grab the sources for example number 5
(http://www13.plala.or.jp/observe/GEF/GEF5.zip).

And on the page (http://www13.plala.or.jp/observe/GEF/GEF_Hello5.html)
you´ll see which parts of the code are important for DirectEdit.

Btw: If you recode all 11 examples by yourself, you understand GEF a lot
better.
That´s the way i learned it!

Andreas
Previous Topic:How to implement a hyperlink?
Next Topic:An interesting blog for you to read dad
Goto Forum:
  


Current Time: Tue Dec 10 15:34:50 GMT 2024

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

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

Back to the top