diff options
author | nitind | 2009-01-07 20:22:17 +0000 |
---|---|---|
committer | nitind | 2009-01-07 20:22:17 +0000 |
commit | 96b3ab10bbafe8d616f896d902e98667b789d738 (patch) | |
tree | 8eb2e5ce58a06075739df3a7c4390f3acd20d1f2 | |
parent | 651a7faf087fdcf46071c701f661bb78fd94388c (diff) | |
download | webtools.sourceediting-96b3ab10bbafe8d616f896d902e98667b789d738.tar.gz webtools.sourceediting-96b3ab10bbafe8d616f896d902e98667b789d738.tar.xz webtools.sourceediting-96b3ab10bbafe8d616f896d902e98667b789d738.zip |
[nobug] cleanup
-rw-r--r-- | bundles/org.eclipse.wst.sse.ui/plugin.xml | 28 | ||||
-rw-r--r-- | bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java | 59 |
2 files changed, 45 insertions, 42 deletions
diff --git a/bundles/org.eclipse.wst.sse.ui/plugin.xml b/bundles/org.eclipse.wst.sse.ui/plugin.xml index 007a3da2fd..0440d803da 100644 --- a/bundles/org.eclipse.wst.sse.ui/plugin.xml +++ b/bundles/org.eclipse.wst.sse.ui/plugin.xml @@ -648,20 +648,20 @@ </visibleWhen> </command> - </menuContribution> - - <!-- - Allow for sharing via ECF when present. Will cause class load failure log messsages since visibility doesn't affect whether the class is loaded in 3.4. - https://bugs.eclipse.org/bugs/show_bug.cgi?id=201589#c9 - --> - <menuContribution locationURI="popup:org.eclipse.wst.sse.ui.StructuredTextEditor.EditorContext?after=additions"> - <dynamic id="org.eclipse.wst.sse.ui.StructuredTextEditor.EditorContext.DocShareRosterMenu"> - <class class="org.eclipse.ecf.internal.provisional.docshare.menu.DocShareRosterMenuContributionItem" /> - <visibleWhen> - <test property="org.eclipse.core.runtime.isBundleInstalled" args="org.eclipse.ecf.docshare"/> - </visibleWhen> - </dynamic> - </menuContribution> + </menuContribution> + <!-- + Allow for sharing via ECF when present. Will cause class load failure + log messsages since visibility doesn't affect whether the class is + loaded in 3.4. https://bugs.eclipse.org/bugs/show_bug.cgi?id=201589#c9 + --> + <menuContribution locationURI="popup:org.eclipse.wst.sse.ui.StructuredTextEditor.EditorContext?after=additions"> + <dynamic id="org.eclipse.wst.sse.ui.StructuredTextEditor.EditorContext.DocShareRosterMenu"> + <class class="org.eclipse.ecf.internal.provisional.docshare.menu.DocShareRosterMenuContributionItem" /> + <visibleWhen> + <test property="org.eclipse.core.runtime.isBundleInstalled" args="org.eclipse.ecf.docshare" /> + </visibleWhen> + </dynamic> + </menuContribution> </extension> <extension diff --git a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java index 2584548982..938c793a27 100644 --- a/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java +++ b/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2007 IBM Corporation and others. + * Copyright (c) 2001, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,77 +36,80 @@ public class LineStyleProviderForXML extends AbstractLineStyleProvider implement if (region == null) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_TEXT); } + String type = region.getType(); if ((type == DOMRegionContext.XML_CONTENT) || (type == DOMRegionContext.XML_DOCTYPE_INTERNAL_SUBSET)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.XML_CONTENT); } - else if ((type == DOMRegionContext.XML_TAG_OPEN) || (type == DOMRegionContext.XML_END_TAG_OPEN) || (type == DOMRegionContext.XML_TAG_CLOSE) || (type == DOMRegionContext.XML_EMPTY_TAG_CLOSE)) { + if ((type == DOMRegionContext.XML_TAG_OPEN) || (type == DOMRegionContext.XML_END_TAG_OPEN) || (type == DOMRegionContext.XML_TAG_CLOSE) || (type == DOMRegionContext.XML_EMPTY_TAG_CLOSE)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_BORDER); } - else if ((type == DOMRegionContext.XML_CDATA_OPEN) || (type == DOMRegionContext.XML_CDATA_CLOSE)) { + if ((type == DOMRegionContext.XML_CDATA_OPEN) || (type == DOMRegionContext.XML_CDATA_CLOSE)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_BORDER); } - else if (type == DOMRegionContext.XML_CDATA_TEXT) { + if (type == DOMRegionContext.XML_CDATA_TEXT) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_TEXT); } - else if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) { + if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_NAME); } - else if (type == DOMRegionContext.XML_DOCTYPE_DECLARATION) { + if (type == DOMRegionContext.XML_DOCTYPE_DECLARATION) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_NAME); } - else if (type == DOMRegionContext.XML_TAG_NAME) { + if (type == DOMRegionContext.XML_TAG_NAME) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_NAME); } - else if ((type == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) { + if ((type == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE); } - else if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) { + if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS); } - else if ((type == DOMRegionContext.XML_COMMENT_OPEN) || (type == DOMRegionContext.XML_COMMENT_CLOSE)) { + if ((type == DOMRegionContext.XML_COMMENT_OPEN) || (type == DOMRegionContext.XML_COMMENT_CLOSE)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.COMMENT_BORDER); } - else if (type == DOMRegionContext.XML_COMMENT_TEXT) { + if (type == DOMRegionContext.XML_COMMENT_TEXT) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.COMMENT_TEXT); } - else if (type == DOMRegionContext.XML_DOCTYPE_NAME) { + if (type == DOMRegionContext.XML_DOCTYPE_NAME) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DOCTYPE_NAME); } - else if ((type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE) || (type == DOMRegionContext.XML_PE_REFERENCE)) { + if ((type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE) || (type == DOMRegionContext.XML_PE_REFERENCE)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.ENTITY_REFERENCE); } - else if (type == DOMRegionContext.XML_PI_CONTENT) { + if (type == DOMRegionContext.XML_PI_CONTENT) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.PI_CONTENT); } - else if ((type == DOMRegionContext.XML_PI_OPEN) || (type == DOMRegionContext.XML_PI_CLOSE)) { + if ((type == DOMRegionContext.XML_PI_OPEN) || (type == DOMRegionContext.XML_PI_CLOSE)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.PI_BORDER); } - else if ((type == DOMRegionContext.XML_DECLARATION_OPEN) || (type == DOMRegionContext.XML_DECLARATION_CLOSE)) { + if ((type == DOMRegionContext.XML_DECLARATION_OPEN) || (type == DOMRegionContext.XML_DECLARATION_CLOSE)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DECL_BORDER); } - else if (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSREF) { + if (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSREF) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF); } - else if (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBREF) { + if (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBREF) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF); } - else if ((type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBLIC) || (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSTEM)) { + if ((type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_PUBLIC) || (type == DOMRegionContext.XML_DOCTYPE_EXTERNAL_ID_SYSTEM)) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID); } - else if (type == DOMRegionContext.UNDEFINED) { + if (type == DOMRegionContext.UNDEFINED) { return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_TEXT); } - else if (type == DOMRegionContext.WHITE_SPACE) { - // white space is normall not on its own ... but when it is, we'll - // treat as content + if (type == DOMRegionContext.WHITE_SPACE) { + /* + * White space is normally not on its own ... but when it is, + * we'll treat as content + */ return (TextAttribute) getTextAttributes().get(IStyleConstantsXML.XML_CONTENT); } - else { - // default, return null to signal "not handled" - // in which case, other factories should be tried - return null; - } + /* + * default, return null to signal "not handled" in which case, other + * providers should be tried + */ + return null; } protected IPreferenceStore getColorPreferences() { |