Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » Aren't my editors supposed to auto-close?
Aren't my editors supposed to auto-close? [message #34216] Fri, 26 October 2007 15:22 Go to next message
Kevin Bracey is currently offline Kevin BraceyFriend
Messages: 19
Registered: July 2009
Junior Member
I've been using Mylyn for a bit now, and I think something's not going
right. I'm finding myself with a build-up of over 50 open editors, about
70% of which are .class files from libraries. I thought editors were
supposed to close themselves as Mylyn deems them less interesting.

Mylyn is remembering the files for the context, so they all close when I
close the context, and they all come back when I re-open, but I don't
think I've ever noticed an editor close itself while working.

Items are appearing and disappearing from the Package view as I'd
expect, so the activity monitoring is working to an extent.

When should Mylyn be closing editors? Could it just be that the 50 open
editors are what it deems interesting? Am I confusing it by frequently
looking at library source?

Mylyn > "Manage open editors to match task context" is on
Mylyn > "Remove file from context when editor is closed" is on
Editors > "Close editors automatically" is off (I've read that this
should be off for Mylyn's handling to take over).

I'm on Eclipe 3.3.1 and Mylyn 2.1.

Any ideas?

Kevin
Re: Aren't my editors supposed to auto-close? [message #34252 is a reply to message #34216] Mon, 29 October 2007 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mauro.molinari.cardinis.com

Kevin Bracey ha scritto:
> Any ideas?

Hi Kevin,
I noticed the same thing, so I think it is on purpose...
I agree with you that it would be more useful if Mylyn closed the
editors of those files that exit from the context... I also find myself
with tens of open editors and this IMHO makes Mylyn context-driven
approach less effective...

Cheers,
Mauro.
Re: Aren't my editors supposed to auto-close? [message #34286 is a reply to message #34252] Mon, 29 October 2007 14:43 Go to previous messageGo to next message
David Carver is currently offline David CarverFriend
Messages: 174
Registered: July 2009
Senior Member
Mauro Molinari wrote:
> Kevin Bracey ha scritto:
>> Any ideas?
>
> Hi Kevin,
> I noticed the same thing, so I think it is on purpose...
> I agree with you that it would be more useful if Mylyn closed the
> editors of those files that exit from the context... I also find myself
> with tens of open editors and this IMHO makes Mylyn context-driven
> approach less effective...
>

Not to mention keeping extra editors open when they no longer fall into
the context is a waste of system resources as well.
Re: Aren't my editors supposed to auto-close? [message #34317 is a reply to message #34216] Tue, 30 October 2007 08:08 Go to previous messageGo to next message
Alexey Semenov is currently offline Alexey SemenovFriend
Messages: 78
Registered: July 2009
Member
Hi Kevin,

"Close Editors Automatically" seems to be the feature you're looking for...

I've found the following phrase in Mylar 0.4 New & Noteworthy:
> "It is recommended that you either turn off the "Close Editors
> Automatically" workbench setting, or set a high number to leave open."

So looks like an good option.

Alexey


On Fri, 26 Oct 2007 16:22:33 +0100, Kevin Bracey <kbracey@broadcom.com>
wrote:

> I've been using Mylyn for a bit now, and I think something's not going
> right. I'm finding myself with a build-up of over 50 open editors, about
> 70% of which are .class files from libraries. I thought editors were
> supposed to close themselves as Mylyn deems them less interesting.
>
> Mylyn is remembering the files for the context, so they all close when I
> close the context, and they all come back when I re-open, but I don't
> think I've ever noticed an editor close itself while working.
>
> Items are appearing and disappearing from the Package view as I'd
> expect, so the activity monitoring is working to an extent.
>
> When should Mylyn be closing editors? Could it just be that the 50 open
> editors are what it deems interesting? Am I confusing it by frequently
> looking at library source?
>
> Mylyn > "Manage open editors to match task context" is on
> Mylyn > "Remove file from context when editor is closed" is on
> Editors > "Close editors automatically" is off (I've read that this
> should be off for Mylyn's handling to take over).
>
> I'm on Eclipe 3.3.1 and Mylyn 2.1.
>
> Any ideas?
>
> Kevin



--
Re: Aren't my editors supposed to auto-close? [message #34350 is a reply to message #34252] Tue, 30 October 2007 18:43 Go to previous messageGo to next message
Kevin Bracey is currently offline Kevin BraceyFriend
Messages: 19
Registered: July 2009
Junior Member
Mauro Molinari wrote:
> Kevin Bracey ha scritto:
>> Any ideas?
>
> I noticed the same thing, so I think it is on purpose...
> I agree with you that it would be more useful if Mylyn closed the
> editors of those files that exit from the context... I also find myself
> with tens of open editors and this IMHO makes Mylyn context-driven
> approach less effective...

Well, that's it - I'm sure it's not on purpose. Mik's articles about
Mylyn specifically talk about the auto-closing of editors. Here's a
quote from part 2 of his IBM DeveloperWorks article:

"Mylyn also uses the task context to manage actively the number of open
editors related to a task. When the elements in a file decay beyond your
interest, that editor automatically closes. When you deactivate a task,
all of its editors close and then reopen upon task activation. Reducing
an element's interest closes its editor and, conversely, closing a file
reduces its interest."

But it seems that something on my system and yours is stopping this
working fully. All I'm getting is the opening and closing on task
activation, and closing a file reducing its interest.

Kevin
Re: Aren't my editors supposed to auto-close? [message #34384 is a reply to message #34350] Tue, 30 October 2007 19:19 Go to previous messageGo to next message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
Kevin Bracey wrote:
> Well, that's it - I'm sure it's not on purpose. Mik's articles about
> Mylyn specifically talk about the auto-closing of editors. Here's a
> quote from part 2 of his IBM DeveloperWorks article:
>
> "Mylyn also uses the task context to manage actively the number of
> open editors related to a task. When the elements in a file decay
> beyond your interest, that editor automatically closes. When you
> deactivate a task, all of its editors close and then reopen upon task
> activation. Reducing an element's interest closes its editor and,
> conversely, closing a file reduces its interest."
>
> But it seems that something on my system and yours is stopping this
> working fully. All I'm getting is the opening and closing on task
> activation, and closing a file reducing its interest.
Kevin, there been changes in this functionality in the last release,
because some users find interest decay on editor closing is too
confusing. You may want to check the preferences at Window /
Preferences... / Mylyn / Context / Editors.

regards,
Eugene
Re: Aren't my editors supposed to auto-close? [message #34418 is a reply to message #34384] Wed, 31 October 2007 11:40 Go to previous messageGo to next message
Kevin Bracey is currently offline Kevin BraceyFriend
Messages: 19
Registered: July 2009
Junior Member
Eugene Kuleshov wrote:
> Kevin, there been changes in this functionality in the last release,
> because some users find interest decay on editor closing is too
> confusing. You may want to check the preferences at Window /
> Preferences... / Mylyn / Context / Editors.

As I said in my original post, both options in that group are enabled:

Manage open editors to match task context
Remove file from context when editor is closed

The latter is happening, the former isn't.

Maybe it's time for me to actually do some debug investigation. I'll
start digging around in Mylyn today.

Kevin
Re: Aren't my editors supposed to auto-close? [message #34486 is a reply to message #34350] Wed, 31 October 2007 13:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mauro.molinari.cardinis.com

Kevin Bracey ha scritto:
> Mauro Molinari wrote:
> "Mylyn also uses the task context to manage actively the number of open
> editors related to a task. When the elements in a file decay beyond your
> interest, that editor automatically closes. When you deactivate a task,
> all of its editors close and then reopen upon task activation. Reducing
> an element's interest closes its editor and, conversely, closing a file
> reduces its interest."

I'm glad to know that it should work as we expect... maybe it's the case
to open a new bug report?

Mauro.
Re: Aren't my editors supposed to auto-close? [message #34520 is a reply to message #34384] Wed, 31 October 2007 13:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mauro.molinari.cardinis.com

Eugene Kuleshov ha scritto:
> Kevin, there been changes in this functionality in the last release,
> because some users find interest decay on editor closing is too
> confusing. You may want to check the preferences at Window /
> Preferences... / Mylyn / Context / Editors.

Hi Eugene,
the problem that Kevin is reporting was also present (for me) when Mylyn
was still Mylar... Editors are never closed automatically, except when I
deactivate a task and/or switch to another one.

I thought it was on purpose, even if I didn't agree with that, so I
never tried to discuss this issue here, but now Kevin highlighted that
editors really should be closed when files exit from the context...

Mauro.
Re: Aren't my editors supposed to auto-close? [message #34587 is a reply to message #34418] Wed, 31 October 2007 16:01 Go to previous messageGo to next message
Kevin Bracey is currently offline Kevin BraceyFriend
Messages: 19
Registered: July 2009
Junior Member
Kevin Bracey wrote:
> Eugene Kuleshov wrote:
>> Kevin, there been changes in this functionality in the last release,
>> because some users find interest decay on editor closing is too
>> confusing. You may want to check the preferences at Window /
>> Preferences... / Mylyn / Context / Editors.
>
> As I said in my original post, both options in that group are enabled:
>
> Manage open editors to match task context
> Remove file from context when editor is closed
>
> The latter is happening, the former isn't.
>
> Maybe it's time for me to actually do some debug investigation. I'll
> start digging around in Mylyn today.

Okay, I'm seeing two things here. Firstly, it seems to me that Mylyn
appears pretty reluctant to actually remove documents from interest
automatically, but it will do it. But I suspect this may be partly due
to my artificial testing not matching real usage patterns.

Anyway, the main problem occurs in JavaUiBridge.close(). It loops over
getActivePage().getEditorReferences() trying to locate an editor for the
node being closed.

The stumbling block appears to be that the method it uses,
EditorReference.getEditor(false), only actually returns an editor if the
editor is active. If it's one of the ones buried at the back of the
stack, it returns null.

So the auto-close will only ever work if the document that's become
uninteresting is one of the ones you're working on! Very unlikely,
unless you've manually selected "remove from context".

I'm going to submit a bug report.

Kevin
Re: Aren't my editors supposed to auto-close? [message #35091 is a reply to message #34587] Sat, 03 November 2007 02:19 Go to previous message
Eclipse UserFriend
Originally posted by: beatmik.acm.org

Great diagnosis Kevin, this is indeed intended to work as you expect.
There is some trickiness to this policy and when it's OK to auto-close
without incurring performance overhead (e.g. if an editor has not
materialized yet), but thanks to your patch we'll prioritize improving
this for an upcoming weekly build. For others interested the bug is:

208265: [patch] [context] Mylyn is not auto-closing editors
https://bugs.eclipse.org/bugs/show_bug.cgi?id=208265

We also have a related usability issue. Task editors do not auto close
because they do not participate in the task context. While restoring
them takes almost no resources because they don't materialize until
activated, if you browse a bunch of tasks while you have another task
active you'll get this bloat. I've wondered whether we should change
our restore policy to only restore the editor for the task that's being
activated.

Mik

Kevin Bracey wrote:
> Kevin Bracey wrote:
>> Eugene Kuleshov wrote:
>>> Kevin, there been changes in this functionality in the last release,
>>> because some users find interest decay on editor closing is too
>>> confusing. You may want to check the preferences at Window /
>>> Preferences... / Mylyn / Context / Editors.
>>
>> As I said in my original post, both options in that group are enabled:
>>
>> Manage open editors to match task context
>> Remove file from context when editor is closed
>>
>> The latter is happening, the former isn't.
>>
>> Maybe it's time for me to actually do some debug investigation. I'll
>> start digging around in Mylyn today.
>
> Okay, I'm seeing two things here. Firstly, it seems to me that Mylyn
> appears pretty reluctant to actually remove documents from interest
> automatically, but it will do it. But I suspect this may be partly due
> to my artificial testing not matching real usage patterns.
>
> Anyway, the main problem occurs in JavaUiBridge.close(). It loops over
> getActivePage().getEditorReferences() trying to locate an editor for the
> node being closed.
>
> The stumbling block appears to be that the method it uses,
> EditorReference.getEditor(false), only actually returns an editor if the
> editor is active. If it's one of the ones buried at the back of the
> stack, it returns null.
>
> So the auto-close will only ever work if the document that's become
> uninteresting is one of the ones you're working on! Very unlikely,
> unless you've manually selected "remove from context".
>
> I'm going to submit a bug report.
>
> Kevin
Re: Aren't my editors supposed to auto-close? [message #583883 is a reply to message #34216] Mon, 29 October 2007 09:24 Go to previous message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Kevin Bracey ha scritto:
> Any ideas?

Hi Kevin,
I noticed the same thing, so I think it is on purpose...
I agree with you that it would be more useful if Mylyn closed the
editors of those files that exit from the context... I also find myself
with tens of open editors and this IMHO makes Mylyn context-driven
approach less effective...

Cheers,
Mauro.
Re: Aren't my editors supposed to auto-close? [message #583897 is a reply to message #34252] Mon, 29 October 2007 14:43 Go to previous message
David Carver is currently offline David CarverFriend
Messages: 174
Registered: July 2009
Senior Member
Mauro Molinari wrote:
> Kevin Bracey ha scritto:
>> Any ideas?
>
> Hi Kevin,
> I noticed the same thing, so I think it is on purpose...
> I agree with you that it would be more useful if Mylyn closed the
> editors of those files that exit from the context... I also find myself
> with tens of open editors and this IMHO makes Mylyn context-driven
> approach less effective...
>

Not to mention keeping extra editors open when they no longer fall into
the context is a waste of system resources as well.
Re: Aren't my editors supposed to auto-close? [message #583907 is a reply to message #34216] Tue, 30 October 2007 08:08 Go to previous message
Alexey Semenov is currently offline Alexey SemenovFriend
Messages: 78
Registered: July 2009
Member
Hi Kevin,

"Close Editors Automatically" seems to be the feature you're looking for...

I've found the following phrase in Mylar 0.4 New & Noteworthy:
> "It is recommended that you either turn off the "Close Editors
> Automatically" workbench setting, or set a high number to leave open."

So looks like an good option.

Alexey


On Fri, 26 Oct 2007 16:22:33 +0100, Kevin Bracey <kbracey@broadcom.com>
wrote:

> I've been using Mylyn for a bit now, and I think something's not going
> right. I'm finding myself with a build-up of over 50 open editors, about
> 70% of which are .class files from libraries. I thought editors were
> supposed to close themselves as Mylyn deems them less interesting.
>
> Mylyn is remembering the files for the context, so they all close when I
> close the context, and they all come back when I re-open, but I don't
> think I've ever noticed an editor close itself while working.
>
> Items are appearing and disappearing from the Package view as I'd
> expect, so the activity monitoring is working to an extent.
>
> When should Mylyn be closing editors? Could it just be that the 50 open
> editors are what it deems interesting? Am I confusing it by frequently
> looking at library source?
>
> Mylyn > "Manage open editors to match task context" is on
> Mylyn > "Remove file from context when editor is closed" is on
> Editors > "Close editors automatically" is off (I've read that this
> should be off for Mylyn's handling to take over).
>
> I'm on Eclipe 3.3.1 and Mylyn 2.1.
>
> Any ideas?
>
> Kevin



--
Re: Aren't my editors supposed to auto-close? [message #583916 is a reply to message #34252] Tue, 30 October 2007 18:43 Go to previous message
Kevin Bracey is currently offline Kevin BraceyFriend
Messages: 19
Registered: July 2009
Junior Member
Mauro Molinari wrote:
> Kevin Bracey ha scritto:
>> Any ideas?
>
> I noticed the same thing, so I think it is on purpose...
> I agree with you that it would be more useful if Mylyn closed the
> editors of those files that exit from the context... I also find myself
> with tens of open editors and this IMHO makes Mylyn context-driven
> approach less effective...

Well, that's it - I'm sure it's not on purpose. Mik's articles about
Mylyn specifically talk about the auto-closing of editors. Here's a
quote from part 2 of his IBM DeveloperWorks article:

"Mylyn also uses the task context to manage actively the number of open
editors related to a task. When the elements in a file decay beyond your
interest, that editor automatically closes. When you deactivate a task,
all of its editors close and then reopen upon task activation. Reducing
an element's interest closes its editor and, conversely, closing a file
reduces its interest."

But it seems that something on my system and yours is stopping this
working fully. All I'm getting is the opening and closing on task
activation, and closing a file reducing its interest.

Kevin
Re: Aren't my editors supposed to auto-close? [message #583926 is a reply to message #34350] Tue, 30 October 2007 19:19 Go to previous message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
Kevin Bracey wrote:
> Well, that's it - I'm sure it's not on purpose. Mik's articles about
> Mylyn specifically talk about the auto-closing of editors. Here's a
> quote from part 2 of his IBM DeveloperWorks article:
>
> "Mylyn also uses the task context to manage actively the number of
> open editors related to a task. When the elements in a file decay
> beyond your interest, that editor automatically closes. When you
> deactivate a task, all of its editors close and then reopen upon task
> activation. Reducing an element's interest closes its editor and,
> conversely, closing a file reduces its interest."
>
> But it seems that something on my system and yours is stopping this
> working fully. All I'm getting is the opening and closing on task
> activation, and closing a file reducing its interest.
Kevin, there been changes in this functionality in the last release,
because some users find interest decay on editor closing is too
confusing. You may want to check the preferences at Window /
Preferences... / Mylyn / Context / Editors.

regards,
Eugene
Re: Aren't my editors supposed to auto-close? [message #583938 is a reply to message #34384] Wed, 31 October 2007 11:40 Go to previous message
Kevin Bracey is currently offline Kevin BraceyFriend
Messages: 19
Registered: July 2009
Junior Member
Eugene Kuleshov wrote:
> Kevin, there been changes in this functionality in the last release,
> because some users find interest decay on editor closing is too
> confusing. You may want to check the preferences at Window /
> Preferences... / Mylyn / Context / Editors.

As I said in my original post, both options in that group are enabled:

Manage open editors to match task context
Remove file from context when editor is closed

The latter is happening, the former isn't.

Maybe it's time for me to actually do some debug investigation. I'll
start digging around in Mylyn today.

Kevin
Re: Aren't my editors supposed to auto-close? [message #583979 is a reply to message #34350] Wed, 31 October 2007 13:16 Go to previous message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Kevin Bracey ha scritto:
> Mauro Molinari wrote:
> "Mylyn also uses the task context to manage actively the number of open
> editors related to a task. When the elements in a file decay beyond your
> interest, that editor automatically closes. When you deactivate a task,
> all of its editors close and then reopen upon task activation. Reducing
> an element's interest closes its editor and, conversely, closing a file
> reduces its interest."

I'm glad to know that it should work as we expect... maybe it's the case
to open a new bug report?

Mauro.
Re: Aren't my editors supposed to auto-close? [message #583993 is a reply to message #34384] Wed, 31 October 2007 13:20 Go to previous message
Mauro Molinari is currently offline Mauro MolinariFriend
Messages: 285
Registered: July 2009
Senior Member
Eugene Kuleshov ha scritto:
> Kevin, there been changes in this functionality in the last release,
> because some users find interest decay on editor closing is too
> confusing. You may want to check the preferences at Window /
> Preferences... / Mylyn / Context / Editors.

Hi Eugene,
the problem that Kevin is reporting was also present (for me) when Mylyn
was still Mylar... Editors are never closed automatically, except when I
deactivate a task and/or switch to another one.

I thought it was on purpose, even if I didn't agree with that, so I
never tried to discuss this issue here, but now Kevin highlighted that
editors really should be closed when files exit from the context...

Mauro.
Re: Aren't my editors supposed to auto-close? [message #584021 is a reply to message #34418] Wed, 31 October 2007 16:01 Go to previous message
Kevin Bracey is currently offline Kevin BraceyFriend
Messages: 19
Registered: July 2009
Junior Member
Kevin Bracey wrote:
> Eugene Kuleshov wrote:
>> Kevin, there been changes in this functionality in the last release,
>> because some users find interest decay on editor closing is too
>> confusing. You may want to check the preferences at Window /
>> Preferences... / Mylyn / Context / Editors.
>
> As I said in my original post, both options in that group are enabled:
>
> Manage open editors to match task context
> Remove file from context when editor is closed
>
> The latter is happening, the former isn't.
>
> Maybe it's time for me to actually do some debug investigation. I'll
> start digging around in Mylyn today.

Okay, I'm seeing two things here. Firstly, it seems to me that Mylyn
appears pretty reluctant to actually remove documents from interest
automatically, but it will do it. But I suspect this may be partly due
to my artificial testing not matching real usage patterns.

Anyway, the main problem occurs in JavaUiBridge.close(). It loops over
getActivePage().getEditorReferences() trying to locate an editor for the
node being closed.

The stumbling block appears to be that the method it uses,
EditorReference.getEditor(false), only actually returns an editor if the
editor is active. If it's one of the ones buried at the back of the
stack, it returns null.

So the auto-close will only ever work if the document that's become
uninteresting is one of the ones you're working on! Very unlikely,
unless you've manually selected "remove from context".

I'm going to submit a bug report.

Kevin
Re: Aren't my editors supposed to auto-close? [message #584264 is a reply to message #34587] Sat, 03 November 2007 02:19 Go to previous message
Mik Kersten is currently offline Mik KerstenFriend
Messages: 287
Registered: July 2009
Senior Member
Great diagnosis Kevin, this is indeed intended to work as you expect.
There is some trickiness to this policy and when it's OK to auto-close
without incurring performance overhead (e.g. if an editor has not
materialized yet), but thanks to your patch we'll prioritize improving
this for an upcoming weekly build. For others interested the bug is:

208265: [patch] [context] Mylyn is not auto-closing editors
https://bugs.eclipse.org/bugs/show_bug.cgi?id=208265

We also have a related usability issue. Task editors do not auto close
because they do not participate in the task context. While restoring
them takes almost no resources because they don't materialize until
activated, if you browse a bunch of tasks while you have another task
active you'll get this bloat. I've wondered whether we should change
our restore policy to only restore the editor for the task that's being
activated.

Mik

Kevin Bracey wrote:
> Kevin Bracey wrote:
>> Eugene Kuleshov wrote:
>>> Kevin, there been changes in this functionality in the last release,
>>> because some users find interest decay on editor closing is too
>>> confusing. You may want to check the preferences at Window /
>>> Preferences... / Mylyn / Context / Editors.
>>
>> As I said in my original post, both options in that group are enabled:
>>
>> Manage open editors to match task context
>> Remove file from context when editor is closed
>>
>> The latter is happening, the former isn't.
>>
>> Maybe it's time for me to actually do some debug investigation. I'll
>> start digging around in Mylyn today.
>
> Okay, I'm seeing two things here. Firstly, it seems to me that Mylyn
> appears pretty reluctant to actually remove documents from interest
> automatically, but it will do it. But I suspect this may be partly due
> to my artificial testing not matching real usage patterns.
>
> Anyway, the main problem occurs in JavaUiBridge.close(). It loops over
> getActivePage().getEditorReferences() trying to locate an editor for the
> node being closed.
>
> The stumbling block appears to be that the method it uses,
> EditorReference.getEditor(false), only actually returns an editor if the
> editor is active. If it's one of the ones buried at the back of the
> stack, it returns null.
>
> So the auto-close will only ever work if the document that's become
> uninteresting is one of the ones you're working on! Very unlikely,
> unless you've manually selected "remove from context".
>
> I'm going to submit a bug report.
>
> Kevin
Previous Topic:Synchronizing a task in the editor
Next Topic:Change backup location
Goto Forum:
  


Current Time: Wed Apr 24 23:07:47 GMT 2024

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

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

Back to the top