Skip to main content


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 13:45 Go to next message
Frank Langanke is currently offline Frank LangankeFriend
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 16:34 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
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 11:36 Go to previous messageGo to next message
Frank Langanke is currently offline Frank LangankeFriend
Messages: 7
Registered: October 2012
Junior Member
Thank you very much, works perfectly.
Re: Programmatically minimize/restore PartStacks [message #1722186 is a reply to message #937923] Wed, 03 February 2016 09:43 Go to previous messageGo to next message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 114
Registered: January 2015
Senior Member

Thank you Wim!

Is there a way to programmatically control intto which window-bar is the stack going to be docked?
I defined a Tool Control with ID my.stack.id(minimized) on the right side of the application, but the programmatic minimization goes left.. !

Thanks in advance,
-Piero

[Updated on: Wed, 03 February 2016 09:43]

Report message to a moderator

Re: Programmatically minimize/restore PartStacks [message #1722198 is a reply to message #1722186] Wed, 03 February 2016 10:55 Go to previous message
Piero Campalani is currently offline Piero CampalaniFriend
Messages: 114
Registered: January 2015
Senior Member

Solved: as I reported here too, the MinMax addon assumes that the ID of any existing trim control is composed of the stack id + the perspective id (see link for relevant library excerpts).

Now my stacks are minimized to the proper control.
Previous Topic:Getting current KeyBinding in Handler's @Execute method
Next Topic:Eclipse Mars on Linux Mint
Goto Forum:
  


Current Time: Thu Apr 18 08:29:23 GMT 2024

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

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

Back to the top