Package org.eclipse.jface.text.source.projection

Examples of org.eclipse.jface.text.source.projection.ProjectionViewer


        return new DRLDocumentProvider();
    }

    public void createPartControl(Composite parent) {
        super.createPartControl(parent);
        ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
        ProjectionSupport projectionSupport = new ProjectionSupport(viewer,
            getAnnotationAccess(), getSharedColors());
        projectionSupport.install();
        // turn projection mode on
        viewer.doOperation(ProjectionViewer.TOGGLE);
        annotationModel = viewer.getProjectionAnnotationModel();
    }
View Full Code Here


        annotationModel = viewer.getProjectionAnnotationModel();
    }

    protected ISourceViewer createSourceViewer(Composite parent,
            IVerticalRuler ruler, int styles) {
        ISourceViewer viewer = new ProjectionViewer(parent, ruler,
                getOverviewRuler(), isOverviewRulerVisible(), styles);
        // ensure decoration support has been created and configured.
        getSourceViewerDecorationSupport(viewer);
        return viewer;
    }
View Full Code Here

    return c;
  }

  private ProjectionViewer createSourceViewer(Composite parent, AnnotationModel annotationModel) {
    final CompositeRuler ruler = new CompositeRuler();
    final ProjectionViewer sv = new ProjectionViewer(parent, ruler, null, false, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    final TextViewerUndoManager undoManager = new TextViewerUndoManager(8);
    undoManager.connect(sv);
    final GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
    sv.getControl().setLayoutData(gd);
    return sv;
  }
View Full Code Here

        data.heightHint = 250;
        editorComposite.setLayoutData( data );
        super.createPartControl( editorComposite );
        control.setContent( editorComposite );

        ProjectionViewer projectionViewer = ( ProjectionViewer ) getSourceViewer();
        projectionSupport = new ProjectionSupport( projectionViewer, getAnnotationAccess(), getSharedColors() );
        projectionSupport.install();
        projectionViewer.doOperation( ProjectionViewer.TOGGLE );
    }
View Full Code Here

     */
    protected ISourceViewer createSourceViewer( Composite parent, IVerticalRuler ruler, int styles )
    {
        getAnnotationAccess();
        getOverviewRuler();
        ISourceViewer viewer = new ProjectionViewer( parent, ruler, getOverviewRuler(), true, styles );
        getSourceViewerDecorationSupport( viewer );

        return viewer;
    }
View Full Code Here

    }

    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() {
                public IInformationControl createInformationControl(Shell shell) {
                    return new DefaultInformationControl(shell);
                }
            });
            fProjectionSupport.install();

            if (isFoldingEnabled()) {
                projectionViewer.doOperation(ProjectionViewer.TOGGLE);
            }
        } catch (Exception e) {
            Log.log(e);
        }
    }
View Full Code Here

     */
    @Override
    protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
        fAnnotationAccess = createAnnotationAccess();
        fOverviewRuler = createOverviewRuler(getSharedColors());
        ProjectionViewer viewer =
                new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);

        fProjectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
        fProjectionSupport.addSummarizableAnnotationType(ANNOTATION_TYPE_APEX_ERROR); //$NON-NLS-1$
        fProjectionSupport.addSummarizableAnnotationType(ANNOTATION_TYPE_APEX_WARNING); //$NON-NLS-1$
        fProjectionSupport.install();
View Full Code Here

      composite.setBackground(display
          .getSystemColor(SWT.COLOR_INFO_BACKGROUND));
    }

    // Source viewer
    fViewer = new ProjectionViewer(composite, null, null, false, style);
    fViewer.setEditable(false);

    fText = fViewer.getTextWidget();
    gd = new GridData(GridData.BEGINNING | GridData.FILL_BOTH);
    fText.setLayoutData(gd);
View Full Code Here

  /**
   * install the old code folding instead of wtp's
   */
  private void installProjectionSupport() {
    projectionSupportInstalled = true;
    ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();

    fProjectionModelUpdater = new PHPFoldingStructureProviderProxy();
    if (fProjectionModelUpdater != null)
      fProjectionModelUpdater.install(projectionViewer);

View Full Code Here

    if (fProjectionModelUpdater != null) {
      fProjectionModelUpdater.uninstall();
      fProjectionModelUpdater = null;
    }

    ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();

    fProjectionModelUpdater = new PHPFoldingStructureProviderProxy();
    if (fProjectionModelUpdater != null) {
      fProjectionModelUpdater.install(projectionViewer);
      fProjectionModelUpdater.initialize();
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.projection.ProjectionViewer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.