|
|
|
|
Re: JavaEditor how to implement the Marker [message #278434 is a reply to message #277684] |
Sun, 02 January 2005 11:11  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03248 seconds