[jbosstools-commits] JBoss Tools SVN: r35281 - in branches/dead/hibernatetools-multiversion2/plugins: org.hibernate.eclipse/META-INF and 16 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Oct 3 09:42:28 EDT 2011


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,



More information about the jbosstools-commits mailing list