You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by ds...@apache.org on 2008/03/25 02:41:02 UTC

svn commit: r640668 [5/6] - in /openejb/trunk/sandbox/openejb-eclipse-plugin: features/org.apache.openejb.feature/ features/org.apache.openejb.feature/.externalToolBuilders/ plugins/ plugins/org.apache.openejb.branding/ plugins/org.apache.openejb.brand...

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/EntityBeanConverter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/EntityBeanConverter.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/EntityBeanConverter.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/EntityBeanConverter.java Mon Mar 24 18:40:47 2008
@@ -60,7 +60,7 @@
 		this.facade = annotationHelper;
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	private void addOneToManyRelationshipAnnotations(EntityBean entityBean, org.apache.openejb.jee.jpa.Entity entity) {
 
 		List<OneToMany> relationships = entity.getAttributes().getOneToMany();
@@ -69,13 +69,13 @@
 			Map oneToManyProperties = getPropertiesForRelationship(relationship);
 
 			String name = relationship.getName();
-			String nameGetter = "get" + name.substring(0, 1).toUpperCase() + name.substring(1);
+			String nameGetter = "get" + name.substring(0, 1).toUpperCase() + name.substring(1); //$NON-NLS-1$
 
 			facade.addMethodAnnotation(entityBean.getEjbClass(), nameGetter, new String[] {}, javax.persistence.OneToMany.class, oneToManyProperties);
 		}
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	private void addNamedQueriesAnnotations(EntityBean entityBean, org.apache.openejb.jee.jpa.Entity entity) {
 
 		List<NamedQuery> namedQueries = entity.getNamedQuery();
@@ -94,21 +94,21 @@
 				String hintValue = hint.getValue();
 
 				Map hintProperty = new HashMap();
-				hintProperty.put("name", hintName);
-				hintProperty.put("value", hintValue);
+				hintProperty.put("name", hintName); //$NON-NLS-1$
+				hintProperty.put("value", hintValue); //$NON-NLS-1$
 				hintProperties.add(hintProperty);
 			}
 
 			Map namedQueryProperties = new HashMap();
-			namedQueryProperties.put("name", name);
-			namedQueryProperties.put("query", query);
-			namedQueryProperties.put("hints", hintProperties.toArray(new Object[0]));
+			namedQueryProperties.put("name", name); //$NON-NLS-1$
+			namedQueryProperties.put("query", query); //$NON-NLS-1$
+			namedQueryProperties.put("hints", hintProperties.toArray(new Object[0])); //$NON-NLS-1$
 
 			namedQueriesValues.add(namedQueryProperties);
 		}
 
 		Map namedQueriesProperties = new HashMap();
-		namedQueriesProperties.put("value", namedQueriesValues.toArray(new Object[0]));
+		namedQueriesProperties.put("value", namedQueriesValues.toArray(new Object[0])); //$NON-NLS-1$
 
 		facade.addClassAnnotation(entityBean.getEjbClass(), NamedQueries.class, namedQueriesProperties);
 	}
@@ -129,9 +129,9 @@
 
 		Map<String, Object> basicProps = new HashMap<String, Object>();
 		if (optional != null)
-			basicProps.put("optional", optional.booleanValue());
+			basicProps.put("optional", optional.booleanValue()); //$NON-NLS-1$
 		if (fetchType != null)
-			basicProps.put("fetch", fetchType.value());
+			basicProps.put("fetch", fetchType.value()); //$NON-NLS-1$
 
 		// annotationHelper.addFieldAnnotation(entityBean.getEjbClass(),
 		// fieldName, javax.persistence.Basic.class, basicProps);
@@ -141,7 +141,7 @@
 	}
 
 	private String convertFieldNameToGetterName(String fieldName) {
-		String methodName = "get" + capitaliseFirstLetter(fieldName);
+		String methodName = "get" + capitaliseFirstLetter(fieldName); //$NON-NLS-1$
 		return methodName;
 	}
 
@@ -155,7 +155,7 @@
 		}
 
 		String firstLetter = fieldName.substring(0, 1).toUpperCase();
-		String restOfWord = "";
+		String restOfWord = ""; //$NON-NLS-1$
 
 		if (fieldName.length() > 1) {
 			restOfWord = fieldName.substring(1);
@@ -167,25 +167,25 @@
 	private void addColumnAnnotation(EntityBean entityBean, String fieldName, Column column) {
 		Map<String, Object> columnProps = new HashMap<String, Object>();
 		if (column.getName() != null)
-			columnProps.put("name", column.getName());
+			columnProps.put("name", column.getName()); //$NON-NLS-1$
 		if (column.isUnique() != null)
-			columnProps.put("unique", column.isUnique().booleanValue());
+			columnProps.put("unique", column.isUnique().booleanValue()); //$NON-NLS-1$
 		if (column.isNullable() != null)
-			columnProps.put("nullable", column.isNullable().booleanValue());
+			columnProps.put("nullable", column.isNullable().booleanValue()); //$NON-NLS-1$
 		if (column.isInsertable() != null)
-			columnProps.put("insertable", column.isInsertable().booleanValue());
+			columnProps.put("insertable", column.isInsertable().booleanValue()); //$NON-NLS-1$
 		if (column.isUpdatable() != null)
-			columnProps.put("updatable", column.isUpdatable().booleanValue());
+			columnProps.put("updatable", column.isUpdatable().booleanValue()); //$NON-NLS-1$
 		if (column.getColumnDefinition() != null)
-			columnProps.put("columnDefinition", column.getColumnDefinition());
+			columnProps.put("columnDefinition", column.getColumnDefinition()); //$NON-NLS-1$
 		if (column.getTable() != null)
-			columnProps.put("table", column.getTable());
+			columnProps.put("table", column.getTable()); //$NON-NLS-1$
 		if (column.getLength() != null)
-			columnProps.put("length", column.getLength().intValue());
+			columnProps.put("length", column.getLength().intValue()); //$NON-NLS-1$
 		if (column.getPrecision() != null)
-			columnProps.put("precision", column.getPrecision().intValue());
+			columnProps.put("precision", column.getPrecision().intValue()); //$NON-NLS-1$
 		if (column.getScale() != null)
-			columnProps.put("scale", column.getScale().intValue());
+			columnProps.put("scale", column.getScale().intValue()); //$NON-NLS-1$
 
 		// annotationHelper.addFieldAnnotation(entityBean.getEjbClass(),
 		// fieldName, javax.persistence.Column.class, columnProps);
@@ -202,15 +202,15 @@
 
 		Map<String, Object> tableProperties = new HashMap<String, Object>();
 		if (tableName != null && tableName.length() > 0) {
-			tableProperties.put("name", tableName);
+			tableProperties.put("name", tableName); //$NON-NLS-1$
 		}
 
 		if (schemaName != null && schemaName.length() > 0) {
-			tableProperties.put("schema", schemaName);
+			tableProperties.put("schema", schemaName); //$NON-NLS-1$
 		}
 
 		if (catalogName != null && catalogName.length() > 0) {
-			tableProperties.put("catalog", catalogName);
+			tableProperties.put("catalog", catalogName); //$NON-NLS-1$
 		}
 
 		facade.addClassAnnotation(entityBean.getEjbClass(), Table.class, tableProperties);
@@ -245,7 +245,7 @@
 		return result;
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	public void convert(AppModule appModule) {
 		EntityMappings entityMappings = appModule.getCmpMappings();
 		List<EntityBean> entityBeans = getEntityBeans(appModule);
@@ -274,13 +274,13 @@
 		}
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	private void addOneToOneRelationshipAnnotations(EntityBean entityBean, org.apache.openejb.jee.jpa.Entity entity) {
 		List<OneToOne> relationships = entity.getAttributes().getOneToOne();
 		for (OneToOne relationship : relationships) {
 
 			String name = relationship.getName();
-			String nameGetter = "get" + name.substring(0, 1).toUpperCase() + name.substring(1);
+			String nameGetter = "get" + name.substring(0, 1).toUpperCase() + name.substring(1); //$NON-NLS-1$
 			
 			Map<String, Object> oneToOneProperties = getPropertiesForRelationship(relationship);
 
@@ -288,19 +288,19 @@
 		}
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	private void addManyToOneRelationshipAnnotations(EntityBean entityBean, org.apache.openejb.jee.jpa.Entity entity) {
 		List<ManyToOne> relationships = entity.getAttributes().getManyToOne();
 		for (ManyToOne relationship : relationships) {
 
 			String name = relationship.getName();
-			String nameGetter = "get" + name.substring(0, 1).toUpperCase() + name.substring(1);
+			String nameGetter = "get" + name.substring(0, 1).toUpperCase() + name.substring(1); //$NON-NLS-1$
 
 			Map manyToOneProperties = getPropertiesForRelationship(relationship);
 			
 			Boolean optional = relationship.isOptional();
 			if (optional != null) {
-				manyToOneProperties.put("optional", optional.booleanValue());
+				manyToOneProperties.put("optional", optional.booleanValue()); //$NON-NLS-1$
 			}
 			
 			
@@ -308,7 +308,7 @@
 		}
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	private Map<String,Object> getPropertiesForRelationship(RelationField relationship) {
 		String targetEntity = relationship.getTargetEntity();
 		FetchType fetch = relationship.getFetch();
@@ -317,7 +317,7 @@
 		
 		Map<String, Object> manyToOneProperties = new HashMap<String, Object>();
 		if (fetch != null) {
-			manyToOneProperties.put("fetch", fetch.value());
+			manyToOneProperties.put("fetch", fetch.value()); //$NON-NLS-1$
 		}
 
 		if (cascade != null) {
@@ -342,16 +342,16 @@
 				cascadeList.add(javax.persistence.CascadeType.REMOVE);
 			}
 
-			manyToOneProperties.put("cascade", cascadeList.toArray(new Object[0]));
+			manyToOneProperties.put("cascade", cascadeList.toArray(new Object[0])); //$NON-NLS-1$
 		}
 
 		if (targetEntity != null && targetEntity.length() > 0) {
-			manyToOneProperties.put("targetEntity", targetEntity);
+			manyToOneProperties.put("targetEntity", targetEntity); //$NON-NLS-1$
 		}
 		return manyToOneProperties;
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	private void addIdClassAnnotation(EntityBean entityBean, org.apache.openejb.jee.jpa.Entity entity) {
 		IdClass idClass = entity.getIdClass();
 		
@@ -362,12 +362,12 @@
 		String cls = idClass.getClazz();
 		
 		Map props = new HashMap();
-		props.put("value", cls);
+		props.put("value", cls); //$NON-NLS-1$
 		
 		facade.addClassAnnotation(entityBean.getEjbClass(), javax.persistence.IdClass.class, props);
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	private void addNamedNativeQueriesAnnotations(EntityBean entityBean, org.apache.openejb.jee.jpa.Entity entity) {
 		List<NamedNativeQuery> namedQueries = entity.getNamedNativeQuery();
 		List namedQueriesValues = new ArrayList();
@@ -385,22 +385,22 @@
 				String hintValue = hint.getValue();
 
 				Map hintProperty = new HashMap();
-				hintProperty.put("name", hintName);
-				hintProperty.put("value", hintValue);
+				hintProperty.put("name", hintName); //$NON-NLS-1$
+				hintProperty.put("value", hintValue); //$NON-NLS-1$
 				hintProperties.add(hintProperty);
 			}
 
 			Map namedQueryProperties = new HashMap();
-			namedQueryProperties.put("name", name);
-			namedQueryProperties.put("query", query);
-			namedQueryProperties.put("hints", hintProperties.toArray(new Object[0]));
+			namedQueryProperties.put("name", name); //$NON-NLS-1$
+			namedQueryProperties.put("query", query); //$NON-NLS-1$
+			namedQueryProperties.put("hints", hintProperties.toArray(new Object[0])); //$NON-NLS-1$
 
 			namedQueriesValues.add(namedQueryProperties);
 		}
 
 		if (namedQueriesValues.size() > 0) {
 			Map namedQueriesProperties = new HashMap();
-			namedQueriesProperties.put("value", namedQueriesValues.toArray(new Object[0]));
+			namedQueriesProperties.put("value", namedQueriesValues.toArray(new Object[0])); //$NON-NLS-1$
 	
 			facade.addClassAnnotation(entityBean.getEjbClass(), NamedNativeQueries.class, namedQueriesProperties);
 		}
@@ -417,7 +417,7 @@
 		}
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	private void addIdAnnotation(EntityBean entityBean, Id id) {
 		String fieldName = id.getName();
 		
@@ -429,21 +429,21 @@
 		GeneratedValue generatedValue = id.getGeneratedValue();
 		if (generatedValue != null) {
 			Map<String, Object> generatedValueProps = new HashMap<String, Object>();
-			generatedValueProps.put("generator", generatedValue.getGenerator());
+			generatedValueProps.put("generator", generatedValue.getGenerator()); //$NON-NLS-1$
 			
 			GenerationType strategy = generatedValue.getStrategy();
 			switch (strategy) {
 				case AUTO:
-					generatedValueProps.put("strategy", javax.persistence.GenerationType.AUTO);
+					generatedValueProps.put("strategy", javax.persistence.GenerationType.AUTO); //$NON-NLS-1$
 					break;
 				case IDENTITY:
-					generatedValueProps.put("strategy", javax.persistence.GenerationType.IDENTITY);
+					generatedValueProps.put("strategy", javax.persistence.GenerationType.IDENTITY); //$NON-NLS-1$
 					break;
 				case SEQUENCE:
-					generatedValueProps.put("strategy", javax.persistence.GenerationType.SEQUENCE);
+					generatedValueProps.put("strategy", javax.persistence.GenerationType.SEQUENCE); //$NON-NLS-1$
 					break;
 				case TABLE:
-					generatedValueProps.put("strategy", javax.persistence.GenerationType.TABLE);
+					generatedValueProps.put("strategy", javax.persistence.GenerationType.TABLE); //$NON-NLS-1$
 					break;
 			}
 			
@@ -453,10 +453,10 @@
 		SequenceGenerator sequenceGenerator = id.getSequenceGenerator();
 		if (sequenceGenerator != null) {
 			Map<String, Object> sequenceGeneratorProps = new HashMap<String, Object>();
-			sequenceGeneratorProps.put("name", sequenceGenerator.getName());
-			sequenceGeneratorProps.put("sequenceName", sequenceGenerator.getSequenceName());
-			sequenceGeneratorProps.put("initialValue", sequenceGenerator.getInitialValue().intValue());
-			sequenceGeneratorProps.put("allocationSize", sequenceGenerator.getAllocationSize().intValue());
+			sequenceGeneratorProps.put("name", sequenceGenerator.getName()); //$NON-NLS-1$
+			sequenceGeneratorProps.put("sequenceName", sequenceGenerator.getSequenceName()); //$NON-NLS-1$
+			sequenceGeneratorProps.put("initialValue", sequenceGenerator.getInitialValue().intValue()); //$NON-NLS-1$
+			sequenceGeneratorProps.put("allocationSize", sequenceGenerator.getAllocationSize().intValue()); //$NON-NLS-1$
 			
 			facade.addMethodAnnotation(entityBean.getEjbClass(), methodName, emptySignature, javax.persistence.SequenceGenerator.class, sequenceGeneratorProps);
 		}
@@ -464,15 +464,15 @@
 		TableGenerator tableGenerator = id.getTableGenerator();
 		if (tableGenerator != null) {
 			Map<String, Object> tableGeneratorProps = new HashMap<String, Object>();
-			tableGeneratorProps.put("name", tableGenerator.getName());
-			tableGeneratorProps.put("table", tableGenerator.getTable());
-			tableGeneratorProps.put("catalog", tableGenerator.getCatalog());
-			tableGeneratorProps.put("schema", tableGenerator.getSchema());
-			tableGeneratorProps.put("pkColumnName", tableGenerator.getPkColumnName());
-			tableGeneratorProps.put("valueColumnName", tableGenerator.getValueColumnName());
-			tableGeneratorProps.put("pkColumnValue", tableGenerator.getPkColumnValue());
-			tableGeneratorProps.put("initialValue", tableGenerator.getInitialValue().intValue());
-			tableGeneratorProps.put("allocationSize", tableGenerator.getAllocationSize().intValue());
+			tableGeneratorProps.put("name", tableGenerator.getName()); //$NON-NLS-1$
+			tableGeneratorProps.put("table", tableGenerator.getTable()); //$NON-NLS-1$
+			tableGeneratorProps.put("catalog", tableGenerator.getCatalog()); //$NON-NLS-1$
+			tableGeneratorProps.put("schema", tableGenerator.getSchema()); //$NON-NLS-1$
+			tableGeneratorProps.put("pkColumnName", tableGenerator.getPkColumnName()); //$NON-NLS-1$
+			tableGeneratorProps.put("valueColumnName", tableGenerator.getValueColumnName()); //$NON-NLS-1$
+			tableGeneratorProps.put("pkColumnValue", tableGenerator.getPkColumnValue()); //$NON-NLS-1$
+			tableGeneratorProps.put("initialValue", tableGenerator.getInitialValue().intValue()); //$NON-NLS-1$
+			tableGeneratorProps.put("allocationSize", tableGenerator.getAllocationSize().intValue()); //$NON-NLS-1$
 
 			List uniqueConstraintPropsList = new ArrayList();
 			
@@ -480,11 +480,11 @@
 			for (UniqueConstraint uniqueConstriant : uniqueConstraints) {
 				Map<String, Object> uniqueConstraintProps = new HashMap<String, Object>();
 				List<String> columns = uniqueConstriant.getColumnName();
-				uniqueConstraintProps.put("columnNames", columns.toArray(new String[0]));
+				uniqueConstraintProps.put("columnNames", columns.toArray(new String[0])); //$NON-NLS-1$
 				uniqueConstraintPropsList.add(uniqueConstraintProps);
 			}
 			
-			tableGeneratorProps.put("uniqueConstraints", uniqueConstraintPropsList.toArray(new Object[0]));
+			tableGeneratorProps.put("uniqueConstraints", uniqueConstraintPropsList.toArray(new Object[0])); //$NON-NLS-1$
 			facade.addMethodAnnotation(entityBean.getEjbClass(), methodName, emptySignature, javax.persistence.TableGenerator.class, tableGeneratorProps);
 		}
 	}
@@ -493,7 +493,7 @@
 		String ejbClass = entityBean.getEjbClass();
 		String ejbSuperClass = facade.getSuperClass(ejbClass);
 		if (ejbSuperClass != null && ejbSuperClass.length() > 0) {
-			if (facade.classImplements(ejbSuperClass, "javax.ejb.EntityBean")) {
+			if (facade.classImplements(ejbSuperClass, "javax.ejb.EntityBean")) { //$NON-NLS-1$
 				entityBean.setEjbClass(ejbSuperClass);
 			}
 		}

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/EntityBeanPojoConverter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/EntityBeanPojoConverter.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/EntityBeanPojoConverter.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/EntityBeanPojoConverter.java Mon Mar 24 18:40:47 2008
@@ -118,15 +118,15 @@
 		String fieldType = facade.getMethodReturnType(cls, getterMethodName, emptySignature);
 		facade.addField(cls, fieldName, fieldType);
 		
-		String getterMethodBody = "return " + fieldName + ";";
-		String setterMethodBody = "this." + fieldName + " = ${0};";
+		String getterMethodBody = "return " + fieldName + ";"; //$NON-NLS-1$ //$NON-NLS-2$
+		String setterMethodBody = "this." + fieldName + " = ${0};"; //$NON-NLS-1$ //$NON-NLS-2$
 		
 		facade.removeAbstractModifierFromMethod(cls, getterMethodName, emptySignature, getterMethodBody);
 		facade.removeAbstractModifierFromMethod(cls, setterMethodName, new String[] { fieldType }, setterMethodBody);
 	}
 
 	private String convertFieldNameToGetterName(String fieldName) {
-		String methodName = "get" + capitaliseFirstLetter(fieldName);
+		String methodName = "get" + capitaliseFirstLetter(fieldName); //$NON-NLS-1$
 		return methodName;
 	}
 
@@ -140,7 +140,7 @@
 		}
 
 		String firstLetter = fieldName.substring(0, 1).toUpperCase();
-		String restOfWord = "";
+		String restOfWord = ""; //$NON-NLS-1$
 
 		if (fieldName.length() > 1) {
 			restOfWord = fieldName.substring(1);
@@ -150,7 +150,7 @@
 	}
 
 	private String convertFieldNameToSetterName(String fieldName) {
-		String methodName = "set" + capitaliseFirstLetter(fieldName);
+		String methodName = "set" + capitaliseFirstLetter(fieldName); //$NON-NLS-1$
 		return methodName;
 	}
 }

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/JDTFacade.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/JDTFacade.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/JDTFacade.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/JDTFacade.java Mon Mar 24 18:40:47 2008
@@ -83,7 +83,7 @@
  * Add annotations to source files in an Eclipse Java project
  * 
  */
-@SuppressWarnings("unchecked")
+@SuppressWarnings("unchecked") //$NON-NLS-1$
 public class JDTFacade implements IJDTFacade {
 
 	private class BasicSearchRequestor extends SearchRequestor {
@@ -163,7 +163,7 @@
 	}
 
 	private Name createQualifiedName(AST ast, String classToImport) {
-		String[] parts = classToImport.split("\\.");
+		String[] parts = classToImport.split("\\."); //$NON-NLS-1$
 
 		Name name = null;
 
@@ -179,7 +179,7 @@
 	}
 
 	private Type createQualifiedType(AST ast, String targetClass) {
-		String[] parts = targetClass.split("\\.");
+		String[] parts = targetClass.split("\\."); //$NON-NLS-1$
 
 		Type type = null;
 
@@ -207,7 +207,7 @@
 	 */
 	private boolean isClassImported(String importedClass, CompilationUnit compilationUnit) {
 		Iterator<ImportDeclaration> iterator = compilationUnit.imports().iterator();
-		String packageName = importedClass.substring(0, importedClass.lastIndexOf("."));
+		String packageName = importedClass.substring(0, importedClass.lastIndexOf(".")); //$NON-NLS-1$
 
 		while (iterator.hasNext()) {
 			ImportDeclaration importDeclaration = iterator.next();
@@ -260,14 +260,14 @@
 			BodyDeclaration typeDeclaration = getTypeDeclaration(cu, targetClass);
 
 			if (isAnnotationAlreadyUsedOnDeclaration(annotation, typeDeclaration)) {
-				warnings.add("Annotation " + annotation.getCanonicalName() + " already used on " + targetClass);
+				warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.1"), annotation.getCanonicalName(), targetClass)); //$NON-NLS-1$
 				return;
 			}
 
 			Annotation modifier = createModifier(cu.getAST(), annotation, properties, cu);
 			typeDeclaration.modifiers().add(0, modifier);
 		} catch (Exception e) {
-			warnings.add("An error occurred adding annotation " + annotation.getCanonicalName() + " to class " + targetClass);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.2"), annotation.getCanonicalName(), targetClass)); //$NON-NLS-1$
 		}
 	}
 
@@ -441,7 +441,7 @@
 
 			addImportToCompilationUnit(annotationClass.getCanonicalName(), cu);
 		} catch (CoreException e) {
-			warnings.add("An error occurred adding annotation " + annotationClass.getCanonicalName() + " to method " + methodName + " on " + fullyQualifiedClassName);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.3"), annotationClass.getCanonicalName(), methodName, fullyQualifiedClassName)); //$NON-NLS-1$
 		}
 	}
 
@@ -504,12 +504,12 @@
 			}
 
 		} catch (CoreException e) {
-			warnings.add("An error occurred adding annotation " + annotation.getCanonicalName() + " to field " + targetField + " on " + targetClass);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.4"), annotation.getCanonicalName(), targetField, targetClass)); //$NON-NLS-1$
 		}
 	}
 
 	public Change getChange() {
-		CompositeChange compositeChange = new CompositeChange("Add EJB 3.0 Annotations");
+		CompositeChange compositeChange = new CompositeChange(Messages.getString("org.apache.openejb.helper.annotation.compositChangeString")); //$NON-NLS-1$
 
 		Iterator<CompilationUnit> iterator = cuMap.values().iterator();
 		while (iterator.hasNext()) {
@@ -524,7 +524,7 @@
 
 				TextEdit edit = cu.rewrite(document, javaProject.getOptions(true));
 				TextFileChange dc = new TextFileChange(path.toString(), (IFile) cu.getJavaElement().getResource());
-				dc.setTextType("java");
+				dc.setTextType("java"); //$NON-NLS-1$
 				dc.setEdit(edit);
 				dc.setSaveMode(TextFileChange.FORCE_SAVE);
 
@@ -540,7 +540,7 @@
 		return warnings.toArray(new String[0]);
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	public void removeInterface(String targetClass, String interfaceToRemove) {
 		try {
 			CompilationUnit cu = getCompilationUnit(targetClass);
@@ -560,7 +560,7 @@
 
 			}
 		} catch (CoreException e) {
-			warnings.add("An error occurred removing " + interfaceToRemove + " from " + targetClass);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.5"), interfaceToRemove, targetClass)); //$NON-NLS-1$
 		}
 	}
 
@@ -575,7 +575,7 @@
 			BodyDeclaration typeDeclaration = getTypeDeclaration(cu, targetClass);
 			removeAbstractModifier(typeDeclaration.modifiers());
 		} catch (Exception e) {
-			warnings.add("An error occurred removing abstract from " + targetClass);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.6"), targetClass)); //$NON-NLS-1$
 		}
 	}
 
@@ -603,7 +603,7 @@
 			List parameters = methodDeclaration.parameters();
 			for (int i = 0; i < parameters.size(); i++) {
 				SingleVariableDeclaration parameter = (SingleVariableDeclaration) parameters.get(i);
-				code = code.replaceAll("\\$\\{" + Integer.toString(i) + "\\}", parameter.resolveBinding().getName());
+				code = code.replaceAll("\\$\\{" + Integer.toString(i) + "\\}", parameter.resolveBinding().getName()); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 			
 			Block block = parseBlock(code);
@@ -611,7 +611,7 @@
 
 			methodDeclaration.setBody((Block) block);
 		} catch (CoreException e) {
-			warnings.add("Unable to remove abstract modifier from: " + targetClass + "." + methodName);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.7"), targetClass, methodName)); //$NON-NLS-1$
 		}
 	}
 
@@ -634,7 +634,7 @@
 
 			}
 		} catch (CoreException e) {
-			warnings.add("An error occurred determining interfaces of " + targetClass);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.8"), targetClass)); //$NON-NLS-1$
 		}
 
 		return false;
@@ -645,10 +645,10 @@
 			TypeDeclaration type = getTypeDeclaration(getCompilationUnit(targetClass), targetClass);
 			return type.getSuperclassType().resolveBinding().getQualifiedName();
 		} catch (CoreException e) {
-			warnings.add("Error occurred getting superclass of " + targetClass);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.9"), targetClass)); //$NON-NLS-1$
 		}
 
-		return "";
+		return ""; //$NON-NLS-1$
 	}
 
 	public String getMethodReturnType(String targetClass, String methodName, String[] signature) {
@@ -659,7 +659,7 @@
 
 			return methodDeclaration.resolveBinding().getReturnType().getQualifiedName();
 		} catch (CoreException e) {
-			warnings.add("Error getting return type of " + targetClass + "." + methodName);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.10"), targetClass, methodName)); //$NON-NLS-1$
 		}
 
 		return null;
@@ -680,7 +680,7 @@
 			fieldDeclaration.modifiers().add(privateModifier);
 			typeDeclaration.bodyDeclarations().add(fieldDeclaration);
 		} catch (CoreException e) {
-			warnings.add("Error adding field " + fieldName + " on " + targetClass);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.11"), fieldName, targetClass)); //$NON-NLS-1$
 		}
 
 	}
@@ -735,7 +735,7 @@
 			
 			typeDeclaration.superInterfaceTypes().add(interfaceType);
 		} catch (CoreException e) {
-			warnings.add("An error occurred adding " + interfaceClass + " to " + targetClass);
+			warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.12"), interfaceClass, targetClass)); //$NON-NLS-1$
 		}
 	}
 

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/Messages.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/Messages.java?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/Messages.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/Messages.java Mon Mar 24 18:40:47 2008
@@ -0,0 +1,22 @@
+package org.apache.openejb.helper.annotation;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+	private static final String BUNDLE_NAME = "org.apache.openejb.helper.annotation.messages"; //$NON-NLS-1$
+
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	private Messages() {
+	}
+
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/OpenEjbXmlConverter.java Mon Mar 24 18:40:47 2008
@@ -46,11 +46,11 @@
  */
 public class OpenEjbXmlConverter {
 
-	public static final String CLS_TRANSACTION_ATTRIBUTE = "javax.ejb.TransactionAttribute";
-	public static final String CLS_APPLICATION_EXCEPTION = "javax.ejb.ApplicationException";
-	public static final String CLS_STATEFUL = "javax.ejb.Stateful";
-	public static final String CLS_STATELESS = "javax.ejb.Stateless";
-	public static final String CLS_MESSAGE_DRIVEN = "javax.ejb.MessageDriven";
+	public static final String CLS_TRANSACTION_ATTRIBUTE = "javax.ejb.TransactionAttribute"; //$NON-NLS-1$
+	public static final String CLS_APPLICATION_EXCEPTION = "javax.ejb.ApplicationException"; //$NON-NLS-1$
+	public static final String CLS_STATEFUL = "javax.ejb.Stateful"; //$NON-NLS-1$
+	public static final String CLS_STATELESS = "javax.ejb.Stateless"; //$NON-NLS-1$
+	public static final String CLS_MESSAGE_DRIVEN = "javax.ejb.MessageDriven"; //$NON-NLS-1$
 	public static final String STATELESS_CLASS = CLS_STATELESS;
 	private Converter[] converters;
 	
@@ -78,7 +78,7 @@
 	 * @return Whether or not the parsing was successful
 	 * @throws ConversionException 
 	 */
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	public boolean convert(InputSource ejbJarSrc, InputSource openEjbJarSrc) throws ConversionException {
 		AppModule appModule = getAppModule(ejbJarSrc, openEjbJarSrc);
 		
@@ -90,7 +90,7 @@
 	}
 
 	private AppModule getAppModule(InputSource ejbJarSrc, InputSource openEjbJarSrc) throws ConversionException {
-		AppModule appModule = new AppModule(getClass().getClassLoader(), "ModuleToConvert");
+		AppModule appModule = new AppModule(getClass().getClassLoader(), "ModuleToConvert"); //$NON-NLS-1$
 		
 		try {	
 			EjbJar ejbJar = (EjbJar) JaxbJavaee.unmarshal(EjbJar.class, ejbJarSrc.getByteStream());
@@ -103,7 +103,7 @@
 
 		        JAXBElement<?> element = (JAXBElement<?>) JaxbOpenejbJar2.unmarshal(OpenejbJarType.class, openEjbJarSrc.getByteStream());
 		        OpenejbJarType openejbJarType = (OpenejbJarType) element.getValue();
-		        ejbModule.getAltDDs().put("openejb-jar.xml", openejbJarType);
+		        ejbModule.getAltDDs().put("openejb-jar.xml", openejbJarType); //$NON-NLS-1$
 
 		        CmpJpaConversion cmpJpaConversion = new CmpJpaConversion();
 		        cmpJpaConversion.deploy(appModule);
@@ -114,13 +114,13 @@
 			
 			return appModule;
 		} catch (JAXBException e) {
-			throw new ConversionException("Unable to unmarshal XML", e);
+			throw new ConversionException(Messages.getString("org.apache.openejb.helper.annotation.conversionExceptionMsg.1"), e); //$NON-NLS-1$
 		} catch (ParserConfigurationException e) {
-			throw new ConversionException("Unable to unmarshal XML (parser configuration error)", e);
+			throw new ConversionException(Messages.getString("org.apache.openejb.helper.annotation.conversionExceptionMsg.2"), e); //$NON-NLS-1$
 		} catch (SAXException e) {
-			throw new ConversionException("Unable to unmarshal XML (SAX error - XML badly formed?)", e);
+			throw new ConversionException(Messages.getString("org.apache.openejb.helper.annotation.conversionExceptionMsg.3"), e); //$NON-NLS-1$
 		} catch (OpenEJBException e) {
-			throw new ConversionException("Unable to convert openejb-jar.xml to orm.xml");
+			throw new ConversionException(Messages.getString("org.apache.openejb.helper.annotation.conversionExceptionMsg.4")); //$NON-NLS-1$
 		}
 	}
 }

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanConverter.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanConverter.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanConverter.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanConverter.java Mon Mar 24 18:40:47 2008
@@ -65,11 +65,11 @@
 
 public class SessionBeanConverter implements Converter {
 
-	public static final String CLS_TRANSACTION_ATTRIBUTE = "javax.ejb.TransactionAttribute";
-	public static final String CLS_APPLICATION_EXCEPTION = "javax.ejb.ApplicationException";
-	public static final String CLS_STATEFUL = "javax.ejb.Stateful";
-	public static final String CLS_STATELESS = "javax.ejb.Stateless";
-	public static final String CLS_MESSAGE_DRIVEN = "javax.ejb.MessageDriven";
+	public static final String CLS_TRANSACTION_ATTRIBUTE = "javax.ejb.TransactionAttribute"; //$NON-NLS-1$
+	public static final String CLS_APPLICATION_EXCEPTION = "javax.ejb.ApplicationException"; //$NON-NLS-1$
+	public static final String CLS_STATEFUL = "javax.ejb.Stateful"; //$NON-NLS-1$
+	public static final String CLS_STATELESS = "javax.ejb.Stateless"; //$NON-NLS-1$
+	public static final String CLS_MESSAGE_DRIVEN = "javax.ejb.MessageDriven"; //$NON-NLS-1$
 	public static final String STATELESS_CLASS = CLS_STATELESS;
 	protected IJDTFacade annotationHelper;
 	
@@ -136,25 +136,25 @@
 		
 		if (transactionType != null && (! TransactionType.CONTAINER.equals(transactionType))) {
 			Map<String,Object> props = new HashMap<String, Object>();
-			props.put("value", TransactionManagementType.BEAN);
+			props.put("value", TransactionManagementType.BEAN); //$NON-NLS-1$
 			
 			annotationHelper.addClassAnnotation(bean.getEjbClass(), TransactionManagement.class, props);
 		}
 		
 		Map<String, List<MethodTransaction>> methodTransactions = descriptor.getMethodTransactions(bean.getEjbName());
-		if (methodTransactions.containsKey("*")) {
-			List<MethodTransaction> defaultTransactions = methodTransactions.get("*");
+		if (methodTransactions.containsKey("*")) { //$NON-NLS-1$
+			List<MethodTransaction> defaultTransactions = methodTransactions.get("*"); //$NON-NLS-1$
 			MethodTransaction defaultTransaction = defaultTransactions.get(0);
 			
 			Map<String, Object> props = new HashMap<String, Object>();
-			props.put("value", TransactionAttributeType.valueOf(defaultTransaction.getAttribute().name()));
+			props.put("value", TransactionAttributeType.valueOf(defaultTransaction.getAttribute().name())); //$NON-NLS-1$
 			annotationHelper.addClassAnnotation(bean.getEjbClass(), TransactionAttribute.class, props);
 		}
 		
 		Iterator<String> iterator = methodTransactions.keySet().iterator();
 		while (iterator.hasNext()) {
 			String methodName = (String) iterator.next();
-			if ("*".equals(methodName)) {
+			if ("*".equals(methodName)) { //$NON-NLS-1$
 				continue;
 			}
 			
@@ -162,7 +162,7 @@
 			MethodTransaction methodTransaction = transactions.get(0);
 			
 			Map<String, Object> props = new HashMap<String, Object>();
-			props.put("value", TransactionAttributeType.valueOf(methodTransaction.getAttribute().name()));
+			props.put("value", TransactionAttributeType.valueOf(methodTransaction.getAttribute().name())); //$NON-NLS-1$
 			
 			MethodParams methodParams = methodTransaction.getMethod().getMethodParams();
 			String[] params = methodParams.getMethodParam().toArray(new String[0]);
@@ -181,33 +181,33 @@
 
 			for (ActivationConfigProperty activationConfigProperty : activationConfigProperties) {
 				HashMap<String, Object> configProps = new HashMap<String, Object>();
-				configProps.put("propertyName", activationConfigProperty.getActivationConfigPropertyName());
-				configProps.put("propertyValue", activationConfigProperty.getActivationConfigPropertyValue());
+				configProps.put("propertyName", activationConfigProperty.getActivationConfigPropertyName()); //$NON-NLS-1$
+				configProps.put("propertyValue", activationConfigProperty.getActivationConfigPropertyValue()); //$NON-NLS-1$
 				
 				activationConfigPropertiesList.add(configProps);
 			}
 			
 			if (bean.getMessageDestinationLink() != null && bean.getMessageDestinationLink().length() > 0) {
-				if (! hasConfigProperty(activationConfigPropertiesList, "destination")) {
+				if (! hasConfigProperty(activationConfigPropertiesList, "destination")) { //$NON-NLS-1$
 					HashMap<String, Object> configProps = new HashMap<String, Object>();
-					configProps.put("propertyName", "destination");
-					configProps.put("propertyValue", bean.getMessageDestinationLink());
+					configProps.put("propertyName", "destination"); //$NON-NLS-1$ //$NON-NLS-2$
+					configProps.put("propertyValue", bean.getMessageDestinationLink()); //$NON-NLS-1$
 					
 					activationConfigPropertiesList.add(configProps);
 				}
 			}
 
-			props.put("activationConfig", activationConfigPropertiesList.toArray(new HashMap[0]));
+			props.put("activationConfig", activationConfigPropertiesList.toArray(new HashMap[0])); //$NON-NLS-1$
 		}
 		
-		props.put("name", bean.getEjbName());
+		props.put("name", bean.getEjbName()); //$NON-NLS-1$
 		annotationHelper.addClassAnnotation(bean.getEjbClass(), MessageDriven.class, props);
 	}
 
 
 	private boolean hasConfigProperty(List<Map<String, Object>> activationConfigPropertiesList, String propertyName) {
 		for (Map<String,Object> configProperty : activationConfigPropertiesList) {
-			if (configProperty.get("propertyName") != null && configProperty.get("propertyName").toString().equals(propertyName)) {
+			if (configProperty.get("propertyName") != null && configProperty.get("propertyName").toString().equals(propertyName)) { //$NON-NLS-1$ //$NON-NLS-2$
 				return true;
 			}
 		}
@@ -240,7 +240,7 @@
 			
 			String[] roleList = roles.toArray(new String[0]);
 			Map<String, Object> roleProps = new HashMap<String, Object>();
-			roleProps.put("value", roleList);
+			roleProps.put("value", roleList); //$NON-NLS-1$
 
 			
 			List<Method> methods = methodPermission.getMethod();
@@ -253,19 +253,19 @@
 				MethodParams methodParams = method.getMethodParams();
 				String[] params = methodParams.getMethodParam().toArray(new String[0]);
 				
-				if ((! "*".equals(method.getMethodName())) &&  descriptor.getExcludeList().getMethod().contains(method)) {
+				if ((! "*".equals(method.getMethodName())) &&  descriptor.getExcludeList().getMethod().contains(method)) { //$NON-NLS-1$
 					annotationHelper.addMethodAnnotation(enterpriseBean.getEjbClass(), method.getMethodName(), params, DenyAll.class, null);
 					continue;
 				}
 				
 				if (methodPermission.getUnchecked()) {
-					if ("*".equals(method.getMethodName())) {
+					if ("*".equals(method.getMethodName())) { //$NON-NLS-1$
 						annotationHelper.addClassAnnotation(enterpriseBean.getEjbClass(), PermitAll.class, null);
 					} else {
 						annotationHelper.addMethodAnnotation(enterpriseBean.getEjbClass(), method.getMethodName(), params, PermitAll.class, null);
 					}
 				} else {
-					if ("*".equals(method.getMethodName())) {
+					if ("*".equals(method.getMethodName())) { //$NON-NLS-1$
 						annotationHelper.addClassAnnotation(enterpriseBean.getEjbClass(), RolesAllowed.class, roleProps);
 					} else {
 						annotationHelper.addMethodAnnotation(enterpriseBean.getEjbClass(), method.getMethodName(), params, RolesAllowed.class, roleProps);
@@ -281,7 +281,7 @@
 		}
 		
 		Map<String, Object> runAsProps = new HashMap<String, Object>();
-		runAsProps.put("value", bean.getSecurityIdentity().getRunAs());
+		runAsProps.put("value", bean.getSecurityIdentity().getRunAs()); //$NON-NLS-1$
 		
 		annotationHelper.addClassAnnotation(bean.getEjbClass(), RunAs.class, runAsProps);
 	}
@@ -305,7 +305,7 @@
 			roleList.add(securityRoleRef.getRoleName());
 		}
 		
-		props.put("value", roleList.toArray(new String[0]));
+		props.put("value", roleList.toArray(new String[0])); //$NON-NLS-1$
 		annotationHelper.addClassAnnotation(bean.getEjbClass(), DeclareRoles.class, props);
 	}
 
@@ -320,7 +320,7 @@
 			String[] classes = interceptorClasses.toArray(new String[0]);
 			
 			Map<String, Object> properties = new HashMap<String, Object>();
-			properties.put("value", classes);
+			properties.put("value", classes); //$NON-NLS-1$
 			
 			if (interceptorBinding.getMethod() == null) {
 				if (interceptorBinding.getExcludeDefaultInterceptors()) {

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanInterfaceModifier.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanInterfaceModifier.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanInterfaceModifier.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanInterfaceModifier.java Mon Mar 24 18:40:47 2008
@@ -49,18 +49,18 @@
 				SessionBean sessionBean = (SessionBean) enterpriseBean;
 				String ejbClass = sessionBean.getEjbClass();
 
-				facade.removeInterface(ejbClass, "javax.ejb.SessionBean");
+				facade.removeInterface(ejbClass, "javax.ejb.SessionBean"); //$NON-NLS-1$
 
 				String remoteInterface = sessionBean.getRemote();
 				if (remoteInterface != null && remoteInterface.length() > 0) {
 					facade.addInterface(ejbClass, remoteInterface);
-					facade.removeInterface(remoteInterface, "javax.ejb.EJBObject");
+					facade.removeInterface(remoteInterface, "javax.ejb.EJBObject"); //$NON-NLS-1$
 				}
 
 				String localInterface = sessionBean.getLocal();
 				if (localInterface != null && localInterface.length() > 0) {
 					facade.addInterface(ejbClass, localInterface);
-					facade.removeInterface(localInterface, "javax.ejb.EJBLocalObject");
+					facade.removeInterface(localInterface, "javax.ejb.EJBLocalObject"); //$NON-NLS-1$
 				}
 			}
 		}

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanRemoteAnnotationAdder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanRemoteAnnotationAdder.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanRemoteAnnotationAdder.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/SessionBeanRemoteAnnotationAdder.java Mon Mar 24 18:40:47 2008
@@ -68,7 +68,7 @@
 			
 			if (sessionBean.getHome() != null && sessionBean.getHome().length() > 0) {
 				Map<String, Object> props = new HashMap<String, Object>();
-				props.put("value", sessionBean.getHome());
+				props.put("value", sessionBean.getHome()); //$NON-NLS-1$
 				
 				facade.addClassAnnotation(ejbClass, RemoteHome.class, props);
 			}

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/GenerateAnnotationsAction.java Mon Mar 24 18:40:47 2008
@@ -69,7 +69,7 @@
 		
 		RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(new EJBMigrationWizard(refactoring, RefactoringWizard.WIZARD_BASED_USER_INTERFACE));
 		try {
-			op.run(Activator.getWorkbenchWindow().getShell(), "Dialog");
+			op.run(Activator.getWorkbenchWindow().getShell(), Messages.getString("org.apache.openejb.helper.annotation.refactoringWizardDialogTitle")); //$NON-NLS-1$
 		} catch (InterruptedException e) {
 			e.printStackTrace();
 		}

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/Messages.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/Messages.java?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/Messages.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/Messages.java Mon Mar 24 18:40:47 2008
@@ -0,0 +1,22 @@
+package org.apache.openejb.helper.annotation.actions;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+	private static final String BUNDLE_NAME = "org.apache.openejb.helper.annotation.actions.messages"; //$NON-NLS-1$
+
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	private Messages() {
+	}
+
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/messages.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/messages.properties?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/messages.properties (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/messages.properties Mon Mar 24 18:40:47 2008
@@ -0,0 +1 @@
+org.apache.openejb.helper.annotation.refactoringWizardDialogTitle=Dialog

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/messages_de.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/messages_de.properties?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/messages_de.properties (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/actions/messages_de.properties Mon Mar 24 18:40:47 2008
@@ -0,0 +1 @@
+org.apache.openejb.helper.annotation.refactoringWizardDialogTitle=Dialog

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/messages.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/messages.properties?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/messages.properties (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/messages.properties Mon Mar 24 18:40:47 2008
@@ -0,0 +1,17 @@
+org.apache.openejb.helper.annotation.conversionExceptionMsg.1=Unable to unmarshal XML
+org.apache.openejb.helper.annotation.conversionExceptionMsg.2=Unable to unmarshal XML (parser configuration error)
+org.apache.openejb.helper.annotation.conversionExceptionMsg.3=Unable to unmarshal XML (SAX error - XML badly formed?)
+org.apache.openejb.helper.annotation.conversionExceptionMsg.4=Unable to convert openejb-jar.xml to orm.xml
+org.apache.openejb.helper.annotation.warnings.1=Annotation %1$s already used on %2$s
+org.apache.openejb.helper.annotation.warnings.2=An error occurred adding annotation %1$s to class %2$s
+org.apache.openejb.helper.annotation.warnings.3=An error occurred adding annotation %1$s to method %2$s on %3$s
+org.apache.openejb.helper.annotation.warnings.4=An error occurred adding annotation %1$s to field %2$s on %3$s
+org.apache.openejb.helper.annotation.compositChangeString=Add EJB 3.0 Annotations
+org.apache.openejb.helper.annotation.warnings.5=An error occurred removing %1$s from %2$s
+org.apache.openejb.helper.annotation.warnings.6=An error occurred removing abstract from %1$s
+org.apache.openejb.helper.annotation.warnings.7=Unable to remove abstract modifier from: %1$s.%2$s
+org.apache.openejb.helper.annotation.warnings.8=An error occurred determining interfaces of %1$s
+org.apache.openejb.helper.annotation.warnings.9=Error occurred getting superclass of %1$s
+org.apache.openejb.helper.annotation.warnings.10=Error getting return type of %1$s.%2$s
+org.apache.openejb.helper.annotation.warnings.11=Error adding field %1$s on %2$s
+org.apache.openejb.helper.annotation.warnings.12=An error occurred adding %1$s to %2$s

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/messages_de.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/messages_de.properties?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/messages_de.properties (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/messages_de.properties Mon Mar 24 18:40:47 2008
@@ -0,0 +1,17 @@
+org.apache.openejb.helper.annotation.conversionExceptionMsg.1=Fehler beim Erstellen des XML Dokuments
+org.apache.openejb.helper.annotation.conversionExceptionMsg.2=Fehler beim Erstellen des XML Dokuments (parser configuration error)
+org.apache.openejb.helper.annotation.conversionExceptionMsg.3=Fehler beim Erstellen des XML Dokuments (SAX error - XML Dokument ist wom\u00f6glich nicht wohlgeformt?)
+org.apache.openejb.helper.annotation.conversionExceptionMsg.4=openejb-jar.xml konnte nicht nach orm.xml konvertiert werden
+org.apache.openejb.helper.annotation.warnings.1=Annotation %1$s existiert bereits f\u00fcr %2$s
+org.apache.openejb.helper.annotation.warnings.2=Beim Erstellen der Annotation %1$s f\u00fcr die Klasse %2$s trat ein Fehler auf
+org.apache.openejb.helper.annotation.warnings.3=Beim Erstellen der Annotation %1$s f\u00fcr die Methode %2$s der Klasse %3$s trat ein Fehler auf
+org.apache.openejb.helper.annotation.warnings.4=Beim Erstellen der Annotation %1$s f\u00fcr das Feld %2$s der Klasse %3$s trat ein Fehler auf
+org.apache.openejb.helper.annotation.compositChangeString=EJB 3.0 Annotations hinzuf\u00fcgen
+org.apache.openejb.helper.annotation.warnings.5=Beim Entfernen der Annotation %1$s f\u00fcr die Klasse %2$s trat ein Fehler auf
+org.apache.openejb.helper.annotation.warnings.6=Beim entfernen des Schl\u00fcsselworts abstract f\u00fcr die Klasse %1$s trat ein Fehler auf
+org.apache.openejb.helper.annotation.warnings.7=Der abstract Modifikator konnte von %1$s.%2$s nicht entfernt werden
+org.apache.openejb.helper.annotation.warnings.8=Die Schnittstellen von %1$s konnten nicht ermittelt werden
+org.apache.openejb.helper.annotation.warnings.9=Die Basisklasse von %1$s konnte nicht ermittelt werden
+org.apache.openejb.helper.annotation.warnings.10=Der r\u00fcckgabewert von %1$s.%2$s konnte nicht ermittelt werden
+org.apache.openejb.helper.annotation.warnings.11=Das Feld %1$s konnte nicht zur Klasse %2$s hinzugef\u00fcgt werden
+org.apache.openejb.helper.annotation.warnings.12=Die Schnittstellenklasse %1$s konnte der Klasse %2$s nicht hinzugef\u00fcgt werden

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBJarSelectionPage.java Mon Mar 24 18:40:47 2008
@@ -35,6 +35,7 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
 import org.eclipse.ui.dialogs.ISelectionStatusValidator;
 import org.eclipse.ui.model.WorkbenchContentProvider;
@@ -42,8 +43,8 @@
 
 public class EJBJarSelectionPage extends UserInputWizardPage {
 
-	private static final Status SELECTION_NOT_OK_STATUS = new Status(4, "org.apache.openejb.helper.annotation", 4, "", null);
-	private static final Status SELECTION_OK_STATUS = new Status(0, "org.eclipse.core.runtime", 0, "", null);
+	private static final Status SELECTION_NOT_OK_STATUS = new Status(4, "org.apache.openejb.helper.annotation", 4, "", null); //$NON-NLS-1$ //$NON-NLS-2$
+	private static final Status SELECTION_OK_STATUS = new Status(0, "org.eclipse.core.runtime", 0, "", null); //$NON-NLS-1$ //$NON-NLS-2$
 
 	private final EJBMigrationRefactoring refactoring;
 	private Text ejbJarXmlText;
@@ -52,10 +53,16 @@
 	private Button remoteAndRemoteHomeAnnotations;
 	private Button convertEntityBeansToPojos;
 	
+	@Override
+	public void performHelp() {
+		PlatformUI.getWorkbench().getHelpSystem().displayHelp(
+				"org.apache.openejb.help.test_id");
+	}
+	
 	public EJBJarSelectionPage(EJBMigrationRefactoring refactoring) {
-		super("wizardPage");
-		setTitle("EJB 3.0 Annotation Wizard");
-		setDescription("This wizard analyzes ejb-jar.xml and openejb-jar.xml and adds EJB 3.0 annotations to your source");
+		super(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageName")); //$NON-NLS-1$
+		setTitle(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageTitle")); //$NON-NLS-1$
+		setDescription(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageDescription")); //$NON-NLS-1$
 		this.refactoring = refactoring;
 	}
 
@@ -69,7 +76,7 @@
 		container.setLayout(gridLayout);
 		
 		Label ejbJarXmlLabel = new Label(container, SWT.NONE);
-		ejbJarXmlLabel.setText("ejb-jar.xml location");
+		ejbJarXmlLabel.setText(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.label.ejbJarXmlLocation")); //$NON-NLS-1$
 
 		ejbJarXmlText = new Text(container, SWT.BORDER);
 		ejbJarXmlText.setText(refactoring.getEjbJarXmlFile());
@@ -81,10 +88,10 @@
 		});
 		
 		Button browseEjbJarButton = new Button(container, SWT.NONE);
-		browseEjbJarButton.setText("Browse");
+		browseEjbJarButton.setText(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.browseEjbJar")); //$NON-NLS-1$
 		browseEjbJarButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
 			public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
-				String filename = handleBrowse("Select ejb-jar.xml file");
+				String filename = handleBrowse(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.selectionListener.filename.1")); //$NON-NLS-1$
 				if (filename != null && filename.length() > 0) {
 					ejbJarXmlText.setText(filename);
 					checkPage();
@@ -93,7 +100,7 @@
 		});
 		
 		Label openEjbJarXmlLabel = new Label(container, SWT.NONE);
-		openEjbJarXmlLabel.setText("openejb-jar.xml location (optional)");
+		openEjbJarXmlLabel.setText(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.label.openEjbJarXml")); //$NON-NLS-1$
 		
 		openEjbJarXmlText = new Text(container, SWT.BORDER);
 		openEjbJarXmlText.setText(refactoring.getOpenEjbJarXmlFile());
@@ -105,10 +112,10 @@
 		});
 
 		Button browseOpenEjbJarXmlButton = new Button(container, SWT.NONE);
-		browseOpenEjbJarXmlButton.setText("Browse");
+		browseOpenEjbJarXmlButton.setText(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.browseEjbJar")); //$NON-NLS-1$
 		browseOpenEjbJarXmlButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
 			public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
-				String filename = handleBrowse("Select openejb-jar.xml file");
+				String filename = handleBrowse(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.selectionListener.filename.2")); //$NON-NLS-1$
 				if (filename != null && filename.length() > 0) {
 					openEjbJarXmlText.setText(filename);
 					checkPage();
@@ -122,7 +129,7 @@
 		
 		ejb3Interfaces = new Button(container, SWT.CHECK);
 		ejb3Interfaces.setLayoutData(checkData);
-		ejb3Interfaces.setText("Alter session bean interfaces");
+		ejb3Interfaces.setText(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.alterSessionBeanIface")); //$NON-NLS-1$
 		ejb3Interfaces.setSelection(true);
 		ejb3Interfaces.addSelectionListener(new SelectionAdapter() {
 			@Override
@@ -134,7 +141,7 @@
 		
 		remoteAndRemoteHomeAnnotations = new Button(container, SWT.CHECK);
 		remoteAndRemoteHomeAnnotations.setLayoutData(checkData);
-		remoteAndRemoteHomeAnnotations.setText("Add @Remote and @RemoteHome annotations");
+		remoteAndRemoteHomeAnnotations.setText(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.addRemoteAnnotations")); //$NON-NLS-1$
 		remoteAndRemoteHomeAnnotations.setSelection(false);
 		remoteAndRemoteHomeAnnotations.addSelectionListener(new SelectionAdapter() {
 			@Override
@@ -146,7 +153,7 @@
 		
 		convertEntityBeansToPojos = new Button(container, SWT.CHECK);
 		convertEntityBeansToPojos.setLayoutData(checkData);
-		convertEntityBeansToPojos.setText("Convert entity beans to POJOs");
+		convertEntityBeansToPojos.setText(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.convertEntityBeans")); //$NON-NLS-1$
 		convertEntityBeansToPojos.setSelection(true);
 		convertEntityBeansToPojos.addSelectionListener(new SelectionAdapter() {
 			@Override
@@ -175,7 +182,7 @@
 				if (element instanceof IFile) {
 					IFile file = ((IFile)element);
 					String extension = file.getFileExtension();
-					return (extension != null && extension.equals("xml"));
+					return (extension != null && extension.equals("xml")); //$NON-NLS-1$
 				}
 				
 				if (element instanceof IProject) {
@@ -222,14 +229,14 @@
 		}
 		
 		if (! new File(refactoring.getProject().getLocation().toPortableString() + File.separator + ejbJarXmlFile).exists()) {
-			setErrorMessage("Please select an ejb-jar.xml file");
+			setErrorMessage(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageErrorMsg.1")); //$NON-NLS-1$
 			setPageComplete(false);
 			return;
 		} 
 		
 		if (openEjbJarXmlFile  != null && openEjbJarXmlFile.length() > 0) {
 			if (! new File(refactoring.getProject().getLocation().toPortableString() + File.separator + openEjbJarXmlFile).exists()) {
-				setErrorMessage("Please select a valid openejb-jar.xml file");
+				setErrorMessage(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageErrorMsg.2")); //$NON-NLS-1$
 				setPageComplete(false);
 				return;
 			} 

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/EJBMigrationRefactoring.java Mon Mar 24 18:40:47 2008
@@ -64,12 +64,12 @@
 		status = new RefactoringStatus();
 		
 		if (ejbJarXmlFile == null || ejbJarXmlFile.length() == 0) {
-			status.addError("No ejb-jar.xml specified");
+			status.addError(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.errorMsg.1")); //$NON-NLS-1$
 		}
 
 		IFile file = project.getFile(ejbJarXmlFile);
 		if (! (file.exists())) {
-			status.addError("Specified ejb-jar.xml does not exist");
+			status.addError(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.errorMsg.2")); //$NON-NLS-1$
 		}
 
 		
@@ -135,18 +135,18 @@
 			return jdtFacade.getChange();
 
 		} catch (ConversionException e) {
-			throw new CoreException(new Status(IStatus.ERROR, "org.apache.openejb.helper.annotation", e.getMessage()));
+			throw new CoreException(new Status(IStatus.ERROR, "org.apache.openejb.helper.annotation", e.getMessage())); //$NON-NLS-1$
 		}
 	}
 
 	@Override
 	public String getName() {
-		return "EJB 3.0 Annotation Migration Refactoring Wizard";
+		return Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.refactoringName"); //$NON-NLS-1$
 	}
 
 	public String getEjbJarXmlFile() {
 		if (ejbJarXmlFile == null)
-			ejbJarXmlFile = "";
+			ejbJarXmlFile = ""; //$NON-NLS-1$
 		
 		return ejbJarXmlFile;
 	}
@@ -157,7 +157,7 @@
 
 	public String getOpenEjbJarXmlFile() {
 		if (openEjbJarXmlFile == null)
-			openEjbJarXmlFile = "";
+			openEjbJarXmlFile = ""; //$NON-NLS-1$
 		
 		return openEjbJarXmlFile;
 	}

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/Messages.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/Messages.java?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/Messages.java (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/Messages.java Mon Mar 24 18:40:47 2008
@@ -0,0 +1,22 @@
+package org.apache.openejb.helper.annotation.wizards;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+	private static final String BUNDLE_NAME = "org.apache.openejb.helper.annotation.wizards.messages"; //$NON-NLS-1$
+
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+			.getBundle(BUNDLE_NAME);
+
+	private Messages() {
+	}
+
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}

Modified: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/ProjectSelectionPage.java
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/ProjectSelectionPage.java?rev=640668&r1=640667&r2=640668&view=diff
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/ProjectSelectionPage.java (original)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/ProjectSelectionPage.java Mon Mar 24 18:40:47 2008
@@ -25,6 +25,7 @@
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.List;
+import org.eclipse.ui.PlatformUI;
 
 public class ProjectSelectionPage extends UserInputWizardPage {
 
@@ -32,13 +33,19 @@
 	private final IProject[] projects;
 	private List list;
 
+	@Override
+	public void performHelp() {
+		PlatformUI.getWorkbench().getHelpSystem().displayHelp(
+				"org.apache.openejb.help.test_id");
+	}
+
 	public ProjectSelectionPage(EJBMigrationRefactoring refactoring) {
-		super("wizardPage");
+		super(Messages.getString("org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageName")); //$NON-NLS-1$
 		this.refactoring = refactoring;
 		projects = refactoring.getWorkspaceRoot().getProjects();
 		
-		setTitle("EJB 3.0 Annotation Wizard");
-		setDescription("Please select the project you'd like to work on");
+		setTitle(Messages.getString("org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageTitle")); //$NON-NLS-1$
+		setDescription(Messages.getString("org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageDescription")); //$NON-NLS-1$
 	}
 
 	/* (non-Javadoc)
@@ -95,7 +102,7 @@
 
 	protected void checkPage() {
 		if (getSelectedProject() == null) {
-			setErrorMessage("Please select a project");
+			setErrorMessage(Messages.getString("org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageErrorMsg.1")); //$NON-NLS-1$
 			setPageComplete(false);
 			return;
 		} 

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/messages.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/messages.properties?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/messages.properties (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/messages.properties Mon Mar 24 18:40:47 2008
@@ -0,0 +1,20 @@
+org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageName=wizardPage
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageName=wizardPage
+org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.errorMsg.1=No ejb-jar.xml specified
+org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.errorMsg.2=Specified ejb-jar.xml does not exist
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageTitle=EJB 3.0 Annotation Wizard
+org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageTitle=EJB 3.0 Annotation Wizard
+org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageDescription=Please select the project you'd like to work on
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.label.ejbJarXmlLocation=ejb-jar.xml location
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.browseEjbJar=Browse
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.selectionListener.filename.1=Select ejb-jar.xml file
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.label.openEjbJarXml=openejb-jar.xml location (optional)
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.selectionListener.filename.2=Select openejb-jar.xml file
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.alterSessionBeanIface=Alter session bean interfaces
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.addRemoteAnnotations=Add @Remote and @RemoteHome annotations
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.convertEntityBeans=Convert entity beans to POJOs
+org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageErrorMsg.1=Please select a project
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageDescription=This wizard analyzes ejb-jar.xml and openejb-jar.xml and adds EJB 3.0 annotations to your source
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageErrorMsg.1=Please select an ejb-jar.xml file
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageErrorMsg.2=Please select a valid openejb-jar.xml file
+org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.refactoringName=EJB 3.0 Annotation Migration Refactoring Wizard

Added: openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/messages_de.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/messages_de.properties?rev=640668&view=auto
==============================================================================
--- openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/messages_de.properties (added)
+++ openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.helper.annotation/src/main/java/org/apache/openejb/helper/annotation/wizards/messages_de.properties Mon Mar 24 18:40:47 2008
@@ -0,0 +1,20 @@
+org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageName=wizardPage
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageName=wizardPage
+org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.errorMsg.1=Der Ort der Datei ejb-jar.xml wurde nicht angegeben
+org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.errorMsg.2=Die angegebene Datei ejb-jar.xml existiert nicht
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageTitle=EJB 3.0 Annotation Wizard
+org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageTitle=EJB 3.0 Annotation Wizard
+org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageDescription=Bitte w\u00e4hlen Sie das Projekt aus mit dem Sie arbeiten m\u00f6chten
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.label.ejbJarXmlLocation=Ort  der Datei ejb-jar.xml
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.browseEjbJar=Durchsuchen
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.selectionListener.filename.1=W\u00e4hlen Sie den Ort der Datei ejb-jar.xml aus
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.label.openEjbJarXml=Ort der Datei openejb-jar.xml (optional)
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.selectionListener.filename.2=Bitte w\u00e4hlen sie die Datei openejb-jar.xml aus
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.alterSessionBeanIface=Modifiziere Session Bean Schnittstellen
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.addRemoteAnnotations=@Remote und @RemoteHome Annotationen hinzuf\u00fcgen
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.button.convertEntityBeans=Entity Beans in POJOs umwandeln
+org.apache.openejb.helper.annotation.wizards.projectSelectionWzd.pageErrorMsg.1=Bitte w\u00e4hlen Sie ein Projekt aus
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageDescription=Dieser Wizard analzsiert die Datei ejb-jar.xml und openejb-jar.xml und f\u00fcgt EJB 3.0 Annotationen den Java-Quelldateien hinzu
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageErrorMsg.1=Bitte w\u00e4hlen Sie eine ejb-jar.xml Datei aus
+org.apache.openejb.helper.annotation.wizards.ejbJarSelectionWzd.pageErrorMsg.2=Bitte w\u00e4hlen Sie eine g\u00fcltige openejb-jar.xml Datei aus
+org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.refactoringName=EJB 3.0 Annotation-Migrations- und Refactoring-Wizard