Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » How To Programmatically Open An External File With Specified Editor
How To Programmatically Open An External File With Specified Editor [message #479791] Wed, 12 August 2009 14:22 Go to next message
Eclipse UserFriend
Originally posted by: runzhou.li.gmail.com

Hi,

Can anybody tell me the best way to open an external file with specified
editor. In addition it would nice to hide the url as well.

The scenario is that it's an html file locates within the plugin, and I am
able to get the absolute path of that file in file system format as a
string. What I want to achieve is to open it in run-time workspace with a
web browser editor or some sort.

I tried to use IFile.createLink() and then IDE.openEditor() with specified
editor id, but it's obviously not the most efficient way and it's project
based so there is always an ugly link appears in each and every project
which is what I don't want.

Maybe I did something wrong, or else please suggest a better way.

Thanks :)

--
Runzhou Li
Re: How To Programmatically Open An External File With Specified Editor [message #479870 is a reply to message #479791] Wed, 12 August 2009 20:07 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 961
Registered: July 2009
Senior Member
You are not really on the right forum for this question. It would have been more appropriate for the platform forum. In any case, you are very close. Take a look at other variants of the IDE.openEditor() methods. There is one that takes a URI and can be used for opening external files. There is no need to create links.

- Konstantin
Re: How To Programmatically Open An External File With Specified Editor [message #479874 is a reply to message #479870] Wed, 12 August 2009 20:24 Go to previous message
Eclipse UserFriend
Originally posted by: runzhou.li.gmail.com

Thank you so much Konstantin, once again ;p

And sorry for posting this in the wrong forum.

Thanks again, it works great :)

"Konstantin Komissarchik" <konstantin.komissarchik@oracle.com> 写入消息
news:h5v7em$c13$1@build.eclipse.org...
> You are not really on the right forum for this question. It would have
> been more appropriate for the platform forum. In any case, you are very
> close. Take a look at other variants of the IDE.openEditor() methods.
> There is one that takes a URI and can be used for opening external files.
> There is no need to create links.
>
> - Konstantin
Previous Topic:SOAP Request Look
Next Topic:How to specify namespace in xpath view
Goto Forum:
  


Current Time: Thu Dec 18 12:41:05 GMT 2014

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

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