Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Editing of external files

Ed,

In addition to sorting out the cross-component issues, we plan on 
investigating a mechanism to "open this string/IPath/File wherever it 
lives using the right editor" post M5.  I agree that much of what is in 
IDE.openEditor and OpenExternalFile could be generalized, but we're not 
there yet.

For IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID (which is currently 
internal), we are considering allowing the workbench adviser to specify 
which editor it considers as the default.
So the generic workbench would have the notion of a default editor, but 
would obtain the id for the default editor from the adviser.

Regards,
Nick





Kai-Uwe Maetzel <maetzel@xxxxxxx> 
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
11/14/2003 06:19 PM
Please respond to
platform-ui-dev


To
platform-ui-dev@xxxxxxxxxxx
cc

Subject
Re: [platform-ui-dev] Editing of external files






Ed,

The RCP work did not yet cover cross component consolidation.  So far, 
opening external files is provided by the text component. For files that 
are not resources in the workspace, i.e. java.io.File, the 
OpenExternalFileAction constructs a JavaFileEditorInput. ILocationProvider 
is used to transparently get the location from an editor input in order to 
acquire a file buffer from the file buffer manager. There wasn't the 
concept of IPathEditorInput at that point in time.  As now both exist we 
might get rid of one of them and provide answers to your questions when 
consolidating these cross component issues.

Sorry, no better answer yet. Kai


At 05:18 PM 11/14/2003 -0500, you wrote:
I have some questions about the new RCP code having to do with editing 
files not in the workspace (using I20031111):

- What's the relationship between ILocationProvider and IPathEditorInput? 
Are both needed?

- OpenExternalFileAction uses JavaFileEditorInput (which seems misnamed) 
which in turn implements ILocationProvider and IEditorInput. Will 
JavaFileEditorInput or something like it be made public, as a non-IDE 
counterpart to FileEditorInput? Or is everybody expected to roll their 
own?

- IDE.openEditor() has a long list of rules for picking the right editor, 
many of which are not IDE specific. Can that logic be moved somewhere else 
so it can be shared? Perhaps in the editor registry, or 
IWorkbenchPage.openEditor(). 

- IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID doesn't seem like it belongs 
in IDEWorkbenchPlugin since non-IDE apps can have default text editors 
too. If it moved, that would allow more common editor picking logic.

- I have a couple of plugins that want to open a file at a given line 
number. The file may or may not be in the workspace so I find myself 
duplicating most of the code in OpenExternalFileAction. It would be nice 
if there were an IDE routine that said "open this string/IPath/File 
wherever it lives using the right editor" and all that logic could be 
shared.

Thanks,
--Ed
_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev 



Back to the top