JBoss Tools SVN: r35281 - in branches/dead/hibernatetools-multiversion2/plugins: org.hibernate.eclipse/META-INF and 16 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-10-03 09:42:27 -0400 (Mon, 03 Oct 2011)
New Revision: 35281
Added:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/plugin.xml
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/schema/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/schema/hibernateextension.exsd
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HQLQueryPage.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateException.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtension.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtensionDefinition.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/JavaPage.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResult.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResultImpl.java
Removed:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/lib/
Modified:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseConsoleConfigurationPreferences.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/HibernatePropertySourceProvider.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/IConsoleConfigurationLaunchConstants.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.mapper/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/.classpath
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/build.properties
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogManager.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.ui/META-INF/MANIFEST.MF
Log:
Simultaneous Hibernate 3.5 and Hibernate4 support
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/.classpath
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/.classpath 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/.classpath 2011-10-03 13:42:27 UTC (rev 35281)
@@ -3,38 +3,5 @@
<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 exported="true" kind="lib" path="lib/hibernate/asm.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/asm-attrs.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/dom4j-1.6.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/commons-logging-1.0.4.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/concurrent-1.3.2.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/connector.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate3.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-cache.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-common.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-jmx.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-system.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/jdbc2_0-stdext.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/jta.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/jaas.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/oscache-2.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/proxool-0.8.3.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/swarmcache-1.0rc2.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/tools/freemarker.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/tools/hibernate-tools.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/bsh-core-2.0b4.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/jgroups-2.2.8.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/antlr-2.7.6.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/tools/jtidy-r8-20060801.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/javassist.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/ehcache-1.2.3.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/c3p0-0.9.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-validator.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/log4j-1.2.15.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/cglib-2.2.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/commons-collections-3.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/slf4j-api-1.5.8.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/slf4j-log4j12-1.5.8.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2011-10-03 13:42:27 UTC (rev 35281)
@@ -1,513 +1,23 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.hibernate.eclipse
+Bundle-SymbolicName: org.hibernate.eclipse;singleton:=true
Bundle-Version: 3.4.0.qualifier
-Bundle-ClassPath: org.hibernate.eclipse.jar,
- lib/hibernate/asm.jar,
- lib/hibernate/asm-attrs.jar,
- lib/hibernate/commons-logging-1.0.4.jar,
- lib/hibernate/concurrent-1.3.2.jar,
- lib/hibernate/connector.jar,
- lib/hibernate/dom4j-1.6.1.jar,
- lib/hibernate/hibernate3.jar,
- lib/hibernate/jboss-cache.jar,
- lib/hibernate/jboss-common.jar,
- lib/hibernate/jboss-jmx.jar,
- lib/hibernate/jboss-system.jar,
- lib/hibernate/jdbc2_0-stdext.jar,
- lib/hibernate/jta.jar,
- lib/hibernate/jaas.jar,
- lib/hibernate/oscache-2.1.jar,
- lib/hibernate/proxool-0.8.3.jar,
- lib/hibernate/swarmcache-1.0rc2.jar,
- lib/tools/hibernate-tools.jar,
- lib/tools/freemarker.jar,
- lib/bsh-core-2.0b4.jar,
- lib/hibernate/jgroups-2.2.8.jar,
- lib/hibernate/antlr-2.7.6.jar,
- lib/tools/jtidy-r8-20060801.jar,
- lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar,
- lib/hibernate/javassist.jar,
- lib/hibernate/ehcache-1.2.3.jar,
- lib/hibernate/c3p0-0.9.1.jar,
- lib/annotations/hibernate-validator.jar,
- lib/hibernate/log4j-1.2.15.jar,
- lib/hibernate/cglib-2.2.jar,
- lib/hibernate/commons-collections-3.1.jar,
- lib/hibernate/slf4j-api-1.5.8.jar,
- lib/hibernate/slf4j-log4j12-1.5.8.jar,
- lib/hibernate/commons-collections-3.1.jar
+Bundle-ClassPath: org.hibernate.eclipse.jar
Bundle-Activator: org.hibernate.eclipse.HibernatePlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
-Export-Package: EDU.oswego.cs.dl.util.concurrent,
- antlr,
- antlr.ASdebug,
- antlr.actions.cpp,
- antlr.actions.csharp,
- antlr.actions.java,
- antlr.actions.python,
- antlr.build,
- antlr.collections,
- antlr.collections.impl,
- antlr.debug,
- antlr.debug.misc,
- antlr.preprocessor,
- bsh,
- com.mchange,
- com.mchange.lang,
- com.mchange.util,
- com.mchange.v1,
- com.mchange.v1.db,
- com.mchange.v1.db.sql,
- com.mchange.v1.identicator,
- com.mchange.v1.io,
- com.mchange.v1.lang,
- com.mchange.v1.util,
- com.mchange.v1.xml,
- com.mchange.v2,
- com.mchange.v2.async,
- com.mchange.v2.beans,
- com.mchange.v2.c3p0,
- com.mchange.v2.c3p0.cfg,
- com.mchange.v2.c3p0.filter,
- com.mchange.v2.c3p0.impl,
- com.mchange.v2.c3p0.jboss,
- com.mchange.v2.c3p0.management,
- com.mchange.v2.c3p0.mbean,
- com.mchange.v2.c3p0.stmt,
- com.mchange.v2.c3p0.subst,
- com.mchange.v2.c3p0.util,
- com.mchange.v2.cfg,
- com.mchange.v2.cfg.junit,
- com.mchange.v2.coalesce,
- com.mchange.v2.codegen,
- com.mchange.v2.codegen.bean,
- com.mchange.v2.codegen.intfc,
- com.mchange.v2.debug,
- com.mchange.v2.encounter,
- com.mchange.v2.holders,
- com.mchange.v2.io,
- com.mchange.v2.lang,
- com.mchange.v2.log,
- com.mchange.v2.log.jdk14logging,
- com.mchange.v2.log.log4j,
- com.mchange.v2.management,
- com.mchange.v2.naming,
- com.mchange.v2.resourcepool,
- com.mchange.v2.ser,
- com.mchange.v2.sql,
- com.mchange.v2.sql.filter,
- com.mchange.v2.util,
- com.opensymphony.oscache.base,
- com.opensymphony.oscache.base.algorithm,
- com.opensymphony.oscache.base.events,
- com.opensymphony.oscache.base.persistence,
- com.opensymphony.oscache.extra,
- com.opensymphony.oscache.general,
- com.opensymphony.oscache.plugins.clustersupport,
- com.opensymphony.oscache.plugins.diskpersistence,
- com.opensymphony.oscache.util,
- com.opensymphony.oscache.web,
- com.opensymphony.oscache.web.filter,
- com.opensymphony.oscache.web.tag,
- com.sun.security.auth,
- com.sun.security.auth.login,
- dao,
- doc,
- doc.entities,
- doc.tables,
- dot,
- dtd,
- freemarker,
- freemarker.cache,
- freemarker.core,
- freemarker.debug,
- freemarker.debug.impl,
- freemarker.ext.ant,
- freemarker.ext.beans,
- freemarker.ext.dom,
- freemarker.ext.jdom,
- freemarker.ext.jsp,
- freemarker.ext.jython,
- freemarker.ext.rhino,
- freemarker.ext.servlet,
- freemarker.ext.util,
- freemarker.ext.xml,
- freemarker.log,
- freemarker.template,
- freemarker.template.utility,
- hbm,
- javassist,
- javassist.bytecode,
- javassist.bytecode.analysis,
- javassist.bytecode.annotation,
- javassist.bytecode.stackmap,
- javassist.compiler,
- javassist.compiler.ast,
- javassist.convert,
- javassist.expr,
- javassist.runtime,
- javassist.scopedpool,
- javassist.tools,
- javassist.tools.reflect,
- javassist.tools.rmi,
- javassist.tools.web,
- javassist.util,
- javassist.util.proxy,
- javax.management,
- javax.management.loading,
- javax.management.modelmbean,
- javax.management.monitor,
- javax.management.openmbean,
- javax.management.relation,
- javax.management.timer,
- javax.persistence,
- javax.persistence.spi,
- javax.resource,
- javax.resource.cci,
- javax.resource.spi,
- javax.resource.spi.security,
- javax.security.auth,
- javax.security.auth.callback,
- javax.security.auth.login,
- javax.security.auth.spi,
- javax.sql,
- javax.transaction,
- javax.transaction.xa,
- lint,
- net.sf.cglib.beans,
- net.sf.cglib.core,
- net.sf.cglib.proxy,
- net.sf.cglib.reflect,
- net.sf.cglib.transform,
- net.sf.cglib.transform.impl,
- net.sf.cglib.util,
- net.sf.ehcache,
- net.sf.ehcache.bootstrap,
- net.sf.ehcache.config,
- net.sf.ehcache.constructs.asynchronous,
- net.sf.ehcache.constructs.blocking,
- net.sf.ehcache.constructs.concurrent,
- net.sf.ehcache.constructs.web,
- net.sf.ehcache.constructs.web.filter,
- net.sf.ehcache.distribution,
- net.sf.ehcache.event,
- net.sf.ehcache.hibernate,
- net.sf.ehcache.store,
- net.sf.ehcache.util,
- net.sf.swarmcache,
- org.apache.commons.collections,
- org.apache.commons.collections.bag,
- org.apache.commons.collections.bidimap,
- org.apache.commons.collections.buffer,
- org.apache.commons.collections.collection,
- org.apache.commons.collections.comparators,
- org.apache.commons.collections.functors,
- org.apache.commons.collections.iterators,
- org.apache.commons.collections.keyvalue,
- org.apache.commons.collections.list,
- org.apache.commons.collections.map,
- org.apache.commons.collections.set,
- org.apache.commons.logging,
- org.apache.commons.logging.impl,
- org.apache.log4j,
- org.apache.log4j.chainsaw,
- org.apache.log4j.config,
- org.apache.log4j.helpers,
- org.apache.log4j.jdbc,
- org.apache.log4j.jmx,
- org.apache.log4j.lf5,
- org.apache.log4j.lf5.config,
- org.apache.log4j.lf5.util,
- org.apache.log4j.lf5.viewer,
- org.apache.log4j.lf5.viewer.categoryexplorer,
- org.apache.log4j.lf5.viewer.configure,
- org.apache.log4j.lf5.viewer.images,
- org.apache.log4j.net,
- org.apache.log4j.nt,
- org.apache.log4j.or,
- org.apache.log4j.or.jms,
- org.apache.log4j.or.sax,
- org.apache.log4j.spi,
- org.apache.log4j.varia,
- org.apache.log4j.xml,
- org.apache.xerces.impl.xs,
- org.dom4j,
- org.dom4j.bean,
- org.dom4j.datatype,
- org.dom4j.dom,
- org.dom4j.dtd,
- org.dom4j.io,
- org.dom4j.jaxb,
- org.dom4j.rule,
- org.dom4j.rule.pattern,
- org.dom4j.swing,
- org.dom4j.tree,
- org.dom4j.util,
- org.dom4j.xpath,
- org.dom4j.xpp,
- org.hibernate,
- org.hibernate.action,
- org.hibernate.annotations,
- org.hibernate.annotations.common,
- org.hibernate.annotations.common.annotationfactory,
- org.hibernate.annotations.common.reflection,
- org.hibernate.annotations.common.reflection.java,
- org.hibernate.annotations.common.reflection.java.generics,
- org.hibernate.annotations.common.util,
- org.hibernate.bytecode,
- org.hibernate.bytecode.buildtime,
- org.hibernate.bytecode.cglib,
- org.hibernate.bytecode.javassist,
- org.hibernate.bytecode.util,
- org.hibernate.cache,
- org.hibernate.cache.access,
- org.hibernate.cache.entry,
- org.hibernate.cache.impl,
- org.hibernate.cache.impl.bridge,
- org.hibernate.cfg,
- org.hibernate.cfg.annotations,
- org.hibernate.cfg.annotations.reflection,
- org.hibernate.cfg.reveng,
- org.hibernate.cfg.reveng.dialect,
- org.hibernate.cfg.search,
- org.hibernate.classic,
- org.hibernate.collection,
- org.hibernate.connection,
- org.hibernate.console,
+Export-Package: org.hibernate.console,
org.hibernate.console.execution,
+ org.hibernate.console.ext,
org.hibernate.console.node,
org.hibernate.console.preferences,
- org.hibernate.context,
- org.hibernate.criterion,
- org.hibernate.dialect,
- org.hibernate.dialect.function,
- org.hibernate.dialect.lock,
- org.hibernate.dialect.resolver,
org.hibernate.eclipse,
org.hibernate.eclipse.launch,
org.hibernate.eclipse.logging,
- org.hibernate.eclipse.logging.xpl,
- org.hibernate.ejb,
- org.hibernate.ejb.connection,
- org.hibernate.ejb.event,
- org.hibernate.ejb.instrument,
- org.hibernate.ejb.packaging,
- org.hibernate.ejb.transaction,
- org.hibernate.ejb.util,
- org.hibernate.engine,
- org.hibernate.engine.loading,
- org.hibernate.engine.query,
- org.hibernate.engine.query.sql,
- org.hibernate.engine.transaction,
- org.hibernate.event,
- org.hibernate.event.def,
- org.hibernate.exception,
- org.hibernate.hql,
- org.hibernate.hql.antlr,
- org.hibernate.hql.ast,
- org.hibernate.hql.ast.exec,
- org.hibernate.hql.ast.tree,
- org.hibernate.hql.ast.util,
- org.hibernate.hql.classic,
- org.hibernate.id,
- org.hibernate.id.enhanced,
- org.hibernate.id.insert,
- org.hibernate.impl,
- org.hibernate.intercept,
- org.hibernate.intercept.cglib,
- org.hibernate.intercept.javassist,
- org.hibernate.jdbc,
- org.hibernate.jdbc.util,
- org.hibernate.jmx,
- org.hibernate.loader,
- org.hibernate.loader.collection,
- org.hibernate.loader.criteria,
- org.hibernate.loader.custom,
- org.hibernate.loader.custom.sql,
- org.hibernate.loader.entity,
- org.hibernate.loader.hql,
- org.hibernate.lob,
- org.hibernate.mapping,
- org.hibernate.metadata,
- org.hibernate.param,
- org.hibernate.persister,
- org.hibernate.persister.collection,
- org.hibernate.persister.entity,
- org.hibernate.pretty,
- org.hibernate.property,
- org.hibernate.proxy,
- org.hibernate.proxy.dom4j,
- org.hibernate.proxy.map,
- org.hibernate.proxy.pojo,
- org.hibernate.proxy.pojo.cglib,
- org.hibernate.proxy.pojo.javassist,
- org.hibernate.secure,
- org.hibernate.sql,
- org.hibernate.stat,
- org.hibernate.tool,
- org.hibernate.tool.ant,
- org.hibernate.tool.hbm2ddl,
- org.hibernate.tool.hbm2x,
- org.hibernate.tool.hbm2x.doc,
- org.hibernate.tool.hbm2x.pojo,
- org.hibernate.tool.hbm2x.visitor,
- org.hibernate.tool.hbmlint,
- org.hibernate.tool.hbmlint.detector,
- org.hibernate.tool.ide.completion,
- org.hibernate.tool.ide.formatting,
- org.hibernate.tool.instrument,
- org.hibernate.tool.instrument.cglib,
- org.hibernate.tool.instrument.javassist,
- org.hibernate.tool.stat,
- org.hibernate.transaction,
- org.hibernate.transform,
- org.hibernate.tuple,
- org.hibernate.tuple.component,
- org.hibernate.tuple.entity,
- org.hibernate.type,
- org.hibernate.usertype,
- org.hibernate.util,
- org.hibernate.validator,
- org.hibernate.validator.event,
- org.hibernate.validator.interpolator,
- org.hibernate.validator.resources,
- org.jboss,
- org.jboss.cache,
- org.jboss.cache.aop,
- org.jboss.cache.aop.annotation,
- org.jboss.cache.aop.collection,
- org.jboss.cache.aop.eviction,
- org.jboss.cache.aop.interceptors,
- org.jboss.cache.aop.references,
- org.jboss.cache.aop.util,
- org.jboss.cache.buddyreplication,
- org.jboss.cache.config,
- org.jboss.cache.eviction,
- org.jboss.cache.factories,
- org.jboss.cache.interceptors,
- org.jboss.cache.loader,
- org.jboss.cache.loader.bdbje,
- org.jboss.cache.loader.jdbm,
- org.jboss.cache.loader.rmi,
- org.jboss.cache.loader.tcp,
- org.jboss.cache.lock,
- org.jboss.cache.marshall,
- org.jboss.cache.optimistic,
- org.jboss.cache.rpc,
- org.jboss.cache.statetransfer,
- org.jboss.cache.transaction,
- org.jboss.cache.util,
- org.jboss.cache.xml,
- org.jboss.deployment,
- org.jboss.deployment.cache,
- org.jboss.deployment.scanner,
- org.jboss.logging,
- org.jboss.logging.appender,
- org.jboss.logging.filter,
- org.jboss.logging.layout,
- org.jboss.logging.util,
- org.jboss.mx.capability,
- org.jboss.mx.interceptor,
- org.jboss.mx.loading,
- org.jboss.mx.metadata,
- org.jboss.mx.modelmbean,
- org.jboss.mx.notification,
- org.jboss.mx.persistence,
- org.jboss.mx.server,
- org.jboss.mx.server.registry,
- org.jboss.mx.service,
- org.jboss.mx.util,
- org.jboss.mx.util.propertyeditor,
- org.jboss.net.protocol,
- org.jboss.net.protocol.file,
- org.jboss.net.protocol.http,
- org.jboss.net.protocol.njar,
- org.jboss.net.protocol.resource,
- org.jboss.net.sockets,
- org.jboss.net.ssl,
- org.jboss.system,
- org.jboss.system.pm,
- org.jboss.system.server,
- org.jboss.util,
- org.jboss.util.coerce,
- org.jboss.util.collection,
- org.jboss.util.deadlock,
- org.jboss.util.file,
- org.jboss.util.id,
- org.jboss.util.loading,
- org.jboss.util.platform,
- org.jboss.util.property,
- org.jboss.util.property.jmx,
- org.jboss.util.propertyeditor,
- org.jboss.util.state,
- org.jboss.util.state.xml,
- org.jboss.util.stream,
- org.jboss.util.threadpool,
- org.jboss.util.timeout,
- org.jboss.util.xml,
- org.jboss.xml,
- org.jboss.xml.binding,
- org.jboss.xml.binding.metadata,
- org.jboss.xml.binding.metadata.marshalling,
- org.jboss.xml.binding.metadata.unmarshalling,
- org.jboss.xml.binding.metadata.unmarshalling.impl,
- org.jboss.xml.binding.parser,
- org.jboss.xml.binding.parser.sax,
- org.jboss.xml.binding.parser.xni,
- org.jgroups,
- org.jgroups.blocks,
- org.jgroups.conf,
- org.jgroups.debug,
- org.jgroups.demos,
- org.jgroups.demos.applets,
- org.jgroups.demos.wb,
- org.jgroups.persistence,
- org.jgroups.protocols,
- org.jgroups.protocols.pbcast,
- org.jgroups.protocols.ring,
- org.jgroups.service,
- org.jgroups.service.lease,
- org.jgroups.stack,
- org.jgroups.tests,
- org.jgroups.tests.adapt,
- org.jgroups.tests.adaptjms,
- org.jgroups.tests.adapttcp,
- org.jgroups.tests.adaptudp,
- org.jgroups.tests.perf,
- org.jgroups.tests.perf.transports,
- org.jgroups.tests.stack,
- org.jgroups.util,
- org.logicalcobwebs.asm,
- org.logicalcobwebs.asm.tree,
- org.logicalcobwebs.asm.util,
- org.logicalcobwebs.cglib.core,
- org.logicalcobwebs.cglib.proxy,
- org.logicalcobwebs.cglib.reflect,
- org.logicalcobwebs.cglib.util,
- org.logicalcobwebs.concurrent,
- org.logicalcobwebs.logging,
- org.logicalcobwebs.logging.impl,
- org.logicalcobwebs.proxool,
- org.logicalcobwebs.proxool.admin,
- org.logicalcobwebs.proxool.admin.jmx,
- org.logicalcobwebs.proxool.admin.servlet,
- org.logicalcobwebs.proxool.configuration,
- org.logicalcobwebs.proxool.resources,
- org.logicalcobwebs.proxool.util,
- org.objectweb.asm,
- org.objectweb.asm.attrs,
- org.objectweb.asm.signature,
- org.slf4j,
- org.slf4j.helpers,
- org.slf4j.impl,
- org.slf4j.spi,
- org.w3c.tidy,
- org.w3c.tidy.ant,
- pojo
-Require-Bundle: org.eclipse.core.runtime,
+ org.hibernate.eclipse.logging.xpl
+Require-Bundle: org.hibernate.eclipse.libs;bundle-version="1.0.0",
+ org.eclipse.core.runtime,
org.eclipse.ui.console,
org.eclipse.jface,
org.eclipse.jdt.apt.core,
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/build.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/build.properties 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/build.properties 2011-10-03 13:42:27 UTC (rev 35281)
@@ -1,34 +1,22 @@
-bin.includes = lib/,\
- META-INF/,\
+bin.includes = META-INF/,\
hibernate-log4j.properties,\
about.html,\
- lib/tools/jtidy-r8-20060801.jar,\
- lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar,\
- lib/hibernate/javassist.jar,\
- lib/hibernate/ehcache-1.2.3.jar,\
- lib/hibernate/c3p0-0.9.1.jar,\
- lib/annotations/hibernate-validator.jar,\
- lib/hibernate/log4j-1.2.15.jar,\
- lib/hibernate/slf4j-api-1.5.8.jar,\
- lib/hibernate/slf4j-log4j12-1.5.8.jar,\
about.ini,\
about.mappings,\
about.properties,\
hibernate_icon.gif,\
plugin.properties,\
- lib/hibernate/cglib-2.2.jar,\
- lib/hibernate/commons-collections-3.1.jar,\
- org.hibernate.eclipse.jar
+ org.hibernate.eclipse.jar,\
+ plugin.xml
jars.compile.order = org.hibernate.eclipse.jar
src.includes = about.html,\
pom.xml,\
- lib/,\
hibernate_icon.gif,\
hibernate-log4j.properties,\
hibernate-build.xml,\
about.properties,\
about.mappings,\
- about.ini
-bin.excludes = lib/.cvsignore
+ about.ini,\
+ schema/
source.org.hibernate.eclipse.jar = src/
output.org.hibernate.eclipse.jar = build/eclipse
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/plugin.xml
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/plugin.xml (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/plugin.xml 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension-point id="hibernateextension" name="Hibernate Extension" schema="schema/hibernateextension.exsd"/>
+</plugin>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/schema/hibernateextension.exsd
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/schema/hibernateextension.exsd (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/schema/hibernateextension.exsd 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.hibernate.eclipse" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.hibernate.eclipse" id="hibernateextension" name="Hibernate Extension"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="hibernateextension"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="hibernateextension">
+ <complexType>
+ <attribute name="classname" type="string" use="required">
+ <annotation>
+ <documentation>
+ The fully qualified class name of the class that implements org.hibernate.console.ext.HibernateExtension
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.hibernate.console.ext.HibernateExtension"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="version" type="string" use="required">
+ <annotation>
+ <documentation>
+ The hibernate version which is supported by the extension.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -35,7 +35,7 @@
*/
public abstract class AbstractQueryPage implements QueryPage {
- PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+ protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
private int id;
private Session session;
private final ConsoleConfiguration cfg;
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -42,10 +42,14 @@
import org.hibernate.cfg.Settings;
import org.hibernate.console.execution.DefaultExecutionContext;
import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.execution.ExecutionContext.Command;
import org.hibernate.console.execution.ExecutionContextHolder;
-import org.hibernate.console.execution.ExecutionContext.Command;
+import org.hibernate.console.ext.ExtensionManager;
+import org.hibernate.console.ext.HibernateExtension;
+import org.hibernate.console.ext.HibernateExtensionDefinition;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.console.preferences.PreferencesClassPathUtils;
+import org.hibernate.tool.hbm2x.StringUtils;
public class ConsoleConfiguration implements ExecutionContextHolder {
@@ -57,16 +61,51 @@
/* TODO: move this out to the actual users of the configuraiton/sf ? */
private Configuration configuration;
private SessionFactory sessionFactory;
+
+ //****************************** EXTENSION **********************
+ private String hibernateVersion;
+
+ private HibernateExtension extension;
+
+ //TODO do we need to create new instance every time???
+ public HibernateExtension getConsoleConfigurationExtension(){
+ return extension;
+ }
+
+ private void loadHibernateExtension(){
+ String version = hibernateVersion == null ? "3.5" : hibernateVersion;//3.5 is a default version
+ HibernateExtensionDefinition def = ExtensionManager.findHibernateExtensionDefinition(version);
+ if (def != null){
+ HibernateExtension hibernateExtension = def.createHibernateExtensionInstance();
+ hibernateExtension.setConsoleConfigurationPreferences(prefs);
+ extension = hibernateExtension;
+ } else {
+ throw new IllegalArgumentException("Can't find definition for hibernate version " + version);
+ }
+ }
+
+ private void setHibernateVersion(String hibernateVersion){
+ if (!StringUtils.equals(this.hibernateVersion, hibernateVersion)){
+ this.hibernateVersion = hibernateVersion;
+ loadHibernateExtension();
+ }
+ }
+
+ public HibernateExtension getHibernateExtension(){
+ return this.extension;
+ }
+
+ //****************************** EXTENSION **********************
+
+ public ConsoleConfiguration(ConsoleConfigurationPreferences config) {
+ prefs = config;
+ }
/** Unique name for this configuration */
public String getName() {
return prefs.getName();
}
- public ConsoleConfiguration(ConsoleConfigurationPreferences config) {
- prefs = config;
- }
-
public Object execute(Command c) {
if (executionContext != null) {
return executionContext.execute(c);
@@ -84,10 +123,15 @@
public boolean reset() {
boolean res = false;
// reseting state
+ if (getHibernateExtension() != null ) {
+ getHibernateExtension().reset();
+ getHibernateExtension().closeSessionFactory();
+ }
if (configuration != null) {
configuration = null;
res = true;
}
+
boolean tmp = closeSessionFactory();
res = res || tmp;
if (executionContext != null) {
@@ -164,6 +208,8 @@
public void build() {
configuration = buildWith(null, true);
+ setHibernateVersion(prefs.getHibernateVersion());
+ getHibernateExtension().build();
fireConfigurationBuilt();
}
@@ -217,6 +263,7 @@
return csf.createConfiguration(cfg, includeMappings);
}
});
+ //extension.buildWith(cfg, includeMappings);
return result;
}
@@ -247,6 +294,7 @@
return null;
}
});
+ getHibernateExtension().buildSessionFactory();
}
public SessionFactory getSessionFactory() {
@@ -262,17 +310,17 @@
}
public QueryPage executeHQLQuery(final String hql, final QueryInputModel queryParameters) {
- return (QueryPage)execute(new Command() {
- public Object execute() {
- Session session = getSessionFactory().openSession();
+ /*Session session = getSessionFactory().openSession();
QueryPage qp = new HQLQueryPage(ConsoleConfiguration.this,hql,queryParameters);
qp.setSession(session);
qp.setId(++execcount);
fireQueryPageCreated(qp);
+ return qp;*/
+ QueryPage qp = new org.hibernate.console.ext.HQLQueryPage(ConsoleConfiguration.this,hql,queryParameters);
+ qp.setId(++execcount);
+ fireQueryPageCreated(qp);
return qp;
- }
- });
}
public QueryPage executeBSHQuery(final String queryString, final QueryInputModel model) {
@@ -398,6 +446,9 @@
sessionFactory = null;
res = true;
}
+ if (getHibernateExtension() != null){
+ getHibernateExtension().closeSessionFactory();
+ }
return res;
}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.console.ext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ExtensionManager {
+
+ public static final String HIBERNATEEXTENSION_EXTENSION_ID = "org.hibernate.eclipse.hibernateextension"; //$NON-NLS-1$
+
+ private static Map<String, HibernateExtensionDefinition> hibernateExtensions;
+
+ private static IExtension[] findExtensions(String extensionId) {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry
+ .getExtensionPoint(extensionId);
+ return extensionPoint.getExtensions();
+ }
+
+ public static HibernateExtensionDefinition[] findHiberanteExtensionDefinitions() {
+ List<HibernateExtensionDefinition> exporters = new ArrayList<HibernateExtensionDefinition>();
+
+ IExtension[] extensions = findExtensions(HIBERNATEEXTENSION_EXTENSION_ID);
+ for (int i = 0; i < extensions.length; i++) {
+ IConfigurationElement elements[] = extensions[i].getConfigurationElements();
+ for (int j = 0; j < elements.length; j++) {
+ HibernateExtensionDefinition extensiodDefinition = new HibernateExtensionDefinition(
+ elements[j]);
+ exporters.add(extensiodDefinition);
+ }
+ }
+
+ return exporters.toArray(new HibernateExtensionDefinition[exporters.size()]);
+ }
+
+ /**
+ * return map of ExporterDefinitions keyed by id
+ */
+ public static synchronized Map<String, HibernateExtensionDefinition> getExporterDefinitionsAsMap() {
+ if (hibernateExtensions == null){
+ //TODO add good comparator here(we often need the keys ordered)
+ hibernateExtensions = new TreeMap<String, HibernateExtensionDefinition>();
+
+ HibernateExtensionDefinition[] findExporterDefinitions = findHiberanteExtensionDefinitions();
+ for (int i = 0; i < findExporterDefinitions.length; i++) {
+ HibernateExtensionDefinition exporterDefinition = findExporterDefinitions[i];
+ hibernateExtensions.put(exporterDefinition.getHibernateVersion(),
+ exporterDefinition);
+ }
+ }
+
+ return hibernateExtensions;
+ }
+
+ public static HibernateExtensionDefinition findHibernateExtensionDefinition(String hibernateVersion){
+ return getExporterDefinitionsAsMap().get(hibernateVersion);
+ }
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HQLQueryPage.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HQLQueryPage.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HQLQueryPage.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,95 @@
+package org.hibernate.console.ext;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.console.AbstractQueryPage;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.QueryInputModel;
+
+/**
+ *
+ * @author Dmitry Geraskov
+ *
+ */
+public class HQLQueryPage extends AbstractQueryPage {
+
+ private String queryString;
+ private QueryResult queryResult;
+
+ /**
+ * @param session
+ * @param string
+ * @param queryParameters
+ */
+ public HQLQueryPage(ConsoleConfiguration cfg, String string, QueryInputModel model) {
+ super(cfg, model);
+ queryString = string;
+ setTabName(getQueryString().replace('\n', ' ').replace('\r', ' '));
+ }
+
+ public List<Object> getList() {
+ if (queryString==null) return Collections.emptyList();
+ if (list == null) {
+ updateQueryResults();
+ }
+ return list;
+ }
+
+ private void updateQueryResults(){
+ try {
+ list = new ArrayList<Object>();
+ long startTime = System.currentTimeMillis();
+ queryResult = getConsoleConfiguration().getConsoleConfigurationExtension()
+ .executeHQLQuery(queryString, model);
+ Iterator<?> iter = queryResult.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
+ queryTime = System.currentTimeMillis() - startTime;
+ while (iter.hasNext() ) {
+ Object element = iter.next();
+ list.add(element);
+ }
+ pcs.firePropertyChange("list", null, list); //$NON-NLS-1$
+ } catch (HibernateException e) {
+ list = Collections.emptyList();
+ addException(e);
+ } catch (IllegalArgumentException e) {
+ list = Collections.emptyList();
+ addException(e);
+ }
+ }
+
+ public List<String> getPathNames() {
+ try {
+ if (queryResult == null){
+ updateQueryResults();
+ }
+ } catch (HibernateException e) {
+ addException(e);
+ }
+
+ return queryResult == null ? Collections.<String>emptyList() : queryResult.getPathNames();
+ }
+
+ public void setSession(Session s) {
+ //do nothing - remove this method
+ }
+
+ @Override
+ public void release() {
+ //session is not set, nothing to release
+ }
+
+ public String getQueryString() {
+ return queryString;
+ }
+
+ public void setQueryString(String queryString) {
+ this.queryString = queryString;
+ list = null;
+ }
+
+}
\ No newline at end of file
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateException.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateException.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateException.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.console.ext;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ public HibernateException(RuntimeException cause) {
+ super(cause);
+ }
+
+ public HibernateException(String message){
+ super(message);
+ }
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtension.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtension.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtension.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.console.ext;
+
+import org.hibernate.console.QueryInputModel;
+import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface HibernateExtension {
+
+ public void setConsoleConfigurationPreferences(ConsoleConfigurationPreferences prefs);
+
+ public void build();
+
+ public void buildSessionFactory();
+
+ public boolean closeSessionFactory();
+
+ public boolean reset();
+
+ public String getHibernateVersion();
+
+ public QueryResult executeHQLQuery(final String hql, final QueryInputModel queryParameters);
+
+ public QueryResult executeCriteriaQuery(final String criteria, final QueryInputModel queryParameters);
+
+ //FIXME remove this method
+ public boolean hasConfiguration();
+ /*
+ //FIXME remove this method
+ public Object getConfiguration();
+ //FIXME remove this method
+ public Object getSessionFactory();
+ //FIXME remove this method
+ */
+
+
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtensionDefinition.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtensionDefinition.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtensionDefinition.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.console.ext;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.osgi.util.NLS;
+import org.hibernate.console.HibernateConsoleRuntimeException;
+import org.hibernate.util.ReflectHelper;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateExtensionDefinition {
+
+ public static final String CLASSNAME = "classname"; //$NON-NLS-1$
+
+ public static final String HIBERNATE_VERSION = "version"; //$NON-NLS-1$
+
+ private final String classname;
+
+ private final String hibernateVersion;
+
+ private IConfigurationElement element;
+
+ public HibernateExtensionDefinition(IConfigurationElement element) {
+ this(element.getAttribute( CLASSNAME ),
+ element.getAttribute( HIBERNATE_VERSION ));
+ this.element = element;
+ }
+
+ private HibernateExtensionDefinition(String classname, String hibernateVersion) {
+ this.classname = classname;
+ this.hibernateVersion = hibernateVersion;
+ }
+
+ //TODO do we need to create new instance every time?
+ public HibernateExtension createHibernateExtensionInstance() {
+ HibernateExtension hiberanteExtension = null;
+
+ try {
+ // hiberanteExtension = (HibernateExtension) ReflectHelper.classForName( classname ).newInstance();
+ hiberanteExtension = (HibernateExtension) element.createExecutableExtension(CLASSNAME);
+ }
+ /* catch (InstantiationException e) {
+ throw new HibernateConsoleRuntimeException(NLS.bind(
+ "Problem while creating hibernate extension instance {0}", classname));
+ }
+ catch (IllegalAccessException e) {
+ throw new HibernateConsoleRuntimeException(NLS.bind(
+ "Problem while creating hibernate extension instance {0}", classname)); }
+ catch (ClassNotFoundException e) {
+ throw new HibernateConsoleRuntimeException(NLS.bind(
+ "Problem while creating hibernate extension instance {0}", classname));
+ } */catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ return hiberanteExtension;
+ }
+
+ /**
+ * @return the hibernateVersion
+ */
+ public String getHibernateVersion() {
+ return hibernateVersion;
+ }
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/JavaPage.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/JavaPage.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/JavaPage.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.console.ext;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.Criteria;
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.console.AbstractQueryPage;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.ConsoleMessages;
+import org.hibernate.console.QueryInputModel;
+import org.hibernate.engine.SessionImplementor;
+
+import bsh.EvalError;
+import bsh.Interpreter;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class JavaPage extends AbstractQueryPage {
+
+ private String criteriaCode;
+ private QueryResult queryResult;
+
+ Criteria criteria = null;
+
+ private Interpreter ip;
+
+ /**
+ * @param model
+ * @param session2
+ */
+ public JavaPage(ConsoleConfiguration cfg, String criteriaCode, QueryInputModel model) {
+ super(cfg, model);
+ this.criteriaCode = criteriaCode;
+ setTabName(getQueryString().replace('\n', ' ').replace('\r', ' '));
+ }
+
+ @SuppressWarnings("unchecked")
+ public void setSession(Session s) {
+ super.setSession(s);
+ try {
+ if(criteriaCode.indexOf( "System.exit" )>=0) { // TODO: externalize run so we don't need this bogus check! //$NON-NLS-1$
+ list = Collections.emptyList();
+ addException( new IllegalArgumentException(ConsoleMessages.JavaPage_not_allowed) );
+ return;
+ }
+ ip = setupInterpreter(getSession() );
+ Object o = ip.eval(criteriaCode);
+ // ugly! TODO: make un-ugly!
+ if(o instanceof Criteria) {
+ criteria = (Criteria) o;
+ if(model.getMaxResults()!=null) {
+ criteria.setMaxResults( model.getMaxResults().intValue() );
+ }
+ } else if (o instanceof List<?>) {
+ list = (List<Object>) o;
+ if(model.getMaxResults()!=null) {
+ list = list.subList( 0, Math.min( list.size(), model.getMaxResults().intValue() ) );
+ }
+ } else {
+ list = new ArrayList<Object>();
+ list.add(o);
+ }
+ }
+ catch (EvalError e) {
+ addException(e);
+ }
+ catch (HibernateException e) {
+ addException(e);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private Interpreter setupInterpreter(Session session) throws EvalError, HibernateException {
+ Interpreter interpreter = new Interpreter();
+
+ interpreter.set("session", session); //$NON-NLS-1$
+ interpreter.setClassLoader( Thread.currentThread().getContextClassLoader() );
+ SessionImplementor si = (SessionImplementor)session;
+
+ Map<String, ?> map = si.getFactory().getAllClassMetadata();
+
+ Iterator<String> iterator = map.keySet().iterator();
+ //TODO: filter non classes.
+ StringBuilder imports = new StringBuilder(35*(2+map.size()));
+ while (iterator.hasNext() ) {
+ String element = iterator.next();
+ imports.append("import ").append(element).append(";\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ imports.append("import org.hibernate.criterion.*;\n"); //$NON-NLS-1$
+ imports.append("import org.hibernate.*;\n"); //$NON-NLS-1$
+ // TODO: expose the parameters as values to be used in the code.
+ interpreter.eval(imports.toString());
+
+ return interpreter;
+ }
+
+ public List<Object> getList() {
+ if (criteriaCode==null) return Collections.emptyList();
+ if (list == null) {
+ try {
+ list = new ArrayList<Object>();
+ long startTime = System.currentTimeMillis();
+ queryResult = getConsoleConfiguration().getConsoleConfigurationExtension()
+ .executeCriteriaQuery(criteriaCode, model);
+ Iterator<?> iter = queryResult.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
+ queryTime = System.currentTimeMillis() - startTime;
+ while (iter.hasNext() ) {
+ Object element = iter.next();
+ list.add(element);
+ }
+ pcs.firePropertyChange("list", null, list); //$NON-NLS-1$
+ } catch (HibernateException e) {
+ list = Collections.emptyList();
+ addException(e);
+ } catch (IllegalArgumentException e) {
+ list = Collections.emptyList();
+ addException(e);
+ }
+ }
+ return list;
+ }
+
+ public List<String> getPathNames() {
+ try {
+ return queryResult == null ? Collections.<String>emptyList() : queryResult.getPathNames();
+ } catch (HibernateException e) {
+ addException(e);
+ }
+ return null;
+ }
+
+ public String getQueryString() {
+ return criteriaCode;
+ }
+ public void setQueryString(String queryString) {
+ this.criteriaCode = queryString;
+ list = null;
+ ip = null;
+ }
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResult.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResult.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResult.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.console.ext;
+
+import java.util.List;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface QueryResult {
+
+ public List<Object> list();
+
+ public List<String> getPathNames();
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResultImpl.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResultImpl.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResultImpl.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.console.ext;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class QueryResultImpl implements QueryResult {
+
+ private List<Object> list;
+
+ private List<String> pathNames = Collections.emptyList();
+
+ private long execTime;
+
+ public QueryResultImpl(List<Object> list, long execTime){
+ this.list = list;
+ this.execTime = execTime;
+ }
+
+ public QueryResultImpl(List<Object> list, List<String> pathNames, long execTime){
+ this(list, execTime);
+ this.pathNames = pathNames;
+ }
+
+ @Override
+ public List<Object> list() {
+ return list;
+ }
+
+ @Override
+ public List<String> getPathNames() {
+ return pathNames;
+ }
+
+ public long getExecTime() {
+ return execTime;
+ }
+
+}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -55,9 +55,9 @@
private String namingStrategy;
private String connectionProfile;
private String dialectName;
-
+ private String hibernateVersion;
- public AbstractConsoleConfigurationPreferences(String name, ConfigurationMode configurationMode,
+ public AbstractConsoleConfigurationPreferences(String name, ConfigurationMode configurationMode, String hibernateVersion,
String projectName, boolean useProjectclassPath, String entityResolver,
String persistenceUnitName, String namingStrategy,
String connectionProfile, String dialectName) {
@@ -312,4 +312,18 @@
return n;
}
+ /**
+ * @return the hibernateVersion
+ */
+ public String getHibernateVersion() {
+ return hibernateVersion;
+ }
+
+ /**
+ * @param hibernateVersion the hibernateVersion to set
+ */
+ public void setHibernateVersion(String hibernateVersion) {
+ this.hibernateVersion = hibernateVersion;
+ }
+
}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -35,6 +35,7 @@
*/
public interface ConsoleConfigurationPreferences {
+ static final String HIBERNATE_VERSION = "hibernate-version"; //$NON-NLS-1$
static final String PATH_TAG = "path"; //$NON-NLS-1$
static final String CLASSPATH_TAG = "classpath"; //$NON-NLS-1$
static final String MAPPING_TAG = "mapping"; //$NON-NLS-1$
@@ -114,6 +115,11 @@
}
}
+ /**
+ *
+ * @return Hibernate version String or null if default should be used
+ */
+ public abstract String getHibernateVersion();
public abstract ConfigurationMode getConfigurationMode();
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -45,8 +45,8 @@
private File[] mappings;
private File[] customClasspath;
- public StandAloneConsoleConfigurationPreferences(String name, File xmlconfig, File propertiesFile, File[] mappingFiles, File[] customClasspath) {
- super(name, ConfigurationMode.CORE, null, false, null, null, null, null, null);
+ public StandAloneConsoleConfigurationPreferences(String name, String hibernateVersion, File xmlconfig, File propertiesFile, File[] mappingFiles, File[] customClasspath) {
+ super(name, ConfigurationMode.CORE, hibernateVersion, null, false, null, null, null, null, null);
this.cfgFile = xmlconfig;
this.propertyFilename = propertiesFile;
this.mappings = mappingFiles;
@@ -57,8 +57,8 @@
// hidden for others
}
- protected StandAloneConsoleConfigurationPreferences(String name) {
- this(name,null,null,new File[0],new File[0]);
+ protected StandAloneConsoleConfigurationPreferences(String name, String hibernateVersion) {
+ this(name,hibernateVersion,null,null,new File[0],new File[0]);
}
/**
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogManager.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogManager.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/PluginLogManager.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -42,6 +42,9 @@
import org.eclipse.core.runtime.ILogListener;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Plugin;
+import org.hibernate.console.execution.DefaultExecutionContext;
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.execution.ExecutionContext.Command;
/**
* PluginLogManager
@@ -92,7 +95,7 @@
* @param plugin the plug-in object
* @param properties log configuration properties
*/
- public PluginLogManager(Plugin plugin, LoggingHelper helper, URL log4jUrl) {
+ public PluginLogManager(Plugin plugin, LoggingHelper helper, final URL log4jUrl) {
this.log = plugin.getLog();
this.stateLocation = plugin.getStateLocation();
this.hierarchy = new Hierarchy(new RootLogger(Level.DEBUG));
@@ -104,7 +107,14 @@
}
}, "hibernate-tools"); //$NON-NLS-1$
- OptionConverter.selectAndConfigure(log4jUrl, null, this.hierarchy);
+ ExecutionContext ec = new DefaultExecutionContext("logConfiguration", getClass().getClassLoader()); //$NON-NLS-1$
+ ec.execute(new Command(){
+ @Override
+ public Object execute() {
+ OptionConverter.selectAndConfigure(log4jUrl, null, hierarchy);
+ return null;
+ }});
+
this.helper = helper;
helper.addLogManager(this);
}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF 2011-10-03 13:42:27 UTC (rev 35281)
@@ -41,7 +41,8 @@
org.hibernate.eclipse.launch.core.refactoring,
org.hibernate.eclipse.nature,
org.hibernate.eclipse.util.xpl
-Require-Bundle: org.hibernate.eclipse,
+Require-Bundle: org.hibernate.eclipse.libs;bundle-version="1.0.0",
+ org.hibernate.eclipse,
org.eclipse.jdt.ui,
org.eclipse.jdt.core,
org.eclipse.core.runtime,
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseConsoleConfigurationPreferences.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseConsoleConfigurationPreferences.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseConsoleConfigurationPreferences.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -59,11 +59,12 @@
private IPath[] customClasspath = new IPath[0];
public EclipseConsoleConfigurationPreferences(String configName,
- ConfigurationMode cmode, String projectName, boolean useProjectClasspath,
+ ConfigurationMode cmode, String hibernateVersion, String projectName, boolean useProjectClasspath,
String entityResolver, IPath cfgFile, IPath propertyFilename,
IPath[] mappings, IPath[] classpaths, String persistenceUnitName, String namingStrategy,
String connectionProfile, String dialectName) {
- super(configName, cmode, projectName, useProjectClasspath, entityResolver, persistenceUnitName, namingStrategy, connectionProfile, dialectName);
+ super(configName, cmode, hibernateVersion, projectName, useProjectClasspath,
+ entityResolver, persistenceUnitName, namingStrategy, connectionProfile, dialectName);
this.cfgFile = cfgFile;
this.propertyFilename = propertyFilename;
this.mappings = mappings;
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/EclipseLaunchConsoleConfigurationPreferences.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -240,4 +240,11 @@
return prop.size() == 0 ? null : prop;
}
+
+
+ @Override
+ public String getHibernateVersion() {
+ return getAttribute(IConsoleConfigurationLaunchConstants.HIBERNATE_VERSION, null);
+ }
+
}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/HibernatePropertySourceProvider.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/HibernatePropertySourceProvider.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/HibernatePropertySourceProvider.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -50,13 +50,13 @@
}
else {
// maybe we should be hooked up with the queryview to get this ?
- Session currentSession = view.getSelectedQueryPage().getSession();
+ /*Session currentSession = view.getSelectedQueryPage().getSession();
String consoleConfigName = view.getSelectedQueryPage().getConsoleConfiguration().getName();
if((currentSession.isOpen() && currentSession.contains(object)) || hasMetaData( object, currentSession) ) {
return new EntityPropertySource(object, currentSession, consoleConfigName);
- } else {
+ } else {*/
return null;
- }
+ //}
}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -67,6 +67,8 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchPreferenceConstants;
import org.eclipse.ui.PlatformUI;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
import org.hibernate.eclipse.console.EclipseConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -33,15 +33,17 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
import org.hibernate.console.ImageConstants;
+import org.hibernate.console.ext.ExtensionManager;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
@@ -58,6 +60,7 @@
protected boolean configurationFileWillBeCreated = false;
private Button coreMode;
+ private Combo hibernateVersion;
private Button jpaMode;
private Button annotationsMode;
private Button confbutton;
@@ -108,7 +111,8 @@
private void createConfigurationMode(Composite container) {
Group group = createGroup( container, HibernateConsoleMessages.ConsoleConfigurationMainTab_type);
- group.setLayout( new RowLayout( SWT.HORIZONTAL ) );
+ //group.setLayout( new RowLayout( SWT.HORIZONTAL ) );
+ group.setLayout(new GridLayout(4, false));
coreMode = new Button(group, SWT.RADIO);
coreMode.setText(HibernateConsoleMessages.ConsoleConfigurationMainTab_core);
coreMode.addSelectionListener( getChangeListener() );
@@ -119,6 +123,17 @@
jpaMode = new Button(group, SWT.RADIO);
jpaMode.setText(HibernateConsoleMessages.ConsoleConfigurationMainTab_jpa);
jpaMode.addSelectionListener( getChangeListener() );
+ new Label(group, SWT.NULL);
+ Composite comp2 = new Composite(group, SWT.NULL);
+ comp2.setLayout(new GridLayout(2, false));
+ comp2.setLayoutData(new GridData(GridData.BEGINNING, -1, false, false, 2, 1));
+ Label hLabel = new Label(comp2, SWT.NULL);
+ hLabel.setText("Hiberante Version:");
+ hibernateVersion = new Combo(comp2, SWT.READ_ONLY);
+ hibernateVersion.setItems((String[])ExtensionManager.getExporterDefinitionsAsMap().keySet().toArray(new String[0]));
+ hibernateVersion.select(0);
+ hibernateVersion.setLayoutData(new GridData(53, -1));
+ hibernateVersion.addModifyListener(getChangeListener());
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
group.setLayoutData( gd );
@@ -170,6 +185,7 @@
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
String projectName = nonEmptyTrimOrNull( projectNameText );
configuration.setAttribute(IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY, getConfigurationMode().toString());
+ configuration.setAttribute(IConsoleConfigurationLaunchConstants.HIBERNATE_VERSION, getHibernateVersion());
configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);
if (projectName != null){
configuration.setAttribute(LaunchConfiguration.ATTR_MAPPED_RESOURCE_PATHS,
@@ -200,6 +216,7 @@
try {
ConfigurationMode cm = ConfigurationMode.parse(configuration.getAttribute( IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY, "" )); //$NON-NLS-1$
coreMode.setSelection( cm.equals( ConfigurationMode.CORE ) );
+ hibernateVersion.setText(configuration.getAttribute( IConsoleConfigurationLaunchConstants.HIBERNATE_VERSION, ""));
annotationsMode.setSelection( cm.equals( ConfigurationMode.ANNOTATIONS ) );
jpaMode.setSelection( cm.equals( ConfigurationMode.JPA ) );
@@ -497,6 +514,10 @@
return ConfigurationMode.CORE;
}
}
+
+ public String getHibernateVersion(){
+ return "".equals(hibernateVersion.getText()) ? null : hibernateVersion.getText();
+ }
String getProjectName() {
return projectNameText.getText();
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/IConsoleConfigurationLaunchConstants.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/IConsoleConfigurationLaunchConstants.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/IConsoleConfigurationLaunchConstants.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -12,6 +12,7 @@
public static final String CFG_XML_FILE = ID + ".CFG_XML_FILE"; //$NON-NLS-1$
public static final String PERSISTENCE_UNIT_NAME = ID + ".PERSISTENCE_UNIT_NAME"; //$NON-NLS-1$
public static final String CONFIGURATION_FACTORY = ID + ".CONFIGURATION_FACTORY"; //$NON-NLS-1$
+ public static final String HIBERNATE_VERSION = ID + ".HIBERNATE_VERSION"; //$NON-NLS-1$
public static final String CONNECTION_PROFILE_NAME = ID + ".CONNECTION_PROFILE_NAME"; //$NON-NLS-1$
public static final String USE_JPA_PROJECT_PROFILE = ID + ".USE_JPA_PROJECT_PROFILE"; //$NON-NLS-1$
public static final String FILE_MAPPINGS = ID + ".FILE_MAPPINGS"; //$NON-NLS-1$
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.jdt.ui/META-INF/MANIFEST.MF 2011-10-03 13:42:27 UTC (rev 35281)
@@ -20,7 +20,8 @@
org.hibernate.eclipse.console,
org.eclipse.ui.editors,
org.eclipse.ltk.core.refactoring,
- org.eclipse.ltk.ui.refactoring
+ org.eclipse.ltk.ui.refactoring,
+ org.hibernate.eclipse.libs;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.hibernate.eclipse.jdt.ui,
org.hibernate.eclipse.jdt.ui.internal,
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.mapper/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.mapper/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.mapper/META-INF/MANIFEST.MF 2011-10-03 13:42:27 UTC (rev 35281)
@@ -37,6 +37,7 @@
org.hibernate.eclipse.console,
org.eclipse.wst.dtd.core,
org.eclipse.wst.common.ui,
- org.eclipse.pde.core
+ org.eclipse.pde.core,
+ org.hibernate.eclipse.libs;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2011-10-03 13:42:27 UTC (rev 35281)
@@ -21,7 +21,8 @@
org.eclipse.text;bundle-version="3.5.100",
org.eclipse.jst.j2ee;bundle-version="1.1.500",
org.eclipse.persistence.jpa.jpql;bundle-version="1.0.0",
- org.eclipse.jst.j2ee.core;bundle-version="1.2.100"
+ org.eclipse.jst.j2ee.core;bundle-version="1.2.100",
+ org.hibernate.eclipse.libs;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.hibernate.jpt.core.internal,
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF 2011-10-03 13:42:27 UTC (rev 35281)
@@ -22,7 +22,8 @@
org.eclipse.jpt.common.core,
org.eclipse.jpt.common.ui,
org.eclipse.jpt.jpa.db,
- org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.0"
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.0",
+ org.hibernate.eclipse.libs;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor.0
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2011-10-03 13:42:27 UTC (rev 35281)
@@ -285,7 +285,7 @@
String dialect = determineDialect();
String ccName = launchManager.generateLaunchConfigurationName(HibernateConsoleMessages.AddConfigurationAction_hibernate);
ConsoleConfigurationPreferences prefs = new EclipseConsoleConfigurationPreferences(ccName,
- ConfigurationMode.JPA, jpaProject.getName(), true,
+ ConfigurationMode.JPA, null, jpaProject.getName(), true,
null, null, null,
new IPath[0], new IPath[0], null, null,
getConnectionProfileName(), dialect);
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.ui/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate.ui/META-INF/MANIFEST.MF 2011-10-03 13:42:27 UTC (rev 35281)
@@ -16,7 +16,8 @@
org.hibernate.eclipse,
org.eclipse.jdt.core,
org.eclipse.jdt.ui,
- org.hibernate.eclipse.console
+ org.hibernate.eclipse.console,
+ org.hibernate.eclipse.libs;bundle-version="1.0.0"
Bundle-Version: 3.4.0.qualifier
Export-Package: org.jboss.tools.hibernate.ui.diagram,
org.jboss.tools.hibernate.ui.diagram.editors,
11 years, 5 months
JBoss Tools SVN: r35280 - in branches/dead/hibernatetools-multiversion2/plugins: org.hibernate.eclipse.libs/.settings and 34 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-10-03 09:40:52 -0400 (Mon, 03 Oct 2011)
New Revision: 35280
Added:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.classpath
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.project
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.settings/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.settings/org.eclipse.jdt.core.prefs
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/META-INF/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/build.properties
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/annotations/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/annotations/hibernate-validator.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/bsh-core-2.0b4.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/antlr-2.7.6.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/asm-attrs.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/asm.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/c3p0-0.9.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/cglib-2.2.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/commons-collections-3.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/commons-logging-1.0.4.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/concurrent-1.3.2.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/connector.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/dom4j-1.6.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/ehcache-1.2.3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/hibernate3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jaas.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/javassist.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-cache.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-common.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-jmx.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-system.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jdbc2_0-stdext.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jgroups-2.2.8.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jta.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/log4j-1.2.15.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/oscache-2.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/proxool-0.8.3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/slf4j-api-1.5.8.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/slf4j-log4j12-1.5.8.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/swarmcache-1.0rc2.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/freemarker.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/hibernate-tools.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/jtidy-r8-20060801.jar
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/HibernateLibsPlugin.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.classpath
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.project
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.settings/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.settings/org.eclipse.jdt.core.prefs
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/build.properties
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.xml
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.classpath
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.project
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.settings/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.settings/org.eclipse.jdt.core.prefs
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/bin/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/build.properties
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/jpa/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/jpa/hibernate-entitymanager-4.0.0.CR3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/c3p0/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/c3p0/c3p0-0.9.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/c3p0/hibernate-c3p0-4.0.0.CR3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/ehcache/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/ehcache/ehcache-core-2.4.3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/ehcache/hibernate-ehcache-4.0.0.CR3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/hibernate-infinispan-4.0.0.CR3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/i18nlog-1.0.10.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/infinispan-core-5.0.0.CR4.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-marshalling-1.3.0.CR9.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-marshalling-river-1.3.0.CR9.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-transaction-api-1.0.1.GA.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jgroups-2.12.0.Final.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/rhq-pluginAnnotations-3.0.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/proxool/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/proxool/hibernate-proxool-4.0.0.CR3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/proxool/proxool-0.8.3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/antlr-2.7.7.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/classmate-0.5.4.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/commons-collections-3.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/dom4j-1.6.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-commons-annotations-4.0.0.CR2.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-core-4.0.0.CR3.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-jpa-2.0-api-1.0.1.Final.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jandex-1.0.3.Final.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/javassist-3.12.0.GA.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jboss-logging-3.0.0.GA.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jta-1.1.jar
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.xml
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/ConfigurationFactory.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/FakeDelegatingDriver.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java
Log:
Simultaneous Hibernate 3.5 and Hibernate4 support
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.classpath
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.classpath (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.classpath 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,40 @@
+<?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 exported="true" kind="lib" path="lib/hibernate/asm.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/asm-attrs.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/dom4j-1.6.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/commons-logging-1.0.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/concurrent-1.3.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/connector.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate3.jar" sourcepath="C:/dev/Libs/hibernate-distribution-3.5.6-Final/project"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-cache.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-common.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-jmx.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/jboss-system.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/jdbc2_0-stdext.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/jta.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/jaas.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/oscache-2.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/proxool-0.8.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/swarmcache-1.0rc2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/tools/freemarker.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/tools/hibernate-tools.jar" sourcepath="C:/dev/workspaces/RedHat/hibernate_trunk-orig/hibernateext.tools.trunk/src"/>
+ <classpathentry exported="true" kind="lib" path="lib/bsh-core-2.0b4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/jgroups-2.2.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/antlr-2.7.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/tools/jtidy-r8-20060801.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/javassist.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/ehcache-1.2.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/c3p0-0.9.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-validator.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/log4j-1.2.15.jar" sourcepath="C:/Documents and Settings/dgeraskov/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/cglib-2.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/commons-collections-3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/slf4j-api-1.5.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/slf4j-log4j12-1.5.8.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.project
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.project (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.project 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.hibernate.eclipse.libs</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>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/.settings/org.eclipse.jdt.core.prefs 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,8 @@
+#Thu Sep 29 12:32:18 EEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+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
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/META-INF/MANIFEST.MF (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,504 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Libs
+Bundle-SymbolicName: org.hibernate.eclipse.libs
+Bundle-Version: 1.0.0.qualifier
+Bundle-ClassPath: .,
+ lib/hibernate/asm.jar,
+ lib/hibernate/asm-attrs.jar,
+ lib/hibernate/commons-logging-1.0.4.jar,
+ lib/hibernate/concurrent-1.3.2.jar,
+ lib/hibernate/connector.jar,
+ lib/hibernate/dom4j-1.6.1.jar,
+ lib/hibernate/hibernate3.jar,
+ lib/hibernate/jboss-cache.jar,
+ lib/hibernate/jboss-common.jar,
+ lib/hibernate/jboss-jmx.jar,
+ lib/hibernate/jboss-system.jar,
+ lib/hibernate/jdbc2_0-stdext.jar,
+ lib/hibernate/jta.jar,
+ lib/hibernate/jaas.jar,
+ lib/hibernate/oscache-2.1.jar,
+ lib/hibernate/proxool-0.8.3.jar,
+ lib/hibernate/swarmcache-1.0rc2.jar,
+ lib/tools/hibernate-tools.jar,
+ lib/tools/freemarker.jar,
+ lib/bsh-core-2.0b4.jar,
+ lib/hibernate/jgroups-2.2.8.jar,
+ lib/hibernate/antlr-2.7.6.jar,
+ lib/tools/jtidy-r8-20060801.jar,
+ lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar,
+ lib/hibernate/javassist.jar,
+ lib/hibernate/ehcache-1.2.3.jar,
+ lib/hibernate/c3p0-0.9.1.jar,
+ lib/annotations/hibernate-validator.jar,
+ lib/hibernate/log4j-1.2.15.jar,
+ lib/hibernate/cglib-2.2.jar,
+ lib/hibernate/commons-collections-3.1.jar,
+ lib/hibernate/slf4j-api-1.5.8.jar,
+ lib/hibernate/slf4j-log4j12-1.5.8.jar,
+ lib/hibernate/commons-collections-3.1.jar
+Bundle-Activator: org.hibernate.eclipse.libs.HibernateLibsPlugin
+Require-Bundle: org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: EDU.oswego.cs.dl.util.concurrent,
+ antlr,
+ antlr.ASdebug,
+ antlr.actions.cpp,
+ antlr.actions.csharp,
+ antlr.actions.java,
+ antlr.actions.python,
+ antlr.build,
+ antlr.collections,
+ antlr.collections.impl,
+ antlr.debug,
+ antlr.debug.misc,
+ antlr.preprocessor,
+ bsh,
+ com.mchange,
+ com.mchange.lang,
+ com.mchange.util,
+ com.mchange.v1,
+ com.mchange.v1.db,
+ com.mchange.v1.db.sql,
+ com.mchange.v1.identicator,
+ com.mchange.v1.io,
+ com.mchange.v1.lang,
+ com.mchange.v1.util,
+ com.mchange.v1.xml,
+ com.mchange.v2,
+ com.mchange.v2.async,
+ com.mchange.v2.beans,
+ com.mchange.v2.c3p0,
+ com.mchange.v2.c3p0.cfg,
+ com.mchange.v2.c3p0.filter,
+ com.mchange.v2.c3p0.impl,
+ com.mchange.v2.c3p0.jboss,
+ com.mchange.v2.c3p0.management,
+ com.mchange.v2.c3p0.mbean,
+ com.mchange.v2.c3p0.stmt,
+ com.mchange.v2.c3p0.subst,
+ com.mchange.v2.c3p0.util,
+ com.mchange.v2.cfg,
+ com.mchange.v2.cfg.junit,
+ com.mchange.v2.coalesce,
+ com.mchange.v2.codegen,
+ com.mchange.v2.codegen.bean,
+ com.mchange.v2.codegen.intfc,
+ com.mchange.v2.debug,
+ com.mchange.v2.encounter,
+ com.mchange.v2.holders,
+ com.mchange.v2.io,
+ com.mchange.v2.lang,
+ com.mchange.v2.log,
+ com.mchange.v2.log.jdk14logging,
+ com.mchange.v2.log.log4j,
+ com.mchange.v2.management,
+ com.mchange.v2.naming,
+ com.mchange.v2.resourcepool,
+ com.mchange.v2.ser,
+ com.mchange.v2.sql,
+ com.mchange.v2.sql.filter,
+ com.mchange.v2.util,
+ com.opensymphony.oscache.base,
+ com.opensymphony.oscache.base.algorithm,
+ com.opensymphony.oscache.base.events,
+ com.opensymphony.oscache.base.persistence,
+ com.opensymphony.oscache.extra,
+ com.opensymphony.oscache.general,
+ com.opensymphony.oscache.plugins.clustersupport,
+ com.opensymphony.oscache.plugins.diskpersistence,
+ com.opensymphony.oscache.util,
+ com.opensymphony.oscache.web,
+ com.opensymphony.oscache.web.filter,
+ com.opensymphony.oscache.web.tag,
+ com.sun.security.auth,
+ com.sun.security.auth.login,
+ dao,
+ doc,
+ doc.entities,
+ doc.tables,
+ dot,
+ dtd,
+ freemarker,
+ freemarker.cache,
+ freemarker.core,
+ freemarker.debug,
+ freemarker.debug.impl,
+ freemarker.ext.ant,
+ freemarker.ext.beans,
+ freemarker.ext.dom,
+ freemarker.ext.jdom,
+ freemarker.ext.jsp,
+ freemarker.ext.jython,
+ freemarker.ext.rhino,
+ freemarker.ext.servlet,
+ freemarker.ext.util,
+ freemarker.ext.xml,
+ freemarker.log,
+ freemarker.template,
+ freemarker.template.utility,
+ hbm,
+ javassist,
+ javassist.bytecode,
+ javassist.bytecode.analysis,
+ javassist.bytecode.annotation,
+ javassist.bytecode.stackmap,
+ javassist.compiler,
+ javassist.compiler.ast,
+ javassist.convert,
+ javassist.expr,
+ javassist.runtime,
+ javassist.scopedpool,
+ javassist.tools,
+ javassist.tools.reflect,
+ javassist.tools.rmi,
+ javassist.tools.web,
+ javassist.util,
+ javassist.util.proxy,
+ javax.management,
+ javax.management.loading,
+ javax.management.modelmbean,
+ javax.management.monitor,
+ javax.management.openmbean,
+ javax.management.relation,
+ javax.management.timer,
+ javax.persistence,
+ javax.persistence.spi,
+ javax.resource,
+ javax.resource.cci,
+ javax.resource.spi,
+ javax.resource.spi.security,
+ javax.security.auth,
+ javax.security.auth.callback,
+ javax.security.auth.login,
+ javax.security.auth.spi,
+ javax.sql,
+ javax.transaction,
+ javax.transaction.xa,
+ lint,
+ net.sf.cglib.beans,
+ net.sf.cglib.core,
+ net.sf.cglib.proxy,
+ net.sf.cglib.reflect,
+ net.sf.cglib.transform,
+ net.sf.cglib.transform.impl,
+ net.sf.cglib.util,
+ net.sf.ehcache,
+ net.sf.ehcache.bootstrap,
+ net.sf.ehcache.config,
+ net.sf.ehcache.constructs.asynchronous,
+ net.sf.ehcache.constructs.blocking,
+ net.sf.ehcache.constructs.concurrent,
+ net.sf.ehcache.constructs.web,
+ net.sf.ehcache.constructs.web.filter,
+ net.sf.ehcache.distribution,
+ net.sf.ehcache.event,
+ net.sf.ehcache.hibernate,
+ net.sf.ehcache.store,
+ net.sf.ehcache.util,
+ net.sf.swarmcache,
+ org.apache.commons.collections,
+ org.apache.commons.collections.bag,
+ org.apache.commons.collections.bidimap,
+ org.apache.commons.collections.buffer,
+ org.apache.commons.collections.collection,
+ org.apache.commons.collections.comparators,
+ org.apache.commons.collections.functors,
+ org.apache.commons.collections.iterators,
+ org.apache.commons.collections.keyvalue,
+ org.apache.commons.collections.list,
+ org.apache.commons.collections.map,
+ org.apache.commons.collections.set,
+ org.apache.commons.logging,
+ org.apache.commons.logging.impl,
+ org.apache.log4j,
+ org.apache.log4j.chainsaw,
+ org.apache.log4j.config,
+ org.apache.log4j.helpers,
+ org.apache.log4j.jdbc,
+ org.apache.log4j.jmx,
+ org.apache.log4j.lf5,
+ org.apache.log4j.lf5.config,
+ org.apache.log4j.lf5.util,
+ org.apache.log4j.lf5.viewer,
+ org.apache.log4j.lf5.viewer.categoryexplorer,
+ org.apache.log4j.lf5.viewer.configure,
+ org.apache.log4j.lf5.viewer.images,
+ org.apache.log4j.net,
+ org.apache.log4j.nt,
+ org.apache.log4j.or,
+ org.apache.log4j.or.jms,
+ org.apache.log4j.or.sax,
+ org.apache.log4j.spi,
+ org.apache.log4j.varia,
+ org.apache.log4j.xml,
+ org.apache.xerces.impl.xs,
+ org.dom4j,
+ org.dom4j.bean,
+ org.dom4j.datatype,
+ org.dom4j.dom,
+ org.dom4j.dtd,
+ org.dom4j.io,
+ org.dom4j.jaxb,
+ org.dom4j.rule,
+ org.dom4j.rule.pattern,
+ org.dom4j.swing,
+ org.dom4j.tree,
+ org.dom4j.util,
+ org.dom4j.xpath,
+ org.dom4j.xpp,
+ org.hibernate,
+ org.hibernate.action,
+ org.hibernate.annotations,
+ org.hibernate.annotations.common,
+ org.hibernate.annotations.common.annotationfactory,
+ org.hibernate.annotations.common.reflection,
+ org.hibernate.annotations.common.reflection.java,
+ org.hibernate.annotations.common.reflection.java.generics,
+ org.hibernate.annotations.common.util,
+ org.hibernate.bytecode,
+ org.hibernate.bytecode.buildtime,
+ org.hibernate.bytecode.cglib,
+ org.hibernate.bytecode.javassist,
+ org.hibernate.bytecode.util,
+ org.hibernate.cache,
+ org.hibernate.cache.access,
+ org.hibernate.cache.entry,
+ org.hibernate.cache.impl,
+ org.hibernate.cache.impl.bridge,
+ org.hibernate.cfg,
+ org.hibernate.cfg.annotations,
+ org.hibernate.cfg.annotations.reflection,
+ org.hibernate.cfg.reveng,
+ org.hibernate.cfg.reveng.dialect,
+ org.hibernate.cfg.search,
+ org.hibernate.classic,
+ org.hibernate.collection,
+ org.hibernate.connection,
+ org.hibernate.context,
+ org.hibernate.criterion,
+ org.hibernate.dialect,
+ org.hibernate.dialect.function,
+ org.hibernate.dialect.lock,
+ org.hibernate.dialect.resolver,
+ org.hibernate.eclipse.libs,
+ org.hibernate.ejb,
+ org.hibernate.ejb.connection,
+ org.hibernate.ejb.event,
+ org.hibernate.ejb.instrument,
+ org.hibernate.ejb.packaging,
+ org.hibernate.ejb.transaction,
+ org.hibernate.ejb.util,
+ org.hibernate.engine,
+ org.hibernate.engine.loading,
+ org.hibernate.engine.query,
+ org.hibernate.engine.query.sql,
+ org.hibernate.engine.transaction,
+ org.hibernate.event,
+ org.hibernate.event.def,
+ org.hibernate.exception,
+ org.hibernate.hql,
+ org.hibernate.hql.antlr,
+ org.hibernate.hql.ast,
+ org.hibernate.hql.ast.exec,
+ org.hibernate.hql.ast.tree,
+ org.hibernate.hql.ast.util,
+ org.hibernate.hql.classic,
+ org.hibernate.id,
+ org.hibernate.id.enhanced,
+ org.hibernate.id.insert,
+ org.hibernate.impl,
+ org.hibernate.intercept,
+ org.hibernate.intercept.cglib,
+ org.hibernate.intercept.javassist,
+ org.hibernate.jdbc,
+ org.hibernate.jdbc.util,
+ org.hibernate.jmx,
+ org.hibernate.loader,
+ org.hibernate.loader.collection,
+ org.hibernate.loader.criteria,
+ org.hibernate.loader.custom,
+ org.hibernate.loader.custom.sql,
+ org.hibernate.loader.entity,
+ org.hibernate.loader.hql,
+ org.hibernate.lob,
+ org.hibernate.mapping,
+ org.hibernate.metadata,
+ org.hibernate.param,
+ org.hibernate.persister,
+ org.hibernate.persister.collection,
+ org.hibernate.persister.entity,
+ org.hibernate.pretty,
+ org.hibernate.property,
+ org.hibernate.proxy,
+ org.hibernate.proxy.dom4j,
+ org.hibernate.proxy.map,
+ org.hibernate.proxy.pojo,
+ org.hibernate.proxy.pojo.cglib,
+ org.hibernate.proxy.pojo.javassist,
+ org.hibernate.secure,
+ org.hibernate.sql,
+ org.hibernate.stat,
+ org.hibernate.tool,
+ org.hibernate.tool.ant,
+ org.hibernate.tool.hbm2ddl,
+ org.hibernate.tool.hbm2x,
+ org.hibernate.tool.hbm2x.doc,
+ org.hibernate.tool.hbm2x.pojo,
+ org.hibernate.tool.hbm2x.visitor,
+ org.hibernate.tool.hbmlint,
+ org.hibernate.tool.hbmlint.detector,
+ org.hibernate.tool.ide.completion,
+ org.hibernate.tool.ide.formatting,
+ org.hibernate.tool.instrument,
+ org.hibernate.tool.instrument.cglib,
+ org.hibernate.tool.instrument.javassist,
+ org.hibernate.tool.stat,
+ org.hibernate.transaction,
+ org.hibernate.transform,
+ org.hibernate.tuple,
+ org.hibernate.tuple.component,
+ org.hibernate.tuple.entity,
+ org.hibernate.type,
+ org.hibernate.usertype,
+ org.hibernate.util,
+ org.hibernate.validator,
+ org.hibernate.validator.event,
+ org.hibernate.validator.interpolator,
+ org.hibernate.validator.resources,
+ org.jboss,
+ org.jboss.cache,
+ org.jboss.cache.aop,
+ org.jboss.cache.aop.annotation,
+ org.jboss.cache.aop.collection,
+ org.jboss.cache.aop.eviction,
+ org.jboss.cache.aop.interceptors,
+ org.jboss.cache.aop.references,
+ org.jboss.cache.aop.util,
+ org.jboss.cache.buddyreplication,
+ org.jboss.cache.config,
+ org.jboss.cache.eviction,
+ org.jboss.cache.factories,
+ org.jboss.cache.interceptors,
+ org.jboss.cache.loader,
+ org.jboss.cache.loader.bdbje,
+ org.jboss.cache.loader.jdbm,
+ org.jboss.cache.loader.rmi,
+ org.jboss.cache.loader.tcp,
+ org.jboss.cache.lock,
+ org.jboss.cache.marshall,
+ org.jboss.cache.optimistic,
+ org.jboss.cache.rpc,
+ org.jboss.cache.statetransfer,
+ org.jboss.cache.transaction,
+ org.jboss.cache.util,
+ org.jboss.cache.xml,
+ org.jboss.deployment,
+ org.jboss.deployment.cache,
+ org.jboss.deployment.scanner,
+ org.jboss.logging,
+ org.jboss.logging.appender,
+ org.jboss.logging.filter,
+ org.jboss.logging.layout,
+ org.jboss.logging.util,
+ org.jboss.mx.capability,
+ org.jboss.mx.interceptor,
+ org.jboss.mx.loading,
+ org.jboss.mx.metadata,
+ org.jboss.mx.modelmbean,
+ org.jboss.mx.notification,
+ org.jboss.mx.persistence,
+ org.jboss.mx.server,
+ org.jboss.mx.server.registry,
+ org.jboss.mx.service,
+ org.jboss.mx.util,
+ org.jboss.mx.util.propertyeditor,
+ org.jboss.net.protocol,
+ org.jboss.net.protocol.file,
+ org.jboss.net.protocol.http,
+ org.jboss.net.protocol.njar,
+ org.jboss.net.protocol.resource,
+ org.jboss.net.sockets,
+ org.jboss.net.ssl,
+ org.jboss.system,
+ org.jboss.system.pm,
+ org.jboss.system.server,
+ org.jboss.util,
+ org.jboss.util.coerce,
+ org.jboss.util.collection,
+ org.jboss.util.deadlock,
+ org.jboss.util.file,
+ org.jboss.util.id,
+ org.jboss.util.loading,
+ org.jboss.util.platform,
+ org.jboss.util.property,
+ org.jboss.util.property.jmx,
+ org.jboss.util.propertyeditor,
+ org.jboss.util.state,
+ org.jboss.util.state.xml,
+ org.jboss.util.stream,
+ org.jboss.util.threadpool,
+ org.jboss.util.timeout,
+ org.jboss.util.xml,
+ org.jboss.xml,
+ org.jboss.xml.binding,
+ org.jboss.xml.binding.metadata,
+ org.jboss.xml.binding.metadata.marshalling,
+ org.jboss.xml.binding.metadata.unmarshalling,
+ org.jboss.xml.binding.metadata.unmarshalling.impl,
+ org.jboss.xml.binding.parser,
+ org.jboss.xml.binding.parser.sax,
+ org.jboss.xml.binding.parser.xni,
+ org.jgroups,
+ org.jgroups.blocks,
+ org.jgroups.conf,
+ org.jgroups.debug,
+ org.jgroups.demos,
+ org.jgroups.demos.applets,
+ org.jgroups.demos.wb,
+ org.jgroups.persistence,
+ org.jgroups.protocols,
+ org.jgroups.protocols.pbcast,
+ org.jgroups.protocols.ring,
+ org.jgroups.service,
+ org.jgroups.service.lease,
+ org.jgroups.stack,
+ org.jgroups.tests,
+ org.jgroups.tests.adapt,
+ org.jgroups.tests.adaptjms,
+ org.jgroups.tests.adapttcp,
+ org.jgroups.tests.adaptudp,
+ org.jgroups.tests.perf,
+ org.jgroups.tests.perf.transports,
+ org.jgroups.tests.stack,
+ org.jgroups.util,
+ org.logicalcobwebs.asm,
+ org.logicalcobwebs.asm.tree,
+ org.logicalcobwebs.asm.util,
+ org.logicalcobwebs.cglib.core,
+ org.logicalcobwebs.cglib.proxy,
+ org.logicalcobwebs.cglib.reflect,
+ org.logicalcobwebs.cglib.util,
+ org.logicalcobwebs.concurrent,
+ org.logicalcobwebs.logging,
+ org.logicalcobwebs.logging.impl,
+ org.logicalcobwebs.proxool,
+ org.logicalcobwebs.proxool.admin,
+ org.logicalcobwebs.proxool.admin.jmx,
+ org.logicalcobwebs.proxool.admin.servlet,
+ org.logicalcobwebs.proxool.configuration,
+ org.logicalcobwebs.proxool.resources,
+ org.logicalcobwebs.proxool.util,
+ org.objectweb.asm,
+ org.objectweb.asm.attrs,
+ org.objectweb.asm.signature,
+ org.slf4j,
+ org.slf4j.helpers,
+ org.slf4j.impl,
+ org.slf4j.spi,
+ org.w3c.tidy,
+ org.w3c.tidy.ant,
+ pojo
+
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/build.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/build.properties (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/build.properties 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ lib/
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/annotations/hibernate-validator.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/annotations/hibernate-validator.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/bsh-core-2.0b4.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/bsh-core-2.0b4.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/antlr-2.7.6.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/antlr-2.7.6.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/asm-attrs.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/asm-attrs.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/asm.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/asm.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/c3p0-0.9.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/c3p0-0.9.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/cglib-2.2.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/cglib-2.2.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/commons-collections-3.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/commons-collections-3.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/commons-logging-1.0.4.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/commons-logging-1.0.4.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/concurrent-1.3.2.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/concurrent-1.3.2.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/connector.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/connector.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/dom4j-1.6.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/dom4j-1.6.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/ehcache-1.2.3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/ehcache-1.2.3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/hibernate3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/hibernate3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jaas.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jaas.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/javassist.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/javassist.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-cache.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-cache.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-common.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-common.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-jmx.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-jmx.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-system.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jboss-system.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jdbc2_0-stdext.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jdbc2_0-stdext.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jgroups-2.2.8.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jgroups-2.2.8.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jta.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/jta.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/log4j-1.2.15.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/log4j-1.2.15.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/oscache-2.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/oscache-2.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/proxool-0.8.3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/proxool-0.8.3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/slf4j-api-1.5.8.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/slf4j-api-1.5.8.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/slf4j-log4j12-1.5.8.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/slf4j-log4j12-1.5.8.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/swarmcache-1.0rc2.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/hibernate/swarmcache-1.0rc2.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/freemarker.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/freemarker.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/hibernate-tools.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/hibernate-tools.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/jtidy-r8-20060801.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/lib/tools/jtidy-r8-20060801.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/HibernateLibsPlugin.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/HibernateLibsPlugin.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.libs/src/org/hibernate/eclipse/libs/HibernateLibsPlugin.java 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,30 @@
+package org.hibernate.eclipse.libs;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class HibernateLibsPlugin implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ HibernateLibsPlugin.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ HibernateLibsPlugin.context = null;
+ }
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.classpath
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.classpath (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.classpath 2011-10-03 13:40:52 UTC (rev 35280)
@@ -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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.project
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.project (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.project 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.hibernate3_5</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>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/.settings/org.eclipse.jdt.core.prefs 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,8 @@
+#Mon Sep 26 12:36:48 EEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: HibernateExtension3_5
+Bundle-SymbolicName: org.jboss.tools.hibernateextension3_5;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.hibernate3_5.HibernateExtension3_5Plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.hibernate.eclipse;bundle-version="3.4.0",
+ org.hibernate.eclipse.libs;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/build.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/build.properties (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/build.properties 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,3 @@
+output.. = bin/
+bin.includes = META-INF/,\
+ plugin.xml
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.xml
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.xml (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.xml 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.hibernate.eclipse.hibernateextension">
+ <hibernateextension
+ classname="org.jboss.tools.hibernate3_5.HibernateExtension3_5"
+ version="3.5">
+ </hibernateextension>
+ </extension>
+
+</plugin>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,307 @@
+package org.jboss.tools.hibernate3_5;
+
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.osgi.util.NLS;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.console.ConfigurationFactory;
+import org.hibernate.console.ConsoleConfigClassLoader;
+import org.hibernate.console.ConsoleMessages;
+import org.hibernate.console.ConsoleQueryParameter;
+import org.hibernate.console.FakeDelegatingDriver;
+import org.hibernate.console.QueryInputModel;
+import org.hibernate.console.execution.DefaultExecutionContext;
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.execution.ExecutionContext.Command;
+import org.hibernate.console.ext.HibernateException;
+import org.hibernate.console.ext.HibernateExtension;
+import org.hibernate.console.ext.QueryResult;
+import org.hibernate.console.ext.QueryResultImpl;
+import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
+import org.hibernate.console.preferences.PreferencesClassPathUtils;
+import org.hibernate.type.Type;
+
+public class HibernateExtension3_5 implements HibernateExtension {
+
+ private ConsoleConfigClassLoader classLoader = null;
+
+ private ExecutionContext executionContext;
+
+ private ConsoleConfigurationPreferences prefs;
+
+ private Configuration configuration;
+
+ private SessionFactory sessionFactory;
+
+ public HibernateExtension3_5() {
+ }
+
+ @Override
+ public String getHibernateVersion() {
+ return "3.5";
+ }
+
+ @Override
+ public QueryResult executeHQLQuery(final String hql,
+ final QueryInputModel queryParameters) {
+ System.out.println("Execute HQLQuery in " + getClass().getName());
+ Session session = sessionFactory.openSession();
+ Query query = session.createQuery(hql);
+ List<Object> list = Collections.emptyList();
+ long queryTime = 0;
+ try {
+ list = new ArrayList<Object>();
+ setupParameters(query, queryParameters);
+ long startTime = System.currentTimeMillis();
+ Iterator<?> iter = query.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
+ queryTime = System.currentTimeMillis() - startTime;
+ while (iter.hasNext() ) {
+ Object element = iter.next();
+ list.add(element);
+ }
+ }
+ catch (HibernateException e) {
+ e.printStackTrace();
+ }
+ return new QueryResultImpl(list,
+ getPathNames(query), queryTime);
+ }
+
+ public List<String> getPathNames(Query query) {
+ List<String> l = Collections.emptyList();
+
+ try {
+ if(query==null) return l;
+ String[] returnAliases = null;
+ try {
+ returnAliases = query.getReturnAliases();
+ } catch(NullPointerException e) {
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ if(returnAliases==null) {
+ Type[] t;
+ try {
+ t = query.getReturnTypes();
+ } catch(NullPointerException npe) {
+ t = new Type[] { null };
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ Type type = t[i];
+ if(type==null) {
+ l.add("<multiple types>"); //$NON-NLS-1$
+ } else {
+ l.add(type.getName() );
+ }
+ }
+ } else {
+ String[] t = returnAliases;
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ l.add(t[i]);
+ }
+ }
+ } catch (HibernateException he) {
+ he.printStackTrace();
+ }
+
+ return l;
+ }
+
+ private void setupParameters(Query query2, QueryInputModel model) {
+
+ if(model.getMaxResults()!=null) {
+ query2.setMaxResults( model.getMaxResults().intValue() );
+ }
+
+ ConsoleQueryParameter[] qp = model.getQueryParameters();
+ for (int i = 0; i < qp.length; i++) {
+ ConsoleQueryParameter parameter = qp[i];
+
+ try {
+ int pos = Integer.parseInt(parameter.getName());
+ //FIXME no method to set positioned list value
+ query2.setParameter(pos, calcValue( parameter ), parameter.getType());
+ } catch(NumberFormatException nfe) {
+ Object value = parameter.getValue();
+ if (value != null && value.getClass().isArray()){
+ Object[] values = (Object[])value;
+ query2.setParameterList(parameter.getName(), Arrays.asList(values), parameter.getType());
+ } else {
+ query2.setParameter(parameter.getName(), calcValue( parameter ), parameter.getType());
+ }
+ }
+ }
+ }
+
+ private Object calcValue(ConsoleQueryParameter parameter) {
+ return parameter.getValueForQuery();
+ }
+
+ @Override
+ public QueryResult executeCriteriaQuery(String criteria,
+ QueryInputModel queryParameters) {
+ return null;
+ }
+
+ /**
+ * @param ConsoleConfigurationPreferences the prefs to set
+ */
+ public void setConsoleConfigurationPreferences(ConsoleConfigurationPreferences prefs) {
+ this.prefs = prefs;
+ }
+
+ public void build() {
+ configuration = buildWith(null, true);
+ }
+
+ @Override
+ public void buildSessionFactory() {
+ execute(new Command() {
+ public Object execute() {
+ if (sessionFactory != null) {
+ throw new HibernateException("SessionFactory should be closed before building new SessionFactory");
+ }
+ sessionFactory = configuration.buildSessionFactory();
+ return null;
+ }
+ });
+ }
+
+ @Override
+ public boolean closeSessionFactory() {
+ boolean res = false;
+ if (sessionFactory != null) {
+ sessionFactory.close();
+ sessionFactory = null;
+ res = true;
+ }
+ return res;
+ }
+
+ public Configuration buildWith(final Configuration cfg, final boolean includeMappings) {
+ reinitClassLoader();
+ //TODO handle user libraries here
+ executionContext = new DefaultExecutionContext(prefs.getName(), classLoader);
+ Configuration result = (Configuration)execute(new Command() {
+ public Object execute() {
+ ConfigurationFactory csf = new ConfigurationFactory(prefs, new HashMap<String, FakeDelegatingDriver>());
+ return csf.createConfiguration(cfg, includeMappings);
+ }
+ });
+ return result;
+ }
+
+
+ /**
+ * Create class loader - so it uses the original urls list from preferences.
+ */
+ protected void reinitClassLoader() {
+ boolean recreateFlag = true;
+ final URL[] customClassPathURLs = PreferencesClassPathUtils.getCustomClassPathURLs(prefs);
+ if (classLoader != null) {
+ // check -> do not recreate class loader in case if urls list is the same
+ final URL[] oldURLS = classLoader.getURLs();
+ if (customClassPathURLs.length == oldURLS.length) {
+ int i = 0;
+ for (; i < oldURLS.length; i++) {
+ if (!customClassPathURLs[i].sameFile(oldURLS[i])) {
+ break;
+ }
+ }
+ if (i == oldURLS.length) {
+ recreateFlag = false;
+ }
+ }
+ }
+ if (recreateFlag) {
+ reset();
+ classLoader = createClassLoader(customClassPathURLs);
+ }
+ }
+
+ protected ConsoleConfigClassLoader createClassLoader(final URL[] customClassPathURLs) {
+ ConsoleConfigClassLoader classLoader = AccessController.doPrivileged(new PrivilegedAction<ConsoleConfigClassLoader>() {
+ public ConsoleConfigClassLoader run() {
+ return new ConsoleConfigClassLoader(customClassPathURLs, Thread.currentThread().getContextClassLoader()) {
+ protected Class<?> findClass(String name) throws ClassNotFoundException {
+ try {
+ return super.findClass(name);
+ } catch (ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ try {
+ return super.loadClass(name, resolve);
+ } catch (ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ public Class<?> loadClass(String name) throws ClassNotFoundException {
+ try {
+ return super.loadClass(name);
+ } catch (ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ public URL getResource(String name) {
+ return super.getResource(name);
+ }
+ };
+ }
+ });
+ return classLoader;
+ }
+
+ public String getName() {
+ return prefs.getName();
+ }
+
+ public Object execute(Command c) {
+ if (executionContext != null) {
+ return executionContext.execute(c);
+ }
+ final String msg = NLS.bind(ConsoleMessages.ConsoleConfiguration_null_execution_context, getName());
+ throw new HibernateException(msg);
+ }
+
+ @Override
+ public boolean reset() {
+ boolean res = false;
+ // reseting state
+ if (configuration != null) {
+ configuration = null;
+ res = true;
+ }
+
+ boolean tmp = closeSessionFactory();
+ res = res || tmp;
+ executionContext = null;
+ return res;
+ }
+
+ @Override
+ public boolean hasConfiguration() {
+ // TODO Auto-generated method stub
+ return configuration != null;
+ }
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5Plugin.java 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,50 @@
+package org.jboss.tools.hibernate3_5;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class HibernateExtension3_5Plugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.hibernateextension3_5"; //$NON-NLS-1$
+
+ // The shared instance
+ private static HibernateExtension3_5Plugin plugin;
+
+ /**
+ * The constructor
+ */
+ public HibernateExtension3_5Plugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static HibernateExtension3_5Plugin getDefault() {
+ return plugin;
+ }
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.classpath
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.classpath (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.classpath 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry exported="true" kind="lib" path="lib/optional/ehcache/ehcache-core-2.4.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/ehcache/hibernate-ehcache-4.0.0.CR3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/infinispan/hibernate-infinispan-4.0.0.CR3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/infinispan/i18nlog-1.0.10.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/infinispan/infinispan-core-5.0.0.CR4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/infinispan/jboss-marshalling-1.3.0.CR9.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/infinispan/jboss-marshalling-river-1.3.0.CR9.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/infinispan/jboss-transaction-api-1.0.1.GA.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/infinispan/jgroups-2.12.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/infinispan/rhq-pluginAnnotations-3.0.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/proxool/hibernate-proxool-4.0.0.CR3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/proxool/proxool-0.8.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jpa/hibernate-entitymanager-4.0.0.CR3.jar" sourcepath="C:/Documents and Settings/dgeraskov/.m2/repository/org/hibernate/hibernate-entitymanager/4.0.0.CR3/hibernate-entitymanager-4.0.0.CR3-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/c3p0/c3p0-0.9.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/optional/c3p0/hibernate-c3p0-4.0.0.CR3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/antlr-2.7.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/classmate-0.5.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/commons-collections-3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/dom4j-1.6.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/hibernate-commons-annotations-4.0.0.CR2.jar" sourcepath="C:/Documents and Settings/dgeraskov/.m2/repository/org/hibernate/common/hibernate-commons-annotations/4.0.0.CR2/hibernate-commons-annotations-4.0.0.CR2-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/hibernate-core-4.0.0.CR3.jar" sourcepath="C:/Documents and Settings/dgeraskov/.m2/repository/org/hibernate/hibernate-core/4.0.0.CR3/hibernate-core-4.0.0.CR3-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/hibernate-jpa-2.0-api-1.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/jandex-1.0.3.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/javassist-3.12.0.GA.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/jboss-logging-3.0.0.GA.jar" sourcepath="C:/Documents and Settings/dgeraskov/.m2/repository/org/jboss/logging/jboss-logging/3.0.0.GA/jboss-logging-3.0.0.GA-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/required/jta-1.1.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.project
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.project (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.project 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.hibernate4_0</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>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/.settings/org.eclipse.jdt.core.prefs 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,8 @@
+#Mon Sep 26 12:36:48 EEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: HibernateExtension4_0
+Bundle-SymbolicName: org.jboss.tools.hibernateextension4_0;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.hibernate4_0.HibernateExtension4_0Plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.hibernate.eclipse;bundle-version="3.4.0",
+ org.eclipse.datatools.connectivity;bundle-version="1.2.2"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ClassPath: lib/required/jboss-logging-3.0.0.GA.jar,
+ lib/optional/c3p0/c3p0-0.9.1.jar,
+ lib/optional/c3p0/hibernate-c3p0-4.0.0.CR3.jar,
+ lib/required/antlr-2.7.7.jar,
+ lib/required/classmate-0.5.4.jar,
+ lib/required/commons-collections-3.1.jar,
+ lib/required/dom4j-1.6.1.jar,
+ lib/required/hibernate-commons-annotations-4.0.0.CR2.jar,
+ lib/required/hibernate-core-4.0.0.CR3.jar,
+ lib/required/hibernate-jpa-2.0-api-1.0.1.Final.jar,
+ lib/required/jandex-1.0.3.Final.jar,
+ lib/required/javassist-3.12.0.GA.jar,
+ lib/required/jta-1.1.jar,
+ lib/jpa/hibernate-entitymanager-4.0.0.CR3.jar,
+ .
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/build.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/build.properties (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/build.properties 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,31 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ lib/jpa/hibernate-entitymanager-4.0.0.CR3.jar,\
+ lib/optional/c3p0/c3p0-0.9.1.jar,\
+ lib/optional/c3p0/hibernate-c3p0-4.0.0.CR3.jar,\
+ lib/required/antlr-2.7.7.jar,\
+ lib/required/classmate-0.5.4.jar,\
+ lib/required/commons-collections-3.1.jar,\
+ lib/required/dom4j-1.6.1.jar,\
+ lib/required/hibernate-commons-annotations-4.0.0.CR2.jar,\
+ lib/required/hibernate-core-4.0.0.CR3.jar,\
+ lib/required/hibernate-jpa-2.0-api-1.0.1.Final.jar,\
+ lib/required/jandex-1.0.3.Final.jar,\
+ lib/required/javassist-3.12.0.GA.jar,\
+ lib/required/jboss-logging-3.0.0.GA.jar,\
+ lib/required/jta-1.1.jar,\
+ lib/optional/ehcache/ehcache-core-2.4.3.jar,\
+ lib/optional/ehcache/hibernate-ehcache-4.0.0.CR3.jar,\
+ lib/optional/infinispan/hibernate-infinispan-4.0.0.CR3.jar,\
+ lib/optional/infinispan/i18nlog-1.0.10.jar,\
+ lib/optional/infinispan/infinispan-core-5.0.0.CR4.jar,\
+ lib/optional/infinispan/jboss-marshalling-1.3.0.CR9.jar,\
+ lib/optional/infinispan/jboss-marshalling-river-1.3.0.CR9.jar,\
+ lib/optional/infinispan/jboss-transaction-api-1.0.1.GA.jar,\
+ lib/optional/infinispan/jgroups-2.12.0.Final.jar,\
+ lib/optional/infinispan/rhq-pluginAnnotations-3.0.1.jar,\
+ lib/optional/proxool/hibernate-proxool-4.0.0.CR3.jar,\
+ lib/optional/proxool/proxool-0.8.3.jar
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/jpa/hibernate-entitymanager-4.0.0.CR3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/jpa/hibernate-entitymanager-4.0.0.CR3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/c3p0/c3p0-0.9.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/c3p0/c3p0-0.9.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/c3p0/hibernate-c3p0-4.0.0.CR3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/c3p0/hibernate-c3p0-4.0.0.CR3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/ehcache/ehcache-core-2.4.3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/ehcache/ehcache-core-2.4.3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/ehcache/hibernate-ehcache-4.0.0.CR3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/ehcache/hibernate-ehcache-4.0.0.CR3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/hibernate-infinispan-4.0.0.CR3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/hibernate-infinispan-4.0.0.CR3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/i18nlog-1.0.10.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/i18nlog-1.0.10.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/infinispan-core-5.0.0.CR4.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/infinispan-core-5.0.0.CR4.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-marshalling-1.3.0.CR9.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-marshalling-1.3.0.CR9.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-marshalling-river-1.3.0.CR9.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-marshalling-river-1.3.0.CR9.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-transaction-api-1.0.1.GA.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jboss-transaction-api-1.0.1.GA.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jgroups-2.12.0.Final.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/jgroups-2.12.0.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/rhq-pluginAnnotations-3.0.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/infinispan/rhq-pluginAnnotations-3.0.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/proxool/hibernate-proxool-4.0.0.CR3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/proxool/hibernate-proxool-4.0.0.CR3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/proxool/proxool-0.8.3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/optional/proxool/proxool-0.8.3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/antlr-2.7.7.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/antlr-2.7.7.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/classmate-0.5.4.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/classmate-0.5.4.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/commons-collections-3.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/commons-collections-3.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/dom4j-1.6.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/dom4j-1.6.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-commons-annotations-4.0.0.CR2.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-commons-annotations-4.0.0.CR2.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-core-4.0.0.CR3.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-core-4.0.0.CR3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-jpa-2.0-api-1.0.1.Final.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/hibernate-jpa-2.0-api-1.0.1.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jandex-1.0.3.Final.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jandex-1.0.3.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/javassist-3.12.0.GA.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/javassist-3.12.0.GA.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jboss-logging-3.0.0.GA.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jboss-logging-3.0.0.GA.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jta-1.1.jar
===================================================================
(Binary files differ)
Property changes on: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/lib/required/jta-1.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.xml
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.xml (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.xml 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.hibernate.eclipse.hibernateextension">
+ <hibernateextension
+ classname="org.jboss.tools.hibernate4_0.HibernateExtension4_0"
+ version="4.0">
+ </hibernateextension>
+ </extension>
+
+</plugin>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/ConfigurationFactory.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/ConfigurationFactory.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/ConfigurationFactory.java 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,460 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tools.hibernate4_0;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.dom4j.DocumentException;
+import org.dom4j.Node;
+import org.dom4j.io.DOMWriter;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
+import org.eclipse.osgi.util.NLS;
+import org.hibernate.HibernateException;
+import org.hibernate.MappingException;
+import org.hibernate.annotations.common.util.ReflectHelper;
+import org.hibernate.annotations.common.util.StringHelper;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Environment;
+import org.hibernate.cfg.NamingStrategy;
+import org.hibernate.console.ConnectionProfileUtil;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.ConsoleMessages;
+import org.hibernate.console.HibernateConsoleRuntimeException;
+import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
+import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.engine.jdbc.spi.JdbcServices;
+import org.hibernate.internal.util.ConfigHelper;
+import org.hibernate.internal.util.xml.XMLHelper;
+import org.hibernate.service.ServiceRegistry;
+import org.w3c.dom.Document;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+
+public class ConfigurationFactory {
+
+ public static final String FAKE_TM_LOOKUP = "org.hibernate.console.FakeTransactionManagerLookup"; //$NON-NLS-1$
+
+ private ConsoleConfigurationPreferences prefs;
+ private Map<String, FakeDelegatingDriver> fakeDrivers;
+
+ public ConfigurationFactory(ConsoleConfigurationPreferences prefs,
+ Map<String, FakeDelegatingDriver> fakeDrivers) {
+ this.prefs = prefs;
+ this.fakeDrivers = fakeDrivers;
+ }
+
+ public ConsoleConfigurationPreferences getPreferences() {
+ return prefs;
+ }
+
+ public Configuration createConfiguration(Configuration localCfg, boolean includeMappings) {
+ Properties properties = prefs.getProperties();
+
+ if (properties != null) {
+ // in case the transaction manager is empty then we need to inject a faketm since
+ // hibernate will still try and instantiate it.
+ String str = properties.getProperty(Environment.TRANSACTION_MANAGER_STRATEGY);
+ if (str != null && StringHelper.isEmpty(str)) {
+ properties.setProperty(Environment.TRANSACTION_MANAGER_STRATEGY, FAKE_TM_LOOKUP);
+ // properties.setProperty( "hibernate.transaction.factory_class", "");
+ }
+ }
+ if (localCfg == null) {
+ localCfg = buildConfiguration(properties, includeMappings);
+ } else {
+ // Properties origProperties = cfg.getProperties();
+ // origProperties.putAll(properties);
+ // cfg.setProperties(origProperties);
+ // TODO: this is actually only for jdbc reveng...
+ // localCfg = configureStandardConfiguration( includeMappings, localCfg, properties );
+ }
+
+ // here both setProperties and configxml have had their chance to tell which databasedriver
+ // is needed.
+ registerFakeDriver(localCfg.getProperty(Environment.DRIVER));
+ // autoConfigureDialect(localCfg); Disabled for now since it causes very looong timeouts for
+ // non-running databases + i havent been needed until now...
+
+ // TODO: jpa configuration ?
+ if (includeMappings) {
+ File[] mappingFiles = prefs.getMappingFiles();
+
+ for (int i = 0; i < mappingFiles.length; i++) {
+ File hbm = mappingFiles[i];
+ localCfg = localCfg.addFile(hbm);
+ }
+ }
+ // TODO: HBX-
+ localCfg.setProperty("hibernate.temp.use_jdbc_metadata_defaults", "false"); //$NON-NLS-1$//$NON-NLS-2$
+ localCfg.setProperty(Environment.HBM2DDL_AUTO, "false"); //$NON-NLS-1$
+ // to fix: JBIDE-5839 & JBIDE-5997 - setup this property: false is default value
+ // to make hibernate tools diff hibernate versions compatible:
+ // if the property not set get NoSuchMethodError with FullTextIndexEventListener
+ if (localCfg.getProperty("hibernate.search.autoregister_listeners") == null) { //$NON-NLS-1$
+ localCfg.setProperty("hibernate.search.autoregister_listeners", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ return localCfg;
+ }
+
+ @SuppressWarnings("unused")
+ private void autoConfigureDialect(Configuration localCfg, ServiceRegistry serviceRegistry) {
+ if (localCfg.getProperty(Environment.DIALECT) == null) {
+ String url = localCfg.getProperty(Environment.URL);
+ String user = localCfg.getProperty(Environment.USER);
+ String pass = localCfg.getProperty(Environment.PASS);
+ Connection connection = null;
+ try {
+ connection = DriverManager.getConnection(url, user, pass);
+ // SQL Dialect:
+ JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
+ Dialect dialect = jdbcServices.getDialect();
+ localCfg.setProperty(Environment.DIALECT, dialect.toString());
+ } catch (SQLException e) {
+ // can't determine dialect
+ }
+ if (connection != null) {
+ try {
+ connection.close();
+ } catch (SQLException e) {
+ // ignore
+ }
+ }
+ }
+ }
+
+ // TODO: delegate to some extension point
+ private Configuration buildConfiguration(Properties properties, boolean includeMappings) {
+ Configuration localCfg = null;
+ if (prefs.getConfigurationMode().equals(ConfigurationMode.ANNOTATIONS)) {
+ try {
+ localCfg = buildAnnotationConfiguration();
+ localCfg = configureStandardConfiguration(includeMappings, localCfg, properties);
+ } catch (HibernateConsoleRuntimeException he) {
+ throw he;
+ } catch (Exception e) {
+ throw new HibernateConsoleRuntimeException(
+ ConsoleMessages.ConsoleConfiguration_could_not_load_annotationconfiguration,
+ e);
+ }
+ } else if (prefs.getConfigurationMode().equals(ConfigurationMode.JPA)) {
+ try {
+ localCfg = buildJPAConfiguration(getPreferences().getPersistenceUnitName(),
+ properties, prefs.getEntityResolverName(), includeMappings);
+ } catch (HibernateConsoleRuntimeException he) {
+ throw he;
+ } catch (Exception e) {
+ throw new HibernateConsoleRuntimeException(
+ ConsoleMessages.ConsoleConfiguration_could_not_load_jpa_configuration, e);
+ }
+ } else {
+ localCfg = new Configuration();
+ localCfg = configureStandardConfiguration(includeMappings, localCfg, properties);
+ }
+ return localCfg;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Configuration buildAnnotationConfiguration() throws ClassNotFoundException,
+ InstantiationException, IllegalAccessException {
+ Class<Configuration> clazz = ReflectHelper
+ .classForName("org.hibernate.cfg.AnnotationConfiguration"); //$NON-NLS-1$
+ Configuration newInstance = clazz.newInstance();
+ return newInstance;
+ }
+
+ private Configuration buildJPAConfiguration(String persistenceUnit, Properties properties,
+ String entityResolver, boolean includeMappings) {
+ if (StringHelper.isEmpty(persistenceUnit)) {
+ persistenceUnit = null;
+ }
+ try {
+ Map<Object, Object> overrides = new HashMap<Object, Object>();
+ if (properties != null) {
+ overrides.putAll(properties);
+ }
+ if (StringHelper.isNotEmpty(prefs.getNamingStrategy())) {
+ overrides.put("hibernate.ejb.naming_strategy", prefs.getNamingStrategy()); //$NON-NLS-1$
+ }
+ if (StringHelper.isNotEmpty(prefs.getDialectName())) {
+ overrides.put(Environment.DIALECT, prefs.getDialectName());
+ }
+ if (!includeMappings) {
+ overrides.put("hibernate.archive.autodetection", "none"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ if (StringHelper.isEmpty((String) overrides.get("javax.persistence.validation.mode"))) {//$NON-NLS-1$
+ overrides.put("javax.persistence.validation.mode", "none"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ Class<?> clazz = ReflectHelper.classForName(
+ "org.hibernate.ejb.Ejb3Configuration", ConsoleConfiguration.class); //$NON-NLS-1$
+ Object ejb3cfg = clazz.newInstance();
+ if (StringHelper.isNotEmpty(entityResolver)) {
+ Class<?> resolver = ReflectHelper.classForName(entityResolver, this.getClass());
+ Object object = resolver.newInstance();
+ Method method = clazz.getMethod(
+ "setEntityResolver", new Class[] { EntityResolver.class });//$NON-NLS-1$
+ method.invoke(ejb3cfg, new Object[] { object });
+ }
+ Method method = clazz.getMethod("configure", new Class[] { String.class, Map.class }); //$NON-NLS-1$
+ if (method.invoke(ejb3cfg, new Object[] { persistenceUnit, overrides }) == null) {
+ String out = NLS.bind(
+ ConsoleMessages.ConsoleConfiguration_persistence_unit_not_found,
+ persistenceUnit);
+ throw new HibernateConsoleRuntimeException(out);
+ }
+ method = clazz.getMethod("getHibernateConfiguration", new Class[0]);//$NON-NLS-1$
+ Configuration invoke = (Configuration) method.invoke(ejb3cfg, (Object[]) null);
+ invoke = configureConnectionProfile(invoke);
+ return invoke;
+ } catch (HibernateConsoleRuntimeException he) {
+ throw he;
+ } catch (Exception e) {
+ throw new HibernateConsoleRuntimeException(
+ ConsoleMessages.ConsoleConfiguration_could_not_create_jpa_based_configuration,
+ e);
+ }
+ }
+
+ private Configuration configureStandardConfiguration(final boolean includeMappings,
+ Configuration localCfg, Properties properties) {
+ if (properties != null) {
+ localCfg = localCfg.setProperties(properties);
+ }
+ EntityResolver entityResolver = XMLHelper.DEFAULT_DTD_RESOLVER;
+ if (StringHelper.isNotEmpty(prefs.getEntityResolverName())) {
+ try {
+ entityResolver = (EntityResolver) ReflectHelper.classForName(
+ prefs.getEntityResolverName()).newInstance();
+ } catch (Exception c) {
+ throw new HibernateConsoleRuntimeException(
+ ConsoleMessages.ConsoleConfiguration_could_not_configure_entity_resolver
+ + prefs.getEntityResolverName(), c);
+ }
+ }
+ localCfg.setEntityResolver(entityResolver);
+ if (StringHelper.isNotEmpty(prefs.getNamingStrategy())) {
+ try {
+ NamingStrategy ns = (NamingStrategy) ReflectHelper.classForName(
+ prefs.getNamingStrategy()).newInstance();
+ localCfg.setNamingStrategy(ns);
+ } catch (Exception c) {
+ throw new HibernateConsoleRuntimeException(
+ ConsoleMessages.ConsoleConfiguration_could_not_configure_naming_strategy
+ + prefs.getNamingStrategy(), c);
+ }
+ }
+ localCfg = loadConfigurationXML(localCfg, includeMappings, entityResolver);
+ localCfg = configureConnectionProfile(localCfg);
+ // replace dialect if it is set in preferences
+ if (StringHelper.isNotEmpty(prefs.getDialectName())) {
+ localCfg.setProperty(Environment.DIALECT, prefs.getDialectName());
+ }
+ if (StringHelper.isEmpty(localCfg.getProperty("javax.persistence.validation.mode"))) {//$NON-NLS-1$
+ localCfg.setProperty("javax.persistence.validation.mode", "none"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ return localCfg;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Configuration loadConfigurationXML(Configuration localCfg, boolean includeMappings,
+ EntityResolver entityResolver) {
+ File configXMLFile = prefs.getConfigXMLFile();
+ if (!includeMappings) {
+ org.dom4j.Document doc;
+ XMLHelper xmlHelper = new XMLHelper();
+ InputStream stream = null;
+ String resourceName = "<unknown>"; //$NON-NLS-1$
+ if (configXMLFile != null) {
+ resourceName = configXMLFile.toString();
+ try {
+ stream = new FileInputStream(configXMLFile);
+ } catch (FileNotFoundException e1) {
+ throw new HibernateConsoleRuntimeException(
+ ConsoleMessages.ConsoleConfiguration_could_not_access + configXMLFile,
+ e1);
+ }
+ } else {
+ resourceName = "/hibernate.cfg.xml"; //$NON-NLS-1$
+ if (checkHibernateResoureExistence(resourceName)) {
+ stream = ConfigHelper.getResourceAsStream(resourceName); // simulate hibernate's
+ // default look up
+ } else {
+ return localCfg;
+ }
+ }
+ try {
+ List<Throwable> errors = new ArrayList<Throwable>();
+ doc = xmlHelper.createSAXReader(resourceName, errors, entityResolver).read(
+ new InputSource(stream));
+ if (errors.size() != 0) {
+ throw new MappingException(
+ ConsoleMessages.ConsoleConfiguration_invalid_configuration, errors
+ .get(0));
+ }
+ List<Node> list = doc.getRootElement()
+ .element("session-factory").elements("mapping"); //$NON-NLS-1$ //$NON-NLS-2$
+ for (Node element : list) {
+ element.getParent().remove(element);
+ }
+ DOMWriter dw = new DOMWriter();
+ Document document = dw.write(doc);
+ return localCfg.configure(document);
+
+ } catch (DocumentException e) {
+ throw new HibernateException(
+ ConsoleMessages.ConsoleConfiguration_could_not_parse_configuration
+ + resourceName, e);
+ } finally {
+ try {
+ if (stream != null)
+ stream.close();
+ } catch (IOException ioe) {
+ // log.warn( "could not close input stream for: " + resourceName, ioe );
+ }
+ }
+ } else {
+ if (configXMLFile != null) {
+ return localCfg.configure(configXMLFile);
+ } else {
+ Configuration resultCfg = localCfg;
+ if (checkHibernateResoureExistence("/hibernate.cfg.xml")) { //$NON-NLS-1$
+ resultCfg = localCfg.configure();
+ }
+ return resultCfg;
+ }
+ }
+ }
+
+ private boolean checkHibernateResoureExistence(String resource) {
+ InputStream is = null;
+ try {
+ is = ConfigHelper.getResourceAsStream(resource);
+ } catch (HibernateException e) {
+ // just ignore
+ } finally {
+ try {
+ if (is != null)
+ is.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ return (is != null);
+ }
+
+ private Configuration configureConnectionProfile(Configuration localCfg) {
+ String connProfileName = prefs.getConnectionProfileName();
+ if (connProfileName == null) {
+ return localCfg;
+ }
+ IConnectionProfile profile = ProfileManager.getInstance().getProfileByName(
+ connProfileName);
+ if (profile != null) {
+ final Properties cpProperties = profile.getProperties(profile.getProviderId());
+ final Properties invokeProperties = localCfg.getProperties();
+ // set this property to null!
+ invokeProperties.remove(Environment.DATASOURCE);
+ localCfg.setProperties(invokeProperties);
+ // seems we should not setup dialect here
+ //String dialect = "org.hibernate.dialect.HSQLDialect";
+ //invoke.setProperty(Environment.DIALECT, dialect);
+ String driverClass = ConnectionProfileUtil.getDriverClass(connProfileName);
+ localCfg.setProperty(Environment.DRIVER, driverClass);
+ //String driverJarPath = driverInstance != null ?
+ // driverInstance.getJarList() : ""; //$NON-NLS-1$
+ String url = cpProperties.getProperty(IJDBCDriverDefinitionConstants.URL_PROP_ID);
+ // url += "/";// +
+ // cpProperties.getProperty(IJDBCDriverDefinitionConstants.DATABASE_NAME_PROP_ID);
+ localCfg.setProperty(Environment.URL, url);
+ String user = cpProperties.getProperty(IJDBCDriverDefinitionConstants.USERNAME_PROP_ID);
+ if (null != user && user.length() > 0) {
+ localCfg.setProperty(Environment.USER, user);
+ }
+ String pass = cpProperties.getProperty(IJDBCDriverDefinitionConstants.PASSWORD_PROP_ID);
+ if (null != pass && pass.length() > 0) {
+ localCfg.setProperty(Environment.PASS, pass);
+ }
+ } else {
+ String out = NLS.bind(
+ ConsoleMessages.ConsoleConfiguration_connection_profile_not_found,
+ connProfileName);
+ throw new HibernateConsoleRuntimeException(out);
+ }
+ return localCfg;
+ }
+
+ /**
+ * DriverManager checks what classloader a class is loaded from thus we register a FakeDriver
+ * that we know is loaded "properly" which delegates all it class to the real driver. By doing
+ * so we can convince DriverManager that we can use any dynamically loaded driver.
+ *
+ * @param driverClassName
+ */
+ @SuppressWarnings("unchecked")
+ private void registerFakeDriver(String driverClassName) {
+ if (driverClassName != null) {
+ try {
+ Class<Driver> driverClass = ReflectHelper.classForName(driverClassName);
+ if (!fakeDrivers.containsKey(driverClassName)) { // To avoid "double registration"
+ FakeDelegatingDriver fakeDelegatingDriver = new FakeDelegatingDriver(
+ driverClass.newInstance());
+ DriverManager.registerDriver(fakeDelegatingDriver);
+ fakeDrivers.put(driverClassName, fakeDelegatingDriver);
+ }
+ } catch (ClassNotFoundException e) {
+ String out =
+ NLS.bind(ConsoleMessages.ConsoleConfiguration_problems_while_loading_database_driverclass, driverClassName);
+ throw new HibernateConsoleRuntimeException(out, e);
+ } catch (InstantiationException e) {
+ String out =
+ NLS.bind(ConsoleMessages.ConsoleConfiguration_problems_while_loading_database_driverclass, driverClassName);
+ throw new HibernateConsoleRuntimeException(out, e);
+ } catch (IllegalAccessException e) {
+ String out =
+ NLS.bind(ConsoleMessages.ConsoleConfiguration_problems_while_loading_database_driverclass, driverClassName);
+ throw new HibernateConsoleRuntimeException(out, e);
+ } catch (SQLException e) {
+ String out =
+ NLS.bind(ConsoleMessages.ConsoleConfiguration_problems_while_loading_database_driverclass, driverClassName);
+ throw new HibernateConsoleRuntimeException(out, e);
+ }
+ }
+ }
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/FakeDelegatingDriver.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/FakeDelegatingDriver.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/FakeDelegatingDriver.java 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tools.hibernate4_0;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverPropertyInfo;
+import java.sql.SQLException;
+import java.util.Properties;
+
+public class FakeDelegatingDriver implements Driver {
+ private Driver driver;
+
+ public FakeDelegatingDriver(Driver d) {
+ this.driver = d;
+ }
+ public boolean acceptsURL(String u) throws SQLException {
+ return this.driver.acceptsURL(u);
+ }
+ public Connection connect(String u, Properties p) throws SQLException {
+ return this.driver.connect(u, p);
+ }
+ public int getMajorVersion() {
+ return this.driver.getMajorVersion();
+ }
+ public int getMinorVersion() {
+ return this.driver.getMinorVersion();
+ }
+ public DriverPropertyInfo[] getPropertyInfo(String u, Properties p)
+ throws SQLException {
+ return this.driver.getPropertyInfo(u, p);
+ }
+ public boolean jdbcCompliant() {
+ return this.driver.jdbcCompliant();
+ }
+}
\ No newline at end of file
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,361 @@
+package org.jboss.tools.hibernate4_0;
+
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.osgi.util.NLS;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.console.ConsoleConfigClassLoader;
+import org.hibernate.console.ConsoleMessages;
+import org.hibernate.console.ConsoleQueryParameter;
+import org.hibernate.console.QueryInputModel;
+import org.hibernate.console.execution.DefaultExecutionContext;
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.execution.ExecutionContext.Command;
+import org.hibernate.console.ext.HibernateException;
+import org.hibernate.console.ext.HibernateExtension;
+import org.hibernate.console.ext.QueryResult;
+import org.hibernate.console.ext.QueryResultImpl;
+import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
+import org.hibernate.console.preferences.PreferencesClassPathUtils;
+import org.hibernate.service.BasicServiceRegistry;
+import org.hibernate.service.ServiceRegistryBuilder;
+import org.hibernate.service.internal.BasicServiceRegistryImpl;
+import org.hibernate.type.Type;
+
+public class HibernateExtension4_0 implements HibernateExtension {
+
+ private ConsoleConfigClassLoader classLoader = null;
+
+ private ExecutionContext executionContext;
+
+ private ConsoleConfigurationPreferences prefs;
+
+ private Configuration configuration;
+
+ private SessionFactory sessionFactory;
+
+ private BasicServiceRegistry serviceRegistry;
+
+ private Map<String, FakeDelegatingDriver> fakeDrivers = new HashMap<String, FakeDelegatingDriver>();
+
+ public HibernateExtension4_0() {
+ }
+
+ @Override
+ public String getHibernateVersion() {
+ return "4.0";
+ }
+
+ @Override
+ public QueryResult executeHQLQuery(String hql,
+ QueryInputModel queryParameters) {
+ System.out.println("Execute HQLQuery in " + getClass().getName());
+ Session session = null;
+ try {
+ session = sessionFactory.openSession();
+ } catch (Exception e){
+ e.printStackTrace();
+ }
+ Query query = session.createQuery(hql);
+ List<Object> list = Collections.emptyList();
+ long queryTime = 0;
+ try {
+ list = new ArrayList<Object>();
+ setupParameters(query, queryParameters);
+ long startTime = System.currentTimeMillis();
+ Iterator<?> iter = query.list().iterator(); // need to be user-controllable to toggle between iterate, scroll etc.
+ queryTime = System.currentTimeMillis() - startTime;
+ while (iter.hasNext() ) {
+ Object element = iter.next();
+ list.add(element);
+ }
+ }
+ catch (HibernateException e) {
+ e.printStackTrace();
+ }
+ return new QueryResultImpl(list,
+ getPathNames(query), queryTime);
+ }
+
+ public List<String> getPathNames(Query query) {
+ List<String> l = Collections.emptyList();
+
+ try {
+ if(query==null) return l;
+ String[] returnAliases = null;
+ try {
+ returnAliases = query.getReturnAliases();
+ } catch(NullPointerException e) {
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ if(returnAliases==null) {
+ Type[] t;
+ try {
+ t = query.getReturnTypes();
+ } catch(NullPointerException npe) {
+ t = new Type[] { null };
+ // ignore - http://opensource.atlassian.com/projects/hibernate/browse/HHH-2188
+ }
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ Type type = t[i];
+ if(type==null) {
+ l.add("<multiple types>"); //$NON-NLS-1$
+ } else {
+ l.add(type.getName() );
+ }
+ }
+ } else {
+ String[] t = returnAliases;
+ l = new ArrayList<String>(t.length);
+
+ for (int i = 0; i < t.length; i++) {
+ l.add(t[i]);
+ }
+ }
+ } catch (HibernateException he) {
+ he.printStackTrace();
+ }
+
+ return l;
+ }
+
+ private void setupParameters(Query query2, QueryInputModel model) {
+
+ if(model.getMaxResults()!=null) {
+ query2.setMaxResults( model.getMaxResults().intValue() );
+ }
+
+ ConsoleQueryParameter[] qp = model.getQueryParameters();
+ for (int i = 0; i < qp.length; i++) {
+ ConsoleQueryParameter parameter = qp[i];
+
+ try {
+ int pos = Integer.parseInt(parameter.getName());
+ //FIXME no method to set positioned list value
+ query2.setParameter(pos, calcValue( parameter ), parameter.getType());
+ } catch(NumberFormatException nfe) {
+ Object value = parameter.getValue();
+ if (value != null && value.getClass().isArray()){
+ Object[] values = (Object[])value;
+ query2.setParameterList(parameter.getName(), Arrays.asList(values), parameter.getType());
+ } else {
+ query2.setParameter(parameter.getName(), calcValue( parameter ), parameter.getType());
+ }
+ }
+ }
+ }
+
+ private Object calcValue(ConsoleQueryParameter parameter) {
+ return parameter.getValueForQuery();
+ }
+
+ @Override
+ public QueryResult executeCriteriaQuery(String criteria,
+ QueryInputModel queryParameters) {
+ return null;
+ }
+
+ /**
+ * @param ConsoleConfigurationPreferences the prefs to set
+ */
+ public void setConsoleConfigurationPreferences(ConsoleConfigurationPreferences prefs) {
+ this.prefs = prefs;
+ }
+
+ public void build() {
+ configuration = buildWith(null, true);
+ }
+
+ @Override
+ public void buildSessionFactory() {
+ execute(new Command() {
+ public Object execute() {
+ if (sessionFactory != null) {
+ throw new HibernateException("Factory was not closed before attempt to build a new Factory");
+ }
+ serviceRegistry = new ServiceRegistryBuilder()
+ .applySettings( configuration.getProperties())
+ .buildServiceRegistry();
+ sessionFactory = configuration.buildSessionFactory(serviceRegistry);
+ return null;
+ }
+ });
+ }
+
+ @Override
+ public boolean closeSessionFactory() {
+ boolean res = false;
+ if (sessionFactory != null) {
+ sessionFactory.close();
+ sessionFactory = null;
+ ( (BasicServiceRegistryImpl) serviceRegistry ).destroy();
+ serviceRegistry = null;
+ res = true;
+ }
+ return res;
+ }
+
+ public Configuration buildWith(final Configuration cfg, final boolean includeMappings) {
+ reinitClassLoader();
+ //TODO handle user libraries here
+ executionContext = new DefaultExecutionContext(prefs.getName(), classLoader);
+ Configuration result = (Configuration)execute(new Command() {
+ public Object execute() {
+ ConfigurationFactory cf = new ConfigurationFactory(prefs, fakeDrivers);
+ return cf.createConfiguration(cfg, includeMappings);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * Create class loader - so it uses the original urls list from preferences.
+ */
+ protected void reinitClassLoader() {
+ boolean recreateFlag = true;
+ final URL[] customClassPathURLs = PreferencesClassPathUtils.getCustomClassPathURLs(prefs);
+ if (classLoader != null) {
+ // check -> do not recreate class loader in case if urls list is the same
+ final URL[] oldURLS = classLoader.getURLs();
+ if (customClassPathURLs.length == oldURLS.length) {
+ int i = 0;
+ for (; i < oldURLS.length; i++) {
+ if (!customClassPathURLs[i].sameFile(oldURLS[i])) {
+ break;
+ }
+ }
+ if (i == oldURLS.length) {
+ recreateFlag = false;
+ }
+ }
+ }
+ if (recreateFlag) {
+ reset();
+ classLoader = createClassLoader(customClassPathURLs);
+ }
+ }
+
+ protected ConsoleConfigClassLoader createClassLoader(final URL[] customClassPathURLs) {
+ ConsoleConfigClassLoader classLoader = AccessController.doPrivileged(new PrivilegedAction<ConsoleConfigClassLoader>() {
+ public ConsoleConfigClassLoader run() {
+ return new ConsoleConfigClassLoader(customClassPathURLs, Thread.currentThread().getContextClassLoader()) {
+ protected Class<?> findClass(String name) throws ClassNotFoundException {
+ try {
+ return super.findClass(name);
+ } catch (ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ try {
+ return super.loadClass(name, resolve);
+ } catch (ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ public Class<?> loadClass(String name) throws ClassNotFoundException {
+ try {
+ return super.loadClass(name);
+ } catch (ClassNotFoundException cnfe) {
+ throw cnfe;
+ }
+ }
+
+ public URL getResource(String name) {
+ return super.getResource(name);
+ }
+ };
+ }
+ });
+ return classLoader;
+ }
+
+ public String getName() {
+ return prefs.getName();
+ }
+
+ public Object execute(Command c) {
+ if (executionContext != null) {
+ return executionContext.execute(c);
+ }
+ final String msg = NLS.bind(ConsoleMessages.ConsoleConfiguration_null_execution_context, getName());
+ throw new HibernateException(msg);
+ }
+
+ @Override
+ public boolean reset() {
+ boolean res = false;
+ // reseting state
+ if (configuration != null) {
+ configuration = null;
+ res = true;
+ }
+
+ boolean tmp = closeSessionFactory();
+ res = res || tmp;
+ if (executionContext != null) {
+ executionContext.execute(new Command() {
+ public Object execute() {
+ Iterator<FakeDelegatingDriver> it = fakeDrivers.values().iterator();
+ while (it.hasNext()) {
+ try {
+ DriverManager.deregisterDriver(it.next());
+ } catch (SQLException e) {
+ // ignore
+ }
+ }
+ return null;
+ }
+ });
+ }
+ if (fakeDrivers.size() > 0) {
+ fakeDrivers.clear();
+ res = true;
+ }
+ tmp = cleanUpClassLoader();
+ res = res || tmp;
+ executionContext = null;
+ return res;
+ }
+
+ protected boolean cleanUpClassLoader() {
+ boolean res = false;
+ ClassLoader classLoaderTmp = classLoader;
+ while (classLoaderTmp != null) {
+ if (classLoaderTmp instanceof ConsoleConfigClassLoader) {
+ ((ConsoleConfigClassLoader)classLoaderTmp).close();
+ res = true;
+ }
+ classLoaderTmp = classLoaderTmp.getParent();
+ }
+ if (classLoader != null) {
+ classLoader = null;
+ res = true;
+ }
+ return res;
+ }
+
+ @Override
+ public boolean hasConfiguration() {
+ return configuration != null;
+ }
+
+}
\ No newline at end of file
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0Plugin.java 2011-10-03 13:40:52 UTC (rev 35280)
@@ -0,0 +1,50 @@
+package org.jboss.tools.hibernate4_0;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class HibernateExtension4_0Plugin extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.hibernateextension4_0"; //$NON-NLS-1$
+
+ // The shared instance
+ private static HibernateExtension4_0Plugin plugin;
+
+ /**
+ * The constructor
+ */
+ public HibernateExtension4_0Plugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static HibernateExtension4_0Plugin getDefault() {
+ return plugin;
+ }
+
+}
11 years, 5 months
JBoss Tools SVN: r35279 - trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-03 08:52:10 -0400 (Mon, 03 Oct 2011)
New Revision: 35279
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF/MANIFEST.MF
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF/MANIFEST.MF 2011-10-03 11:52:32 UTC (rev 35278)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF/MANIFEST.MF 2011-10-03 12:52:10 UTC (rev 35279)
@@ -13,7 +13,7 @@
org.eclipse.core.resources;bundle-version="3.7.0",
org.eclipse.ui.ide;bundle-version="3.7.0",
org.eclipse.ui.workbench.texteditor;bundle-version="3.7.0",
- org.eclipse.text;bundle-version="3.5.101",
+ org.eclipse.text;bundle-version="3.5.100",
org.jboss.tools.jst.jsp,
org.eclipse.wst.sse.ui;bundle-version="1.3.0",
org.jboss.tools.common.text.ext,
11 years, 5 months
JBoss Tools SVN: r35278 - in trunk/common/tests/org.jboss.tools.common.ui.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 07:52:32 -0400 (Mon, 03 Oct 2011)
New Revision: 35278
Added:
trunk/common/tests/org.jboss.tools.common.ui.test/META-INF/
trunk/common/tests/org.jboss.tools.common.ui.test/META-INF/MANIFEST.MF
Modified:
trunk/common/tests/org.jboss.tools.common.ui.test/build.properties
Log:
[JBIDE-9805] moved StringPreferenceValue to org.jboss.tools.common and org.jboss.tools.common.ui: moved tests and created new plugin for it
Added: trunk/common/tests/org.jboss.tools.common.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.ui.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.ui.test/META-INF/MANIFEST.MF 2011-10-03 11:52:32 UTC (rev 35278)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.jboss.tools.common.ui.test
+Bundle-Version: 3.3.0.qualifier
+Bundle-Vendor: %Bundle-Vendor.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.junit
+Import-Package: org.jboss.tools.common.ui.preferencevalue
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Property changes on: trunk/common/tests/org.jboss.tools.common.ui.test/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/common/tests/org.jboss.tools.common.ui.test/build.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.ui.test/build.properties 2011-10-03 11:02:33 UTC (rev 35277)
+++ trunk/common/tests/org.jboss.tools.common.ui.test/build.properties 2011-10-03 11:52:32 UTC (rev 35278)
@@ -1,3 +1,5 @@
source.. = src/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.properties
+src.includes = pom.xml
11 years, 5 months
JBoss Tools SVN: r35277 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-10-03 07:02:33 -0400 (Mon, 03 Oct 2011)
New Revision: 35277
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
Log:
Expand m2e/m2e-wtp compat. version ranges
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2011-10-03 10:04:49 UTC (rev 35276)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2011-10-03 11:02:33 UTC (rev 35277)
@@ -56,13 +56,13 @@
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.1.0)</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
<property name="description">This project example requires m2e >= 1.0.</property>
<property name="connectorIds">org.eclipse.m2e.feature</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.14.0)</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -101,13 +101,13 @@
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.1.0)</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
<property name="description">This project example requires m2e >= 1.0.</property>
<property name="connectorIds">org.eclipse.m2e.feature</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.14.0)</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -142,13 +142,13 @@
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.1.0)</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
<property name="description">This project example requires m2e >= 1.0.</property>
<property name="connectorIds">org.eclipse.m2e.feature</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.14.0)</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -183,13 +183,13 @@
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.1.0)</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
<property name="description">This project example requires m2e >= 1.0.</property>
<property name="connectorIds">org.eclipse.m2e.feature</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.14.0)</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -225,13 +225,13 @@
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.1.0)</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
<property name="description">This project example requires m2e >= 1.0.</property>
<property name="connectorIds">org.eclipse.m2e.feature</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.14.0)</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
@@ -267,13 +267,13 @@
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
- <property name="versions">[1.0.0,1.1.0)</property>
+ <property name="versions">[1.0.0,1.2.0)</property>
<property name="description">This project example requires m2e >= 1.0.</property>
<property name="connectorIds">org.eclipse.m2e.feature</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
- <property name="versions">[0.13.1,0.14.0)</property>
+ <property name="versions">[0.13.1,0.15.0)</property>
<property name="description">This project example requires m2eclipse-wtp >= 0.13.1.</property>
<property name="connectorIds">org.maven.ide.eclipse.wtp</property>
</fix>
11 years, 5 months
JBoss Tools SVN: r35276 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 06:04:49 -0400 (Mon, 03 Oct 2011)
New Revision: 35276
Removed:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ui/preferences/StringsPreferenceValueTest.java
Log:
[JBIDE-9805] moved StringPreferenceValue etc. to org.jboss.tools.common.ui
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ui/preferences/StringsPreferenceValueTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ui/preferences/StringsPreferenceValueTest.java 2011-10-03 10:02:14 UTC (rev 35275)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ui/preferences/StringsPreferenceValueTest.java 2011-10-03 10:04:49 UTC (rev 35276)
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.test.ui.preferences;
-
-import static org.junit.Assert.assertEquals;
-
-import org.jboss.tools.deltacloud.ui.preferences.StringsPreferenceValue;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * @author André Dietisheim
- */
-public class StringsPreferenceValueTest {
-
- private static final char DELIMITER = ',';
-
- private static class StringsPreferenceValueFake extends StringsPreferenceValue {
-
- private String values = "";
-
- public StringsPreferenceValueFake(char delimiter) {
- super(delimiter, null, null);
- }
-
-
- @Override
- protected void doStore(String value) {
- this.values = value;
- }
-
- @Override
- protected String doGet(String currentValue) {
- if (currentValue == null || currentValue.equals("")) {
- return values;
- } else {
- return currentValue;
- }
- }
-
- }
-
- private StringsPreferenceValue stringValues;
-
- @Before
- public void setUp() {
- this.stringValues = new StringsPreferenceValueFake(DELIMITER);
- }
-
- @Test
- public void canAddValues() {
- stringValues.add("11");
- stringValues.add("22");
- assertEquals(2, stringValues.get().length);
- stringValues.add("33");
- assertEquals(3, stringValues.get().length);
- }
-
- @Test
- public void identicalValueAreNotAdded() {
- String value = "11";
- stringValues.add(value);
- stringValues.add(value);
- assertEquals(1, stringValues.get().length);
- }
-
- @Test
- public void canAddDelimiterValue() {
- stringValues.add("11");
- assertEquals(1, stringValues.get().length);
- stringValues.add(DELIMITER + "");
- assertEquals(2, stringValues.get().length);
- }
-
- @Test
- public void delimiterValueIsReturnedCorrectly() {
- stringValues.add("11");
- assertEquals(1, stringValues.get().length);
- String delimiterValue = DELIMITER + "";
- stringValues.add(delimiterValue);
- String[] values = stringValues.get();
- assertEquals(2, values.length);
- values[1] = delimiterValue;
- }
-
-}
11 years, 5 months
JBoss Tools SVN: r35275 - trunk/common/tests.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 06:02:14 -0400 (Mon, 03 Oct 2011)
New Revision: 35275
Modified:
trunk/common/tests/pom.xml
Log:
[JBIDE-9805] moved StringPreferenceValue etc. to org.jboss.tools.common.ui
Modified: trunk/common/tests/pom.xml
===================================================================
--- trunk/common/tests/pom.xml 2011-10-03 09:58:11 UTC (rev 35274)
+++ trunk/common/tests/pom.xml 2011-10-03 10:02:14 UTC (rev 35275)
@@ -43,7 +43,8 @@
<module>org.jboss.tools.common.validation.test</module>
<module>org.jboss.tools.common.verification.test</module>
<module>org.jboss.tools.common.verification.ui.test</module>
- </modules>
+ <module>org.jboss.tools.common.ui.test</module>
+ </modules>
</profile>
<profile>
11 years, 5 months
JBoss Tools SVN: r35274 - in trunk/deltacloud/tests/org.jboss.tools.deltacloud.test: src/org/jboss/tools/internal/deltacloud/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 05:58:11 -0400 (Mon, 03 Oct 2011)
New Revision: 35274
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java
Log:
[JBIDE-9805] moved StringPreferenceValue etc. to org.jboss.tools.common.ui
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-10-03 09:56:19 UTC (rev 35273)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-10-03 09:58:11 UTC (rev 35274)
@@ -1,12 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Test
-Bundle-SymbolicName: org.jboss.tools.deltacloud.test
-Bundle-Version: 1.0.1.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.jboss.tools.common.ui.test
+Bundle-Version: 3.3.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
org.jboss.tools.deltacloud.core;bundle-version="[1.0.0,2.0.0)",
org.jboss.tools.deltacloud.ui;bundle-version="0.1.0",
- org.junit;bundle-version="[4.8.0,5.0.0)"
-Bundle-ClassPath: .
+ org.junit;bundle-version="[4.8.0,5.0.0)",
+ org.junit.source;bundle-version="4.8.2"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.jboss.tools.common.ui.preferencevalue
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java 2011-10-03 09:56:19 UTC (rev 35273)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java 2011-10-03 09:58:11 UTC (rev 35274)
@@ -11,7 +11,6 @@
package org.jboss.tools.internal.deltacloud.test;
import org.jboss.tools.internal.deltacloud.test.core.job.CloudSchedulingRulesTest;
-import org.jboss.tools.internal.deltacloud.test.ui.preferences.StringsPreferenceValueTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -20,7 +19,6 @@
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({
- CloudSchedulingRulesTest.class,
- StringsPreferenceValueTest.class})
+ CloudSchedulingRulesTest.class})
public class DeltaCloudTestSuite {
}
11 years, 5 months
JBoss Tools SVN: r35273 - in trunk/common/tests/org.jboss.tools.common.ui.test: src and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 05:56:19 -0400 (Mon, 03 Oct 2011)
New Revision: 35273
Added:
trunk/common/tests/org.jboss.tools.common.ui.test/.classpath
trunk/common/tests/org.jboss.tools.common.ui.test/.project
trunk/common/tests/org.jboss.tools.common.ui.test/build.properties
trunk/common/tests/org.jboss.tools.common.ui.test/plugin.properties
trunk/common/tests/org.jboss.tools.common.ui.test/pom.xml
trunk/common/tests/org.jboss.tools.common.ui.test/src/
trunk/common/tests/org.jboss.tools.common.ui.test/src/org/
trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/
trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/
trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/common/
trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/common/ui/
trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/common/ui/preferencevalue/
trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValueTest.java
Log:
[JBIDE-9805] moved StringPreferenceValue etc. to org.jboss.tools.common.ui
Added: trunk/common/tests/org.jboss.tools.common.ui.test/.classpath
===================================================================
--- trunk/common/tests/org.jboss.tools.common.ui.test/.classpath (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.ui.test/.classpath 2011-10-03 09:56:19 UTC (rev 35273)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/common/tests/org.jboss.tools.common.ui.test/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.ui.test/.project
===================================================================
--- trunk/common/tests/org.jboss.tools.common.ui.test/.project (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.ui.test/.project 2011-10-03 09:56:19 UTC (rev 35273)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.common.ui.test</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.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/common/tests/org.jboss.tools.common.ui.test/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.ui.test/build.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.ui.test/build.properties (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.ui.test/build.properties 2011-10-03 09:56:19 UTC (rev 35273)
@@ -0,0 +1,3 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/common/tests/org.jboss.tools.common.ui.test/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.ui.test/plugin.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.ui.test/plugin.properties (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.ui.test/plugin.properties 2011-10-03 09:56:19 UTC (rev 35273)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.common.model.ui.test
+Bundle-Vendor.0=JBoss by Red Hat
+Bundle-Name.0=Common UI Test Plug-in
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.ui.test/plugin.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.ui.test/pom.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.ui.test/pom.xml (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.ui.test/pom.xml 2011-10-03 09:56:19 UTC (rev 35273)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.common</groupId>
+ <artifactId>tests</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.common.tests</groupId>
+ <artifactId>org.jboss.tools.common.ui.test</artifactId>
+
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.instrument.bundles>org.jboss.tools.common.ui.preferencevalue</emma.instrument.bundles>
+ </properties>
+</project>
Property changes on: trunk/common/tests/org.jboss.tools.common.ui.test/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValueTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValueTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValueTest.java 2011-10-03 09:56:19 UTC (rev 35273)
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.ui.preferencevalue;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author André Dietisheim
+ */
+public class StringsPreferenceValueTest {
+
+ private static final char DELIMITER = ',';
+
+ private static class StringsPreferenceValueFake extends StringsPreferenceValue {
+
+ private String values = "";
+
+ public StringsPreferenceValueFake(char delimiter) {
+ super(delimiter, null, null);
+ }
+
+
+ @Override
+ protected void doStore(String value) {
+ this.values = value;
+ }
+
+ @Override
+ protected String doGet(String currentValue) {
+ if (currentValue == null || currentValue.equals("")) {
+ return values;
+ } else {
+ return currentValue;
+ }
+ }
+
+ }
+
+ private StringsPreferenceValue stringValues;
+
+ @Before
+ public void setUp() {
+ this.stringValues = new StringsPreferenceValueFake(DELIMITER);
+ }
+
+ @Test
+ public void canAddValues() {
+ stringValues.add("11");
+ stringValues.add("22");
+ assertEquals(2, stringValues.get().length);
+ stringValues.add("33");
+ assertEquals(3, stringValues.get().length);
+ }
+
+ @Test
+ public void identicalValueAreNotAdded() {
+ String value = "11";
+ stringValues.add(value);
+ stringValues.add(value);
+ assertEquals(1, stringValues.get().length);
+ }
+
+ @Test
+ public void canAddDelimiterValue() {
+ stringValues.add("11");
+ assertEquals(1, stringValues.get().length);
+ stringValues.add(DELIMITER + "");
+ assertEquals(2, stringValues.get().length);
+ }
+
+ @Test
+ public void delimiterValueIsReturnedCorrectly() {
+ stringValues.add("11");
+ assertEquals(1, stringValues.get().length);
+ String delimiterValue = DELIMITER + "";
+ stringValues.add(delimiterValue);
+ String[] values = stringValues.get();
+ assertEquals(2, values.length);
+ values[1] = delimiterValue;
+ }
+
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.ui.test/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValueTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
11 years, 5 months
JBoss Tools SVN: r35272 - trunk/common/tests.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 05:55:12 -0400 (Mon, 03 Oct 2011)
New Revision: 35272
Added:
trunk/common/tests/org.jboss.tools.common.ui.test/
Log:
[JBIDE-9805] moved StringPreferenceValue etc. to org.jboss.tools.common.ui
11 years, 5 months