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);