Author: vrubezhny
Date: 2012-01-30 14:24:13 -0500 (Mon, 30 Jan 2012)
New Revision: 38294
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/hyperlink/FaceletsCSSClassHyperlink.java
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/hyperlink/FaceletsCSSClassHyperlinkPartitioner.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/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/hyperlink/FaceletsCSSClassHyperlink.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/hyperlink/FaceletsCSSClassHyperlink.java 2012-01-30
19:23:43 UTC (rev 38293)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/hyperlink/FaceletsCSSClassHyperlink.java 2012-01-30
19:24:13 UTC (rev 38294)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2009 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2009-2012 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
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jsf.text.ext.facelets.hyperlink;
@@ -28,7 +28,7 @@
* @see IHyperlink#getHyperlinkText()
*/
public String getHyperlinkText() {
- String styleName = getStyleName(fLastRegion);
+ String styleName = getStyleName(getHyperlinkRegion());
if (styleName == null)
return MessageFormat.format(Messages.OpenA, Messages.CSSStyle);
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/hyperlink/FaceletsCSSClassHyperlinkPartitioner.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/hyperlink/FaceletsCSSClassHyperlinkPartitioner.java 2012-01-30
19:23:43 UTC (rev 38293)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext.facelets/src/org/jboss/tools/jsf/text/ext/facelets/hyperlink/FaceletsCSSClassHyperlinkPartitioner.java 2012-01-30
19:24:13 UTC (rev 38294)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2009 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2009-2012 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
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jsf.text.ext.facelets.hyperlink;
@@ -23,9 +23,8 @@
public class FaceletsCSSClassHyperlinkPartitioner extends CSSClassHyperlinkPartitioner {
public static final String FACELETS_CSS_CLASS_PARTITION =
"org.jboss.tools.common.text.ext.FACELETS_CSS_CLASS"; //$NON-NLS-1$
-
@Override
- public boolean recognize(IDocument document, IHyperlinkRegion region) {
+ public boolean recognize(IDocument document, int offset, IHyperlinkRegion region) {
if (region.getAxis() != null){
return true;
}
@@ -36,5 +35,4 @@
protected String getPartitionType(String axis) {
return FACELETS_CSS_CLASS_PARTITION;
}
-
}