private void createFoldingSupport(ProjectionViewer projectionViewer) { fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors()); fProjectionSupport.install(); ((ProjectionViewer) getSourceViewer()).addProjectionListener(this); }
private void createFoldingSupport(ProjectionViewer projectionViewer) { fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors()); fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() { @Override public IInformationControl createInformationControl(Shell shell) { return new AntSourceViewerInformationControl(shell); } }); fProjectionSupport.install(); ((ProjectionViewer) getViewer()).addProjectionListener(this); }
@Override public void createPartControl(Composite parent) { // Over-ride to add code-folding support super.createPartControl(parent); if (getSourceViewer() instanceof ProjectionViewer) { ProjectionViewer viewer =(ProjectionViewer)getSourceViewer(); projectionSupport = new ProjectionSupport(viewer,getAnnotationAccess(),getSharedColors()); projectionSupport.install(); //turn projection mode on viewer.doOperation(ProjectionViewer.TOGGLE); } }
/** * Creates, configures, and returns a <code>ProjectionSupport</code> * object for this editor. * * @return the <code>ProjectSupport</code> object to use with this editor */ protected ProjectionSupport createProjectionSupport() { ProjectionViewer viewer = (ProjectionViewer) getSourceViewer(); ProjectionSupport projSupport = new ProjectionSupport( viewer, getAnnotationAccess(), getSharedColors() ); projSupport.addSummarizableAnnotationType( "org.eclipse.ui.workbench.texteditor.error" ); //$NON-NLS-1$ projSupport.addSummarizableAnnotationType( "org.eclipse.ui.workbench.texteditor.warning" ); //$NON-NLS-1$ projSupport.install(); return projSupport; }
protected ProjectionSupport installProjectionSupport(ProjectionViewer projectionViewer) { ProjectionSupport projectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors()); projectionSupport.addSummarizableAnnotationType(INFO_ANNOTATION_TYPE); projectionSupport.addSummarizableAnnotationType(WARNING_ANNOTATION_TYPE); projectionSupport.addSummarizableAnnotationType(ERROR_ANNOTATION_TYPE); projectionSupport.setAnnotationPainterDrawingStrategy(projectionAnnotationDrawingStrategy); projectionSupport.install(); return projectionSupport; }
projectionSupport.install(); projectionViewer.doOperation( ProjectionViewer.TOGGLE );
fProjectionSupport.install();
fProjectionSupport.install();
@Override public void createPartControl(Composite parent) { super.createPartControl(parent); ProjectionViewer viewer = getProjectionViewer(); projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors()); projectionSupport.install(); // turn projection mode on viewer.doOperation(ProjectionViewer.TOGGLE); annotationModel = viewer.getProjectionAnnotationModel(); getPreferenceStore().addPropertyChangeListener(preferenceChangeListener); }
@Override public void createPartControl(Composite parent) { super.createPartControl(parent); ProjectionViewer viewer = (ProjectionViewer) getSourceViewer(); // fix bug 267553: font problems can occur if the default font of the text widget doesn't match the // default font returned by the token scanner if (sourceViewerConfiguration.getDefaultFont() != null) { viewer.getTextWidget().setFont(sourceViewerConfiguration.getDefaultFont()); } projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors()); projectionSupport.install(); syncProjectionModeWithPreferences(); viewer.addProjectionListener(new IProjectionListener() { public void projectionDisabled() { projectionAnnotationById = null; saveProjectionPreferences(); } public void projectionEnabled() { saveProjectionPreferences(); updateProjectionAnnotations(); } }); if (!outlineDirty && isFoldingEnabled()) { updateProjectionAnnotations(); } JFaceResources.getFontRegistry().addListener(preferencesListener); }
fProjectionSupport.install();