Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » e4 hide PartStack Restore button
e4 hide PartStack Restore button [message #900872] Wed, 08 August 2012 18:43 Go to next message
G. Smith is currently offline G. SmithFriend
Messages: 12
Registered: August 2012
Junior Member
In my e4 RCP app I would like to have a minimized PartStack that does not show the restore button on the TrimBar or any of the Parts within the PartStack. I want the "floating" effect with the PartStack permanently anchored to the TrimBar.

I've programmatically removed the "Restore" ToolItem on the TrimBar by disposing it (please advise if there is a better way), but I'm stuck on trying to remove the refresh button from the part's trim.
Thanks.
Re: e4 hide PartStack Restore button [message #900885 is a reply to message #900872] Wed, 08 August 2012 19:47 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Can you show a screenshot, I think I can't follow. You should never
dispose something your own, everything has to come through the model or
you need to contribute a customized renderer.

Tom

Am 08.08.12 20:43, schrieb G. Smith:
> In my e4 RCP app I would like to have a minimized PartStack that does
> not show the restore button on the TrimBar or any of the Parts within
> the PartStack. I want the "floating" effect with the PartStack
> permanently anchored to the TrimBar.
>
> I've programmatically removed the "Restore" ToolItem on the TrimBar by
> disposing it (please advise if there is a better way), but I'm stuck on
> trying to remove the refresh button from the part's trim.
> Thanks.
Re: e4 hide PartStack Restore button [message #900988 is a reply to message #900872] Thu, 09 August 2012 10:32 Go to previous messageGo to next message
G. Smith is currently offline G. SmithFriend
Messages: 12
Registered: August 2012
Junior Member
Hi Tom-
I want to hide the two restore buttons (circled in red in the screen shot) for my own Part.

index.php/fa/11090/0/
Re: e4 hide PartStack Restore button [message #901004 is a reply to message #900988] Thu, 09 August 2012 11:39 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
That type of behaviour is handled by the MinMaxAddon, contained in org.elipse.e4.ui.workbench.additions.swt. You can either roll your own or hack up the existing one to add the flexibility as to be configurable to handle your situation as well. You should create a bug to track any discussion at:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI&version=4.2&bug_severity=enhancement
Re: e4 hide PartStack Restore button [message #901036 is a reply to message #901004] Thu, 09 August 2012 13:55 Go to previous messageGo to next message
G. Smith is currently offline G. SmithFriend
Messages: 12
Registered: August 2012
Junior Member
Thanks, Brian. I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=386929

So I'm trying to roll my own, but it seems like org.eclipse.e4.ui.workbench.addons.minmax.MinMaxAddon is still active as long as I have org.eclipse.e4.ui.workbench.addons.swt included in my runtime configuration. I have a dependence on org.eclipse.e4.ui.workbench.addons.swt for the DnDAddon.

Another issue with rolling my own MinMaxAddon is the use of e4 internal API (ShellActivationListener), which feels dirty.

If I roll my own MinMaxAddon, do I also have to roll my own DnDAddon?
Thanks
Re: e4 hide PartStack Restore button [message #901132 is a reply to message #901036] Thu, 09 August 2012 22:53 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
It's not ideal. I'd suggest you import the source, modify MinMaxAddon to allow specifying a policy (perhaps a subclass installed in the application's context?) and submit a patch.
Previous Topic:e4 Creating a window with NO_TRIM
Next Topic:Eclipse unbearably slow
Goto Forum:
  


Current Time: Fri Apr 19 10:45:38 GMT 2024

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

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

Back to the top