How to minimize a view programatically in eclipse kepler [message #1415997] |
Thu, 04 September 2014 05:58 |
Kondal Kolipaka Messages: 9 Registered: November 2010 |
Junior Member |
|
|
During the eclipse startup itself, I wanted to keep all the views in the minimized way, so that it will be added to the side toolbar. It will opened by the end user only on the need basis.
I have tried the following.
Fast views - it's not working in eclipse kepler, but the same thing worked in the helios.
http://blog.vogella.com/2009/09/15/fastview-eclipse-rcp/
Even tried minimizing through workbench page
IViewPart showView = page.showView(View.ID);
IWorkbenchPartReference myView = page.findViewReference(View.ID);
page.setPartState(myView, IWorkbenchPage.STATE_MINIMIZED);
This added the view as a tool item in the side bar, but when I click on the tool item it will not open up the view, rather it's throwing null pointer exception in the trim bar.
java.lang.NullPointerException
at org.eclipse.e4.ui.workbench.addons.minmax.TrimStack.showStack(TrimStack.java:803)
at org.eclipse.e4.ui.workbench.addons.minmax.TrimStack$8.widgetSelected(TrimStack.java:439)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Thanks,
KK
[Updated on: Thu, 04 September 2014 06:18] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.09226 seconds