Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » VerticalRuler(Trying to understand addAnnotationType of an AnnotationRulerColumn)
VerticalRuler [message #889929] Wed, 20 June 2012 09:33
Paul Ehrlich is currently offline Paul EhrlichFriend
Messages: 2
Registered: June 2012
Junior Member
Hello,
I created my own Annotation with corresponding Marker using the following extensionpoints:

org.eclipse.ui.editors.annotationTypes
org.eclipse.core.resources.markers
org.eclipse.ui.editors.markerAnnotationSpecification

The result is a Marker with an own Logo (right now a copy of bookmark logo) shown in the VerticalRuler, so far so good.

The Problem now is, that I added a secound Column to the VerticalRuler, which was suposed to hold my marker, but even after I registered my Annotationtype to the column, the marker appars on the orignal column. Any hints for me what I'm doing wrong? I added a secound LineNumberColumn to seperate the orignal from my column (see picture)

index.php/fa/10358/0/

This is within my Editor class:
private CompositeRuler ruler2=null;
private AnnotationRulerColumn column1=null;

IVerticalRuler ruler =  super.createVerticalRuler();
ruler2 = (CompositeRuler) ruler;		
column1 = new AnnotationRulerColumn(25);
ruler2.addDecorator(0, column1);
ruler2.addDecorator(1, createLineNumberRulerColumn());
AnnotationTypeLookup atl = new AnnotationTypeLookup();
Object type = atl.getAnnotationType("x.myMarker",2);
column1.addAnnotationType(type);


try{
	m = res.createMarker(type);
	m.setAttribute(IMarker.LINE_NUMBER,3);
	m.setAttribute(IMarker.MESSAGE, "lala");
	m.setAttribute(IMarker.TEXT, "test");
	m.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
	m.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
	
} catch (CoreException e) {
    // TODO Auto-generated catch block
    System.out.println("something bad happend");
}}

[Updated on: Wed, 20 June 2012 09:34]

Report message to a moderator

Previous Topic:productBuild.xml requiring unncessary plugins?
Next Topic:RevisionInformation or ChangeInformation on LineNumberChangeRulerColumn
Goto Forum:
  


Current Time: Thu Mar 28 18:03:24 GMT 2024

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

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

Back to the top