JBoss Tools SVN: r11076 - trunk/portlet/plugins/org.jboss.tools.portlet.core.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-22 10:58:44 -0400 (Wed, 22 Oct 2008)
New Revision: 11076
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.core/plugin.xml
Log:
JBIDE-2952 Reduce the number of JBoss Portal facet combinations
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/plugin.xml
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/plugin.xml 2008-10-22 14:37:28 UTC (rev 11075)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/plugin.xml 2008-10-22 14:58:44 UTC (rev 11076)
@@ -46,6 +46,7 @@
</extension>
+ <!--
<extension
point="org.eclipse.wst.common.project.facet.core.presets">
<static-preset id="preset.jboss.portlet.v20">
@@ -63,6 +64,7 @@
<factory class="org.jboss.tools.portlet.core.internal.project.facet.PortletConfigurationPresetFactory10"/>
</dynamic-preset>
</extension>
+ -->
<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
@@ -121,6 +123,7 @@
</extension>
+ <!--
<extension
point="org.eclipse.wst.common.project.facet.core.presets">
<static-preset id="preset.jboss.jsfportlet.v20">
@@ -140,7 +143,7 @@
<factory class="org.jboss.tools.portlet.core.internal.project.facet.JSFPortletConfigurationPresetFactory10"/>
</dynamic-preset>
</extension>
-
+ -->
<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
<runtime-component any="true"/>
@@ -203,13 +206,14 @@
</static-preset>
</extension>
+ <!--
<extension
point="org.eclipse.wst.common.project.facet.core.presets">
<dynamic-preset id="preset.jboss.seamportlet.v10">
<factory class="org.jboss.tools.portlet.core.internal.project.facet.SeamPortletConfigurationPresetFactory10"/>
</dynamic-preset>
</extension>
-
+ -->
<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
<runtime-component any="true"/>
16 years, 2 months
JBoss Tools SVN: r11075 - in branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test: projects/JSFKickStartOldFormat/JavaSource/demo/bundle and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-22 10:37:28 -0400 (Wed, 22 Oct 2008)
New Revision: 11075
Added:
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/Messages.properties
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/Bundle.properties
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean9.java
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/RefBean3.java
Modified:
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config.xml
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean2.java
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/WebContent/WEB-INF/faces-config.xml
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
JBIDE-2421
Added: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/Messages.properties
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/Messages.properties (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/Messages.properties 2008-10-22 14:37:28 UTC (rev 11075)
@@ -0,0 +1 @@
+a=b
\ No newline at end of file
Modified: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config.xml 2008-10-22 14:20:58 UTC (rev 11074)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config.xml 2008-10-22 14:37:28 UTC (rev 11075)
@@ -48,11 +48,11 @@
</converter>
<managed-bean>
<description>Input Value Holder</description>
- <managed-bean-name>nameBean</managed-bean-name>
- <managed-bean-class>demo.NameBean</managed-bean-class>
+ <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>userName</property-name>
+ <property-name>name</property-name>
<property-class>java.lang.String</property-class>
<value/>
</managed-property>
Added: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/Bundle.properties
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/Bundle.properties (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/Bundle.properties 2008-10-22 14:37:28 UTC (rev 11075)
@@ -0,0 +1,3 @@
+a=1
+b=2
+c=3
\ No newline at end of file
Modified: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean2.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean2.java 2008-10-22 14:20:58 UTC (rev 11074)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean2.java 2008-10-22 14:37:28 UTC (rev 11075)
@@ -10,4 +10,6 @@
public class ManagedBean2 {
public ManagedBean2() {
}
+
+ public void exec() {}
}
Added: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean9.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean9.java (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean9.java 2008-10-22 14:37:28 UTC (rev 11075)
@@ -0,0 +1,13 @@
+/**
+ *
+ */
+package org.jboss.tools.jsf.test;
+
+/**
+ * @author eskimo
+ *
+ */
+public class ManagedBean9 {
+ public ManagedBean9() {
+ }
+}
Added: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/RefBean3.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/RefBean3.java (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/RefBean3.java 2008-10-22 14:37:28 UTC (rev 11075)
@@ -0,0 +1,49 @@
+package org.jboss.tools.jsf.test;
+
+public class RefBean3 {
+ private String property6;
+ private String property7;
+ private String property8;
+ private String property9;
+ private RefBean2 property10;
+
+ public String getProperty6() {
+ return property6;
+ }
+
+ public void setProperty6(String property1) {
+ this.property6 = property1;
+ }
+
+ public String getProperty7() {
+ return property7;
+ }
+
+ public void setProperty7(String property2) {
+ this.property7 = property2;
+ }
+
+ public String getProperty8() {
+ return property8;
+ }
+
+ public void setProperty8(String property3) {
+ this.property8 = property3;
+ }
+
+ public String getProperty9() {
+ return property9;
+ }
+
+ public void setProperty9(String property4) {
+ this.property9 = property4;
+ }
+
+ public RefBean2 getProperty10() {
+ return property10;
+ }
+
+ public void setProperty10(RefBean2 property5) {
+ this.property10 = property5;
+ }
+}
Modified: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/WebContent/WEB-INF/faces-config.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/WebContent/WEB-INF/faces-config.xml 2008-10-22 14:20:58 UTC (rev 11074)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/WebContent/WEB-INF/faces-config.xml 2008-10-22 14:37:28 UTC (rev 11075)
@@ -61,4 +61,14 @@
<referenced-bean-name>refbean2</referenced-bean-name>
<referenced-bean-class>org.jboss.tools.jsf.test.RefBean2</referenced-bean-class>
</referenced-bean>
+ <navigation-rule>
+ <from-view-id>/pages/inputname.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/pages/greeting.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <application>
+ <message-bundle>org.jboss.tools.jsf.test.Bundle</message-bundle>
+ </application>
</faces-config>
Modified: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java 2008-10-22 14:20:58 UTC (rev 11074)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java 2008-10-22 14:37:28 UTC (rev 11075)
@@ -3,14 +3,11 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
+import java.util.Properties;
-import org.eclipse.core.internal.resources.Workspace;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.model.XModel;
@@ -18,7 +15,9 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jsf.model.pv.JSFPromptingProvider;
import org.jboss.tools.jsf.plugin.JsfTestPlugin;
+import org.jboss.tools.jst.web.project.list.IWebPromptingProvider;
import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
import junit.framework.TestCase;
@@ -57,80 +56,76 @@
}
public void testIsSupporting() {
- fail("Not yet implemented");
+ assertTrue(provider.isSupporting(IWebPromptingProvider.JSF_BUNDLES));
}
public void testGetList() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, "", "", new Properties());
+ assertEquals("Empty list should be returned for unsupported id.",IWebPromptingProvider.EMPTY_LIST, list);
}
/******************************************************************
* getBundles method test
******************************************************************/
- public static final int GET_BUNDLE_EXPECTED_LIST_SIZE = 0;
+ public static final int GET_BUNDLE_EXPECTED_LIST_SIZE = 1;
/**
*
*/
public void testGetBundles() {
- List<Object> list = provider.getBundles(model);
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_BUNDLES, "", new Properties());
assertEquals("Bundles proposal list has wrong size",GET_BUNDLE_EXPECTED_LIST_SIZE, list.size());
}
+ public static final int GET_BUNDLE_PROPERTIES_EXPECTED_LIST_SIZE = 3;
+
public void testGetBundleProperties() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_BUNDLE_PROPERTIES, "org.jboss.tools.jsf.test.Bundle", new Properties());
+ assertEquals("Bundles properties proposal list has wrong size",GET_BUNDLE_PROPERTIES_EXPECTED_LIST_SIZE, list.size());
}
/**
* Expected beans list size
*/
- public static final int GET_BEANS_EXPECTED_LIST_SIZE = 10;
+ public static final int GET_BEANS_EXPECTED_LIST_SIZE = 12;
/**
* <code>JSFPromptingProvider.getBundles()</code> method test
*/
public void testGetBeans() {
- List<Object> list = provider.getBeans(model);
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_MANAGED_BEANS, null, new Properties());
assertEquals("Managed Beans proposal list has wrong size",GET_BEANS_EXPECTED_LIST_SIZE, list.size());
-
}
+ public static final int GET_BEAN_PROPERTIES_LIST_SIZE = 5;
+
public void testGetBeanProperties() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_BEAN_PROPERTIES, "mbean1.", new Properties());
+ assertEquals("Bean properties proposal list has wrong size",GET_BEAN_PROPERTIES_LIST_SIZE, list.size());
}
+ public static final int BUILD_BEAN_PROPERTIES_LIST_SIZE = 5;
+
public void testBuildBeanProperties() {
- fail("Not yet implemented");
+ List list = provider.buildBeanProperties(model, "org.jboss.tools.jsf.test.ManagedBean1", null);
+ assertEquals("Bean properties proposal list has wrong size",BUILD_BEAN_PROPERTIES_LIST_SIZE, list.size());
}
- public void testBuildBean() {
- fail("Not yet implemented");
- }
-
- public void testFindBean() {
- fail("Not yet implemented");
- }
-
- public void testFindBeanClass() {
- fail("Not yet implemented");
- }
-
- public void testFindBeanClassByClassName() {
- fail("Not yet implemented");
- }
-
public void testGetBeanMethods() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_BEAN_METHODS, "mbean2", new Properties());
+ assertEquals(1, list.size());
}
public void testGetViewActions() {
- fail("Not yet implemented");
+ Properties p = new Properties();
+ p.setProperty(IWebPromptingProvider.VIEW_PATH, "/pages/inputname.jsp");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_VIEW_ACTIONS, "", p);
+ assertEquals(1, list.size());
}
- public void testGetPathAsList() {
- fail("Not yet implemented");
- }
-
public void testGetPath() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_GET_PATH, "/a.jsf", new Properties());
+ assertEquals(1, list.size());
+ String s = (String)list.get(0);
+ assertEquals("/a.jsp", s);
}
public void testOpenBean() {
@@ -148,7 +143,10 @@
@Override
protected void tearDown() throws Exception {
if(project!=null) {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle();
ResourcesUtils.deleteProject(TEST_PROJECT_NAME);
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
}
}
Modified: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java 2008-10-22 14:20:58 UTC (rev 11074)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java 2008-10-22 14:37:28 UTC (rev 11075)
@@ -46,9 +46,9 @@
public void testGettersAndSetters() {
IModelNature n = EclipseResourceUtil.getModelNature(project);
List<Object> result = WebPromptingProvider.getInstance().getList(n.getModel(), IWebPromptingProvider.JSF_BEAN_METHODS, "user.", new Properties());
- assertFalse("Method getX1 is not found. It is not a getter because it has type void.", result.contains("getX1"));
- assertFalse("Method getX2 is not found. It is not a getter because it has a parameter.", result.contains("getX2"));
- assertFalse("Method setX3 is not found. It is not a setter because it has 2 parameters", result.contains("setX3"));
+ assertTrue("Method getX1 is not found. It is not a getter because it has type void.", result.contains("getX1"));
+ assertTrue("Method getX2 is not found. It is not a getter because it has a parameter.", result.contains("getX2"));
+ assertTrue("Method setX3 is not found. It is not a setter because it has 2 parameters", result.contains("setX3"));
}
protected void tearDown() throws CoreException{
Modified: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java 2008-10-22 14:20:58 UTC (rev 11074)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java 2008-10-22 14:37:28 UTC (rev 11075)
@@ -16,6 +16,7 @@
import org.jboss.tools.jsf.web.helpers.context.ImportProjectWizardContext;
import org.jboss.tools.jst.web.context.*;
import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
import org.osgi.framework.Bundle;
import junit.framework.TestCase;
@@ -32,7 +33,7 @@
* FIXME test is disabled because it hangs build for an eternity
* http://jira.jboss.org/jira/browse/JBIDE-2441
*/
- public void disapledTestImportWithoutLinks() {
+ public void testImportWithoutLinks() {
if(projectLocation == null) return;
ImportWebDirProjectContext context = new ImportProjectWizardContext(XModelFactory.getDefaultInstance().getRoot());
@@ -60,7 +61,9 @@
p.getLocation().toFile().equals(projectLocation));
try {
+ boolean save = ResourcesUtils.setBuildAutomatically(false);
p.delete(false, true, new NullProgressMonitor());
+ ResourcesUtils.setBuildAutomatically(save);
} catch (CoreException e) {
JUnitUtils.fail("Error in removing project", e);
}
Modified: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2008-10-22 14:20:58 UTC (rev 11074)
+++ branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2008-10-22 14:37:28 UTC (rev 11075)
@@ -24,9 +24,9 @@
suite.addTestSuite(JSFModelTest.class);
suite.addTestSuite(ModelFormat_2_0_0_Test.class);
// FIXME http://jira.jboss.org/jira/browse/JBIDE-2441
- // suite.addTestSuite(JSFImportTest.class);
+ suite.addTestSuite(JSFImportTest.class);
suite.addTestSuite(JSFBeansTest.class);
- //suite.addTestSuite(JSFPromptingProviderTest.class);
+ suite.addTestSuite(JSFPromptingProviderTest.class);
return suite;
}
16 years, 2 months
JBoss Tools SVN: r11074 - in trunk/jsf/tests/org.jboss.tools.jsf.test: projects/JSFKickStartOldFormat/JavaSource/demo and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-22 10:20:58 -0400 (Wed, 22 Oct 2008)
New Revision: 11074
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/Messages.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/Bundle.properties
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean9.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/RefBean3.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/testCases.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean2.java
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
JBIDE-2421
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/Messages.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/Messages.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/JavaSource/demo/bundle/Messages.properties 2008-10-22 14:20:58 UTC (rev 11074)
@@ -0,0 +1 @@
+a=b
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config.xml 2008-10-22 13:40:07 UTC (rev 11073)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/WEB-INF/faces-config.xml 2008-10-22 14:20:58 UTC (rev 11074)
@@ -48,11 +48,11 @@
</converter>
<managed-bean>
<description>Input Value Holder</description>
- <managed-bean-name>nameBean</managed-bean-name>
- <managed-bean-class>demo.NameBean</managed-bean-class>
+ <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>userName</property-name>
+ <property-name>name</property-name>
<property-class>java.lang.String</property-class>
<value/>
</managed-property>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/testCases.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/testCases.xml 2008-10-22 13:40:07 UTC (rev 11073)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/testCases.xml 2008-10-22 14:20:58 UTC (rev 11074)
@@ -359,41 +359,41 @@
<!-- Test Managed Beans -->
<test name="JSFModelTest:testPaths:attribute">
- <property name="path" value="/faces-config.xml/Managed Beans/nameBean"/>
+ <property name="path" value="/faces-config.xml/Managed Beans/user"/>
<property name="attributeName" value="element type"/>
<property name="attributeValue" value="managed-bean"/>
</test>
<test name="JSFModelTest:testPaths:attribute">
- <property name="path" value="/faces-config.xml/Managed Beans/nameBean"/>
+ <property name="path" value="/faces-config.xml/Managed Beans/user"/>
<property name="attributeName" value="managed-bean-class"/>
- <property name="attributeValue" value="demo.NameBean"/>
+ <property name="attributeValue" value="demo.User"/>
</test>
<test name="JSFModelTest:testPaths:attribute">
- <property name="path" value="/faces-config.xml/Managed Beans/nameBean"/>
+ <property name="path" value="/faces-config.xml/Managed Beans/user"/>
<property name="attributeName" value="managed-bean-scope"/>
<property name="attributeValue" value="session"/>
</test>
<test name="JSFModelTest:testPaths:attribute">
- <property name="path" value="/faces-config.xml/Managed Beans/nameBean"/>
+ <property name="path" value="/faces-config.xml/Managed Beans/user"/>
<property name="attributeName" value="description"/>
<property name="attributeValue" value="Input Value Holder"/>
</test>
<!-- Test Managed Property -->
<test name="JSFModelTest:testPaths:attribute">
- <property name="path" value="/faces-config.xml/Managed Beans/nameBean/userName"/>
+ <property name="path" value="/faces-config.xml/Managed Beans/user/name"/>
<property name="attributeName" value="element type"/>
<property name="attributeValue" value="managed-property"/>
</test>
<!-- Test list-values -->
<test name="JSFModelTest:testPaths:attribute">
- <property name="path" value="/faces-config.xml/Managed Beans/nameBean/aliases/Entries"/>
+ <property name="path" value="/faces-config.xml/Managed Beans/user/aliases/Entries"/>
<property name="attributeName" value="element type"/>
<property name="attributeValue" value="list-entries"/>
</test>
<test name="JSFModelTest:testPaths:attribute">
- <property name="path" value="/faces-config.xml/Managed Beans/nameBean/aliases/Entries"/>
+ <property name="path" value="/faces-config.xml/Managed Beans/user/aliases/Entries"/>
<property name="attributeName" value="value-class"/>
<property name="attributeValue" value="java.lang.String"/>
</test>
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/Bundle.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/Bundle.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/Bundle.properties 2008-10-22 14:20:58 UTC (rev 11074)
@@ -0,0 +1,3 @@
+a=1
+b=2
+c=3
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean2.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean2.java 2008-10-22 13:40:07 UTC (rev 11073)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean2.java 2008-10-22 14:20:58 UTC (rev 11074)
@@ -10,4 +10,6 @@
public class ManagedBean2 {
public ManagedBean2() {
}
+
+ public void exec() {}
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean9.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean9.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/ManagedBean9.java 2008-10-22 14:20:58 UTC (rev 11074)
@@ -0,0 +1,13 @@
+/**
+ *
+ */
+package org.jboss.tools.jsf.test;
+
+/**
+ * @author eskimo
+ *
+ */
+public class ManagedBean9 {
+ public ManagedBean9() {
+ }
+}
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/RefBean3.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/RefBean3.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/JavaSource/org/jboss/tools/jsf/test/RefBean3.java 2008-10-22 14:20:58 UTC (rev 11074)
@@ -0,0 +1,49 @@
+package org.jboss.tools.jsf.test;
+
+public class RefBean3 {
+ private String property6;
+ private String property7;
+ private String property8;
+ private String property9;
+ private RefBean2 property10;
+
+ public String getProperty6() {
+ return property6;
+ }
+
+ public void setProperty6(String property1) {
+ this.property6 = property1;
+ }
+
+ public String getProperty7() {
+ return property7;
+ }
+
+ public void setProperty7(String property2) {
+ this.property7 = property2;
+ }
+
+ public String getProperty8() {
+ return property8;
+ }
+
+ public void setProperty8(String property3) {
+ this.property8 = property3;
+ }
+
+ public String getProperty9() {
+ return property9;
+ }
+
+ public void setProperty9(String property4) {
+ this.property9 = property4;
+ }
+
+ public RefBean2 getProperty10() {
+ return property10;
+ }
+
+ public void setProperty10(RefBean2 property5) {
+ this.property10 = property5;
+ }
+}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/WebContent/WEB-INF/faces-config.xml 2008-10-22 13:40:07 UTC (rev 11073)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFPromptingProviderTestProject/WebContent/WEB-INF/faces-config.xml 2008-10-22 14:20:58 UTC (rev 11074)
@@ -61,4 +61,14 @@
<referenced-bean-name>refbean2</referenced-bean-name>
<referenced-bean-class>org.jboss.tools.jsf.test.RefBean2</referenced-bean-class>
</referenced-bean>
+ <navigation-rule>
+ <from-view-id>/pages/inputname.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/pages/greeting.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <application>
+ <message-bundle>org.jboss.tools.jsf.test.Bundle</message-bundle>
+ </application>
</faces-config>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java 2008-10-22 13:40:07 UTC (rev 11073)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/model/pv/test/JSFPromptingProviderTest.java 2008-10-22 14:20:58 UTC (rev 11074)
@@ -3,14 +3,11 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
+import java.util.Properties;
-import org.eclipse.core.internal.resources.Workspace;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.model.XModel;
@@ -18,7 +15,9 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jsf.model.pv.JSFPromptingProvider;
import org.jboss.tools.jsf.plugin.JsfTestPlugin;
+import org.jboss.tools.jst.web.project.list.IWebPromptingProvider;
import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
import junit.framework.TestCase;
@@ -57,80 +56,76 @@
}
public void testIsSupporting() {
- fail("Not yet implemented");
+ assertTrue(provider.isSupporting(IWebPromptingProvider.JSF_BUNDLES));
}
public void testGetList() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, "", "", new Properties());
+ assertEquals("Empty list should be returned for unsupported id.",IWebPromptingProvider.EMPTY_LIST, list);
}
/******************************************************************
* getBundles method test
******************************************************************/
- public static final int GET_BUNDLE_EXPECTED_LIST_SIZE = 0;
+ public static final int GET_BUNDLE_EXPECTED_LIST_SIZE = 1;
/**
*
*/
public void testGetBundles() {
- List<Object> list = provider.getBundles(model);
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_BUNDLES, "", new Properties());
assertEquals("Bundles proposal list has wrong size",GET_BUNDLE_EXPECTED_LIST_SIZE, list.size());
}
+ public static final int GET_BUNDLE_PROPERTIES_EXPECTED_LIST_SIZE = 3;
+
public void testGetBundleProperties() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_BUNDLE_PROPERTIES, "org.jboss.tools.jsf.test.Bundle", new Properties());
+ assertEquals("Bundles properties proposal list has wrong size",GET_BUNDLE_PROPERTIES_EXPECTED_LIST_SIZE, list.size());
}
/**
* Expected beans list size
*/
- public static final int GET_BEANS_EXPECTED_LIST_SIZE = 10;
+ public static final int GET_BEANS_EXPECTED_LIST_SIZE = 12;
/**
* <code>JSFPromptingProvider.getBundles()</code> method test
*/
public void testGetBeans() {
- List<Object> list = provider.getBeans(model);
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_MANAGED_BEANS, null, new Properties());
assertEquals("Managed Beans proposal list has wrong size",GET_BEANS_EXPECTED_LIST_SIZE, list.size());
-
}
+ public static final int GET_BEAN_PROPERTIES_LIST_SIZE = 5;
+
public void testGetBeanProperties() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_BEAN_PROPERTIES, "mbean1.", new Properties());
+ assertEquals("Bean properties proposal list has wrong size",GET_BEAN_PROPERTIES_LIST_SIZE, list.size());
}
+ public static final int BUILD_BEAN_PROPERTIES_LIST_SIZE = 5;
+
public void testBuildBeanProperties() {
- fail("Not yet implemented");
+ List list = provider.buildBeanProperties(model, "org.jboss.tools.jsf.test.ManagedBean1", null);
+ assertEquals("Bean properties proposal list has wrong size",BUILD_BEAN_PROPERTIES_LIST_SIZE, list.size());
}
- public void testBuildBean() {
- fail("Not yet implemented");
- }
-
- public void testFindBean() {
- fail("Not yet implemented");
- }
-
- public void testFindBeanClass() {
- fail("Not yet implemented");
- }
-
- public void testFindBeanClassByClassName() {
- fail("Not yet implemented");
- }
-
public void testGetBeanMethods() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_BEAN_METHODS, "mbean2", new Properties());
+ assertEquals(1, list.size());
}
public void testGetViewActions() {
- fail("Not yet implemented");
+ Properties p = new Properties();
+ p.setProperty(IWebPromptingProvider.VIEW_PATH, "/pages/inputname.jsp");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_VIEW_ACTIONS, "", p);
+ assertEquals(1, list.size());
}
- public void testGetPathAsList() {
- fail("Not yet implemented");
- }
-
public void testGetPath() {
- fail("Not yet implemented");
+ List<Object> list = provider.getList(model, IWebPromptingProvider.JSF_GET_PATH, "/a.jsf", new Properties());
+ assertEquals(1, list.size());
+ String s = (String)list.get(0);
+ assertEquals("/a.jsp", s);
}
public void testOpenBean() {
@@ -148,7 +143,10 @@
@Override
protected void tearDown() throws Exception {
if(project!=null) {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle();
ResourcesUtils.deleteProject(TEST_PROJECT_NAME);
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java 2008-10-22 13:40:07 UTC (rev 11073)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java 2008-10-22 14:20:58 UTC (rev 11074)
@@ -46,9 +46,9 @@
public void testGettersAndSetters() {
IModelNature n = EclipseResourceUtil.getModelNature(project);
List<Object> result = WebPromptingProvider.getInstance().getList(n.getModel(), IWebPromptingProvider.JSF_BEAN_METHODS, "user.", new Properties());
- assertFalse("Method getX1 is not found. It is not a getter because it has type void.", result.contains("getX1"));
- assertFalse("Method getX2 is not found. It is not a getter because it has a parameter.", result.contains("getX2"));
- assertFalse("Method setX3 is not found. It is not a setter because it has 2 parameters", result.contains("setX3"));
+ assertTrue("Method getX1 is not found. It is not a getter because it has type void.", result.contains("getX1"));
+ assertTrue("Method getX2 is not found. It is not a getter because it has a parameter.", result.contains("getX2"));
+ assertTrue("Method setX3 is not found. It is not a setter because it has 2 parameters", result.contains("setX3"));
}
protected void tearDown() throws CoreException{
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java 2008-10-22 13:40:07 UTC (rev 11073)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java 2008-10-22 14:20:58 UTC (rev 11074)
@@ -16,6 +16,7 @@
import org.jboss.tools.jsf.web.helpers.context.ImportProjectWizardContext;
import org.jboss.tools.jst.web.context.*;
import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
import org.osgi.framework.Bundle;
import junit.framework.TestCase;
@@ -32,7 +33,7 @@
* FIXME test is disabled because it hangs build for an eternity
* http://jira.jboss.org/jira/browse/JBIDE-2441
*/
- public void disapledTestImportWithoutLinks() {
+ public void testImportWithoutLinks() {
if(projectLocation == null) return;
ImportWebDirProjectContext context = new ImportProjectWizardContext(XModelFactory.getDefaultInstance().getRoot());
@@ -60,7 +61,9 @@
p.getLocation().toFile().equals(projectLocation));
try {
+ boolean save = ResourcesUtils.setBuildAutomatically(false);
p.delete(false, true, new NullProgressMonitor());
+ ResourcesUtils.setBuildAutomatically(save);
} catch (CoreException e) {
JUnitUtils.fail("Error in removing project", e);
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2008-10-22 13:40:07 UTC (rev 11073)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2008-10-22 14:20:58 UTC (rev 11074)
@@ -24,9 +24,9 @@
suite.addTestSuite(JSFModelTest.class);
suite.addTestSuite(ModelFormat_2_0_0_Test.class);
// FIXME http://jira.jboss.org/jira/browse/JBIDE-2441
- // suite.addTestSuite(JSFImportTest.class);
+ suite.addTestSuite(JSFImportTest.class);
suite.addTestSuite(JSFBeansTest.class);
- //suite.addTestSuite(JSFPromptingProviderTest.class);
+ suite.addTestSuite(JSFPromptingProviderTest.class);
return suite;
}
16 years, 2 months
JBoss Tools SVN: r11073 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-22 09:40:07 -0400 (Wed, 22 Oct 2008)
New Revision: 11073
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/modalPanel.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810, tests for rich:modalPanel, rich:orderingList, rich:paint2D.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/modalPanel.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/modalPanel.xhtml 2008-10-22 13:04:59 UTC (rev 11072)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/modalPanel.xhtml 2008-10-22 13:40:07 UTC (rev 11073)
@@ -9,8 +9,7 @@
<head>
</head>
<body>
-<!-- Modal Panel -->
-<rich:modalPanel id="mp" minHeight="200" minWidth="450" height="200"
+<rich:modalPanel id="modalPanel" minHeight="200" minWidth="450" height="200"
width="500" zindex="2000">
<f:facet name="header">
<h:outputText value="Modal Panel Title" />
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml
===================================================================
(Binary files differ)
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2008-10-22 13:40:07 UTC (rev 11073)
@@ -0,0 +1,111 @@
+<tests>
+ <test id="orderingList">
+ <TABLE WIDTH="300" HEIGHT="200" CLASS="rich-ordering-list-body">
+ <TR>
+ <TD>
+ <DIV CLASS="rich-ordering-list-caption" STYLE="width: 350px; height: 300px;">
+ </DIV>
+ <DIV STYLE="overflow: hidden; width: 100%;">
+ <TABLE>
+ <TR>
+ <TD>
+ <DIV STYLE=""
+ CLASS="rich-ordering-list-output rich-ordering-list-content">
+ <TABLE CELLSPACING="1" CLASS="rich-ordering-list-items"
+ ID="orderingList" LISTHEIGHT="300" LISTWIDTH="350" STYLE="width: 100%;">
+ <THEAD>
+ <TR
+ CLASS="rich-ordering-list-header rich-ordering-list-table-header">
+ <TD
+ BACKGROUND="/.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/table_header_cell_bg.gif/"
+ CLASS="rich-ordering-list-table-header-cell" SCOP="col">
+ <SPAN> Song Name</SPAN>
+ </TD>
+ <TD
+ BACKGROUND="/.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/table_header_cell_bg.gif/"
+ CLASS="rich-ordering-list-table-header-cell" SCOP="col">
+ <SPAN> Artist Name</SPAN>
+ </TD>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR CLASS="rich-ordering-list-row">
+ <TD WIDTH="180" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> You must be evil</SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> Chris Rea</SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </TD>
+ <TD>
+ <DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <DIV STYLE="overflow: scroll; width: 100%; height: 17px;">
+ </DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </TD>
+ <TD ALIGN="center" CLASS="rich-ordering-list-button-valign">
+ <DIV CLASS="rich-ordering-controls null rich-ordering-list-button-layout">
+ <DIV CLASS="dr-buttons-border rich-ordering-control-top null">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/button_bg.gif\);/">
+ <A CLASS="rich-ordering-list-button-selection">
+ <DIV CLASS="rich-ordering-list-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/top.gif/"/>First
+ </DIV>
+ </A>
+ </DIV>
+ </DIV>
+ <DIV CLASS="dr-buttons-border rich-ordering-control-up null">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/button_bg.gif\);/">
+ <A CLASS="rich-ordering-list-button-selection">
+ <DIV CLASS="rich-ordering-list-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/up.gif/"/>Up
+ </DIV>
+ </A>
+ </DIV>
+ </DIV>
+ <DIV CLASS="dr-buttons-border rich-ordering-control-down null">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/button_bg.gif\);/">
+ <A CLASS="rich-ordering-list-button-selection">
+ <DIV CLASS="rich-ordering-list-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/down.gif/"/>Down
+ </DIV>
+ </A>
+ </DIV>
+ </DIV>
+ <DIV CLASS="dr-buttons-border rich-ordering-control-bottom null">
+ <DIV CLASS="rich-ordering-list-button"
+ STYLE="/width: 100%; background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/button_bg.gif\);/">
+ <A CLASS="rich-ordering-list-button-selection">
+ <DIV CLASS="rich-ordering-list-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/bottom.gif/"/>Last
+ </DIV>
+ </A>
+ </DIV>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml 2008-10-22 13:04:59 UTC (rev 11072)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml 2008-10-22 13:40:07 UTC (rev 11073)
@@ -10,9 +10,7 @@
</head>
<body>
-<!-- Paint 2D component -->
-<rich:paint2D id="painter" width="300" height="120" data="#{paintData}"
+<rich:paint2D id="paint2D" width="300" height="120" data="#{paintData}"
format="png" paint="#{paintBean.paint}" />
-<rich:spacer width="720" height="10" />
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml 2008-10-22 13:40:07 UTC (rev 11073)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="paint2D">
+ <IMG WIDTH="300" HEIGHT="120"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/paint2D/paint2D.gif/"
+ ID="paint2D" DATA="#{paintData}" FORMAT="png" PAINT="#{paintBean.paint}" />
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-22 13:04:59 UTC (rev 11072)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-22 13:40:07 UTC (rev 11073)
@@ -208,15 +208,15 @@
}
public void testModalPanel() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/modalPanel.xhtml", "modalPanel"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testOrderingList() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/orderingList.xhtml");//$NON-NLS-1$
}
public void testPaint2D() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/paint2D.xhtml");//$NON-NLS-1$
}
public void testPanel() throws Throwable {
16 years, 2 months
JBoss Tools SVN: r11072 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-22 09:04:59 -0400 (Wed, 22 Oct 2008)
New Revision: 11072
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
JBIDE-2956
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-22 12:57:57 UTC (rev 11071)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-22 13:04:59 UTC (rev 11072)
@@ -28,7 +28,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
import org.eclipse.jdt.internal.core.JavaElement;
import org.eclipse.jdt.internal.core.JavaElementInfo;
import org.eclipse.jdt.internal.core.JavaProject;
@@ -178,7 +178,10 @@
else {
fullyQualifiedName = ""; //$NON-NLS-1$
}
- fullyQualifiedName += ((TypeDeclaration)(resultCU.types().get(0))).getName();
+ Object tmp = resultCU.types().get(0);
+ if (tmp instanceof AbstractTypeDeclaration) {
+ fullyQualifiedName += ((AbstractTypeDeclaration)tmp).getName();
+ }
}
} catch (IllegalArgumentException e) {
HibernateConsolePlugin.getDefault().logErrorMessage("IllegalArgumentException: ", e); //$NON-NLS-1$
16 years, 2 months
JBoss Tools SVN: r11071 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-22 08:57:57 -0400 (Wed, 22 Oct 2008)
New Revision: 11071
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
JBIDE-2956
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-22 10:05:13 UTC (rev 11070)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-22 12:57:57 UTC (rev 11071)
@@ -28,7 +28,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
import org.eclipse.jdt.internal.core.JavaElement;
import org.eclipse.jdt.internal.core.JavaElementInfo;
import org.eclipse.jdt.internal.core.JavaProject;
@@ -178,7 +178,10 @@
else {
fullyQualifiedName = ""; //$NON-NLS-1$
}
- fullyQualifiedName += ((TypeDeclaration)(resultCU.types().get(0))).getName();
+ Object tmp = resultCU.types().get(0);
+ if (tmp instanceof AbstractTypeDeclaration) {
+ fullyQualifiedName += ((AbstractTypeDeclaration)tmp).getName();
+ }
}
} catch (IllegalArgumentException e) {
HibernateConsolePlugin.getDefault().logErrorMessage("IllegalArgumentException: ", e); //$NON-NLS-1$
16 years, 2 months
JBoss Tools SVN: r11070 - in branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui: src/org/jboss/tools/smooks/graphical/util and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-22 06:05:13 -0400 (Wed, 22 Oct 2008)
New Revision: 11070
Added:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLTargetModelAnalyzer.java
Removed:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksNewWizardPage.java
Modified:
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStructuredDataCreationWizard.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizardPage.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizard.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java
branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLSourceModelAnalyzer.java
Log:
JBIDE-2945
1.Change the data path keys' value of graphical information file .
The old keys' value is "xmlFile".
The new keys' value is "sourceDataPath" or "targetDataPath".
2.Add a extension to make the tools can parse the target xml data type.
3.Modify the creation wizard , if user don't select the source and target both , the wizard can't finish.
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2008-10-22 10:05:13 UTC (rev 11070)
@@ -154,8 +154,13 @@
</mappingAnalyzer>
<sourceModelAnalyzer
class="org.jboss.tools.smooks.xml2java.analyzer.XMLSourceModelAnalyzer"
- name="XML"
+ name="XML Source"
typeID="org.jboss.tools.smooks.xml.viewerInitor.xml">
</sourceModelAnalyzer>
+ <targetModelAnalyzer
+ class="org.jboss.tools.smooks.xml2java.analyzer.XMLTargetModelAnalyzer"
+ name="XML Target"
+ typeID="org.jboss.tools.smooks.xml.viewerInitor.xml">
+ </targetModelAnalyzer>
</extension>
</plugin>
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -42,7 +42,7 @@
private IEditorInput input;
protected Resource graphicalFileResource;
-
+
private IFile file = null;
/**
@@ -114,6 +114,12 @@
public void doSave(IProgressMonitor monitor, String sourceid,
String targetid) throws IOException, CoreException {
+ this.doSave(monitor, sourceid,targetid,null);
+ }
+
+ public void doSave(IProgressMonitor monitor, String sourceid,
+ String targetid, Properties properties) throws IOException,
+ CoreException {
GraphInformations graph = null;
if (graphicalFileResource != null) {
if (graphicalFileResource.getContents().isEmpty()) {
@@ -125,10 +131,15 @@
}
if (graph != null) {
initMappingTypes(graph, sourceid, targetid);
+ Params params = GraphicalFactory.eINSTANCE.createParams();
+ graph.setParams(params);
+ initParams(params, properties);
}
graphicalFileResource.save(Collections.EMPTY_MAP);
- if(this.file != null) file.refreshLocal(IResource.DEPTH_ONE, monitor);
+ if (this.file != null)
+ file.refreshLocal(IResource.DEPTH_ONE, monitor);
}
+
}
public void doSave(IProgressMonitor monitor,
@@ -136,36 +147,18 @@
CoreException {
String sourceID = context.getSourceDataTypeID();
String targetID = context.getTargetDataTypeID();
- GraphInformations graph = null;
- if (graphicalFileResource != null) {
- if (graphicalFileResource.getContents().isEmpty()) {
- graph = GraphicalFactory.eINSTANCE.createGraphInformations();
- graphicalFileResource.getContents().add(graph);
- } else {
- graph = (GraphInformations) graphicalFileResource.getContents()
- .get(0);
- }
- if (graph != null) {
- initMappingTypes(graph, sourceID, targetID);
- Params params = GraphicalFactory.eINSTANCE.createParams();
- graph.setParams(params);
- initParams(params, context);
- }
- graphicalFileResource.save(Collections.EMPTY_MAP);
- if(this.file != null) file.refreshLocal(IResource.DEPTH_ONE, monitor);
- }
-
+ Properties properties = context.getProperties();
+ this.doSave(monitor, sourceID,targetID,properties);
}
- private void initParams(Params params,
- SmooksConfigurationFileGenerateContext context) {
- Properties pros = context.getProperties();
- Enumeration<Object> keys = pros.keys();
+ private void initParams(Params params, Properties properties) {
+ if(properties == null) return;
+ Enumeration<Object> keys = properties.keys();
while (keys.hasMoreElements()) {
String key = (String) keys.nextElement();
Param param = GraphicalFactory.eINSTANCE.createParam();
param.setName(key);
- param.setValue(pros.getProperty(key));
+ param.setValue(properties.getProperty(key));
params.getParam().add(param);
}
}
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -41,6 +41,8 @@
import org.jboss.tools.smooks.analyzer.MappingResourceConfigList;
import org.jboss.tools.smooks.analyzer.SmooksAnalyzerException;
import org.jboss.tools.smooks.graphical.GraphInformations;
+import org.jboss.tools.smooks.graphical.Param;
+import org.jboss.tools.smooks.graphical.Params;
import org.jboss.tools.smooks.javabean.model.JavaBeanModel;
import org.jboss.tools.smooks.javabean.model.JavaBeanModelFactory;
import org.jboss.tools.smooks.model.AbstractResourceConfig;
@@ -76,6 +78,10 @@
public static final String SPACE_STRING = " ";
+ private static final int TARGET_DATA = 1;
+
+ private static final int SOURCE_DATA = 0;
+
private List usedConnectionList = new ArrayList();
private ComposedAdapterFactory adapterFactory;
@@ -350,7 +356,7 @@
AbstractStructuredDataModel sourceModel) {
JavaBeanModel source = (JavaBeanModel) sourceModel
.getReferenceEntityModel();
- if(source.getBeanClass().isArray()){
+ if (source.getBeanClass().isArray()) {
return source.getName();
}
if (Collection.class.isAssignableFrom(source.getBeanClass())) {
@@ -491,7 +497,11 @@
/*
* (non-Javadoc)
*
- * @see org.jboss.tools.smooks.analyzer.IMappingAnalyzer#analyzeMappingGraphModel(org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext)
+ * @see
+ * org.jboss.tools.smooks.analyzer.IMappingAnalyzer#analyzeMappingGraphModel
+ * (
+ * org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext
+ * )
*/
public void analyzeMappingGraphModel(
SmooksConfigurationFileGenerateContext context)
@@ -541,7 +551,8 @@
}
String beanClass = SmooksModelUtils.getParmaText(
"beanClass", rc);
- if (targetName!=null && targetName.trim().equals(beanClass)) {
+ if (targetName != null
+ && targetName.trim().equals(beanClass)) {
setSelectorIsUsed(sourceName);
// create the first connection
mappingModelList.add(new MappingModel(source, target));
@@ -649,6 +660,27 @@
return null;
}
+ private String getDataSourceClass(GraphInformations info, int dataMode) {
+ String key = "sourceDataPath";
+ if (dataMode == SOURCE_DATA) {
+ key = "sourceDataPath";
+ }
+ if (dataMode == TARGET_DATA) {
+ key = "targetDataPath";
+ }
+
+ Params params = info.getParams();
+ List paramList = params.getParam();
+ for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
+ Param param = (Param) iterator.next();
+ if (key.equals(param.getName())) {
+ return param.getValue();
+ }
+ }
+
+ return null;
+ }
+
public Object buildSourceInputObjects(GraphInformations graphInfo,
SmooksResourceListType listType, IFile sourceFile,
ClassLoader classLoader) throws InvocationTargetException {
@@ -673,9 +705,12 @@
}
}
}
-
- if (rootClassName == null)
+ if (rootClassName == null) {
+ rootClassName = this.getDataSourceClass(graphInfo, SOURCE_DATA);
+ }
+ if (rootClassName == null) {
return null;
+ }
boolean isWarning = false;
boolean isError = false;
@@ -756,10 +791,16 @@
}
}
}
- if (current == null)
+ if (current == null) {
+ rootClassName = this.getDataSourceClass(graphInfo, TARGET_DATA);
+ }
+ // if can't load the source from GraphicalInformation , return NULL
+ if (current == null && rootClassName == null)
return null;
Class rootClass = null;
- rootClassName = SmooksModelUtils.getParmaText("beanClass", current);
+ if (rootClassName == null) {
+ rootClassName = SmooksModelUtils.getParmaText("beanClass", current);
+ }
if (rootClassName != null && loader != null) {
try {
rootClass = loader.loadClass(rootClassName);
@@ -801,9 +842,6 @@
String selector = SmooksModelUtils
.getAttributeValueFromAnyType(binding,
SmooksModelUtils.ATTRIBUTE_SELECTOR);
- // if(property == null){
- // continue;
- // }
processBindingPropertyFromTargetModel(listType, property,
selector, beanModel, classLoader);
}
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -27,6 +27,7 @@
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.smooks.javabean.model.JavaBeanModel;
import org.jboss.tools.smooks.ui.IStructuredDataCreationWizard;
import org.jboss.tools.smooks.ui.SmooksUIActivator;
@@ -34,24 +35,30 @@
* @author Dart Peng
* @Date Aug 5, 2008
*/
-public class NewJavaBeanStrucutredDataWizard extends Wizard implements IStructuredDataCreationWizard,INewWizard{
+public class NewJavaBeanStrucutredDataWizard extends Wizard implements
+ IStructuredDataCreationWizard, INewWizard {
JavaBeanConfigWizardPage page = null;
IJavaProject project = null;
Object result = null;
Properties properties = new Properties();
- /* (non-Javadoc)
+
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jface.wizard.Wizard#addPages()
*/
@Override
public void addPages() {
super.addPages();
- if(page == null){
+ if (page == null) {
page = new JavaBeanConfigWizardPage(project);
this.addPage(page);
}
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.jface.wizard.Wizard#performFinish()
*/
@Override
@@ -67,12 +74,12 @@
}
public void init(IEditorSite site, IEditorInput input) {
- if(input != null && input instanceof IFileEditorInput){
- IFileEditorInput fi = (IFileEditorInput)input;
+ if (input != null && input instanceof IFileEditorInput) {
+ IFileEditorInput fi = (IFileEditorInput) input;
IProject project = fi.getFile().getProject();
- if(project instanceof IJavaProject){
- this.project = (IJavaProject)project;
- }else{
+ if (project instanceof IJavaProject) {
+ this.project = (IJavaProject) project;
+ } else {
this.project = JavaCore.create(project);
}
}
@@ -87,23 +94,34 @@
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
- if(selection != null){
+ if (selection != null) {
Object obj = selection.getFirstElement();
- if(obj instanceof JavaProject){
- this.project = (JavaProject)obj;
+ if (obj instanceof JavaProject) {
+ this.project = (JavaProject) obj;
}
- if(obj instanceof IResource){
- IProject project = ((IResource)obj).getProject();
+ if (obj instanceof IResource) {
+ IProject project = ((IResource) obj).getProject();
this.project = JavaCore.create(project);
}
-
- if(project == null){
- if(obj instanceof IAdaptable){
- IResource relateResource =(IResource) ((IAdaptable)obj).getAdapter(IResource.class);
+
+ if (project == null) {
+ if (obj instanceof IAdaptable) {
+ IResource relateResource = (IResource) ((IAdaptable) obj)
+ .getAdapter(IResource.class);
IProject project = relateResource.getProject();
this.project = JavaCore.create(project);
}
}
}
}
+
+ public String getStructuredDataSourcePath() {
+ JavaBeanModel model = page.getJavaBeanModel();
+ if (model != null) {
+ Class clazz = model.getBeanClass();
+ if (clazz != null)
+ return clazz.getName();
+ }
+ return null;
+ }
}
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStructuredDataCreationWizard.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStructuredDataCreationWizard.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/IStructuredDataCreationWizard.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -31,4 +31,6 @@
public Properties getProperties();
+ public String getStructuredDataSourcePath();
+
}
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -913,7 +913,7 @@
protected void initTransformViewerModel(IEditorSite site, IEditorInput input)
throws Throwable {
graphicalInformationSaver = new GraphicalInformationSaver(input);
-
+
GraphInformations graph = null;
try {
graph = graphicalInformationSaver.doLoad();
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/TypeIDSelectionWizardPage.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -116,8 +116,18 @@
}
return false;
}
+
+
@Override
+ public boolean isPageComplete() {
+ if (this.getSourceID() != null && getTargetID() != null) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
public IWizardPage getNextPage() {
String sourceID = this.getSourceID();
String targetID = this.getTargetID();
@@ -280,7 +290,6 @@
protected void openTargetWizard() {
targetTreeViewerInputContents = getReturnObjectFromWizard(getTargetID());
- resetLinkText();
}
protected IWizard getWizardViaDataID(String dataID) {
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizard.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -6,6 +6,7 @@
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
+import java.util.Properties;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
@@ -42,6 +43,10 @@
public class SmooksConfigFileNewWizard extends Wizard implements INewWizard,
ISmooksDataCreationAddtionWizard {
+ public static final String PRO_SOURCE_DATA_PATH = "sourceDataPath";
+
+ public static final String PRO_TARGET_DATA_PATH = "targetDataPath";
+
private SmooksConfigFileNewWizardPage page;
private TypeIDSelectionWizardPage typeIDPage;
@@ -60,7 +65,8 @@
super();
setNeedsProgressMonitor(true);
super.setWindowTitle("New Smooks Configuration File");
- setDefaultPageImageDescriptor(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_NEW_PROJECT));
+ setDefaultPageImageDescriptor(ModelUIImages
+ .getImageDescriptor(ModelUIImages.WIZARD_NEW_PROJECT));
}
/**
@@ -118,9 +124,10 @@
private void doFinish(final IFile file, IProgressMonitor monitor)
throws CoreException {
// create a sample file
- String sourceTypeID = typeIDPage.getSourceID();
- String targetTypeID = typeIDPage.getTargetID();
-
+ final String sourceTypeID = typeIDPage.getSourceID();
+ final String targetTypeID = typeIDPage.getTargetID();
+ final String[] sourceDataPath = new String[] { null };
+ final String[] targetDataPath = new String[] { null };
try {
InputStream stream = openContentStream();
if (file.exists()) {
@@ -129,11 +136,12 @@
file.create(stream, true, monitor);
}
stream.close();
- GraphicalInformationSaver ginforSave = new GraphicalInformationSaver(
- file);
- ginforSave.doSave(monitor, sourceTypeID, targetTypeID);
} catch (IOException e) {
+ // ignore
}
+ final GraphicalInformationSaver ginforSave = new GraphicalInformationSaver(
+ file);
+
monitor.worked(1);
monitor.setTaskName("Opening file for editing...");
getShell().getDisplay().asyncExec(new Runnable() {
@@ -156,32 +164,41 @@
if (sourceWizard instanceof IStructuredDataCreationWizard) {
Object sourceObj = ((IStructuredDataCreationWizard) sourceWizard)
.getTreeViewerInputContents();
-// if (sourceObj instanceof List) {
-// if (!((List) sourceObj).isEmpty()) {
-// sourceObj = ((List) sourceObj).get(0);
-// }
-// }
+ sourceDataPath[0] = ((IStructuredDataCreationWizard) sourceWizard)
+ .getStructuredDataSourcePath();
input.setSourceTreeViewerInputContents(sourceObj);
}
if (targetWizard instanceof IStructuredDataCreationWizard) {
Object targetObj = ((IStructuredDataCreationWizard) targetWizard)
.getTreeViewerInputContents();
-// if (targetObj instanceof List) {
-// if (!((List) targetObj).isEmpty()) {
-// targetObj = ((List) targetObj).get(0);
-// }
-// }
+ targetDataPath[0] = ((IStructuredDataCreationWizard) targetWizard)
+ .getStructuredDataSourcePath();
input.setTargetTreeViewerInputContents(targetObj);
}
-
+ Properties properties = null;
+ if (sourceDataPath[0] != null || targetDataPath[0] != null) {
+ properties = new Properties();
+ if (sourceDataPath[0] != null) {
+ properties.setProperty(PRO_SOURCE_DATA_PATH, sourceDataPath[0]);
+ }
+ if (targetDataPath[0] != null) {
+ properties.setProperty(PRO_TARGET_DATA_PATH, targetDataPath[0]);
+ }
+ }
+ try {
+ ginforSave.doSave(null, sourceTypeID, targetTypeID, properties);
+ } catch (IOException e) {
+ } catch (CoreException e) {
+ }
IDE.openEditor(page, input, SmooksFormEditor.EDITOR_ID,
true);// openEditor(page, file, true);
} catch (PartInitException e) {
}
}
});
+
monitor.worked(1);
}
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizardPage.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizardPage.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksConfigFileNewWizardPage.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -16,11 +16,13 @@
super.setTitle("Smooks Configuration");
super.setDescription("Create a new Smooks configuration file");
this.setFileName("newConfig.smooks");
+ this.setAllowExistingResources(false);
}
@Override
protected boolean validatePage() {
boolean flag = super.validatePage();
+ if(!flag) return flag;
String name = this.getFileName();
if (name.indexOf(".") == -1)
return flag;
Deleted: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksNewWizardPage.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksNewWizardPage.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/wizards/SmooksNewWizardPage.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -1,233 +0,0 @@
-package org.jboss.tools.smooks.ui.wizards;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.IDialogPage;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ContainerSelectionDialog;
-
-/**
- * The "New" wizard page allows setting the container for the new file as well
- * as the file name. The page will only accept file name without the extension
- * OR with the extension that matches the expected one (smooks).
- */
-
-public class SmooksNewWizardPage extends WizardPage {
- private Text containerText;
-
- private Text fileText;
-
- private ISelection selection;
-
- private Combo typeSelectCombo;
-
- /**
- * Constructor for SampleNewWizardPage.
- *
- * @param pageName
- */
- public SmooksNewWizardPage(ISelection selection) {
- super("wizardPage");
- setTitle("Multi-page Editor File");
- setDescription("This wizard creates a new file with *.smooks extension that can be opened by a multi-page editor.");
- this.selection = selection;
- }
-
- /**
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
-// if(true){
-// Button bu = new Button(parent,SWT.BORDER);
-// bu.setText("BUTTON");
-// this.setControl(bu);
-// return;
-// }
-// parent.setLayout(new FillLayout());
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 3;
- layout.verticalSpacing = 9;
- Label label = new Label(container, SWT.NULL);
- label.setText("&Container:");
-
- containerText = new Text(container, SWT.BORDER | SWT.SINGLE);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- containerText.setLayoutData(gd);
- containerText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- dialogChanged();
- }
- });
-
- Button button = new Button(container, SWT.PUSH);
- button.setText("Browse...");
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleBrowse();
- }
- });
- {
- Label l = new Label(container, SWT.NULL);
- l.setText("Trasform Type:");
-
- typeSelectCombo = new Combo(container, SWT.BORDER | SWT.READ_ONLY);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- typeSelectCombo.setLayoutData(gd);
- typeSelectCombo.addSelectionListener(new SelectionListener() {
-
- public void widgetDefaultSelected(SelectionEvent evt) {
-
- }
-
- public void widgetSelected(SelectionEvent evt) {
- dialogChanged();
- }
-
- });
- }
- {
- label = new Label(container, SWT.NULL);
- label.setText("&File name:");
-
- fileText = new Text(container, SWT.BORDER | SWT.SINGLE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- fileText.setLayoutData(gd);
- fileText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- dialogChanged();
- }
- });
- }
-
-
- initTypeSelectCombo();
- initialize();
- dialogChanged();
- setControl(container);
- }
-
- protected void initTypeSelectCombo() {
- typeSelectCombo.add("Java2Java");
- }
-
- /**
- * Tests if the current workbench selection is a suitable container to use.
- */
-
- private void initialize() {
- if (selection != null && selection.isEmpty() == false
- && selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.size() > 1)
- return;
- Object obj = ssel.getFirstElement();
- if (obj instanceof IResource) {
- IContainer container;
- if (obj instanceof IContainer)
- container = (IContainer) obj;
- else
- container = ((IResource) obj).getParent();
- containerText.setText(container.getFullPath().toString());
- }
- }
- fileText.setText("smooks-config.smooks");
- }
-
- /**
- * Uses the standard container selection dialog to choose the new value for
- * the container field.
- */
-
- private void handleBrowse() {
- ContainerSelectionDialog dialog = new ContainerSelectionDialog(
- getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
- "Select new file container");
- if (dialog.open() == ContainerSelectionDialog.OK) {
- Object[] result = dialog.getResult();
- if (result.length == 1) {
- containerText.setText(((Path) result[0]).toString());
- }
- }
- }
-
- /**
- * Ensures that both text fields are set.
- */
-
- private void dialogChanged() {
- IResource container = ResourcesPlugin.getWorkspace().getRoot()
- .findMember(new Path(getContainerName()));
- String fileName = getFileName();
-
- int index = typeSelectCombo.getSelectionIndex();
-
- if (index == -1) {
- updateStatus("Please select transform type");
- return;
- }
-
- if (getContainerName().length() == 0) {
- updateStatus("File container must be specified");
- return;
- }
- if (container == null
- || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
- updateStatus("File container must exist");
- return;
- }
- if (!container.isAccessible()) {
- updateStatus("Project must be writable");
- return;
- }
- if (fileName.length() == 0) {
- updateStatus("File name must be specified");
- return;
- }
- if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
- updateStatus("File name must be valid");
- return;
- }
- int dotLoc = fileName.lastIndexOf('.');
- if (dotLoc != -1) {
- String ext = fileName.substring(dotLoc + 1);
- if (ext.equalsIgnoreCase("smooks") == false) {
- updateStatus("File extension must be \"smooks\"");
- return;
- }
- }
- updateStatus(null);
- }
-
- private void updateStatus(String message) {
- setErrorMessage(message);
- setPageComplete(message == null);
- }
-
- public String getContainerName() {
- return containerText.getText();
- }
-
- public String getFileName() {
- return fileText.getText();
- }
-}
\ No newline at end of file
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -62,6 +62,7 @@
public String getFilePath(){
return fileText.getText();
}
+
/*
* (non-Javadoc)
*
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractStructuredDdataWizard.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -17,31 +17,29 @@
*
*/
public abstract class AbstractStructuredDdataWizard extends Wizard implements
- IStructuredDataCreationWizard ,INewWizard{
+ IStructuredDataCreationWizard, INewWizard {
protected IWorkbench workbench;
-
+
protected IStructuredSelection selection;
-
+
protected AbstractFileSelectionWizardPage page = null;
- protected Object xsdElement = null;
+ protected Object xsdElement = null;
protected IWizardNode strucutredDataCreationWizardNode;
- /**
- *
- */
+
public AbstractStructuredDdataWizard() {
// TODO Auto-generated constructor stub
}
@Override
public void addPages() {
- if(page == null){
+ if (page == null) {
page = createAbstractFileSelectionWizardPage();
page.setSelection(this.selection);
}
this.addPage(page);
}
- abstract protected AbstractFileSelectionWizardPage createAbstractFileSelectionWizardPage() ;
+ abstract protected AbstractFileSelectionWizardPage createAbstractFileSelectionWizardPage();
/*
* (non-Javadoc)
@@ -53,18 +51,28 @@
xsdElement = this.page.getReturnValue();
return true;
}
+
public Object getTreeViewerInputContents() {
return xsdElement;
}
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.ui.IStructuredDataCreationWizard#
+ * getStructuredDataSourcePath()
+ */
+ public String getStructuredDataSourcePath() {
+ return page.getFilePath();
+ }
+
public void init(IEditorSite site, IEditorInput input) {
-
+
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
}
-
-
+
}
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizard.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizard.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizard.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -35,7 +35,7 @@
public boolean performFinish() {
filePath = page.getFilePath();
- properties.put(XML_FILE, filePath);
+// properties.put(XML_FILE, filePath);
return super.performFinish();
}
Added: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.xml2java.analyzer;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Iterator;
+import java.util.List;
+
+import org.dom4j.DocumentException;
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.smooks.analyzer.ISourceModelAnalyzer;
+import org.jboss.tools.smooks.analyzer.ITargetModelAnalyzer;
+import org.jboss.tools.smooks.graphical.GraphInformations;
+import org.jboss.tools.smooks.graphical.Param;
+import org.jboss.tools.smooks.graphical.Params;
+import org.jboss.tools.smooks.model.SmooksResourceListType;
+import org.jboss.tools.smooks.xml.model.DocumentObject;
+import org.jboss.tools.smooks.xml.model.XMLObjectAnalyzer;
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 23, 2008
+ */
+public class AbstractXMLModelAnalyzer implements ISourceModelAnalyzer , ITargetModelAnalyzer {
+
+ private String parmaKey = "";
+
+ public AbstractXMLModelAnalyzer(String paramKey){
+ this.parmaKey = paramKey;
+ }
+
+ public Object buildSourceInputObjects(GraphInformations graphInfo,
+ SmooksResourceListType listType, IFile sourceFile)
+ throws InvocationTargetException {
+ Params params = graphInfo.getParams();
+ String path = null;
+ if (params != null) {
+ List<Param> paramList = graphInfo.getParams().getParam();
+ for (Iterator<Param> iterator = paramList.iterator(); iterator
+ .hasNext();) {
+ Param param = (Param) iterator.next();
+ if (param.getName().equals(parmaKey)) {
+ path = param.getValue();
+ break;
+ }
+ }
+ }
+ if (path == null) {
+ // TODO tell user the filepath can't find or not ?
+ return null;
+// throw new InvocationTargetException(new Exception(
+// "xml file path can't find in the graphInfo file"));
+ }
+ XMLObjectAnalyzer objectBuilder = new XMLObjectAnalyzer();
+ try {
+ FileInputStream stream = new FileInputStream(path);
+ DocumentObject document = objectBuilder.analyze(stream);
+ return document;
+ } catch (FileNotFoundException e) {
+ throw new InvocationTargetException(e);
+ } catch (DocumentException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+
+ public Object buildTargetInputObjects(GraphInformations graphInfo,
+ SmooksResourceListType listType, IFile sourceFile)
+ throws InvocationTargetException {
+ return buildSourceInputObjects(graphInfo,listType,sourceFile);
+ }
+}
Property changes on: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -218,6 +218,8 @@
JavaBeanModel sourceTarget = (JavaBeanModel) targetObject;
ResourceConfigType rootResourceConfig = findFirstMappingResourceConfig(listType);
+ // if can't find the root , return null
+ if(rootResourceConfig ==null) return null;
String xmlName = rootResourceConfig.getSelector();
AbstractXMLObject source = findXMLObjectByName(xmlName, sourceRoot);
if (source == null)
Modified: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLSourceModelAnalyzer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLSourceModelAnalyzer.java 2008-10-22 09:32:41 UTC (rev 11069)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLSourceModelAnalyzer.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -10,63 +10,15 @@
******************************************************************************/
package org.jboss.tools.smooks.xml2java.analyzer;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import org.dom4j.DocumentException;
-import org.eclipse.core.resources.IFile;
-import org.jboss.tools.smooks.analyzer.ISourceModelAnalyzer;
-import org.jboss.tools.smooks.graphical.GraphInformations;
-import org.jboss.tools.smooks.graphical.Param;
-import org.jboss.tools.smooks.graphical.Params;
-import org.jboss.tools.smooks.model.SmooksResourceListType;
-import org.jboss.tools.smooks.xml.model.AbstractXMLObject;
-import org.jboss.tools.smooks.xml.model.DocumentObject;
-import org.jboss.tools.smooks.xml.model.XMLObjectAnalyzer;
-
/**
* @author Dart Peng<br>
* Date : Sep 23, 2008
*/
-public class XMLSourceModelAnalyzer implements ISourceModelAnalyzer {
+public class XMLSourceModelAnalyzer extends AbstractXMLModelAnalyzer{
- public static final String XML_FILE = "xmlFile";
-
- public Object buildSourceInputObjects(GraphInformations graphInfo,
- SmooksResourceListType listType, IFile sourceFile)
- throws InvocationTargetException {
- Params params = graphInfo.getParams();
- String path = null;
- if (params != null) {
- List<Param> paramList = graphInfo.getParams().getParam();
- for (Iterator<Param> iterator = paramList.iterator(); iterator
- .hasNext();) {
- Param param = (Param) iterator.next();
- if (param.getName().equals(XML_FILE)) {
- path = param.getValue();
- break;
- }
- }
- }
- if (path == null) {
- // TODO tell user the filepath can't find or not ?
- return null;
-// throw new InvocationTargetException(new Exception(
-// "xml file path can't find in the graphInfo file"));
- }
- XMLObjectAnalyzer objectBuilder = new XMLObjectAnalyzer();
- try {
- FileInputStream stream = new FileInputStream(path);
- DocumentObject document = objectBuilder.analyze(stream);
- return document;
- } catch (FileNotFoundException e) {
- throw new InvocationTargetException(e);
- } catch (DocumentException e) {
- throw new InvocationTargetException(e);
- }
+ public XMLSourceModelAnalyzer() {
+ super("sourceDataPath");
}
+
}
Added: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLTargetModelAnalyzer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLTargetModelAnalyzer.java (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLTargetModelAnalyzer.java 2008-10-22 10:05:13 UTC (rev 11070)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.xml2java.analyzer;
+
+
+/**
+ * @author Dart Peng<br>
+ * Date : Sep 23, 2008
+ */
+public class XMLTargetModelAnalyzer extends AbstractXMLModelAnalyzer{
+
+ public XMLTargetModelAnalyzer() {
+ super("targetDataPath");
+ }
+
+}
Property changes on: branches/jbosstools-3.0.0.Beta1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XMLTargetModelAnalyzer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 2 months
JBoss Tools SVN: r11069 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-22 05:32:41 -0400 (Wed, 22 Oct 2008)
New Revision: 11069
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2936, image source paths were updated.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-10-22 09:25:33 UTC (rev 11068)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-10-22 09:32:41 UTC (rev 11069)
@@ -913,7 +913,7 @@
headerCell.setAttribute("background", "file:///" //$NON-NLS-1$ //$NON-NLS-2$
+ ComponentUtil
- .getAbsoluteResourcePath(HEADER_IMG_PATH));
+ .getAbsoluteResourcePath(HEADER_IMG_PATH).replace('\\', '/'));
// get header classes
String headerClass = styleClasses.get("headerCell"); //$NON-NLS-1$
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-10-22 09:25:33 UTC (rev 11068)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-10-22 09:32:41 UTC (rev 11069)
@@ -410,7 +410,7 @@
div2.appendChild(a);
a.appendChild(div3);
// Creating button with image and label
- img.setAttribute("src", "file:///" + ComponentUtil.getAbsoluteResourcePath(imgName));
+ ComponentUtil.setImg(img, imgName);
img.setAttribute(HTML.ATTR_WIDTH, "15");
img.setAttribute(HTML.ATTR_HEIGHT, "15");
div3.appendChild(img);
@@ -746,7 +746,7 @@
parentTr.appendChild(td);
td.setAttribute(HtmlComponentUtil.HTML_ATTR_BACKGROUND, "file:///"
- + ComponentUtil.getAbsoluteResourcePath(HEADER_CELL_BG));
+ + ComponentUtil.getAbsoluteResourcePath(HEADER_CELL_BG).replace('\\', '/'));
String styleClass = encodeStyleClass(null, skinCellClass,
headerClass, columnHeaderClass);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2008-10-22 09:25:33 UTC (rev 11068)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2008-10-22 09:32:41 UTC (rev 11069)
@@ -291,8 +291,7 @@
RichFacesTabPanelTemplate.CSS_SIDE_CELL
+ SPACE +
RichFacesTabPanelTemplate.CSS_SIDE_BORDER);
- String borderImgPath = ComponentUtil.getAbsoluteResourcePath(BORDER_FILE_PATH);
- String style = "background-image: url(file:///" + borderImgPath.replace('\\', '/') + ");"; //$NON-NLS-1$ //$NON-NLS-2$
+ String style = ComponentUtil.getBackgoundImgStyle(BORDER_FILE_PATH);
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
nsIDOMElement img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
td.appendChild(img);
16 years, 2 months
JBoss Tools SVN: r11068 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-22 05:25:33 -0400 (Wed, 22 Oct 2008)
New Revision: 11068
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2810, tests for rich:message, rich:messages, rich:listShuttle.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml 2008-10-22 09:11:47 UTC (rev 11067)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml 2008-10-22 09:25:33 UTC (rev 11068)
@@ -10,16 +10,25 @@
</head>
<body>
-<rich:listShuttle sourceValue="#{person.source}"
- targetValue="#{person.target}" var="items" targetListWidth="200"
- sourceCaptionLabel="source label" targetCaptionLabel="target label"
- orderControlsVerticalAlign="top">
+<f:view>
- <rich:column>
- <h:outputText value="#{items}"></h:outputText>
- </rich:column>
+ <rich:listShuttle id="listShuttle" sourceValue="#{person.source}"
+ targetValue="#{person.target}" var="items" targetListWidth="200"
+ sourceCaptionLabel="source label" targetCaptionLabel="target label">
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Song Name" />
+ </f:facet>
+ <h:outputText value="You must be evil"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Artist Name" />
+ </f:facet>
+ <h:outputText value="Chris Rea"></h:outputText>
+ </rich:column>
+ </rich:listShuttle>
-</rich:listShuttle>
-
+/<f:view>
</body>
</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml 2008-10-22 09:25:33 UTC (rev 11068)
@@ -0,0 +1,200 @@
+<tests>
+ <test id="listShuttle">
+ <TABLE CLASS="rich-list-shuttle" STYLE="">
+ <TR>
+ <TD COLSPAN="2" CLASS="rich-shuttle-source-caption"> source label</TD>
+ <TD COLSPAN="2" CLASS="rich-shuttle-target-caption"> target label</TD>
+ </TR>
+ <TR>
+ <TD>
+ <DIV CLASS="rich-shuttle-list-content" STYLE="width: 140px; height: 140px;">
+ <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
+ <TR CLASS="">
+ <TH
+ BACKGROUND="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/header.gif/"
+ CLASS="rich-shuttle-header-tab-cell">
+ <DIV>
+ <SPAN> Song Name</SPAN>
+ </DIV>
+ </TH>
+ <TH
+ BACKGROUND="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/header.gif/"
+ CLASS="rich-shuttle-header-tab-cell">
+ <DIV>
+ <SPAN> Artist Name</SPAN>
+ </DIV>
+ </TH>
+ </TR>
+ <TR STYLE="vertical-align: top;" CLASS="rich-shuttle-source-row null">
+ <TD>
+ <TABLE>
+ <TR>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> You must be evil</SPAN>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ <TD>
+ <TABLE>
+ <TR>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> Chris Rea</SPAN>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </TD>
+ <TD STYLE="vertical-align: middle;">
+ <DIV CLASS="rich-shuttle-controls">
+ <DIV CLASS="rich-shuttle-control">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif\);/"
+ CLASS="rich-shuttle-meta-button">
+ <DIV CLASS="rich-shuttle-button rich-shuttle-copyAll">
+ <DIV CLASS="rich-shuttle-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_copy_all.gif/"/> Copy all
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-shuttle-control">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif\);/"
+ CLASS="rich-shuttle-meta-button">
+ <DIV CLASS="rich-shuttle-button rich-shuttle-copy">
+ <DIV CLASS="rich-shuttle-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_copy.gif/"/> Copy
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-shuttle-control">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif\);/"
+ CLASS="rich-shuttle-meta-button">
+ <DIV CLASS="rich-shuttle-button rich-shuttle-remove">
+ <DIV CLASS="rich-shuttle-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_remove.gif/"/> Remove
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-shuttle-control">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif\);/"
+ CLASS="rich-shuttle-meta-button">
+ <DIV CLASS="rich-shuttle-button rich-shuttle-removeAll">
+ <DIV CLASS="rich-shuttle-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_remove_all.gif/"/> Remove All
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </TD>
+ <TD>
+ <DIV CLASS="rich-shuttle-list-content" STYLE="height: 140px;">
+ <TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
+ <TR CLASS="">
+ <TH
+ BACKGROUND="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/header.gif/"
+ CLASS="rich-shuttle-header-tab-cell">
+ <DIV>
+ <SPAN> Song Name</SPAN>
+ </DIV>
+ </TH>
+ <TH
+ BACKGROUND="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/header.gif/"
+ CLASS="rich-shuttle-header-tab-cell">
+ <DIV>
+ <SPAN> Artist Name</SPAN>
+ </DIV>
+ </TH>
+ </TR>
+ <TR STYLE="vertical-align: top;" CLASS="rich-shuttle-target-row null">
+ <TD>
+ <TABLE>
+ <TR>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> You must be evil</SPAN>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ <TD>
+ <TABLE>
+ <TR>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> Chris Rea</SPAN>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </TD>
+ <TD STYLE="vertical-align: middle;">
+ <DIV CLASS="rich-shuttle-controls">
+ <DIV CLASS="rich-shuttle-control">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif\);/"
+ CLASS="rich-shuttle-meta-button">
+ <DIV CLASS="rich-shuttle-button rich-shuttle-top">
+ <DIV CLASS="rich-shuttle-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_first.gif/"/> First
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-shuttle-control">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif\);/"
+ CLASS="rich-shuttle-meta-button">
+ <DIV CLASS="rich-shuttle-button rich-shuttle-up">
+ <DIV CLASS="rich-shuttle-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_up.gif/"/> Up
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-shuttle-control">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif\);/"
+ CLASS="rich-shuttle-meta-button">
+ <DIV CLASS="rich-shuttle-button rich-shuttle-down">
+ <DIV CLASS="rich-shuttle-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_down.gif/"/> Down
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ <DIV CLASS="rich-shuttle-control">
+ <DIV
+ STYLE="/background-image: url\(.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/button.gif\);/"
+ CLASS="rich-shuttle-meta-button">
+ <DIV CLASS="rich-shuttle-button rich-shuttle-bottom">
+ <DIV CLASS="rich-shuttle-button-content">
+ <IMG WIDTH="15" HEIGHT="15"
+ SRC="/.*org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/arrow_last.gif/"/> Last
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/listShuttle.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml 2008-10-22 09:11:47 UTC (rev 11067)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml 2008-10-22 09:25:33 UTC (rev 11068)
@@ -9,8 +9,9 @@
<head>
</head>
<body>
- <!-- Message -->
- <rich:message>
- </rich:message>
+ <f:view>
+ <rich:message id="message">
+ </rich:message>
+</f:view>
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml.xml 2008-10-22 09:25:33 UTC (rev 11068)
@@ -0,0 +1,5 @@
+<tests>
+ <test id="message">
+ <SPAN> Validation message</SPAN>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/message.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml 2008-10-22 09:11:47 UTC (rev 11067)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml 2008-10-22 09:25:33 UTC (rev 11068)
@@ -9,8 +9,9 @@
<head>
</head>
<body>
- <!-- Messages -->
- <rich:messages>
- </rich:messages>
+<f:view>
+ <rich:messages id="messages">
+ </rich:messages>
+</f:view>
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml 2008-10-22 09:25:33 UTC (rev 11068)
@@ -0,0 +1,38 @@
+<tests>
+ <test id="messages">
+ <TABLE>
+ <TR>
+ <TD>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ <TD>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ </TR>
+ <TR>
+ <TD>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ <TD> Error message</TD>
+ </TR>
+ <TR>
+ <TD>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ <TD> Fatal message</TD>
+ </TR>
+ <TR>
+ <TD>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ <TD> Info message</TD>
+ </TR>
+ <TR>
+ <TD>
+ <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ </TD>
+ <TD> Warning message</TD>
+ </TR>
+ </TABLE>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/messages.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-22 09:11:47 UTC (rev 11067)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2008-10-22 09:25:33 UTC (rev 11068)
@@ -196,15 +196,15 @@
}
public void testListShuttle() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/listShuttle.xhtml");//$NON-NLS-1$
}
public void testMessage() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/message.xhtml");//$NON-NLS-1$
}
public void testMessages() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/messages.xhtml");//$NON-NLS-1$
}
public void testModalPanel() throws Throwable {
16 years, 2 months
JBoss Tools SVN: r11067 - branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-10-22 05:11:47 -0400 (Wed, 22 Oct 2008)
New Revision: 11067
Modified:
branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeClassPathInitializer.java
Log:
JBIDE-2955: fix the null exception error when remove jboss ws classpath entry
Modified: branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeClassPathInitializer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeClassPathInitializer.java 2008-10-22 08:33:10 UTC (rev 11066)
+++ branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeClassPathInitializer.java 2008-10-22 09:11:47 UTC (rev 11067)
@@ -82,12 +82,14 @@
JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance()
.findRuntimeByName(segment);
if (jbws != null) {
-
- List<String> jars = JBossWSRuntimeManager.getInstance().getAllRuntimeJars(jbws);
+
+ List<String> jars = JBossWSRuntimeManager.getInstance()
+ .getAllRuntimeJars(jbws);
for (String jar : jars) {
entryList.add(getEntry(new Path(jar)));
}
- entries = entryList.toArray(new IClasspathEntry[entryList.size()]);
+ entries = entryList.toArray(new IClasspathEntry[entryList
+ .size()]);
if (entries == null)
return new IClasspathEntry[0];
}
@@ -104,14 +106,21 @@
if (entries == null) {
return;
}
- IClasspathEntry[] newEntries = new IClasspathEntry[entries.length - 1];
- int i = 0;
+
+ List<IClasspathEntry> entriesList = new ArrayList<IClasspathEntry>();
for (IClasspathEntry entry : entries) {
- if (!entry.toString().contains(jarName)) {
- newEntries[i++] = entry;
+ if (entry != null) {
+ IPath path = entry.getPath();
+ if (path != null) {
+ if (path != null && path.lastSegment() != null
+ && path.lastSegment().equals(jarName)) {
+ continue;
+ }
+ }
+ entriesList.add(entry);
}
}
- entries = newEntries;
+ entries = entriesList.toArray(new IClasspathEntry[0]);
}
}
16 years, 2 months