[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: How to define a "finalPerspective" for a Plugin Manifest File


OK..

I found a solution..

there is a Method to be called in the Wizard-Class.
Check package "org.eclipse.pde.internal.ui.wizards.plugin" --> NewPluginProjectWizard

<code>
private void openFeatureManifest(IFile manifestFile) {
        IWorkbenchPage page = PDEPlugin.getActivePage();
        //        Reveal the file first
        final ISelection selection = new StructuredSelection(manifestFile);
        final IWorkbenchPart activePart = page.getActivePart();

        if (activePart instanceof ISetSelectionTarget) {
                getShell().getDisplay().asyncExec(new Runnable() {
                        public void run() {
                                ((ISetSelectionTarget) activePart).selectReveal(selection);
                        }
                });
        }
        //         Open the editor

        FileEditorInput input = new FileEditorInput(manifestFile);
        String id = PDEPlugin.MANIFEST_EDITOR_ID;
        try {
                page.openEditor(input, id);
        } catch (PartInitException e) {
                PDEPlugin.logException(e);
        }
}
</code>

But there is still the question, if it is possible to open the extension Page on demand. ?

Greetz

manuel