[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: [Howto] [jface] open an editor from within a Wizard?

oops, sorry, just saw VI's msg; will repost overthere

"Paul T. Keyser" wrote:

> R2.0.2, Win2K
>
> One can open an editor with the following code, where _site is an
> IWorkbenchPartSite (ViewSite or EditorSite) and _ifile is a valid IFile
> known to Eclipse.
>
>         final IWorkbenchPage page =
> _site.getWorkbenchWindow().getActivePage();
>         try {
>             if (page != null) {
>                 page.openEditor(_ifile);
>             }
>
>         } catch (PartInitException e) {
>             e.printStackTrace();
>         }
>
> Since Wizards have no (access to any) IWorkbenchPartSite, is it possible
> as one of the effects of a Wizard to open an editor?  If not, what is
> the theoretical reason, if any, for not allowing that?
>
> thanks,
> Paul K