开发者

Is it possible to add a page to Multipage Editor from outside the FormEditor?

I have a multipage editor to which I want to add a page if the user double cliks on a box in another page of the开发者_如何学Python multipage editor (which is a graphical editor). Is this possible? without multipage editor, I can do that using the following code:

public void performRequest(Request req) {
    if(req.getType() == RequestConstants.REQ_OPEN) {
        try {
            MyInput input = new MyInput("");
            IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
            page.openEditor(input, MyEditor.ID);
            }
            catch (PartInitException e) {
                    e.printStackTrace();
            }
        }
    }

I would really appreciate any help, thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜