本文整理汇总了Java中org.netbeans.spi.editor.highlighting.HighlightsLayer.create方法的典型用法代码示例。如果您正苦于以下问题:Java HighlightsLayer.create方法的具体用法?Java HighlightsLayer.create怎么用?Java HighlightsLayer.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.spi.editor.highlighting.HighlightsLayer
的用法示例。
在下文中一共展示了HighlightsLayer.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
@Override
public HighlightsLayer[] createLayers(Context context) {
Document document = context.getDocument();
if (!(document instanceof StyledDocument)) {
return new HighlightsLayer[0];
}
AbstractSemanticHighlighter<?> highlighter = (AbstractSemanticHighlighter<?>)document.getProperty(highlighterClass);
if (highlighter == null) {
highlighter = createHighlighter(context);
highlighter.initialize();
document.putProperty(highlighterClass, highlighter);
}
highlighter.addComponent(context.getComponent());
return new HighlightsLayer[] { HighlightsLayer.create(highlighterClass.getName(), getPosition(), true, highlighter) };
}
示例2: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public HighlightsLayer[] createLayers(Context context) {
OffsetsBag bag = AnnotationHolder.getBag(context.getDocument());
return new HighlightsLayer[] {
HighlightsLayer.create(AnnotationHolder.class.getName(), ZOrder.SHOW_OFF_RACK.forPosition(420), true, bag),
};
}
示例3: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public @Override HighlightsLayer[] createLayers(final Context context) {
AttributeSet _attrs = MimeLookup.getLookup("text/x-jsp").lookup(FontColorSettings.class).getTokenFontColors("expression-language"); // NOI18N
final AttributeSet attrs;
if (_attrs == null) {
// Fallback from web.core.syntax/src/org/netbeans/modules/web/core/syntax/resources/fontsColors.xml:
SimpleAttributeSet _sattrs = new SimpleAttributeSet();
_sattrs.addAttribute(StyleConstants.Background, new Color(0xe3f2e1));
attrs = _sattrs;
} else {
attrs = _attrs;
}
return new HighlightsLayer[] {HighlightsLayer.create("ant", ZOrder.SYNTAX_RACK.forPosition(10), true,
new AntHighlightsContainer((AbstractDocument) context.getDocument(), attrs))}; // NOI18N
}
示例4: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public HighlightsLayer[] createLayers(Context context) {
return new HighlightsLayer[] {
HighlightsLayer.create(DebuggingHighlightsLayerFactory.class.getName(),
ZOrder.SYNTAX_RACK,
true,
getBag(context.getDocument()))
};
}
示例5: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public HighlightsLayer[] createLayers (Context context) {
Document document = context.getDocument ();
// try {
// if (LanguagesManager.getDefault ().getLanguage (mimeType).getParser () == null)
// return null;
return new HighlightsLayer[] {
HighlightsLayer.create (
"GLF Semantic Coloring",
ZOrder.SYNTAX_RACK.forPosition (10),
false,
new SemanticHighlightsLayer (document)
),
HighlightsLayer.create (
"GLF Languages Coloring",
ZOrder.SYNTAX_RACK.forPosition (11),
false,
new LanguagesHighlightsLayer (document)
),
HighlightsLayer.create (
"GLF Token Highlighting",
ZOrder.SHOW_OFF_RACK.forPosition (0),
false,
new TokenHighlightsLayer (document)
)
};
// } catch (LanguageDefinitionNotFoundException ex) {
// return null;
// }
}
示例6: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public HighlightsLayer[] createLayers(Context context) {
//LexerBasedHighlightLayer semantic = LexerBasedHighlightLayer.getLayer(SemanticHighlighter.class, context.getDocument());
GsfSemanticLayer semantic = GsfSemanticLayer.getLayer(SemanticHighlighter.class, context.getDocument());
GsfSemanticLayer occurrences = (GsfSemanticLayer)MarkOccurrencesHighlighter.getHighlightsBag(context.getDocument());
semantic.clearColoringCache();
return new HighlightsLayer[] {
HighlightsLayer.create(SemanticHighlighter.class.getName() + "-1", ZOrder.SYNTAX_RACK.forPosition(1000), false, semantic),
// HighlightsLayer.create(SemanticHighlighter.class.getName() + "-2", ZOrder.SYNTAX_RACK.forPosition(1500), false, SemanticHighlighter.getImportHighlightsBag(context.getDocument())),
//the mark occurrences layer should be "above" current row and "below" the search layers:
HighlightsLayer.create(MarkOccurrencesHighlighter.class.getName(), ZOrder.CARET_RACK.forPosition(50), false, occurrences),
//"above" mark occurrences, "below" search layers:
HighlightsLayer.create(InstantRenamePerformer.class.getName(), ZOrder.CARET_RACK.forPosition(75), false, InstantRenamePerformer.getHighlightsBag(context.getDocument())),
};
}
示例7: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public HighlightsLayer[] createLayers(Context context) {
return new HighlightsLayer [] {
HighlightsLayer.create(
"org-netbeans-modules-editor-bracesmatching-BracesMatchHighlighting", //NOI18N
ZOrder.SHOW_OFF_RACK.forPosition(400),
true,
new BracesMatchHighlighting(context.getComponent(), context.getDocument())
)
};
}
示例8: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
@Override
public HighlightsLayer[] createLayers(Context context) {
return new HighlightsLayer[] {
HighlightsLayer.create(DebuggerAnnotation.class.getName(),
ZOrder.TOP_RACK, true, DebuggerAnnotation.getHighlightsBag(context.getDocument()))
};
}
示例9: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
@Override
public HighlightsLayer[] createLayers(Context context) {
Document doc = context.getDocument();
if (!(doc instanceof BaseDocument)) {
return null;
} else {
ensureAttached((BaseDocument) doc);
return new HighlightsLayer[] {
HighlightsLayer.create(HighlightURLs.class.getName(), ZOrder.SYNTAX_RACK.forPosition(4950), false, getBag(doc)),
};
}
}
示例10: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public HighlightsLayer[] createLayers(Context context) {
JTextComponent component = context.getComponent();
CoverageHighlightsContainer container = new CoverageHighlightsContainer(component);
component.putClientProperty(CONTAINER_PROP_NAME, container);
return new HighlightsLayer[]{HighlightsLayer.create(CONTAINER_PROP_NAME,
ZOrder.DEFAULT_RACK.forPosition(80),
true, container)}; //NOI18N
}
示例11: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public HighlightsLayer[] createLayers(Context context) {
return new HighlightsLayer[]{
HighlightsLayer.create(
"org.netbeans.lib.editor.codetemplates.CodeTemplateParametersHighlights", //NOI18N
ZOrder.SHOW_OFF_RACK.forPosition(490),
true,
getBag(context.getDocument()))
};
}
示例12: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
@Override
public HighlightsLayer[] createLayers(Context context) {
return new HighlightsLayer[]{HighlightsLayer.create(
"rhtml-embedded-ruby-scriplets-highlighting-layer", //NOI18N
ZOrder.BOTTOM_RACK.forPosition(100),
true,
new EmbeddedSectionsHighlighting(context.getDocument()))};
}
示例13: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
public HighlightsLayer[] createLayers(Context context) {
return new HighlightsLayer[]{ HighlightsLayer.create(
"el-embedded-xhtml-highlighting-layer", //NOI18N
ZOrder.BOTTOM_RACK.forPosition(150), //we need to have lower priority than the default syntax from options - 0
true,
new XhtmlElHighlighting(context.getDocument())
)};
}
示例14: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
@Override
public HighlightsLayer[] createLayers(Context context) {
return new HighlightsLayer[] { HighlightsLayer.create(
"BeyondDocEndHighlightsLayer",
ZOrder.DEFAULT_RACK,
false,
new BeyondDocEndHighlightsLayer(context.getDocument()))
};
}
示例15: createLayers
import org.netbeans.spi.editor.highlighting.HighlightsLayer; //导入方法依赖的package包/类
@Override
public HighlightsLayer[] createLayers(Context context) {
MergePane master = (MergePane) context.getComponent().getClientProperty(HIGHLITING_LAYER_ID);
if (master == null) return null;
HighlightsLayer [] layers = new HighlightsLayer[1];
layers[0] = HighlightsLayer.create(HIGHLITING_LAYER_ID, ZOrder.DEFAULT_RACK, true, master);
return layers;
}