what is my next step to get the highlight occurrence position information
Peter Cheung <[email protected]> Sat, 8 Jul 2017 06:42:23 +0000
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <HK2PR0401MB142795A04B5D919C09DD0180B5AB0@HK2PR0401MB1427.apcprd04.prod.outlook.com> |
Hi All
I use these to get all HighlightsLayerFactory, what is my next step to get the highlight occurrence position information in current editor?
Lookup.Result<HighlightsLayerFactory> factories = lookup.lookup(new Lookup.Template<HighlightsLayerFactory>(HighlightsLayerFactory.class));
Collection<? extends HighlightsLayerFactory> all = factories.allInstances();
for (HighlightsLayerFactory fac: all){
ModuleLib.log("fac = " + fac);
}
Will print out:
14:41:2.216 - fac = org.netbeans.modules.refactoring.java.ui.HighlightsLayerFactory@9fbf0a9
14:41:2.216 - fac = org.netbeans.modules.java.editor.codegen.RemoveSurroundingCodePanel$UnwrapCodeHighlightsLayerFactory@1fcff640
14:41:2.216 - fac = org.netbeans.modules.java.hints.introduce.IntroduceHint$HLFImpl@7d1e9f4d
14:41:2.216 - fac = org.netbeans.modules.gsf.codecoverage.CoverageHighlightsLayerFactory@7bb11ddd
14:41:2.216 - fac = org.netbeans.modules.javadoc.highlighting.Factory@b83fa8c
14:41:2.216 - fac = org.netbeans.modules.java.debug.HighlightsLayerFactoryImpl@6b9e604a
14:41:2.216 - fac = org.netbeans.modules.java.editor.semantic.HighlightsLayerFactoryImpl@62736e83
14:41:2.216 - fac = org.netbeans.spi.debugger.ui.MethodChooser$MethodChooserHighlightsLayerFactory@11dfd8e5
14:41:2.216 - fac = org.netbeans.modules.debugger.jpda.projectsui.HighlightsLayerFactoryImpl@51c17c8
14:41:2.216 - fac = org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager$Highlighting$HLFactory@1d98ab11
14:41:2.216 - fac = org.netbeans.modules.merge.builtin.visualizer.MergeHighlightsLayerFactory@64e6c957
14:41:2.216 - fac = org.netbeans.modules.diff.builtin.visualizer.editable.DiffHighlightsLayerFactory@b113dde
14:41:2.216 - fac = org.netbeans.modules.editor.impl.highlighting.HLFactory@6ed6c923
14:41:2.216 - fac = org.netbeans.modules.editor.hints.HighlightsLayerFactoryImpl@364e27cb
14:41:2.216 - fac = org.netbeans.modules.editor.bracesmatching.BracesMatchHighlighting$Factory@6430fc24
14:41:2.217 - fac = org.netbeans.lib.editor.hyperlink.HyperlinkOperation$HighlightFactoryImpl@664dd2b1
14:41:2.217 - fac = org.netbeans.modules.editor.lib2.highlighting.Factory@3e0a908a
14:41:2.217 - fac = org.netbeans.modules.editor.search.TextSearchHighlighting$FactoryImpl@793d88ff
14:41:2.217 - fac = org.netbeans.modules.editor.url.HighlightURLs$FactoryImpl@1a8f9a20
Thanks
from Peter