我想知道如何在纯RCP 4应用程序中打开带有输入(或从视图中传递数据的替代方案)的e4编辑器。
如果有帮助的话,下面是一个包含所有需要的东西的应用程序(除了实际的编辑器) https://www.dropbox.com/s/zamn1t2kqr0525c/com.test.pureE4.zip?dl=0
提前谢谢你!
发布于 2014-11-13 15:17:08
您可以在零件的瞬态数据中为该部件设置数据。
类似于:
@Inject
EPartService partService;
// Create the part
MPart part = partService.createPart("editor id");
// Set the input
part.getTransientData().put("input key", inputData);
// Add to editor part stack
MPartStack editorStack = ... find your part stack for the editor
editorStack.getChildren().add(part);
// Show
partService.showPart(part, PartState.ACTIVATE);在您的编辑器代码中:
@Inject
MPart part;
inputData = part.getTransientData().get("input key");https://stackoverflow.com/questions/26912078
复制相似问题