Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Add editors to an empty parts stack
Add editors to an empty parts stack [message #988349] Thu, 29 November 2012 14:15 Go to next message
Gaetan Pitteloud is currently offline Gaetan Pitteloud
Messages: 17
Registered: September 2012
Junior Member
I need something similar to eclipse IDE, where a portion of the screen is empty when the application starts, and when I select s.t. in another part, an editor part opens in that empty portion representing the selection. Further, each selection opens in a new editor part in the same portion.

I have added an empty part stack, but it does not display and handle well. Is it the way it should be done ?
- the height of the tab bar is too small, and the min/max buttons overlap it.
index.php/fa/12542/0/


- when I minimize that empty stack, I get the following NPE, and the widget that usually contains the restore button is not rendered. Clicking on max seems OK though.
index.php/fa/12543/0/

!ENTRY org.eclipse.equinox.event 4 0 2012-11-29 14:42:31.947
!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/application/ApplicationElement/tags/REMOVE] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@47a6ac39
!STACK 0
java.lang.NullPointerException
 at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.restore(MinMaxAddon.java:557)
 at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon$8.handleEvent(MinMaxAddon.java:374)
 at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
 at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
 at org.eclipse.swt.widgets.Display.syncExec(Display.java:4687)
 at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:187)
 at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
 at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
 at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
 at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
 at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
 at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
 at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
 at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
 at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
 at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
 at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:249)
 at org.eclipse.emf.common.notify.impl.NotifyingListImpl.remove(NotifyingListImpl.java:725)
 at org.eclipse.emf.common.util.AbstractEList.remove(AbstractEList.java:460)
 at org.eclipse.e4.ui.workbench.addons.minmax.TrimStack.restoreStack(TrimStack.java:724)
 at org.eclipse.e4.ui.workbench.addons.minmax.TrimStack.updateTrimStackItems(TrimStack.java:700)
 at org.eclipse.e4.ui.workbench.addons.minmax.TrimStack.createWidget(TrimStack.java:583)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
 at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:859)
 at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111)
 at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:319)
 at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:253)
 at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:185)
 at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105)
 at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
 at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:49)
 at org.eclipse.e4.ui.workbench.renderers.swt.ToolControlRenderer.createWidget(ToolControlRenderer.java:75)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:896)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:630)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:732)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:703)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:697)
 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:682)
 at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:59)
 at org.eclipse.e4.ui.workbench.renderers.swt.TrimBarRenderer.processContents(TrimBarRenderer.java:154)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:642)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:732)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:703)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:697)
 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:682)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.handleEvent(PartRenderingEngine.java:126)
 at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
 at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
 at org.eclipse.swt.widgets.Display.syncExec(Display.java:4687)
 at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:187)
 at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
 at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
 at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
 at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
 at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
 at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
 at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
 at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
 at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
 at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
 at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setToBeRendered(UIElementImpl.java:290)
 at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.createTrim(MinMaxAddon.java:768)
 at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.minimize(MinMaxAddon.java:535)
 at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon$8.handleEvent(MinMaxAddon.java:368)
 at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
 at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
 at org.eclipse.swt.widgets.Display.syncExec(Display.java:4687)
 at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:187)
 at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
 at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
 at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
 at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
 at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
 at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
 at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
 at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
 at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
 at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
 at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
 at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:249)
 at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:304)
 at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
 at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.setState(MinMaxAddon.java:253)
 at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon.access$2(MinMaxAddon.java:249)
 at org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon$3.minimize(MinMaxAddon.java:173)
 at org.eclipse.swt.custom.CTabFolder.onSelection(CTabFolder.java:2020)
 at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:279)
 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
 at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
 at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:150)
 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:353)
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
 at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
 at org.eclipse.equinox.launcher.Main.main(Main.java:1414)


  • Attachment: tabbar.png
    (Size: 9.46KB, Downloaded 978 times)
  • Attachment: min.png
    (Size: 21.73KB, Downloaded 966 times)

[Updated on: Thu, 29 November 2012 14:16]

Report message to a moderator

Re: Add editors to an empty parts stack [message #988390 is a reply to message #988349] Thu, 29 November 2012 17:30 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

What is your eclipse build id?
Re: Add editors to an empty parts stack [message #988477 is a reply to message #988390] Fri, 30 November 2012 07:10 Go to previous messageGo to next message
Gaetan Pitteloud is currently offline Gaetan Pitteloud
Messages: 17
Registered: September 2012
Junior Member
Version: Juno Service Release 1
Build id: 20121004-1855
Re: Add editors to an empty parts stack [message #988667 is a reply to message #988477] Fri, 30 November 2012 22:50 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

IIRC the overlapping bug was fixed in later builds. The stack is a MPartStack ?
Re: Add editors to an empty parts stack [message #989239 is a reply to message #988667] Wed, 05 December 2012 10:28 Go to previous messageGo to next message
Gaetan Pitteloud is currently offline Gaetan Pitteloud
Messages: 17
Registered: September 2012
Junior Member
(sorry, I haven't seen your reply so far)
yes, it's a MPartStack.

Apart from the min/max and overlapping buttons, I programmatically add parts to that stack (like editors in eclipse ide), which works fine, but when I close all my editors, the region where the stack initially resides completely disappears (the other parts of the window fill in the empty space). When I open a new editor, it opens in its correct place (where the stack initially resides).

Is it a normal behaviour, or is it linked to the resolved bug you're talking about ? I want an eclipse-like behaviour, where the region containing editors never disappears when all editors are closed. Do I have to do s.t. special to get this ?
Re: Add editors to an empty parts stack [message #989240 is a reply to message #989239] Wed, 05 December 2012 10:30 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

To avoid minimizing a stack you use a tag. See Eclipse tags. Just put the NoAutoCollapse tag on the Stack.
Re: Add editors to an empty parts stack [message #989250 is a reply to message #989240] Wed, 05 December 2012 11:01 Go to previous messageGo to next message
Lars Vogel is currently offline Lars Vogel
Messages: 1049
Registered: July 2009
Senior Member

We get this question very frequently so I created a separate section for this in my Eclipse 4 tutorial. You find it here: Supplementary model attributes in Eclipse.
Re: Add editors to an empty parts stack [message #989262 is a reply to message #989250] Wed, 05 December 2012 12:06 Go to previous message
Gaetan Pitteloud is currently offline Gaetan Pitteloud
Messages: 17
Registered: September 2012
Junior Member
Thanks for NoAutoCollapse tag feature. I could never figure it out by myself.
Previous Topic:Disable MMenu in the Main Menu
Next Topic:Command with parameters and DI ?
Goto Forum:
  


Current Time: Thu Oct 02 08:36:12 GMT 2014

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

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