本文整理汇总了Java中com.intellij.openapi.editor.colors.impl.EditorColorsSchemeImpl类的典型用法代码示例。如果您正苦于以下问题:Java EditorColorsSchemeImpl类的具体用法?Java EditorColorsSchemeImpl怎么用?Java EditorColorsSchemeImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EditorColorsSchemeImpl类属于com.intellij.openapi.editor.colors.impl包,在下文中一共展示了EditorColorsSchemeImpl类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testInfoTestAttributes
import com.intellij.openapi.editor.colors.impl.EditorColorsSchemeImpl; //导入依赖的package包/类
public void testInfoTestAttributes() throws Exception {
LanguageExtensionPoint<Annotator> extension = new LanguageExtensionPoint<Annotator>();
extension.language="TEXT";
extension.implementationClass = TestAnnotator.class.getName();
PlatformTestUtil.registerExtension(ExtensionPointName.create(LanguageAnnotators.EP_NAME), extension, getTestRootDisposable());
myFixture.configureByText(PlainTextFileType.INSTANCE, "foo");
EditorColorsScheme scheme = new EditorColorsSchemeImpl(new DefaultColorsScheme()){{initFonts();}};
scheme.setAttributes(HighlighterColors.TEXT, new TextAttributes(Color.black, Color.white, null, null, Font.PLAIN));
((EditorEx)myFixture.getEditor()).setColorsScheme(scheme);
myFixture.doHighlighting();
MarkupModel model = DocumentMarkupModel.forDocument(myFixture.getEditor().getDocument(), getProject(), false);
RangeHighlighter[] highlighters = model.getAllHighlighters();
assertEquals(1, highlighters.length);
TextAttributes attributes = highlighters[0].getTextAttributes();
assertNotNull(attributes);
assertNull(attributes.getBackgroundColor());
assertNull(attributes.getForegroundColor());
}
示例2: fillActions
import com.intellij.openapi.editor.colors.impl.EditorColorsSchemeImpl; //导入依赖的package包/类
protected void fillActions(Project project, @NotNull DefaultActionGroup group, @NotNull DataContext dataContext) {
final EditorColorsScheme[] schemes = EditorColorsManager.getInstance().getAllSchemes();
EditorColorsScheme current = EditorColorsManager.getInstance().getGlobalScheme();
for (final EditorColorsScheme scheme : schemes) {
addScheme(group, current, scheme, false);
}
Collection<SharedScheme<EditorColorsSchemeImpl>> sharedSchemes = ((EditorColorsManagerImpl)EditorColorsManager.getInstance()).getSchemesManager().loadSharedSchemes();
if (!sharedSchemes.isEmpty()) {
group.add(Separator.getInstance());
for (SharedScheme<EditorColorsSchemeImpl> sharedScheme : sharedSchemes) {
addScheme(group, current, sharedScheme.getScheme(), true);
}
}
}