Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2015-12-24 11:25:59 -0500
committerBrian Vosburgh2015-12-24 11:25:59 -0500
commitc582b135623b25302aa21c299bca01e97cd44e1a (patch)
tree2360e2954946a88fb2acfd56d55f2ac455e80370
parent32adccc3553d5bd836a0b20c3f2ba1c413b1e570 (diff)
downloadwebtools.dali-c582b135623b25302aa21c299bca01e97cd44e1a.tar.gz
webtools.dali-c582b135623b25302aa21c299bca01e97cd44e1a.tar.xz
webtools.dali-c582b135623b25302aa21c299bca01e97cd44e1a.zip
Diagram Editor palliative care
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddAttributeCommand.java2
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddPersistentAttributeInOrmXMLCommand.java3
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/CreateEntityTypeHierarchy.java3
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/DeleteAttributeCommand.java2
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RemovePersistentAttributeFromormXmlCommand.java2
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameAttributeCommand.java2
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameEntityCommand.java2
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/SetMappedByNewValueCommand.java1
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/AddRelationFeature.java1
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/EntityChangeListener.java1
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/JpaArtifactFactory.java8
11 files changed, 0 insertions, 27 deletions
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddAttributeCommand.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddAttributeCommand.java
index 9e9d2993f5..d17db18a0a 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddAttributeCommand.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddAttributeCommand.java
@@ -107,8 +107,6 @@ public class AddAttributeCommand implements Command {
actName, cu, type, isCollection, attrTypes, contents);
jpt.getJavaResourceType().getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- jpt.synchronizeWithResourceModel();
- jpt.update();
} catch (JavaModelException e) {
JPADiagramEditorPlugin
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddPersistentAttributeInOrmXMLCommand.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddPersistentAttributeInOrmXMLCommand.java
index dce1b07364..ca082e4729 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddPersistentAttributeInOrmXMLCommand.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/AddPersistentAttributeInOrmXMLCommand.java
@@ -29,7 +29,6 @@ public class AddPersistentAttributeInOrmXMLCommand implements Command {
OrmPersistentAttribute ormAttribute = ormPersistentType.getAttributeNamed(jpa.getName());
if(ormAttribute == null) {
ormPersistentType.getJavaResourceType().getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- ormPersistentType.update();
ormAttribute = ormPersistentType.getAttributeNamed(jpa.getName());
}
if(ormAttribute != null && ormAttribute.isVirtual()){
@@ -42,8 +41,6 @@ public class AddPersistentAttributeInOrmXMLCommand implements Command {
}
jpt.getJavaResourceType().getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- jpt.synchronizeWithResourceModel();
- jpt.update();
}
}
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/CreateEntityTypeHierarchy.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/CreateEntityTypeHierarchy.java
index 53b17cc77f..80790ff765 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/CreateEntityTypeHierarchy.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/CreateEntityTypeHierarchy.java
@@ -48,11 +48,8 @@ public class CreateEntityTypeHierarchy implements Command {
public void execute() {
buildHierarchy(superclass, subclass, shouldCreate);
- subclass.getJpaProject().getContextRoot().synchronizeWithResourceModel();
JavaResourceType jrt = subclass.getJavaResourceType();
jrt.getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- subclass.update();
-
}
private void buildHierarchy(PersistentType superclass,
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/DeleteAttributeCommand.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/DeleteAttributeCommand.java
index 2440179665..c39e2af80e 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/DeleteAttributeCommand.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/DeleteAttributeCommand.java
@@ -72,8 +72,6 @@ public class DeleteAttributeCommand implements Command {
JPAEditorUtil.organizeImports(javaType.getCompilationUnit(), ws);
jpt.getJavaResourceType().getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- jpt.synchronizeWithResourceModel();
- jpt.update();
} catch (JavaModelException e) {
JPADiagramEditorPlugin
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RemovePersistentAttributeFromormXmlCommand.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RemovePersistentAttributeFromormXmlCommand.java
index bce128b0cf..da6989cfdd 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RemovePersistentAttributeFromormXmlCommand.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RemovePersistentAttributeFromormXmlCommand.java
@@ -27,7 +27,5 @@ public class RemovePersistentAttributeFromormXmlCommand implements Command {
ormPersistentType.removeAttributeFromXml((OrmSpecifiedPersistentAttribute) ormReadOnlyAttribute);
}
jpt.getJavaResourceType().getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- jpt.synchronizeWithResourceModel();
- jpt.update();
}
}
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameAttributeCommand.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameAttributeCommand.java
index 3dbc01573f..5e889b0741 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameAttributeCommand.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameAttributeCommand.java
@@ -68,10 +68,8 @@ public class RenameAttributeCommand implements Command {
renameAttribute(jptCompilationUnit, oldName, newName, isMethodAnnotated);
- jpt.getJpaProject().getContextRoot().synchronizeWithResourceModel();
JavaResourceType jrt = jpt.getJavaResourceType();
jrt.getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- jpt.update();
} catch (Exception e) {
JPADiagramEditorPlugin.logError("Cannot rename attribute", e); //$NON-NLS-1$
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameEntityCommand.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameEntityCommand.java
index 3dafc1dc24..804436953a 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameEntityCommand.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/RenameEntityCommand.java
@@ -43,10 +43,8 @@ public class RenameEntityCommand implements Command {
public void execute() {
renameEntityClass(JPAEditorUtil.getCompilationUnit(jpt), newEntityName);
- jpt.getJpaProject().getContextRoot().synchronizeWithResourceModel();
JavaResourceType jrt = jpt.getJavaResourceType();
jrt.getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- jpt.update();
}
private void renameEntityClass(ICompilationUnit cu, String newName) {
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/SetMappedByNewValueCommand.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/SetMappedByNewValueCommand.java
index f5601c6a7a..c14054c1da 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/SetMappedByNewValueCommand.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/command/SetMappedByNewValueCommand.java
@@ -99,7 +99,6 @@ public class SetMappedByNewValueCommand implements Command{
((OwnableRelationshipMappingAnnotation)a).setMappedBy(mappedBy);
}
}
- mappedByrelationShip.synchronizeWithResourceModel();
}
}
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/AddRelationFeature.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/AddRelationFeature.java
index 82b70c722b..4138c4756f 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/AddRelationFeature.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/AddRelationFeature.java
@@ -206,7 +206,6 @@ public class AddRelationFeature extends AbstractAddFeature {
imageCreator.createCardinalityConnectionDecorator(getDiagram(), c, isOptional ? JPAEditorConstants.CARDINALITY_ZERO_ONE : JPAEditorConstants.CARDINALITY_ONE, 0.0);
}
PersistentAttribute owner = rel.getOwner().getAttributeNamed(rel.getOwnerAttributeName());
- owner.update();
if(isDerivedId(owner)){
isOptional = false;
} else {
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/EntityChangeListener.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/EntityChangeListener.java
index dcae5948ab..f372df0ef0 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/EntityChangeListener.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/util/EntityChangeListener.java
@@ -169,7 +169,6 @@ public class EntityChangeListener extends Thread {
mappedByAttr = mappedBy;
}
mappedByStrategy.setMappedByAttribute(mappedByAttr);
- jpt.update();
attribsToUpdate.remove(jptAtMB);
}
}
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 89cbe8fb4f..bee4d10bc0 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
@@ -740,10 +740,8 @@ public class JpaArtifactFactory {
if(attributeType == null) {
PersistentType jpt = (PersistentType) attribute.getParent();
- jpt.getJpaProject().getContextRoot().synchronizeWithResourceModel();
JavaResourceType jrt = jpt.getJavaResourceType();
jrt.getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- jpt.update();
attribute = jpt.getAttributeNamed(attribute.getName());
attributeType = attribute.getTypeName();
}
@@ -807,8 +805,6 @@ public class JpaArtifactFactory {
}
jpt.getJavaResourceType().getJavaResourceCompilationUnit().synchronizeWithJavaSource();
- jpt.synchronizeWithResourceModel();
- jpt.update();
}
/**
@@ -1120,9 +1116,6 @@ public class JpaArtifactFactory {
* @return the {@link PersistentType} registered in the {@link PersistenceUnit} with the given name.
*/
public PersistentType getJPT(String name, PersistenceUnit pu) {
- pu.getJpaProject().getContextRoot().synchronizeWithResourceModel();
- pu.synchronizeWithResourceModel();
- pu.update();
PersistentType jpt = pu.getPersistentType(name);
int cnt = 0;
while ((jpt == null) && (cnt < MAX_NUM_OF_ITERATIONS)) {
@@ -1131,7 +1124,6 @@ public class JpaArtifactFactory {
} catch (InterruptedException e) {
JPADiagramEditorPlugin.logError("Sleep interrupted", e); //$NON-NLS-1$
}
- pu.synchronizeWithResourceModel();
jpt = pu.getPersistentType(name);
cnt++;
}

Back to the top