JBoss Tools SVN: r24146 - trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-08-13 09:16:49 -0400 (Fri, 13 Aug 2010)
New Revision: 24146
Added:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTest.java
Log:
[JBIDE-6376] url strategey changed + test added
Added: trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
===================================================================
--- trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java (rev 0)
+++ trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java 2010-08-13 13:16:49 UTC (rev 24146)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * 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.usage.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.UnsupportedEncodingException;
+
+import org.jboss.tools.usage.jgoogleanalytics.EclipseEnvironment;
+import org.jboss.tools.usage.jgoogleanalytics.FocusPoint;
+import org.jboss.tools.usage.jgoogleanalytics.GoogleAnalyticsUrlStrategy;
+import org.jboss.tools.usage.jgoogleanalytics.IGoogleAnalyticsParameters;
+import org.junit.Before;
+import org.junit.Test;
+
+public class GoogleAnalyticsUrlStrategyTest {
+
+ private static final String GANALYTICS_ACCOUNTNAME = "UA-17645367-1";
+ private static final String HOSTNAME = "jboss.org";
+ private GoogleAnalyticsUrlStrategy urlStrategy;
+
+ @Before
+ public void setUp() {
+ this.urlStrategy = new EclipseEnvironmentGAUrlStrategy();
+ }
+
+ @Test
+ public void testUrlIsBuiltCorrectly() throws UnsupportedEncodingException {
+ FocusPoint focusPoint = new FocusPoint("testing").setChild(new FocusPoint("strategy"));
+ String url = urlStrategy.build(focusPoint);
+ String targetUrl = "http://www.google-analytics.com/__utm.gif?"
+ + "utmwv=4.7.2"
+ + "&utmn=33832126513"
+ + "&utmhn=jboss.org"
+ + "&utmcs=UTF-8"
+ + "&utmsr=1920x1080"
+ + "&utmsc=24-bit"
+ + "&utmul=en-us"
+ + "&utmdt=testing-strategy"
+ + "&utmhid=1087431432"
+ + "&utmr=0"
+ + "&utmp=%2Ftesting%2Fstrategy"
+ + "&utmac=UA-17645367-1"
+ + "&__utma%3D156030503.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+ + "&gaq=1";
+ // assertEquals(expectedUrl, builtUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_TRACKING_CODE_VERSION, url, targetUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_HOST_NAME, url, targetUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_LANGUAGE_ENCODING, url, targetUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_SCREEN_RESOLUTION, url, targetUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_SCREEN_COLOR_DEPTH, url, targetUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_PAGE_TITLE, url, targetUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_REFERRAL, url, targetUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_PAGE_REQUEST, url, targetUrl);
+ assertEqualParameterValues(IGoogleAnalyticsParameters.PARAM_ACCOUNT_NAME, url, targetUrl);
+ }
+
+ private void assertEqualParameterValues(String paramName, String url, String targetUrl) {
+ String targetValue = getParameterValue(paramName, targetUrl,IGoogleAnalyticsParameters.AMPERSAND);
+ String value = getParameterValue(paramName, url,IGoogleAnalyticsParameters.AMPERSAND);
+ assertEquals("parameter '" + paramName + "' did not match", targetValue, value);
+ }
+
+ private String getParameterValue(String parameterName, String url, char... delimiters) {
+ String value = null;
+ int parameterNameStart = url.indexOf(parameterName);
+ if (parameterNameStart > 0) {
+ for (char delimiter : delimiters) {
+ int valueEnd = url.indexOf(delimiter, parameterNameStart + parameterName.length());
+ if (valueEnd > 0) {
+ value = url.substring(parameterNameStart + parameterName.length() + 1, valueEnd);
+ break;
+ }
+ }
+ }
+ return value;
+ }
+
+ private class EclipseEnvironmentGAUrlStrategy extends GoogleAnalyticsUrlStrategy {
+ private EclipseEnvironmentGAUrlStrategy() {
+ super(new EclipseEnvironmentFake());
+ }
+ }
+
+ private class EclipseEnvironmentFake extends EclipseEnvironment {
+
+ public EclipseEnvironmentFake() {
+ super(GANALYTICS_ACCOUNTNAME, HOSTNAME, "0");
+ }
+
+ @Override
+ protected void initScreenSettings() {
+ // do not access swt/display
+ }
+
+ @Override
+ public String getScreenResolution() {
+ return 1920 + SCREERESOLUTION_DELIMITER + 1080;
+ }
+
+ @Override
+ public String getScreenColorDepth() {
+ return 24 + SCREENCOLORDEPTH_POSTFIX;
+ }
+
+ }
+}
Property changes on: trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
===================================================================
--- trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java 2010-08-13 12:42:48 UTC (rev 24145)
+++ trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java 2010-08-13 13:16:49 UTC (rev 24146)
@@ -10,8 +10,6 @@
public class JBossToolsUsageRequestsTest {
- private static final String GOOGLE_ANALYTICS_TRACKING_URL = "http://www.google-analytics.com/__utm.gif";
-
@Test
public void testUrl0() throws IOException {
String userAgent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) Firefox/10.0.0";
@@ -186,7 +184,7 @@
method.request(url);
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
}
-
+
@Test
public void testUrl0_6() throws IOException {
String userAgent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) com.jboss.jbds.product/3.0.1";
@@ -238,75 +236,72 @@
}
@Test
- public void testUrl1() throws IOException {
- String userAgent = "JBossToolsUsageRequestsTest/1.0.0";
+ public void testUrl0_7_1() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-us)";
TestHttpGetMethod method = new TestHttpGetMethod(userAgent);
- String url = GOOGLE_ANALYTICS_TRACKING_URL
- +"?"
- +"utmwv=4.7.2"
- +"utmn=338321266"
- +"utmhn=jboss.org"
- +"utmcs=UTF-8"
- +"utmsr=1920x1080"
- +"utmsc=24-bit"
- +"utmul=en-us"
- +"utmje=1"
- +"utmfl=10.1%20r53"
- +"utmdt=-%20JBoss%20Community"
- +"utmhid=1087431432"
- +"utmr=0"
- +"utmp=%2Ftools%2Fusage/testUrl1"
- +"utmac=UA-17645367-1"
- +"utmcc=__utma%3D156030500.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- +"gaq=1";
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ +"utmwv=4.7.2"
+ +"&utmn=338321068"
+ +"&utmhn=jboss.org"
+ +"&utmcs=UTF-8"
+ +"&utmsr=1920x1080"
+ +"&utmsc=24-bit"
+ +"&utmje=1"
+ +"&utmfl=10.1%20r53"
+ +"&utmdt=-%20JBoss%20Community"
+ +"&utmhid=1087431432"
+ +"&utmr=0"
+ +"&utmp=%2Ftools%2Fusage%2FtestUrl0_7_1"
+ +"&utmac=UA-17645367-1"
+ +"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+ +"&gaq=1";
method.request(url);
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
}
+
@Test
- public void testUrl2() throws IOException {
- String userAgent = "JBossToolsUsageRequestsTest/1.0.0";
+ public void testUrl0_7_2() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US)";
TestHttpGetMethod method = new TestHttpGetMethod(userAgent);
- String url = GOOGLE_ANALYTICS_TRACKING_URL
- +"?"
- +"utmwv=4.7.2"
- +"utmn=338321267"
- +"utmhn=jboss.org"
- +"utmcs=UTF-8"
- +"utmsr=1920x1080"
- +"utmsc=24-bit"
- +"utmul=en-us"
- +"utmdt=-%20JBoss%20Community"
- +"utmhid=1087431432"
- +"utmr=0"
- +"utmp=%2Ftools%2Fusage/testUrl2"
- +"utmac=UA-17645367-1"
- +"utmcc=__utma%3D156030500.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- +"gaq=1";
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ +"utmwv=4.7.2"
+ +"&utmn=338333268"
+ +"&utmhn=jboss.org"
+ +"&utmcs=UTF-8"
+ +"&utmsr=1920x1080"
+ +"&utmsc=24-bit"
+ +"&utmul=en-us"
+ +"&utmdt=-%20JBoss%20Community"
+ +"&utmhid=1087431432"
+ +"&utmr=0"
+ +"&utmp=%2Ftools%2Fusage%2FtestUrl0_7_2"
+ +"&utmac=UA-17645367-1"
+ +"&utmcc=__utma%3D156660507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+ +"&gaq=1";
method.request(url);
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
}
-
+
@Test
- public void testUrl3() throws IOException {
- String userAgent = "JBossToolsUsageRequestsTest/1.0.0";
+ public void testUrl0_7_3() throws IOException {
+ String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US)";
TestHttpGetMethod method = new TestHttpGetMethod(userAgent);
- String url = GOOGLE_ANALYTICS_TRACKING_URL
- +"?"
- +"utmwv=4.7.2"
- +"utmn=338321268"
- +"utmhn=jboss.org"
- +"utmcs=UTF-8"
- +"utmsr=1920x1080"
- +"utmsc=24-bit"
- +"utmul=en-us"
- +"utmdt=-%20JBoss%20Community"
- +"utmhid=1087431432"
- +"utmr=0"
- +"utmp=%2Ftools%2Fusage/testUrl3"
- +"utmac=UA-17645367-1"
- +"utmcc=__utma%3D156030500.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- +"gaq=1";
+ String url = "http://www.google-analytics.com/__utm.gif?"
+ +"utmwv=4.7.2"
+ +"&utmn=331333268"
+ +"&utmhn=jboss.org"
+ +"&utmcs=UTF-8"
+ +"&utmsr=1920x1080"
+ +"&utmsc=24-bit"
+ +"&utmul=en-us"
+ +"&utmdt=tools-usage-test_0_7_3"
+ +"&utmhid=1087431432"
+ +"&utmr=0"
+ +"&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3"
+ +"&utmac=UA-17645367-1"
+ +"&utmcc=__utma%3D116660507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+ +"&gaq=1";
method.request(url);
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
}
Modified: trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTest.java
===================================================================
--- trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTest.java 2010-08-13 12:42:48 UTC (rev 24145)
+++ trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageTest.java 2010-08-13 13:16:49 UTC (rev 24146)
@@ -14,21 +14,21 @@
import org.jboss.tools.usage.jgoogleanalytics.EclipseEnvironment;
import org.jboss.tools.usage.jgoogleanalytics.FocusPoint;
import org.jboss.tools.usage.jgoogleanalytics.IGoogleAnalyticsParameters;
-import org.jboss.tools.usage.jgoogleanalytics.JGoogleAnalyticsTracker;
+import org.jboss.tools.usage.jgoogleanalytics.Tracker;
import org.jboss.tools.usage.jgoogleanalytics.PluginLogger;
import org.jboss.tools.usage.test.internal.JBossToolsUsageTestActivator;
import org.junit.Test;
public class JBossToolsUsageTest {
+ private static final String HOST_NAME = "jboss.org";
+
private FocusPoint focusPoint = new FocusPoint("jboss.org")
.setChild(new FocusPoint("tools")
.setChild(new FocusPoint("usage")
- .setChild(new FocusPoint("action")
- .setChild(new FocusPoint("wsstartup")
- .setChild(new FocusPoint("testversion472"))))));
+ .setChild(new FocusPoint("instance"))));
- private static final String GANALYTICS_TRACKINGCODE = "UA-17645367-1";
+ private static final String GANALYTICS_ACCOUNTNAME = "UA-17645367-1";
@Test
public void testTrackAsynchronously() throws Exception {
@@ -45,10 +45,9 @@
private IUsageTracker getGoogleAnalyticsTracker() {
IGoogleAnalyticsParameters eclipseSettings = new EclipseEnvironment(
- GANALYTICS_TRACKINGCODE, JBossToolsUsageTestActivator.PLUGIN_ID);
- JGoogleAnalyticsTracker tracker = new JGoogleAnalyticsTracker(eclipseSettings);
- tracker.setLoggingAdapter(new PluginLogger(JBossToolsUsageTestActivator
- .getDefault()));
+ GANALYTICS_ACCOUNTNAME, HOST_NAME, JBossToolsUsageTestActivator.PLUGIN_ID);
+ Tracker tracker = new Tracker(eclipseSettings);
+ tracker.setLoggingAdapter(new PluginLogger(JBossToolsUsageTestActivator.getDefault()));
return tracker;
}
}
15 years, 8 months
JBoss Tools SVN: r24145 - in trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf: web/validation/jsf2 and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-08-13 08:42:48 -0400 (Fri, 13 Aug 2010)
New Revision: 24145
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java
Log:
https://jira.jboss.org/browse/JBIDE-6685
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-08-13 12:02:21 UTC (rev 24144)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-08-13 12:42:48 UTC (rev 24145)
@@ -103,7 +103,7 @@
Create_JSF_2_Composite_Component=Create JSF 2 composite component named "{0}" in "{1}"
Missing_JSF_2_Composite_Component=Composite component "{0}" was not found in a project resources directory
Missing_JSF_2_Component_Attr=Attribute "{0}" is not defined for "{1}" composite component
-Create_JSF_2_Interface_Attr=Create attribute in an interface declaration of a composite component
+Create_JSF_2_Interface_Attr=Create attribute "{0}" in an interface declaration "{2}" of a composite component "{1}"
Missing_JSF_2_Resources_Folder=JSF 2 Resources folder "{0}" is missing in a project root directory
Create_JSF_2_Resources_Folder=Create a folder "{0}" container for JSF 2 resources for URL "{1}"
Rename_JSF_2_Composite_Components=Rename JSF 2 composite components
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java 2010-08-13 12:02:21 UTC (rev 24144)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java 2010-08-13 12:42:48 UTC (rev 24145)
@@ -129,6 +129,7 @@
component.getName());
message.setAttribute(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY,
component.getComponentResourceLocation());
+ message.setAttribute(JSF2ResourceUtil.JSF2_COMPONENT_NAME, component.getElementName());
return;
}
if (args[0] instanceof JSF2URITempComponent) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java 2010-08-13 12:02:21 UTC (rev 24144)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java 2010-08-13 12:42:48 UTC (rev 24145)
@@ -43,7 +43,7 @@
return new IMarkerResolution[] { new JSF2CompositeComponentProposal(marker) };
}
if (IJSF2ValidationComponent.JSF2_FIXABLE_ATTR_TYPE.equals(fixType)) {
- return new IMarkerResolution[] { new JSF2CompositeAttrsProposal() };
+ return new IMarkerResolution[] { new JSF2CompositeAttrsProposal(marker) };
}
if (IJSF2ValidationComponent.JSF2_URI_TYPE.equals(fixType)) {
return new IMarkerResolution[] { new JSF2ResourcesFolderProposal(marker) };
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java 2010-08-13 12:02:21 UTC (rev 24144)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeAttrsProposal.java 2010-08-13 12:42:48 UTC (rev 24145)
@@ -11,6 +11,7 @@
package org.jboss.tools.jsf.web.validation.jsf2.action;
+import java.text.MessageFormat;
import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
@@ -19,6 +20,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
import org.jboss.tools.jsf.messages.JSFUIMessages;
import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
@@ -34,9 +36,18 @@
private String componentPath = null;
private String[] attrs = null;
+ private String elementName = null;
+ private String attrName="";
- public JSF2CompositeAttrsProposal() {
- super();
+ public JSF2CompositeAttrsProposal(IMarker marker) {
+ super(marker.getResource());
+ try {
+ this.elementName=(String) marker.getAttribute(JSF2ResourceUtil.JSF2_COMPONENT_NAME);
+ this.componentPath=(String) marker.getAttribute(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY);
+ this.attrName=(String)marker.getAttribute(IJSF2ValidationComponent.JSF2_ATTR_NAME_KEY);
+ } catch (CoreException e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ }
}
public JSF2CompositeAttrsProposal(IResource validateResource,
@@ -47,7 +58,7 @@
}
public String getDisplayString() {
- return JSFUIMessages.Create_JSF_2_Interface_Attr;
+ return MessageFormat.format(JSFUIMessages.Create_JSF_2_Interface_Attr,attrName,elementName,JSF2ResourceUtil.calculateProjectRelativeJSF2ResourceProposal(validateResource.getProject())+componentPath);
}
@Override
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java 2010-08-13 12:02:21 UTC (rev 24144)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2AttrTempComponent.java 2010-08-13 12:42:48 UTC (rev 24145)
@@ -38,11 +38,14 @@
}
public void createValidationMessage() {
- String nodeName = parentEl.getLocalName();
this.validationMessage = MessageFormat.format(
JSFUIMessages.Missing_JSF_2_Component_Attr, attr.getName(),
- nodeName);
+ getElementName());
}
+
+ public String getElementName(){
+ return parentEl.getLocalName();
+ }
public String getValidationMessage() {
return validationMessage;
15 years, 8 months
JBoss Tools SVN: r24144 - in trunk: jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-08-13 08:02:21 -0400 (Fri, 13 Aug 2010)
New Revision: 24144
Removed:
trunk/usage/tests/org.jboss.tools.usage.test/bin/org/
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ResourceUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeComponentProposal.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java
trunk/usage/tests/org.jboss.tools.usage.test/bin/
Log:
https://jira.jboss.org/browse/JBIDE-6685
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ResourceUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ResourceUtil.java 2010-08-13 10:53:09 UTC (rev 24143)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ResourceUtil.java 2010-08-13 12:02:21 UTC (rev 24144)
@@ -11,6 +11,7 @@
package org.jboss.tools.jsf.jsf2.util;
+import java.io.File;
import java.util.zip.ZipEntry;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
@@ -251,5 +252,26 @@
return JSF2ComponentModelManager.getManager()
.updateJSF2CompositeComponentFile(jsf2ResFile, attrNames);
}
+ /**
+ * Calculates workspace relative jsf2 resources string
+ * @return workspace relative resource string
+ * @author mareshkau
+ */
+
+ public static String calculateProjectRelativeJSF2ResourceProposal( IProject project){
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ String projectResourceRelativePath = "";
+ if (component != null) {
+ IVirtualFolder webRootFolder = component.getRootFolder().getFolder(
+ new Path("/")); //$NON-NLS-1$
+ IContainer folder = webRootFolder.getUnderlyingFolder();
+ IFolder webFolder = ResourcesPlugin.getWorkspace().getRoot()
+ .getFolder(folder.getFullPath());
+ IFolder resourcesFolder = webFolder.getFolder("resources");
+ resourcesFolder.getProjectRelativePath().toString();
+ projectResourceRelativePath=project.getName()+File.separator+resourcesFolder.getProjectRelativePath().toString();
+ }
+ return projectResourceRelativePath;
+ }
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-08-13 10:53:09 UTC (rev 24143)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-08-13 12:02:21 UTC (rev 24144)
@@ -105,7 +105,7 @@
Missing_JSF_2_Component_Attr=Attribute "{0}" is not defined for "{1}" composite component
Create_JSF_2_Interface_Attr=Create attribute in an interface declaration of a composite component
Missing_JSF_2_Resources_Folder=JSF 2 Resources folder "{0}" is missing in a project root directory
-Create_JSF_2_Resources_Folder=Create a folder container for JSF 2 resources
+Create_JSF_2_Resources_Folder=Create a folder "{0}" container for JSF 2 resources for URL "{1}"
Rename_JSF_2_Composite_Components=Rename JSF 2 composite components
Refactoring_JSF_2_resources=Refactoring JSF 2 resources
Refactoring_JSF_2_Rename_Action=Refactoring is not available in the current place
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java 2010-08-13 10:53:09 UTC (rev 24143)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java 2010-08-13 12:02:21 UTC (rev 24144)
@@ -137,6 +137,8 @@
IJSF2ValidationComponent.JSF2_URI_TYPE);
message.setAttribute(IJSF2ValidationComponent.JSF2_URI_NAME_KEY,
component.getURI());
+ message.setAttribute(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY,
+ component.getResourcesFolder());
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java 2010-08-13 10:53:09 UTC (rev 24143)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ComponentResolutionGenerator.java 2010-08-13 12:02:21 UTC (rev 24144)
@@ -40,15 +40,13 @@
String fixType = (String) marker
.getAttribute(IJSF2ValidationComponent.JSF2_TYPE_KEY);
if (IJSF2ValidationComponent.JSF2_COMPOSITE_COMPONENT_TYPE.equals(fixType)) {
- return new IMarkerResolution[] { new JSF2CompositeComponentProposal(marker.getResource(),
- (String) marker.getAttribute(JSF2ResourceUtil.JSF2_COMPONENT_NAME),
- (String) marker.getAttribute(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY)) };
+ return new IMarkerResolution[] { new JSF2CompositeComponentProposal(marker) };
}
if (IJSF2ValidationComponent.JSF2_FIXABLE_ATTR_TYPE.equals(fixType)) {
return new IMarkerResolution[] { new JSF2CompositeAttrsProposal() };
}
if (IJSF2ValidationComponent.JSF2_URI_TYPE.equals(fixType)) {
- return new IMarkerResolution[] { new JSF2ResourcesFolderProposal() };
+ return new IMarkerResolution[] { new JSF2ResourcesFolderProposal(marker) };
}
} catch (CoreException e) {
JSFModelPlugin.getPluginLog().logError(e);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeComponentProposal.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeComponentProposal.java 2010-08-13 10:53:09 UTC (rev 24143)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2CompositeComponentProposal.java 2010-08-13 12:02:21 UTC (rev 24144)
@@ -30,6 +30,7 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
import org.jboss.tools.jsf.messages.JSFUIMessages;
import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
@@ -47,10 +48,14 @@
private String[] attrs = null;
private String elementName;
- public JSF2CompositeComponentProposal(IResource validateResource, String elementName,String componentPath) {
- super(validateResource);
- this.elementName=elementName;
- this.componentPath=componentPath;
+ public JSF2CompositeComponentProposal(IMarker marker) {
+ super(marker.getResource());
+ try {
+ this.elementName=(String) marker.getAttribute(JSF2ResourceUtil.JSF2_COMPONENT_NAME);
+ this.componentPath=(String) marker.getAttribute(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY);
+ } catch (CoreException e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ }
}
public JSF2CompositeComponentProposal(IResource validateResource,
@@ -78,18 +83,8 @@
}
public String getDisplayString() {
- IVirtualComponent component = ComponentCore.createComponent(validateResource.getProject());
- String projectResourceRelativePath = componentPath;
- if (component != null) {
- IVirtualFolder webRootFolder = component.getRootFolder().getFolder(
- new Path("/")); //$NON-NLS-1$
- IContainer folder = webRootFolder.getUnderlyingFolder();
- IFolder webFolder = ResourcesPlugin.getWorkspace().getRoot()
- .getFolder(folder.getFullPath());
- IFolder resourcesFolder = webFolder.getFolder("resources");
- resourcesFolder.getProjectRelativePath().toString();
- projectResourceRelativePath=validateResource.getProject().getName()+File.separator+resourcesFolder.getProjectRelativePath().toString()+componentPath;
- }
+ String projectResourceRelativePath = JSF2ResourceUtil.calculateProjectRelativeJSF2ResourceProposal(validateResource.getProject())
+ +componentPath;
return MessageFormat.format(JSFUIMessages.Create_JSF_2_Composite_Component,elementName,
projectResourceRelativePath);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java 2010-08-13 10:53:09 UTC (rev 24143)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java 2010-08-13 12:02:21 UTC (rev 24144)
@@ -11,9 +11,12 @@
package org.jboss.tools.jsf.web.validation.jsf2.action;
+import java.text.MessageFormat;
+
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.jsf2.util.JSF2ResourceUtil;
import org.jboss.tools.jsf.messages.JSFUIMessages;
import org.jboss.tools.jsf.web.validation.jsf2.JSF2XMLValidator;
@@ -28,9 +31,16 @@
public class JSF2ResourcesFolderProposal extends JSF2AbstractProposal {
private String componentPath = null;
+ private String URL=null;
- public JSF2ResourcesFolderProposal() {
- super();
+ public JSF2ResourcesFolderProposal(IMarker marker) {
+ super(marker.getResource());
+ try {
+ this.componentPath=(String) marker.getAttribute(JSF2ResourceUtil.COMPONENT_RESOURCE_PATH_KEY);
+ this.URL = (String) marker.getAttribute(IJSF2ValidationComponent.JSF2_URI_NAME_KEY);
+ } catch (CoreException e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ }
}
public JSF2ResourcesFolderProposal(IResource validateResource, String compPath) {
@@ -39,7 +49,8 @@
}
public String getDisplayString() {
- return JSFUIMessages.Create_JSF_2_Resources_Folder;
+ return MessageFormat.format(JSFUIMessages.Create_JSF_2_Resources_Folder,
+ JSF2ResourceUtil.calculateProjectRelativeJSF2ResourceProposal(validateResource.getProject())+componentPath,URL);
}
@Override
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java 2010-08-13 10:53:09 UTC (rev 24143)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/components/JSF2URITempComponent.java 2010-08-13 12:02:21 UTC (rev 24144)
@@ -32,10 +32,13 @@
}
public void createValidationMessage() {
- String mesParam = "/resources" + URI.replaceAll(JSF2ResourceUtil.JSF2_URI_PREFIX, ""); //$NON-NLS-1$ //$NON-NLS-2$
this.validationMessage = MessageFormat.format(
- JSFUIMessages.Missing_JSF_2_Resources_Folder, mesParam);
+ JSFUIMessages.Missing_JSF_2_Resources_Folder, getResourcesFolder());
}
+
+ public String getResourcesFolder(){
+ return "/resources" + URI.replaceAll(JSF2ResourceUtil.JSF2_URI_PREFIX, ""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
public String getValidationMessage() {
return validationMessage;
Property changes on: trunk/usage/tests/org.jboss.tools.usage.test/bin
___________________________________________________________________
Name: svn:ignore
+ target
15 years, 8 months
JBoss Tools SVN: r24143 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-08-13 06:53:09 -0400 (Fri, 13 Aug 2010)
New Revision: 24143
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSection.java
Log:
override tag not appreciated by builds for interface methods
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-08-13 10:49:52 UTC (rev 24142)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-08-13 10:53:09 UTC (rev 24143)
@@ -83,19 +83,16 @@
return true;
}
- @Override
public String getServerLocation(IServerWorkingCopy wc) {
IJBossServerRuntime jbsrt = (IJBossServerRuntime)wc.getRuntime().loadAdapter(IJBossServerRuntime.class, null);
return jbsrt.getConfigLocation();
}
- @Override
public String getServerConfigName(IServerWorkingCopy wc) {
IJBossServerRuntime jbsrt = (IJBossServerRuntime)wc.getRuntime().loadAdapter(IJBossServerRuntime.class, null);
return jbsrt.getJBossConfiguration();
}
- @Override
public void propertyChange(PropertyChangeEvent evt,
DeploymentModuleOptionCompositeAssistant composite) {
// TODO Auto-generated method stub
@@ -755,7 +752,6 @@
lastWC.addPropertyChangeListener(this);
}
- @Override
public void propertyChange(PropertyChangeEvent evt) {
if( evt.getPropertyName().equals( IDeployableServer.SERVER_MODE)) {
String mode = page.getServer().getAttribute(IDeployableServer.SERVER_MODE, LocalPublishMethod.LOCAL_PUBLISH_METHOD);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSection.java 2010-08-13 10:49:52 UTC (rev 24142)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSection.java 2010-08-13 10:53:09 UTC (rev 24143)
@@ -138,7 +138,6 @@
deployTypeCombo.select(index);
}
deployTypeCombo.addModifyListener(new ModifyListener(){
- @Override
public void modifyText(ModifyEvent e) {
deployTypeChanged(true);
}});
15 years, 8 months
JBoss Tools SVN: r24141 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: dpospisi(a)redhat.com
Date: 2010-08-13 06:49:50 -0400 (Fri, 13 Aug 2010)
New Revision: 24141
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
Log:
RequirementAwareSuite - added support for categories.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-08-13 10:40:20 UTC (rev 24140)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-08-13 10:49:50 UTC (rev 24141)
@@ -1,19 +1,29 @@
package org.jboss.tools.ui.bot.ext;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.Vector;
+
import org.apache.log4j.Logger;
import org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.TestConfiguration;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
+import org.junit.Test;
+import org.junit.experimental.categories.Categories.CategoryFilter;
+import org.junit.experimental.categories.Categories.ExcludeCategory;
+import org.junit.experimental.categories.Categories.IncludeCategory;
+import org.junit.experimental.categories.Category;
import org.junit.runner.Description;
import org.junit.runner.Runner;
+import org.junit.runner.manipulation.Filter;
+import org.junit.runner.manipulation.NoTestsRemainException;
import org.junit.runner.notification.RunListener;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.BlockJUnit4ClassRunner;
@@ -34,6 +44,70 @@
// we have one global instance of cleanup listener
final static DoAfterAllTestsRunListener cleanUp = new DoAfterAllTestsRunListener();
+ final Filter categoryFilter;
+
+ public static class CategoryFilter extends Filter {
+ public static CategoryFilter include(Class<?> categoryType) {
+ return new CategoryFilter(categoryType, null);
+ }
+
+ private final Class<?> fIncluded;
+ private final Class<?> fExcluded;
+
+ public CategoryFilter(Class<?> includedCategory,
+ Class<?> excludedCategory) {
+ fIncluded= includedCategory;
+ fExcluded= excludedCategory;
+ }
+
+ @Override
+ public String describe() {
+ return "category " + fIncluded;
+ }
+
+ @Override
+ public boolean shouldRun(Description description) {
+ if (hasCorrectCategoryAnnotation(description))
+ return true;
+ for (Description each : description.getChildren())
+ if (shouldRun(each))
+ return true;
+ return false;
+ }
+
+ private boolean hasCorrectCategoryAnnotation(Description description) {
+ List<Class<?>> categories= categories(description);
+ if (categories.isEmpty())
+ return fIncluded == null;
+ for (Class<?> each : categories)
+ if (fExcluded != null && fExcluded.isAssignableFrom(each))
+ return false;
+ for (Class<?> each : categories)
+ if (fIncluded == null || fIncluded.isAssignableFrom(each))
+ return true;
+ return false;
+ }
+
+ private List<Class<?>> categories(Description description) {
+ ArrayList<Class<?>> categories= new ArrayList<Class<?>>();
+ categories.addAll(Arrays.asList(directCategories(description)));
+ //categories.addAll(Arrays.asList(directCategories(parentDescription(description))));
+ return categories;
+ }
+
+ private Description parentDescription(Description description) {
+ // TODO: how heavy are we cringing?
+ return Description.createSuiteDescription(description.getTestClass());
+ }
+
+ private Class<?>[] directCategories(Description description) {
+ Category annotation= description.getAnnotation(Category.class);
+ if (annotation == null)
+ return new Class<?>[0];
+ return annotation.value();
+ }
+ }
+
class ReqAwareClassRunner extends BlockJUnit4ClassRunner {
private final TestConfiguration config;
private final List<RequirementBase> requirements;
@@ -44,9 +118,28 @@
super(klass);
this.requirements = requirements;
this.config = config;
+
+ try {
+ filter(categoryFilter);
+ } catch (NoTestsRemainException e) {
+ // TODO Auto-generated catch block
+ throw new InitializationError(e);
+ }
+
}
@Override
+ protected List<FrameworkMethod> computeTestMethods() {
+ List<FrameworkMethod> testMethods = getTestClass().getAnnotatedMethods(Test.class);
+ List<FrameworkMethod> filteredMethods = new Vector<FrameworkMethod>();
+ for (FrameworkMethod method : testMethods) {
+ method.getAnnotation(Category.class);
+ }
+ return testMethods;
+
+ }
+
+ @Override
public void run(RunNotifier notifier) {
// planned test counter must know about all tests (methods) within a
// class
@@ -210,6 +303,7 @@
public RequirementAwareSuite(Class<?> klass) throws Throwable {
super(klass, Collections.<Runner> emptyList());
log.info("Loading test configurations");
+
for (Entry<Object, Object> entry : TestConfigurator.multiProperties
.entrySet()) {
try {
@@ -223,6 +317,16 @@
log.error("Error loading test configuration", ex);
}
}
+
+ try {
+ categoryFilter = new CategoryFilter(getIncludedCategory(klass),
+ getExcludedCategory(klass));
+ filter(categoryFilter);
+
+ } catch (NoTestsRemainException e) {
+ throw new InitializationError(e);
+ }
+
}
@Override
@@ -245,4 +349,15 @@
}
}
+
+ private Class<?> getIncludedCategory(Class<?> klass) {
+ IncludeCategory annotation= klass.getAnnotation(IncludeCategory.class);
+ return annotation == null ? null : annotation.value();
+ }
+
+ private Class<?> getExcludedCategory(Class<?> klass) {
+ ExcludeCategory annotation= klass.getAnnotation(ExcludeCategory.class);
+ return annotation == null ? null : annotation.value();
+ }
+
}
15 years, 8 months
JBoss Tools SVN: r24140 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-08-13 06:40:20 -0400 (Fri, 13 Aug 2010)
New Revision: 24140
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
https://jira.jboss.org/browse/JBIDE-6745 https://jira.jboss.org/browse/JBIDE-6730 Restored fixes for those bugs which was overriden by revision 24129 (JBIDE-6580).
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-08-13 10:25:23 UTC (rev 24139)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-08-13 10:40:20 UTC (rev 24140)
@@ -351,7 +351,7 @@
versions="5.0"/>
<moduleType
types="jst.web"
- versions="2.2, 2.3, 2.4, 2.5"/>
+ versions="2.2, 2.3, 2.4, 2.5, 3.0"/>
<moduleType
types="jst.ejb"
versions="1.0, 1.1, 2.0, 2.1, 3.0"/>
@@ -795,7 +795,7 @@
<runtime-component
id="org.jboss.ide.eclipse.as.runtime.component"
version="6.0"/>
- <facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
+ <facet id="jst.web" version="2.2,2.3,2.4,2.5,3.0"/>
<facet id="jst.java" version="5.0,6.0"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5"/>
@@ -855,7 +855,7 @@
</runtime-component>
<facet
id="jst.java"
- version="5.0">
+ version="6.0">
</facet>
</default-facets>
<default-facets>
15 years, 8 months
JBoss Tools SVN: r24139 - in trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test: server and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-08-13 06:25:23 -0400 (Fri, 13 Aug 2010)
New Revision: 24139
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTDeploymentTester.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTZippedDeploymentTester.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/MockTests.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/StartupShutdownTest.java
Log:
JBIDE-5680 test compilation error
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTDeploymentTester.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTDeploymentTester.java 2010-08-13 10:08:49 UTC (rev 24138)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTDeploymentTester.java 2010-08-13 10:25:23 UTC (rev 24139)
@@ -1,11 +1,9 @@
package org.jboss.ide.eclipse.as.test.publishing.v2;
import java.io.BufferedInputStream;
-import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTZippedDeploymentTester.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTZippedDeploymentTester.java 2010-08-13 10:08:49 UTC (rev 24138)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTZippedDeploymentTester.java 2010-08-13 10:25:23 UTC (rev 24139)
@@ -255,6 +255,10 @@
unzipFile(unzip1.append("mvel2.jar"), unzip2);
assertTrue(unzip2.toFile().list().length > 1);
System.out.println("end");
+
+ removeModule(mod);
+ publish();
+ assertFalse(zipped.toFile().exists());
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/MockTests.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/MockTests.java 2010-08-13 10:08:49 UTC (rev 24138)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/MockTests.java 2010-08-13 10:25:23 UTC (rev 24139)
@@ -4,13 +4,13 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.jboss.ide.eclipse.as.core.extensions.polling.ProcessTerminatedPoller.IProcessProvider;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
@@ -90,10 +90,10 @@
int loops = 0;
JBossServerBehavior behavior = (JBossServerBehavior)server.loadAdapter(JBossServerBehavior.class, null);
-
+
while(loops < 50) {
- if( behavior.getProcess() != null ) {
- return behavior.getProcess();
+ if( ((IProcessProvider)behavior.getDelegate()).getProcess() != null ) {
+ return ((IProcessProvider)behavior.getDelegate()).getProcess();
}
try {
loops++;
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/StartupShutdownTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/StartupShutdownTest.java 2010-08-13 10:08:49 UTC (rev 24138)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/StartupShutdownTest.java 2010-08-13 10:25:23 UTC (rev 24139)
@@ -34,9 +34,10 @@
import org.eclipse.swt.SWTException;
import org.eclipse.swt.widgets.Display;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServer.IOperationListener;
import org.eclipse.wst.server.core.IServerListener;
import org.eclipse.wst.server.core.ServerEvent;
-import org.eclipse.wst.server.core.IServer.IOperationListener;
+import org.jboss.ide.eclipse.as.core.extensions.polling.ProcessTerminatedPoller.IProcessProvider;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.test.ASTest;
@@ -259,8 +260,8 @@
JBossServerBehavior behavior =
(JBossServerBehavior)currentServer.loadAdapter(JBossServerBehavior.class, null);
if( behavior != null ) {
- if( behavior.getProcess() != null ) {
- return behavior.getProcess().getStreamsProxy().getOutputStreamMonitor();
+ if( ((IProcessProvider)behavior.getDelegate()).getProcess() != null ) {
+ return ((IProcessProvider)behavior.getDelegate()).getProcess().getStreamsProxy().getOutputStreamMonitor();
}
}
return null;
15 years, 8 months
JBoss Tools SVN: r24138 - trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-08-13 06:08:49 -0400 (Fri, 13 Aug 2010)
New Revision: 24138
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
Log:
https://jira.jboss.org/browse/JBIDE-6160
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2010-08-13 10:07:28 UTC (rev 24137)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2010-08-13 10:08:49 UTC (rev 24138)
@@ -2407,7 +2407,12 @@
<XModelAttribute PROPERTIES="category=general"
name="use caller identity" xmlname="useCallerIdentity"/>
<XModelAttribute PROPERTIES="category=general"
- name="callback handler" xmlname="callbackHandler"/>
+ name="callback handler" xmlname="callbackHandler">
+ <Constraint loader="ListString">
+ <value name="org.jboss.soa.esb.services.security.auth.login.JBossSTSIssueCallbackHandler"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
</XModelAttribute>
15 years, 8 months
JBoss Tools SVN: r24137 - in trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates: jsf-2.0 and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-08-13 06:07:28 -0400 (Fri, 13 Aug 2010)
New Revision: 24137
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.preprocessing
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.settings/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/demo/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/demo/User.java
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/resources.properties
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/.faces-config.xml.jsfdia
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/index.html
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/resources/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/resources/demo/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/templates/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml
Modified:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
Log:
https://jira.jboss.org/browse/JBIDE-5219
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2010-08-13 09:30:35 UTC (rev 24136)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2010-08-13 10:07:28 UTC (rev 24137)
@@ -17,4 +17,10 @@
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.2-facelets" />
</version>
+ <version displayName="JSF 2.0" servlet-version="2.5">
+ <lib type="core" location="../lib/jsf-1.2"/>
+ <lib type="common" location="../lib/ApacheCommon2.3" />
+ <refLib type="servlet" location="../servlet" />
+ <projectTempl location="./jsf-2.0" />
+ </version>
</versions>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.preprocessing
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.preprocessing (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.preprocessing 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1 @@
+WebContent/WEB-INF/web.xml
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<file-systems application-name="" model-entity="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <file-system model-entity="FileSystemFolder" location="%workspace.home%" NAME="WEB-INF"/>
+ <file-system model-entity="FileSystemFolder" INFO="Content-Type=Web"
+ location="%workspace.home%/.." NAME="WEB-ROOT"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../JavaSource" NAME="src"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/lib" NAME="lib"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/classes" NAME="classes"/>
+ <file-system model-entity="FileSystemFolder"
+ location="%workspace.home%/../../ant" NAME="build"/>
+ <WEB model-entity="JstWeb" MODEL_PATH="/web.xml">
+ <MODULE model-entity="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</file-systems>
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/.settings/org.jboss.tools.jst.web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/demo/User.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/demo/User.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/demo/User.java 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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 demo;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+/**
+ * Created by JBoss Tools
+ */
+@ManagedBean(name="user")
+@SessionScoped
+public class User {
+ private String name;
+
+ public User() {
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String sayHello() {
+ return "greeting";
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/demo/User.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/resources.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/resources.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/resources.properties 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,2 @@
+prompt=Your Name\:
+greeting=Hello
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/JavaSource/resources.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/.faces-config.xml.jsfdia (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/.faces-config.xml.jsfdia 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess">
+ <PROCESS-ITEM NAME="rules:#pages#greeting.xhtml"
+ PATH="/pages/greeting.xhtml" SHAPE="240,33,0,0" model-entity="JSFProcessGroup"/>
+ <PROCESS-ITEM NAME="rules:#pages#inputname.xhtml"
+ PATH="/pages/inputname.xhtml" SHAPE="32,17,0,0" model-entity="JSFProcessGroup">
+ <PROCESS-ITEM ID="rules:#pages#inputname.xhtml:0" NAME="item"
+ PATH="/pages/inputname.xhtml" model-entity="JSFProcessItem">
+ <PROCESS-ITEM-OUTPUT ID="greeting::#pages#greeting.xhtml"
+ NAME="output" PATH="/pages/greeting.xhtml"
+ TARGET="rules:#pages#greeting.xhtml" TITLE="greeting" model-entity="JSFProcessItemOutput"/>
+ </PROCESS-ITEM>
+ </PROCESS-ITEM>
+</PROCESS>
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<faces-config
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+
+ <navigation-rule>
+ <from-view-id>/pages/inputname.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>greeting</from-outcome>
+ <to-view-id>/pages/greeting.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <application>
+ <resource-bundle>
+ <base-name>resources</base-name>
+ <var>msgs</var>
+ </resource-bundle>
+ </application>
+</faces-config>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+ <display-name>jsf2</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/index.html
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/index.html (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/index.html 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1 @@
+<html><head><meta http-equiv="Refresh" content="0; URL=pages/inputname.jsf"/></head></html>
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/index.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="/templates/common.xhtml">
+ <ui:define name="pageTitle">Greeting to User</ui:define>
+ <ui:define name="pageHeader">Greeting Page</ui:define>
+ <ui:define name="body">
+ #{msgs.greeting} #{user.name}!
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/greeting.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ez="http://java.sun.com/jsf/composite/demo">
+
+ <ui:composition template="/templates/common.xhtml">
+
+ <ui:define name="pageTitle">Input User Name</ui:define>
+
+ <ui:define name="pageHeader">JSF 2 Hello Application</ui:define>
+
+ <ui:define name="body">
+ <h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" for="inputname" />
+ <ez:input id="inputname" label="${msgs.prompt}" value="#{user.name}" action="#{user.sayHello}" submitlabel="Say Hello"/>
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/pages/inputname.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:composite="http://java.sun.com/jsf/composite">
+
+ <composite:interface>
+ <composite:attribute name="label"/>
+ <composite:attribute name="value" required="true"/>
+ <composite:attribute name="action" required="true" method-signature="java.lang.String f()"/>
+ <composite:attribute name="submitlabel"/>
+ </composite:interface>
+
+ <composite:implementation>
+ <h:form>
+ <h:outputText value="#{cc.attrs.label}" />
+ <h:inputText value="#{cc.attrs.value}" />
+ <h:commandButton action="#{cc.attrs.action}" value="#{cc.attrs.submitlabel}" />
+ </h:form>
+ </composite:implementation>
+</html>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/resources/demo/input.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml 2010-08-13 10:07:28 UTC (rev 24137)
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <head>
+ <title><ui:insert name="pageTitle">Page Title</ui:insert></title>
+ <style type="text/css">
+ body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ }
+ .header {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 18px;
+ }
+ .bottom {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ text-align: center;
+ vertical-align: middle;
+ color: #8E969D;
+ }
+ </style>
+ </head>
+
+<body bgcolor="#ffffff">
+<table style="border:1px solid #CAD6E0" align="center" cellpadding="0" cellspacing="0" border="0" width="400">
+<tbody>
+
+ <tr>
+ <td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
+ <ui:insert name="pageHeader">Page Header</ui:insert>
+ </td>
+ </tr>
+ <tr>
+ <td height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+
+ <tr>
+ <td width="100%" colspan="2">
+ <table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
+ <tbody>
+ <tr>
+ <td align="center" width="100%" valign="middle">
+
+ <ui:insert name="body">Page Body</ui:insert>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+</tbody>
+</table>
+</body>
+
+</html>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-2.0/JSFKickStartWithoutLibs/WebContent/templates/common.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months