Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Help required with IMarker Line numbers
Help required with IMarker Line numbers [message #604876] Thu, 04 March 2010 00:51 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: March 2010
Junior Member
Hello friends,

I am creating custom markers in the editor from an eclipse plug-in. I am currently creating the markers using file.createMarker(MARKER_TYPE) and setting other attributes like line number, severity and message.

Once the user does some edits in the editor (For example, pressing enter in the lines before the marker is present), the custom marker line number changes.

Is there a way I can track those changes? I thought I can use MarkerUtilities.getLineNumber(marker) but once the execution is reaching this line, it is jumping out of the method without printing out any error. The same happened with any other methods of MarkerUtilities.

Please suggest on this.

Thanks.
Re: Help required with IMarker Line numbers [message #604907 is a reply to message #604876] Sat, 06 March 2010 10:53 Go to previous message
Ankur Sharma is currently offline Ankur SharmaFriend
Messages: 68
Registered: July 2009
Member
On 3/4/2010 6:21 AM, bhagvanram@gmail.com wrote:
> Hello friends,
>
> I am creating custom markers in the editor from an eclipse plug-in. I am
> currently creating the markers using file.createMarker(MARKER_TYPE) and
> setting other attributes like line number, severity and message.
>
> Once the user does some edits in the editor (For example, pressing enter
> in the lines before the marker is present), the custom marker line
> number changes.
>
> Is there a way I can track those changes? I thought I can use
> MarkerUtilities.getLineNumber(marker) but once the execution is reaching
> this line, it is jumping out of the method without printing out any
> error. The same happened with any other methods of MarkerUtilities.
>
> Please suggest on this.
>
> Thanks.

A better way would be to handle this using IModelChangedListener. If you notice the problem markers,
their line numbers too are updated on Save.

hth,
--
Ankur..
Eclipse PDE UI Committer | IBM India Software Lab, Bangalore
+91-99456-94011 | @ankur_sharma | http://blog.ankursharma.org
Previous Topic:Help required with IMarker Line numbers
Next Topic:properties view
Goto Forum:
  


Current Time: Fri Apr 19 06:07:51 GMT 2024

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

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

Back to the top