1
0
Fork 0
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:
Kushal Munir 2006-12-11 22:17:08 +00:00
parent f34c344f00
commit c0895a4799

View file

@ -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);
} }
/** /**