Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Changing contents of an editor
Changing contents of an editor [message #326186] Mon, 10 March 2008 18:14 Go to next message
Jan Weidauer is currently offline Jan WeidauerFriend
Messages: 49
Registered: July 2009
Member
Hi there.

I've built an editor which displays a set of SWT based editors like
org.eclipse.swt.widgets.Text.
The input file for this editor consists of different parts: a root part
and a set of other parts. The editor shall display only one part in a
time. On opening the editor will show the root part. To switch the part
to be displayed I built a tree viewer in the outline view. By selecting
an item in the outline the content of the editor shall change and so the
selected part from input file shall be displayed.
My problem is, that I have absolutely no idea how to tell the editor to
update and redraw itself. Does anyone have a hint?

Thanks in advance,
Jan
Re: Changing contents of an editor [message #326199 is a reply to message #326186] Tue, 11 March 2008 12:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Jan Weidauer wrote:
> Hi there.
>
> I've built an editor which displays a set of SWT based editors like
> org.eclipse.swt.widgets.Text.
> The input file for this editor consists of different parts: a root part
> and a set of other parts. The editor shall display only one part in a
> time. On opening the editor will show the root part. To switch the part
> to be displayed I built a tree viewer in the outline view. By selecting
> an item in the outline the content of the editor shall change and so the
> selected part from input file shall be displayed.
> My problem is, that I have absolutely no idea how to tell the editor to
> update and redraw itself. Does anyone have a hint?

There are several options, depending on the user experience you want to
provide. Instead of using the outline view you could use a multi-page
(multi-tab) editor, one tab for each part. Another idea would be to have
a single tab editor but follow the master/details UI design (like the
Extensions tab of the plugin editor).
Finally, if you really want to keep using the Outline view, you could
use a StackLayout in your editor to show only one composite at a time
(each composite representing a part of your file).

Hope this helps,
Eric
Re: Changing contents of an editor [message #326206 is a reply to message #326199] Tue, 11 March 2008 15:33 Go to previous message
Jan Weidauer is currently offline Jan WeidauerFriend
Messages: 49
Registered: July 2009
Member
> There are several options, depending on the user experience you want to
> provide. Instead of using the outline view you could use a multi-page
> (multi-tab) editor, one tab for each part. Another idea would be to have
> a single tab editor but follow the master/details UI design (like the
> Extensions tab of the plugin editor).
> Finally, if you really want to keep using the Outline view, you could
> use a StackLayout in your editor to show only one composite at a time
> (each composite representing a part of your file).
>
> Hope this helps,
> Eric

Thanks a lot for these helpful hints. The StackLayout is exactly what I
wanted but did not know that it exists.

Jan
Previous Topic:ToolbarContributionItem Visibility Seems wrong
Next Topic:Upgrading old projects seamlessly
Goto Forum:
  


Current Time: Thu Jul 18 03:33:08 GMT 2024

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

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

Back to the top