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


Java ISharedTextColors类代码示例

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


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

示例1: createOverviewRuler

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的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

示例2: create

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
public static LineNumberChangeRulerColumn create(ISharedTextColors sharedColors) {
	try {
		ProxyFactory factory = new ProxyFactory();
		factory.setSuperclass(LineNumberChangeRulerColumn.class);
		factory.setHandler(new LineNumberChangeRulerColumnMethodHandler());
		return (LineNumberChangeRulerColumn) factory.create(new Class[] { ISharedTextColors.class },
				new Object[] { sharedColors });
	} catch (Exception e) {
		e.printStackTrace();
		return new LineNumberChangeRulerColumn(sharedColors);
	}
}
 
开发者ID:angelozerr,项目名称:codelens-eclipse,代码行数:13,代码来源:LineNumberChangeRulerColumnPatch.java

示例3: SQLEditorSourceViewerConfiguration

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
public SQLEditorSourceViewerConfiguration(ISharedTextColors sharedColors,
        IPreferenceStore store, SQLEditor editor) {
    super(store);
    fSharedColors= sharedColors;
    this.prefs = Activator.getDefault().getPreferenceStore();
    this.editor = editor;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:8,代码来源:SQLEditorSourceViewerConfiguration.java

示例4: configureAnnotationPreferences

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
private SourceViewerDecorationSupport configureAnnotationPreferences() {
	ISharedTextColors textColors = EditorsUI.getSharedTextColors();
	IAnnotationAccess annotationAccess = new DefaultMarkerAnnotationAccess();
	final SourceViewerDecorationSupport support = new SourceViewerDecorationSupport(
			sourceViewer, null, annotationAccess, textColors);

	List annotationPreferences = new MarkerAnnotationPreferences()
	.getAnnotationPreferences();
	Iterator e = annotationPreferences.iterator();
	while (e.hasNext())
		support.setAnnotationPreference((AnnotationPreference) e.next());

	support.install(EditorsUI.getPreferenceStore());
	return support;
}
 
开发者ID:cchabanois,项目名称:mesfavoris,代码行数:16,代码来源:SpellcheckableMessageArea.java

示例5: MinimapOverviewRuler

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
public MinimapOverviewRuler(IAnnotationAccess annotationAccess, ISharedTextColors sharedColors,
        IOutlineModel outlineModel) {
    super(annotationAccess, MinimapOverviewRulerPreferencesPage.getMinimapWidth(), sharedColors);
    this.fOutlineModel = outlineModel;
    propertyListener = new IPropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent event) {
            if (MinimapOverviewRulerPreferencesPage.MINIMAP_WIDTH.equals(event.getProperty())) {
                updateWidth();
            }
        }
    };

    if (outlineModel != null) {
        modelListener = new ICallbackListener<IOutlineModel>() {

            @Override
            public Object call(IOutlineModel obj) {
                lastModelChange = System.currentTimeMillis();
                update();
                return null;
            }
        };
        ICallbackWithListeners<IOutlineModel> onModelChangedListener = outlineModel.getOnModelChangedCallback();
        onModelChangedListener.registerListener(modelListener);
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:29,代码来源:MinimapOverviewRuler.java

示例6: SourceViewer

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的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

示例7: getSharedColors

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
protected ISharedTextColors getSharedColors() {
	return EditorsUI.getSharedTextColors();
}
 
开发者ID:cplutte,项目名称:bts,代码行数:4,代码来源:EmbeddedEditorFactory.java

示例8: createPartControl

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
public void createPartControl(Composite parent)
{
	int VERTICAL_RULER_WIDTH = 12;

	int styles = SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
	ISharedTextColors sharedColors = EditorsPlugin.getDefault().getSharedTextColors();
	IOverviewRuler overviewRuler = new OverviewRuler(null, VERTICAL_RULER_WIDTH, sharedColors);
	CompositeRuler ruler = new CompositeRuler(VERTICAL_RULER_WIDTH);

	_document = new Document();
	_document.set(_docString);

	_annotationModel = new AnnotationModel();
	_annotationModel.connect(_document);

	_sourceViewer = new SourceViewer(parent, ruler, overviewRuler, true, styles);
	_sourceViewer.configure(new SourceViewerConfiguration());

	_sds = new SourceViewerDecorationSupport(_sourceViewer, overviewRuler, null, sharedColors);

	AnnotationPreference ap = new AnnotationPreference();
	ap.setColorPreferenceKey(ANNO_KEY_COLOR);
	ap.setHighlightPreferenceKey(ANNO_KEY_HIGHLIGHT);
	ap.setVerticalRulerPreferenceKey(ANNO_KEY_VERTICAL);
	ap.setOverviewRulerPreferenceKey(ANNO_KEY_OVERVIEW);
	ap.setTextPreferenceKey(ANNO_KEY_TEXT);
	ap.setAnnotationType(ANNO_TYPE);
	_sds.setAnnotationPreference(ap);

	//		_sds.install(EditorsPlugin.getDefault().getPreferenceStore());

	_sourceViewer.setDocument(_document, _annotationModel);

	_sourceViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	ruler.addDecorator(0, new LineNumberRulerColumn());

	Annotation annotation = new Annotation(false);
	annotation.setType(ANNO_TYPE);
	Position position = new Position(0, 4);
	_annotationModel.addAnnotation(annotation, position);
	parent.layout();
}
 
开发者ID:cplutte,项目名称:bts,代码行数:44,代码来源:WrappedSourceViewer.java

示例9: getSharedColors

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
protected ISharedTextColors getSharedColors() {
	return EditorsPlugin.getDefault().getSharedTextColors();
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:4,代码来源:StyledTextXtextAdapter.java

示例10: createSimpleSourceViewerConfiguration

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
public SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
		IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter)
{
	return new XMLSourceViewerConfiguration(preferenceStore, (AbstractThemeableEditor) editor);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:6,代码来源:XMLFormatterFactory.java

示例11: createSimpleSourceViewerConfiguration

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
public SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
		IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter)
{
	return new CSSSourceViewerConfiguration(preferenceStore, (AbstractThemeableEditor) editor);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:6,代码来源:CSSFormatterFactory.java

示例12: createSimpleSourceViewerConfiguration

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
public SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
		IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter)
{
	return new JSSourceViewerConfiguration(preferenceStore, (AbstractThemeableEditor) editor);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:6,代码来源:JSFormatterFactory.java

示例13: createSimpleSourceViewerConfiguration

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter);
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:3,代码来源:IScriptFormatterFactory.java

示例14: createSimpleSourceViewerConfiguration

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
public SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
		IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter)
{
	return new HTMLSourceViewerConfiguration(preferenceStore, (AbstractThemeableEditor) editor);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:6,代码来源:HTMLFormatterFactory.java

示例15: CommonLineNumberChangeRulerColumn

import org.eclipse.jface.text.source.ISharedTextColors; //导入依赖的package包/类
/**
 * Creates a new instance.
 *
 * @param sharedColors the shared colors provider to use
 */
public CommonLineNumberChangeRulerColumn(ISharedTextColors sharedColors) {
	Assert.isNotNull(sharedColors);
	fRevisionPainter= new RevisionPainter(this, sharedColors);
	fDiffPainter= new DiffPainter(this, sharedColors);
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:11,代码来源:CommonLineNumberChangeRulerColumn.java


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