Author: dgeraskov
Date: 2008-06-13 08:33:29 -0400 (Fri, 13 Jun 2008)
New Revision: 8759
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.classpath
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.project
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/build.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/icons/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/icons/sample.gif
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java
Log:
Add support for Hibernate in Eclipse Dali
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.classpath
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.classpath
(rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.classpath 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.project
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.project
(rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.project 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.hibernate.jpt.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.project
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,7 @@
+#Thu Jun 12 12:51:45 EEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Hibernate Jdt Core
+Bundle-SymbolicName: org.jboss.tools.hibernate.jpt.core;singleton:=true
+Bundle-Version: 1.0.0
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.jpt.core,
+ org.eclipse.wst.validation,
+ org.eclipse.core.resources,
+ org.eclipse.emf.ecore,
+ org.eclipse.jpt.eclipselink.core;bundle-version="1.0.0",
+ org.eclipse.jpt.eclipselink.ui;bundle-version="1.0.0",
+ org.eclipse.jpt.utility;bundle-version="1.2.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: Hibernate Team
+
+
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/build.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/build.properties
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/build.properties 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/icons/sample.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/icons/sample.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
(rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ id="org.jboss.tools.hibernate.jpt.core"
+ point="org.eclipse.jpt.core.jpaPlatform">
+
+ <jpaPlatform
+ class="org.jboss.tools.hibernate.jpt.core.internal.HibernatePlatform"
+ default="true"
+ id="hibernate"
+ label="Hibernate"/>
+ </extension>
+
+</plugin>
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.internal;
+
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.internal.platform.GenericJpaFactory;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateFactory extends GenericJpaFactory {
+
+ @Override
+ public PersistenceUnit buildPersistenceUnit(Persistence parent, XmlPersistenceUnit
persistenceUnit) {
+ return new HibernatePersistenceUnit(parent, persistenceUnit);
+ }
+
+}
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.internal;
+
+import org.eclipse.jpt.core.JpaFactory;
+import org.eclipse.jpt.core.internal.platform.GenericJpaPlatform;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+
+public class HibernatePlatform extends GenericJpaPlatform {
+
+ public static String ID = "hibernate";
+
+ @Override
+ public String getId() {
+ return ID;
+ }
+
+ /* use GenericJpaPlatform's methods while under progress
+ @Override
+ protected JpaFactory buildJpaFactory() {
+ return new HibernateFactory();
+ }*/
+}
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernatePlatform.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.internal.context;
+
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
+import org.eclipse.jpt.core.context.persistence.Property;
+import org.eclipse.jpt.utility.internal.model.AbstractModel;
+import org.eclipse.jpt.utility.model.event.PropertyChangeEvent;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateJpaProperties extends AbstractModel implements
+ HibernateProperties {
+
+ private PersistenceUnit persistenceUnit;
+
+ public HibernateJpaProperties(PersistenceUnit parent) {
+ super();
+ this.initialize(parent);
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties#getJpaProject()
+ */
+ public JpaProject getJpaProject() {
+ return this.persistenceUnit.getJpaProject();
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties#itemIsProperty(org.eclipse.jpt.core.context.persistence.Property)
+ */
+ public boolean itemIsProperty(Property item) {
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties#persistenceUnit()
+ */
+ public PersistenceUnit persistenceUnit() {
+ return this.persistenceUnit;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties#propertyIdFor(org.eclipse.jpt.core.context.persistence.Property)
+ */
+ public String propertyIdFor(Property property) {
+ throw new UnsupportedOperationException();
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.jpt.utility.model.listener.PropertyChangeListener#propertyChanged(org.eclipse.jpt.utility.model.event.PropertyChangeEvent)
+ */
+ public void propertyChanged(PropertyChangeEvent event) {
+ throw new UnsupportedOperationException();
+ }
+
+ protected void initialize(PersistenceUnit parent) {
+ this.persistenceUnit = parent;
+ }
+
+}
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateJpaProperties.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.internal.context;
+
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.core.internal.context.persistence.GenericPersistenceUnit;
+import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
+import org.eclipse.jpt.eclipselink.core.internal.context.EclipseLinkJpaProperties;
+import org.eclipse.jpt.eclipselink.core.internal.context.caching.Caching;
+import org.eclipse.jpt.eclipselink.core.internal.context.connection.Connection;
+import org.eclipse.jpt.eclipselink.core.internal.context.customization.Customization;
+import org.eclipse.jpt.eclipselink.core.internal.context.logging.Logging;
+import org.eclipse.jpt.eclipselink.core.internal.context.options.Options;
+import
org.eclipse.jpt.eclipselink.core.internal.context.schema.generation.SchemaGeneration;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernatePersistenceUnit extends GenericPersistenceUnit {
+
+ private HibernateProperties hibernateProperties;
+
+ /**
+ * @param parent
+ * @param persistenceUnit
+ */
+ public HibernatePersistenceUnit(Persistence parent,
+ XmlPersistenceUnit persistenceUnit) {
+ super(parent, persistenceUnit);
+ }
+
+ protected void initialize(XmlPersistenceUnit xmlPersistenceUnit) {
+ super.initialize(xmlPersistenceUnit);
+ this.hibernateProperties = new HibernateJpaProperties(this);
+ }
+
+ /*
+ * put getters for specific properties here
+ *
+ */
+
+}
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java 2008-06-13
12:33:29 UTC (rev 8759)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.internal.context;
+
+import org.eclipse.jpt.eclipselink.core.internal.context.PersistenceUnitProperties;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface HibernateProperties extends PersistenceUnitProperties {
+
+ // put getters for specific properties here
+
+}
Property changes on:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernateProperties.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native