Added DDL Generation behavior to JpaPlatformUi.
diff --git a/jpa/plugins/org.eclipse.jpt.ui/plugin.properties b/jpa/plugins/org.eclipse.jpt.ui/plugin.properties
index bdac807..d4fb815 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/plugin.properties
+++ b/jpa/plugins/org.eclipse.jpt.ui/plugin.properties
@@ -35,6 +35,7 @@
 
 jpaMenuName = JPA Tools
 generateEntities = Generate Entities...
+generateDLL = Generate DLL...
 synchronizeClasses = Synchronize Classes
 addPersistentClass = Add persistent class ...
 removePersistentClass = Remove persistent class
diff --git a/jpa/plugins/org.eclipse.jpt.ui/plugin.xml b/jpa/plugins/org.eclipse.jpt.ui/plugin.xml
index b03e2b5..09cc585 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/plugin.xml
+++ b/jpa/plugins/org.eclipse.jpt.ui/plugin.xml
Binary files differ
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 895cbdc..ce30bc4 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
@@ -1,36 +1,76 @@
 /*******************************************************************************
- *  Copyright (c) 2007 Oracle. 
- *  All rights reserved.  This program and the accompanying materials 
- *  are made available under the terms of the Eclipse Public License v1.0 
- *  which accompanies this distribution, and is available at 
- *  http://www.eclipse.org/legal/epl-v10.html
- *  
- *  Contributors: 
- *  	Oracle - initial API and implementation
- *******************************************************************************/
+ * Copyright (c) 2007 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
 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.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;
 	
+	protected BaseJpaPlatformUi() {
+		super();
+	}
+
+	// ********** behavior **********
+	protected void initialize(IJpaProject project, IStructuredSelection selection) {
+		this.project = project;
+		this.selection = selection;
+	}
+	
 	public Collection<IJpaDetailsProvider> detailsProviders() {
 		if (this.detailsProviders == null) {
-			this.detailsProviders = buildJpaDetailsProvider();
+			this.detailsProviders = this.buildJpaDetailsProvider();
 		}
 		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());
@@ -40,7 +80,7 @@
 	
 	public Collection<IJpaStructureProvider> structureProviders() {
 		if (this.structureProviders == null) {
-			this.structureProviders = buildJpaStructureProvider();
+			this.structureProviders = this.buildJpaStructureProvider();
 		}
 		return this.structureProviders;
 	}
@@ -52,5 +92,16 @@
 		return structureProviders;
 	}
 	
+	protected Shell getCurrentShell() {
+	    return Display.getCurrent().getActiveShell();
+	}
 
+
+	// ********** Generate Entities **********
+
+	public void generateEntities( IJpaProject project, IStructuredSelection selection) {
+		// TODO Auto-generated method stub
+		
+	}
+	
 }
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/IJpaPlatformUi.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/IJpaPlatformUi.java
index 7d20185..b559764 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/IJpaPlatformUi.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/IJpaPlatformUi.java
@@ -1,16 +1,18 @@
 /*******************************************************************************
- *  Copyright (c) 2007 Oracle. 
- *  All rights reserved.  This program and the accompanying materials 
- *  are made available under the terms of the Eclipse Public License v1.0 
- *  which accompanies this distribution, and is available at 
- *  http://www.eclipse.org/legal/epl-v10.html
- *  
- *  Contributors: 
- *  	Oracle - initial API and implementation
- *******************************************************************************/
+ * Copyright (c) 2007 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
 package org.eclipse.jpt.ui.internal;
 
 import java.util.Collection;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jpt.core.internal.IJpaProject;
 import org.eclipse.jpt.ui.internal.details.IJpaDetailsProvider;
 import org.eclipse.jpt.ui.internal.structure.IJpaStructureProvider;
 
@@ -20,4 +22,7 @@
 	
 	Collection<IJpaDetailsProvider> detailsProviders();
 	
+	void generateDLL(IJpaProject project, IStructuredSelection selection);
+	
+	void generateEntities(IJpaProject project, IStructuredSelection selection);
 }
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
new file mode 100644
index 0000000..1994021
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/actions/GenerateDLLAction.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
+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();
+		
+        this.jpaPlatformUI(vendorId).generateDLL(project, this.getCurrentSelection());
+	}
+	
+	private IJpaPlatformUi jpaPlatformUI(String vendorId) {
+        return PlatformRegistry.INSTANCE.getJpaPlatform(vendorId); 
+	}
+
+}
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 a084a76..1b7a5e9 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
@@ -1,16 +1,34 @@
 /*******************************************************************************
- *  Copyright (c) 2007 Oracle. 
- *  All rights reserved.  This program and the accompanying materials 
- *  are made available under the terms of the Eclipse Public License v1.0 
- *  which accompanies this distribution, and is available at 
- *  http://www.eclipse.org/legal/epl-v10.html
- *  
- *  Contributors: 
- *  	Oracle - initial API and implementation
- *******************************************************************************/
+ * Copyright (c) 2007 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Oracle - initial API and implementation
+ ******************************************************************************/
 package org.eclipse.jpt.ui.internal.generic;
 
+import java.text.MessageFormat;
+
+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;
 
 public class GenericPlatformUi extends BaseJpaPlatformUi
-{}
+{
+	public GenericPlatformUi() {
+		super();
+	}
+	
+	public void generateDLL(IJpaProject project, IStructuredSelection selection) {
+		this.displayWarning("Warning", "DLL Generation not supported");
+	}
+
+	protected void displayWarning(String title, String message) {
+	    String formattedMessage = MessageFormat.format( message, (Object [])(new String [] { message}));
+	    MessageDialog.openWarning(this.getCurrentShell(), title, formattedMessage);	  
+	}
+	
+}