Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Editor like a view
Editor like a view [message #238856] Thu, 04 October 2007 08:48 Go to next message
Eclipse UserFriend
Originally posted by: Sferzah.yandex.ru

Hello.
As i know, editors open in editor area only, but i want to open my
"diagram" like a view. Can i do that?

I need one editor for 2 purposes :
1)only showing the diagram, not edit
2)some edit, without a save..
Help me pls to find a way to realize that.
Re: Editor like a view [message #238988 is a reply to message #238856] Tue, 09 October 2007 15:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: luis_dediego.yahoo.com

Hi Alexey,

I am not sure if this is a solution. Views are like editors. They have
the "createPartControl" where you can create a GraphicalViewer attached
to a canvas. The you can read your model and connect it to the Viewer
and it will create all the parts and figures as if read from an editor.

I have not checked this for myself but if a previous version of my code
I did it under a standalone application and the viewer was able to
display figures.

I may send you code to show how I create the viewer inside the editor
page that should also work for the View contents.

Best regards

Alexey wrote:
> Hello.
> As i know, editors open in editor area only, but i want to open my
> "diagram" like a view. Can i do that?
>
> I need one editor for 2 purposes :
> 1)only showing the diagram, not edit
> 2)some edit, without a save..
> Help me pls to find a way to realize that.
>
>
Re: Editor like a view [message #239001 is a reply to message #238856] Wed, 10 October 2007 06:39 Go to previous messageGo to next message
Cameron Weick is currently offline Cameron WeickFriend
Messages: 4
Registered: July 2009
Junior Member
Hey Alexey,

Look at the Outline View RCP/GEF provides, it has the capability to show
you a smaller version of the editor in a viewpart, and its not editable.
You should be able to find an example of the outline being used in the
logic example.

Cam


Alexey wrote:
> Hello.
> As i know, editors open in editor area only, but i want to open my
> "diagram" like a view. Can i do that?
>
> I need one editor for 2 purposes :
> 1)only showing the diagram, not edit
> 2)some edit, without a save..
> Help me pls to find a way to realize that.
>
>
Re: Editor like a view [message #239014 is a reply to message #239001] Wed, 10 October 2007 10:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexey.asonov.oxs.ru

Hello Cam,

Thanks for advise, but i think the OutlineView - is a view, not editor.

I tried to create ViewPart implements IEditorPart, try to create
EditorPart implements IViewPart - have no results (somewhere deep Eclipse
choose - what kind of part i use : IEditorPart or IViewPart). This two
parts are uncompatible, i think now.
Re: Editor like a view [message #239019 is a reply to message #238988] Wed, 10 October 2007 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexey.asonov.oxs.ru

Hi Luis!

Thanks, i think so.
For my first purpose, i realize a view with LightweightSystem and place my
model's figures there.

But second purpose - i want to do some wizard, using gef-editor (on wizard
page). I'm not trying to do it yet, but think i'll take a problem there..
Re: Editor like a view [message #239042 is a reply to message #239014] Wed, 10 October 2007 15:18 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Alexey

The Directed Graph Example (Digraph1) also provides an example of a GEF
view.

http://www.eclipse.org/gef/reference/digraph1.php

Cheers...
Anthony

"Alexey" <alexey.asonov@oxs.ru> wrote in message
news:8051a97d155f04e3808dc97db1f15ddb$1@www.eclipse.org...
> Hello Cam,
>
> Thanks for advise, but i think the OutlineView - is a view, not editor.
>
> I tried to create ViewPart implements IEditorPart, try to create
> EditorPart implements IViewPart - have no results (somewhere deep Eclipse
> choose - what kind of part i use : IEditorPart or IViewPart). This two
> parts are uncompatible, i think now.
>
Re: Editor like a view [message #239112 is a reply to message #239042] Thu, 11 October 2007 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alexey.asonov.oxs.ru

Thank you, Anthony!

So, i'm trying to use EditDomain and GraphicalViewer in my view. One more
question - how can i change an input fo my view?
getGraphicalViewer().setContents(..) have no effect..

thanks!
Re: Editor like a view [message #239206 is a reply to message #239112] Fri, 12 October 2007 13:41 Go to previous message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Alexey,

When you say you want to change your input for the view, you mean you want
to replace your model for the view with a different model?

I would refresh your root edit part which will replace the children with a
new view of the model.

Cheers...
Anthony

"Alexey" <alexey.asonov@oxs.ru> wrote in message
news:b9845a84705c17e1102649400a00db9a$1@www.eclipse.org...
> Thank you, Anthony!
>
> So, i'm trying to use EditDomain and GraphicalViewer in my view. One more
> question - how can i change an input fo my view?
> getGraphicalViewer().setContents(..) have no effect..
>
> thanks!
>
Previous Topic:The refreshVisuals() method
Next Topic:Japanese Truncation
Goto Forum:
  


Current Time: Fri Apr 26 23:32:59 GMT 2024

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

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

Back to the top