Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 170643

Summary: problems with tracking interest when using MyEclipse HTML editor
Product: z_Archived Reporter: Brett Connor <brettconnor+b>
Component: MylynAssignee: Mik Kersten <mik.kersten>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P4 CC: mik.kersten
Version: 0.6Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Brett Connor CLA 2007-01-16 11:03:38 EST
I want to have more control over which resources stay associated with a task.
Currently some file types (.html for example) are disassociated the moment the editor is closed, or the task is deactivated. I can't find any preference to control this.

I try to use mylar to maintain working file sets for features and bug fixes for example, and want to refer back to them weeks or months later and have the same file set presented to me. Currently I can't find a way to work like that.
Comment 1 Eugene Kuleshov CLA 2007-01-16 12:10:10 EST
Reducing interest on editor closing is intentional (you closed it , means you are not interested in this resource anymore).

But, losing interest on task deactivation sounds like a bug. Does that happens every time you deactivated task? What editor you are using to edit these .html files, myeclipse, wtp, or something else?
Comment 2 Brett Connor CLA 2007-01-17 09:10:39 EST
I may just be confused then;
I have just re-opened a task I haven't touched for a couple of weeks. It has opened 6 editors - presumably the 6 I had open when I last used this task.

There are a number of files (.java files) shown in the filtered package view but not open in editors, I assume therefore of interest to this task. This is great - just what I want. But does seem to contradict your intended behaviour description above.

I sometimes close editors if I have so many open that I can't read any names in the tabs - just tidying up to be easier if I know I won't be using that file for a while, but I don't want to disassociate it from the task.

.java files seem to work this way, .html don't. Are you saying that if I want .html (and probably others) to stay 'interesting' I cannot close these editors?
Comment 3 Eugene Kuleshov CLA 2007-01-17 12:42:50 EST
There is an option in Mylar / Context preferences (on by default) that allows to turn off automatic editor management. I wouldn't recommend it, but rather try to avoid close editors just to remove the editor tab. Mylar will close editors for you based on usage pattern and in this case resources won't loose interest. It may take a little time to get used to this, but then it is quite natural.

Also, there is a more detailed model for .java resources while .html (btw, you haven't specified what editor you are using) treated just as a plain resources. As a result, .html may loose interest faster (again, based on your usage/access pattern). Mik cat tell you more details about this.
Comment 4 Mik Kersten CLA 2007-01-21 22:48:11 EST
Brett: Eugene covered the details very well here, and the corresponding FAQ item is here: http://wiki.eclipse.org/index.php/Mylar_FAQ#Why_do_files_disappear_from_Focused_views_when_I_close_them.3F

That said, like Eugene I'm wondering what HTML editor you are using, and if there is some kind of odd interaction, or if the automatic background closing of editors as their interest decays is not working for that editor.
Comment 5 Brett Connor CLA 2007-01-25 10:57:41 EST
The bit of information I should have said, I'm using the HTML editor in MyEclipse 5.0M2.

I'm having trouble seeing a consistent behaviour; starting eclipse with a task active (need to open and close the task window before the tooltip shows it), I have a few 'interesting' files in the package explorer, and a few open editors. At least once it has had one of the .html files the the package view. Perhaps they are decaying in interest just very quickly. I have just now seen an editor view with a .java file that was not present in the package explorer, but appeared there when I switched into that editor. Is this also some intentional interest decay?

I think my problems would be solved if I could disable the interest decay - I'm more than happy to explicitly say which files I'm interested in and remove those that I decide are not part of this task. Can this be done? I haven't found it in the preferences.
Comment 6 Mik Kersten CLA 2007-01-25 15:20:35 EST
No, decay can not currently be turned off or manually configured.  The way to work-around this is to explicitly mark a file or element as a landmark by right-clicking it and pressing "Mark as Landmark".  

That said there still seems to be something weird going on with your HTML files.  If you have more hints about what this could be please post.
Comment 7 Brett Connor CLA 2007-02-01 11:45:31 EST
I can't say what is specifically different about MyEclipse HTML editor.
However I'm noticing that my .java files are also not 'interesting' when I close a task and open it later in the day.

I have a task that had about 28 classes open (bigger than I usually use in a single task). These were all open in editors, and all visible in the package view. When I re-open the task a few hours later (I've closed Eclipse in the mean time) there are 5 editors open, about 11 classes and a couple of other files (.hbm.xml, .html) files left.

I hadn't explicitly marked any as "landmark", I'll try to get into the habbit of that at least for .java. Would really like to see the decay user switchable though.
Comment 8 Mik Kersten CLA 2007-02-27 12:43:11 EST
Fyi, I can't investigate further until after EclipseCon.  I'll try to get the MyEclipse guys involved in this.
Comment 9 Mik Kersten CLA 2007-04-09 15:19:45 EDT
We do not currently have resource to test against tools outside of the Eclipse SDK such as MyEclipse, so marking helpwanted.  In general if these tools follow the Eclipse API conventions the task context model and Focused UI mechanisms should work as expected.
Comment 10 Mik Kersten CLA 2009-07-24 15:45:37 EDT
If this is still a problem please report to Genuitec, and consider commenting here in case there is something we can do to help.