Bug 191828 - [IDE] IDE should allow extensions to override the creation of editor input for a file store
Summary: [IDE] IDE should allow extensions to override the creation of editor input fo...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2007-06-09 17:24 EDT by Erkki Lindpere CLA
Modified: 2019-09-06 16:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erkki Lindpere CLA 2007-06-09 17:24:58 EDT
I am creating an Eclipse based product that is actually smaller than Eclipse SDK itself -- it consists of RCP + Text Editor + other plug-ins. I am also using the org.eclipse.ui.ide bundle because otherwise I would have to duplicate a lot of the functionality.
But I need some customized behavior whenever a workspace external file is opened (= IDE.openEditorOnFileStore() is called). Actually, I only would need to execute these lines in the middle of the IDE.getEditorInput(IFileStore) method:
...
if (workspaceFile == null) {
	workspaceFile = WorkspaceFileLinker.getDefault().linkFile(fileStore);
}
...
What this does is create a new link for any file that is not already linked to the workspace, so that any files opened can enjoy all the workspace dependent facilities such as local history.

Maybe this would be called "File Store Opening Strategy" or something like that. Could something like this be created for extenders to (ab)use?

If not, then can you recommend a best practice for replacing that part of the IDE? I can't do it in a fragment, can I? Maybe AspectJ is a solution?
Comment 1 Erkki Lindpere CLA 2007-06-22 15:38:28 EDT
I'm willing to help, but I'm not sure how to solve this. An extension point would probably be too much for this single feature? You probably don't want to litter the platform with extension points for small things like this?

But I'm not aware of any other nice ways extensions/replacing functionality could be made.

What about an extension point that allows several IDE behaviors to be replaced? For example an extension point called "IDE Adapter" that would come with one interface / abstract class that has API to do this.
Comment 2 Tod Creasey CLA 2007-06-25 08:19:29 EDT
Could you not just do this with a command? If we moved the action you are concerned about to a command you could just bind it to a different handler.

I don't think we want to add new mechanisms if we could avoid it.
Comment 3 Susan McCourt CLA 2009-07-15 12:07:37 EDT
"As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009"
Comment 4 Eclipse Webmaster CLA 2019-09-06 16:10:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.