Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Opening an Editor
Opening an Editor [message #59983] Tue, 03 June 2003 04:58 Go to next message
Eclipse UserFriend
Originally posted by: bharatkhatri2000.yahoo.com

I have created a view which displays projects, files and folders and more,
starting at the workspace root. I want to open the default editor for a
file when a filename in the view is selected. I've tried many things from
given examples and jdt style code, but nothing seems to work.

Any help would be great !!!!

Thanks
Re: Opening an Editor [message #60085 is a reply to message #59983] Tue, 03 June 2003 06:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

If you're in a view I assume you know the active workbench page. (If you
don't, you can get it from
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().) Given
that, you can open the default editor for a file by calling:

workbenchPage.openEditor(ifile);

where ifile is an IFile corresponding to the filename.

Bob

"Bharat Khatri" <bharatkhatri2000@yahoo.com> wrote in message
news:bbh9tj$qmk$1@rogue.oti.com...
>
> I have created a view which displays projects, files and folders and more,
> starting at the workspace root. I want to open the default editor for a
> file when a filename in the view is selected. I've tried many things from
> given examples and jdt style code, but nothing seems to work.
>
> Any help would be great !!!!
>
> Thanks
>
Re: Opening an Editor [message #60915 is a reply to message #60085] Tue, 03 June 2003 16:03 Go to previous message
Eclipse UserFriend
Originally posted by: simon.ibm.oti.lab

A view nows it workbench page from its site.

Simon :-)

"Bob Foster" <bob@objfac.com> wrote in message
news:bbhftp$uqe$1@rogue.oti.com...
> If you're in a view I assume you know the active workbench page. (If you
> don't, you can get it from
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().)
Given
> that, you can open the default editor for a file by calling:
>
> workbenchPage.openEditor(ifile);
>
> where ifile is an IFile corresponding to the filename.
>
> Bob
>
> "Bharat Khatri" <bharatkhatri2000@yahoo.com> wrote in message
> news:bbh9tj$qmk$1@rogue.oti.com...
> >
> > I have created a view which displays projects, files and folders and
more,
> > starting at the workspace root. I want to open the default editor for a
> > file when a filename in the view is selected. I've tried many things
from
> > given examples and jdt style code, but nothing seems to work.
> >
> > Any help would be great !!!!
> >
> > Thanks
> >
>
>
Previous Topic:Opening an editor
Next Topic:Adding Feature
Goto Forum:
  


Current Time: Sat Aug 17 22:24:27 GMT 2024

Powered by FUDForum. Page generated in 0.03137 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top