开发者

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

开发者 https://www.devze.com 2023-04-07 21:39 出处:网络
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?

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

精彩评论

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