mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
[363490] PHP files opening in system editor (Dreamweaver)
This commit is contained in:
parent
eaa9240362
commit
6915a43ab1
1 changed files with 16 additions and 7 deletions
|
@ -75,6 +75,7 @@
|
|||
* David McKnight (IBM) - [215814] [performance] Duplicate Queries between Table and Remote Systems View
|
||||
* David McKnight (IBM) - [249031] Last used editor should be set to SystemEditableRemoteFile
|
||||
* David McKnight (IBM) - [341244] folder selection input to unlocked Remote Systems Details view sometimes fails
|
||||
* David McKnight (IBM) - [363490] PHP files opening in system editor (Dreamweaver)
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.files.ui.view;
|
||||
|
@ -3425,14 +3426,22 @@ public class SystemViewRemoteFileAdapter
|
|||
if (editable instanceof SystemEditableRemoteFile){
|
||||
SystemEditableRemoteFile edit = (SystemEditableRemoteFile)editable;
|
||||
IEditorDescriptor oldDescriptor = edit.getEditorDescriptor();
|
||||
IEditorDescriptor curDescriptor;
|
||||
try {
|
||||
curDescriptor = IDE.getEditorDescriptor(editable.getLocalResource());
|
||||
if (oldDescriptor != curDescriptor){
|
||||
edit.setEditorDescriptor(curDescriptor);
|
||||
IEditorDescriptor curDescriptor = null;
|
||||
IFile file = editable.getLocalResource();
|
||||
|
||||
if (file == null || !file.exists()){
|
||||
curDescriptor = registry.getDefaultEditor(remoteFile.getName());
|
||||
}
|
||||
if (curDescriptor == null){
|
||||
try {
|
||||
curDescriptor = IDE.getEditorDescriptor(file);
|
||||
} catch (PartInitException e) {
|
||||
curDescriptor = IDE.getDefaultEditor(file);
|
||||
}
|
||||
} catch (PartInitException e) {
|
||||
}
|
||||
}
|
||||
if (oldDescriptor != curDescriptor){
|
||||
edit.setEditorDescriptor(curDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
|
|
Loading…
Add table
Reference in a new issue