Ethan Reesor
Ethan Reesor

Reputation: 2180

Activating/Creating/Showing a ViewPart from an internal method

Is there an easier way to do this (retaining the ability to use VIEW_VISIBLE, VIEW_ACTIVATE, and VIEW_CREATE)?

public class MyView extends ViewPart {
    ...
    public void myMethod() {
        try {
            getSite().getPage().showView(ID, null, IWorkbenchPage.VIEW_VISIBLE);
        } catch (PartInitException e) {
            e.printStackTrace();
        }
        ...
    }
]

Upvotes: 1

Views: 291

Answers (1)

Ethan Reesor
Ethan Reesor

Reputation: 2180

What Paul said answers my question

Upvotes: 1

Related Questions