Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » CleanupAddon hides perspective although it has a visible window
CleanupAddon hides perspective although it has a visible window [message #1711698] Mon, 19 October 2015 11:15 Go to next message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
Hi
in e4 4.4.1 the CleanupAddon checks if there are no children that should be rendered for the decision to hide the perspective. Unfortunately the ModelServiceImpl.toBeRenderedCount(MElementContainer<?>) method does not check for a perspective's windows but only its children.
Is this (in my opinion buggy) behavior already known/fixed?
Re: CleanupAddon hides perspective although it has a visible window [message #1711706 is a reply to message #1711698] Mon, 19 October 2015 11:57 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2787
Registered: July 2012
Senior Member
Asking is easier than having yourself a look...

I opened the implementation in my workspace for you and can tell you that there is no check for a perspective's window in that method.

Why do you think this is buggy? What is the desired behavior on your side? If you think it is a bug, please create a ticket and explain what you expect. From looking into the code, it looks easy to solve when adding an instanceof check and add the window count of MPerspective. But I would like to have a second opinion on this.
Re: CleanupAddon hides perspective although it has a visible window [message #1711713 is a reply to message #1711698] Mon, 19 October 2015 12:24 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6568
Registered: July 2009
Senior Member
Sounds like a bug

Tom

On 19.10.15 13:15, quest ionnere wrote:
> Hi
> in e4 4.4.1 the CleanupAddon checks if there are no children that should
> be rendered for the decision to hide the perspective. Unfortunately the
> ModelServiceImpl.toBeRenderedCount(MElementContainer<?>) method does not
> check for a perspective's windows but only its children.
> Is this (in my opinion buggy) behavior already known/fixed?
Re: CleanupAddon hides perspective although it has a visible window [message #1711723 is a reply to message #1711713] Mon, 19 October 2015 12:55 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2787
Registered: July 2012
Senior Member
Thomas Schindl wrote on Mon, 19 October 2015 14:24
Sounds like a bug

Tom


That is the minimum second opinion I thought of, since it would also affect e(fx)clipse. Smile

In that case, please create a ticket for this issue. The fix should be easy as I already explained. If you are able, it would be also nice to see a contribution.
Re: CleanupAddon hides perspective although it has a visible window [message #1711735 is a reply to message #1711706] Mon, 19 October 2015 13:19 Go to previous messageGo to next message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
Thank you for checking Dirk, sorry I did not do so myself.

I think this is buggy because if I have a perspective with exactly one PartStack in it, and I detach that PartStack with modelService.detach the perspective gets hidden by the CleanupAddon. I would expect that the perspective stays visible as long as anything in it is visible.

I agree that this should be easy to solve, but I'm not sure whether the modelService or the CleanupAddon is the right place to do so.
Re: CleanupAddon hides perspective although it has a visible window [message #1711746 is a reply to message #1711735] Mon, 19 October 2015 13:42 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2787
Registered: July 2012
Senior Member
Quote:
but I'm not sure whether the modelService or the CleanupAddon is the right place to do so


Interesting question. It depends on whether the windows of a perspective are interpreted as additional children or not. But IMHO the EModelService#toBeRenderedCount(MElementContainer) returns the number of children that are to be rendered. The method is AFAICS only used in the CleanupAddon.

So is the toBeRendered flag also the one that needs to be checked? Than IMHO ModelServiceImpl should be modified. Is the check only whether child windows exist, then CleanupAddon should be modified. But that is my opinion.

@Tom
What do you think? The CleanupAddon is SWT. Does e(fx)clipse also suffer from the current behavior? That would be another hint to solve the issue directly in the EModelService.
Re: CleanupAddon hides perspective although it has a visible window [message #1711763 is a reply to message #1711746] Mon, 19 October 2015 14:19 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6568
Registered: July 2009
Senior Member
On 19.10.15 15:42, Dirk Fauth wrote:
> Quote:
>> but I'm not sure whether the modelService or the CleanupAddon is the
>> right place to do so
>
>
> Interesting question. It depends on whether the windows of a perspective
> are interpreted as additional children or not. But IMHO the
> EModelService#toBeRenderedCount(MElementContainer) returns the number of
> children that are to be rendered. The method is AFAICS only used in the
> CleanupAddon.
> So is the toBeRendered flag also the one that needs to be checked? Than
> IMHO ModelServiceImpl should be modified. Is the check only whether
> child windows exist, then CleanupAddon should be modified. But that is
> my opinion.
>

The fix has to be in the model-service because the API describes that it
counts all children that are rendered so it needs to take
Perspective-Windows into account.

> @Tom
> What do you think? The CleanupAddon is SWT. Does e(fx)clipse also suffer
> from the current behavior? That would be another hint to solve the issue
> directly in the EModelService.

Yes e(fx)clipse is also affected by this.

Tom
Re: CleanupAddon hides perspective although it has a visible window [message #1711800 is a reply to message #1711763] Mon, 19 October 2015 19:09 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2787
Registered: July 2012
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=480156
Re: CleanupAddon hides perspective although it has a visible window [message #1711924 is a reply to message #1711800] Tue, 20 October 2015 10:21 Go to previous message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
that was fast, thank you for entering the bug and proposing a fix this quickly!
Previous Topic:Eclipse Mars ignores tooltip settings from Linux
Next Topic:[Resolved] ClassNotFoundException during startup because of Application Model Changes
Goto Forum:
  


Current Time: Tue Sep 29 21:38:37 GMT 2020

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

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

Back to the top