Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does?
Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does? [message #133739] Mon, 24 May 2004 02:33 Go to next message
Eclipse UserFriend
Originally posted by: xietao.sjtu.edu.cn

hi,all!
Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does?

Now I have developed a plugin and I want to add a view that can display
figures like GraphicalEditor does,how can I make it?

Any response is appreciated!
Re: Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does? [message #133752 is a reply to message #133739] Mon, 24 May 2004 06:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eostroukhov.hotmail.com

Yes. I haven't tried that - but I would start with looking at
LightweightSystem and GraphicalViewer hierarchy.

"Bruce" <xietao@sjtu.edu.cn> wrote in message
news:c8rmhn$f53$1@eclipse.org...
> hi,all!
> Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does?
>
> Now I have developed a plugin and I want to add a view that can display
> figures like GraphicalEditor does,how can I make it?
>
> Any response is appreciated!
>
>
>
Re: Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does? [message #133900 is a reply to message #133739] Mon, 24 May 2004 18:46 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You can create a GEF viewer on any SWT Composite. For creating an editor,
you extend EditorPart, create a GEF viewer and give it the "editor control"
(in the viewer's createControl(...) method). You would do the exact
samething for a view. Extend ViewPart (or a subclass thereof), and give the
view's control to the GEF viewer.

"Bruce" <xietao@sjtu.edu.cn> wrote in message
news:c8rmhn$f53$1@eclipse.org...
> hi,all!
> Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does?
>
> Now I have developed a plugin and I want to add a view that can display
> figures like GraphicalEditor does,how can I make it?
>
> Any response is appreciated!
>
>
>
Re: Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does? [message #137352 is a reply to message #133900] Wed, 09 June 2004 14:56 Go to previous messageGo to next message
Chris Heald is currently offline Chris HealdFriend
Messages: 40
Registered: July 2009
Member
Got a basic viewer working with no problems. However, I'd now like to make
the figures/editParts selectable. Even with the correct editPolicies
installed etc. the mosue events are not received. The viewer routes all
the events to the EditDomain but as I'm using a ViewPart and not an
EditPart I can't create a DefaultEditDomain. If i
setRouteEventstoEditDomain(false), i get a null pointer exception as
there's no EventDispatcher.

I looked at overriding the Viewer to change the eventDispatcher but the
relevant methods are deprecated.

What's the recommended way of doing this? I think what I need is a
"ViewDomain".

Is there an easier way to do this? All i really want is to pick up a
doubleClick on an editPart (normally performRequest(REQ_OPEN)).

Thanks
Chris



Pratik Shah wrote:

> You can create a GEF viewer on any SWT Composite. For creating an editor,
> you extend EditorPart, create a GEF viewer and give it the "editor control"
> (in the viewer's createControl(...) method). You would do the exact
> samething for a view. Extend ViewPart (or a subclass thereof), and give the
> view's control to the GEF viewer.

> "Bruce" <xietao@sjtu.edu.cn> wrote in message
> news:c8rmhn$f53$1@eclipse.org...
> > hi,all!
> > Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does?
> >
> > Now I have developed a plugin and I want to add a view that can display
> > figures like GraphicalEditor does,how can I make it?
> >
> > Any response is appreciated!
> >
> >
> >
Re: Can a view (ViewPart)do the works that GraphicalEditor(EditorPart) does? [message #137385 is a reply to message #137352] Wed, 09 June 2004 17:35 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
What you want is EditDomain, not DefaultEditDomain.

"Chris Heald" <chris.heald@m.eads.net> wrote in message
news:ca78eq$gk8$1@eclipse.org...
> Got a basic viewer working with no problems. However, I'd now like to make
> the figures/editParts selectable. Even with the correct editPolicies
> installed etc. the mosue events are not received. The viewer routes all
> the events to the EditDomain but as I'm using a ViewPart and not an
> EditPart I can't create a DefaultEditDomain. If i
> setRouteEventstoEditDomain(false), i get a null pointer exception as
> there's no EventDispatcher.
>
> I looked at overriding the Viewer to change the eventDispatcher but the
> relevant methods are deprecated.
>
> What's the recommended way of doing this? I think what I need is a
> "ViewDomain".
>
> Is there an easier way to do this? All i really want is to pick up a
> doubleClick on an editPart (normally performRequest(REQ_OPEN)).
>
> Thanks
> Chris
>
>
>
> Pratik Shah wrote:
>
> > You can create a GEF viewer on any SWT Composite. For creating an
editor,
> > you extend EditorPart, create a GEF viewer and give it the "editor
control"
> > (in the viewer's createControl(...) method). You would do the exact
> > samething for a view. Extend ViewPart (or a subclass thereof), and give
the
> > view's control to the GEF viewer.
>
> > "Bruce" <xietao@sjtu.edu.cn> wrote in message
> > news:c8rmhn$f53$1@eclipse.org...
> > > hi,all!
> > > Can a view (ViewPart)do the works that GraphicalEditor(EditorPart)
does?
> > >
> > > Now I have developed a plugin and I want to add a view that can
display
> > > figures like GraphicalEditor does,how can I make it?
> > >
> > > Any response is appreciated!
> > >
> > >
> > >
>
>
Previous Topic:Complex Figures problem
Next Topic:TextFlow
Goto Forum:
  


Current Time: Fri Apr 19 02:17:45 GMT 2024

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

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

Back to the top