Community
Participate
Working Groups
When dragging and dropping a file from the Remote Systems View or Remote System Details View the file is launched in it's System Editor application if the file is not associated with an editor inside eclipse. Double clicking on the file inside RSE though brings it up in the Default Editor. I created a java project and exported the files to the project. Dragging the files from the Package Explorer to the editor would open the files in the Default Editor. -----------Enter bugs above this line----------- TM 2.0M7 Testing installation : eclipse-SDK-3.3M7 RSE install : I20070517-0600 java.runtime : Sun 1.5.0_11-b03 os.name: : Windows XP, Service Pack 2 ------------------------------------------------
I agree that dragging the file to the editor area should always open an editor in Eclipse and never outside Eclipse. Kushal I think you've worked on something like this before, what do you think? Please reassign if you do not have time addressing this for 2.0.
This is sort of fixed with the patch attached to bug 189268 except that drag and drop .html, .htm, .shtml to the editor does nothing now.
So it seems like it tries to launch the System Editor for .html etc but cannot do this because the System Editor supports FileTransfer only which we no longer do. For me, this means that the original bug (opening in the SystemEditor when it should use the Text Editor) is not fixed.
Kevin if I'm not mistaken you've been dealing with Editable support, could you have a look?
The reason this happens for any file associated with the Web Browser is because the IEditorDescriptor for the Web Browser has a property for "launcher". Inside EditorAreaDropAdapter.openNonExternalEditor(IWorkbenchPage, IEditorInput, String) it does this: IEditorDescriptor editorDesc = editorReg.findEditor(editorId); if (editorDesc != null && !editorDesc.isOpenExternal()) { result = page.openEditor(editorInput, editorId); } else { result = null; } editorDesc.isOpenExternal() returns true because a "launcher" property is set for the Web Browser's editor descriptor. If you compare the behavior to the Java Perspective it will work the same way RSE does for all files except those associated with the web browser. Since it uses a different file transfer method it uses a different openNonExternalEditor method. openNonExternalEditor(IWorkbenchPage page, IFile file) In this method if isOpenExternal() is true it follows the else code which will open the file in the default editor.
Created attachment 74837 [details] Added a check if editor would open external and if so used default editor Created a workaround such that if the file would open in an external editor with the preferred editor that we make the preferred editor the default editor. This is needed till bug #197326 is fixed, which is currently assigned 3.4. Legal Message: I, Kevin Doyle, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this contribution under the EPL.
The patch is good for the current workaround of the platform bug #197326. I will commit the patch.
I committed the patch.
Verified fixed with I20070823-0800.