Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » simple graphical editor
simple graphical editor [message #163813] Thu, 13 January 2005 19:01 Go to next message
Eclipse UserFriend
Originally posted by: tm_trvs.yahoo.com

hi

i'm trying to develop a simple rcp application.
i just have a perspective with two views
now i want to add an editor with a palette
(GraphicalEditorWithFlyoutPalette), but i don't want the editor to do
anything. i just want to show the editor opened when my application starts.

i have already search the web looking for examples, articles, snippets,
...anything that could help me, but i'm getting crazy with this!

is it possible to have an editor without a model and all stuff? just an
empty white area with a palette?

when and how should i open the editor? (i have already read the post "open
editor automatically" but i still don't understand...)

i tried page.openEditor(...) in my WorkbenchAdvisor.postWindowOpen() but
the editor's place appears the message "An error has occurred when
creating this editor". After debugging source i noticed that
graphicalViewer is null

any help would be very appreciated
TIA
Tom
Re: simple graphical editor [message #163948 is a reply to message #163813] Thu, 13 January 2005 21:15 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
> is it possible to have an editor without a model and all stuff? just an
> empty white area with a palette?

Try creating an empty logic diagram. That's what you want it to look like,
right? The point being that you can still have a model, without having a
file behind it. The model (LogicDiagram) is there, but it has no children.
So, to answer your question, yes, it's possible. Look at an EditorPart's
setInput() method. The logic example expects a IFileEditorInput. Since,
there's no file for what you want to do, you'll probably have to write your
own IEditorInput subclass. Or you can just create an empty model yourself
in the editor.

What are you trying to do? Do you want like a default, untitled editor to
be created when the workbench is launched? In that case, you could possibly
also create like a temp, hidden file somewhere and use it as input. Save
then, would have to work as save as.

As for launching the editor when the workbench is launched, I'm not sure.
The folks over at eclipse.platform newsgroup might be able to better help
you with that.

"tom travis" <tm_trvs@yahoo.com> wrote in message
news:cs6giq$h4q$1@www.eclipse.org...
> hi
>
> i'm trying to develop a simple rcp application.
> i just have a perspective with two views
> now i want to add an editor with a palette
> (GraphicalEditorWithFlyoutPalette), but i don't want the editor to do
> anything. i just want to show the editor opened when my application
starts.
>
> i have already search the web looking for examples, articles, snippets,
> ..anything that could help me, but i'm getting crazy with this!
>
> is it possible to have an editor without a model and all stuff? just an
> empty white area with a palette?
>
> when and how should i open the editor? (i have already read the post "open
> editor automatically" but i still don't understand...)
>
> i tried page.openEditor(...) in my WorkbenchAdvisor.postWindowOpen() but
> the editor's place appears the message "An error has occurred when
> creating this editor". After debugging source i noticed that
> graphicalViewer is null
>
> any help would be very appreciated
> TIA
> Tom
>
>
Re: simple graphical editor [message #163965 is a reply to message #163948] Fri, 14 January 2005 18:07 Go to previous message
Eclipse UserFriend
Originally posted by: tm_trvs.yahoo.com

thanks for your help.
i have found a .pdf in ibm.com/redbooks ("Eclipse Development using the
Graphical Editing Framework and the Eclipse Modeling Framework") and i'm
trying to use some parts of the code
i have already created the editor without any problem, but my code fails
when i try to add a PaletteViewer. The problem is that PaletteViewer uses
DefaultPaletteViewerPreferences which in turn uses GEFPlugin. I don' t
know what's this GEFPlugin. I'm constructing an RCP app, i have my class
that extends AbstractUIPlugin...what am i missing?

i'm using GEF 3.1.0
TIA
Previous Topic:Change Edit Policies of Ruler's Guides
Next Topic:Help Needed!!!
Goto Forum:
  


Current Time: Sat Apr 27 05:17:23 GMT 2024

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

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

Back to the top