diff options
author | psabeva | 2011-04-19 11:41:02 +0000 |
---|---|---|
committer | psabeva | 2011-04-19 11:41:02 +0000 |
commit | 721b28a9fca6909fddc48f35ee4217e527b7b12a (patch) | |
tree | d4779c0b4f8b7b1f6c69a254289f589dc463d517 /jpa_diagram_editor | |
parent | 0203e09733b2aa5fffc2ead301af262f02d3a656 (diff) | |
download | webtools.dali-721b28a9fca6909fddc48f35ee4217e527b7b12a.tar.gz webtools.dali-721b28a9fca6909fddc48f35ee4217e527b7b12a.tar.xz webtools.dali-721b28a9fca6909fddc48f35ee4217e527b7b12a.zip |
[Bug 335672] - Collection attributes should not be initialized
Diffstat (limited to 'jpa_diagram_editor')
-rw-r--r-- | jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java index 098f62218e..cd56809672 100644 --- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java +++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java @@ -675,17 +675,6 @@ public class JpaArtifactFactory { return res; } - public String getApropriateImplementedCollectionType(String collectionType){ - if (collectionType.equals(COLLECTION_TYPE) || collectionType.equals(LIST_TYPE)) { - return "java.util.ArrayList"; //$NON-NLS-1$ - } else if(collectionType.equals(SET_TYPE)) { - return "java.util.HashSet"; //$NON-NLS-1$ - } else if(collectionType.equals(MAP_TYPE)) { - return "java.util.HashMap"; //$NON-NLS-1$ - } - return null; - } - private void createContentType(JavaPersistentType attributeType, String actName, ICompilationUnit cu1, IType type, String collectionType) throws JavaModelException { @@ -701,14 +690,11 @@ public class JpaArtifactFactory { mapKeyType = JPAEditorUtil.createImport(cu1, mapKeyType); } JPAEditorUtil.createImport(cu1, collectionType); - JPAEditorUtil.createImport(cu1, getApropriateImplementedCollectionType(collectionType)); type.createField( " private " + JPAEditorUtil.returnSimpleName(collectionType) + "<" +//$NON-NLS-1$ //$NON-NLS-2$ ((mapKeyType != null) ? (mapKeyType + ", ") : "") + //$NON-NLS-1$ //$NON-NLS-2$ JPAEditorUtil.returnSimpleName(attributeType.getName()) + "> " + JPAEditorUtil.decapitalizeFirstLetter(actName) + //$NON-NLS-1$ - " = new " + JPAEditorUtil.returnSimpleName(getApropriateImplementedCollectionType(collectionType)) + "<" + //$NON-NLS-1$ //$NON-NLS-2$ - ((mapKeyType != null) ? (mapKeyType + ", ") : "") + //$NON-NLS-1$ //$NON-NLS-2$ - JPAEditorUtil.returnSimpleName(attributeType.getName()) + ">();", null, false, new NullProgressMonitor()); //$NON-NLS-1$ + ";", null, false, new NullProgressMonitor()); //$NON-NLS-1$ return mapKeyType; } |