JBoss Tools SVN: r5653 - in branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-01-12 10:35:46 -0500 (Sat, 12 Jan 2008)
New Revision: 5653
Modified:
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css
branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
Log:
rich faces orderingList template updated.
table header cell bg changed.
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css 2008-01-12 14:50:17 UTC (rev 5652)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css 2008-01-12 15:35:46 UTC (rev 5653)
@@ -139,33 +139,6 @@
font-size:11px;
cursor: pointer;
}
-
-.rich-ordering-list-button-disabled {
-background-color:#E3DED5;
-background-image:url(/richfaces-demo/a4j_3_1_3.GAorg.richfaces.renderkit.html.gradientimages.OrderingListButtonGradient/DATB/eAH7....1XuPARQVBZQ_.jsf);
-color:#B1ADA7;
-font-family:Arial,Verdana,sans-serif;
-font-size:11px;
-}
-.rich-ordering-list-button-light {
-background-color:#E3DED5;
-background-image:url(/richfaces-demo/a4j_3_1_3.GAorg.richfaces.renderkit.html.gradientimages.OrderingListButtonGradient/DATB/eAH7....1XuPARQVBZQ_.jsf);
-border-color:#E79A00;
-border-width:1px;
-color:#000000;
-font-family:Arial,Verdana,sans-serif;
-font-size:11px;
-}
-.rich-ordering-list-button-press {
-background-color:#E3DED5;
-background-image:url(/richfaces-demo/a4j_3_1_3.GAorg.richfaces.renderkit.html.gradientimages.OrderingListClickedGradient/DATB/eAG7eu.x....ARLgBZQ_.jsf);
-border-color:#C4C0C9;
-border-width:1px;
-color:#000000;
-font-family:Arial,Verdana,sans-serif;
-font-size:11px;
-}
-
a.rich-ordering-list-button-selection:visited, a.rich-ordering-list-button-selection:link, a.rich-ordering-list-button-a-disabled:visited, a.rich-ordering-list-button-a-disabled:link {
text-decoration:none;
}
@@ -182,17 +155,18 @@
}
.rich-ordering-list-table-header-cell, .rich-ordering-list-table-header-cell-last {
-background-color:#E3DED5;
-
-border-bottom-color:#C4C0C9;
-border-bottom-width:1px;
-border-right-color:#C4C0C9;
-border-right-width:1px;
-color:#000000;
-font-family:Arial,Verdana,sans-serif;
-font-size:11px;
+ background-color: #E3DED5;
+ background-repeat: repeat-x;
+ background-attachment: scroll;
+ border-bottom-color:#C4C0C9;
+ border-bottom-width:1px;
+ border-right-color:#C4C0C9;
+ border-right-width:1px;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
}
.rich-ordering-list-table-header-cell-last {
-border-right-width:0pt;
+ border-right-width:0pt;
}
Modified: branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
--- branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-01-12 14:50:17 UTC (rev 5652)
+++ branches/jbosstools_xulrunner/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-01-12 15:35:46 UTC (rev 5653)
@@ -47,7 +47,7 @@
private static final String BOTTOM_CONTROL_IMG = "orderingList/bottom.gif";
private static final String BUTTON_BG = "orderingList/button_bg.gif";
- private static final String HEADER_CELL_BG = "orderingList/header_cell_bg.gif";
+ private static final String HEADER_CELL_BG = "orderingList/table_header_cell_bg.gif";
private static final String LIST_WIDTH = "listWidth";
private static final String LIST_HEIGHT = "listHeight";
@@ -281,6 +281,7 @@
nsIDOMElement tr = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
thead.appendChild(tr);
+
String styleClass = encodeStyleClass(null,
"dr-table-subheader rich-table-subheader", null,
headerClass);
@@ -290,7 +291,7 @@
}
encodeHeaderFacets(creationData, tr, visualDocument,
columnsHeaders,
- "dr-table-subheadercell rich-table-subheadercell",
+ "rich-ordering-list-table-header-cell",
headerClass, HEADER, HtmlComponentUtil.HTML_TAG_TD);
}
}
@@ -381,7 +382,6 @@
div1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-control");
div2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-button");
- div2.setAttribute("onmouseover", "this.className='rich-ordering-list-button-light'");
a.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-button-selection");
div3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-button-content");
@@ -468,6 +468,18 @@
String styleClass = encodeStyleClass(null, skinCellClass,
headerClass, columnHeaderClass);
td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+
+ nsIDOMElement div1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ String resourceFolder = RichFacesTemplatesActivator
+ .getPluginResourcePath();
+ String div1Style = "background-image: url(file://" + resourceFolder
+ + HEADER_CELL_BG + ");";
+ div1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ "rich-ordering-list-table-header-cell");
+ div1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, div1Style);
+ td.appendChild(div1);
+
td.setAttribute("scop", "col");
String colspan = column
.getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
@@ -476,7 +488,7 @@
}
Element facetBody = ComponentUtil.getFacet(column, facetName);
- VpeChildrenInfo child = new VpeChildrenInfo(td);
+ VpeChildrenInfo child = new VpeChildrenInfo(div1);
child.addSourceChild(facetBody);
creationData.addChildrenInfo(child);
}
16 years, 5 months
JBoss Tools SVN: r5652 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-01-12 09:50:17 -0500 (Sat, 12 Jan 2008)
New Revision: 5652
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1616
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2008-01-12 12:12:06 UTC (rev 5651)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2008-01-12 14:50:17 UTC (rev 5652)
@@ -92,11 +92,13 @@
try {
String dialectName = cfg.getConfiguration().getProperty(Environment.DIALECT);
- if (dialects.containsKey(dialectName)) {
- dialect = (Dialect) dialects.get(dialectName);
- } else {
- dialect = (Dialect) Class.forName(dialectName).newInstance();
- dialects.put(dialectName, dialect);
+ if (dialectName != null) {
+ if (dialects.containsKey(dialectName)) {
+ dialect = (Dialect) dialects.get(dialectName);
+ } else {
+ dialect = (Dialect) Class.forName(dialectName).newInstance();
+ dialects.put(dialectName, dialect);
+ }
}
} catch (HibernateException e) {
ViewPlugin.getDefault().logError(e);
16 years, 5 months
JBoss Tools SVN: r5651 - trunk/documentation/guides/userguide/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-01-12 07:12:06 -0500 (Sat, 12 Jan 2008)
New Revision: 5651
Modified:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-240 FAQ update in Getting Started guide
Modified: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2008-01-12 12:01:08 UTC (rev 5650)
+++ trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2008-01-12 12:12:06 UTC (rev 5651)
@@ -505,14 +505,16 @@
<para>
<emphasis role="bold">I have an existing Seam 1.2.1 project. Can I migrate/import the project to a JBDS Seam project?</emphasis>
</para>
- <para> There is no automagical way.
- Need to be done manually; most should be straightforward:
- </para>
+ <para>We highly recommend you to create Seam 1.2.1 project using the JBDS. In other case try to do manually:</para>
<itemizedlist>
- <listitem><para> copy <property>src</property> to <property>src</property></para></listitem>
- <listitem><para> copy <property>view</property> to <property>Web content</property></para></listitem>
- <listitem><para> copy resources individual files to where they are in the seam web project etc.</para></listitem>
+ <listitem><para>Create a Seam Web project to get the JBoss tools structure</para></listitem>
</itemizedlist>
+ <para>Then from your Seam 1.2.1 seam-gen project start doing the following:</para>
+ <itemizedlist>
+ <listitem><para>Copy <property>src</property> to <property>src</property></para></listitem>
+ <listitem><para>Copy <property>view</property> to <property>Web content</property></para></listitem>
+ <listitem><para>Copy resources individual files to where they are in the seam web project etc.</para></listitem>
+ </itemizedlist>
<para>
<emphasis role="bold">I have an existing Struts or JSF project. Can I open the project in
JBDS?</emphasis>
16 years, 5 months
JBoss Tools SVN: r5650 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-12 07:01:08 -0500 (Sat, 12 Jan 2008)
New Revision: 5650
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1524
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-12 11:47:58 UTC (rev 5649)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-12 12:01:08 UTC (rev 5650)
@@ -239,9 +239,9 @@
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
- //TODO dsacovich Compilation error was corrected.Deal with it.
+
// find "dl" elements
-// TestUtil.findElementsByName(node, elements, HTML.TAG_DL);
+ TestUtil.findElementsByName(node, elements, HTML.TAG_DL);
assertEquals(1, elements.size());
@@ -250,9 +250,9 @@
nsIDOMElement elementDT = (nsIDOMElement) elementDL.getFirstChild()
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- //TODO dsacovich Compilation error was corrected.Deal with it.
-// assertEquals("Component's content is not shown", HTML.TAG_DT, elementDT
-// .getNodeName().toUpperCase());
+
+ assertEquals("Component's content is not shown", HTML.TAG_DT, elementDT
+ .getNodeName().toUpperCase());
if (getException() != null) {
throw getException();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-01-12 11:47:58 UTC (rev 5649)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-01-12 12:01:08 UTC (rev 5650)
@@ -34,6 +34,8 @@
public static final String TAG_TH = "TH";
public static final String TAG_TR = "TR";
public static final String TAG_TD = "TD";
+ public static final String TAG_DL = "DL";
+ public static final String TAG_DT = "DT";
public static final String TAG_COL = "COL";
public static final String TAG_COLS = "COLS";
public static final String TAG_COLGROUP = "COLGROUP";
16 years, 5 months
JBoss Tools SVN: r5649 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-01-12 06:47:58 -0500 (Sat, 12 Jan 2008)
New Revision: 5649
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-226 Screens are retaken with 96 resolution + scale param ia definded
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2008-01-12 11:47:50 UTC (rev 5648)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2008-01-12 11:47:58 UTC (rev 5649)
@@ -1707,7 +1707,7 @@
<title>Properties View</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/more_editors/more_editors_43.png"/>
+ <imagedata fileref="images/more_editors/more_editors_43.png" scale="85"/>
</imageobject>
</mediaobject>
</figure>
16 years, 5 months
JBoss Tools SVN: r5648 - trunk/jsf/docs/userguide/en/images/more_editors.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-01-12 06:47:50 -0500 (Sat, 12 Jan 2008)
New Revision: 5648
Modified:
trunk/jsf/docs/userguide/en/images/more_editors/more_editors_41.png
trunk/jsf/docs/userguide/en/images/more_editors/more_editors_43.png
Log:
http://jira.jboss.com/jira/browse/JBDS-226 Screens are retaken with 96 resolution + scale param ia definded
Modified: trunk/jsf/docs/userguide/en/images/more_editors/more_editors_41.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/more_editors/more_editors_43.png
===================================================================
(Binary files differ)
16 years, 5 months
JBoss Tools SVN: r5647 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-01-11 15:28:32 -0500 (Fri, 11 Jan 2008)
New Revision: 5647
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1562, compilation error was adjusted
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 20:24:09 UTC (rev 5646)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 20:28:32 UTC (rev 5647)
@@ -239,9 +239,9 @@
.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
-
+ //TODO dsacovich Compilation error was corrected.Deal with it.
// find "dl" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_DL);
+// TestUtil.findElementsByName(node, elements, HTML.TAG_DL);
assertEquals(1, elements.size());
@@ -250,10 +250,10 @@
nsIDOMElement elementDT = (nsIDOMElement) elementDL.getFirstChild()
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ //TODO dsacovich Compilation error was corrected.Deal with it.
+// assertEquals("Component's content is not shown", HTML.TAG_DT, elementDT
+// .getNodeName().toUpperCase());
- assertEquals("Component's content is not shown", HTML.TAG_DT, elementDT
- .getNodeName().toUpperCase());
-
if (getException() != null) {
throw getException();
}
16 years, 5 months
JBoss Tools SVN: r5646 - in trunk/vpe: contrib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-01-11 15:24:09 -0500 (Fri, 11 Jan 2008)
New Revision: 5646
Added:
trunk/vpe/contrib/
trunk/vpe/contrib/org.mozilla.xulrunner.gtk.linux.x86_64_1.8.1.4-20080112.jar
Log:
xulrunner plugin for gtk.linux.x86_64
Added: trunk/vpe/contrib/org.mozilla.xulrunner.gtk.linux.x86_64_1.8.1.4-20080112.jar
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/contrib/org.mozilla.xulrunner.gtk.linux.x86_64_1.8.1.4-20080112.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 5 months
JBoss Tools SVN: r5645 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-01-11 14:12:27 -0500 (Fri, 11 Jan 2008)
New Revision: 5645
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatHtmlContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1585 Proposal list is not filtered by current input if there is no blank symbol between new entered tag and next tag, and new tag has no '>'
Issue is fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatHtmlContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatHtmlContentAssistProcessor.java 2008-01-11 19:01:05 UTC (rev 5644)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatHtmlContentAssistProcessor.java 2008-01-11 19:12:27 UTC (rev 5645)
@@ -28,9 +28,11 @@
import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
import org.eclipse.wst.html.ui.internal.contentassist.HTMLContentAssistProcessor;
import org.eclipse.wst.html.ui.internal.preferences.HTMLUIPreferenceNames;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
@@ -541,4 +543,38 @@
jspActiveCAP = new JSPActiveContentAssistProcessor();
jspActiveCAP.init();
}
+
+
+ /**
+ * StructuredTextViewer must be set before using this.
+ */
+ public IStructuredDocumentRegion getStructuredDocumentRegion(int pos) {
+ IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion(fTextViewer, pos);
+ ITextRegion region = sdRegion.getRegionAtCharacterOffset(pos);
+ if (region == null) {
+ return null;
+ }
+
+ if (sdRegion.getStartOffset(region) == pos) {
+ // The offset is at the beginning of the region
+ if ((sdRegion.getStartOffset(region) == sdRegion.getStartOffset()) && (sdRegion.getPrevious() != null) && (!sdRegion.getPrevious().isEnded())) {
+ // Is the region also the start of the node? If so, the
+ // previous IStructuredDocumentRegion is
+ // where to look for a useful region.
+ sdRegion = sdRegion.getPrevious();
+ }
+ else {
+ // Is there no separating whitespace from the previous region?
+ // If not,
+ // then that region is the important one
+ ITextRegion previousRegion = sdRegion.getRegionAtCharacterOffset(pos - 1);
+ if ((previousRegion != null) && (previousRegion != region) && (previousRegion.getTextLength() == previousRegion.getLength())) {
+ sdRegion = sdRegion.getPrevious();
+ }
+ }
+ }
+
+ return sdRegion;
+ }
+
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java 2008-01-11 19:01:05 UTC (rev 5644)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java 2008-01-11 19:12:27 UTC (rev 5645)
@@ -622,4 +622,37 @@
private boolean isCommentNode(IDOMNode node) {
return (node != null && node instanceof IDOMElement && ((IDOMElement) node).isCommentTag());
}
+
+ /**
+ * StructuredTextViewer must be set before using this.
+ */
+ public IStructuredDocumentRegion getStructuredDocumentRegion(int pos) {
+ IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion(fTextViewer, pos);
+ ITextRegion region = sdRegion.getRegionAtCharacterOffset(pos);
+ if (region == null) {
+ return null;
+ }
+
+ if (sdRegion.getStartOffset(region) == pos) {
+ // The offset is at the beginning of the region
+ if ((sdRegion.getStartOffset(region) == sdRegion.getStartOffset()) && (sdRegion.getPrevious() != null) && (!sdRegion.getPrevious().isEnded())) {
+ // Is the region also the start of the node? If so, the
+ // previous IStructuredDocumentRegion is
+ // where to look for a useful region.
+ sdRegion = sdRegion.getPrevious();
+ }
+ else {
+ // Is there no separating whitespace from the previous region?
+ // If not,
+ // then that region is the important one
+ ITextRegion previousRegion = sdRegion.getRegionAtCharacterOffset(pos - 1);
+ if ((previousRegion != null) && (previousRegion != region) && (previousRegion.getTextLength() == previousRegion.getLength())) {
+ sdRegion = sdRegion.getPrevious();
+ }
+ }
+ }
+
+ return sdRegion;
+ }
+
}
\ No newline at end of file
16 years, 5 months
JBoss Tools SVN: r5644 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-11 14:01:05 -0500 (Fri, 11 Jan 2008)
New Revision: 5644
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1522
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 18:58:30 UTC (rev 5643)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2008-01-11 19:01:05 UTC (rev 5644)
@@ -266,30 +266,17 @@
*/
public void testInclude() throws Throwable {
// check absolute path
- nsIDOMElement element = performTestForFaceletComponent("components/include_absolute.xhtml");
- nsIDOMNode node = (nsIDOMNode) element
- .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ nsIDOMElement element = performTestForFaceletComponent("components/composition_absolute.xhtml");
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ checkTemplatePage(element, "Page Header",
+ "Template with absolute path is not included");
- // find "table" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals("Template with absolute path is not included", 1, elements
- .size());
-
// check related path
- element = performTestForFaceletComponent("components/include_related.xhtml");
- node = (nsIDOMNode) element.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ element = performTestForFaceletComponent("components/composition_related.xhtml");
- elements = new ArrayList<nsIDOMNode>();
+ checkTemplatePage(element, "Page Header",
+ "Template with related path is not included");
- // find "table" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals("Template with related path is not included", 1, elements
- .size());
-
if (getException() != null) {
throw getException();
}
16 years, 5 months