Author: dazarov
Date: 2009-07-02 10:22:32 -0400 (Thu, 02 Jul 2009)
New Revision: 16342
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/ejbModule/org/domain/Test1/session/TestContextVariableDataModel.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/WebContent/datamodel.jsp
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamContextVariableRefactoringTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/WebContent/datamodel.jsp
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/WebContent/datamodel.jsp
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/WebContent/datamodel.jsp 2009-07-02
14:22:32 UTC (rev 16342)
@@ -0,0 +1,13 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+ <h:outputText value="Test value is #{data.value}!" />
+ <h:outputText value="Test value is #{model.value}!" />
+ </f:view>
+ </body>
+</html>
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/WebContent/datamodel.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/ejbModule/org/domain/Test1/session/TestContextVariableDataModel.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/ejbModule/org/domain/Test1/session/TestContextVariableDataModel.java
(rev 0)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/ejbModule/org/domain/Test1/session/TestContextVariableDataModel.java 2009-07-02
14:22:32 UTC (rev 16342)
@@ -0,0 +1,38 @@
+package org.domain.Test1.session;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+
+
+@Name("computer3")
+public class TestContextVariableDataModel
+{
+ @Logger Log log;
+
+ @In Identity identity;
+
+ @In String main3;
+
+ @In("main3") boolean flag;
+
+ @DataModel("data")
+ int getVar(){
+ return 2;
+ };
+
+ @DataModel
+ String getModel(){
+ return "Test value is #{main3.value}!";
+ };
+
+ public boolean calculate()
+ {
+ log.info("authenticating #0", identity.getUsername());
+ identity.addRole("admin");
+ return true;
+ }
+}
Property changes on:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/ejbModule/org/domain/Test1/session/TestContextVariableDataModel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamContextVariableRefactoringTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamContextVariableRefactoringTest.java 2009-07-02
13:53:23 UTC (rev 16341)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamContextVariableRefactoringTest.java 2009-07-02
14:22:32 UTC (rev 16342)
@@ -178,19 +178,47 @@
ArrayList<TestChangeStructure> list = new
ArrayList<TestChangeStructure>();
TestChangeStructure structure = new TestChangeStructure(ejbProject.getProject(),
"/ejbModule/org/domain/"+warProjectName+"/session/TestContextVariableOut.java");
- TestTextChange change = new TestTextChange(464, 5, "\"eee\"");
+ TestTextChange change = new TestTextChange(528, 5, "\"eee\"");
structure.addTextChange(change);
list.add(structure);
structure = new TestChangeStructure(warProject, "/WebContent/out.jsp");
- change = new TestTextChange(227, 3, "eee");
+ change = new TestTextChange(283, 3, "eee");
structure.addTextChange(change);
list.add(structure);
renameContextVariable(seamEjbProject, "/WebContent/out.jsp", "ddd",
"eee", list);
}
- public void t_estSeamContextVariable_DataModel_Rename() throws CoreException {
+ public void testSeamContextVariable_DataModel1_Rename() throws CoreException {
+ ArrayList<TestChangeStructure> list = new
ArrayList<TestChangeStructure>();
+
+ TestChangeStructure structure = new TestChangeStructure(ejbProject.getProject(),
"/ejbModule/org/domain/"+warProjectName+"/session/TestContextVariableDataModel.java");
+ TestTextChange change = new TestTextChange(483, 6, "\"dada\"");
+ structure.addTextChange(change);
+ list.add(structure);
+ structure = new TestChangeStructure(warProject,
"/WebContent/datamodel.jsp");
+ change = new TestTextChange(227, 4, "dada");
+ structure.addTextChange(change);
+ list.add(structure);
+
+ renameContextVariable(seamEjbProject, "/WebContent/datamodel.jsp",
"data", "dada", list);
}
+
+ public void t_estSeamContextVariable_DataModel2_Rename() throws CoreException {
+ ArrayList<TestChangeStructure> list = new
ArrayList<TestChangeStructure>();
+
+ TestChangeStructure structure = new TestChangeStructure(ejbProject.getProject(),
"/ejbModule/org/domain/"+warProjectName+"/session/TestContextVariableDataModel.java");
+ TestTextChange change = new TestTextChange(528, 7, "\"modal\"");
+ structure.addTextChange(change);
+ list.add(structure);
+
+ structure = new TestChangeStructure(warProject,
"/WebContent/datamodel.jsp");
+ change = new TestTextChange(283, 5, "modal");
+ structure.addTextChange(change);
+ list.add(structure);
+
+ renameContextVariable(seamEjbProject, "/WebContent/datamodel.jsp",
"model", "modal", list);
+ }
}