Exemplo n.º 1
0
  @Override
  public void createPartControl(Composite parent) {
    super.createPartControl(parent);
    try {
      ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();

      fProjectionSupport =
          new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
      fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error");
      fProjectionSupport.addSummarizableAnnotationType(
          "org.eclipse.ui.workbench.texteditor.warning");
      fProjectionSupport.setHoverControlCreator(
          new IInformationControlCreator() {
            @Override
            public IInformationControl createInformationControl(Shell shell) {
              return new DefaultInformationControl(shell);
            }
          });
      fProjectionSupport.install();

      if (isFoldingEnabled()) {
        projectionViewer.doOperation(ProjectionViewer.TOGGLE);
      }
    } catch (Exception e) {
      Log.log(e);
    }
  }
Exemplo n.º 2
0
 @Override
 protected void configureSourceViewerDecorationSupport(SourceViewerDecorationSupport support) {
   super.configureSourceViewerDecorationSupport(support);
   support.setCharacterPairMatcher(fBracketMatcher);
   support.setMatchingCharacterPainterPreferenceKeys(
       PydevEditorPrefs.USE_MATCHING_BRACKETS, PydevEditorPrefs.MATCHING_BRACKETS_COLOR);
 }