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


Java IOverviewRuler类代码示例

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


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

示例1: createTypeScriptSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
@Override
protected ISourceViewer createTypeScriptSourceViewer(Composite parent, IVerticalRuler verticalRuler,
		IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
	return new AdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles,
			store) {
		@Override
		protected void handleDispose() {
			super.handleDispose();

			// dispose the compilation unit adapter
			dispose();

			fEditor.remove(this);
			if (fEditor.isEmpty()) {
				fEditor = null;
				fSite = null;
			}

			fSourceViewer.remove(this);
			if (fSourceViewer.isEmpty())
				fSourceViewer = null;

		}
	};
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:26,代码来源:TypeScriptMergeViewer.java

示例2: createOverviewRuler

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
@Override
protected IOverviewRuler createOverviewRuler(ISharedTextColors sharedColors) {
    // Note: create the minimap overview ruler regardless of whether it should be shown or not
    // (the setting to show it will control what's drawn).
    if (MinimapOverviewRulerPreferencesPage.useMinimap()) {
        IOutlineModel outlineModel = (IOutlineModel) this.getAdapter(IOutlineModel.class);
        IOverviewRuler ruler = new MinimapOverviewRuler(getAnnotationAccess(), sharedColors, outlineModel);

        Iterator e = getAnnotationPreferences().getAnnotationPreferences().iterator();
        while (e.hasNext()) {
            AnnotationPreference preference = (AnnotationPreference) e.next();
            if (preference.contributesToHeader()) {
                ruler.addHeaderAnnotationType(preference.getAnnotationType());
            }
        }
        return ruler;
    } else {
        return super.createOverviewRuler(sharedColors);
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:21,代码来源:BaseEditor.java

示例3: FtcSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public FtcSourceViewer(IResource resource, Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
		boolean overviewRulerVisible, int styles) {

	super(parent, ruler, overviewRuler, overviewRulerVisible, styles);
	this.resource = resource;
	this.syntaxColoring = new SyntaxColoring(this);
}
 
开发者ID:curiosag,项目名称:ftc,代码行数:8,代码来源:FtcSourceViewer.java

示例4: createPreviewViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
@Override
protected ProjectionViewer createPreviewViewer(Composite parent, IVerticalRuler verticalRuler,
    IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles,
    IPreferenceStore store) {
  return new ScriptSourceViewer(
      parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
 
开发者ID:chromium,项目名称:eclipse-gn,代码行数:8,代码来源:GnEditorColoringConfigurationBlock.java

示例5: BaseSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public BaseSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
        boolean showAnnotationsOverview, int styles, IVerticalIndentGuidePreferencesProvider verticalIndentPrefs) {
    super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);

    verticalLinesPainter = new VerticalIndentGuidesPainter(
            getIndentGuide(verticalIndentPrefs));
    StyledText styledText = this.getTextWidget();
    verticalLinesPainter.setStyledText(styledText);
    styledText.addPaintListener(verticalLinesPainter);
    styledText.setLeftMargin(Math.max(styledText.getLeftMargin(), 2));
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:12,代码来源:BaseSourceViewer.java

示例6: createSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    IOverviewRuler overviewRuler = getOverviewRuler();
    PySourceViewer viewer = new PySourceViewer(parent, ruler, overviewRuler, isOverviewRulerVisible(), styles, this);

    //ensure decoration support has been created and configured.
    getSourceViewerDecorationSupport(viewer);

    return viewer;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:11,代码来源:PyEditProjection.java

示例7: PySourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public PySourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
        boolean showsAnnotationOverview, int styles, final PyEditProjection projection) {
    super(parent, ruler, overviewRuler, showsAnnotationOverview, styles,
            new PyAbstractIndentGuidePreferencesProvider() {

                @Override
                public int getTabWidth() {
                    return ((PyEdit) projection).getIndentPrefs().getTabWidth();
                }
            });
    this.projection = new WeakReference<PyEdit>((PyEdit) projection);
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:13,代码来源:PySourceViewer.java

示例8: SourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public SourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
		boolean showAnnotationsOverview, int styles, IAnnotationAccess annotationAccess, ISharedTextColors sharedColors,
		IDocument document) 
{
	super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, SWT.BOLD);
	int id = currentId++;
	filename = VIEWER_CLASS_NAME + id++ + ".java";
	this.sharedColors=sharedColors;
	this.annotationAccess=annotationAccess;
	this.fOverviewRuler=overviewRuler;
	oldAnnotations= new HashMap<ProjectionAnnotation, Position>();

	IJavaProject javaProject = JavaCore.create(BuildExpressionEditorDataSturcture.INSTANCE.getCurrentProject());
	try 
	{
		IPackageFragmentRoot[] ipackageFragmentRootList=javaProject.getPackageFragmentRoots();
		IPackageFragmentRoot ipackageFragmentRoot=null;
		for(IPackageFragmentRoot tempIpackageFragmentRoot:ipackageFragmentRootList)
		{
			if(tempIpackageFragmentRoot.getKind()==IPackageFragmentRoot.K_SOURCE 
					&& StringUtils.equals(PathConstant.TEMP_BUILD_PATH_SETTINGS_FOLDER,tempIpackageFragmentRoot.getPath().removeFirstSegments(1).toString()))
			{
				ipackageFragmentRoot=tempIpackageFragmentRoot;
				break;
			}   
		} 

		IPackageFragment compilationUnitPackage=   ipackageFragmentRoot.createPackageFragment(HYDROGRAPH_COMPILATIONUNIT_PACKAGE, true, new NullProgressMonitor());
		compilatioUnit=   compilationUnitPackage.createCompilationUnit(filename,document.get(),true, new NullProgressMonitor());
	} 
	catch (Exception exception) {
		LOGGER.warn("Exception occurred while initializing source viewer", exception);
	} finally {
		if (javaProject != null) {
			try {
				javaProject.close();
			} catch (JavaModelException javaModelException) {
				LOGGER.warn("Exception occurred while closing java-project", javaModelException);
			}
		}
	}
	initializeViewer(document);
	updateContents();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:45,代码来源:SourceViewer.java

示例9: TMViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public TMViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
		boolean showAnnotationsOverview, int styles) {
	super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
	init();
}
 
开发者ID:eclipse,项目名称:tm4e,代码行数:6,代码来源:TMViewer.java

示例10: EiffelSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public EiffelSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
		boolean showAnnotationOverview, int styles, EiffelEditor editor) {
	super(parent, ruler, overviewRuler, showAnnotationOverview, styles);
}
 
开发者ID:Imhotup,项目名称:LibertyEiffel-Eclipse-Plugin,代码行数:5,代码来源:EiffelSourceViewer.java

示例11: EiffelSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public EiffelSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
		boolean showAnnotationOverview, int styles, EiffelEditor editor) {
	super(parent, ruler, overviewRuler, showAnnotationOverview, styles);
	eiffelEditor = editor;
}
 
开发者ID:Imhotup,项目名称:LibertyEiffel-Eclipse-Plugin,代码行数:6,代码来源:EiffelSourceViewer.java

示例12: createSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public XtextSourceViewer createSourceViewer(final Composite parent, final IVerticalRuler ruler, final IOverviewRuler overviewRuler, final boolean showsAnnotationOverview, final int styles) {
  return new FixedXtextSourceViewer(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:6,代码来源:FixedXtextSourceViewer.java

示例13: FluentMkSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
/** Creates new source viewer. */
public FluentMkSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
		boolean isOverviewRulerShowing, int styles, IPreferenceStore store) {
	super(parent, ruler, overviewRuler, isOverviewRulerShowing, styles);
	setPreferenceStore(store);
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:7,代码来源:FluentMkSourceViewer.java

示例14: AdaptedSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public AdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
		boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
	super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:5,代码来源:TypeScriptEditor.java

示例15: TypeScriptSourceViewer

import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public TypeScriptSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
		boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
	super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:5,代码来源:TypeScriptSourceViewer.java


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