Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » views are not initialized on startup
views are not initialized on startup [message #461197] Sat, 06 January 2007 10:47 Go to next message
Eclipse UserFriend
Originally posted by: m96.gmx.li

the problem that i have is that the views i'm creating are not initialized on startup until i click on them. so my question is how do i initialize all views (tabs) right on startup?


the tabs that are immediately visible on workspace are initialized but not those that are placed behind them. let me try to explain this a little bit better.

say i'm creating two views 1) "nav" 2) "table"
on Perspective.java that implements IPerspectiveFactory they are placed as following:

IFolderLayout folder = layout.createFolder("folderNavigator", IPageLayout.LEFT, 0.25f, layout.getEditorArea());
folder.addView(Nav.ID);
folder.addView(Table.ID);

this way the tab "nav" is immediately visible on startup and the other tab "table" (since it's behind "nav") is not.

since those tabs that are behind the first one are not initialed they also won't register as selectionListener until i click on them for the first time.


thanks for any help.
Re: views are not initialized on startup [message #461204 is a reply to message #461197] Sat, 06 January 2007 14:08 Go to previous messageGo to next message
Eclipse UserFriend
For efficiency, I believe that all of the views are only initialised when they're shown for the first time. Otherwise, if you have a lot of views in a perspective that you switch to, it would take some time to initialise everything.

Why is this a problem? What would you need to do to cause the views to be initialised earlier? What is it that you're trying to achieve?

Alex.
Re: views are not initialized on startup [message #461224 is a reply to message #461204] Sun, 07 January 2007 08:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: m96.gmx.li

actually the idea was to present additional information on different various views if the selection on the main table is changed. because of this implemented ISelectionListener and register the other views as listeners.

the problem occurs if the user expects to see additional information on one of the other views that has not been initialized until he clicks on it but already interacted with the main table.

i tried with IStartup but it also didn't worked out as expected.

i think lazy initialization is good but doesn't fit for every use case...
Re: views are not initialized on startup [message #461226 is a reply to message #461224] Sun, 07 January 2007 09:30 Go to previous messageGo to next message
Eclipse UserFriend
m96 wrote:
> actually the idea was to present additional information on different various views if the selection on the main table is changed. because of this implemented ISelectionListener and register the other views as listeners.
>
> the problem occurs if the user expects to see additional information on one of the other views that has not been initialized until he clicks on it but already interacted with the main table.
>

But the first time the user clicks on the view, you can check to see if
there's any selection for you to work with in your createPartControl(*)

Later,
PW
Re: views are not initialized on startup [message #461229 is a reply to message #461224] Sun, 07 January 2007 10:28 Go to previous message
Eclipse UserFriend
Why does it only work after the selection is made? You should be able to find out the currently selected item via getSelection() on the selection service. You don't need to do things by event only.

Alex.
Previous Topic:Open editor tooltip not null
Next Topic:WebStart doesnt work in Java 6.0
Goto Forum:
  


Current Time: Sun Mar 23 04:56:40 EDT 2025

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

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

Back to the top