Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authortle2007-05-10 03:41:53 +0000
committertle2007-05-10 03:41:53 +0000
commitbb29cd51e9cd680ec562f8397dd479b54d90580e (patch)
tree7026273e8a99017a88c39778e023d6d0392eacfc /jpa
parent628e74887a7b5a1e5161f513e2b9d29d1df16824 (diff)
downloadwebtools.dali-bb29cd51e9cd680ec562f8397dd479b54d90580e.tar.gz
webtools.dali-bb29cd51e9cd680ec562f8397dd479b54d90580e.tar.xz
webtools.dali-bb29cd51e9cd680ec562f8397dd479b54d90580e.zip
Updated generateDLL messages.
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties3
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/GenerateDLLAction.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/generic/GenericPlatformUi.java8
4 files changed, 14 insertions, 11 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties b/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties
index 7a078a8148..902c5673a6 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties
+++ b/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui.properties
@@ -36,6 +36,9 @@ GenerateEntitiesWizardPage_generateEntities=Generate Entities from Tables
GenerateEntitiesWizardPage_synchronizeClasses=Synchronize Classes in persistence.xml
GenerateEntitiesWizardPage_tables=Tables:
+GenericPlatformUiDialog_warningTitle=Warning
+GenericPlatformUiDialog_warningText=DLL Generation not supported
+
JpaPreferencePage_defaultJpaLib=Default JPA implementation library:
JpaPreferencePage_userLibsLink=<a>Configure user libraries ...</a>
JpaPreferencePage_invalidJpaLib=Invalid Library: Must contain javax.persistence classes.
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java
index 315a3314a6..e140204973 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/JptUiMessages.java
@@ -78,6 +78,10 @@ public class JptUiMessages extends NLS
public static String GenerateEntitiesWizardPage_tables;
+ public static String GenericPlatformUiDialog_warningTitle;
+
+ public static String GenericPlatformUiDialog_warningText;
+
public static String JpaPreferencePage_defaultJpaLib;
public static String JpaPreferencePage_userLibsLink;
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/GenerateDLLAction.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/GenerateDLLAction.java
index 1994021956..3728acc1cd 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/GenerateDLLAction.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/GenerateDLLAction.java
@@ -9,27 +9,19 @@
******************************************************************************/
package org.eclipse.jpt.ui.internal.actions;
-import org.eclipse.jface.action.IAction;
import org.eclipse.jpt.core.internal.IJpaProject;
import org.eclipse.jpt.ui.internal.IJpaPlatformUi;
import org.eclipse.jpt.ui.internal.PlatformRegistry;
-import org.eclipse.ui.IWorkbenchPart;
/**
* GenerateDLLAction
*/
public class GenerateDLLAction extends ProjectAction {
- private IWorkbenchPart targetPart;
-
+
public GenerateDLLAction() {
super();
}
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- super.setActivePart(action, targetPart);
- this.targetPart = targetPart;
- }
-
protected void execute(IJpaProject project) {
String vendorId = project.getPlatform().getId();
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/generic/GenericPlatformUi.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/generic/GenericPlatformUi.java
index 1b7a5e9618..0be9cd7e3f 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/generic/GenericPlatformUi.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/generic/GenericPlatformUi.java
@@ -15,6 +15,9 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jpt.core.internal.IJpaProject;
import org.eclipse.jpt.ui.internal.BaseJpaPlatformUi;
+import org.eclipse.jpt.ui.internal.JptUiMessages;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
public class GenericPlatformUi extends BaseJpaPlatformUi
{
@@ -23,12 +26,13 @@ public class GenericPlatformUi extends BaseJpaPlatformUi
}
public void generateDLL(IJpaProject project, IStructuredSelection selection) {
- this.displayWarning("Warning", "DLL Generation not supported");
+ this.displayWarning(JptUiMessages.GenericPlatformUiDialog_warningTitle, JptUiMessages.GenericPlatformUiDialog_warningText);
}
protected void displayWarning(String title, String message) {
String formattedMessage = MessageFormat.format( message, (Object [])(new String [] { message}));
- MessageDialog.openWarning(this.getCurrentShell(), title, formattedMessage);
+ Shell currentShell = Display.getCurrent().getActiveShell();
+ MessageDialog.openWarning(currentShell, title, formattedMessage);
}
}

Back to the top