|
org.netbeans.modules.editor.settings/1 1.4.31 | |||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Editor Settings | |
---|---|
org.netbeans.api.editor.settings |
It is a module located under /cvs/editor/settings directory.
It consists ofEditor Settings module defines EditorSettingsAPI.
API contains abstract classes, responsible for particular editor settings:
The particular mime-type settings can be found for example using the following
mimelookup search:
FontColorSettings fcs = (FontColorSettings) MimeLookup.getMimeLookup("text/x-java").lookup(FontColorSettings.class);
The Javadoc documentation can be generated by using
cd /cvs/editor/settings ant javadoc
Editor Settings API was created. It defines settings classes, which can be looked up via mimelookup.
FontColorSettings fcs = (FontColorSettings) MimeLookup.getMimeLookup("text/x-java").lookup(FontColorSettings.class); AttributeSet fontColors = fcs.getFontColors(FontColorNames.SELECTION_COLORING);This will resolve Fonts ant Colors settings of the coloring used for selection for the mime-type "text/x-java" in AttributeSet representation.
Lookup.Template
by registering LookupListener
on the returned Lookup.Result.
LookupResult fontsColors = MimeLookup.getMimeLookup("text/x-java").lookup( new Lookup.Template(FontColorSettings.class)); if (fontsColors !=null) { fontsColors.addLookupListener(new LookupListener(){ public void resultChanged(LookupEvent ev) { Lookup.Result result = ((Lookup.Result)ev.getSource()); //... settings client response on settings change } }); }
|
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.editor.settings/1 > 1.4.31
Read more about the implementation in the answers to architecture questions.
|
org.netbeans.modules.editor.settings/1 1.4.31 | |||||||||
PREV NEXT | FRAMES NO FRAMES |