JBoss Tools SVN: r32262 - in trunk/cdi/plugins: org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-06-21 14:40:14 -0400 (Tue, 21 Jun 2011)
New Revision: 32262
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.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/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.ui/src/org/jboss/tools/cdi/seam/config/ui/preferences/CDISeamPreferencesMessages.java
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/CDIConfigurationBlockDescriptionProvider.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://issues.jboss.org/browse/JBIDE-9196
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-06-21 17:32:00 UTC (rev 32261)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-06-21 18:40:14 UTC (rev 32262)
@@ -33,20 +33,16 @@
for (String name : CDIPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.ERROR);
}
- defaultPreferences.put(CDIPreferences.INTERCEPTOR_HAS_NAME, CDIPreferences.WARNING);
- defaultPreferences.put(CDIPreferences.DECORATOR_HAS_NAME, CDIPreferences.WARNING);
- defaultPreferences.put(CDIPreferences.ILLEGAL_SCOPE_FOR_INTERCEPTOR, CDIPreferences.WARNING);
- defaultPreferences.put(CDIPreferences.ILLEGAL_SCOPE_FOR_DECORATOR, CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.INTERCEPTOR_OR_DECORATOR_HAS_NAME, CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.ILLEGAL_SCOPE_FOR_INTERCEPTOR_OR_DECORATOR, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.INTERCEPTOR_OR_DECORATOR_IS_ALTERNATIVE, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.INTERCEPTOR_ANNOTATED_SPECIALIZES, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, CDIPreferences.WARNING);
- defaultPreferences.put(CDIPreferences.UNSATISFIED_INJECTION_POINTS, CDIPreferences.WARNING);
- defaultPreferences.put(CDIPreferences.AMBIGUOUS_INJECTION_POINTS, CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.UNSATISFIED_OR_AMBIGUOUS_INJECTION_POINTS, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.AMBIGUOUS_EL_NAMES, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.UNPROXYABLE_BEAN_TYPE, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.INJECT_RESOLVES_TO_NULLABLE_BEAN, CDIPreferences.WARNING);
- defaultPreferences.put(CDIPreferences.INJECTED_DECORATOR, CDIPreferences.WARNING);
- defaultPreferences.put(CDIPreferences.INJECTED_INTERCEPTOR, CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.INJECTED_DECORATOR_OR_INTERCEPTOR, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.ILLEGAL_CONDITIONAL_OBSERVER, CDIPreferences.WARNING);
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 2011-06-21 17:32:00 UTC (rev 32261)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2011-06-21 18:40:14 UTC (rev 32262)
@@ -37,8 +37,7 @@
// does not specify the value member
public static final String PARAM_INJECTION_DECLARES_EMPTY_NAME = INSTANCE.createSeverityOption("paramInjectionDeclaresEmptyName"); //$NON-NLS-1$
// - interceptor or decorator has a name (2.5.3 non-portable)
- public static final String INTERCEPTOR_HAS_NAME = INSTANCE.createSeverityOption("interceptorHasName"); //$NON-NLS-1$
- public static final String DECORATOR_HAS_NAME = INSTANCE.createSeverityOption("decoratorHasName"); //$NON-NLS-1$
+ public static final String INTERCEPTOR_OR_DECORATOR_HAS_NAME = INSTANCE.createSeverityOption("interceptorHasName"); //$NON-NLS-1$
// 5.3.1. Ambiguous EL names
// - All unresolvable ambiguous EL names are detected by the container when the application is initialized. Suppose two beans are both available for injection in a certain war, and either:
// • the two beans have the same EL name and the name is not resolvable, or
@@ -51,8 +50,7 @@
// 5.2.1. Unsatisfied and ambiguous dependencies
// - If an unsatisfied or unresolvable ambiguous dependency exists, the container automatically detects the problem and
// treats it as a deployment problem.
- public static final String UNSATISFIED_INJECTION_POINTS = INSTANCE.createSeverityOption("unsatisfiedInjectionPoints"); //$NON-NLS-1$
- public static final String AMBIGUOUS_INJECTION_POINTS = INSTANCE.createSeverityOption("ambiguousInjectionPoints"); //$NON-NLS-1$
+ public static final String UNSATISFIED_OR_AMBIGUOUS_INJECTION_POINTS = INSTANCE.createSeverityOption("unsatisfiedInjectionPoints"); //$NON-NLS-1$
// 5.4.1. Unproxyable bean types
// - If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope,
// the container automatically detects the problem and treats it as a deployment problem.
@@ -62,9 +60,8 @@
// in the unrestricted set of bean types of a bean (2.2.2)
public static final String ILLEGAL_TYPE_IN_TYPED_DECLARATION = INSTANCE.createSeverityOption("illegalTypeInTypedDeclaration"); //$NON-NLS-1$
// - producer field/method return type contains a wildcard type parameter (3.3, 3.4)
- public static final String PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD = INSTANCE.createSeverityOption("producerMethodReturnTypeHasWildcard"); //$NON-NLS-1$
// - producer field/method return type is a type variable (3.3, 3.4)
- public static final String PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE = INSTANCE.createSeverityOption("producerMethodReturnTypeIsVariable"); //$NON-NLS-1$
+ public static final String PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD_OR_VARIABLE = INSTANCE.createSeverityOption("producerMethodReturnTypeHasWildcard"); //$NON-NLS-1$
// - an injection point of primitive type resolves to a bean that may have null values, such as a producer method with a non-primitive return type or a producer field with a non-primitive type
public static final String INJECT_RESOLVES_TO_NULLABLE_BEAN = INSTANCE.createSeverityOption("injectResolvesToNullableBean"); //$NON-NLS-1$
// - matching object in the Java EE component environment is not of the same type
@@ -96,24 +93,23 @@
public static final String STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE = INSTANCE.createSeverityOption("stereotypeDeclaresMoreThanOneScope"); //$NON-NLS-1$
// - managed bean with a public field declares any scope other than @Dependent (3.1)
// - managed bean with a parameterized bean class declares any scope other than @Dependent (3.1)
- public static final String ILLEGAL_SCOPE_FOR_MANAGED_BEAN = INSTANCE.createSeverityOption("illegalScopeForManagedBean"); //$NON-NLS-1$
+//
// - session bean specifies an illegal scope (a stateless session bean must belong
// to the @Dependent pseudo-scope; a singleton bean must belong to either the
// @ApplicationScoped scope or to the @Dependent pseudo-scope, a stateful session
// bean may have any scope) (3.2)
// - session bean with a parameterized bean class declares any scope other than @Dependent (3.2)
- public static final String ILLEGAL_SCOPE_FOR_SESSION_BEAN = INSTANCE.createSeverityOption("illegalScopeForSessionBean"); //$NON-NLS-1$
+//
// - producer method with a parameterized return type with a type variable declares
// any scope other than @Dependent (3.3)
// - producer field with a parameterized type with a type variable declares any
// scope other than @Dependent (3.4)
- public static final String ILLEGAL_SCOPE_FOR_PRODUCER_METHOD = INSTANCE.createSeverityOption("illegalScopeForProducerMethod"); //$NON-NLS-1$
+ public static final String ILLEGAL_SCOPE_FOR_BEAN = INSTANCE.createSeverityOption("illegalScopeForManagedBean"); //$NON-NLS-1$
// - bean that declares any scope other than @Dependent has an injection point of type
// InjectionPoint and qualifier @Default (5.5.7)
public static final String ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED = INSTANCE.createSeverityOption("illegalScopeWhenTypeInjectionPointIsInjected"); //$NON-NLS-1$
// - interceptor or decorator has any scope other than @Dependent (2.4.1 non-portable)
- public static final String ILLEGAL_SCOPE_FOR_INTERCEPTOR = INSTANCE.createSeverityOption("illegalScopeForInterceptor"); //$NON-NLS-1$
- public static final String ILLEGAL_SCOPE_FOR_DECORATOR = INSTANCE.createSeverityOption("illegalScopeForDecorator"); //$NON-NLS-1$
+ public static final String ILLEGAL_SCOPE_FOR_INTERCEPTOR_OR_DECORATOR = INSTANCE.createSeverityOption("illegalScopeForInterceptor"); //$NON-NLS-1$
//Member group
@@ -169,10 +165,8 @@
public static final String PRODUCER_IN_INTERCEPTOR_OR_DECORATOR = INSTANCE.createSeverityOption("producerInInterceptorOrDecorator"); //$NON-NLS-1$
// - interceptor or decorator has a method annotated @Disposes
public static final String DISPOSER_IN_INTERCEPTOR_OR_DECORATOR = INSTANCE.createSeverityOption("disposerInInterceptorOrDecorator"); //$NON-NLS-1$
-// - decorator has more than one delegate injection point, or
- public static final String MULTIPLE_DELEGATE = INSTANCE.createSeverityOption("multipleDelegate"); //$NON-NLS-1$
-// does not have a delegate injection point (8.1.2)
- public static final String MISSING_DELEGATE = INSTANCE.createSeverityOption("missingDelegate"); //$NON-NLS-1$
+// - decorator has more than one delegate injection point, or does not have a delegate injection point (8.1.2)
+ public static final String MULTIPLE_OR_MISSING_DELEGATE = INSTANCE.createSeverityOption("multipleDelegate"); //$NON-NLS-1$
// - injection point that is not an injected field, initializer method parameter
// or bean constructor method parameter is annotated @Delegate (8.1.2)
public static final String ILLEGAL_INJECTION_POINT_DELEGATE = INSTANCE.createSeverityOption("illegalInjectionPointDelegate"); //$NON-NLS-1$
@@ -200,10 +194,8 @@
public static final String INTERCEPTOR_OR_DECORATOR_IS_ALTERNATIVE = INSTANCE.createSeverityOption("interceptorOrDecoratorIsAlternative"); //$NON-NLS-1$
// - interceptor declared using @Interceptor does not declare any interceptor binding (9.2 non-portable)
public static final String MISSING_INTERCEPTOR_BINDING = INSTANCE.createSeverityOption("missingInterceptorBinding"); //$NON-NLS-1$
-// - a decorator can not be injected
- public static final String INJECTED_DECORATOR = INSTANCE.createSeverityOption("injectedDecorator"); //$NON-NLS-1$
-// - an interceptor can not be injected
- public static final String INJECTED_INTERCEPTOR = INSTANCE.createSeverityOption("injectedInterceptor"); //$NON-NLS-1$
+// - a decorator or intercpetor can not be injected
+ public static final String INJECTED_DECORATOR_OR_INTERCEPTOR = INSTANCE.createSeverityOption("injectedDecorator"); //$NON-NLS-1$
// 8.3. Decorator resolution
// - If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects
// the problem and treats it as a deployment problem.
@@ -214,12 +206,12 @@
// - managed bean class annotated @Specializes does not directly extend
// the bean class of another managed bean (3.1.4)
- public static final String ILLEGAL_SPECIALIZING_MANAGED_BEAN = INSTANCE.createSeverityOption("illegalSpecializingManagedBean"); //$NON-NLS-1$
+//
// - session bean class annotated @Specializes does not directly extend
// the bean class of another session bean (3.2.4)
- public static final String ILLEGAL_SPECIALIZING_SESSION_BEAN = INSTANCE.createSeverityOption("illegalSpecializingSessionBean"); //$NON-NLS-1$
+//
// - method annotated @Specializes is static or does not directly override another producer method (3.3.3)
- public static final String ILLEGAL_SPECIALIZING_PRODUCER = INSTANCE.createSeverityOption("illegalSpecializingProducer"); //$NON-NLS-1$
+ public static final String ILLEGAL_SPECIALIZING_BEAN = INSTANCE.createSeverityOption("illegalSpecializingManagedBean"); //$NON-NLS-1$
// - X specializes Y but does not have some bean type of Y (4.3.1)
public static final String MISSING_TYPE_IN_SPECIALIZING_BEAN = INSTANCE.createSeverityOption("missingTypeInSpecializingBean"); //$NON-NLS-1$
// - X specializes Y and Y has a name and X declares a name explicitly, using @Named (4.3.1)
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 2011-06-21 17:32:00 UTC (rev 32261)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-06-21 18:40:14 UTC (rev 32262)
@@ -1118,10 +1118,10 @@
for (String paramType : paramTypes) {
if (Signature.getTypeSignatureKind(paramType) == Signature.WILDCARD_TYPE_SIGNATURE) {
if (producer instanceof IProducerField) {
- addError(CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, typeDeclaration,
+ addError(CDIValidationMessages.PRODUCER_FIELD_TYPE_HAS_WILDCARD, CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD_OR_VARIABLE, typeDeclaration,
producer.getResource());
} else {
- addError(CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD,
+ addError(CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD_OR_VARIABLE,
typeDeclaration, producer.getResource());
}
} else if(!variable && isTypeVariable(producer, Signature.toString(paramType), typeVariables)) {
@@ -1137,7 +1137,7 @@
if (scopeOrStereotypeDeclaration != null) {
boolean field = producer instanceof IProducerField;
addError(field ? CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_FIELD : CDIValidationMessages.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD,
- field ? CDIPreferences.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD : CDIPreferences.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD,
+ field ? CDIPreferences.ILLEGAL_SCOPE_FOR_BEAN : CDIPreferences.ILLEGAL_SCOPE_FOR_BEAN,
scopeOrStereotypeDeclaration, producer.getResource());
}
break;
@@ -1183,7 +1183,7 @@
for (String variableSig : typeVariables) {
String variableName = Signature.getTypeVariable(variableSig);
if (typeString.equals(variableName)) {
- addError(CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE, CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, typeDeclaration != null ? typeDeclaration : producer, producer.getResource());
+ addError(CDIValidationMessages.PRODUCER_FIELD_TYPE_IS_VARIABLE, CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD_OR_VARIABLE, typeDeclaration != null ? typeDeclaration : producer, producer.getResource());
}
}
}
@@ -1248,7 +1248,7 @@
String typeSign = producerMethod.getMethod().getReturnType();
String typeString = Signature.toString(typeSign);
if(isTypeVariable(producerMethod, typeString, typeVariables)) {
- addError(CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE,
+ addError(CDIValidationMessages.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD_OR_VARIABLE,
typeDeclaration != null ? typeDeclaration : producer, producer.getResource());
}
/*
@@ -1274,7 +1274,7 @@
* 3.3.3. Specializing a producer method
* - method annotated @Specializes is static
*/
- addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_STATIC, CDIPreferences.ILLEGAL_SPECIALIZING_PRODUCER, sDeclaration, producer.getResource());
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_STATIC, CDIPreferences.ILLEGAL_SPECIALIZING_BEAN, sDeclaration, producer.getResource());
} else {
/*
* 3.3.3. Specializing a producer method
@@ -1304,7 +1304,7 @@
}
}
if(!overrides) {
- addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE, CDIPreferences.ILLEGAL_SPECIALIZING_PRODUCER, sDeclaration, producer.getResource());
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_PRODUCER_OVERRIDE, CDIPreferences.ILLEGAL_SPECIALIZING_BEAN, sDeclaration, producer.getResource());
}
saveAllSuperTypesAsLinkedResources(producer.getClassBean());
}
@@ -1444,9 +1444,9 @@
}
}
if(type!=null && beans.isEmpty() && !instance) {
- addError(CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, CDIPreferences.UNSATISFIED_INJECTION_POINTS, reference, injection.getResource(), UNSATISFIED_INJECTION_POINTS_ID);
+ addError(CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, CDIPreferences.UNSATISFIED_OR_AMBIGUOUS_INJECTION_POINTS, reference, injection.getResource(), UNSATISFIED_INJECTION_POINTS_ID);
} else if(beans.size()>1 && !instance) {
- addError(CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, CDIPreferences.AMBIGUOUS_INJECTION_POINTS, reference, injection.getResource(), AMBIGUOUS_INJECTION_POINTS_ID);
+ addError(CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, CDIPreferences.UNSATISFIED_OR_AMBIGUOUS_INJECTION_POINTS, reference, injection.getResource(), AMBIGUOUS_INJECTION_POINTS_ID);
} else if(beans.size()==1) {
IBean bean = beans.iterator().next();
if(!bean.getBeanClass().isReadOnly()) {
@@ -1463,9 +1463,9 @@
* - an interceptor can not be injected
*/
if(bean instanceof IDecorator) {
- addError(CDIValidationMessages.INJECTED_DECORATOR, CDIPreferences.INJECTED_DECORATOR, reference, injection.getResource());
+ addError(CDIValidationMessages.INJECTED_DECORATOR, CDIPreferences.INJECTED_DECORATOR_OR_INTERCEPTOR, reference, injection.getResource());
} else if(bean instanceof IInterceptor) {
- addError(CDIValidationMessages.INJECTED_INTERCEPTOR, CDIPreferences.INJECTED_INTERCEPTOR, reference, injection.getResource());
+ addError(CDIValidationMessages.INJECTED_INTERCEPTOR, CDIPreferences.INJECTED_DECORATOR_OR_INTERCEPTOR, reference, injection.getResource());
}
/*
* 5.4.1. Unproxyable bean types
@@ -1621,7 +1621,7 @@
*/
String[] typeVariables = type.getTypeParameterSignatures();
if (typeVariables.length > 0) {
- addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE, CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN,
+ addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_SESSION_BEAN_WITH_GENERIC_TYPE, CDIPreferences.ILLEGAL_SCOPE_FOR_BEAN,
declaration, bean.getResource());
} else {
if (bean.isStateless()) {
@@ -1630,7 +1630,7 @@
* - session bean specifies an illegal scope (a stateless session bean must belong to the @Dependent pseudo-scope)
*/
if (declaration != null) {
- addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN,
+ addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_STATELESS_SESSION_BEAN, CDIPreferences.ILLEGAL_SCOPE_FOR_BEAN,
declaration, bean.getResource());
}
} else if (bean.isSingleton()) {
@@ -1642,7 +1642,7 @@
declaration = CDIUtil.getDifferentScopeDeclarationThanApplicationScoped(bean);
}
if (declaration != null) {
- addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN,
+ addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_SINGLETON_SESSION_BEAN, CDIPreferences.ILLEGAL_SCOPE_FOR_BEAN,
declaration, bean.getResource());
}
}
@@ -1661,11 +1661,11 @@
IBean sBean = bean.getSpecializedBean();
if (sBean == null) {
// The specializing bean extends nothing
- addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_SESSION_BEAN, specializesDeclaration,
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_BEAN, specializesDeclaration,
bean.getResource());
} else if (!CDIUtil.isSessionBean(sBean)) {
// The specializing bean directly extends a non-session bean class
- addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_SESSION_BEAN, specializesDeclaration,
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_BEAN, specializesDeclaration,
bean.getResource());
}
}
@@ -1695,7 +1695,7 @@
for (IField field : fields) {
if (Flags.isPublic(field.getFlags()) && !Flags.isStatic(field.getFlags())) {
ITextSourceReference fieldReference = CDIUtil.convertToSourceReference(field.getNameRange(), bean.getResource());
- addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, CDIPreferences.ILLEGAL_SCOPE_FOR_MANAGED_BEAN,
+ addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, CDIPreferences.ILLEGAL_SCOPE_FOR_BEAN,
fieldReference, bean.getResource(), ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD_ID);
}
}
@@ -1705,7 +1705,7 @@
*/
String[] typeVariables = type.getTypeParameterSignatures();
if (typeVariables.length > 0) {
- addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_GENERIC_TYPE, CDIPreferences.ILLEGAL_SCOPE_FOR_MANAGED_BEAN,
+ addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_GENERIC_TYPE, CDIPreferences.ILLEGAL_SCOPE_FOR_BEAN,
declaration, bean.getResource());
}
} catch (JavaModelException e) {
@@ -1725,7 +1725,7 @@
if (sBean instanceof ISessionBean || sBean.getAnnotation(CDIConstants.STATELESS_ANNOTATION_TYPE_NAME) != null
|| sBean.getAnnotation(CDIConstants.SINGLETON_ANNOTATION_TYPE_NAME) != null) {
// The specializing bean directly extends an enterprise bean class
- addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_MANAGED_BEAN,
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_BEAN,
specializesDeclaration, bean.getResource());
} else {
// Validate the specializing bean extends a non simple bean
@@ -1741,12 +1741,12 @@
}
}
if (!hasDefaultConstructor) {
- addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_MANAGED_BEAN, specializesDeclaration, bean.getResource());
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_BEAN, specializesDeclaration, bean.getResource());
}
}
} else {
// The specializing bean extends nothing
- addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_MANAGED_BEAN, specializesDeclaration, bean.getResource());
+ addError(CDIValidationMessages.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferences.ILLEGAL_SPECIALIZING_BEAN, specializesDeclaration, bean.getResource());
}
} catch (JavaModelException e) {
CDICorePlugin.getDefault().logError(e);
@@ -1836,7 +1836,7 @@
if (declaration == null) {
declaration = CDIUtil.getNamedStereotypeDeclaration(interceptor);
}
- addError(CDIValidationMessages.INTERCEPTOR_HAS_NAME, CDIPreferences.INTERCEPTOR_HAS_NAME, declaration, interceptor.getResource());
+ addError(CDIValidationMessages.INTERCEPTOR_HAS_NAME, CDIPreferences.INTERCEPTOR_OR_DECORATOR_HAS_NAME, declaration, interceptor.getResource());
}
/*
@@ -1924,7 +1924,7 @@
if (declaration == null) {
declaration = CDIUtil.getNamedStereotypeDeclaration(decorator);
}
- addError(CDIValidationMessages.DECORATOR_HAS_NAME, CDIPreferences.DECORATOR_HAS_NAME, declaration, decorator.getResource());
+ addError(CDIValidationMessages.DECORATOR_HAS_NAME, CDIPreferences.INTERCEPTOR_OR_DECORATOR_HAS_NAME, declaration, decorator.getResource());
}
/*
@@ -1985,7 +1985,7 @@
* - decorator has more than one delegate injection point
*/
for (ITextSourceReference declaration : delegates) {
- addError(CDIValidationMessages.MULTIPLE_DELEGATE, CDIPreferences.MULTIPLE_DELEGATE, declaration, decorator.getResource());
+ addError(CDIValidationMessages.MULTIPLE_DELEGATE, CDIPreferences.MULTIPLE_OR_MISSING_DELEGATE, declaration, decorator.getResource());
}
} else if(delegates.isEmpty()) {
/*
@@ -1993,7 +1993,7 @@
* - decorator does not have a delegate injection point
*/
IAnnotationDeclaration declaration = decorator.getDecoratorAnnotation();
- addError(CDIValidationMessages.MISSING_DELEGATE, CDIPreferences.MISSING_DELEGATE, declaration, decorator.getResource());
+ addError(CDIValidationMessages.MISSING_DELEGATE, CDIPreferences.MULTIPLE_OR_MISSING_DELEGATE, declaration, decorator.getResource());
}
/*
@@ -2165,13 +2165,8 @@
if (interceptor || decorator) {
IAnnotationDeclaration scopeOrStereotypeDeclaration = CDIUtil.getDifferentScopeDeclarationThanDepentend(bean);
if (scopeOrStereotypeDeclaration != null) {
- String key = CDIPreferences.ILLEGAL_SCOPE_FOR_DECORATOR;
- String message = CDIValidationMessages.ILLEGAL_SCOPE_FOR_DECORATOR;
- if (interceptor) {
- key = CDIPreferences.ILLEGAL_SCOPE_FOR_INTERCEPTOR;
- message = CDIValidationMessages.ILLEGAL_SCOPE_FOR_INTERCEPTOR;
- }
- addError(message, key, scopeOrStereotypeDeclaration, bean.getResource());
+ String message = interceptor?CDIValidationMessages.ILLEGAL_SCOPE_FOR_INTERCEPTOR:CDIValidationMessages.ILLEGAL_SCOPE_FOR_DECORATOR;
+ addError(message, CDIPreferences.ILLEGAL_SCOPE_FOR_INTERCEPTOR_OR_DECORATOR, scopeOrStereotypeDeclaration, bean.getResource());
}
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.ui/src/org/jboss/tools/cdi/seam/config/ui/preferences/CDISeamPreferencesMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.ui/src/org/jboss/tools/cdi/seam/config/ui/preferences/CDISeamPreferencesMessages.java 2011-06-21 17:32:00 UTC (rev 32261)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.ui/src/org/jboss/tools/cdi/seam/config/ui/preferences/CDISeamPreferencesMessages.java 2011-06-21 18:40:14 UTC (rev 32262)
@@ -5,9 +5,6 @@
public class CDISeamPreferencesMessages extends NLS {
private static final String BUNDLE_NAME = CDISeamPreferencesMessages.class.getName();
- // Seam Validator Preference page
- public static String CDISeamValidatorConfigurationBlock_common_description;
-
//Section Config
public static String CDIValidatorConfigurationBlock_section_config;
public static String CDIValidatorConfigurationBlock_pb_unresolvedType_label;
@@ -20,11 +17,10 @@
public static String CDIValidatorConfigurationBlock_section_solder;
public static String CDIValidatorConfigurationBlock_pb_ambiguousGenericConfigurationPoint_label;
public static String CDIValidatorConfigurationBlock_pb_wrongTypeOfGenericConfigurationPoint_label;
-
public static String CDI_SEAM_VALIDATOR_PREFERENCE_PAGE_TITLE;
static {
NLS.initializeMessages(BUNDLE_NAME, CDISeamPreferencesMessages.class);
}
-}
+}
\ No newline at end of file
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 2011-06-21 17:32:00 UTC (rev 32261)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2011-06-21 18:40:14 UTC (rev 32262)
@@ -17,7 +17,6 @@
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.cdi.core.CDICorePlugin;
-import org.jboss.tools.cdi.core.preferences.CDIPreferences;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlockDescriptionProvider.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlockDescriptionProvider.java 2011-06-21 17:32:00 UTC (rev 32261)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlockDescriptionProvider.java 2011-06-21 18:40:14 UTC (rev 32262)
@@ -50,8 +50,7 @@
{CDIPreferences.STEREOTYPE_DECLARES_NON_EMPTY_NAME, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_stereotypeDeclaresNonEmptyName_label},
{CDIPreferences.RESOURCE_PRODUCER_FIELD_SETS_EL_NAME, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_resourceProducerFieldSetsElName_label},
{CDIPreferences.PARAM_INJECTION_DECLARES_EMPTY_NAME, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_paramInjectionDeclaresEmptyName_label},
- {CDIPreferences.INTERCEPTOR_HAS_NAME, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_interceptorHasName_label},
- {CDIPreferences.DECORATOR_HAS_NAME, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_decoratorHasName_label},
+ {CDIPreferences.INTERCEPTOR_OR_DECORATOR_HAS_NAME, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_interceptorOrDecoretorHasName_label},
{CDIPreferences.AMBIGUOUS_EL_NAMES, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_ambiguousElNames_label},
},
CDICorePlugin.PLUGIN_ID
@@ -60,12 +59,10 @@
private SectionDescription SECTION_TYPE = new SectionDescription(
CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_type,
new String[][]{
- {CDIPreferences.UNSATISFIED_INJECTION_POINTS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_unsatisfiedInjectionPoints_label},
- {CDIPreferences.AMBIGUOUS_INJECTION_POINTS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_ambiguousInjectionPoints_label},
+ {CDIPreferences.UNSATISFIED_OR_AMBIGUOUS_INJECTION_POINTS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_unsatisfiedOrAmbiguousInjectionPoints_label},
{CDIPreferences.UNPROXYABLE_BEAN_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_unproxyableBeanType_label},
{CDIPreferences.ILLEGAL_TYPE_IN_TYPED_DECLARATION, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalTypeInTypedDeclaration_label},
- {CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeHasWildcard_label},
- {CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeIsVariable_label},
+ {CDIPreferences.PRODUCER_METHOD_RETURN_TYPE_HAS_WILDCARD_OR_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeHasWildcardOrVariable_label},
// {CDIPreferences.PRODUCER_FIELD_TYPE_DOES_NOT_MATCH_JAVA_EE_OBJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeDoesNotMatchJavaEeObject_label},
{CDIPreferences.INJECT_RESOLVES_TO_NULLABLE_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectResolvesToNullableBean_label},
{CDIPreferences.INJECTION_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectionTypeIsVariable_label},
@@ -84,12 +81,9 @@
{CDIPreferences.MULTIPLE_SCOPE_TYPE_ANNOTATIONS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleScopeTypeAnnotations_label},
{CDIPreferences.MISSING_SCOPE_WHEN_THERE_IS_NO_DEFAULT_SCOPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingScopeWhenThereIsNoDefaultScope_label},
{CDIPreferences.STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_stereotypeDeclaresMoreThanOneScope_label},
- {CDIPreferences.ILLEGAL_SCOPE_FOR_MANAGED_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForManagedBean_label},
- {CDIPreferences.ILLEGAL_SCOPE_FOR_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForSessionBean_label},
- {CDIPreferences.ILLEGAL_SCOPE_FOR_PRODUCER_METHOD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForProducerMethod_label},
+ {CDIPreferences.ILLEGAL_SCOPE_FOR_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForBean_label},
{CDIPreferences.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeWhenTypeInjectionPointIsInjected_label},
- {CDIPreferences.ILLEGAL_SCOPE_FOR_INTERCEPTOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForInterceptor_label},
- {CDIPreferences.ILLEGAL_SCOPE_FOR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForDecorator_label},
+ {CDIPreferences.ILLEGAL_SCOPE_FOR_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForInterceptorOrDecorator_label},
},
CDICorePlugin.PLUGIN_ID
);
@@ -124,8 +118,7 @@
{CDIPreferences.SESSION_BEAN_ANNOTATED_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_sessionBeanAnnotatedInterceptorOrDecorator_label},
{CDIPreferences.PRODUCER_IN_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerInInterceptorOrDecorator_label},
{CDIPreferences.DISPOSER_IN_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_disposerInInterceptorOrDecorator_label},
- {CDIPreferences.MULTIPLE_DELEGATE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleDelegate_label},
- {CDIPreferences.MISSING_DELEGATE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingDelegate_label},
+ {CDIPreferences.MULTIPLE_OR_MISSING_DELEGATE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleOrMissingDelegate_label},
{CDIPreferences.ILLEGAL_INJECTION_POINT_DELEGATE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalInjectionPointDelegate_label},
{CDIPreferences.ILLEGAL_BEAN_DECLARING_DELEGATE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalBeanDeclaringDelegate_label},
{CDIPreferences.DELEGATE_HAS_ILLEGAL_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_delegateHasIllegalType_label},
@@ -135,9 +128,8 @@
{CDIPreferences.OBSERVER_IN_INTERCEPTOR_OR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_observerInInterceptorOrDecorator_label},
{CDIPreferences.INTERCEPTOR_OR_DECORATOR_IS_ALTERNATIVE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_interceptorOrDecoratorIsAlternative_label},
{CDIPreferences.MISSING_INTERCEPTOR_BINDING, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingInterceptorBinding_label},
- {CDIPreferences.INJECTED_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectedDecorator_label},
- {CDIPreferences.INJECTED_INTERCEPTOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectedInterceptor_label},
- {CDIPreferences.INJECTED_INTERCEPTOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_decoratorResolvesToFinalBean_label},
+ {CDIPreferences.INJECTED_DECORATOR_OR_INTERCEPTOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectedDecoratorOrInterceptor_label},
+ {CDIPreferences.DECORATOR_RESOLVES_TO_FINAL_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_decoratorResolvesToFinalBean_label},
},
CDICorePlugin.PLUGIN_ID
);
@@ -145,9 +137,7 @@
private SectionDescription SECTION_SPECIALIZATION = new SectionDescription(
CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_specializing,
new String[][]{
- {CDIPreferences.ILLEGAL_SPECIALIZING_MANAGED_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingManagedBean_label},
- {CDIPreferences.ILLEGAL_SPECIALIZING_SESSION_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingSessionBean_label},
- {CDIPreferences.ILLEGAL_SPECIALIZING_PRODUCER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingProducer_label},
+ {CDIPreferences.ILLEGAL_SPECIALIZING_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalSpecializingBean_label},
{CDIPreferences.MISSING_TYPE_IN_SPECIALIZING_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingTypeInSpecializingBean_label},
{CDIPreferences.CONFLICTING_NAME_IN_SPECIALIZING_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_conflictingNameInSpecializingBean_label},
{CDIPreferences.INTERCEPTOR_ANNOTATED_SPECIALIZES, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_interceptorAnnotatedSpecializes_label},
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 2011-06-21 17:32:00 UTC (rev 32261)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2011-06-21 18:40:14 UTC (rev 32262)
@@ -43,18 +43,15 @@
public static String CDIValidatorConfigurationBlock_pb_stereotypeDeclaresNonEmptyName_label;
public static String CDIValidatorConfigurationBlock_pb_resourceProducerFieldSetsElName_label;
public static String CDIValidatorConfigurationBlock_pb_paramInjectionDeclaresEmptyName_label;
- public static String CDIValidatorConfigurationBlock_pb_interceptorHasName_label;
- public static String CDIValidatorConfigurationBlock_pb_decoratorHasName_label;
+ public static String CDIValidatorConfigurationBlock_pb_interceptorOrDecoretorHasName_label;
public static String CDIValidatorConfigurationBlock_pb_ambiguousElNames_label;
// Section Type
public static String CDIValidatorConfigurationBlock_section_type;
- public static String CDIValidatorConfigurationBlock_pb_unsatisfiedInjectionPoints_label;
- public static String CDIValidatorConfigurationBlock_pb_ambiguousInjectionPoints_label;
+ public static String CDIValidatorConfigurationBlock_pb_unsatisfiedOrAmbiguousInjectionPoints_label;
public static String CDIValidatorConfigurationBlock_pb_unproxyableBeanType_label;
public static String CDIValidatorConfigurationBlock_pb_illegalTypeInTypedDeclaration_label;
- public static String CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeHasWildcard_label;
- public static String CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeIsVariable_label;
+ public static String CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeHasWildcardOrVariable_label;
public static String CDIValidatorConfigurationBlock_pb_producerFieldTypeDoesNotMatchJavaEeObject_label;
public static String CDIValidatorConfigurationBlock_pb_injectResolvesToNullableBean_label;
public static String CDIValidatorConfigurationBlock_pb_injectionTypeIsVariable_label;
@@ -69,12 +66,9 @@
public static String CDIValidatorConfigurationBlock_pb_multipleScopeTypeAnnotations_label;
public static String CDIValidatorConfigurationBlock_pb_missingScopeWhenThereIsNoDefaultScope_label;
public static String CDIValidatorConfigurationBlock_pb_stereotypeDeclaresMoreThanOneScope_label;
- public static String CDIValidatorConfigurationBlock_pb_illegalScopeForManagedBean_label;
- public static String CDIValidatorConfigurationBlock_pb_illegalScopeForSessionBean_label;
- public static String CDIValidatorConfigurationBlock_pb_illegalScopeForProducerMethod_label;
+ public static String CDIValidatorConfigurationBlock_pb_illegalScopeForBean_label;
public static String CDIValidatorConfigurationBlock_pb_illegalScopeWhenTypeInjectionPointIsInjected_label;
- public static String CDIValidatorConfigurationBlock_pb_illegalScopeForInterceptor_label;
- public static String CDIValidatorConfigurationBlock_pb_illegalScopeForDecorator_label;
+ public static String CDIValidatorConfigurationBlock_pb_illegalScopeForInterceptorOrDecorator_label;
// Member
public static String CDIValidatorConfigurationBlock_section_member;
@@ -101,8 +95,7 @@
public static String CDIValidatorConfigurationBlock_pb_sessionBeanAnnotatedInterceptorOrDecorator_label;
public static String CDIValidatorConfigurationBlock_pb_producerInInterceptorOrDecorator_label;
public static String CDIValidatorConfigurationBlock_pb_disposerInInterceptorOrDecorator_label;
- public static String CDIValidatorConfigurationBlock_pb_multipleDelegate_label;
- public static String CDIValidatorConfigurationBlock_pb_missingDelegate_label;
+ public static String CDIValidatorConfigurationBlock_pb_multipleOrMissingDelegate_label;
public static String CDIValidatorConfigurationBlock_pb_illegalInjectionPointDelegate_label;
public static String CDIValidatorConfigurationBlock_pb_illegalBeanDeclaringDelegate_label;
public static String CDIValidatorConfigurationBlock_pb_delegateHasIllegalType_label;
@@ -112,15 +105,12 @@
public static String CDIValidatorConfigurationBlock_pb_observerInInterceptorOrDecorator_label;
public static String CDIValidatorConfigurationBlock_pb_interceptorOrDecoratorIsAlternative_label;
public static String CDIValidatorConfigurationBlock_pb_missingInterceptorBinding_label;
- public static String CDIValidatorConfigurationBlock_pb_injectedDecorator_label;
- public static String CDIValidatorConfigurationBlock_pb_injectedInterceptor_label;
+ public static String CDIValidatorConfigurationBlock_pb_injectedDecoratorOrInterceptor_label;
public static String CDIValidatorConfigurationBlock_pb_decoratorResolvesToFinalBean_label;
// Specializing
public static String CDIValidatorConfigurationBlock_section_specializing;
- public static String CDIValidatorConfigurationBlock_pb_illegalSpecializingManagedBean_label;
- public static String CDIValidatorConfigurationBlock_pb_illegalSpecializingSessionBean_label;
- public static String CDIValidatorConfigurationBlock_pb_illegalSpecializingProducer_label;
+ public static String CDIValidatorConfigurationBlock_pb_illegalSpecializingBean_label;
public static String CDIValidatorConfigurationBlock_pb_missingTypeInSpecializingBean_label;
public static String CDIValidatorConfigurationBlock_pb_conflictingNameInSpecializingBean_label;
public static String CDIValidatorConfigurationBlock_pb_interceptorAnnotatedSpecializes_label;
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 2011-06-21 17:32:00 UTC (rev 32261)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2011-06-21 18:40:14 UTC (rev 32262)
@@ -31,18 +31,15 @@
CDIValidatorConfigurationBlock_pb_stereotypeDeclaresNonEmptyName_label=Stereotype has non-empty name:
CDIValidatorConfigurationBlock_pb_resourceProducerFieldSetsElName_label=Producer field declaration of resource specifies EL name:
CDIValidatorConfigurationBlock_pb_paramInjectionDeclaresEmptyName_label=Empty name at parameter injection:
-CDIValidatorConfigurationBlock_pb_interceptorHasName_label=Interceptor declares name:
-CDIValidatorConfigurationBlock_pb_decoratorHasName_label=Decorator declares name:
+CDIValidatorConfigurationBlock_pb_interceptorOrDecoretorHasName_label=Interceptor or decorator declares name:
CDIValidatorConfigurationBlock_pb_ambiguousElNames_label=Ambiguous EL names:
##Section Type
CDIValidatorConfigurationBlock_section_type=Type
-CDIValidatorConfigurationBlock_pb_unsatisfiedInjectionPoints_label=Unsatisfied dependencies for injection point:
-CDIValidatorConfigurationBlock_pb_ambiguousInjectionPoints_label=Ambiguous dependencies for injection point:
+CDIValidatorConfigurationBlock_pb_unsatisfiedOrAmbiguousInjectionPoints_label=Unsatisfied or ambiguous dependencies for injection point:
CDIValidatorConfigurationBlock_pb_unproxyableBeanType_label=Unproxyable bean type for injection point:
CDIValidatorConfigurationBlock_pb_illegalTypeInTypedDeclaration_label=Illegal type in @Typed:
-CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeHasWildcard_label=Wildcard in producer field type/method return type:
-CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeIsVariable_label=Variable in producer field type/method return type:
+CDIValidatorConfigurationBlock_pb_producerMethodReturnTypeHasWildcardOrVariable_label=Wildcard or variable in producer field type/method return type:
CDIValidatorConfigurationBlock_pb_producerFieldTypeDoesNotMatchJavaEeObject_label=Producer field type conflicts Java EE object:
CDIValidatorConfigurationBlock_pb_injectResolvesToNullableBean_label=Injection point of primitive type resolves to a nullabe bean:
CDIValidatorConfigurationBlock_pb_injectionTypeIsVariable_label=Injection type is variable:
@@ -57,12 +54,9 @@
CDIValidatorConfigurationBlock_pb_multipleScopeTypeAnnotations_label=Multiple scope annotations:
CDIValidatorConfigurationBlock_pb_missingScopeWhenThereIsNoDefaultScope_label=Missing scope when there is no default scope:
CDIValidatorConfigurationBlock_pb_stereotypeDeclaresMoreThanOneScope_label=Stereotype declares more than one scope:
-CDIValidatorConfigurationBlock_pb_illegalScopeForManagedBean_label=Illegal scope for Managed Bean:
-CDIValidatorConfigurationBlock_pb_illegalScopeForSessionBean_label=Illegal scope for Session Bean:
-CDIValidatorConfigurationBlock_pb_illegalScopeForProducerMethod_label=Illegal scope for producer:
+CDIValidatorConfigurationBlock_pb_illegalScopeForBean_label=Illegal scope for bean:
CDIValidatorConfigurationBlock_pb_illegalScopeWhenTypeInjectionPointIsInjected_label=Illegal scope when type injection point is injected:
-CDIValidatorConfigurationBlock_pb_illegalScopeForInterceptor_label=Illegal scope for interceptor:
-CDIValidatorConfigurationBlock_pb_illegalScopeForDecorator_label=Illegal scope for decorator:
+CDIValidatorConfigurationBlock_pb_illegalScopeForInterceptorOrDecorator_label=Illegal scope for interceptor or decorator:
##Member
CDIValidatorConfigurationBlock_section_member=Members
@@ -89,10 +83,9 @@
CDIValidatorConfigurationBlock_pb_sessionBeanAnnotatedInterceptorOrDecorator_label=Session bean annotated @Interceptor or @Decorator:
CDIValidatorConfigurationBlock_pb_producerInInterceptorOrDecorator_label=Interceptor or decorator has a field annotated @Produces:
CDIValidatorConfigurationBlock_pb_disposerInInterceptorOrDecorator_label=Interceptor or decorator has a method annotated @Disposes:
-CDIValidatorConfigurationBlock_pb_multipleDelegate_label=Multiple delegate:
-CDIValidatorConfigurationBlock_pb_missingDelegate_label=Missing delegate:
+CDIValidatorConfigurationBlock_pb_multipleOrMissingDelegate_label=Multiple or missing delegate:
CDIValidatorConfigurationBlock_pb_illegalInjectionPointDelegate_label=Illegal injection point delegate:
-CDIValidatorConfigurationBlock_pb_illegalBeanDeclaringDelegate_label=Illegal Bean declaring delegate:
+CDIValidatorConfigurationBlock_pb_illegalBeanDeclaringDelegate_label=Illegal bean declares delegate:
CDIValidatorConfigurationBlock_pb_delegateHasIllegalType_label=Delegate has illegal type:
CDIValidatorConfigurationBlock_pb_illegalLifecycleCallbackInterceptorBinding_label=Illegal lifecycle callback interceptor binding:
CDIValidatorConfigurationBlock_pb_illegalInterceptorBindingMethod_label=Illegal interceptor binding method:
@@ -100,17 +93,14 @@
CDIValidatorConfigurationBlock_pb_observerInInterceptorOrDecorator_label=Interceptor or decorator annotated @Observes:
CDIValidatorConfigurationBlock_pb_interceptorOrDecoratorIsAlternative_label=Interceptor or decorator is an alternative:
CDIValidatorConfigurationBlock_pb_missingInterceptorBinding_label=Missing interceptor binding:
-CDIValidatorConfigurationBlock_pb_injectedDecorator_label=Decorator can not be injected:
-CDIValidatorConfigurationBlock_pb_injectedInterceptor_label=Interceptor can not be injected:
+CDIValidatorConfigurationBlock_pb_injectedDecoratorOrInterceptor_label=Decorator or interceptor can not be injected:
CDIValidatorConfigurationBlock_pb_decoratorResolvesToFinalBean_label=Decorator bound to managed bean w/ final method/class:
##Specializing
CDIValidatorConfigurationBlock_section_specializing=Specializing
-CDIValidatorConfigurationBlock_pb_illegalSpecializingManagedBean_label=Illegal Specializing Managed Bean:
-CDIValidatorConfigurationBlock_pb_illegalSpecializingSessionBean_label=Illegal Specializing Session Bean:
-CDIValidatorConfigurationBlock_pb_illegalSpecializingProducer_label=Illegal Specializing producer:
-CDIValidatorConfigurationBlock_pb_missingTypeInSpecializingBean_label=Missing type in Specializing Bean:
-CDIValidatorConfigurationBlock_pb_conflictingNameInSpecializingBean_label=Conflicting name in Specializing Bean:
+CDIValidatorConfigurationBlock_pb_illegalSpecializingBean_label=Illegal specializing bean:
+CDIValidatorConfigurationBlock_pb_missingTypeInSpecializingBean_label=Missing type in specializing vean:
+CDIValidatorConfigurationBlock_pb_conflictingNameInSpecializingBean_label=Conflicting name in specializing bean:
CDIValidatorConfigurationBlock_pb_interceptorAnnotatedSpecializes_label=Interceptor or decorator annotated @Specializes:
CDIValidatorConfigurationBlock_pb_inconsistentSpecialization_label=Inconsistent specialization:
14 years, 9 months
JBoss Tools SVN: r32261 - in trunk/smooks/plugins: org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2011-06-21 13:32:00 -0400 (Tue, 21 Jun 2011)
New Revision: 32261
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBeanSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/messages.properties
Log:
JBDS-1440: Smooks Java-To-XML FreeMarker Fails in ESB
https://issues.jboss.org/browse/JBDS-1440
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2011-06-21 17:23:00 UTC (rev 32260)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2011-06-21 17:32:00 UTC (rev 32261)
@@ -59,7 +59,9 @@
splitTokens[1] = null; // no formatting
}
- if(splitTokens[0].endsWith("!")) { //$NON-NLS-1$
+ if(splitTokens[0].endsWith("[0]!")) { //$NON-NLS-1$
+ splitTokens[0] = splitTokens[0].substring(0, splitTokens[0].length() - 4);
+ } else if(splitTokens[0].endsWith("!")) { //$NON-NLS-1$
splitTokens[0] = splitTokens[0].substring(0, splitTokens[0].length() - 1);
}
} else {
@@ -136,7 +138,7 @@
}
builder.append(tokens[i]);
}
- builder.append("\"]");
+ builder.append("\"][0]!");
}
return builder.toString();
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBeanSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBeanSelectionWizardPage.java 2011-06-21 17:23:00 UTC (rev 32260)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBeanSelectionWizardPage.java 2011-06-21 17:32:00 UTC (rev 32261)
@@ -259,6 +259,8 @@
}
protected void refreshJavaBeanModel() {
+ String error = null;
+
if (beanClass == null || "".equals(beanClass.trim())) { //$NON-NLS-1$
} else {
try {
@@ -290,8 +292,14 @@
}
} catch (JavaModelException e1) {
} catch (ClassNotFoundException e1) {
+ error = Messages.JavaBeanSelectionWizardPage_CantFindClass1 + beanClass + Messages.JavaBeanSelectionWizardPage_QuoteChar; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$
+ } catch (UnsupportedClassVersionError e) {
+ error = Messages.JavaBeanSelectionWizardPage_UnsupportedClassVersionError;
}
}
+
+ this.setErrorMessage(error);
+ this.setPageComplete(error == null);
}
private void createBeanClassControls(Composite mainComposite) {
@@ -403,6 +411,8 @@
e.printStackTrace();
} catch (ClassNotFoundException e) {
error = Messages.JavaBeanSelectionWizardPage_CantFindClass1 + beanClass + Messages.JavaBeanSelectionWizardPage_QuoteChar; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$
+ } catch (UnsupportedClassVersionError e) {
+ error = Messages.JavaBeanSelectionWizardPage_UnsupportedClassVersionError;
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Messages.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Messages.java 2011-06-21 17:23:00 UTC (rev 32260)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Messages.java 2011-06-21 17:32:00 UTC (rev 32261)
@@ -21,6 +21,7 @@
public static String JavaBeanSelectionWizardPage_CantFindClass1;
public static String JavaBeanSelectionWizardPage_CollectionClassLabel;
public static String JavaBeanSelectionWizardPage_CollectionComponentClassEmptyErrorMessage;
+ public static String JavaBeanSelectionWizardPage_UnsupportedClassVersionError;
public static String JavaBeanSelectionWizardPage_CollectionLabel;
public static String JavaBeanSelectionWizardPage_QuoteChar;
public static String JavaBeanSelectionWizardPage_WizardDes;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/messages.properties 2011-06-21 17:23:00 UTC (rev 32260)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/messages.properties 2011-06-21 17:32:00 UTC (rev 32261)
@@ -15,6 +15,7 @@
JavaBeanSelectionWizardPage_CantFindClass1=Can't find the class "
JavaBeanSelectionWizardPage_CollectionClassLabel=Collection Class :
JavaBeanSelectionWizardPage_CollectionComponentClassEmptyErrorMessage=Colletion component class is empty
+JavaBeanSelectionWizardPage_UnsupportedClassVersionError=Class compile version not supported by Java Environment
JavaBeanSelectionWizardPage_CollectionLabel=Collection
JavaBeanSelectionWizardPage_QuoteChar="
JavaBeanSelectionWizardPage_WizardDes=Specify the incoming Java Class sample for this configuration.
14 years, 9 months
JBoss Tools SVN: r32260 - in trunk/documentation/whatsnew: vpe and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-06-21 13:23:00 -0400 (Tue, 21 Jun 2011)
New Revision: 32260
Modified:
trunk/documentation/whatsnew/index.html
trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.M2.html
Log:
https://issues.jboss.org/browse/JBIDE-9188 : add system property to allow explicit disabling of the visual page in VPE
https://issues.jboss.org/browse/JBIDE-9166 : Visual Editor Component N&N
- added a reference to the command-line option to the N&N page
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2011-06-21 17:04:00 UTC (rev 32259)
+++ trunk/documentation/whatsnew/index.html 2011-06-21 17:23:00 UTC (rev 32260)
@@ -47,6 +47,7 @@
<p><a href="deltacloud/deltacloud-news-0.2.0.M2.html">DeltaCloud Tools</a></p>
<p><a href="birt/birt-news-3.3.0.M2.html">Birt Tools</a></p> -->
<p><a href="jst/jst-news-3.3.0.M2.html">JST/JSF Tools</a></p>
+ <p><a href="vpe/vpe-news-3.3.0.M2.html">Visual Page Editor</a></p>
<p><a href="cdi/cdi-news-3.3.0.M2.html">CDI/Seam 3 Tools</a></p>
<p><a href="ws/ws-news-1.2.2.M2.html">Webservices Tools</a></p>
<p><a href="modeshape/modeshape-news-3.3.0.M2.html">ModeShape Tools</a></p>
Modified: trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.M2.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.M2.html 2011-06-21 17:04:00 UTC (rev 32259)
+++ trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.M2.html 2011-06-21 17:23:00 UTC (rev 32260)
@@ -29,6 +29,25 @@
<tr>
<td colspan="2">
<hr />
+ <h3>General</h3>
+ <hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Disable Visual Editor</b></td>
+ <td valign="top">
+ <p>Eclipse may crash while using Visual Editor on some Linux distributions. We created a command-line to option for the users who experience this problem.
+ Adding the following line to eclipse.ini (or jbdevstudio.ini in JBDS) will disable Visual Editor:</p>
+ <p><code>-Dorg.jboss.tools.vpe.loadxulrunner=false</code></p>
+
+ <p><small><a href="https://issues.jboss.org/browse/JBIDE-9144">Related Jira 1</a></small>,
+ <small><a href="https://jira.jboss.org/jira/browse/JBIDE-9188">Related Jira 2</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
<h3>Editor</h3>
<hr />
</td>
14 years, 9 months
JBoss Tools SVN: r32259 - in branches/jbosstools-3.2.x/smooks/plugins: org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2011-06-21 13:04:00 -0400 (Tue, 21 Jun 2011)
New Revision: 32259
Modified:
branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBeanSelectionWizardPage.java
branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Messages.java
branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/messages.properties
Log:
JBDS-1440: Smooks Java-To-XML FreeMarker Fails in ESB
https://issues.jboss.org/browse/JBDS-1440
Modified: branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
===================================================================
--- branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2011-06-21 15:35:55 UTC (rev 32258)
+++ branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2011-06-21 17:04:00 UTC (rev 32259)
@@ -59,7 +59,9 @@
splitTokens[1] = null; // no formatting
}
- if(splitTokens[0].endsWith("!")) { //$NON-NLS-1$
+ if(splitTokens[0].endsWith("[0]!")) { //$NON-NLS-1$
+ splitTokens[0] = splitTokens[0].substring(0, splitTokens[0].length() - 4);
+ } else if(splitTokens[0].endsWith("!")) { //$NON-NLS-1$
splitTokens[0] = splitTokens[0].substring(0, splitTokens[0].length() - 1);
}
} else {
@@ -136,7 +138,7 @@
}
builder.append(tokens[i]);
}
- builder.append("\"]");
+ builder.append("\"][0]!");
}
return builder.toString();
Modified: branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBeanSelectionWizardPage.java
===================================================================
--- branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBeanSelectionWizardPage.java 2011-06-21 15:35:55 UTC (rev 32258)
+++ branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBeanSelectionWizardPage.java 2011-06-21 17:04:00 UTC (rev 32259)
@@ -259,6 +259,8 @@
}
protected void refreshJavaBeanModel() {
+ String error = null;
+
if (beanClass == null || "".equals(beanClass.trim())) { //$NON-NLS-1$
} else {
try {
@@ -290,8 +292,14 @@
}
} catch (JavaModelException e1) {
} catch (ClassNotFoundException e1) {
+ error = Messages.JavaBeanSelectionWizardPage_CantFindClass1 + beanClass + Messages.JavaBeanSelectionWizardPage_QuoteChar; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$
+ } catch (UnsupportedClassVersionError e) {
+ error = Messages.JavaBeanSelectionWizardPage_UnsupportedClassVersionError;
}
}
+
+ this.setErrorMessage(error);
+ this.setPageComplete(error == null);
}
private void createBeanClassControls(Composite mainComposite) {
@@ -403,6 +411,8 @@
e.printStackTrace();
} catch (ClassNotFoundException e) {
error = Messages.JavaBeanSelectionWizardPage_CantFindClass1 + beanClass + Messages.JavaBeanSelectionWizardPage_QuoteChar; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-1$
+ } catch (UnsupportedClassVersionError e) {
+ error = Messages.JavaBeanSelectionWizardPage_UnsupportedClassVersionError;
}
}
Modified: branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Messages.java
===================================================================
--- branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Messages.java 2011-06-21 15:35:55 UTC (rev 32258)
+++ branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Messages.java 2011-06-21 17:04:00 UTC (rev 32259)
@@ -21,6 +21,7 @@
public static String JavaBeanSelectionWizardPage_CantFindClass1;
public static String JavaBeanSelectionWizardPage_CollectionClassLabel;
public static String JavaBeanSelectionWizardPage_CollectionComponentClassEmptyErrorMessage;
+ public static String JavaBeanSelectionWizardPage_UnsupportedClassVersionError;
public static String JavaBeanSelectionWizardPage_CollectionLabel;
public static String JavaBeanSelectionWizardPage_QuoteChar;
public static String JavaBeanSelectionWizardPage_WizardDes;
Modified: branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/messages.properties
===================================================================
--- branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/messages.properties 2011-06-21 15:35:55 UTC (rev 32258)
+++ branches/jbosstools-3.2.x/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/messages.properties 2011-06-21 17:04:00 UTC (rev 32259)
@@ -15,6 +15,7 @@
JavaBeanSelectionWizardPage_CantFindClass1=Can't find the class "
JavaBeanSelectionWizardPage_CollectionClassLabel=Collection Class :
JavaBeanSelectionWizardPage_CollectionComponentClassEmptyErrorMessage=Colletion component class is empty
+JavaBeanSelectionWizardPage_UnsupportedClassVersionError=Class compile version not supported by Java Environment
JavaBeanSelectionWizardPage_CollectionLabel=Collection
JavaBeanSelectionWizardPage_QuoteChar="
JavaBeanSelectionWizardPage_WizardDes=Specify the incoming Java Class sample for this configuration.
14 years, 9 months
JBoss Tools SVN: r32257 - in trunk: examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-06-21 09:38:49 -0400 (Tue, 21 Jun 2011)
New Revision: 32257
Added:
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
Log:
JBDS-1697 Invalid Sites Dialog: Cannot Access JBoss Developer Studio 5.0. Examples Site
Added: trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml (rev 0)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml 2011-06-21 13:38:49 UTC (rev 32257)
@@ -0,0 +1,7 @@
+<projects>
+
+ <project>
+ </project>
+
+</projects>
+
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2011-06-21 13:06:33 UTC (rev 32256)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2011-06-21 13:38:49 UTC (rev 32257)
@@ -91,6 +91,7 @@
public static String SiteDialog_URL;
public static String Sites_Plugin_provided_sites;
public static String Sites_User_sites;
+ public static String InvalideSite;
public static String WTPRuntimeFix_Invalid_WTP_runtime_fix;
static {
// initialize resource bundle
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2011-06-21 13:06:33 UTC (rev 32256)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2011-06-21 13:38:49 UTC (rev 32257)
@@ -31,7 +31,7 @@
NewProjectExamplesWizard_New_Project_Example=New Project Example
NewProjectExamplesWizard_OverwriteProject=Overwrite project ''{0}''
NewProjectExamplesWizard_Question=Question
-NewProjectExamplesWizardPage_Cannot_access_the_following_sites=Cannot access the following sites:\n\n
+NewProjectExamplesWizardPage_Cannot_access_the_following_sites=Cannot access the following sites\:\n\n
NewProjectExamplesWizardPage_Description=Description:
NewProjectExamplesWizardPage_Details=Details...
NewProjectExamplesWizardPage_Import_Project_Example=Import Project Example
@@ -80,3 +80,4 @@
Sites_Plugin_provided_sites=Plugin provided sites
Sites_User_sites=User sites
WTPRuntimeFix_Invalid_WTP_runtime_fix=Invalid WTP runtime fix in {0}.
+InvalideSite=Invalid site: {0},url={1}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2011-06-21 13:06:33 UTC (rev 32256)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2011-06-21 13:38:49 UTC (rev 32257)
@@ -442,6 +442,7 @@
String message = Messages.NewProjectExamplesWizardPage_Cannot_access_the_following_sites;
for (ProjectExampleSite site:invalidSites) {
message = message + site.getName() + "\n"; //$NON-NLS-1$
+ ProjectExamplesActivator.log(NLS.bind(Messages.InvalideSite, new Object[] {site.getName(), site.getUrl()} ));
}
MessageDialogWithToggle dialog = MessageDialogWithToggle.openInformation(getShell(), Messages.NewProjectExamplesWizardPage_Invalid_Sites, message, Messages.NewProjectExamplesWizardPage_Show_this_dialog_next_time, true, ProjectExamplesActivator.getDefault().getPreferenceStore(), ProjectExamplesActivator.SHOW_INVALID_SITES);
boolean toggleState = dialog.getToggleState();
14 years, 9 months
JBoss Tools SVN: r32256 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-21 09:06:33 -0400 (Tue, 21 Jun 2011)
New Revision: 32256
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
Log:
[JBIDE-9200] deprecated duplicate accessor that is already present in RuntimeUtils
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2011-06-21 13:01:16 UTC (rev 32255)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2011-06-21 13:06:33 UTC (rev 32256)
@@ -26,6 +26,7 @@
import org.eclipse.wst.server.core.model.ServerDelegate;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.util.RuntimeUtils;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
@@ -154,9 +155,13 @@
}
public IJBossServerRuntime getRuntime() {
- return getRuntime(getServer());
+ return RuntimeUtils.getJBossServerRuntime(getServer());
}
+ /**
+ * @Deprecated
+ * @see RuntimeUtils.getJBossServerRuntime(getServer())
+ */
public static IJBossServerRuntime getRuntime(IServer server) {
IJBossServerRuntime ajbsrt = null;
if( server.getRuntime() != null ) {
14 years, 9 months
JBoss Tools SVN: r32255 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-21 09:01:16 -0400 (Tue, 21 Jun 2011)
New Revision: 32255
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
Log:
[JBIDE-9200] moving util methods to consistent pattern: checkedGetXX throws Exception, getXXX returns null
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-21 12:58:51 UTC (rev 32254)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-21 13:01:16 UTC (rev 32255)
@@ -97,7 +97,7 @@
*/
protected void updateMandatedFields(ILaunchConfigurationWorkingCopy wc, JBossServer jbs)
throws CoreException {
- String serverHome = ServerUtil.getServerHome(jbs);
+ String serverHome = ServerUtil.checkedGetServerHome(jbs);
IJBossServerRuntime runtime = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
updateVMPath(runtime, wc);
@@ -195,7 +195,7 @@
}
protected void forceDefaultsSet(ILaunchConfigurationWorkingCopy wc, JBossServer jbs) throws CoreException {
- String serverHome = ServerUtil.getServerHome(jbs);
+ String serverHome = ServerUtil.checkedGetServerHome(jbs);
IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
updateVMPath(jbrt, wc);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, getDefaultArgs(jbs));
14 years, 9 months
JBoss Tools SVN: r32254 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-21 08:58:51 -0400 (Tue, 21 Jun 2011)
New Revision: 32254
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
Log:
[JBIDE-9200] moving util methods to consistent pattern: checkedGetXX throws Exception, getXXX returns null
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2011-06-21 12:36:32 UTC (rev 32253)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2011-06-21 12:58:51 UTC (rev 32254)
@@ -150,7 +150,7 @@
@Deprecated
public static void addCPEntry(ArrayList<IRuntimeClasspathEntry> list, JBossServer jbs, String relative) throws CoreException {
- String serverHome = org.jboss.ide.eclipse.as.core.util.ServerUtil.getServerHome(jbs);
+ String serverHome = org.jboss.ide.eclipse.as.core.util.ServerUtil.checkedGetServerHome(jbs);
LaunchConfigUtils.addCPEntry(serverHome, relative, list);
}
@@ -182,7 +182,7 @@
@Deprecated
public static String getServerHome(JBossServer jbs) throws CoreException {
- return ServerUtil.getServerHome(jbs);
+ return ServerUtil.checkedGetServerHome(jbs);
}
public IVMInstall getVMInstall(ILaunchConfiguration configuration) throws CoreException {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2011-06-21 12:36:32 UTC (rev 32253)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2011-06-21 12:58:51 UTC (rev 32254)
@@ -63,7 +63,7 @@
NLS.bind(Messages.ServerNotFound, server.getName())));
}
IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(server);
- String serverHome = ServerUtil.getServerHome(jbs);
+ String serverHome = ServerUtil.checkedGetServerHome(jbs);
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigType = launchManager.getLaunchConfigurationType(TWIDDLE_LAUNCH_TYPE);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2011-06-21 12:36:32 UTC (rev 32253)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2011-06-21 12:58:51 UTC (rev 32254)
@@ -163,7 +163,7 @@
return NLS.bind(Messages.serverCountName, base, i);
}
- public static String getServerHome(JBossServer jbs) throws CoreException {
+ public static String checkedGetServerHome(JBossServer jbs) throws CoreException {
String serverHome = jbs.getServer().getRuntime().getLocation().toOSString();
if (serverHome == null)
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
@@ -172,7 +172,7 @@
}
public static IPath getServerHomePath(JBossServer jbs) throws CoreException {
- return new Path(getServerHome(jbs));
+ return new Path(checkedGetServerHome(jbs));
}
}
14 years, 9 months
JBoss Tools SVN: r32253 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-21 08:36:32 -0400 (Tue, 21 Jun 2011)
New Revision: 32253
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
Log:
[JBIDE-9215] removed duplicate null-check
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-21 12:35:30 UTC (rev 32252)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-21 12:36:32 UTC (rev 32253)
@@ -197,10 +197,6 @@
protected void forceDefaultsSet(ILaunchConfigurationWorkingCopy wc, JBossServer jbs) throws CoreException {
String serverHome = ServerUtil.getServerHome(jbs);
IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
- if (jbrt == null)
- throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
- NLS.bind(Messages.ServerRuntimeNotFound, jbs.getServer().getName())));
-
updateVMPath(jbrt, wc);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, getDefaultArgs(jbs));
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, jbrt.getDefaultRunVMArgs());
14 years, 9 months
JBoss Tools SVN: r32252 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7 and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-21 08:35:30 -0400 (Tue, 21 Jun 2011)
New Revision: 32252
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/RuntimeUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
Log:
[JBIDE-9200] moved static methods to util classes and changed static method to be instance methods where they should not offer functionality to the instance, only (no accessibility from outside the object is needed)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2011-06-21 12:26:01 UTC (rev 32251)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2011-06-21 12:35:30 UTC (rev 32252)
@@ -145,7 +145,7 @@
@Deprecated
public static IJBossServerRuntime findJBossServerRuntime(IServer server) throws CoreException {
- return RuntimeUtils.getJBossServerRuntime(server);
+ return RuntimeUtils.checkedGetJBossServerRuntime(server);
}
@Deprecated
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-21 12:26:01 UTC (rev 32251)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossServerStartupLaunchUtil.java 2011-06-21 12:35:30 UTC (rev 32252)
@@ -98,7 +98,7 @@
protected void updateMandatedFields(ILaunchConfigurationWorkingCopy wc, JBossServer jbs)
throws CoreException {
String serverHome = ServerUtil.getServerHome(jbs);
- IJBossServerRuntime runtime = RuntimeUtils.getJBossServerRuntime(jbs.getServer());
+ IJBossServerRuntime runtime = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
updateVMPath(runtime, wc);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
@@ -196,11 +196,7 @@
protected void forceDefaultsSet(ILaunchConfigurationWorkingCopy wc, JBossServer jbs) throws CoreException {
String serverHome = ServerUtil.getServerHome(jbs);
- if (serverHome == null)
- throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
- NLS.bind(Messages.CannotLocateServerHome, jbs.getServer().getName())));
-
- IJBossServerRuntime jbrt = getJBossServerRuntime(jbs);
+ IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
if (jbrt == null)
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
NLS.bind(Messages.ServerRuntimeNotFound, jbs.getServer().getName())));
@@ -219,18 +215,8 @@
wc.setAttribute(DEFAULTS_SET, true);
}
- private IJBossServerRuntime getJBossServerRuntime(JBossServer jbs) throws CoreException {
- IRuntime rt = jbs.getServer().getRuntime();
- IJBossServerRuntime jbrt = null;
- if (rt != null) {
- jbrt = (IJBossServerRuntime) rt.getAdapter(IJBossServerRuntime.class);
- }
-
- return jbrt;
- }
-
private List<String> getClasspath(JBossServer jbs) throws CoreException {
- IJBossServerRuntime jbrt = RuntimeUtils.getJBossServerRuntime(jbs.getServer());
+ IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
ArrayList<IRuntimeClasspathEntry> classpath = new ArrayList<IRuntimeClasspathEntry>();
classpath.add(LaunchConfigUtils.getRunJarRuntimeCPEntry(jbs.getServer()));
LaunchConfigUtils.addJREEntry(jbrt.getVM(), classpath);
@@ -244,7 +230,7 @@
}
protected String getDefaultArgs(JBossServer jbs) throws CoreException {
- IJBossServerRuntime rt = RuntimeUtils.getJBossServerRuntime(jbs.getServer());
+ IJBossServerRuntime rt = RuntimeUtils.checkedGetJBossServerRuntime(jbs.getServer());
if (rt != null) {
return rt.getDefaultRunArgs() +
IJBossRuntimeConstants.SPACE + IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT +
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2011-06-21 12:26:01 UTC (rev 32251)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2011-06-21 12:35:30 UTC (rev 32252)
@@ -80,7 +80,7 @@
public static ILaunchConfigurationWorkingCopy createLaunchConfiguration(IServer server) throws CoreException {
JBossServer jbs = ServerConverter.findJBossServer(server.getId());
- IJBossServerRuntime jbrt = RuntimeUtils.getJBossServerRuntime(server);
+ IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(server);
IPath serverHome = ServerUtil.getServerHomePath(jbs);
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2011-06-21 12:26:01 UTC (rev 32251)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2011-06-21 12:35:30 UTC (rev 32252)
@@ -62,7 +62,7 @@
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
NLS.bind(Messages.ServerNotFound, server.getName())));
}
- IJBossServerRuntime jbrt = RuntimeUtils.getJBossServerRuntime(server);
+ IJBossServerRuntime jbrt = RuntimeUtils.checkedGetJBossServerRuntime(server);
String serverHome = ServerUtil.getServerHome(jbs);
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java 2011-06-21 12:26:01 UTC (rev 32251)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7RuntimeLaunchConfigurator.java 2011-06-21 12:35:30 UTC (rev 32252)
@@ -40,7 +40,7 @@
public void apply(IServer server) throws CoreException {
if (!areDefaultsSet()) {
IRuntime runtime = server.getRuntime();
- IJBossServerRuntime jbossRuntime = RuntimeUtils.getJBossServerRuntime(server);
+ IJBossServerRuntime jbossRuntime = RuntimeUtils.checkedGetJBossServerRuntime(server);
setVmContainer(jbossRuntime)
.setClassPath(server, jbossRuntime)
.setDefaultArguments(jbossRuntime)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/RuntimeUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/RuntimeUtils.java 2011-06-21 12:26:01 UTC (rev 32251)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/RuntimeUtils.java 2011-06-21 12:35:30 UTC (rev 32252)
@@ -20,7 +20,7 @@
public class RuntimeUtils {
- public static IJBossServerRuntime checkedGetJBossServerRuntime(IServerAttributes server) {
+ public static IJBossServerRuntime getJBossServerRuntime(IServerAttributes server) {
IRuntime rt = server.getRuntime();
IJBossServerRuntime jbrt = null;
if (rt != null)
@@ -28,8 +28,8 @@
return jbrt;
}
- public static IJBossServerRuntime getJBossServerRuntime(IServerAttributes server) throws CoreException {
- IJBossServerRuntime jbrt = checkedGetJBossServerRuntime(server);
+ public static IJBossServerRuntime checkedGetJBossServerRuntime(IServerAttributes server) throws CoreException {
+ IJBossServerRuntime jbrt = getJBossServerRuntime(server);
if (jbrt == null)
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
NLS.bind(Messages.ServerRuntimeNotFound, server.getName())));
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2011-06-21 12:26:01 UTC (rev 32251)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2011-06-21 12:35:30 UTC (rev 32252)
@@ -153,11 +153,11 @@
@Deprecated
public static IJBossServerRuntime getJBossRuntime(IServer server) throws CoreException {
- return RuntimeUtils.getJBossServerRuntime(server);
+ return RuntimeUtils.checkedGetJBossServerRuntime(server);
}
@Deprecated
public static IJBossServerRuntime getJBossRuntime(IServerAttributes server) {
- return RuntimeUtils.checkedGetJBossServerRuntime(server);
+ return RuntimeUtils.getJBossServerRuntime(server);
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2011-06-21 12:26:01 UTC (rev 32251)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2011-06-21 12:35:30 UTC (rev 32252)
@@ -50,7 +50,7 @@
}
public static String getRSEConfigName(IServerAttributes server) {
- IJBossServerRuntime runtime = RuntimeUtils.checkedGetJBossServerRuntime(server);
+ IJBossServerRuntime runtime = RuntimeUtils.getJBossServerRuntime(server);
return server.getAttribute(RSEUtils.RSE_SERVER_CONFIG, runtime.getJBossConfiguration());
}
14 years, 9 months