Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » JavaEditor how to implement the Marker
JavaEditor how to implement the Marker [message #277667] Tue, 14 December 2004 20:37 Go to next message
Eclipse UserFriend
hi all,

i have a simply question, JavaEditor how to implement the Marker(shown on
problem view's marker).

anyone can tell me where can i find the code?

Thx.
Re: JavaEditor how to implement the Marker [message #277673 is a reply to message #277667] Wed, 15 December 2004 03:40 Go to previous messageGo to next message
Eclipse UserFriend
wei zhang schrieb:
> anyone can tell me where can i find the code?

IResource#createMarker?!?

You should look into the Eclipse Platform Plug-In Developer Guide ->
Programmer's Guide -> Resources overview -> Resource markers

Cu, Gunnar
Re: JavaEditor how to implement the Marker [message #277676 is a reply to message #277673] Wed, 15 December 2004 04:35 Go to previous messageGo to next message
Eclipse UserFriend
I mean in java editor, where is the code, to call the
IResource#createMarker() method.

because i can use IResource#createMarker() to make markers, it cannot auto
show marker beside the editor.

so i need to know how to make it visible.

Gunnar Wagenknecht wrote:

> wei zhang schrieb:
>> anyone can tell me where can i find the code?

> IResource#createMarker?!?

> You should look into the Eclipse Platform Plug-In Developer Guide ->
> Programmer's Guide -> Resources overview -> Resource markers

> Cu, Gunnar
Re: JavaEditor how to implement the Marker [message #277684 is a reply to message #277676] Wed, 15 December 2004 08:25 Go to previous messageGo to next message
Eclipse UserFriend
wei zhang wrote:

> I mean in java editor, where is the code, to call the
> IResource#createMarker() method.
>
> because i can use IResource#createMarker() to make markers, it cannot
> auto show marker beside the editor.
>
> so i need to know how to make it visible.

Try to add/modify markers using IWorkspaceRunnable. The code
will look like the following:

// start operation
UpdateProblemsRunnable runnable =
new UpdateProblemsRunnable(resources, errors, ...);
try {
getProject().getWorkspace().run(runnable, monitor);
} catch (CoreException e) {
...
}

where

public class UpdateProblemsRunnable implements IWorkspaceRunnable {
...
public void run(IProgressMonitor pm) throws CoreException {
// add/modify markers
}
...
}

/Sergey
Re: JavaEditor how to implement the Marker [message #278434 is a reply to message #277684] Sun, 02 January 2005 11:11 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Sergey Bushkov wrote:

> wei zhang wrote:
>
>> I mean in java editor, where is the code, to call the
>> IResource#createMarker() method.
>>
>> because i can use IResource#createMarker() to make markers, it cannot
>> auto show marker beside the editor.
>>
>> so i need to know how to make it visible.
>
>
> Try to add/modify markers using IWorkspaceRunnable.

Or use MarkerUtilities.MarkerUtilities.createMarker(...)

Dani

> The code will look like the following:
>
> // start operation
> UpdateProblemsRunnable runnable =
> new UpdateProblemsRunnable(resources, errors, ...);
> try {
> getProject().getWorkspace().run(runnable, monitor);
> } catch (CoreException e) {
> ...
> }
>
> where
>
> public class UpdateProblemsRunnable implements IWorkspaceRunnable {
> ...
> public void run(IProgressMonitor pm) throws CoreException {
> // add/modify markers
> }
> ...
> }
>
> /Sergey
Previous Topic:get project src programatically??
Next Topic:JavaEditor from CVS doesn't work ...
Goto Forum:
  


Current Time: Thu May 01 13:36:54 EDT 2025

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

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

Back to the top