Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Openning source file in editor programmatically
Openning source file in editor programmatically [message #157272] Sat, 17 June 2006 19:08 Go to next message
Eclipse UserFriend
Originally posted by: sbederml.gmail.com

Hi,

I have a source file. How can I open it in the java editor *on a
specific line*. The problem is that JavaUI.openInEditor() method does
not give me the option to set the wanted line.

Thank you in advance,
Michael
Re: Openning source file in editor programmatically [message #157341 is a reply to message #157272] Mon, 19 June 2006 10:12 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Michael Beder wrote:

> Hi,
>
> I have a source file. How can I open it in the java editor *on a
> specific line*. The problem is that JavaUI.openInEditor() method does
> not give me the option to set the wanted line.

You first open the editor and then check whether the editor you get is
an ITextEditor. If so, you an use its API to compute the offset and
length of your line and then select and reveal it. Look at
GotoLineAction if you don't know how to code it.

Dani

>
> Thank you in advance,
> Michael
Previous Topic:eclipse freezing
Next Topic:PHP IDE Feature Update Error
Goto Forum:
  


Current Time: Thu Dec 26 16:15:59 GMT 2024

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

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

Back to the top