Index: text-edit/src/org/netbeans/modules/xml/text/completion/XMLCompletionQuery.java =================================================================== RCS file: /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/completion/XMLCompletionQuery.java,v retrieving revision 1.17 diff -u -r1.17 XMLCompletionQuery.java --- text-edit/src/org/netbeans/modules/xml/text/completion/XMLCompletionQuery.java 1 Jul 2002 17:34:31 -0000 1.17 +++ text-edit/src/org/netbeans/modules/xml/text/completion/XMLCompletionQuery.java 17 Jul 2002 15:13:54 -0000 @@ -145,6 +145,7 @@ } } else { switch (id) { + case XMLDefaultTokenContext.TEXT_ID: case XMLDefaultTokenContext.TAG_ID: case XMLDefaultTokenContext.ARGUMENT_ID: case XMLDefaultTokenContext.CHARACTER_ID: Index: text-edit/src/org/netbeans/modules/xml/text/resources/XMLEditor-abbreviations.xml =================================================================== RCS file: /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/resources/XMLEditor-abbreviations.xml,v retrieving revision 1.1 diff -u -r1.1 XMLEditor-abbreviations.xml --- text-edit/src/org/netbeans/modules/xml/text/resources/XMLEditor-abbreviations.xml 26 Jun 2002 21:45:03 -0000 1.1 +++ text-edit/src/org/netbeans/modules/xml/text/resources/XMLEditor-abbreviations.xml 17 Jul 2002 15:13:54 -0000 @@ -15,7 +15,7 @@ - <?xml version="1.0" encoding="UTF-8" ?> + <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE <![CDATA[|]]> Index: text-edit/src/org/netbeans/modules/xml/text/syntax/XMLSettingsInitializer.java =================================================================== RCS file: /cvs/xml/text-edit/src/org/netbeans/modules/xml/text/syntax/XMLSettingsInitializer.java,v retrieving revision 1.13 diff -u -r1.13 XMLSettingsInitializer.java --- text-edit/src/org/netbeans/modules/xml/text/syntax/XMLSettingsInitializer.java 28 Jun 2002 20:25:05 -0000 1.13 +++ text-edit/src/org/netbeans/modules/xml/text/syntax/XMLSettingsInitializer.java 17 Jul 2002 15:13:55 -0000 @@ -94,11 +94,6 @@ new TokenContext[] { XMLDefaultTokenContext.context } ); - settingsMap.put(SettingsNames.MACRO_MAP, getXMLMacroMap()); - - SettingsUtil.updateListSetting(settingsMap, SettingsNames.KEY_BINDING_LIST, - getXMLKeyBindings()); - settingsMap.put(SettingsNames.IDENTIFIER_ACCEPTOR, getXMLIdentifierAcceptor()); } @@ -117,89 +112,47 @@ } Map getXMLAbbrevMap() { - Map xmlAbbrevMap = getDTDAbbrevMap(); - xmlAbbrevMap.put ("?xm", ""); // NOI18N + Map xmlAbbrevMap = new TreeMap(); + + xmlAbbrevMap.put ("?xm", ""); // NOI18N xmlAbbrevMap.put ("!do", ""); // NOI18N + xmlAbbrevMap.put ("!at", ""); // NOI18N + xmlAbbrevMap.put ("!el", ""); // NOI18N + xmlAbbrevMap.put ("!en", ""); // NOI18N + xmlAbbrevMap.put ("pu", "PUBLIC \"|\""); // NOI18N + xmlAbbrevMap.put ("sy", "SYSTEM \"|\""); // NOI18N + return xmlAbbrevMap; } Map getDTDAbbrevMap() { - Map dtdAbbrevMap = new TreeMap (); - dtdAbbrevMap.put ("!el", ""); // NOI18N + dtdAbbrevMap.put ("!el", ""); // NOI18N + dtdAbbrevMap.put ("!en", ""); // NOI18N + dtdAbbrevMap.put ("!no", ""); // NOI18N + dtdAbbrevMap.put ("cd", "CDATA"); // NOI18N + dtdAbbrevMap.put ("em", "EMPTY"); // NOI18N + dtdAbbrevMap.put ("en", "ENTITY"); // NOI18N + dtdAbbrevMap.put ("ens", "ENTITIES"); // NOI18N + dtdAbbrevMap.put ("fi", "#FIXED"); // NOI18N + dtdAbbrevMap.put ("im", "#IMPLIED"); // NOI18N + dtdAbbrevMap.put ("nm", "NMTOKEN"); // NOI18N dtdAbbrevMap.put ("nms", "NMTOKENS"); // NOI18N - dtdAbbrevMap.put ("rf", "IDREF"); // NOI18N + dtdAbbrevMap.put ("nn", "NOTATION"); // NOI18N + dtdAbbrevMap.put ("pc", "#PCDATA"); // NOI18N + dtdAbbrevMap.put ("pu", "PUBLIC \"|\""); // NOI18N + dtdAbbrevMap.put ("re", "#REQUIRED"); // NOI18N + dtdAbbrevMap.put ("rf", "IDREF"); // NOI18N dtdAbbrevMap.put ("rfs", "IDREFS"); // NOI18N - dtdAbbrevMap.put ("en", "ENTITY"); // NOI18N - dtdAbbrevMap.put ("ens", "ENTITIES"); // NOI18N - dtdAbbrevMap.put ("nn", "NOTATION"); // NOI18N + dtdAbbrevMap.put ("sy", "SYSTEM \"|\""); // NOI18N return dtdAbbrevMap; } - - - /* - * Editor is bundled with one usefull macro, bind it - */ - MultiKeyBinding[] getXMLKeyBindings() { - return new MultiKeyBinding[] { - - new MultiKeyBinding( - new KeyStroke[] { - KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_MASK), - }, - "macro-put-end-tag" // NOI18N - ), - - new MultiKeyBinding( - KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK), - XMLKit.xmlCommentAction - ), - - new MultiKeyBinding( - KeyStroke.getKeyStroke(KeyEvent.VK_D, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK), - XMLKit.xmlUncommentAction - ), - - }; - } - - - // just a temporary macro emulating put-end-tag - Map getXMLMacroMap() { - Map xmlMacroMap = new HashMap(); - - // the macro uses trick with marking current position with "<" - // then select it and instruct all subsequent finds to use it - // it is very sensitive for exact find action sematics - - // it destroys users clipboard content and search selections - - xmlMacroMap.put( "put-end-tag", "\"<\" selection-backward find-selection find-previous find-previous caret-forward caret-forward\n" + // NOI18N - "select-identifier copy-to-clipboard caret-backward caret-forward\n" + // NOI18N - "find-next caret-backward caret-forward\n" + // NOI18N - "\"/\" paste-from-clipboard \">\"\n" + // NOI18N - "find-previous caret-forward caret-backward"); // NOI18N - - return xmlMacroMap; - } - - /* * Identifiers accept all NameChar [4]. */ @@ -386,7 +339,7 @@ case DTDTokenContext.COMMENT_ID: return new Coloring(italicFont, Coloring.FONT_MODE_APPLY_STYLE, - Color.lightGray, null); + Color.gray, null); case DTDTokenContext.KW_ID: return new Coloring(boldFont, Color.blue.darker().darker(), null);