本文整理汇总了Java中org.eclipse.jface.text.source.projection.ProjectionSupport.addSummarizableAnnotationType方法的典型用法代码示例。如果您正苦于以下问题:Java ProjectionSupport.addSummarizableAnnotationType方法的具体用法?Java ProjectionSupport.addSummarizableAnnotationType怎么用?Java ProjectionSupport.addSummarizableAnnotationType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.text.source.projection.ProjectionSupport
的用法示例。
在下文中一共展示了ProjectionSupport.addSummarizableAnnotationType方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPartControl
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
super.createPartControl(parent);
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.install();
if (TexlipsePlugin.getDefault().getPreferenceStore().getBoolean(TexlipseProperties.BIB_CODE_FOLDING)) {
projectionViewer.doOperation(ProjectionViewer.TOGGLE);
}
this.documentModel.update();
}
示例2: installProjectionSupport
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
/**
* Install everything necessary to get document folding working and enable
* document folding
*
* @param sourceViewer
*/
private void installProjectionSupport() {
ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
fProjectionSupport = new ProjectionSupport(projectionViewer, getAnnotationAccess(), getSharedColors());
fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
return new DefaultInformationControl(parent);
}
});
fProjectionSupport.install();
if (isFoldingEnabled()) {
projectionViewer.doOperation(ProjectionViewer.TOGGLE);
}
}
示例3: createSourceViewer
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
@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();
setTitleToolTip(EDITOR_NAME);
// ensure source viewer decoration support has been created and configured
getSourceViewerDecorationSupport(viewer);
fBracketInserter = new BracketInserter(this, viewer);
return viewer;
}
示例4: createSourceViewer
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
protected ISourceViewer createSourceViewer( Composite parent,
IVerticalRuler ruler, int styles )
{
fAnnotationAccess = getAnnotationAccess( );
fOverviewRuler = createOverviewRuler( getSharedColors( ) );
ProjectionViewer viewer = new ProjectionViewer( parent,
ruler,
getOverviewRuler( ),
isOverviewRulerVisible( ),
styles );
ProjectionSupport fProjectionSupport = new ProjectionSupport( viewer,
getAnnotationAccess( ),
getSharedColors( ) );
fProjectionSupport.addSummarizableAnnotationType( "org.eclipse.ui.workbench.texteditor.error" ); //$NON-NLS-1$
fProjectionSupport.addSummarizableAnnotationType( "org.eclipse.ui.workbench.texteditor.warning" ); //$NON-NLS-1$
fProjectionSupport.install( );
// Ensures source viewer decoration support has been created and
// configured.
getSourceViewerDecorationSupport( viewer );
return viewer;
}
示例5: createPartControl
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
@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);
}
}
示例6: createPartControl
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
/**
* Create the part control.
*
* @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
public void createPartControl(Composite parent) {
super.createPartControl(parent);
// enable projection support (for code folder)
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.install();
if (TexlipsePlugin.getDefault().getPreferenceStore().getBoolean(TexlipseProperties.CODE_FOLDING)) {
projectionViewer.doOperation(ProjectionViewer.TOGGLE);
}
fAnnotationUpdater = new TexlipseAnnotationUpdater(this);
((IPostSelectionProvider) getSelectionProvider()).addPostSelectionChangedListener(
new ISelectionChangedListener(){
public void selectionChanged(SelectionChangedEvent event) {
//Delete all StatuslineErrors after selection changes
documentModel.removeStatusLineErrorMessage();
}
});
// register documentModel as documentListener
// in initializeEditor this would cause NPE
this.getDocumentProvider().getDocument(getEditorInput()).addDocumentListener(this.documentModel);
this.documentModel.initializeModel();
this.documentModel.updateNow();
ISourceViewer sourceViewer = getSourceViewer();
if (sourceViewer instanceof ITextViewerExtension) {
if (fBracketInserter == null)
fBracketInserter = new BracketInserter(getSourceViewer(), this);
((ITextViewerExtension) sourceViewer).prependVerifyKeyListener(fBracketInserter);
}
}
示例7: createPartControl
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent)
{
super.createPartControl(parent);
/*
* Add projection support (e.G. for folding)
*/
ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
projectionSupport.install();
viewer.doOperation(ProjectionViewer.TOGGLE);
// model for adding projections (folds)
this.annotationModel = viewer.getProjectionAnnotationModel();
// this must be instantiated after annotationModel so that it does
// not call methods that use annotation model when the model is still null
this.proofStructureProvider = new TLAProofFoldingStructureProvider(this);
// refresh the editor in case it should be
// read only
refresh();
// tlapmColoring = new TLAPMColoringOutputListener(this);
service = this.getSite().getService(IEventBroker.class);
}
示例8: installProjectionSupport
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
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;
}
示例9: createPartControl
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent)
{
super.createPartControl(parent);
ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
ProjectionSupport projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
projectionSupport.install();
viewer.doOperation(ProjectionViewer.TOGGLE);
}
示例10: createSourceViewer
import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(composite);
Composite editorComposite = new Composite(composite, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, true).applyTo(editorComposite);
editorComposite.setLayout(new FillLayout(SWT.VERTICAL));
viewer = new FluentMkSourceViewer(editorComposite, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles,
getPreferenceStore());
if (isFoldingEnabled() && !getPreferenceStore().getBoolean(Prefs.EDITOR_SHOW_SEGMENTS)) {
viewer.prepareDelayedProjection();
}
projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); // $NON-NLS-1$
projectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); // $NON-NLS-1$
projectionSupport.addSummarizableAnnotationType("org.eclipse.search.results"); // $NON-NLS-1$
projectionSupport.setHoverControlCreator(new IInformationControlCreator() {
@Override
public IInformationControl createInformationControl(Shell shell) {
String statusFieldText = EditorsUI.getTooltipAffordanceString();
return new FluentMkSourceViewerInfoControl(shell, false, getOrientation(), statusFieldText);
}
});
projectionSupport.install();
projectionProvider = new FoldingStructureProvider();
if (projectionProvider != null) {
projectionProvider.install(this, viewer, getPreferenceStore());
}
if (isFoldingEnabled()) {
viewer.doOperation(ProjectionViewer.TOGGLE);
}
getSourceViewerDecorationSupport(viewer);
viewer.getTextWidget().setWordWrap(isWordWrap());
return viewer;
}