eclipse - Welcome page not closing on perspective change -


i have rcp application in have added intro page (welcome page). implemented using iintropart. mine not xml oriented welcome page.

problem: when application started welcome page displayed perfectly. when welcome page still opened (visible), if try open perspective in application, welcome page not moving towards right (as in eclipse ide) making space perspective have selected.

so after selecting perspective, perspective not shown , welcome page still occupying entire workbench area. please note that, selected perspectve not hiding behind welcome page. selected perspective getting updated in perspective shortcuts!

on restart (after clearing metadata) if manually close welcome page , try open perspective, perspective opens fine.

it because of welcome page (when visible) selected perspective not opening in workbench.

could please me resolve issue? should behave way welcome page behaves in eclipse ide. i.e, when welcome page still opened, if perspective opened, welcome page should move right making space pespective , hence both (the selected perspective , welcome page) should visible.

update:

some progress on issue. when select perspective open ("window -> open perspective -> myperspective") when welcome page (intro part) still opened, able close welcome page (this done adding part listener welcome page). empty area displayed , perspective not shown. however, selected perspective getting updated in applications perspective shortcut bar

any welcomed...

add perspective listeners , minimize welcome page. put below code in activator start method.

    final iworkbench workbench = platformui.getworkbench();     workbench.getdisplay().asyncexec(new runnable() {         public void run() {                 workbench.getactiveworkbenchwindow().addperspectivelistener(new iperspectivelistener() {                      public void perspectiveactivated(iworkbenchpage arg0, iperspectivedescriptor arg1) {                         // nothing                      }                      public void perspectivechanged(iworkbenchpage arg0, iperspectivedescriptor arg1, string arg2) {                          // fix bug number 8028                         iworkbenchpage page = platformui.getworkbench().getactiveworkbenchwindow().getactivepage();                         iviewpart introview = page.findview("org.eclipse.ui.internal.introview");//$non-nls-1$                         if (introview != null && page.getreference(introview) != null) {                             int currentstate = page.getpartstate(page.getreference(introview));                             if (currentstate != iworkbenchpage.state_minimized) {                                 page.setpartstate(page.getreference(introview), iworkbenchpage.state_minimized);                             }                         }                      }                 });                         }     }); 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -