JBoss Tools SVN: r23917 - trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-08-04 09:08:15 -0400 (Wed, 04 Aug 2010)
New Revision: 23917
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
Log:
Added method clickContextMenu(final Menu topMenu, final String... texts)
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2010-08-04 13:00:18 UTC (rev 23916)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2010-08-04 13:08:15 UTC (rev 23917)
@@ -176,57 +176,93 @@
}
}
-
/**
* Clicks the context menu matching the text.
- *
+ * @param topMenu first menu in submenu path to requested menu item
* @param text
* the text on the context menu.
* @throws WidgetNotFoundException
* if the widget is not found.
*/
- public static void clickContextMenu(final AbstractSWTBot<?> bot,
- final String... texts) {
-
- // show
- final MenuItem menuItem = UIThreadRunnable
- .syncExec(new WidgetResult<MenuItem>() {
- @SuppressWarnings("unchecked")
- public MenuItem run() {
- MenuItem menuItem = null;
- Control control = (Control) bot.widget;
- Menu menu = control.getMenu();
- for (String text : texts) {
- Matcher<?> matcher = allOf(instanceOf(MenuItem.class),
- withMnemonic(text));
- menuItem = show(menu, matcher,false,null);
- if (menuItem != null) {
- menu = menuItem.getMenu();
- } else {
- hide(menu);
- break;
- }
- }
-
- return menuItem;
+ public static void clickContextMenu(final Menu topMenu, final String... texts) {
+ final MenuItem menuItem = UIThreadRunnable.syncExec(new WidgetResult<MenuItem>() {
+ @SuppressWarnings("unchecked")
+ public MenuItem run() {
+ MenuItem menuItem = null;
+ Menu menu = topMenu;
+ for (String text : texts) {
+ Matcher<?> matcher = allOf(instanceOf(MenuItem.class),withMnemonic(text));
+ menuItem = show(menu, matcher, false, null);
+ if (menuItem != null) {
+ menu = menuItem.getMenu();
+ } else {
+ hide(menu);
+ break;
}
- });
+ }
+ return menuItem;
+ }
+ });
if (menuItem == null) {
throw new WidgetNotFoundException("Could not find menu: "
+ Arrays.asList(texts));
}
-
// click
click(menuItem);
-
// hide
UIThreadRunnable.syncExec(new VoidResult() {
public void run() {
hide(menuItem.getParent());
}
});
+
}
+
+ /**
+ * Clicks the context menu matching the text.
+ * @param control Control containing Menu
+ * @param text
+ * the text on the context menu.
+ * @throws WidgetNotFoundException
+ * if the widget is not found.
+ */
+ public static void clickContextMenu(final Control control,
+ final String... texts) {
+
+ final Menu topMenu = UIThreadRunnable.syncExec(new WidgetResult<Menu>() {
+ public Menu run() {
+ return control.getMenu();
+ }
+ });
+ if (topMenu == null) {
+ throw new WidgetNotFoundException("Could not find menu: "
+ + Arrays.asList(texts));
+ }
+ clickContextMenu(topMenu, texts);
+ }
+ /**
+ * Clicks the context menu matching the text.
+ * @param bot bot containing Menu
+ * @param text
+ * the text on the context menu.
+ * @throws WidgetNotFoundException
+ * if the widget is not found.
+ */
+ public static void clickContextMenu(final AbstractSWTBot<?> bot,
+ final String... texts) {
+
+ final Control parentControl = UIThreadRunnable
+ .syncExec(new WidgetResult<Control>() {
+ public Control run() {
+ return (Control) bot.widget;
+ }
+ });
+
+ clickContextMenu(parentControl, texts);
+
+ }
+
private static void click(final MenuItem menuItem) {
final Event event = new Event();
event.time = (int) System.currentTimeMillis();
14 years, 4 months
JBoss Tools SVN: r23916 - trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-08-04 09:00:18 -0400 (Wed, 04 Aug 2010)
New Revision: 23916
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ObjectMultiPageEditorBot.java
Log:
Added method getEditorReference()
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ObjectMultiPageEditorBot.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ObjectMultiPageEditorBot.java 2010-08-04 12:20:03 UTC (rev 23915)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ObjectMultiPageEditorBot.java 2010-08-04 13:00:18 UTC (rev 23916)
@@ -24,14 +24,17 @@
private final IEditorReference ref;
- public ObjectMultiPageEditorBot(String title) {
- ref = getEditorReference(title);
+ public ObjectMultiPageEditorBot(String title) {
+ ref = getEditorReferenceByTitle(title);
}
public ObjectMultiPageEditorBot(SWTBotEditor editor) {
ref = editor.getReference();
}
-
- private IEditorReference getEditorReference(final String title) {
+
+ public IEditorReference getEditorReference() {
+ return ref;
+ }
+ private IEditorReference getEditorReferenceByTitle(final String title) {
// Search for editor
IEditorReference ref = UIThreadRunnable.syncExec(new Result<IEditorReference>() {
public IEditorReference run() {
14 years, 4 months
JBoss Tools SVN: r23915 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-08-04 08:20:03 -0400 (Wed, 04 Aug 2010)
New Revision: 23915
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6639
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-08-04 11:18:19 UTC (rev 23914)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-08-04 12:20:03 UTC (rev 23915)
@@ -55,10 +55,7 @@
{CDIPreferences.STEREOTYPE_IS_ANNOTATED_TYPED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_stereotypeIsAnnotatedTyped_label},
{CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label},
{CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label},
- {CDIPreferences.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingTargetAnnotationInQualifierType_label},
- {CDIPreferences.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingRetentionAnnotationInQualifierType_label},
- {CDIPreferences.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingTargetAnnotationInStereotypeType_label},
- {CDIPreferences.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingRetentionAnnotationInStereotypeType_label},
+ {CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label},
},
CDICorePlugin.PLUGIN_ID
);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2010-08-04 11:18:19 UTC (rev 23914)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2010-08-04 12:20:03 UTC (rev 23915)
@@ -55,10 +55,7 @@
public static String CDIValidatorConfigurationBlock_pb_stereotypeIsAnnotatedTyped_label;
public static String CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label;
public static String CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label;
- public static String CDIValidatorConfigurationBlock_pb_missingTargetAnnotationInQualifierType_label;
- public static String CDIValidatorConfigurationBlock_pb_missingRetentionAnnotationInQualifierType_label;
- public static String CDIValidatorConfigurationBlock_pb_missingTargetAnnotationInStereotypeType_label;
- public static String CDIValidatorConfigurationBlock_pb_missingRetentionAnnotationInStereotypeType_label;
+ public static String CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label;
// Scope
public static String CDIValidatorConfigurationBlock_section_scope;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2010-08-04 11:18:19 UTC (rev 23914)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2010-08-04 12:20:03 UTC (rev 23915)
@@ -44,10 +44,7 @@
CDIValidatorConfigurationBlock_pb_stereotypeIsAnnotatedTyped_label=Stereotype has @Typed:
CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label=Missing @Nonbinding in qualifier type member:
CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label=Missing @Nonbinding in interceptor binding type member:
-CDIValidatorConfigurationBlock_pb_missingTargetAnnotationInQualifierType_label=Missing or incorrect @Target annotation in qualifier:
-CDIValidatorConfigurationBlock_pb_missingRetentionAnnotationInQualifierType_label=Missing @Retention(RUNTIME) annotation in qualifier:
-CDIValidatorConfigurationBlock_pb_missingTargetAnnotationInStereotypeType_label=Missing or incorrect @Target annotation in stereotype:
-CDIValidatorConfigurationBlock_pb_missingRetentionAnnotationInStereotypeType_label=Missing @Retention(RUNTIME) annotation in stereotype:
+CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label=Missing or incorrect @Target or @Retention in an annotation type:
##Scope
CDIValidatorConfigurationBlock_section_scope=Scope
14 years, 4 months
JBoss Tools SVN: r23914 - in trunk/vpe: tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-08-04 07:18:19 -0400 (Wed, 04 Aug 2010)
New Revision: 23914
Added:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/BeanValidator.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/UserValidator.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp.xml
Removed:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/FieldValidator.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
Log:
add tests for spring:hasBindErrors (https://jira.jboss.org/browse/JBIDE-6711)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-04 11:05:44 UTC (rev 23913)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-08-04 11:18:19 UTC (rev 23914)
@@ -443,7 +443,7 @@
</vpe:tag>
<vpe:tag name="spring:hasBindErrors" case-sensitive="yes">
- <vpe:template children="no" modify="no" />
+ <vpe:template children="yes" modify="no" />
</vpe:tag>
<vpe:tag name="spring:htmlEscape" case-sensitive="yes">
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-08-04 11:05:44 UTC (rev 23913)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-08-04 11:18:19 UTC (rev 23914)
@@ -24,6 +24,7 @@
private String selectedCategory;
private User user;
+ private String verificationNum;
public FormBean() {
for (CategoryType categoryType : CategoryType.values()) {
@@ -109,6 +110,14 @@
this.user = user;
}
+ public String getVerificationNum() {
+ return verificationNum;
+ }
+
+ public void setVerificationNum(String verificationNum) {
+ this.verificationNum = verificationNum;
+ }
+
public String getSelectedCategory() {
return selectedCategory;
}
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/BeanValidator.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/BeanValidator.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/BeanValidator.java 2010-08-04 11:18:19 UTC (rev 23914)
@@ -0,0 +1,14 @@
+package org.jboss.tools.vpe.spring.test.springtest.validator;
+
+import org.springframework.validation.Errors;
+import org.springframework.validation.ValidationUtils;
+
+public class BeanValidator extends UserValidator {
+
+ @Override
+ public void validate(Object target, Errors errors) {
+ super.validate(target, errors);
+ ValidationUtils.rejectIfEmptyOrWhitespace(errors, "verificationNum", "required", "Verification Number is required.");
+ }
+
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/BeanValidator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Deleted: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/FieldValidator.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/FieldValidator.java 2010-08-04 11:05:44 UTC (rev 23913)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/FieldValidator.java 2010-08-04 11:18:19 UTC (rev 23914)
@@ -1,17 +0,0 @@
-package org.jboss.tools.vpe.spring.test.springtest.validator;
-
-import org.springframework.validation.Errors;
-import org.springframework.validation.ValidationUtils;
-import org.springframework.validation.Validator;
-
-public class FieldValidator implements Validator{
-
- public boolean supports(Class<?> clazz) {
- return true;
- }
-
- public void validate(Object target, Errors errors) {
- ValidationUtils.rejectIfEmptyOrWhitespace(errors, "user.firstName", "required", "First Name is required.");
- ValidationUtils.rejectIfEmptyOrWhitespace(errors, "user.lastName", "required", "Last Name is required.");
- }
-}
Copied: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/UserValidator.java (from rev 23905, trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/FieldValidator.java)
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/UserValidator.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/validator/UserValidator.java 2010-08-04 11:18:19 UTC (rev 23914)
@@ -0,0 +1,17 @@
+package org.jboss.tools.vpe.spring.test.springtest.validator;
+
+import org.springframework.validation.Errors;
+import org.springframework.validation.ValidationUtils;
+import org.springframework.validation.Validator;
+
+public class UserValidator implements Validator{
+
+ public boolean supports(Class<?> clazz) {
+ return true;
+ }
+
+ public void validate(Object target, Errors errors) {
+ ValidationUtils.rejectIfEmptyOrWhitespace(errors, "user.firstName", "required", "First Name is required.");
+ ValidationUtils.rejectIfEmptyOrWhitespace(errors, "user.lastName", "required", "Last Name is required.");
+ }
+}
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp 2010-08-04 11:18:19 UTC (rev 23914)
@@ -0,0 +1,71 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<html>
+<head>
+<style>
+.error {
+ -moz-appearance: none;
+ color: red;
+ font: bold;
+}
+</style>
+</head>
+<body>
+<h1>Test of spring:hasBindErrors</h1>
+
+<div id="formBeanErrors">
+ <spring:hasBindErrors name="formBean">
+ <div style="border: 1px solid red; width: 300px;">
+ <h2>Errors for all bean fields</h2>
+ <div class="error">
+ <ul>
+ <c:forEach var="error" items="${errors.allErrors}">
+ <li>${error.defaultMessage}</li>
+ </c:forEach>
+ </ul>
+ </div>
+ </div>
+ </spring:hasBindErrors>
+</div><br/>
+
+<div id="userErrors">
+ <spring:hasBindErrors name="formBean">
+ <div style="border: 1px solid red; width: 300px;">
+ <h2>Errors for all user fields only</h2>
+ <div class="error">
+ <ul>
+ <spring:bind path="formBean.user.*">
+ <c:forEach var="error" items="${status.errorMessages}">
+ <li>${error}</li>
+ </c:forEach>
+ </spring:bind>
+ </ul>
+ </div>
+ </div>
+ </spring:hasBindErrors>
+</div>
+
+<form:form modelAttribute="formBean">
+
+ <table>
+ <tr>
+ <td>First Name:</td>
+ <td><form:input path="user.firstName" /></td>
+ </tr>
+ <tr>
+ <td>Last Name:</td>
+ <td><form:input path="user.lastName" /></td>
+ </tr>
+ <tr>
+ <td>Verification Number:</td>
+ <td><form:input path="verificationNum" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right"><input type="submit" value="Test" /></td>
+ </tr>
+ </table>
+
+</form:form>
+</body>
+</html>
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp.xml 2010-08-04 11:18:19 UTC (rev 23914)
@@ -0,0 +1,69 @@
+<tests>
+ <test id="formBeanErrors">
+ <DIV ID="formBeanErrors">
+ <DIV STYLE="border: 1px solid red; width: 300px;">
+ <H2>
+ <SPAN CLASS="vpe-text">
+ Errors for all bean fields
+ </SPAN>
+ </H2>
+ <DIV CLASS="error">
+ <UL>
+ <SPAN CLASS="vpe-text">
+ <LI>
+ <SPAN CLASS="vpe-text">
+ ${error.defaultMessage}
+ </SPAN>
+ </LI>
+ <LI>
+ <SPAN CLASS="vpe-text">
+ ${error.defaultMessage}
+ </SPAN>
+ </LI>
+ <LI>
+ <SPAN CLASS="vpe-text">
+ ${error.defaultMessage}
+ </SPAN>
+ </LI>
+ </SPAN>
+ </UL>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+ <test id="userErrors">
+ <DIV ID="userErrors">
+ <DIV STYLE="border: 1px solid red; width: 300px;">
+ <H2>
+ <SPAN CLASS="vpe-text">
+ Errors for all user fields only
+ </SPAN>
+ </H2>
+ <DIV CLASS="error">
+ <UL>
+ <SPAN CLASS="vpe-text">
+ formBean.user.*<=
+ <SPAN CLASS="vpe-text">
+ <LI>
+ <SPAN CLASS="vpe-text">
+ ${error}
+ </SPAN>
+ </LI>
+ <LI>
+ <SPAN CLASS="vpe-text">
+ ${error}
+ </SPAN>
+ </LI>
+ <LI>
+ <SPAN CLASS="vpe-text">
+ ${error}
+ </SPAN>
+ </LI>
+ </SPAN>
+ </SPAN>
+ </UL>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-04 11:05:44 UTC (rev 23913)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-08-04 11:18:19 UTC (rev 23914)
@@ -15,14 +15,18 @@
<bean name="/option.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/options.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/errors.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
- <property name="validator" ref="fieldValidator"/>
+ <property name="validator" ref="userValidator"/>
</bean>
<bean name="/bind.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
- <property name="validator" ref="fieldValidator"/>
+ <property name="validator" ref="userValidator"/>
</bean>
+ <bean name="/hasBindErrors.htm" class="org.jboss.tools.vpe.spring.test.springtest.controller.ErrorsController">
+ <property name="validator" ref="beanValidator"/>
+ </bean>
<bean name="/select.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
<bean name="/escapeBody.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
- <bean id="fieldValidator" class="org.jboss.tools.vpe.spring.test.springtest.validator.FieldValidator"/>
+ <bean id="userValidator" class="org.jboss.tools.vpe.spring.test.springtest.validator.UserValidator"/>
+ <bean id="beanValidator" class="org.jboss.tools.vpe.spring.test.springtest.validator.BeanValidator"/>
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"></property>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-04 11:05:44 UTC (rev 23913)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-08-04 11:18:19 UTC (rev 23914)
@@ -16,6 +16,8 @@
<br/>
<a href="bind.htm">bind.htm</a>
<br/>
+<a href="hasBindErrors.htm">hasBindErrors.htm</a>
+<br/>
<a href="select.htm">select.htm</a>
<br/>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-04 11:05:44 UTC (rev 23913)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringComponentContentTest.java 2010-08-04 11:18:19 UTC (rev 23914)
@@ -57,6 +57,10 @@
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/errors.jsp"); //$NON-NLS-1$
}
+ public void testHasBindErrors() throws Throwable {
+ performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/hasBindErrors.jsp"); //$NON-NLS-1$
+ }
+
public void testBind() throws Throwable {
performContentTestByFullPath("src/main/webapp/WEB-INF/jsp/bind.jsp"); //$NON-NLS-1$
}
14 years, 4 months
JBoss Tools SVN: r23913 - in branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model: model and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-08-04 07:05:44 -0400 (Wed, 04 Aug 2010)
New Revision: 23913
Modified:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks-core.ecore
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks-javabean.ecore
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks.genmodel
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/CorePackage.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/ICorePackage.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/IParam.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/Param.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/v1_1/v1.1.ftl
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/v1_1/v1.1.xml
Log:
JBIDE-6776
regenerate EMF model
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath 2010-08-04 11:05:44 UTC (rev 23913)
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks-core.ecore
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks-core.ecore 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks-core.ecore 2010-08-04 11:05:44 UTC (rev 23913)
@@ -1,29 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="core"
- nsURI="http://www.milyn.org/smooks-core/core/1.0.0" nsPrefix="smooks.core">
- <eClassifiers xsi:type="ecore:EClass" name="Param">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Params">
- <eOperations name="getParam" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eOperations>
- <eOperations name="setParam" lowerBound="1" eType="#//Params">
- <eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eParameters name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eOperations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="params" upperBound="-1"
- eType="#//Param"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="GlobalParams" eSuperTypes="#//Params">
- <eOperations name="setFilterType" eType="#//GlobalParams">
- <eParameters name="filterType" eType="#//StreamFilterType"/>
- </eOperations>
- <eOperations name="getFilterType" eType="#//StreamFilterType"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EDataType" name="StreamFilterType" instanceClassName="org.milyn.StreamFilterType"/>
- <eClassifiers xsi:type="ecore:EClass" name="Component" abstract="true" interface="true"/>
-</ecore:EPackage>
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="core"
+ nsURI="http://www.milyn.org/smooks-core/core/1.0.0" nsPrefix="smooks.core">
+ <eClassifiers xsi:type="ecore:EClass" name="Param">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Params">
+ <eOperations name="getParam" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eOperations>
+ <eOperations name="setParam" lowerBound="1" eType="#//Params">
+ <eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="params" upperBound="-1"
+ eType="#//Param"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="GlobalParams" eSuperTypes="#//Params">
+ <eOperations name="setFilterType" eType="#//GlobalParams">
+ <eParameters name="filterType" eType="#//StreamFilterType"/>
+ </eOperations>
+ <eOperations name="getFilterType" eType="#//StreamFilterType"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="StreamFilterType" instanceClassName="org.milyn.StreamFilterType"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Component" abstract="true" interface="true"/>
+</ecore:EPackage>
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks-javabean.ecore
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks-javabean.ecore 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks-javabean.ecore 2010-08-04 11:05:44 UTC (rev 23913)
@@ -1,60 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="javabean"
- nsURI="http://www.milyn.org/smooks-ui/javabean/1.0.0" nsPrefix="javabean">
- <eClassifiers xsi:type="ecore:EClass" name="DecodeParam">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Wiring">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="property" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="setterMethod" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="beanIdRef" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="wireOnElement" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="wireOnElementNS" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Expression">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="property" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="setterMethod" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="execOnElement" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="execOnElementNS" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="initVal" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Value">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="property" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="setterMethod" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="dataNS" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="decoder" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultVal" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="decodeParams" upperBound="-1"
- eType="#//DecodeParam"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Bean" eSuperTypes="smooks-core.ecore#//Component">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="beanId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="beanClass" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="createOnElement" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="createOnElementNS" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="valueBindings" upperBound="-1"
- eType="#//Value"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="wireBindings" upperBound="-1"
- eType="#//Wiring"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="expressionBindings" upperBound="-1"
- eType="#//Expression"/>
- </eClassifiers>
-</ecore:EPackage>
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="javabean"
+ nsURI="http://www.milyn.org/smooks-ui/javabean/1.0.0" nsPrefix="javabean">
+ <eClassifiers xsi:type="ecore:EClass" name="DecodeParam">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Wiring">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="property" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="setterMethod" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="beanIdRef" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="wireOnElement" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="wireOnElementNS" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Expression">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="property" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="setterMethod" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="execOnElement" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="execOnElementNS" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="initVal" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Value">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="property" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="setterMethod" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="dataNS" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="decoder" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultVal" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="decodeParams" upperBound="-1"
+ eType="#//DecodeParam"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Bean" eSuperTypes="smooks-core.ecore#//Component">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="beanId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="beanClass" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="createOnElement" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="createOnElementNS" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="valueBindings" upperBound="-1"
+ eType="#//Value"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="wireBindings" upperBound="-1"
+ eType="#//Wiring"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="expressionBindings" upperBound="-1"
+ eType="#//Expression"/>
+ </eClassifiers>
+</ecore:EPackage>
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks.genmodel
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks.genmodel 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/model/smooks.genmodel 2010-08-04 11:05:44 UTC (rev 23913)
@@ -1,76 +1,77 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.jboss.tools.smooks.model/src-ecore"
- creationSubmenus="true" modelPluginID="org.jboss.tools.smooks.model" templateDirectory="/org.jboss.tools.smooks.model/templates"
- dynamicTemplates="true" redirection="" modelName="Smooks" modelPluginClass=""
- rootImplementsInterface="" featureMapWrapperInternalInterface="" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="5.0" copyrightFields="false" publicConstructors="true" interfaceNamePattern="I{0}"
- classNamePattern="{0}">
- <foreignModel>smooks-core.ecore</foreignModel>
- <foreignModel>smooks-javabean.ecore</foreignModel>
- <genPackages prefix="Core" basePackage="org.jboss.tools.smooks.model" disposableProviderFactory="true"
- adapterFactory="false" classPackageSuffix="" ecorePackage="smooks-core.ecore#/">
- <genDataTypes ecoreDataType="smooks-core.ecore#//StreamFilterType"/>
- <genClasses ecoreClass="smooks-core.ecore#//Param">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-core.ecore#//Param/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-core.ecore#//Param/value"/>
- </genClasses>
- <genClasses ecoreClass="smooks-core.ecore#//Params">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-core.ecore#//Params/params"/>
- <genOperations ecoreOperation="smooks-core.ecore#//Params/getParam">
- <genParameters ecoreParameter="smooks-core.ecore#//Params/getParam/name"/>
- </genOperations>
- <genOperations ecoreOperation="smooks-core.ecore#//Params/setParam">
- <genParameters ecoreParameter="smooks-core.ecore#//Params/setParam/name"/>
- <genParameters ecoreParameter="smooks-core.ecore#//Params/setParam/value"/>
- </genOperations>
- </genClasses>
- <genClasses ecoreClass="smooks-core.ecore#//GlobalParams">
- <genOperations ecoreOperation="smooks-core.ecore#//GlobalParams/setFilterType">
- <genParameters ecoreParameter="smooks-core.ecore#//GlobalParams/setFilterType/filterType"/>
- </genOperations>
- <genOperations ecoreOperation="smooks-core.ecore#//GlobalParams/getFilterType"/>
- </genClasses>
- <genClasses image="false" ecoreClass="smooks-core.ecore#//Component"/>
- </genPackages>
- <genPackages prefix="JavaBean" basePackage="org.jboss.tools.smooks.model" disposableProviderFactory="true"
- adapterFactory="false" classPackageSuffix="" contentTypeIdentifier="" ecorePackage="smooks-javabean.ecore#/">
- <genClasses ecoreClass="smooks-javabean.ecore#//DecodeParam">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//DecodeParam/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//DecodeParam/value"/>
- </genClasses>
- <genClasses ecoreClass="smooks-javabean.ecore#//Wiring">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/property"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/setterMethod"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/beanIdRef"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/wireOnElement"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/wireOnElementNS"/>
- </genClasses>
- <genClasses ecoreClass="smooks-javabean.ecore#//Expression">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/property"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/setterMethod"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/execOnElement"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/execOnElementNS"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/initVal"/>
- </genClasses>
- <genClasses ecoreClass="smooks-javabean.ecore#//Value">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/property"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/setterMethod"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/data"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/dataNS"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/decoder"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/defaultVal"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-javabean.ecore#//Value/decodeParams"/>
- </genClasses>
- <genClasses ecoreClass="smooks-javabean.ecore#//Bean">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Bean/beanId"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Bean/beanClass"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Bean/createOnElement"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Bean/createOnElementNS"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-javabean.ecore#//Bean/valueBindings"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-javabean.ecore#//Bean/wireBindings"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-javabean.ecore#//Bean/expressionBindings"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.jboss.tools.smooks.ecore.model/src"
+ creationSubmenus="true" modelPluginID="org.jboss.tools.smooks.model" templateDirectory="/org.jboss.tools.smooks.model/templates"
+ dynamicTemplates="true" redirection="" modelName="Smooks" modelPluginClass=""
+ rootImplementsInterface="" featureMapWrapperInternalInterface="" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" publicConstructors="true" interfaceNamePattern="I{0}"
+ classNamePattern="{0}">
+ <foreignModel>smooks-core.ecore</foreignModel>
+ <foreignModel>smooks-javabean.ecore</foreignModel>
+ <genPackages prefix="Core" basePackage="org.jboss.tools.smooks.model" disposableProviderFactory="true"
+ adapterFactory="false" classPackageSuffix="" ecorePackage="smooks-core.ecore#/">
+ <genDataTypes ecoreDataType="smooks-core.ecore#//StreamFilterType"/>
+ <genClasses ecoreClass="smooks-core.ecore#//Param">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-core.ecore#//Param/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-core.ecore#//Param/value"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-core.ecore#//Param/type"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-core.ecore#//Params">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-core.ecore#//Params/params"/>
+ <genOperations ecoreOperation="smooks-core.ecore#//Params/getParam">
+ <genParameters ecoreParameter="smooks-core.ecore#//Params/getParam/name"/>
+ </genOperations>
+ <genOperations ecoreOperation="smooks-core.ecore#//Params/setParam">
+ <genParameters ecoreParameter="smooks-core.ecore#//Params/setParam/name"/>
+ <genParameters ecoreParameter="smooks-core.ecore#//Params/setParam/value"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="smooks-core.ecore#//GlobalParams">
+ <genOperations ecoreOperation="smooks-core.ecore#//GlobalParams/setFilterType">
+ <genParameters ecoreParameter="smooks-core.ecore#//GlobalParams/setFilterType/filterType"/>
+ </genOperations>
+ <genOperations ecoreOperation="smooks-core.ecore#//GlobalParams/getFilterType"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="smooks-core.ecore#//Component"/>
+ </genPackages>
+ <genPackages prefix="JavaBean" basePackage="org.jboss.tools.smooks.model" disposableProviderFactory="true"
+ adapterFactory="false" classPackageSuffix="" contentTypeIdentifier="" ecorePackage="smooks-javabean.ecore#/">
+ <genClasses ecoreClass="smooks-javabean.ecore#//DecodeParam">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//DecodeParam/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//DecodeParam/value"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-javabean.ecore#//Wiring">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/property"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/setterMethod"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/beanIdRef"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/wireOnElement"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Wiring/wireOnElementNS"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-javabean.ecore#//Expression">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/property"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/setterMethod"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/execOnElement"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/execOnElementNS"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Expression/initVal"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-javabean.ecore#//Value">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/property"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/setterMethod"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/data"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/dataNS"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/decoder"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Value/defaultVal"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-javabean.ecore#//Value/decodeParams"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-javabean.ecore#//Bean">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Bean/beanId"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Bean/beanClass"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Bean/createOnElement"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-javabean.ecore#//Bean/createOnElementNS"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-javabean.ecore#//Bean/valueBindings"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-javabean.ecore#//Bean/wireBindings"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference smooks-javabean.ecore#//Bean/expressionBindings"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/CorePackage.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/CorePackage.java 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/CorePackage.java 2010-08-04 11:05:44 UTC (rev 23913)
@@ -160,6 +160,15 @@
* <!-- end-user-doc -->
* @generated
*/
+ public EAttribute getParam_Type() {
+ return (EAttribute)paramEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getParams() {
return paramsEClass;
}
@@ -231,6 +240,7 @@
paramEClass = createEClass(PARAM);
createEAttribute(paramEClass, PARAM__NAME);
createEAttribute(paramEClass, PARAM__VALUE);
+ createEAttribute(paramEClass, PARAM__TYPE);
paramsEClass = createEClass(PARAMS);
createEReference(paramsEClass, PARAMS__PARAMS);
@@ -277,6 +287,7 @@
initEClass(paramEClass, IParam.class, "Param", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getParam_Name(), ecorePackage.getEString(), "name", null, 0, 1, IParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getParam_Value(), ecorePackage.getEString(), "value", null, 0, 1, IParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getParam_Type(), ecorePackage.getEString(), "type", null, 0, 1, IParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(paramsEClass, IParams.class, "Params", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getParams_Params(), this.getParam(), null, "params", null, 0, -1, IParams.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/ICorePackage.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/ICorePackage.java 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/ICorePackage.java 2010-08-04 11:05:44 UTC (rev 23913)
@@ -89,13 +89,22 @@
int PARAM__VALUE = 1;
/**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM__TYPE = 2;
+
+ /**
* The number of structural features of the '<em>Param</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int PARAM_FEATURE_COUNT = 2;
+ int PARAM_FEATURE_COUNT = 3;
/**
* The meta object id for the '{@link org.jboss.tools.smooks.model.core.Params <em>Params</em>}' class.
@@ -216,6 +225,17 @@
EAttribute getParam_Value();
/**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.core.IParam#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.jboss.tools.smooks.model.core.IParam#getType()
+ * @see #getParam()
+ * @generated
+ */
+ EAttribute getParam_Type();
+
+ /**
* Returns the meta object for class '{@link org.jboss.tools.smooks.model.core.IParams <em>Params</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -316,6 +336,14 @@
EAttribute PARAM__VALUE = eINSTANCE.getParam_Value();
/**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARAM__TYPE = eINSTANCE.getParam_Type();
+
+ /**
* The meta object literal for the '{@link org.jboss.tools.smooks.model.core.Params <em>Params</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/IParam.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/IParam.java 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/IParam.java 2010-08-04 11:05:44 UTC (rev 23913)
@@ -18,6 +18,7 @@
* <ul>
* <li>{@link org.jboss.tools.smooks.model.core.IParam#getName <em>Name</em>}</li>
* <li>{@link org.jboss.tools.smooks.model.core.IParam#getValue <em>Value</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.core.IParam#getType <em>Type</em>}</li>
* </ul>
* </p>
*
@@ -78,4 +79,30 @@
*/
void setValue(String value);
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.jboss.tools.smooks.model.core.ICorePackage#getParam_Type()
+ * @model
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.model.core.IParam#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
} // IParam
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/Param.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/Param.java 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/Param.java 2010-08-04 11:05:44 UTC (rev 23913)
@@ -22,6 +22,7 @@
* <ul>
* <li>{@link org.jboss.tools.smooks.model.core.Param#getName <em>Name</em>}</li>
* <li>{@link org.jboss.tools.smooks.model.core.Param#getValue <em>Value</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.model.core.Param#getType <em>Type</em>}</li>
* </ul>
* </p>
*
@@ -69,10 +70,30 @@
protected String value = VALUE_EDEFAULT;
/**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @see #getType()
* @generated
+ * @ordered
*/
+ protected static final String TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public Param() {
super();
}
@@ -134,6 +155,27 @@
* <!-- end-user-doc -->
* @generated
*/
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ICorePackage.PARAM__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
@@ -141,6 +183,8 @@
return getName();
case ICorePackage.PARAM__VALUE:
return getValue();
+ case ICorePackage.PARAM__TYPE:
+ return getType();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -159,6 +203,9 @@
case ICorePackage.PARAM__VALUE:
setValue((String)newValue);
return;
+ case ICorePackage.PARAM__TYPE:
+ setType((String)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -177,6 +224,9 @@
case ICorePackage.PARAM__VALUE:
setValue(VALUE_EDEFAULT);
return;
+ case ICorePackage.PARAM__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -193,6 +243,8 @@
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case ICorePackage.PARAM__VALUE:
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ case ICorePackage.PARAM__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
}
return super.eIsSet(featureID);
}
@@ -211,6 +263,8 @@
result.append(name);
result.append(", value: ");
result.append(value);
+ result.append(", type: ");
+ result.append(type);
result.append(')');
return result.toString();
}
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/v1_1/v1.1.ftl
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/v1_1/v1.1.ftl 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/v1_1/v1.1.ftl 2010-08-04 11:05:44 UTC (rev 23913)
@@ -6,7 +6,7 @@
<params>
<#list bean.params.params as param>
<@writePreText bean=param />
- <param name="${param.name}">${param.value}</param>
+ <param <@writeAttribs bean=param attribs="name,type"/>>${param.value}</param>
</#list>
</params>
</#if>
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/v1_1/v1.1.xml
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/v1_1/v1.1.xml 2010-08-04 11:04:57 UTC (rev 23912)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/src/org/jboss/tools/smooks/model/core/v1_1/v1.1.xml 2010-08-04 11:05:44 UTC (rev 23913)
@@ -25,6 +25,7 @@
</jb:bean>
<jb:bean beanId="param" class="org.jboss.tools.smooks.model.core.Param" createOnElement="/smooks-resource-list/params/param">
<jb:value property="name" data="/smooks-resource-list/params/param/@name" />
+ <jb:value property="type" data="/smooks-resource-list/params/param/@type" />
<jb:value property="value" data="/smooks-resource-list/params/param" />
</jb:bean>
14 years, 4 months
JBoss Tools SVN: r23912 - in branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core: v1_1 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-08-04 07:04:57 -0400 (Wed, 04 Aug 2010)
New Revision: 23912
Modified:
branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/ParamsTest.java
branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/v1_1/config-01.xml
branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/v1_1/config-02.xml
Log:
JBIDE-6776
Update the params unit test codes for testing the "type" attribute
Modified: branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/ParamsTest.java
===================================================================
--- branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/ParamsTest.java 2010-08-04 10:36:00 UTC (rev 23911)
+++ branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/ParamsTest.java 2010-08-04 11:04:57 UTC (rev 23912)
@@ -19,6 +19,7 @@
*/
package org.jboss.tools.smooks.model.core;
+import org.eclipse.emf.common.util.EList;
import org.jboss.tools.smooks.model.SmooksModel;
import org.jboss.tools.smooks.model.SmooksModelTestCase;
import org.milyn.StreamFilterType;
@@ -26,6 +27,7 @@
import org.xml.sax.SAXException;
import java.io.IOException;
+import java.util.Iterator;
/**
* @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly(a)gmail.com</a>
@@ -52,7 +54,15 @@
GlobalParams params = model.getModelRoot().getParams();
assertTrue(params.getFilterType() == StreamFilterType.SAX);
-
+ EList<IParam> paramList = params.getParams();
+ for (Iterator<?> iterator = paramList.iterator(); iterator.hasNext();) {
+ IParam iParam = (IParam) iterator.next();
+ if(iParam.getName().equals("b")){
+ assertTrue(iParam.getType().equals("actived"));
+ }else{
+ assertTrue(iParam.getType()==null);
+ }
+ }
params.setFilterType(StreamFilterType.DOM);
assertModelEquals(model, "v1_1/config-02.xml");
}
Modified: branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/v1_1/config-01.xml
===================================================================
--- branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/v1_1/config-01.xml 2010-08-04 10:36:00 UTC (rev 23911)
+++ branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/v1_1/config-01.xml 2010-08-04 11:04:57 UTC (rev 23912)
@@ -3,7 +3,7 @@
<params>
<param name="a">aVal</param>
- <param name="b">bVal</param>
+ <param type = "actived" name="b">bVal</param>
<param name="stream.filter.type">SAX</param>
</params>
Modified: branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/v1_1/config-02.xml
===================================================================
--- branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/v1_1/config-02.xml 2010-08-04 10:36:00 UTC (rev 23911)
+++ branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/src/org/jboss/tools/smooks/model/core/v1_1/config-02.xml 2010-08-04 11:04:57 UTC (rev 23912)
@@ -3,7 +3,7 @@
<params>
<param name="a">aVal</param>
- <param name="b">bVal</param>
+ <param type="actived" name="b">bVal</param>
<param name="stream.filter.type">DOM</param>
</params>
14 years, 4 months
JBoss Tools SVN: r23911 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: resources/tck/tests/jbt/validation/annotations/scope and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-08-04 06:36:00 -0400 (Wed, 04 Aug 2010)
New Revision: 23911
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingRetention.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingTarget.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_WrongTarget.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6639
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingRetention.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingRetention.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingRetention.java 2010-08-04 10:36:00 UTC (rev 23911)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.validation.annotations.scope.broken;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.NormalScope;
+
+@Target( { TYPE, METHOD, FIELD })
+@Documented
+@NormalScope(passivating = true)
+@interface FooScoped_MissingRetention
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingRetention.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingTarget.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingTarget.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingTarget.java 2010-08-04 10:36:00 UTC (rev 23911)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.validation.annotations.scope.broken;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.NormalScope;
+
+@Retention(RUNTIME)
+@Documented
+@NormalScope(passivating = true)
+@interface FooScoped_WrongTarget
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingTarget.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_WrongTarget.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_WrongTarget.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_WrongTarget.java 2010-08-04 10:36:00 UTC (rev 23911)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.validation.annotations.scope.broken;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.NormalScope;
+
+@Target( { TYPE, FIELD })
+@Retention(RUNTIME)
+@Documented
+@NormalScope(passivating = true)
+@interface FooScoped_MissingTarget
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_WrongTarget.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-08-04 10:31:29 UTC (rev 23910)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-08-04 10:36:00 UTC (rev 23911)
@@ -1442,6 +1442,21 @@
assertMarkerIsCreated(file, CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE, 15);
}
+ public void testScopeWithMissingTarget() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingTarget.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE, 33);
+ }
+
+ public void testScopeWithMissingRetention() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_MissingRetention.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE, 33);
+ }
+
+ public void testScopeWithWrongTarget() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/scope/broken/FooScoped_WrongTarget.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE, 30);
+ }
+
/**
* https://jira.jboss.org/browse/JBIDE-6507
*
14 years, 5 months
JBoss Tools SVN: r23910 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: core/preferences and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-08-04 06:31:29 -0400 (Wed, 04 Aug 2010)
New Revision: 23910
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6639
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2010-08-04 08:19:49 UTC (rev 23909)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2010-08-04 10:31:29 UTC (rev 23910)
@@ -251,6 +251,13 @@
IScope getScope(String qualifiedName);
/**
+ * Returns the scope by resource path.
+ *
+ * @param resource path
+ * @return the scope by resource path
+ */
+ IScope getScope(IPath path);
+ /**
* Returns the set of observers for an event which is injected by given
* injection point.
*
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2010-08-04 08:19:49 UTC (rev 23909)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2010-08-04 10:31:29 UTC (rev 23910)
@@ -74,12 +74,8 @@
// is not annotated @Nonbinding (9.5.2 non-portable)
public static final String MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER = INSTANCE.createSeverityOption("missingNonbindingInInterceptorBindingTypeMember"); //$NON-NLS-1$
- public static final String MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE = INSTANCE.createSeverityOption("missingTargetAnnotationInQualifierType"); //$NON-NLS-1$
- public static final String MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE = INSTANCE.createSeverityOption("missingRetentionAnnotationInQualifierType"); //$NON-NLS-1$
+ public static final String MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE = INSTANCE.createSeverityOption("missingOrIncorrectTargetOrRetentionInAnnotationType"); //$NON-NLS-1$
- public static final String MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE = INSTANCE.createSeverityOption("missingTargetAnnotationInStereotypeType"); //$NON-NLS-1$
- public static final String MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE = INSTANCE.createSeverityOption("missingRetentionAnnotationInStereotypeType"); //$NON-NLS-1$
-
//Scope group
// - bean class or producer method or field specifies multiple scope type annotations (2.4.3)
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-08-04 08:19:49 UTC (rev 23909)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-08-04 10:31:29 UTC (rev 23910)
@@ -51,6 +51,7 @@
import org.jboss.tools.cdi.core.IProducerMethod;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
+import org.jboss.tools.cdi.core.IScope;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.BeansXMLDefinition;
@@ -74,6 +75,7 @@
private Map<String, QualifierElement> qualifiers = new HashMap<String, QualifierElement>();
private Map<IPath, QualifierElement> qualifiersByPath = new HashMap<IPath, QualifierElement>();
private Map<String, ScopeElement> scopes = new HashMap<String, ScopeElement>();
+ private Map<IPath, ScopeElement> scopesByPath = new HashMap<IPath, ScopeElement>();
private Set<IBean> allBeans = new HashSet<IBean>();
private Map<IPath, Set<IBean>> beansByPath = new HashMap<IPath, Set<IBean>>();
@@ -914,6 +916,10 @@
return scopes.get(qualifiedName);
}
+ public IScope getScope(IPath path) {
+ return scopesByPath.get(path);
+ }
+
public void update() {
rebuildXML();
rebuildAnnotationTypes();
@@ -928,6 +934,7 @@
qualifiersByPath.clear();
interceptorBindingsByPath.clear();
scopes.clear();
+ scopesByPath.clear();
List<AnnotationDefinition> ds = n.getDefinitions().getAllAnnotations();
for (AnnotationDefinition d: ds) {
if(d.getKind() == AnnotationDefinition.STEREOTYPE) {
@@ -948,7 +955,6 @@
QualifierElement s = new QualifierElement();
initAnnotationElement(s, d);
qualifiers.put(d.getQualifiedName(), s);
- System.out.println(d.getQualifiedName());
if(d.getResource() != null && d.getResource().getFullPath() != null) {
qualifiersByPath.put(d.getResource().getFullPath(), s);
}
@@ -956,6 +962,9 @@
ScopeElement s = new ScopeElement();
initAnnotationElement(s, d);
scopes.put(d.getQualifiedName(), s);
+ if(d.getResource() != null && d.getResource().getFullPath() != null) {
+ scopesByPath.put(d.getResource().getFullPath(), s);
+ }
}
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-08-04 08:19:49 UTC (rev 23909)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-08-04 10:31:29 UTC (rev 23910)
@@ -279,6 +279,11 @@
for (IInterceptorBinding binding : bindings) {
validateInterceptorBinding(binding);
}
+
+ Set<String> scopes = cdiProject.getScopeNames();
+ for (String scope: scopes) {
+ validateScopeType(cdiProject.getScope(scope));
+ }
return OK_STATUS;
}
@@ -301,6 +306,9 @@
IQualifier qualifier = cdiProject.getQualifier(file.getFullPath());
validateQualifier(qualifier);
+
+ IScope scope = cdiProject.getScope(file.getFullPath());
+ validateScopeType(scope);
IInterceptorBinding binding = cdiProject.getInterceptorBinding(file.getFullPath());
validateInterceptorBinding(binding);
@@ -1809,37 +1817,58 @@
* Stereotype annotation type should be annotated with @Target with correct targets [JSR-299 §2.7.1]
* Stereotype annotation type should be annotated with @Retention(RUNTIME)
*/
- IAnnotationDeclaration target = stereotype.getAnnotationDeclaration(CDIConstants.TARGET_ANNOTATION_TYPE_NAME);
- if(target == null) {
- addError(CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE, CDIPreferences.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE, CDIUtil.convertToSourceReference(stereotype.getSourceType().getNameRange()), resource);
- } else {
- boolean ok = false;
- Set<String> vs = getTargetAnnotationValues(target);
- boolean hasType = vs.contains("TYPE");
- boolean hasMethod = vs.contains("METHOD");
- boolean hasField = vs.contains("FIELD");
- if(vs.size() == 3) {
- ok = hasType && hasMethod && hasField;
- } else if(vs.size() == 2) {
- ok = hasMethod && hasField;
- } else if(vs.size() == 1) {
- ok = hasType || hasMethod || hasField;
- }
- if(!ok) {
- addError(CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE, CDIPreferences.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE, target, resource);
- }
- }
+ String[][] variants = {{TARGET_METHOD, TARGET_FIELD, TARGET_TYPE},
+ {TARGET_METHOD, TARGET_FIELD},
+ {TARGET_TYPE}, {TARGET_METHOD}, {TARGET_FIELD}};
+ validateTargetAnnotation(stereotype, variants, CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE, resource);
/*
* Stereotype annotation type should be annotated with @Retention(RUNTIME)
*/
- validateRetentionAnnotation(stereotype, CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE, CDIPreferences.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE, resource);
+ validateRetentionAnnotation(stereotype, CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE, resource);
}
- void validateRetentionAnnotation(ICDIAnnotation type, String message, String preference, IResource resource) throws JavaModelException {
+ /**
+ * Validates a qualifier.
+ *
+ * @param qualifier
+ */
+ private void validateScopeType(IScope scope) {
+ if(scope == null) {
+ return;
+ }
+ IResource resource = scope.getResource();
+ if (resource == null || !resource.getName().toLowerCase().endsWith(".java")) {
+ // validate sources only
+ return;
+ }
+
+ try {
+ validateScopeAnnotationTypeAnnotations(scope, resource);
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
+
+ private void validateScopeAnnotationTypeAnnotations(IScope scope, IResource resource) throws JavaModelException {
+ /*
+ * Scope annotation type should be annotated with @Target({TYPE, METHOD, FIELD})
+ */
+ String[][] variants = {{TARGET_TYPE, TARGET_METHOD, TARGET_FIELD}};
+ validateTargetAnnotation(scope, variants, CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE, resource);
+
+ /*
+ * Scope annotation type should be annotated with @Retention(RUNTIME)
+ */
+ validateRetentionAnnotation(scope, CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE, resource);
+ }
+
+
+
+ void validateRetentionAnnotation(ICDIAnnotation type, String message, IResource resource) throws JavaModelException {
IAnnotationDeclaration retention = type.getAnnotationDeclaration(CDIConstants.RETENTION_ANNOTATION_TYPE_NAME);
if(retention == null) {
- addError(message, preference, CDIUtil.convertToSourceReference(type.getSourceType().getNameRange()), resource);
+ addError(message, CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE, CDIUtil.convertToSourceReference(type.getSourceType().getNameRange()), resource);
} else {
IMemberValuePair[] ps = retention.getDeclaration().getMemberValuePairs();
boolean ok = false;
@@ -1855,7 +1884,7 @@
}
}
if(!ok) {
- addError(message, preference, retention, resource);
+ addError(message, CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE, retention, resource);
}
}
}
@@ -1914,35 +1943,55 @@
CDICorePlugin.getDefault().logError(e);
}
}
+
+ static String TARGET_METHOD = "METHOD";
+ static String TARGET_FIELD = "FIELD";
+ static String TARGET_PARAMETER = "PARAMETER";
+ static String TARGET_TYPE = "TYPE";
private void validateQualifierAnnotationTypeAnnotations(IQualifier qualifier, IResource resource) throws JavaModelException {
/*
* Qualifier annotation type should be annotated with @Target({METHOD, FIELD, PARAMETER, TYPE}) or @Target({"FIELD", "PARAMETER"})
* Qualifier annotation type should be annotated with @Retention(RUNTIME)
*/
- IAnnotationDeclaration target = qualifier.getAnnotationDeclaration(CDIConstants.TARGET_ANNOTATION_TYPE_NAME);
+ String[][] variants = {{TARGET_METHOD, TARGET_FIELD, TARGET_PARAMETER, TARGET_TYPE},
+ {TARGET_FIELD, TARGET_PARAMETER}};
+ validateTargetAnnotation(qualifier, variants, CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE, resource);
+
+ /*
+ * Qualifier annotation type should be annotated with @Retention(RUNTIME)
+ */
+ validateRetentionAnnotation(qualifier, CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE, resource);
+ }
+
+ private void validateTargetAnnotation(ICDIAnnotation annotationType, String[][] variants, String message, IResource resource) throws JavaModelException {
+ IAnnotationDeclaration target = annotationType.getAnnotationDeclaration(CDIConstants.TARGET_ANNOTATION_TYPE_NAME);
if(target == null) {
- addError(CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE, CDIPreferences.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE, CDIUtil.convertToSourceReference(qualifier.getSourceType().getNameRange()), resource);
+ addError(message, CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE, CDIUtil.convertToSourceReference(annotationType.getSourceType().getNameRange()), resource);
} else {
Set<String> vs = getTargetAnnotationValues(target);
- boolean ok = vs.size() == 4 || vs.size() == 2;
- if(ok) {
- String[] values = (vs.size() == 4)
- ? new String[]{"TYPE", "METHOD", "FIELD", "PARAMETER"}
- : new String[]{"FIELD", "PARAMETER"};
- for (String s: values) {
- if(!vs.contains(s)) ok = false;
+ boolean ok = false;
+ for (int i = 0; i < variants.length; i++) {
+ if(vs.size() == variants[i].length) {
+ boolean ok2 = true;
+ String[] values = variants[i];
+ for (String s: values) {
+ if(!vs.contains(s)) {
+ ok2 = false;
+ break;
+ }
+ }
+ if(ok2) {
+ ok = true;
+ break;
+ }
}
}
if(!ok) {
- addError(CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE, CDIPreferences.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE, target, resource);
+ addError(message, CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE, target, resource);
}
}
- /*
- * Qualifier annotation type should be annotated with @Retention(RUNTIME)
- */
- validateRetentionAnnotation(qualifier, CDIValidationMessages.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE, CDIPreferences.MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE, resource);
}
private void validateInterceptorBinding(IInterceptorBinding binding) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-08-04 08:19:49 UTC (rev 23909)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-08-04 10:31:29 UTC (rev 23910)
@@ -47,6 +47,8 @@
public static String MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE;
public static String MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE;
public static String MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE;
+ public static String MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE;
+ public static String MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE;
public static String MULTIPLE_SCOPE_TYPE_ANNOTATIONS;
public static String MULTIPLE_SCOPE_TYPE_ANNOTATIONS_IN_BEAN_CLASS;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-08-04 08:19:49 UTC (rev 23909)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-08-04 10:31:29 UTC (rev 23910)
@@ -23,10 +23,12 @@
MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER=Array-valued member of a qualifier type must be annotated @Nonbinding [JSR-299 �5.2.5]
MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Annotation-valued member of an interceptor binding type must be annotated @Nonbinding [JSR-299 �9.5.2]
MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Array-valued member of an interceptor binding type must be annotated @Nonbinding [JSR-299 �9.5.2]
-MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE=Qualifier annotation type must be annotated with @Target('{'METHOD, FIELD, PARAMETER, TYPE'}') [JSR-299 �2.3.2]
+MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE=Qualifier annotation type must be annotated with correct targets [JSR-299 �2.3.2, �10.1]
MISSING_RETENTION_ANNOTATION_IN_QUALIFIER_TYPE=Qualifier annotation type must be annotated with @Retention(RUNTIME) [JSR-299 �2.3.2]
MISSING_TARGET_ANNOTATION_IN_STEREOTYPE_TYPE=Stereotype annotation type must be annotated with @Target with correct targets [JSR-299 �2.7.1]
MISSING_RETENTION_ANNOTATION_IN_STEREOTYPE_TYPE=Stereotype annotation type must be annotated with @Retention(RUNTIME) [JSR-299 �2.7.1]
+MISSING_TARGET_ANNOTATION_IN_SCOPE_TYPE=Scope annotation type must be annotated with @Target with correct targets [JSR-299 �2.4.2]
+MISSING_RETENTION_ANNOTATION_IN_SCOPE_TYPE=Scope annotation type must be annotated with @Retention(RUNTIME) [JSR-299 �2.4.2]
MULTIPLE_SCOPE_TYPE_ANNOTATIONS=Bean class or producer method or field specifies multiple scope type annotations [JSR-299 �2.4.3]
MULTIPLE_SCOPE_TYPE_ANNOTATIONS_IN_BEAN_CLASS=Bean class specifies multiple scope type annotations [JSR-299 �2.4.3]
14 years, 5 months
JBoss Tools SVN: r23909 - in workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as: core/server/xpl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-08-04 04:19:49 -0400 (Wed, 04 Aug 2010)
New Revision: 23909
Modified:
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/AbstractServerToolsPublisher.java
Log:
JBIDE-6761 - progress monitors, cancel implemented
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java 2010-08-04 08:02:56 UTC (rev 23908)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java 2010-08-04 08:19:49 UTC (rev 23909)
@@ -37,7 +37,6 @@
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.xpl.ModulePackager;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentModulePrefs;
@@ -45,7 +44,6 @@
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentTypePrefs;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.IWTPConstants;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
public class PublishUtil {
@@ -83,12 +81,19 @@
return count;
}
-
+ /**
+ * All preferences are stored in the "local" setting as it was decided
+ * having to replicate deploy paths for each publish method was not good
+ *
+ * @param moduleTree
+ * @param server
+ * @param defaultFolder
+ * @param moduleProperty
+ * @return
+ */
public static String getDeployRootFolder(IModule[] moduleTree,
IDeployableServer server, String defaultFolder, String moduleProperty) {
- DeployableServerBehavior behavior = ServerConverter.getDeployableServerBehavior(server.getServer());
- String typeId = behavior.createPublishMethod().getPublishMethodType().getId();
- return getDeployRootFolder(moduleTree, typeId,
+ return getDeployRootFolder(moduleTree, LocalPublishMethod.LOCAL_PUBLISH_METHOD,
server, defaultFolder, moduleProperty);
}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-08-04 08:02:56 UTC (rev 23908)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java 2010-08-04 08:19:49 UTC (rev 23909)
@@ -39,6 +39,7 @@
import org.eclipse.wst.server.core.model.IModuleFolder;
import org.eclipse.wst.server.core.model.IModuleResource;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
/**
@@ -428,7 +429,13 @@
this.handler = handler;
}
+ protected IStatus[] canceledStatus() {
+ return new IStatus[]{
+ new Status(IStatus.CANCEL, JBossServerCorePlugin.PLUGIN_ID, "Publish Canceled") //$NON-NLS-1$
+ }; // todo
+ }
+
/**
* Handle a delta publish.
*
@@ -467,7 +474,9 @@
*/
public IStatus[] publishDelta(IModuleResourceDelta delta, IPath path, IProgressMonitor monitor) throws CoreException {
List status = new ArrayList(2);
-
+ if( monitor.isCanceled())
+ return canceledStatus();
+
IModuleResource resource = delta.getModuleResource();
int kind2 = delta.getKind();
@@ -498,6 +507,8 @@
IModuleResourceDelta[] childDeltas = delta.getAffectedChildren();
int size = childDeltas.length;
for (int i = 0; i < size; i++) {
+ if( monitor.isCanceled())
+ return canceledStatus();
IStatus[] stat = publishDelta(childDeltas[i], path, monitor);
addArrayToList(status, stat);
}
@@ -528,6 +539,8 @@
public IStatus[] publishFull(IModuleResource[] resources, IProgressMonitor monitor) throws CoreException {
monitor.beginTask("Publishing " + resources.length + " resources", 100 * (resources.length) + 100); //$NON-NLS-1$ //$NON-NLS-2$
handler.makeDirectoryIfRequired(new Path("/"), ProgressMonitorUtil.submon(monitor, 100)); //$NON-NLS-1$
+ if( monitor.isCanceled())
+ return canceledStatus();
IStatus[] results = publishFull(resources, new Path("/"), ProgressMonitorUtil.submon(monitor, 100*resources.length)); //$NON-NLS-1$
monitor.done();
return results;
@@ -542,6 +555,8 @@
List status = new ArrayList(2);
int size = resources.length;
for (int i = 0; i < size; i++) {
+ if( monitor.isCanceled())
+ return canceledStatus();
IStatus[] stat = copy(resources[i], relative, ProgressMonitorUtil.submon(monitor, 100));
addArrayToList(status, stat);
}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/AbstractServerToolsPublisher.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/AbstractServerToolsPublisher.java 2010-08-04 08:02:56 UTC (rev 23908)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/AbstractServerToolsPublisher.java 2010-08-04 08:19:49 UTC (rev 23909)
@@ -107,7 +107,6 @@
* @return
*/
protected IPath getDeployPath(IModule[] moduleTree, IDeployableServer server) {
- DeploymentPreferenceLoader.getCurrentDeploymentMethodType(server.getServer());
String folder = PublishUtil.getDeployRootFolder(
moduleTree, server,
publishMethod.getPublishDefaultRootFolder(server.getServer()),
@@ -143,6 +142,10 @@
return false;
}
+ protected IStatus canceledStatus() {
+ return new Status(IStatus.CANCEL, JBossServerCorePlugin.PLUGIN_ID, "Publish Canceled"); //$NON-NLS-1$
+ }
+
protected IStatus fullPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
monitor.beginTask("Full Publish", 1000); //$NON-NLS-1$
@@ -150,11 +153,17 @@
IPublishCopyCallbackHandler callback = getCallbackHandler(deployPath);
IModuleResource[] members = PublishUtil.getResources(module, ProgressMonitorUtil.submon(monitor, 200));
+ if( monitor.isCanceled())
+ return canceledStatus();
+
// First delete it
// if the module we're publishing is a project, not a binary, clean it's folder
if( !(new Path(module.getName()).segmentCount() > 1 ))
callback.deleteResource(new Path("/"), ProgressMonitorUtil.submon(monitor, 100)); //$NON-NLS-1$
+ if( monitor.isCanceled())
+ return canceledStatus();
+
ArrayList<IStatus> list = new ArrayList<IStatus>();
boolean isBinaryObject = ServerModelUtilities.isBinaryModule(module);
14 years, 5 months
JBoss Tools SVN: r23908 - workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-08-04 04:02:56 -0400 (Wed, 04 Aug 2010)
New Revision: 23908
Modified:
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java
Log:
JBIDE-6775 - fixing editor startup
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-08-04 07:48:17 UTC (rev 23907)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-08-04 08:02:56 UTC (rev 23908)
@@ -12,10 +12,11 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.events.ISystemModelChangeEvent;
+import org.eclipse.rse.core.events.ISystemModelChangeListener;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.ui.widgets.SystemHostCombo;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -23,14 +24,16 @@
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormLayout;
+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.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
-import org.jboss.ide.eclipse.as.rse.core.RSERemotePublishHandler;
import org.jboss.ide.eclipse.as.rse.core.RSEUtils;
import org.jboss.ide.eclipse.as.ui.UIUtil;
import org.jboss.ide.eclipse.as.ui.editor.IDeploymentTypeUI;
@@ -51,9 +54,10 @@
public static class RSEDeploymentPreferenceComposite extends Composite {
private ServerModeSection modeSection;
- private SystemHostCombo combo;
+ private CustomSystemHostCombo combo;
private Text rseServerHome,rseServerConfig;
private Button rseBrowse;
+ private ModifyListener comboMListener;
public RSEDeploymentPreferenceComposite(Composite parent, int style, ServerModeSection modeSection) {
super(parent, style);
this.modeSection = modeSection;
@@ -62,14 +66,15 @@
child.setLayoutData(UIUtil.createFormData2(0, 0, null, 0, 0, 5, 100, 0));
child.setLayout(new GridLayout());
String current = modeSection.getServer().getAttribute(RSEUtils.RSE_SERVER_HOST, RSEUtils.RSE_SERVER_DEFAULT_HOST);
- combo = new SystemHostCombo(child, SWT.NULL, findHost(current), false,
+ combo = new CustomSystemHostCombo(child, SWT.NULL, current, "files"); //$NON-NLS-1$
/* ISubSystemConfigurationCategories.SUBSYSTEM_CATEGORY_FILES*/
- "files");
- combo.addModifyListener(new ModifyListener() {
+ // "files");
+ comboMListener = new ModifyListener() {
public void modifyText(ModifyEvent e) {
rseHostChanged();
}
- });
+ };
+ combo.getCombo().addModifyListener(comboMListener);
Label serverHomeLabel = new Label(this, SWT.NONE);
serverHomeLabel.setText("Remote Server Home: ");
rseBrowse = new Button(this, SWT.DEFAULT);
@@ -106,6 +111,7 @@
}});
}
+
protected void browseClicked() {
SystemRemoteFileDialog d = new SystemRemoteFileDialog(
rseBrowse.getShell(), "Browse remote system", combo.getHost());
@@ -124,9 +130,13 @@
}
protected void rseHostChanged() {
- modeSection.getCommandManager().execute(new ChangeServerPropertyCommand(
- modeSection.getServer(), RSEUtils.RSE_SERVER_HOST, combo.getHost().getAliasName(),
- "Change RSE Host"));
+ String hostName = combo.getHost() == null ? null : combo.getHost().getAliasName();
+ String oldVal = modeSection.getServer().getAttribute(RSEUtils.RSE_SERVER_HOST, (String)null);
+ if( !hostName.equals(oldVal)) {
+ modeSection.getCommandManager().execute(new ChangeServerPropertyCommand(
+ modeSection.getServer(), RSEUtils.RSE_SERVER_HOST, hostName,
+ "Change RSE Host"));
+ }
}
protected void serverHomeChanged() {
@@ -141,15 +151,113 @@
"Change RSE Server's Configuration"));
}
- public IHost findHost(String name) {
- IHost[] hosts = RSECorePlugin.getTheSystemRegistry().getHosts();
- for( int i = 0; i < hosts.length; i++ ) {
- if( hosts[i].getAliasName().equals(name))
- return hosts[i];
+ public class CustomSystemHostCombo extends Composite implements ModifyListener, ISystemModelChangeListener {
+ private String fileSubSystem;
+ private Combo combo;
+ private IHost currentHost;
+ private String currentHostName;
+ private IHost[] hosts;
+ private String[] hostsAsStrings;
+ public CustomSystemHostCombo(Composite parent, int style, String initialHostName, String fileSubSystem) {
+ super(parent, style);
+ this.fileSubSystem = fileSubSystem;
+ this.currentHostName = initialHostName;
+ this.hosts = RSECorePlugin.getTheSystemRegistry().getHostsBySubSystemConfigurationCategory(fileSubSystem);
+ this.currentHost = findHost(initialHostName);
+ RSECorePlugin.getTheSystemRegistry().addSystemModelChangeListener(this);
+
+ // Where I belong in the parent
+ GridData data = new GridData();
+ // horizontal clues
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ data.widthHint = 200;
+ // vertical clues
+ data.verticalAlignment = GridData.VERTICAL_ALIGN_BEGINNING; //GridData.CENTER;
+ data.grabExcessVerticalSpace = false; // true;
+ this.setLayoutData(data);
+
+ // What's inside me
+ setLayout(new FormLayout());
+ Label l = new Label(this, SWT.NONE);
+ l.setText("Host");
+ combo = new Combo(this, SWT.DEFAULT | SWT.READ_ONLY);
+ l.setLayoutData(UIUtil.createFormData2(0, 5, null, 0, 0, 0, null, 0));
+ combo.setLayoutData(UIUtil.createFormData2(0, 0, null, 0, l, 5, 100, -5));
+ refreshConnections();
+ combo.addModifyListener(this);
}
- return null;
+
+ public IHost findHost(String name) {
+ for( int i = 0; i < hosts.length; i++ ) {
+ if( hosts[i].getAliasName().equals(name))
+ return hosts[i];
+ }
+ return null;
+ }
+
+ public Combo getCombo() {
+ return combo;
+ }
+
+ public IHost getHost() {
+ return currentHost;
+ }
+
+ public String getHostName() {
+ return currentHostName;
+ }
+
+ public void refreshConnections() {
+ hosts = RSECorePlugin.getTheSystemRegistry().getHostsBySubSystemConfigurationCategory(fileSubSystem);
+ hostsAsStrings = new String[hosts.length];
+ int currentHostIndex = -1;
+ for( int i = 0; i < hosts.length; i++ ) {
+ hostsAsStrings[i] = hosts[i].getAliasName();
+ if( currentHostIndex == -1 && currentHostName != null
+ && hostsAsStrings[i].equals(currentHostName)) {
+ currentHostIndex = i;
+ }
+ }
+
+ // refill the combo thingie
+ combo.setItems(hostsAsStrings);
+ if( currentHostIndex != -1 ) // set the current host
+ combo.select(currentHostIndex);
+ else
+ combo.clearSelection();
+ }
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ int index = combo.getSelectionIndex();
+ if( index != -1 ) {
+ String s = combo.getItem(index);
+ for( int i = 0; i < hosts.length; i++ ) {
+ if( hosts[i].getAliasName().equals(s)) {
+ currentHost = hosts[i];
+ currentHostName = currentHost.getAliasName();
+ return;
+ }
+ }
+ }
+ }
+ public void systemModelResourceChanged(ISystemModelChangeEvent event) {
+ if( combo.isDisposed())
+ return;
+ Display.getDefault().asyncExec(new Runnable(){
+ public void run() {
+ combo.removeModifyListener(comboMListener);
+ refreshConnections();
+ combo.addModifyListener(comboMListener);
+ }
+ });
+ }
+ @Override
+ public void dispose () {
+ super.dispose();
+ RSECorePlugin.getTheSystemRegistry().removeSystemModelChangeListener(this);
+ }
}
}
-
-
}
14 years, 5 months