Author: estherbin
Date: 2008-06-16 12:47:36 -0400 (Mon, 16 Jun 2008)
New Revision: 8799
Added:
branches/jbosstools-2.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/jbide2277/
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/jbide2277/jbide2277.xhtml
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2277Test.java
Log:
Fix
http://jira.jboss.com/jira/browse/JBIDE-2277 in branch.
Added:
branches/jbosstools-2.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java
===================================================================
---
branches/jbosstools-2.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java
(rev 0)
+++
branches/jbosstools-2.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java 2008-06-16
16:47:36 UTC (rev 8799)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.jst.jsp.test.ca;
+
+
+import org.eclipse.core.resources.IResource;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+
+
+/**
+ * Abstract class contains of common methods.
+ *
+ * @author Eugene Stherbin
+ *
+ */
+public abstract class CommonContentAssistantTestCase extends ContentAssistantTestCase {
+ /** The make copy. */
+ protected boolean makeCopy;
+
+ /** The provider. */
+ protected TestProjectProvider provider;
+
+ protected abstract String getSetUpProjectName();
+
+ @Override
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.seam.ui.test",
null, getSetUpProjectName(), makeCopy);
+ project = provider.getProject();
+ Throwable exception = null;
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (Exception x) {
+ exception = x;
+ x.printStackTrace();
+ }
+ assertNull("An exception caught: " + (exception != null ?
exception.getMessage() : ""), exception);
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ if (provider != null) {
+ provider.dispose();
+ }
+ }
+}
Property changes on:
branches/jbosstools-2.1.x/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/jbide2277/jbide2277.xhtml
===================================================================
---
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/jbide2277/jbide2277.xhtml
(rev 0)
+++
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/jbide2277/jbide2277.xhtml 2008-06-16
16:47:36 UTC (rev 8799)
@@ -0,0 +1,12 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:s="http://jboss.com/products/seam/taglib"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:rich="http://richfaces.ajax4jsf.org/rich"
+ template="layout/template.xhtml">
+<ui:define name="body">
+ <h:outputText value=""/>
+</ui:define>
+</ui:composition>
Property changes on:
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/jbide2277/jbide2277.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2277Test.java
===================================================================
---
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2277Test.java
(rev 0)
+++
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2277Test.java 2008-06-16
16:47:36 UTC (rev 8799)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.seam.ui.test.jbide;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.jboss.tools.jst.jsp.test.ca.CommonContentAssistantTestCase;
+import org.jboss.tools.seam.ui.text.java.SeamELProposalProcessor;
+
+/**
+ * @author Eugene Stherbin
+ *
+ */
+public class JBide2277Test extends CommonContentAssistantTestCase {
+ protected static final String
JBIDE_2277_PAGE="/WebContent/jbide2277/jbide2277.xhtml";
+
+ public static Test suite() {
+ return new TestSuite(JBide2277Test.class);
+ }
+
+ /**
+ * @see
org.jboss.tools.jst.jsp.test.ca.CommonContentAssistantTestCase#getSetUpProjectName()
+ */
+ @Override
+ protected String getSetUpProjectName() {
+ return "TestSeamELContentAssist";
+ }
+
+ public void testJbide2227(){
+ final String[] proposals = new String[]{};
+ final ICompletionProposal[] rst = checkProposals(JBIDE_2277_PAGE,574, proposals,
false);
+
+ checkResult(rst);
+ }
+
+ /**
+ * @param rst
+ */
+ private void checkResult(ICompletionProposal[] rst) {
+ assertTrue(rst.length > 5);
+ String prevDisplay = "";
+ for (ICompletionProposal p : rst) {
+ //Check stars with #{
+
assertTrue(p.getDisplayString().startsWith(SeamELProposalProcessor.EL_START_EXPRESSION));
+
+ //Check alphabetical order
+
+
+ }
+
+
+ }
+
+
+}
Property changes on:
branches/jbosstools-2.1.x/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2277Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native