Project

General

Profile

« Previous | Next » 

Revision b2f59380

Added by Lutz Suhrbier over 12 years ago

PolytomousKeyListLabelProvider, Position and EditorAnnotation: fixed Single-Source problems

View differences:

eu.etaxonomy.taxeditor.editor.rcp/src/eu/etaxonomy/taxeditor/singlesource/editor/name/container/EditorAnnotationFacadeImpl.java
1 1
package eu.etaxonomy.taxeditor.singlesource.editor.name.container;
2 2

  
3
import javax.naming.OperationNotSupportedException;
4

  
3 5
import org.apache.log4j.Logger;
4 6
import org.eclipse.core.resources.IMarker;
5 7
import org.eclipse.jface.text.Position;
......
27 29
    private String text;
28 30
    private int line;
29 31
    private Position position;
30

  
31 32
    
32
    public EditorAnnotationFacadeImpl(ParserProblem problem){
33
    	this(EditorAnnotationFacade.EditorAnnotationType.getTypeByProblem(problem), 0, problem.getMessage());
33
	public EditorAnnotationFacadeImpl(){
34
	}
35
    
36
    public EditorAnnotationFacadeImpl(EditorAnnotationFacade.EditorAnnotationType type, Integer line, String text) {
37
    	super(type.name(), false, text);
38
        this.marker = null;
39
        this.line = line;
40
        this.text = text;
34 41
    }
35 42
    
43
    public EditorAnnotationFacadeImpl(Integer line, String text) {
44
    	this(EditorAnnotationType.ERROR, line, text);
45
    }
36 46
    
37
    /**
38
     * <p>Constructor for EditorAnnotation.</p>
39
     *
40
     * @param marker a org.eclipse.core.resources.IMarker object.
41
     */
47
    public EditorAnnotationFacadeImpl(ParserProblem problem){
48
    	this(EditorAnnotationFacade.EditorAnnotationType.getTypeByProblem(problem), 0, problem.getMessage());
49
    }
50

  
42 51
    public EditorAnnotationFacadeImpl(IMarker marker) {
43 52
        this.marker = marker;
44 53
    }
54
    
55
	public Object getInstanceInternal(EditorAnnotationFacade.EditorAnnotationType type, Integer line, String text) throws OperationNotSupportedException
56
	{
57
		return new EditorAnnotationFacadeImpl(type, line, text);
58
	}
45 59

  
46
    /**
47
     * <p>Constructor for EditorAnnotation.</p>
48
     *
49
     * @param line a int.
50
     * @param text a {@link java.lang.String} object.
51
     */
52
    public EditorAnnotationFacadeImpl(Integer line, String text) {
53
    	this(EditorAnnotationType.ERROR, line, text);
60
    public Object getInstanceInternal(Integer line, String text) {
61
    	return new EditorAnnotationFacadeImpl(line, text);
54 62
    }
55 63

  
56
    /**
57
     * <p>Constructor for EditorAnnotation.</p>
58
     *
59
     * @param type a {@link java.lang.String} object.
60
     * @param line a int.
61
     * @param text a {@link java.lang.String} object.
62
     */
63
    public EditorAnnotationFacadeImpl(EditorAnnotationFacade.EditorAnnotationType type, Integer line, String text) {
64
    	super(type.name(), false, text);
65
        this.marker = null;
66
        this.line = line;
67
        this.text = text;
68
    }
64
    public Object getInstanceInternal(ParserProblem problem) throws OperationNotSupportedException
65
	{
66
		return new EditorAnnotationFacadeImpl(EditorAnnotationType.getTypeByProblem(problem), 0, problem.getMessage());
67
	}
69 68
    
69
	public Object getInstanceInternal(Object marker) throws OperationNotSupportedException
70
	{
71
		return new EditorAnnotationFacadeImpl((IMarker)marker);
72
	}
73

  
70 74
    /**
71 75
     * <p>Getter for the field <code>marker</code>.</p>
72 76
     *

Also available in: Unified diff