mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-01 12:43:26 +02:00
[164292] Selection of a specific editor for a file does not persist
This commit is contained in:
parent
f34c344f00
commit
c0895a4799
1 changed files with 9 additions and 1 deletions
|
@ -1526,6 +1526,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
// DY - changed editor from SystemTextEditor to IEditorPart
|
// DY - changed editor from SystemTextEditor to IEditorPart
|
||||||
//editor = (SystemTextEditor)activePage.openEditor(file, _editorId);
|
//editor = (SystemTextEditor)activePage.openEditor(file, _editorId);
|
||||||
editor = activePage.openEditor(finput, _editorId);
|
editor = activePage.openEditor(finput, _editorId);
|
||||||
|
|
||||||
|
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||||
|
properties.setRemoteFileObject(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1539,10 +1542,15 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
activePage = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
|
activePage = SystemBasePlugin.getActiveWorkbenchWindow().getActivePage();
|
||||||
}
|
}
|
||||||
IFile file = getLocalResource();
|
IFile file = getLocalResource();
|
||||||
|
|
||||||
|
// set editor as preferred editor for this file
|
||||||
|
IDE.setDefaultEditor(file, _editorId);
|
||||||
|
|
||||||
FileEditorInput fileInput = new FileEditorInput(file);
|
FileEditorInput fileInput = new FileEditorInput(file);
|
||||||
activePage.openEditor(fileInput, IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
|
activePage.openEditor(fileInput, IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
|
||||||
|
|
||||||
|
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||||
|
properties.setRemoteFileObject(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue