Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Open with system editor
Open with system editor [message #479766] Wed, 12 August 2009 13:14 Go to next message
Jacek Kolodziejczyk is currently offline Jacek Kolodziejczyk
Messages: 37
Registered: July 2009
Member
Hello,

Could please advice how to open a file in the system editor from pure
SWT application - the same way it is done in the platform "open With" ->
"System Editor" command? A code snippet would be great.

Thanks
Jacek
Re: Open with system editor [message #479777 is a reply to message #479766] Wed, 12 August 2009 13:42 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

See org.eclipse.swt.program.Program ... it has methods to find a system program for a filename, and execute it (and shortcuts to simply launch the file).

PW


Re: Open with system editor [message #479778 is a reply to message #479766] Wed, 12 August 2009 13:31 Go to previous messageGo to next message
Fred is currently offline Fred
Messages: 11
Registered: July 2009
Junior Member
Jacek Kolodziejczyk a écrit :
> Hello,
>
> Could please advice how to open a file in the system editor from pure
> SWT application - the same way it is done in the platform "open With" ->
> "System Editor" command? A code snippet would be great.
>
> Thanks
> Jacek

Program.launch( "/path/of/the/file/to/open" );

may do what you want?
Re: Open with system editor [message #479788 is a reply to message #479778] Wed, 12 August 2009 14:09 Go to previous message
Jacek Kolodziejczyk is currently offline Jacek Kolodziejczyk
Messages: 37
Registered: July 2009
Member
Thanks a lot - that was it!

Fred wrote:
> Jacek Kolodziejczyk a écrit :
>> Hello,
>>
>> Could please advice how to open a file in the system editor from pure
>> SWT application - the same way it is done in the platform "open With"
>> -> "System Editor" command? A code snippet would be great.
>>
>> Thanks
>> Jacek
>
> Program.launch( "/path/of/the/file/to/open" );
>
> may do what you want?
Previous Topic:Highlight code in CompareEditor
Next Topic:How to trigger upstream builders when downstream projects change
Goto Forum:
  


Current Time: Sat Oct 25 20:53:51 GMT 2014

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

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