0
如何在用戶切換到其視角時使eclipse插件在主視圖(類似hello.txt文件)中打開新生成的文檔?簡單的Eclipse插件打開新文檔
如何在用戶切換到其視角時使eclipse插件在主視圖(類似hello.txt文件)中打開新生成的文檔?簡單的Eclipse插件打開新文檔
像這樣的事情會是這個任務的典型代碼:
String fileContents = ...;
IFile file = ...;
file.create(new ByteArrayInputStream(fileContents.getBytes()), true, null);
FileEditorInput input = new FileEditorInput(file);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().
getActivePage().openEditor(input, THE_EDITOR_ID);