Community
Participate
Working Groups
The Official Eclipse FAQ on the Eclipsepedia Wiki has some out of date items. In particular, several of the "Generic Editor" and "Workbench IDE" FAQ answers are now erroneous as they refer to classes that no longer exist in 3.3 API. I am trying to learn how to programmatically open a generic text editor from a file, and these answers would help me a lot if they were updated to Eclipse 3.3. API. Here are the titles of items I have found to refer to no longer correct API: # FAQ How do I open an editor programmatically? # FAQ How do I open an external editor? # FAQ How do I open an editor on a file in the workspace? # FAQ How do I open an editor on a file outside the workspace?
I agree that it's outdate. >refer to classes that no longer exist in 3.3 API Which ones?
Well, upon further reading it appears that the classes I thought were no longer around actually are but they are more difficult to find than most. Classes like FileEditorInput, IFileEditorInput, IStorageEditorInput, etc., that are used in some of these examples are in the org.eclipse.ui.ide plugin, which seems to be discouraged for use in RCP applications. Further, when I invoke the Open Type action (in Eclipse 3.3) and search for FileEditorInput, IFileEditorInput, and IStorageEditorInput, I don't get them in the search results, which is what first led me to believe that they no longer existed. Also, I see at least one reference to a method WorkbenchPage.openEditor(EditorInput input). I don't think that method exists anymore in the API...not without the second argument (String editorId), anyway. There is a pretty good text editor example here: http://www.eclipse.org/eclipse/platform-text/development/rcp/examples/texteditor/rcp_texteditor_ex.html Perhaps reconciling the information from this example with the FAQ answer example would be a good direction to go?
>are in the org.eclipse.ui.ide plugin, which >seems to be discouraged for use in RCP applications. This is no longer true as of 3.3 as the problematic portion has been extracted into its own plug-in. >WorkbenchPage.openEditor(EditorInput input). I don't think that method exists >anymore in the API WorkbenchPage is an internal class - it can changed with each build. Just to clarify: I also think the doc needs an update. With 3.3 there are now also APIs to open external files.
>There is a pretty good text editor example here: >http://www.eclipse.org/eclipse/platform-text/development/rcp/examples/texteditor/rcp_texteditor_ex.html This one is even better: http://www.eclipse.org/eclipse/platform-text/development/rcp/examples/index.html I've updated the Wiki a little bit.
Removing the assignment -- wiki is a community thing.
It's been almost a year with no updates, is this bug still required or can we close it? -M.
Since no one seems to want this bug and the wiki can be updated by any committer closing as wontfix. If someone wants to fix it they can reopen this bug. -M.