Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Help required with IMarker Line numbers
Help required with IMarker Line numbers [message #604876] Wed, 03 March 2010 19:51 Go to next message
Eclipse UserFriend
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 05:53 Go to previous message
Eclipse UserFriend
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: Mon Jun 30 18:42:04 EDT 2025

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

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

Back to the top