类org.eclipse.jface.text.source.ISharedTextColors源码实例Demo

下面列出了怎么用org.eclipse.jface.text.source.ISharedTextColors的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: Pydev   文件: BaseEditor.java
@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);
    }
}
 
源代码2 项目: Pydev   文件: MinimapOverviewRuler.java
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);
    }
}
 
源代码3 项目: xtext-eclipse   文件: EmbeddedEditorFactory.java
protected ISharedTextColors getSharedColors() {
	return EditorsUI.getSharedTextColors();
}
 
源代码4 项目: statecharts   文件: StyledTextXtextAdapter.java
protected ISharedTextColors getSharedColors() {
	return EditorsPlugin.getDefault().getSharedTextColors();
}
 
源代码5 项目: APICloud-Studio   文件: XMLFormatterFactory.java
public SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
		IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter)
{
	return new XMLSourceViewerConfiguration(preferenceStore, (AbstractThemeableEditor) editor);
}
 
源代码6 项目: APICloud-Studio   文件: CSSFormatterFactory.java
public SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
		IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter)
{
	return new CSSSourceViewerConfiguration(preferenceStore, (AbstractThemeableEditor) editor);
}
 
源代码7 项目: APICloud-Studio   文件: JSFormatterFactory.java
public SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
		IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter)
{
	return new JSSourceViewerConfiguration(preferenceStore, (AbstractThemeableEditor) editor);
}
 
源代码8 项目: APICloud-Studio   文件: IScriptFormatterFactory.java
SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter);
 
源代码9 项目: APICloud-Studio   文件: HTMLFormatterFactory.java
public SourceViewerConfiguration createSimpleSourceViewerConfiguration(ISharedTextColors colorManager,
		IPreferenceStore preferenceStore, ITextEditor editor, boolean configureFormatter)
{
	return new HTMLSourceViewerConfiguration(preferenceStore, (AbstractThemeableEditor) editor);
}
 
/**
 * 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);
}
 
源代码11 项目: goclipse   文件: AbstractProcessMessageConsole.java
protected ISharedTextColors getColorManager() {
	return ColorManager.getDefault();
}
 
源代码12 项目: Pydev   文件: CopiedOverviewRuler.java
/**
 * Constructs a overview ruler of the given width using the given annotation
 * access and the given color manager.
 *
 * @param annotationAccess the annotation access
 * @param width the width of the vertical ruler
 * @param sharedColors the color manager
 * @param discolorTemporaryAnnotation <code>true</code> if temporary annotations should be discolored
 * @since 3.4
 */
public CopiedOverviewRuler(IAnnotationAccess annotationAccess, int width, ISharedTextColors sharedColors,
        boolean discolorTemporaryAnnotation) {
    fAnnotationAccess = annotationAccess;
    fWidth = width;
    fSharedTextColors = sharedColors;
    fIsTemporaryAnnotationDiscolored = discolorTemporaryAnnotation;
}
 
源代码13 项目: Pydev   文件: CopiedOverviewRuler.java
/**
 * Constructs a overview ruler of the given width using the given annotation access and the given
 * color manager.
 * <p><strong>Note:</strong> As of 3.4, temporary annotations are no longer discolored.
 * Use {@link #OverviewRuler(IAnnotationAccess, int, ISharedTextColors, boolean)} if you
 * want to keep the old behavior.</p>
 *
 * @param annotationAccess the annotation access
 * @param width the width of the vertical ruler
 * @param sharedColors the color manager
 */
public CopiedOverviewRuler(IAnnotationAccess annotationAccess, int width, ISharedTextColors sharedColors) {
    this(annotationAccess, width, sharedColors, false);
}
 
 类所在包
 类方法
 同包方法