Search in sources :

Example 1 with MarkerStub

use of com.python.pydev.analysis.MarkerStub in project Pydev by fabioz.

the class AdditionalInfoTestsBase method createMarkerStub.

/**
 * This method creates a marker stub
 *
 * @param start start char
 * @param end end char
 * @param type the marker type
 * @return the created stub
 */
protected MarkerAnnotationAndPosition createMarkerStub(int start, int end, int type) {
    HashMap<String, Object> attrs = new HashMap<String, Object>();
    attrs.put(AnalysisRunner.PYDEV_ANALYSIS_TYPE, type);
    attrs.put(IMarker.CHAR_START, start);
    attrs.put(IMarker.CHAR_END, end);
    MarkerStub marker = new MarkerStub(attrs);
    return new MarkerAnnotationAndPosition(new MarkerAnnotation("org.eclipse.core.resources.problemmarker", marker), new Position(start, end - start));
}
Also used : MarkerAnnotation(org.eclipse.ui.texteditor.MarkerAnnotation) HashMap(java.util.HashMap) MarkerStub(com.python.pydev.analysis.MarkerStub) MarkerAnnotationAndPosition(org.python.pydev.editor.codefolding.MarkerAnnotationAndPosition) Position(org.eclipse.jface.text.Position) MarkerAnnotationAndPosition(org.python.pydev.editor.codefolding.MarkerAnnotationAndPosition)

Aggregations

MarkerStub (com.python.pydev.analysis.MarkerStub)1 HashMap (java.util.HashMap)1 Position (org.eclipse.jface.text.Position)1 MarkerAnnotation (org.eclipse.ui.texteditor.MarkerAnnotation)1 MarkerAnnotationAndPosition (org.python.pydev.editor.codefolding.MarkerAnnotationAndPosition)1