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

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


    ((IPostSelectionProvider) this.getSelectionProvider())
        .addPostSelectionChangedListener(fOccurrencesUpdater);

    // Folding
    ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
    ProjectionSupport projectionSupport = new ProjectionSupport(viewer,
        getAnnotationAccess(), getSharedColors());

    projectionSupport
        .addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error");
    projectionSupport
        .addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning");
    projectionSupport
        .setHoverControlCreator(new IInformationControlCreator() {
          public IInformationControl createInformationControl(
              Shell shell) {
            return new DefaultInformationControl(shell, SWT.TOOL
                | SWT.NO_TRIM | getOrientation(), SWT.NONE,
                null, EditorsUI.getTooltipAffordanceString());
          }
        });
    projectionSupport
        .setInformationPresenterControlCreator(new IInformationControlCreator() {
          public IInformationControl createInformationControl(
              Shell shell) {
            int shellStyle = SWT.RESIZE | SWT.TOOL
                | getOrientation();
            int style = SWT.V_SCROLL | SWT.H_SCROLL;
            return new DefaultInformationControl(shell, shellStyle,
                style, null);
          }
        });
    projectionSupport.install();
    viewer.doOperation(ProjectionViewer.TOGGLE);
  }
View Full Code Here


  public void createPartControl(Composite parent)
  {
      super.createPartControl(parent);
      ProjectionViewer viewer =(ProjectionViewer)getSourceViewer();

      m_ProjectionSupport = new ProjectionSupport(viewer,getAnnotationAccess(),getSharedColors());
      m_ProjectionSupport.install();

      //turn projection mode on
      viewer.doOperation(ProjectionViewer.TOGGLE);     
  }
View Full Code Here

  @Override
  public void createPartControl(Composite parent) {
    super.createPartControl(parent);
   
    ProjectionViewer viewer = (ProjectionViewer)getSourceViewer();
    fProjectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
    fProjectionSupport.install();
    viewer.doOperation(ProjectionViewer.TOGGLE);
    updateFolding();
   
    StyledText widget = viewer.getTextWidget();
View Full Code Here

  @Override
  public void createPartControl(Composite parent) {
    super.createPartControl(parent);

    ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
    fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
    fProjectionSupport.install();
    projectionViewer.doOperation(ProjectionViewer.TOGGLE);
    projectionViewer.getTextWidget().setTabs(getPreferenceStore().getInt(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH));

    //    projectionViewer.setHyperlinkDetectors(new IHyperlinkDetector[]{
View Full Code Here

  @Override
  public void createPartControl(Composite parent) {
    super.createPartControl(parent);

    ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
    fProjectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
    fProjectionSupport.install();
    viewer.doOperation(ProjectionViewer.TOGGLE);
    updateFolding();

    StyledText widget = viewer.getTextWidget();
View Full Code Here

    }

    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

    viewerAnnotationModel = new AnnotationModel();
    viewer = createSourceViewer(rootComposite, viewerAnnotationModel);
    viewer.getTextWidget().setWrapIndent(20);
    viewer.configure(new Configuration(colors));
    createViewerActions(viewer);
    projectionSupport = new ProjectionSupport(viewer,new ProjectionAnnotationAccess(), colors);
    projectionSupport.install();
    messageDocumentFactory = new HttpMessageDocumentFactory();
   
    final SearchBar sb = new SearchBar(this, viewer, colors);
    sb.setLayoutData(CornerLayoutData.createTopRight());
View Full Code Here

        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

    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);
View Full Code Here

     *
         * TODO this is repeated in REPLView...surely we can make the source viewer self-sufficient here
     */
      viewer.propertyChange(null);
     
    fProjectionSupport= new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
   
    // TODO remove the 2 following lines ?
    fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
    fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
   
View Full Code Here

TOP

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

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.