| How to add marker in the task view ? [message #287218] | 
Mon, 27 June 2005 12:17   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hello, 
 
I have read the "Make my words" article on Eclipse corner. I try to add  
marker in the task view. I want to add marker on files, but I don't know  
how to add marker on. Have you got code sample with use of markers or  
web site to help me ? 
 
Best regards,
 |  
 |  
  | 
 | 
 | 
 | 
 | 
 | 
| Re: How to add marker in the task view ? [message #287458 is a reply to message #287387] | 
Thu, 30 June 2005 05:59   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi, 
 
Now, it works. Thanks for your efficiently support. 
 
In the plugin.xml, I have : 
   <extension id="marker" name="StateMachineMarker"  
point="org.eclipse.core.resources.markers"> 
	<super type="org.eclipse.core.resources.problemmarker"/> 
	<super type="org.eclipse.core.resources.textmarker"/> 
	<persistent value="true"/> 
   </extension> 
 
I delete all markers on this resource. 
  resource.deleteMarkers(null, true, IResource.DEPTH_INFINITE); 
 
I create a marker with the next code : 
  IMarker marker = resource.createMarker("sm4Eclipse_3_0.editor.marker"); 
  marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR); 
  marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH); 
  marker.setAttribute(IMarker.MESSAGE, "my error message"); 
 
I display the precedent marker with : 
  IWorkbenchPage activePage = window.getActivePage(); 
  if (activePage != null) 
    MarkerViewUtil.showMarker(activePage, marker, true); 
 
My error was that I don't create the marker with the good identifier. 
 
Thanks for your support. 
 
" Horv������������������
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.06526 seconds