summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetya Sabeva2013-04-10 10:31:26 (EDT)
committerPetya Sabeva2013-04-10 10:31:26 (EDT)
commitd175cc17569ea3d92458d6ef370ededd52f50743 (patch)
treeb7ddd7644876be7ebb0d8966b15c886c2d5191a5
parent3d776d5fddefa31731027bf638c9ffdf8e223110 (diff)
downloadwebtools.dali-d175cc17569ea3d92458d6ef370ededd52f50743.zip
webtools.dali-d175cc17569ea3d92458d6ef370ededd52f50743.tar.gz
webtools.dali-d175cc17569ea3d92458d6ef370ededd52f50743.tar.bz2
Bug 330107 - removing warning dialog when open a diagram on project 2.0v201304102025
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/i18n/messages.properties2
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/modelintegration/ui/OpenJpaDiagramActionDelegate.java14
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/EntitiesInDiagramSWTBotTest.java1
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/OpenDiagramEditorSWTBotTest.java2
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/orm/OrmPersistentTypesSWTBotTest.java1
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/AbstractSwtBotEditorTest.java49
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/JPACreateFactory.java6
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/mappedsuperclass/relationships/MappedSuperclassRelationshipsSWTBotTest.java1
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/ContextMenuHelper.java5
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/EditorProxy.java21
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/RelationshipsUtils.java3
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/AllJpaEditorTests.java3
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/feature/ClickAddFeatureTest.java2
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/modelintegration/ui/ModelIntegrationTest.java12
14 files changed, 37 insertions, 85 deletions
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/i18n/messages.properties b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/i18n/messages.properties
index b250354..0c5da7c 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/i18n/messages.properties
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/i18n/messages.properties
@@ -186,8 +186,6 @@ JPAEditorDiagramTypeProvider_JPADiagramReadOnlyHasToAddMsg=Cannot show the selec
OpenJpaDiagramActionDelegate_openJPADiagramErrorMsgTitle=Cannot Open Diagram
OpenJpaDiagramActionDelegate_openJPADiagramErrorMsg=Cannot open the JPA diagram editor
-OpenJpaDiagramActionDelegate_jpaSupportWarningTitle=JPA Support
-OpenJpaDiagramActionDelegate_jpaSupportWarningMsg=JPA Diagram Editor has partial JPA 2.0 support only. When you use it with JPA 2.0 enabled projects you should visualize JPA 1.0 compliant entities only. Otherwise, the editor behavior will become erratic.
OpenJpaDiagramActionDelegate_noPersistenceUnitTitle=No Persistence Unit
OpenJpaDiagramActionDelegate_noPersistenceUnitMsg=The JPA Diagram Editor can not be open, because the persistence unit does not exist or is corrupted.
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/modelintegration/ui/OpenJpaDiagramActionDelegate.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/modelintegration/ui/OpenJpaDiagramActionDelegate.java
index eea1649..73a94a0 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/modelintegration/ui/OpenJpaDiagramActionDelegate.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/modelintegration/ui/OpenJpaDiagramActionDelegate.java
@@ -80,19 +80,7 @@ public class OpenJpaDiagramActionDelegate implements IObjectActionDelegate {
public static IDiagramContainer openDiagramEditor(final Diagram diagram) {
String diagramName = diagram.getName();
- JpaProject jpaProject = ModelIntegrationUtil.getProjectByDiagram(diagramName);
- if (!JPAEditorUtil.checkJPAFacetVersion(jpaProject, JPAEditorUtil.JPA_PROJECT_FACET_10) && !ModelIntegrationUtil.isDiagramOpen(diagramName)) {
- boolean wasEnabled = OptionalMessageDialog.isDialogEnabled(JPAEditorConstants.JPA_SUPPORT_DIALOG_ID);
- int btnIndex = OptionalMessageDialog.open(JPAEditorConstants.JPA_SUPPORT_DIALOG_ID,
- Display.getDefault().getShells()[0],
- JPAEditorMessages.OpenJpaDiagramActionDelegate_jpaSupportWarningTitle,
- Display.getDefault().getSystemImage(SWT.ICON_WARNING),
- JPAEditorMessages.OpenJpaDiagramActionDelegate_jpaSupportWarningMsg,
- 0,
- new String[] {JPAEditorMessages.BTN_OK},
- 0);
- }
-
+ JpaProject jpaProject = ModelIntegrationUtil.getProjectByDiagram(diagramName);
final JPADiagramEditorInput diagramEditorInput = JPADiagramEditorInput.createEditorInput(diagram, JPAEditorDiagramTypeProvider.ID);
IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
final IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/EntitiesInDiagramSWTBotTest.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/EntitiesInDiagramSWTBotTest.java
index f8b1257..81e18da 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/EntitiesInDiagramSWTBotTest.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/EntitiesInDiagramSWTBotTest.java
@@ -16,7 +16,6 @@ import org.eclipse.jpt.jpadiagrameditor.ui.internal.util.JpaArtifactFactory;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart;
-import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/OpenDiagramEditorSWTBotTest.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/OpenDiagramEditorSWTBotTest.java
index d2aed6e..ccefd7b 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/OpenDiagramEditorSWTBotTest.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/OpenDiagramEditorSWTBotTest.java
@@ -29,7 +29,7 @@ public class OpenDiagramEditorSWTBotTest extends AbstractSwtBotEditorTest{
workbenchBot.closeAllEditors();
// open JPA diagram editor on project level: JPA Tools -> Open Diagram
SWTBotGefEditor diagramEditor = editorProxy
- .openDiagramOnJPAProjectNode(jpaProject.getName(), true);
+ .openDiagramOnJPAProjectNode(jpaProject.getName());
diagramEditor.close();
Utils.sayTestFinished("testOpenDiagramOnProjectLevel");
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/orm/OrmPersistentTypesSWTBotTest.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/orm/OrmPersistentTypesSWTBotTest.java
index 5174022..b965a61 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/orm/OrmPersistentTypesSWTBotTest.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/entity/orm/OrmPersistentTypesSWTBotTest.java
@@ -11,6 +11,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SWTBotJunit4ClassRunner.class)
+@SuppressWarnings("restriction")
public class OrmPersistentTypesSWTBotTest extends AbstractSwtBotEditorTest {
protected static String TEST_PROJECT = "Test_" + System.currentTimeMillis();
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/AbstractSwtBotEditorTest.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/AbstractSwtBotEditorTest.java
index 3583753..dbd0ad9 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/AbstractSwtBotEditorTest.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/AbstractSwtBotEditorTest.java
@@ -71,13 +71,10 @@ public class AbstractSwtBotEditorTest extends SWTBotGefTestCase{
bot.closeAllEditors();
factory = JPACreateFactory.instance();
- boolean isJPA20 = false;
if(version.equals("1.0")){
jpaProject = factory.createJPAProject(name);
- isJPA20 = false;
} else {
jpaProject = factory.createJPA20Project(name);
- isJPA20 = true;
}
assertNotNull(jpaProject);
assertEquals(name, jpaProject.getName());
@@ -97,7 +94,7 @@ public class AbstractSwtBotEditorTest extends SWTBotGefTestCase{
}
jpaDiagramEditor = editorProxy.openDiagramOnJPAProjectNode(
- jpaProject.getName(), isJPA20);
+ jpaProject.getName());
editorProxy.setJpaDiagramEditor(jpaDiagramEditor);
relUtils = new RelationshipsUtils(jpaDiagramEditor, editorProxy, jpaProject);
@@ -193,28 +190,28 @@ public class AbstractSwtBotEditorTest extends SWTBotGefTestCase{
}
}
- private static void createJpaProjectViaWizard(String name, String version) {
- ContextMenuHelper.clickMenu("File", "New", "Other...");
- SWTBot swtBot = workbenchBot.shell("New").bot();
- ContextMenuHelper.selectTreeItem(swtBot.tree(), "JPA", "JPA Project");
- swtBot.button(IDialogConstants.NEXT_LABEL).click();
-
- swtBot.textWithLabel("Project name:").setText(name);
- swtBot.comboBoxInGroup("Target runtime").setSelection("jre6");
- swtBot.comboBoxInGroup("JPA version").setSelection(version);
- swtBot.button(IDialogConstants.NEXT_LABEL).click();
-
- swtBot.button(IDialogConstants.NEXT_LABEL).click();
-
- swtBot.comboBoxInGroup("Platform").setSelection("Generic 2.0");
- swtBot.comboBoxWithLabel("Type:").setSelection("Disable Library Configuration");
-
-// swtBot.checkBox("Create mapping file (orm.xml)").select();
-
- swtBot.button(IDialogConstants.FINISH_LABEL).click();
-
- swtBot.waitUntil(shellCloses(swtBot.activeShell()), 30000);
- }
+// private static void createJpaProjectViaWizard(String name, String version) {
+// ContextMenuHelper.clickMenu("File", "New", "Other...");
+// SWTBot swtBot = workbenchBot.shell("New").bot();
+// ContextMenuHelper.selectTreeItem(swtBot.tree(), "JPA", "JPA Project");
+// swtBot.button(IDialogConstants.NEXT_LABEL).click();
+//
+// swtBot.textWithLabel("Project name:").setText(name);
+// swtBot.comboBoxInGroup("Target runtime").setSelection("jre6");
+// swtBot.comboBoxInGroup("JPA version").setSelection(version);
+// swtBot.button(IDialogConstants.NEXT_LABEL).click();
+//
+// swtBot.button(IDialogConstants.NEXT_LABEL).click();
+//
+// swtBot.comboBoxInGroup("Platform").setSelection("Generic 2.0");
+// swtBot.comboBoxWithLabel("Type:").setSelection("Disable Library Configuration");
+//
+//// swtBot.checkBox("Create mapping file (orm.xml)").select();
+//
+// swtBot.button(IDialogConstants.FINISH_LABEL).click();
+//
+// swtBot.waitUntil(shellCloses(swtBot.activeShell()), 30000);
+// }
@After
public void tearDown() throws Exception {
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/JPACreateFactory.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/JPACreateFactory.java
index 495c5bb..992babe 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/JPACreateFactory.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/internal/JPACreateFactory.java
@@ -52,13 +52,9 @@ import org.eclipse.jpt.jpa.core.context.JpaContextModelRoot;
import org.eclipse.jpt.jpa.core.context.PersistentAttribute;
import org.eclipse.jpt.jpa.core.context.PersistentType;
import org.eclipse.jpt.jpa.core.context.persistence.PersistenceXml;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProperties;
-import org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDataModelProvider;
import org.eclipse.jpt.jpadiagrameditor.swtbot.tests.utils.Utils;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.util.JpaArtifactFactory;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -74,8 +70,6 @@ public class JPACreateFactory {
private IFacetedProject facetedProject;
private IProject project;
private IJavaProject javaProject;
- //private IPackageFragmentRoot sourceFolder;
-// JpaProject jpaProject;
public static synchronized JPACreateFactory instance() {
if (factory == null)
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/mappedsuperclass/relationships/MappedSuperclassRelationshipsSWTBotTest.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/mappedsuperclass/relationships/MappedSuperclassRelationshipsSWTBotTest.java
index 1a5c921..2dcf9ab 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/mappedsuperclass/relationships/MappedSuperclassRelationshipsSWTBotTest.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/mappedsuperclass/relationships/MappedSuperclassRelationshipsSWTBotTest.java
@@ -12,6 +12,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SWTBotJunit4ClassRunner.class)
+@SuppressWarnings("restriction")
public class MappedSuperclassRelationshipsSWTBotTest extends AbstractSwtBotEditorTest {
protected static String TEST_PROJECT = "Test_" + System.currentTimeMillis();
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/ContextMenuHelper.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/ContextMenuHelper.java
index 3a0142e..cbd097e 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/ContextMenuHelper.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/ContextMenuHelper.java
@@ -8,9 +8,7 @@ import static org.hamcrest.core.AllOf.allOf;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import java.text.MessageFormat;
-import java.util.ArrayDeque;
import java.util.Arrays;
-import java.util.Deque;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.SWT;
@@ -38,6 +36,7 @@ import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.hamcrest.Matcher;
+@SuppressWarnings("restriction")
public class ContextMenuHelper
{
@@ -49,7 +48,6 @@ public class ContextMenuHelper
* @throws WidgetNotFoundException
* if the widget is not found.
*/
- @SuppressWarnings("unchecked")
public static void clickContextMenu( final AbstractSWTBot<?> bot, final String... texts )
{
final Matcher<?>[] matchers = new Matcher<?>[texts.length];
@@ -167,7 +165,6 @@ public class ContextMenuHelper
Shell control = (Shell) bot.widget;
Menu menu = control.getMenuBar();
for (String text : texts) {
- @SuppressWarnings("unchecked")
Matcher<?> matcher = allOf(instanceOf(MenuItem.class), withMnemonic(text));
item = show(menu, matcher);
if (item != null) {
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/EditorProxy.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/EditorProxy.java
index 2c0fdbc..fd3389b 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/EditorProxy.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/EditorProxy.java
@@ -136,14 +136,6 @@ public class EditorProxy {
assertTrue("The JPA Content node is disabled.", item.isEnabled());
ContextMenuHelper.clickContextMenu(projectTree, "Open Diagram");
- workbenchBot
- .waitUntil(
- shellIsActive(JPAEditorMessages.OpenJpaDiagramActionDelegate_jpaSupportWarningTitle),
- 10000);
- SWTBotShell jpaSupportWarningDialog = workbenchBot
- .shell(JPAEditorMessages.OpenJpaDiagramActionDelegate_jpaSupportWarningTitle);
- getOkButton(jpaSupportWarningDialog).click();
-
SWTBotGefEditor jpaDiagramEditor = bot.gefEditor(name);
assertFalse("Editor must not be dirty!", jpaDiagramEditor.isDirty());
@@ -154,24 +146,13 @@ public class EditorProxy {
return jpaDiagramEditor;
}
- public SWTBotGefEditor openDiagramOnJPAProjectNode(String name,
- boolean isJPA20) {
+ public SWTBotGefEditor openDiagramOnJPAProjectNode(String name) {
SWTBotTree projectTree = workbenchBot.viewByTitle("Project Explorer")
.bot().tree();
projectTree.getTreeItem(name).select();
ContextMenuHelper.clickContextMenu(projectTree, "JPA Tools",
"Open Diagram");
- if (isJPA20) {
- workbenchBot
- .waitUntil(
- shellIsActive(JPAEditorMessages.OpenJpaDiagramActionDelegate_jpaSupportWarningTitle),
- 10000);
- SWTBotShell jpaSupportWarningDialog = workbenchBot
- .shell(JPAEditorMessages.OpenJpaDiagramActionDelegate_jpaSupportWarningTitle);
- getOkButton(jpaSupportWarningDialog).click();
- }
-
SWTBotGefEditor jpaDiagramEditor = bot.gefEditor(name);
assertFalse("Editor must not be dirty!", jpaDiagramEditor.isDirty());
return jpaDiagramEditor;
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/RelationshipsUtils.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/RelationshipsUtils.java
index 834cae3..124b89d 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/RelationshipsUtils.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/utils/RelationshipsUtils.java
@@ -22,6 +22,7 @@ import org.eclipse.jpt.jpadiagrameditor.ui.internal.util.JpaArtifactFactory;
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart;
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
+@SuppressWarnings("restriction")
public class RelationshipsUtils {
private SWTBotGefEditor jpaDiagramEditor;
@@ -1310,7 +1311,7 @@ public class RelationshipsUtils {
assertNotNull(ormXml.getPersistentType(dependentEntityName));
}
- PersistentType depJPTType= editorProxy.getJPTObjectForGefElement(dependentEntity);
+ editorProxy.getJPTObjectForGefElement(dependentEntity);
JavaPersistentType idClass = editorProxy.setIdClass(dependentEntity, embeddableJPT.getSimpleName(), jpaProject, false);
editorProxy.deleteEntityDefaultPK(dependentEntity, isOrmXml);
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/AllJpaEditorTests.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/AllJpaEditorTests.java
index ae83dd6..406a02c 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/AllJpaEditorTests.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/AllJpaEditorTests.java
@@ -23,7 +23,6 @@ import org.eclipse.jpt.jpadiagrameditor.ui.tests.internal.editor.EditorTest;
import org.eclipse.jpt.jpadiagrameditor.ui.tests.internal.feature.AddAttributeFeatureTest;
import org.eclipse.jpt.jpadiagrameditor.ui.tests.internal.feature.AddJPAEntityFeatureTest;
import org.eclipse.jpt.jpadiagrameditor.ui.tests.internal.feature.AddRelationFeatureTest;
-import org.eclipse.jpt.jpadiagrameditor.ui.tests.internal.feature.ClickAddFeatureTest;
import org.eclipse.jpt.jpadiagrameditor.ui.tests.internal.feature.DeleteRelationFeatureTest;
import org.eclipse.jpt.jpadiagrameditor.ui.tests.internal.feature.DirectEditAttributeFeatureTest;
import org.eclipse.jpt.jpadiagrameditor.ui.tests.internal.feature.LayoutEntityFeatureTest;
@@ -55,7 +54,7 @@ import org.junit.runners.Suite.SuiteClasses;
JPAEditorPreferenceInitializerTest.class,
JPAEditorPreferencesPageTest.class,
AddJPAEntityFeatureTest.class,
- ClickAddFeatureTest.class,
+// ClickAddFeatureTest.class,
// CreateDeleteEntity.class,
DirectEditAttributeFeatureTest.class,
EditorTest.class,
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/feature/ClickAddFeatureTest.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/feature/ClickAddFeatureTest.java
index c09932d..c044bdb 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/feature/ClickAddFeatureTest.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/feature/ClickAddFeatureTest.java
@@ -54,7 +54,7 @@ public class ClickAddFeatureTest {
@Before
public void setUp() throws Exception {
- System.setProperty(JPACreateFactory.JPA_JAR_NAME_SYSTEM_PROPERTY, "C:\\lib\\persistence-api-1.0.jar");
+// System.setProperty(JPACreateFactory.JPA_JAR_NAME_SYSTEM_PROPERTY, "C:\\lib\\persistence-api-1.0.jar");
factory = JPACreateFactory.instance();
jpaProject = factory.createJPAProject(TEST_PROJECT + "_" + System.currentTimeMillis());
assertNotNull(jpaProject);
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/modelintegration/ui/ModelIntegrationTest.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/modelintegration/ui/ModelIntegrationTest.java
index b0ec74c..77c103a 100644
--- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/modelintegration/ui/ModelIntegrationTest.java
+++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.ui.tests/src/org/eclipse/jpt/jpadiagrameditor/ui/tests/internal/modelintegration/ui/ModelIntegrationTest.java
@@ -24,9 +24,6 @@ import static org.junit.Assert.assertTrue;
import org.easymock.EasyMock;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.graphiti.dt.IDiagramTypeProvider;
@@ -213,14 +210,13 @@ public class ModelIntegrationTest {
private void deleteAllProjects() throws Exception {
IProgressMonitor monitor= new NullProgressMonitor();
- ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
+// ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+// public void run(IProgressMonitor monitor) throws CoreException {
IProject project = jpaProject.getProject();
project.close(monitor);
- project.close(monitor);
project.delete(true, true, monitor);
- }
- } , monitor);
+// }
+// } , monitor);
}
}