Author: vrubezhny
Date: 2011-06-03 12:39:34 -0400 (Fri, 03 Jun 2011)
New Revision: 31818
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.project
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/.jsdtscope
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/JavaSource/
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/JavaSource/demo/
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/JavaSource/demo/Messages.properties
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/WEB-INF/
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/jsp_page.jsp
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/xhtml_page.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJBide3845Test.java
Modified:
trunk/common/plugins/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/contentassist/AbstractContentAssistantTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
Log:
JBIDE-3845
Code assist for #{messages['...']} should suggest properties when user types
"[".
JUnit Test Case is added for JSF project
Modified:
trunk/common/plugins/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/contentassist/AbstractContentAssistantTestCase.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/contentassist/AbstractContentAssistantTestCase.java 2011-06-03
15:44:18 UTC (rev 31817)
+++
trunk/common/plugins/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/contentassist/AbstractContentAssistantTestCase.java 2011-06-03
16:39:34 UTC (rev 31818)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Copyright (c) 2007-2011 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,
@@ -89,9 +89,9 @@
assertTrue("Content Assistant returned no proposals", (res != null
&& res.size() > 0)); //$NON-NLS-1$
- // for (int i = 0; i < result.length; i++) {
- // System.out.println("proposal - "+result[i].getDisplayString());
- // }
+// for (ICompletionProposal p : res) {
+// System.out.println("proposal - "+p.getDisplayString());
+// }
ICompletionProposal[] result = res.toArray(new ICompletionProposal[res.size()]);
int foundCounter = 0;
@@ -152,10 +152,10 @@
}
// for an Unclosed EL the closing character is appended to the proposal string (i.e.
person} )
- // perform case sensitive compare operation
+ // perform case insensitive compare operation
replacementStringParts = replacementString.split("}"); //$NON-NLS-1$
if (replacementStringParts != null && replacementStringParts.length > 0)
{
- if (replacementStringParts[0].equals(proposalName)) return true;
+ if (replacementStringParts[0].equalsIgnoreCase(proposalName)) return true;
}
// For an attribute value proposal there will be the quote characters
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.classpath
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.classpath 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output"
path="WebContent/WEB-INF/classes"/>
+</classpath>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.project
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.project 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Jbide3845Test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/.jsdtscope
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/.jsdtscope
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/.jsdtscope 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.jdt.core.prefs 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,8 @@
+#Thu Jun 02 21:29:17 MSD 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.component 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="Jbide3845Test">
+ <wb-resource deploy-path="/"
source-path="/WebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes"
source-path="/JavaSource"/>
+ <property name="context-root" value="Jbide3845Test"/>
+ <property name="java-output-path"
value="/Jbide3845Test/WebContent/WEB-INF/classes"/>
+ </wb-module>
+</project-modules>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,7 @@
+<root>
+ <facet id="jst.jsf">
+ <node name="libprov">
+ <attribute name="provider-id"
value="jsf-user-library-provider"/>
+ </node>
+ </facet>
+</root>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 5.1 Runtime"/>
+ <fixed facet="java"/>
+ <fixed facet="jst.jsf"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="wst.jsdt.web"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="jst.jsf" version="1.2"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.jsdt.ui.superType.container
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.jsdt.ui.superType.container 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.jsdt.ui.superType.name
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/.settings/org.eclipse.wst.jsdt.ui.superType.name 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/JavaSource/demo/Messages.properties
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/JavaSource/demo/Messages.properties
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/JavaSource/demo/Messages.properties 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,4 @@
+header=Hello Demo Application
+prompt_message=Name:
+hello_message=Hello
+org.jboss.tools.long.property.Name=A Long Named Property
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/JavaSource/demo/Messages.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/WEB-INF/faces-config.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/WEB-INF/faces-config.xml 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xi="http://www.w3.org/2001/XInclude"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ <managed-bean>
+ <description>User Name Bean</description>
+ <managed-bean-name>user</managed-bean-name>
+ <managed-bean-class>demo.User</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>name</property-name>
+ <property-class>java.lang.String</property-class>
+ <value/>
+ </managed-property>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/pages/inputUserName.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>hello</from-outcome>
+ <to-view-id>/pages/jsp_page.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/jsp_page.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/jsp_page.jsp
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/jsp_page.jsp 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,21 @@
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<f:loadBundle var="Message" basename="demo.Messages" />
+
+<html>
+ <head>
+ <title>Hello!</title>
+ </head>
+
+ <body>
+ <f:view>
+ <h3>
+ <h:outputText value="#{Message[" />,
+ <h:outputText value="#{Message.hello_message}" />,
+ <h:outputText value="#{user.name}" />!
+ </h3>
+ </f:view>
+ </body>
+
+</html>
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/jsp_page.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/xhtml_page.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/xhtml_page.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/xhtml_page.xhtml 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<f:loadBundle var="Message" basename="demo.Messages" />
+<body>
+ #{Message[}
+</body>
+</html>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/Jbide3845Test/WebContent/pages/xhtml_page.xhtml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJBide3845Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJBide3845Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJBide3845Test.java 2011-06-03
16:39:34 UTC (rev 31818)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.jsf.jsp.ca.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.jboss.tools.common.base.test.contentassist.CATestUtil;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+import org.jboss.tools.test.util.TestProjectProvider;
+
+/**
+ * Test cast testing
http://jira.jboss.com/jira/browse/JBIDE-3845 issue.
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+public class JsfJBide3845Test extends ContentAssistantTestCase {
+ private static final String PROJECT_NAME = "Jbide3845Test"; //$NON-NLS-1$
+ private static final String JSP_PAGE_NAME =
"/WebContent/pages/jsp_page.jsp"; //$NON-NLS-1$
+ private static final String XHTML_PAGE_NAME =
"/WebContent/pages/xhtml_page.xhtml"; //$NON-NLS-1$
+ private static final String[] PROPOSALS = new String[]
{"Message['org.jboss.tools.long.property.Name']"}; //$NON-NLS-1$
+
+ private TestProjectProvider provider = null;
+
+
+ private static final String STRING_TO_FIND = "#{Message[";
+
+ public static Test suite() {
+ return new TestSuite(JsfJBide3845Test.class);
+ }
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.jsf.ui.test", null,
PROJECT_NAME,false); //$NON-NLS-1$
+ project = provider.getProject();
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+
+ public void testJbide3845OnJspPage(){
+ doTheResourceBundleCAForALongPropertyNameTest(JSP_PAGE_NAME, STRING_TO_FIND,
PROPOSALS);
+ }
+
+ public void testJbide6061OnXhtmlPage(){
+ doTheResourceBundleCAForALongPropertyNameTest(XHTML_PAGE_NAME, STRING_TO_FIND,
PROPOSALS);
+ }
+
+ protected void doTheResourceBundleCAForALongPropertyNameTest(String pageName, String
textToFind, String[] proposals) {
+ openEditor(pageName);
+ IRegion reg=null;
+ try {
+ reg = new FindReplaceDocumentAdapter(this.document).find(0, textToFind, true, false,
false, false); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ fail(e.getMessage());
+ }
+
+ assertNotNull("Cannot find a text region to test", reg);
+
+ final ICompletionProposal[] rst = checkProposals(pageName,reg.getOffset() +
textToFind.length(), proposals, false);
+
+ closeEditor();
+ }
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/jsp/ca/test/JsfJBide3845Test.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-06-03
15:44:18 UTC (rev 31817)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-06-03
16:39:34 UTC (rev 31818)
@@ -23,6 +23,7 @@
import org.jboss.tools.jsf.jsp.ca.test.CASuggestsNotOnlyELProposalsJBIDE2437Test;
import
org.jboss.tools.jsf.jsp.ca.test.CAUnnecessaryElementsForDirAttributeInXHTMLPageJBIDE1813Test;
import org.jboss.tools.jsf.jsp.ca.test.CAVarAttributeForDataTableTagJBIDE2016;
+import org.jboss.tools.jsf.jsp.ca.test.JsfJBide3845Test;
import org.jboss.tools.jsf.jsp.ca.test.JavaClassContentAssistProviderTest;
import org.jboss.tools.jsf.jsp.ca.test.JsfJspJbide1704Test;
import org.jboss.tools.jsf.jsp.ca.test.JsfJspJbide1717Test;
@@ -54,6 +55,8 @@
suite.addTestSuite(JsfJspJbide6259Test.class);
suite.addTestSuite(JsfJspJbide1704Test.class);
suite.addTestSuite(JsfJspJbide1717Test.class);
+ suite.addTestSuite(JsfJBide3845Test.class);
+
suite.addTest(
new ProjectImportTestSetup(WebContentAssistProviderTest.suite(),
"org.jboss.tools.jsf.ui.test",