From: <lue...@us...> - 2003-12-25 07:04:11
|
Update of /cvsroot/e-p-i-c/org.epic.ext.unsupported.colorer/src/org/epic/ext/unsupported/colorer In directory sc8-pr-cvs1:/tmp/cvs-serv29119/src/org/epic/ext/unsupported/colorer Modified Files: PerlEditor.java Log Message: Error correction Index: PerlEditor.java =================================================================== RCS file: /cvsroot/e-p-i-c/org.epic.ext.unsupported.colorer/src/org/epic/ext/unsupported/colorer/PerlEditor.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- PerlEditor.java 12 Dec 2003 18:09:02 -0000 1.10 +++ PerlEditor.java 25 Dec 2003 07:04:08 -0000 1.11 @@ -319,35 +319,50 @@ Composite parent, IVerticalRuler ruler, int styles) { + fAnnotationAccess = createAnnotationAccess(); - fAnnotationAccess = createAnnotationAccess(); - ISharedTextColors sharedColors = new SharedTextColors(); + ISharedTextColors sharedColors = new SharedTextColors(); - fOverviewRuler = - new OverviewRuler( - fAnnotationAccess, - VERTICAL_RULER_WIDTH, - sharedColors); - fOverviewRuler.addHeaderAnnotationType(AnnotationType.WARNING); - fOverviewRuler.addHeaderAnnotationType(AnnotationType.ERROR); + fOverviewRuler = + new OverviewRuler( + fAnnotationAccess, + VERTICAL_RULER_WIDTH, + sharedColors); - ISourceViewer viewer = - new PerlSourceViewer( - parent, - ruler, - fOverviewRuler, - isOverviewRulerVisible(), - styles); + MarkerAnnotationPreferences fAnnotationPreferences = + new MarkerAnnotationPreferences(); - fSourceViewerDecorationSupport = - new SourceViewerDecorationSupport( - viewer, - fOverviewRuler, - fAnnotationAccess, - sharedColors); - configureSourceViewerDecorationSupport(); + Iterator e = + fAnnotationPreferences.getAnnotationPreferences().iterator(); - return viewer; + while (e.hasNext()) { + + AnnotationPreference preference = (AnnotationPreference) e.next(); + + if (preference.contributesToHeader()) + fOverviewRuler.addHeaderAnnotationType( + preference.getAnnotationType()); + + } + + ISourceViewer sourceViewer = + new PerlSourceViewer( + parent, + ruler, + fOverviewRuler, + isOverviewRulerVisible(), + styles); + + fSourceViewerDecorationSupport = + new SourceViewerDecorationSupport( + sourceViewer, + fOverviewRuler, + fAnnotationAccess, + sharedColors); + + configureSourceViewerDecorationSupport(); + + return sourceViewer; } |