Revision 2a5c13f5
Added by Pepe Ciardelli over 14 years ago
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/EditorAnnotation.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.taxeditor.editor; |
2 | 2 |
|
3 |
import org.apache.log4j.Logger; |
|
3 | 4 |
import org.eclipse.core.resources.IMarker; |
4 | 5 |
import org.eclipse.jface.text.Position; |
5 | 6 |
import org.eclipse.jface.text.source.Annotation; |
... | ... | |
14 | 15 |
import eu.etaxonomy.taxeditor.model.ImageResources; |
15 | 16 |
|
16 | 17 |
public class EditorAnnotation extends Annotation implements IAnnotationPresentation { |
18 |
private static final Logger logger = Logger |
|
19 |
.getLogger(EditorAnnotation.class); |
|
17 | 20 |
private IMarker marker; |
18 | 21 |
private String text; |
19 | 22 |
private int line; |
... | ... | |
71 | 74 |
if (WARNING_TYPE.equals(getType())) { |
72 | 75 |
return WARNING_IMAGE; |
73 | 76 |
} |
77 |
logger.warn("No image for type " + getType()); |
|
74 | 78 |
return null; |
75 | 79 |
} |
76 | 80 |
|
... | ... | |
109 | 113 |
|
110 | 114 |
Image image = getImage(); |
111 | 115 |
|
116 |
if (image == null) { |
|
117 |
return; |
|
118 |
} |
|
119 |
|
|
112 | 120 |
Rectangle r = image.getBounds(); |
113 | 121 |
|
114 | 122 |
int destX = x + w - r.width; |
Also available in: Unified diff
Fixed annotations problem.