Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Double-Clicking on Editparts -> New View
Double-Clicking on Editparts -> New View [message #125214] Thu, 01 April 2004 03:22 Go to next message
Eclipse UserFriend
Originally posted by: smallpocks.yahoo.com

Hey guys,
I have a GEF application which is an eclpise plugin. My figures consists of
many squares connected by lines. However, I would like to be able to open up
a new window (I think a new view, and not a new editor because it is the
same file) when one of my rectagles is double-clicked. I know that if this
were a draw2D only app, I could add some kind of mouse-listener to my
figures. But I really want it to work in the true GEF/Eclipse sense, not
just as some hack on top of Draw2D. I though about maybe installing a
DIRECT_EDIT_ROLE in my rectangle edit parts, but it seems like all I can do
with that is bring up a cell editor when the recangle is double-clicked. Has
anyone done anything like this, or does anyone know how I could? Any help
would be greatly appreciated.
Thanks a lot.
Guy
Re: Double-Clicking on Editparts -> New View [message #125276 is a reply to message #125214] Thu, 01 April 2004 09:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brian.fernandes.codito.com

Hi Guy,

Override the performRequest method in your Rectangles EditPart & check
whether the Request type is equal to RequestConstants.REQ_OPEN. If it is, go
ahead and do what you want to do -

All the best,
Brian.

"Guy Beckman" <smallpocks@yahoo.com> wrote in message
news:c4g1bf$udq$1@eclipse.org...
> Hey guys,
> I have a GEF application which is an eclpise plugin. My figures consists
of
> many squares connected by lines. However, I would like to be able to open
up
> a new window (I think a new view, and not a new editor because it is the
> same file) when one of my rectagles is double-clicked. I know that if this
> were a draw2D only app, I could add some kind of mouse-listener to my
> figures. But I really want it to work in the true GEF/Eclipse sense, not
> just as some hack on top of Draw2D. I though about maybe installing a
> DIRECT_EDIT_ROLE in my rectangle edit parts, but it seems like all I can
do
> with that is bring up a cell editor when the recangle is double-clicked.
Has
> anyone done anything like this, or does anyone know how I could? Any help
> would be greatly appreciated.
> Thanks a lot.
> Guy
>
>
Re: Double-Clicking on Editparts -> New View [message #131879 is a reply to message #125276] Wed, 12 May 2004 10:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Hi Brian,

thanks for the info. On a side question: How would I implement a context
menu triggered by the right-click on the Figure? A right-click does not
seem to trigger a GEF request. I am able to add a MouseListener to the
figure, but this is the draw2d way, not GEF, right?

Thanks
André

Brian Fernandes wrote:
> Hi Guy,
>
> Override the performRequest method in your Rectangles EditPart & check
> whether the Request type is equal to RequestConstants.REQ_OPEN. If it is, go
> ahead and do what you want to do -
>
> All the best,
> Brian.
Re: Double-Clicking on Editparts -> New View [message #131900 is a reply to message #131879] Wed, 12 May 2004 13:50 Go to previous message
Eclipse UserFriend
Originally posted by: brian.fernandes.codito.com

Right click context menus are pretty simple - you don't need the
MouseListener.

use GraphicalViewerImpl#setContextMenu to set a context menu for your
editor.

The Logic plugin has a contextMenu have a look.
You can start looking in LogicEditor#configureGraphicalViewer

Write back if you have further problems,
All the best,
Brian
Previous Topic:pixel , measurment units -again
Next Topic:WYSIWYG HTML Editor?
Goto Forum:
  


Current Time: Thu Apr 25 07:40:22 GMT 2024

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

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

Back to the top