Re: get all highlight information (position + color)

geertjan wielenga <[email protected]> Sat, 15 Apr 2017 17:50:40 +0200
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Organization Oracle Corporation
Message-ID <[email protected]>
Which plugin, where? What does it mean "to show the highlighted 
occurrences words"? And why? What is it you're trying to do, what is the 
plugin trying to achieve.


Gj


On 15-4-2017 17:48, Peter Cheung wrote:
>
> Sorry, you email dropped to my junk box. I am enhancing my minimal 
> plugin and want to show the highlighted occurrences words. So I need 
> to know what positions of the current occurrence word.
>
>
> Below is my code up to, but seems can get the information I want:
>
>
> Lookup.Result<HighlightsLayerFactory> factories = lookup.lookup(new 
> Lookup.Template<HighlightsLayerFactory>(HighlightsLayerFactory.class));
>
> Collection<? extends HighlightsLayerFactory> all = 
> factories.allInstances();
>
> HashMap<String, HighlightsLayer> layers = new HashMap<String, 
> HighlightsLayer>();
>
> Iterator it = layers.entrySet().iterator();
>
> while (it.hasNext()) {
>
> Map.Entry pair = (Map.Entry) it.next();
>
> ModuleLib.log(pair.getKey() + " = " + pair.getValue());
>
> }
>
>
> Thanks for helping
>
>
>
> ------------------------------------------------------------------------
> *From:* geertjan wielenga <[email protected]>
> *Sent:* Saturday, April 15, 2017 11:38 PM
> *To:* [email protected]
> *Subject:* [platform-dev] Re: get all highlight information (position 
> + color)
>
>
> I doubt anyone can help you -- not sure what it is you're talking 
> about. Are you talking about the Output window? Or an editor? Which 
> editor?
>
>
> And why -- what is the use case you're trying to address?
>
>
> Gj
>
>
> On 10-4-2017 5:49, Peter Cheung wrote:
>>
>> Hi
>>
>>     May I know how to get all highlight information (position + color)?
>>
>> thanks
>>
>> from Peter
>>
>