1.1 --- a/corba/src/org/netbeans/modules/corba/idl/editor/settings/IDLEditorSettingsInitializer.java Wed Apr 12 11:42:38 2000 +0000
1.2 +++ b/corba/src/org/netbeans/modules/corba/idl/editor/settings/IDLEditorSettingsInitializer.java Thu Apr 13 19:44:40 2000 +0000
1.3 @@ -18,6 +18,7 @@
1.4
1.5 import java.awt.Color;
1.6 import java.awt.Font;
1.7 +import com.netbeans.editor.BaseKit;
1.8 import com.netbeans.editor.Settings;
1.9 import com.netbeans.editor.SettingsUtil;
1.10 import com.netbeans.editor.SettingsNames;
1.11 @@ -29,23 +30,16 @@
1.12
1.13 public class IDLEditorSettingsInitializer implements Settings.Initializer {
1.14
1.15 - public Map updateSettingsMap (Class kitClass, Map settingsMap) {
1.16 + public void updateSettingsMap (Class kitClass, Map settingsMap) {
1.17
1.18 - if (kitClass == IDLKit.class) {
1.19 -
1.20 - if (settingsMap == null) {
1.21 - settingsMap = new HashMap();
1.22 - }
1.23 -
1.24 - settingsMap.put (SettingsNames.ABBREV_MAP, getIDLAbbrevMap());
1.25 -
1.26 + // IDL Colorings
1.27 + if (kitClass == BaseKit.class) {
1.28 Font boldFont = SettingsDefaults.defaultFont.deriveFont(Font.BOLD);
1.29 Font italicFont = SettingsDefaults.defaultFont.deriveFont(Font.ITALIC);
1.30 Settings.Evaluator boldSubst = new SettingsUtil.FontStylePrintColoringEvaluator(Font.BOLD);
1.31 Settings.Evaluator italicSubst = new SettingsUtil.FontStylePrintColoringEvaluator(Font.ITALIC);
1.32 Settings.Evaluator lightGraySubst = new SettingsUtil.ForeColorPrintColoringEvaluator(Color.lightGray);
1.33
1.34 - // Colorings
1.35 SettingsUtil.setColoring(settingsMap, IDLSyntax.TEXT.getName(),
1.36 new Coloring(null, null, null)
1.37 );
1.38 @@ -108,30 +102,21 @@
1.39 new Coloring(null, Color.green.darker().darker(), null)
1.40 );
1.41
1.42 - SettingsUtil.updateListSetting(settingsMap, SettingsNames.COLORING_NAME_LIST,
1.43 - new String[] {
1.44 - IDLSyntax.TEXT.getName(),
1.45 - IDLSyntax.ERROR.getName(),
1.46 - IDLSyntax.KEYWORD.getName(),
1.47 - IDLSyntax.IDENTIFIER.getName(),
1.48 - IDLSyntax.METHOD.getName(),
1.49 - IDLSyntax.OPERATOR.getName(),
1.50 - IDLSyntax.LINE_COMMENT.getName(),
1.51 - IDLSyntax.BLOCK_COMMENT.getName(),
1.52 - IDLSyntax.CHAR.getName(),
1.53 - IDLSyntax.STRING.getName(),
1.54 - IDLSyntax.INT.getName(),
1.55 - IDLSyntax.HEX.getName(),
1.56 - IDLSyntax.OCTAL.getName(),
1.57 - IDLSyntax.LONG.getName(),
1.58 - IDLSyntax.FLOAT.getName(),
1.59 - IDLSyntax.DIRECTIVE.getName()
1.60 + }
1.61 +
1.62 +
1.63 + if (kitClass == IDLKit.class) {
1.64 +
1.65 + settingsMap.put (SettingsNames.ABBREV_MAP, getIDLAbbrevMap());
1.66 +
1.67 + SettingsUtil.updateListSetting(settingsMap, SettingsNames.SYNTAX_CLASS_LIST,
1.68 + new Class[] {
1.69 + IDLSyntax.class,
1.70 }
1.71 );
1.72
1.73 }
1.74 - return settingsMap;
1.75 - }
1.76 + }
1.77
1.78 Map getIDLAbbrevMap() {
1.79 Map idlAbbrevMap = new HashMap();
1.80 @@ -182,6 +167,8 @@
1.81
1.82 /*
1.83 * <<Log>>
1.84 + * 4 Jaga 1.3 4/13/00 Miloslav Metelka token colorings in
1.85 + * base-kit settings
1.86 * 3 Jaga 1.2 3/24/00 Miloslav Metelka renaming
1.87 * 2 Jaga 1.1 3/22/00 Miloslav Metelka fix
1.88 * 1 Jaga 1.0 3/15/00 Miloslav Metelka