How to dynamically set the View Part Name and Content [message #630174] |
Thu, 30 September 2010 17:33  |
Eclipse User |
|
|
|
Hi,
The situation I am facing is the following: I need to dynamically
create one or more views where each view displays a different content
(1) and have a different title (2). The number of views and their title
is known only at runtime and may be different between each restart of
the application.
I've read many posts about that subject (e.g. "How to dynamically set
View Part Name before it is activated") but haven't found a solution
that works 100% without some hacks.
I solved problem (1) by using the secondary view ID to display a
different content for each view. However, I am stuck with problem (2):
how to set the name of each view when they are displayed? I can use
setPartName() in createControlPart() but this won't work for the views
that are not created yet (the workbench will display the name defined
in the extension until the user clicks on the view title to make it
active). I tried to follow the suggestion in the thread "How to
dynamically set View Part Name before it is activated" but there I am
facing a problem upon restart: the window is gray and no views is
displayed (if I delete the workspace data and restart it works again).
Does anyone know a good solution to solve this problem? Any help would
be appreciated.
Regards,
Jean
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06969 seconds