当前位置: 首页>>代码示例>>Java>>正文


Java ProjectionSupport.install方法代码示例

本文整理汇总了Java中org.eclipse.jface.text.source.projection.ProjectionSupport.install方法的典型用法代码示例。如果您正苦于以下问题:Java ProjectionSupport.install方法的具体用法?Java ProjectionSupport.install怎么用?Java ProjectionSupport.install使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.text.source.projection.ProjectionSupport的用法示例。


在下文中一共展示了ProjectionSupport.install方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPartControl

import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
	super.createPartControl(parent);
	
	// Code Folding
	ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
	// Occurrence initiation, need ITextResource and ISourceViewer.
	highlighting = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileHighlighting(getResource(), viewer, colorManager, this);
	
	projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
	projectionSupport.install();
	
	// turn projection mode on
	viewer.doOperation(ProjectionViewer.TOGGLE);
	codeFoldingManager = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileCodeFoldingManager(viewer, this);
	
	IContextService contextService = (IContextService) getSite().getService(IContextService.class);
	contextService.activateContext("de.darwinspl.preferences.resource.dwprofile.EditorScope");
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:19,代码来源:DwprofileEditor.java

示例2: createPartControl

import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
	super.createPartControl(parent);
	
	// Code Folding
	ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
	// Occurrence initiation, need ITextResource and ISourceViewer.
	highlighting = new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionHighlighting(getResource(), viewer, colorManager, this);
	
	projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
	projectionSupport.install();
	
	// turn projection mode on
	viewer.doOperation(ProjectionViewer.TOGGLE);
	codeFoldingManager = new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionCodeFoldingManager(viewer, this);
	
	IContextService contextService = (IContextService) getSite().getService(IContextService.class);
	contextService.activateContext("eu.hyvar.feature.expression.resource.hyexpression.EditorScope");
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:19,代码来源:HyexpressionEditor.java

示例3: createPartControl

import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
	super.createPartControl(parent);
	
	// Code Folding
	ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
	// Occurrence initiation, need ITextResource and ISourceViewer.
	highlighting = new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaHighlighting(getResource(), viewer, colorManager, this);
	
	projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
	projectionSupport.install();
	
	// turn projection mode on
	viewer.doOperation(ProjectionViewer.TOGGLE);
	codeFoldingManager = new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaCodeFoldingManager(viewer, this);
	
	IContextService contextService = (IContextService) getSite().getService(IContextService.class);
	contextService.activateContext("eu.hyvar.context.contextValidity.resource.hyvalidityformula.EditorScope");
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:19,代码来源:HyvalidityformulaEditor.java

示例4: createPartControl

import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
	super.createPartControl(parent);
	
	// Code Folding
	ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
	// Occurrence initiation, need ITextResource and ISourceViewer.
	highlighting = new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueHighlighting(getResource(), viewer, colorManager, this);
	
	projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
	projectionSupport.install();
	
	// turn projection mode on
	viewer.doOperation(ProjectionViewer.TOGGLE);
	codeFoldingManager = new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueCodeFoldingManager(viewer, this);
	
	IContextService contextService = (IContextService) getSite().getService(IContextService.class);
	contextService.activateContext("eu.hyvar.dataValues.resource.hydatavalue.EditorScope");
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:19,代码来源:HydatavalueEditor.java

示例5: createPartControl

import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
	super.createPartControl(parent);
	
	// Code Folding
	ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
	// Occurrence initiation, need ITextResource and ISourceViewer.
	highlighting = new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingHighlighting(getResource(), viewer, colorManager, this);
	
	projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
	projectionSupport.install();
	
	// turn projection mode on
	viewer.doOperation(ProjectionViewer.TOGGLE);
	codeFoldingManager = new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingCodeFoldingManager(viewer, this);
	
	IContextService contextService = (IContextService) getSite().getService(IContextService.class);
	contextService.activateContext("eu.hyvar.feature.mapping.resource.hymapping.EditorScope");
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:19,代码来源:HymappingEditor.java

示例6: createPartControl

import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
	super.createPartControl(parent);
	
	// Code Folding
	ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
	// Occurrence initiation, need ITextResource and ISourceViewer.
	highlighting = new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsHighlighting(getResource(), viewer, colorManager, this);
	
	projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
	projectionSupport.install();
	
	// turn projection mode on
	viewer.doOperation(ProjectionViewer.TOGGLE);
	codeFoldingManager = new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsCodeFoldingManager(viewer, this);
	
	IContextService contextService = (IContextService) getSite().getService(IContextService.class);
	contextService.activateContext("eu.hyvar.feature.constraint.resource.hyconstraints.EditorScope");
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:19,代码来源:HyconstraintsEditor.java

示例7: createPartControl

import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
	super.createPartControl(parent);
	
	// Code Folding
	ProjectionViewer viewer = (ProjectionViewer) getSourceViewer();
	// Occurrence initiation, need ITextResource and ISourceViewer.
	highlighting = new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestHighlighting(getResource(), viewer, colorManager, this);
	
	projectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
	projectionSupport.install();
	
	// turn projection mode on
	viewer.doOperation(ProjectionViewer.TOGGLE);
	codeFoldingManager = new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestCodeFoldingManager(viewer, this);
	
	IContextService contextService = (IContextService) getSite().getService(IContextService.class);
	contextService.activateContext("eu.hyvar.mspl.manifest.resource.hymanifest.EditorScope");
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:19,代码来源:HymanifestEditor.java

示例8: 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();
}
 
开发者ID:eclipse,项目名称:texlipse,代码行数:19,代码来源:BibEditor.java

示例9: 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);
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:24,代码来源:JavaScriptLightWeightEditor.java

示例10: 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;
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:20,代码来源:ApexCodeEditor.java

示例11: 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;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:26,代码来源:DecoratedScriptEditor.java

示例12: createPartControl

import org.eclipse.jface.text.source.projection.ProjectionSupport; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent) {
	JsonPreferenceStore jsonPreferenceStore = JsonPreferenceStore.getJsonPreferenceStore();
	viewerConfiguration = new JsonSourceViewerConfiguration(this, jsonPreferenceStore);
	setSourceViewerConfiguration(viewerConfiguration);
	super.createPartControl(parent);

	ProjectionViewer viewer =(ProjectionViewer) getSourceViewer();
	projectionSupport = new ProjectionSupport(viewer,getAnnotationAccess(),getSharedColors());
	projectionSupport.install();

	//turn projection mode on
	viewer.doOperation(ProjectionViewer.TOGGLE);

	annotationModel = viewer.getProjectionAnnotationModel();

	SourceViewerDecorationSupport support = getSourceViewerDecorationSupport(viewer);
	support.install(getPreferenceStore());


	IFile file = (IFile) getEditorInput().getAdapter(IFile.class);
	platformPreferenceListener = new PlatformPreferenceListener(viewerConfiguration, jsonPreferenceStore);
	platformPreferenceListener.setPreferenceChangeListener(file);
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:25,代码来源:JsonTextEditor.java

示例13: 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);
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:25,代码来源:PyEditProjection.java

示例14: 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);
    }
}
 
开发者ID:eclipse,项目名称:texlipse,代码行数:43,代码来源:TexEditor.java

示例15: 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);
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:29,代码来源:TLAEditor.java


注:本文中的org.eclipse.jface.text.source.projection.ProjectionSupport.install方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。