Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authortle2007-05-10 03:43:29 +0000
committertle2007-05-10 03:43:29 +0000
commit88b9dd79e90cfb923f5379da6d756061df9eecfb (patch)
treea43bab6f4a4822bbe352cd459e44a6ac10532127 /jpa
parentbb29cd51e9cd680ec562f8397dd479b54d90580e (diff)
downloadwebtools.dali-88b9dd79e90cfb923f5379da6d756061df9eecfb.tar.gz
webtools.dali-88b9dd79e90cfb923f5379da6d756061df9eecfb.tar.xz
webtools.dali-88b9dd79e90cfb923f5379da6d756061df9eecfb.zip
Refactored instance variables and behaviors.
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaPlatformUi.java46
1 files changed, 4 insertions, 42 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaPlatformUi.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaPlatformUi.java
index ce30bc4acc..c53e5d88da 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaPlatformUi.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/BaseJpaPlatformUi.java
@@ -11,26 +11,19 @@ package org.eclipse.jpt.ui.internal;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jpt.core.internal.IJpaPlatform;
import org.eclipse.jpt.core.internal.IJpaProject;
-import org.eclipse.jpt.core.internal.content.persistence.PersistenceUnit;
-import org.eclipse.jpt.db.internal.ConnectionProfile;
import org.eclipse.jpt.ui.internal.details.IJpaDetailsProvider;
+import org.eclipse.jpt.ui.internal.generic.EntitiesGenerator;
import org.eclipse.jpt.ui.internal.java.details.JavaDetailsProvider;
import org.eclipse.jpt.ui.internal.java.structure.JavaStructureProvider;
import org.eclipse.jpt.ui.internal.structure.IJpaStructureProvider;
import org.eclipse.jpt.ui.internal.xml.details.XmlDetailsProvider;
import org.eclipse.jpt.ui.internal.xml.structure.XmlStructureProvider;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
public abstract class BaseJpaPlatformUi implements IJpaPlatformUi
{
- protected IJpaProject project;
- protected IStructuredSelection selection;
private Collection<IJpaDetailsProvider> detailsProviders;
private Collection<IJpaStructureProvider> structureProviders;
@@ -39,10 +32,6 @@ public abstract class BaseJpaPlatformUi implements IJpaPlatformUi
}
// ********** behavior **********
- protected void initialize(IJpaProject project, IStructuredSelection selection) {
- this.project = project;
- this.selection = selection;
- }
public Collection<IJpaDetailsProvider> detailsProviders() {
if (this.detailsProviders == null) {
@@ -50,27 +39,7 @@ public abstract class BaseJpaPlatformUi implements IJpaPlatformUi
}
return this.detailsProviders;
}
-
- protected IJpaPlatform getPlatform() {
- return this.project.getPlatform();
- }
-
- protected ConnectionProfile getConnectionProfile() {
- return this.project.connectionProfile();
- }
-
- protected PersistenceUnit getPersistenceUnitNamed(String puName) {
- return this.getPlatform().persistenceUnitNamed(puName);
- }
-
- protected Iterator<PersistenceUnit> getPersistenceUnits() {
- return this.getPlatform().persistenceUnits();
- }
-
- protected int getPersistenceUnitSize() {
- return this.getPlatform().persistenceUnitSize();
- }
-
+
protected Collection<IJpaDetailsProvider> buildJpaDetailsProvider() {
Collection<IJpaDetailsProvider> detailsProviders = new ArrayList<IJpaDetailsProvider>();
detailsProviders.add(new JavaDetailsProvider());
@@ -91,17 +60,10 @@ public abstract class BaseJpaPlatformUi implements IJpaPlatformUi
structureProviders.add(new XmlStructureProvider());
return structureProviders;
}
-
- protected Shell getCurrentShell() {
- return Display.getCurrent().getActiveShell();
- }
+ public void generateEntities(IJpaProject project, IStructuredSelection selection) {
- // ********** Generate Entities **********
-
- public void generateEntities( IJpaProject project, IStructuredSelection selection) {
- // TODO Auto-generated method stub
-
+ EntitiesGenerator.generate(project, selection);
}
}

Back to the top