Author: vrubezhny
Date: 2012-01-31 12:28:08 -0500 (Tue, 31 Jan 2012)
New Revision: 38337
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlinkPartitioner.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java
Log:
JBIDE-10621
Redesign HyperlinkDetector so that partitioning and hyperlinks not do twice the same job.
Hyperlinks and Hyperlink Partitioners are redesigned due to exclude duplication work on
regions calculation.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlinkPartitioner.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlinkPartitioner.java 2012-01-31
17:27:46 UTC (rev 38336)
+++
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlinkPartitioner.java 2012-01-31
17:28:08 UTC (rev 38337)
@@ -104,7 +104,7 @@
int textOffset = text.getStartOffset();
String contentType = superRegion.getContentType();
- String axis = getAxis(document, superRegion);
+ String axis = getAxis(document, offset);
IHyperlinkRegion hyperRegion = new HyperlinkRegion(textOffset, textLength,
axis, contentType, type);
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java 2012-01-31
17:27:46 UTC (rev 38336)
+++
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java 2012-01-31
17:28:08 UTC (rev 38337)
@@ -71,7 +71,7 @@
Map<String, ISeamMessages> messages = findMessagesComponents(document, offset);
if (messages != null && !messages.isEmpty()) {
- String axis = getAxis(document, superRegion);
+ String axis = getAxis(document, offset);
String contentType = superRegion.getContentType();
String type = SEAM_MESSAGES_BEAN_PARTITION;
@@ -84,11 +84,8 @@
}
}
- protected String getAxis(IDocument document, IHyperlinkRegion superRegion) {
- if (superRegion.getAxis() == null || superRegion.getAxis().length() == 0) {
- return JSPRootHyperlinkPartitioner.computeAxis(document, superRegion.getOffset()) +
"/";
- }
- return superRegion.getAxis();
+ protected String getAxis(IDocument document, int offset) {
+ return JSPRootHyperlinkPartitioner.computeAxis(document, offset) + "/";
}
public static IHyperlinkRegion getWordRegion (IDocument document, final int offset) {
Show replies by thread