Bug 194124 - make sure editor management plays nicely with "editor pin" tweaklet
Summary: make sure editor management plays nicely with "editor pin" tweaklet
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks: 200998
  Show dependency tree
 
Reported: 2007-06-23 23:24 EDT by Eugene Kuleshov CLA
Modified: 2009-08-19 16:13 EDT (History)
3 users (show)

See Also:


Attachments
mylyn/context/zip (905 bytes, application/octet-stream)
2007-06-24 19:28 EDT, Mik Kersten CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Mik Kersten CLA 2007-06-24 19:28:40 EDT
This should be done by implementing or bridging to the IContextAwareEditor.canClose() method.
Comment 2 Mik Kersten CLA 2007-06-24 19:28:44 EDT
Created attachment 72310 [details]
mylyn/context/zip
Comment 3 Eugene Kuleshov CLA 2007-06-24 20:01:51 EDT
I was actually wondering how editors closed by "editor pin" feature would affect task context capturing...
Comment 4 Eugene Kuleshov CLA 2007-06-27 11:29:13 EDT
It seems like we need to disable "autopin" feature upon task activation and restore it status back after task is deactivated.

Boris, is there are an API or some settings that we could use to disable autopin?
Comment 5 Boris Bokowski CLA 2007-06-27 13:01:50 EDT
(In reply to comment #4)
> Boris, is there are an API or some settings that we could use to disable
> autopin?

I don't think so.  Would you want to disable the complete tweaklet, or just the fact that it automatically pins (prevents from reusing) an editor that has been edited?

The auto-pin tweaklet is very similar to the behaviour you get when you go to the editors preference page and enable editor reuse with a threshhold of one editor, except that you will have to pin the editor explicitly using the toolbar button with the green "pin".  Have you tested Mylyn with these (regular) settings as well?

The auto-pin source code is in CVS at:
/cvsroot/eclipse/platform-incubator/ui/tweaklets/
Comment 6 Eugene Kuleshov CLA 2007-06-27 13:11:37 EDT
(In reply to comment #5)
> I don't think so.  Would you want to disable the complete tweaklet, or 
> just the fact that it automatically pins (prevents from reusing) an editor
> that has been edited?

I think there should be some way to disable any changes in behavior this tweaklet does. Even just from the general end user experience it would be useful to see what changes when you turn this thing on and off using some preferences in regular Preferences UI. Now you have to uninstall it which is much more troublesome and confusing.

> The auto-pin tweaklet is very similar to the behaviour you get when you go to
> the editors preference page and enable editor reuse with a threshhold of one
> editor, except that you will have to pin the editor explicitly using the
> toolbar button with the green "pin".  Have you tested Mylyn with these
> (regular) settings as well?

The thing is that Mylyn disables editor management (just changing platform settings) and it has its own (more sophisticated) facility to track and close editors. I'll try to spend some more time with this later, but it doesn't seem like they work well together.
Comment 7 Mik Kersten CLA 2007-08-24 12:22:35 EDT
Does someone have a proposal for how to address this on the Mylyn side?  I haven't seen the point of using the tweaklet with Mylyn since I rely entirely on Mylyn's editor management.  But if others are using Mylyn with the tweaklet, and think that there is a complementary overlap, please post.  
Comment 8 Nick Boldt CLA 2008-03-21 16:45:10 EDT
(In reply to comment #7)
> Does someone have a proposal for how to address this on the Mylyn side?  I
> haven't seen the point of using the tweaklet with Mylyn since I rely entirely
> on Mylyn's editor management.  But if others are using Mylyn with the tweaklet,
> and think that there is a complementary overlap, please post.  

I've used the autopin tweaklet + working sets + mylyn, and the combination is rather unbearable. The workaround I've been using is to disable mylyn's filtering of the Pack Expl view, and to simply close all / scroll a lot. It's bearable, but not entirely happy.

For the next while I'm going to turn off the tweaklet and just use Mylyn, in an attempt to retrain my brain to that better workflow. 

However, if you really wanted to integrate the two, here's a sample workflow with resulting events that might work:

0. open file A [mylyn marks it important] [not pinned]
1. open file B [mylyn: important] [tab reused] [A does not get marked LESS important even though its editor is now effectively closed]
2. edit file B [mylyn: more important] [tab is now pinned]
3. open file C [important] [second tab added, but unpinned]
4. disable task [all tabs closed]
5. re-enable task [files B and C are opened; C is not pinned; B is pinned; A is still important, but not opened]

I suppose this would mean splitting [context: all files] from [working files: files to be opened], so that you can have things that are important (in context) but which won't automatically open when the task is turned on.

The great thing with this is that it would allow relevant-but-closed files (eg., php includes, css, images, .dotfiles) to be easily added to a context without ending up with umpteen open tabs. It would also mean that the effect of closing a tab (and thus its file) would NOT mean marking a file "less important."

Comment 9 Mik Kersten CLA 2008-04-08 19:27:37 EDT
What are the use cases for the editor pin tweaklet with Mylyn?  I haven't tried it myself because I'm accustomed to relying on Mylyn for keeping the right files open, but I could be missing something.  Either way we should either address the overlap or get Nick's instructutions into the FAQ.
Comment 10 Nick Boldt CLA 2008-04-09 00:20:02 EDT
After 3 weeks of Tweaklet-free full-bore Mylyn, I see no need for the tweaklet anymore. 

Eugene, Boris: have you tried using Mylyn at full strength, minus the tweaklet?
Comment 11 Boris Bokowski CLA 2008-04-09 11:58:11 EDT
I have tried using full-strength Mylyn (without the tweaklet) but got too confused by all the automatic filtering and hiding.
Comment 12 Mik Kersten CLA 2008-04-10 20:53:21 EDT
Boris: we would love to convert you if at all possible ;)  The automatic filtering and hiding will be more obvious in Mylyn 3.0, where we're planning on replacing the need to Alt+click with a custom affordance.  It would be great if you could try Mylyn again at that time.  For now, if you're interested, note that you can selectively turn off any Mylyn feature: http://wiki.eclipse.org/index.php/Mylyn_FAQ#Which_Focused_UI_features_can_I_turn_off.3F  
Comment 13 Nick Boldt CLA 2008-04-10 21:50:27 EDT
(In reply to comment #12)
> replacing the need to Alt+click with a custom affordance.  It would be great if

ALT-click (to show unfiltered children of a folder) doesn't work in my particular flavour of Linux (I run KDE)... but ALT-right-arrow, SHIFT-right-arrow, and CTRL-right-arrow all do. Just FYI. 

Even though that's a crazy-useful shortcut, I still tend to have to toggle Focus on Active Task a lot when I'm first setting up a task. I wish when I started a new task that instead of having an empty Package Explorer, Mylyn would default to NOT filtering until I had at least N files selected, where N is a parameter I could set, depending on the type of work item I'm doing. A nice default might be 1, 3, or 5 entities, be they files, methods, classes, or other nodes.

Or, maybe show me all my Working Sets, and let me browse them w/ ALT-arrow? 
Comment 14 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn