Author: sdzmitrovich
Date: 2009-08-21 05:46:00 -0400 (Fri, 21 Aug 2009)
New Revision: 17207
Added:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlinkPartitioner.java
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPCSSClassHyperlinkPartitioner.java
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPCSSClassHyperlinkPartitioner.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4775
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF 2009-08-21
09:08:31 UTC (rev 17206)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/META-INF/MANIFEST.MF 2009-08-21
09:46:00 UTC (rev 17207)
@@ -27,5 +27,6 @@
org.eclipse.wst.common.modulecore;visibility:=reexport,
org.eclipse.pde.ui,
org.jboss.tools.common.el.core;bundle-version="2.0.0",
- org.eclipse.emf.ecore;bundle-version="2.5.0"
+ org.eclipse.emf.ecore;bundle-version="2.5.0",
+ org.eclipse.wst.css.core
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2009-08-21 09:08:31
UTC (rev 17206)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/plugin.xml 2009-08-21 09:46:00
UTC (rev 17207)
@@ -9,6 +9,19 @@
point="org.jboss.tools.common.text.ext.hyperlinkPartitioner"
id="org.jboss.tools.common.text.ext.hyperlinkPartitioner"
name="org.jboss.tools.common.text.ext.hyperlinkPartitioner">
+
+ <hyperlinkPartitioner
+
id="org.jboss.tools.common.text.ext.hyperlink.CSSClassHyperlinkPartitioner"
+
class="org.jboss.tools.common.text.ext.hyperlink.CSSClassHyperlinkPartitioner">
+ <contentType id="org.eclipse.jst.jsp.core.jspsource">
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ </partitionType>
+ </contentType>
+ <contentType id="org.eclipse.wst.html.core.htmlsource">
+ <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ </partitionType>
+ </contentType>
+ </hyperlinkPartitioner>
<!-- Root XML, HTML and JSP hyperlink partitioners -->
<hyperlinkPartitioner
@@ -819,10 +832,10 @@
class="org.jboss.tools.common.text.ext.hyperlink.CSSClassHyperlink"
id="org.jboss.tools.common.text.ext.hyperlink.CSSClassHyperlink">
<contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
- <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_CSS_CLASS"
/>
+ <partitiontype id="org.jboss.tools.common.text.ext.CSS_CLASS" />
</contenttypeidentifier>
<contenttypeidentifier id="org.eclipse.wst.html.core.htmlsource">
- <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSP_CSS_CLASS"
/>
+ <partitiontype id="org.jboss.tools.common.text.ext.CSS_CLASS" />
</contenttypeidentifier>
</hyperlink>
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java 2009-08-21
09:08:31 UTC (rev 17206)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlink.java 2009-08-21
09:46:00 UTC (rev 17207)
@@ -7,343 +7,401 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.common.text.ext.hyperlink;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
-import java.util.StringTokenizer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.rules.IToken;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
+import org.eclipse.wst.css.core.internal.provisional.adapters.IStyleSheetAdapter;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSModel;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleRule;
+import org.eclipse.wst.css.core.internal.provisional.document.ICSSStyleSheet;
+import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMText;
import org.jboss.tools.common.text.ext.ExtensionsPlugin;
import org.jboss.tools.common.text.ext.hyperlink.xpl.Messages;
-import org.jboss.tools.common.text.ext.util.CSSTextScanner;
import org.jboss.tools.common.text.ext.util.RegionHolder;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
import org.jboss.tools.common.text.ext.util.StructuredSelectionHelper;
-import org.jboss.tools.common.text.ext.util.TextScanner;
import org.jboss.tools.common.text.ext.util.Utils;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+import org.w3c.dom.css.CSSRule;
+import org.w3c.dom.css.CSSRuleList;
+import org.w3c.dom.css.CSSStyleSheet;
-/*
- * Created on 26.01.2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-
/**
* @author Jeremy
*/
public class CSSClassHyperlink extends AbstractHyperlink {
- // Qualifiers for CSSList
- public static final String QUALIFIER = "CSSListForm"; //$NON-NLS-1$
- public static final String LOCAL_NAME = "CSSList"; //$NON-NLS-1$
+ public static final String[] STYLE_TAGS = new String[] { "style",
"link" }; //$NON-NLS-1$//$NON-NLS-2$
+ public static final String COMPARE_CLASS_REGEX_PREFIX = "[\\.]?";
//$NON-NLS-1$
- /**
- * @see
com.ibm.sse.editor.AbstractHyperlink#doHyperlink(org.eclipse.jface.text.IRegion)
+ /**
+ *
*/
protected void doHyperlink(IRegion region) {
-
- try {
- RegionHolder holder = getStyleHolder(getStyleName(region));
- if (holder != null) {
- if (holder.file != null) {
- IWorkbenchPage workbenchPage =
ExtensionsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorPart part = IDE.openEditor(workbenchPage,holder.file,true);
- if (part == null) {
- openFileFailed();
- return;
- }
- StructuredSelectionHelper.setSelectionAndReveal(part, holder.region);
- } else {
- StructuredSelectionHelper.setSelectionAndRevealInActiveEditor(holder.region);
- }
- } else {
- openFileFailed();
+
+ IDOMModel model = (IDOMModel) getModelManager()
+ .getExistingModelForRead(getDocument());
+
+ // get name of looked for style
+ String styleName = getStyleName(region);
+
+ // get elements which copntans information about styles (style and link
+ // tags)
+ List<Node> styleElementList = getStyleContainerList(model);
+
+ // sort nodes by position in inverse order - from larger position to
+ // smaller
+ Collections.sort(styleElementList, new Comparator<Node>() {
+
+ public int compare(Node o1, Node o2) {
+ return ((IDOMNode) o2).getStartOffset()
+ - ((IDOMNode) o1).getStartOffset();
}
-
- } catch (CoreException x) {
- // could not open editor
- openFileFailed();
+
+ });
+
+ RegionHolder styleRegion = null;
+ // look for style in each Style element
+ for (Node styleContainer : styleElementList) {
+
+ styleRegion = findStyleRegion(styleContainer, styleName);
+
+ if (styleRegion != null) {
+ showRegion(styleRegion);
+ break;
+ }
+
}
+
+ model.releaseFromRead();
}
-
- private String getStyleName(IRegion region) {
- try {
- return Utils.trimQuotes(getDocument().get(region.getOffset(), region.getLength()));
- } catch (BadLocationException x) {
- //ignore
- return null;
+
+ /**
+ *
+ * @param model
+ * @return
+ */
+ private List<Node> getStyleContainerList(IDOMModel model) {
+
+ // get model of current page
+ IDOMDocument document = model.getDocument();
+
+ List<Node> getStyleContainerList = new ArrayList<Node>();
+
+ // get all tags which contains style ( link, style)
+ for (String tagName : STYLE_TAGS) {
+ getStyleContainerList.addAll(getList(document
+ .getElementsByTagName(tagName)));
+
}
+
+ return getStyleContainerList;
}
-
- IRegion fLastRegion = null;
-
- /**
- * @see com.ibm.sse.editor.AbstractHyperlink#doGetHyperlinkRegion(int)
+
+ /**
+ * move nodes from NodeList to List
+ *
+ * @param nodeList
+ * @return
*/
- protected IRegion doGetHyperlinkRegion(int offset) {
- fLastRegion = getRegion(offset);
- return fLastRegion;
+ List<Node> getList(NodeList nodeList) {
+
+ List<Node> newContainerList = new ArrayList<Node>();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ newContainerList.add(nodeList.item(i));
+ }
+ return newContainerList;
}
-
- private RegionHolder getStyleHolder (String styleName) {
- StructuredModelWrapper smw = new StructuredModelWrapper();
- try {
- smw.init(getDocument());
- IFile documentFile = smw.getFile();
- if (documentFile == null)
- return null;
-
- IProject project = documentFile.getProject();
- Document xmlDocument = smw.getDocument();
- if (xmlDocument == null) return null;
+ /**
+ *
+ * @param stylesContainer
+ * @param styleName
+ * @return
+ */
+ public RegionHolder findStyleRegion(Node stylesContainer, String styleName) {
- List styleLinks = findStyleLinks(xmlDocument.getChildNodes());
-
- if (styleLinks == null || styleLinks.size() == 0) return null;
- boolean doSearchInProjectCSSList = false;
- for (int i = styleLinks.size() - 1; i >= 0; i--) {
- if (styleLinks.get(i) instanceof Attr) {
- Attr hrefAttr = (Attr)styleLinks.get(i);
- String fileName = Utils.trimQuotes(hrefAttr.getValue());
- if (fileName != null && fileName.length() > 0) {
- IFile file = getFileFromProject(fileName);
- if (file == null || !file.exists()) doSearchInProjectCSSList = true;
- IRegion region = findStyleRegion(file, styleName);
- if (region != null) {
- return new RegionHolder(file, region);
- }
- }
- } else if (styleLinks.get(i) instanceof IDOMElement) {
- IDOMElement styleElement = (IDOMElement)styleLinks.get(i);
- IRegion region = findStyleRegion(styleElement, styleName);
-
- if ( region != null) {
- return new RegionHolder(region);
- } else {
- //"Style region not found"
- }
+ // get style sheet
+ CSSStyleSheet sheet = getSheet(stylesContainer);
+
+ if (sheet != null) {
+
+ CSSRuleList ruleList = sheet.getCssRules();
+
+ // for each cssRule
+ for (int i = 0; i < ruleList.getLength(); i++) {
+
+ CSSRule cssRule = ruleList.item(i);
+
+ // if cssRule describe looked for style
+ if (isRuleMatch(cssRule, styleName)) {
+
+ return new RegionHolder(getFile((ICSSNode) cssRule),
+ getRegion(cssRule));
+
}
}
-
- if (doSearchInProjectCSSList) {
- String cssList = project.getPersistentProperty(new QualifiedName(QUALIFIER,
LOCAL_NAME));
- if (cssList != null) {
- StringTokenizer st = new StringTokenizer(cssList, ","); //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- String fileName = st.nextToken().trim();
- IPath path = new Path(fileName).removeFirstSegments(2);
- fileName = path.toString();
- if (fileName != null && fileName.length() > 0) {
- IFile file = getFileFromProject(fileName);
- IRegion region = findStyleRegion(file, styleName);
- if (region != null) {
- return new RegionHolder(file, region);
- }
- }
- }
- }
- }
-
- return null;
- } catch (CoreException x) {
- //ignore
- return null;
- } finally {
- smw.dispose();
+
}
+ return null;
}
- private IRegion findStyleRegion(IDOMElement styleElement, String styleName) {
- if (styleElement == null || styleName == null || styleName.length() == 0) return null;
-
- // get all the XMLText regions and combine them into the string
- // Then parse that string finding the style class
-
- if (!(styleElement.getFirstChild() instanceof IDOMText)) return null;
-
- IDOMText styleText = (IDOMText)styleElement.getFirstChild();
- String text = styleText.getData();
- if (text == null) return null;
-
- int startOffset = styleText.getStartOffset();
- IRegion region = null;
- StringReader reader = new StringReader (text);
- try {
- CSSTextScanner scanner = new CSSTextScanner(reader);
- IToken token = scanner.nextToken();
- while (token != null && !token.isEOF()) {
- if (token instanceof TextScanner.TextToken) {
- TextScanner.TextToken tToken = (TextScanner.TextToken)token;
- if (CSSTextScanner.CSS_CLASS_NAME.equals(tToken.getType())) {
- String name = tToken.getText();
- if (("." + styleName).equalsIgnoreCase(name)) { //$NON-NLS-1$
- final int offset = startOffset + scanner.getTokenOffset();
- final int length = scanner.getTokenLength();
- return new Region (offset,length);
- }
- } else if (CSSTextScanner.CSS_CLASS_BODY.equals(tToken.getType())) {
-// String body = tToken.getText();
- }
- }
-
- token = scanner.nextToken();
- }
- } finally {
- reader.close();
+ /**
+ *
+ * @param stylesContainer
+ * @return
+ */
+ private CSSStyleSheet getSheet(Node stylesContainer) {
+
+ IStyleSheetAdapter adapter = (IStyleSheetAdapter) ((INodeNotifier) stylesContainer)
+ .getAdapterFor(IStyleSheetAdapter.class);
+
+ CSSStyleSheet sheet = null;
+
+ if (adapter != null) {
+ sheet = (CSSStyleSheet) ((IStyleSheetAdapter) adapter).getSheet();
+
+ // get ModelProvideAdapter
+// IModelProvideAdapter modelProvideAdapter = (IModelProvideAdapter) ((INodeNotifier)
stylesContainer)
+// .getAdapterFor(IModelProvideAdapter.class);
+//
+// try {
+// /* URLModelProvider */URLModelProviderCSS provider = new /* URLModelProvider
*/URLModelProviderCSS();
+// IStructuredModel newModel;
+//
+// newModel = provider.getModelForRead(
+// ((IDOMNode) stylesContainer).getModel(),
+// processURL(((Element) stylesContainer)
+// .getAttribute("href"))); //$NON-NLS-1$
+//
+// if (newModel == null)
+// return null;
+// if (!(newModel instanceof ICSSModel)) {
+// newModel.releaseFromRead();
+// return null;
+// }
+//
+// // notify adapter
+// if (modelProvideAdapter != null)
+// modelProvideAdapter.modelProvided(newModel);
+//
+// adapter.s
+// } catch (UnsupportedEncodingException e) {
+// } catch (IOException e) {
+// }
}
+
+ return sheet;
+
+ }
+
+ protected String processURL(String href) {
+ // TODO Auto-generated method stub
return null;
}
-
- private IRegion findStyleRegion(IFile file, String styleName) {
- if (file == null || !file.exists()) return null;
- if (styleName == null || styleName.length() == 0) return null;
- InputStream stream = null;
- try {
- stream = file.getContents(true);
- CSSTextScanner scanner = new CSSTextScanner(stream);
- IToken token = scanner.nextToken();
- while (token != null && !token.isEOF()) {
- if (token instanceof TextScanner.TextToken) {
- TextScanner.TextToken tToken = (TextScanner.TextToken)token;
- if (CSSTextScanner.CSS_CLASS_NAME.equals(tToken.getType())) {
- String name = tToken.getText();
- if (("." + styleName).equalsIgnoreCase(name)) { //$NON-NLS-1$
- final int offset = scanner.getTokenOffset();
- final int length = scanner.getTokenLength();
- return new Region (offset,length);
+ /**
+ *
+ * @param cssRule
+ * @param styleName
+ * @return
+ */
+ private boolean isRuleMatch(CSSRule cssRule, String styleName) {
+
+ // get selector text
+ String selectorText = ((ICSSStyleRule) cssRule).getSelectorText();
+
+ if (selectorText != null) {
+
+ // split selector text by whitespace
+ String[] styles = selectorText.trim().split(" "); //$NON-NLS-1$
+ int searchIndex = Arrays.binarySearch(styles, styleName,
+ new Comparator<String>() {
+
+ public int compare(String o1, String o2) {
+ Matcher matcher = Pattern.compile(
+ COMPARE_CLASS_REGEX_PREFIX + o2)
+ .matcher(o1);
+ return matcher.matches() ? 0 : 1;
}
- } else if (CSSTextScanner.CSS_CLASS_BODY.equals(tToken.getType())) {
-// String body = tToken.getText();
-// "CSS_CLASS_BODY Token: [" + body + "]"
- }
- }
-
- token = scanner.nextToken();
- }
- } catch (CoreException x) {
- ExtensionsPlugin.getPluginLog().logError("Error while looking for style region
", x); //$NON-NLS-1$
- } finally {
+
+ });
+ if (searchIndex >= 0)
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param node
+ * @return
+ */
+ private IFile getFile(ICSSNode node) {
+
+ ICSSDocument sheet = node.getOwnerDocument();
+
+ return AbstractHyperlink.getFile(sheet.getModel());
+ }
+
+ /**
+ *
+ * @param cssRule
+ * @return
+ */
+ protected Region getRegion(CSSRule cssRule) {
+
+ int offset = ((IndexedRegion) cssRule).getStartOffset();
+
+ // if css rule is contained in style tag so it is require to take into
+ // account offset of this tag
+ ICSSStyleSheet document = (ICSSStyleSheet) ((ICSSStyleRule) cssRule)
+ .getOwnerDocument();
+
+ ICSSModel model = document.getModel();
+
+ // get style tag
+ Node node = model.getOwnerDOMNode();
+
+ // increase offset
+ if (node instanceof IDOMElement)
+ offset += ((IDOMElement) node).getStartEndOffset();
+
+ return new Region(offset, 0);
+
+ }
+
+ /**
+ *
+ * @param styleRegion
+ */
+ private void showRegion(RegionHolder styleRegion) {
+
+ IWorkbenchPage workbenchPage = ExtensionsPlugin.getDefault()
+ .getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IEditorPart part = null;
+ if (styleRegion.file != null) {
try {
- if(stream!=null) {
- stream.close();
- }
- } catch (IOException x) {
- //ignore
+ part = IDE.openEditor(workbenchPage, styleRegion.file, true);
+ } catch (PartInitException e) {
+ e.printStackTrace();
}
+ if (part == null) {
+ openFileFailed();
+ return;
+ }
}
- return null;
+ StructuredSelectionHelper.setSelectionAndReveal(part,
+ styleRegion.region);
}
-
- private List<Node> findStyleLinks (NodeList list) {
- List<Node> styleLinks = new ArrayList<Node>();
- for (int i = 0; list != null && i < list.getLength(); i++) {
- IDOMNode element = (IDOMNode)list.item(i);
- //String axis = JSPRootHyperlinkPartitioner.computeAxis(getDocument(),
element.getStartOffset());
- //axis = axis.toLowerCase();
-
- if ("link".equals(element.getNodeName())) { //$NON-NLS-1$
- Node relAttr = element.getAttributes().getNamedItem("rel");
//$NON-NLS-1$
- if (relAttr != null) {
- String val = relAttr.getNodeValue().toLowerCase();
- if ("stylesheet".equalsIgnoreCase(val) ||
"\"stylesheet\"".equalsIgnoreCase(val)) { //$NON-NLS-1$ //$NON-NLS-2$
- Node hrefAttr = element.getAttributes().getNamedItem("href");
//$NON-NLS-1$
- if (hrefAttr != null) {
- styleLinks.add(hrefAttr);
- }
- }
- }
- }
-
- if ("link".equals(element.getNodeName())) { //$NON-NLS-1$
-// String value = element.getNodeValue();
- styleLinks.add(element);
- }
-
- if (element.hasChildNodes()) {
- List<Node> add = findStyleLinks(element.getChildNodes());
- if (add != null)
- styleLinks.addAll(add);
- }
- }
- return styleLinks;
+ /**
+ *
+ * @param region
+ * @return
+ */
+ private String getStyleName(IRegion region) {
+ try {
+ return getDocument().get(region.getOffset(), region.getLength());
+ } catch (BadLocationException e) {
+ return null;
+ }
}
-
- protected IRegion getRegion (int offset) {
+
+ IRegion fLastRegion = null;
+
+ /**
+ * @see com.ibm.sse.editor.AbstractHyperlink#doGetHyperlinkRegion(int)
+ */
+ protected IRegion doGetHyperlinkRegion(int offset) {
+ fLastRegion = getRegion(offset);
+ return fLastRegion;
+ }
+
+ /**
+ * TODO research method
+ * @param offset
+ * @return
+ */
+ protected IRegion getRegion(int offset) {
StructuredModelWrapper smw = new StructuredModelWrapper();
try {
smw.init(getDocument());
Document xmlDocument = smw.getDocument();
- if (xmlDocument == null) return null;
-
+ if (xmlDocument == null)
+ return null;
+
Node n = Utils.findNodeForOffset(xmlDocument, offset);
-
- if (n == null || !(n instanceof Attr)) return null;
+
+ if (n == null || !(n instanceof Attr))
+ return null;
int start = Utils.getValueStart(n);
int end = Utils.getValueEnd(n);
- if (start > offset) return null;
+ if (start > offset)
+ return null;
String attrText = getDocument().get(start, end - start);
StringBuffer sb = new StringBuffer(attrText);
- //find start of bean property
+ // find start of bean property
int bStart = offset - start;
- while (bStart >= 0) {
- if (!Character.isJavaIdentifierPart(sb.charAt(bStart)) &&
- sb.charAt(bStart) != '_' && sb.charAt(bStart) != '-'
&&
- sb.charAt(bStart) != '.') {
+ while (bStart >= 0) {
+ if (!Character.isJavaIdentifierPart(sb.charAt(bStart))
+ && sb.charAt(bStart) != '_' && sb.charAt(bStart) !=
'-'
+ && sb.charAt(bStart) != '.') {
bStart++;
break;
}
-
- if (bStart == 0) break;
+
+ if (bStart == 0)
+ break;
bStart--;
}
// find end of bean property
int bEnd = offset - start;
- while (bEnd < sb.length()) {
- if (!Character.isJavaIdentifierPart(sb.charAt(bEnd)) &&
- sb.charAt(bEnd) != '_' && sb.charAt(bEnd) != '-'
&&
- sb.charAt(bEnd) != '.')
+ while (bEnd < sb.length()) {
+ if (!Character.isJavaIdentifierPart(sb.charAt(bEnd))
+ && sb.charAt(bEnd) != '_' && sb.charAt(bEnd) !=
'-'
+ && sb.charAt(bEnd) != '.')
break;
bEnd++;
}
-
+
final int propStart = bStart + start;
final int propLength = bEnd - bStart;
-
- if (propStart > offset || propStart + propLength < offset) return null;
- return new Region (propStart,propLength);
+
+ if (propStart > offset || propStart + propLength < offset)
+ return null;
+ return new Region(propStart, propLength);
} catch (BadLocationException x) {
- //ignore
+ // ignore
return null;
} finally {
smw.dispose();
@@ -358,8 +416,8 @@
public String getHyperlinkText() {
String styleName = getStyleName(fLastRegion);
if (styleName == null)
- return MessageFormat.format(Messages.OpenA, Messages.CSSStyle);
-
+ return MessageFormat.format(Messages.OpenA, Messages.CSSStyle);
+
return MessageFormat.format(Messages.OpenCSSStyle, styleName);
}
Added:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlinkPartitioner.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlinkPartitioner.java
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlinkPartitioner.java 2009-08-21
09:46:00 UTC (rev 17207)
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.text.ext.hyperlink;
+
+import org.eclipse.jface.text.IDocument;
+import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * @author Sergey Dzmitrovich
+ *
+ */
+public class CSSClassHyperlinkPartitioner extends
+ AbstractHyperlinkPartitioner implements IHyperlinkPartitionRecognizer {
+
+ public static final String CSS_CLASS_PARTITION =
"org.jboss.tools.common.text.ext.CSS_CLASS"; //$NON-NLS-1$
+
+ private static final String CSS_CLASS_TOKEN = "class/"; //$NON-NLS-1$
+
+ /**
+ * @see
com.ibm.sse.editor.hyperlink.AbstractHyperlinkPartitioner#parse(org.eclipse.jface.text.IDocument,
+ * com.ibm.sse.editor.extensions.hyperlink.IHyperlinkRegion)
+ */
+ protected IHyperlinkRegion parse(IDocument document,
+ IHyperlinkRegion superRegion) {
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ try {
+ smw.init(document);
+ Document xmlDocument = smw.getDocument();
+ if (xmlDocument == null)
+ return null;
+
+ Node n = Utils.findNodeForOffset(xmlDocument, superRegion
+ .getOffset());
+ if (n == null || !(n instanceof Attr))
+ return null;
+
+ String axis = getAxis(document, superRegion);
+ String contentType = superRegion.getContentType();
+ String type = getPartitionType(axis);
+ int start = Utils.getValueStart(n);
+ int end = Utils.getValueEnd(n);
+ if (start < 0 || end < start)
+ return null;
+ int length = end - start;
+ int offset = superRegion.getOffset();
+
+ IHyperlinkRegion region = new HyperlinkRegion(offset, length, axis,
+ contentType, type);
+ return region;
+ } finally {
+ smw.dispose();
+ }
+ }
+
+ private String getPartitionType(String axis) {
+ return CSS_CLASS_PARTITION;
+ }
+
+ public boolean recognize(IDocument document, IHyperlinkRegion region) {
+
+ if (region.getAxis() != null
+ && region.getAxis().toLowerCase().endsWith(CSS_CLASS_TOKEN))
+ return true;
+ return false;
+ }
+
+}
Property changes on:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/CSSClassHyperlinkPartitioner.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPCSSClassHyperlinkPartitioner.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPCSSClassHyperlinkPartitioner.java 2009-08-21
09:08:31 UTC (rev 17206)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/jsp/JSPCSSClassHyperlinkPartitioner.java 2009-08-21
09:46:00 UTC (rev 17207)
@@ -23,6 +23,7 @@
import org.jboss.tools.common.text.ext.util.Utils;
/**
+ * * @deprecated see
org.jboss.tools.common.text.ext.hyperlink.CSSClassHyperlinkPartitioner
* @author Jeremy
*/
public class JSPCSSClassHyperlinkPartitioner extends AbstractHyperlinkPartitioner
/*implements IHyperlinkPartitionRecognizer */{
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2009-08-21 09:08:31 UTC (rev
17206)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2009-08-21 09:46:00 UTC (rev
17207)
@@ -561,293 +561,7 @@
</partitionType>
</contentType>
</hyperlinkPartitioner>
-
<hyperlinkPartitioner
-
id="org.jboss.tools.common.text.ext.jsf.hyperlink.JSPCSSClassHyperlinkPartitioner"
-
class="org.jboss.tools.jsf.text.ext.hyperlink.JSPCSSClassHyperlinkPartitioner">
- <contentType id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
- <axis
path="*/[http://java.sun.com/jsf/html]:commandButton/styleClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:commandLink/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/columnClasses/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/footerClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/headerClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/rowClasses/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:form/styleClass/" />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyCheckbox/disabledCl... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyCheckbox/enabledCla... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:graphicImage/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:inputSecret/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:inputText/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:inputTextarea/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:message/errorClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:message/fatalClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:message/infoClass/" />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:message/styleClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:message/warnClass/" />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/errorClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/fatalClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/infoClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/styleClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/warnClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:outputFormat/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:outputLabel/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:outputLink/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:outputText/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/columnClasses/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/footerClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/headerClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/rowClasses/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGroup/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectBooleanCheckbox/styleCl... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyCheckbox/styleClass... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyListbox/styleClass/... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyMenu/styleClass/" />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyMenu/disabledClass/... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyMenu/enabledClass/&... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneListbox/styleClass/&... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneMenu/styleClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneMenu/disabledClass/&... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneMenu/enabledClass/&q... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneRadio/disabledClass/... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneRadio/enabledClass/&... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneRadio/styleClass/" />
-
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:commandButton/styleClas... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:commandLink/styleClass/... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/columnClasses... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/footerClass/&... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/headerClass/&... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/rowClasses/&q... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/styleClass/&q... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:form/styleClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyCheckbox/disa...
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyCheckbox/enab...
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:graphicImage/styleClass... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:inputSecret/styleClass/... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:inputText/styleClass/&q... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:inputTextarea/styleClas... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/errorClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/fatalClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/infoClass/"
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/styleClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/warnClass/"
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/errorClass/" />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/fatalClass/" />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/infoClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/styleClass/" />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/warnClass/"
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:outputFormat/styleClass... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:outputLabel/styleClass/... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:outputLink/styleClass/&... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:outputText/styleClass/&... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/columnClasses... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/footerClass/&... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/headerClass/&... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/rowClasses/&q... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/styleClass/&q... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGroup/styleClass/&... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectBooleanCheckbox/s...
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyCheckbox/styl...
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyListbox/style...
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyListbox/disabledCla... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyListbox/enabledClas... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyMenu/styleCla... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneListbox/styleC...
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneListbox/disabledClas... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneListbox/enabledClass... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneMenu/styleClas... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneRadio/disabled...
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneRadio/enabledC...
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneRadio/styleCla... />
-
- </partitionType>
- </contentType>
- <contentType id="org.eclipse.wst.html.core.htmlsource">
- <partitionType
id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
- <axis
path="*/[http://java.sun.com/jsf/html]:commandButton/styleClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:commandLink/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/columnClasses/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/footerClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/headerClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/rowClasses/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:dataTable/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:form/styleClass/" />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyCheckbox/disabledCl... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyCheckbox/enabledCla... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:graphicImage/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:inputSecret/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:inputText/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:inputTextarea/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:message/errorClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:message/fatalClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:message/infoClass/" />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:message/styleClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:message/warnClass/" />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/errorClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/fatalClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/infoClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/styleClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:messages/warnClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:outputFormat/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:outputLabel/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:outputLink/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:outputText/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/columnClasses/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/footerClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/headerClass/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/rowClasses/"
/>
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGrid/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:panelGroup/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectBooleanCheckbox/styleCl... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyCheckbox/styleClass... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyListbox/styleClass/... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectManyMenu/styleClass/" />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneListbox/styleClass/&... />
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneMenu/styleClass/"
/>
-
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneRadio/disabledClass/... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneRadio/enabledClass/&... />
- <axis
path="*/[http://java.sun.com/jsf/html]:selectOneRadio/styleClass/" />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:commandButton/styleClas... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:commandLink/styleClass/... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/columnClasses... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/footerClass/&... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/headerClass/&... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/rowClasses/&q... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:dataTable/styleClass/&q... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:form/styleClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyCheckbox/disa...
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyCheckbox/enab...
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:graphicImage/styleClass... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:inputSecret/styleClass/... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:inputText/styleClass/&q... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:inputTextarea/styleClas... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/errorClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/fatalClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/infoClass/"
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/styleClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:message/warnClass/"
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/errorClass/" />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/fatalClass/" />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/infoClass/"
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/styleClass/" />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:messages/warnClass/"
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:outputFormat/styleClass... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:outputLabel/styleClass/... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:outputLink/styleClass/&... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:outputText/styleClass/&... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/columnClasses... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/footerClass/&... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/headerClass/&... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/rowClasses/&q... />
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGrid/styleClass/&q... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:panelGroup/styleClass/&... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectBooleanCheckbox/s...
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyCheckbox/styl...
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyListbox/style...
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectManyMenu/styleCla... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneListbox/styleC...
/>
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneMenu/styleClas... />
-
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneRadio/disabled...
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneRadio/enabledC...
/>
- <axis
path="*/[http://myfaces.apache.org/tomahawk]:selectOneRadio/styleCla... />
- </partitionType>
- </contentType>
- </hyperlinkPartitioner>
-
- <hyperlinkPartitioner
id="org.jboss.tools.common.text.ext.jsf.hyperlink.JSPExprHyperlinkPartitioner"
class="org.jboss.tools.jsf.text.ext.hyperlink.JSPExprHyperlinkPartitioner">
<contentType id="org.eclipse.jst.jsp.core.jspsource">
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPCSSClassHyperlinkPartitioner.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPCSSClassHyperlinkPartitioner.java 2009-08-21
09:08:31 UTC (rev 17206)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSPCSSClassHyperlinkPartitioner.java 2009-08-21
09:46:00 UTC (rev 17207)
@@ -25,6 +25,8 @@
import org.jboss.tools.jsf.text.ext.JSFExtensionsPlugin;
/**
+ *
+ * @deprecated see
org.jboss.tools.common.text.ext.hyperlink.CSSClassHyperlinkPartitioner
* @author Jeremy
*/
public class JSPCSSClassHyperlinkPartitioner extends AbstractHyperlinkPartitioner
/*implements IHyperlinkPartitionRecognizer */{