Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Programmatically minimize/restore PartStacks
Programmatically minimize/restore PartStacks [message #936933] Mon, 08 October 2012 09:45 Go to next message
Frank Langanke is currently offline Frank Langanke
Messages: 7
Registered: October 2012
Junior Member
Hi,

I would like to minimize or restore a PartStack programmatically. I have two PartStacks side by side and a command which opens a View within a PartStack. When certain Views are opened I want the other PartStack to be minimized.

Thanks

Frank
Re: Programmatically minimize/restore PartStacks [message #937078 is a reply to message #936933] Mon, 08 October 2012 12:34 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 275
Registered: July 2009
Senior Member

Hi Frank,

Add the minmax addon to the dependencies and then as an addon to the application model.

See the IPresentationEngine class for tags to add to the model elements.

To minimize the partstack use:

	@Execute
	public void execute(EModelService service, MApplication app) {
	 MPartStack stack =	(MPartStack) service.find("ID.OF.PARTSTACK.HERE", app);
	 stack.getTags().add(IPresentationEngine.MINIMIZED);}


Hope this helps,

Wim
Re: Programmatically minimize/restore PartStacks [message #937923 is a reply to message #937078] Tue, 09 October 2012 07:36 Go to previous message
Frank Langanke is currently offline Frank Langanke
Messages: 7
Registered: October 2012
Junior Member
Thank you very much, works perfectly.
Previous Topic:Dialog from Handler
Next Topic:Renaming default commands
Goto Forum:
  


Current Time: Thu Jul 24 23:50:56 EDT 2014

Powered by FUDForum. Page generated in 0.02420 seconds