JBoss Tools SVN: r20209 - trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-02-09 18:02:24 -0500 (Tue, 09 Feb 2010)
New Revision: 20209
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-annotations.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-entitymanager.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-validator.jar
Log:
JBIDEJBIDE-5706 more jars missing ;(
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-annotations.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-entitymanager.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-validator.jar
===================================================================
(Binary files differ)
14 years, 8 months
JBoss Tools SVN: r20208 - in trunk/hibernatetools: plugins/org.hibernate.eclipse/lib/hibernate and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-02-09 17:58:26 -0500 (Tue, 09 Feb 2010)
New Revision: 20208
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate3.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/lib/hibernate-tools-tests.jar
Log:
JBIDE-5706 update hibernatetools core and missing hibernate3.jar core update.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-02-09 22:44:05 UTC (rev 20207)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-02-09 22:58:26 UTC (rev 20208)
@@ -507,6 +507,7 @@
org.logicalcobwebs.proxool.util,
org.objectweb.asm,
org.objectweb.asm.attrs,
+ org.objectweb.asm.signature,
org.slf4j,
org.slf4j.helpers,
org.slf4j.impl,
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate3.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/lib/hibernate-tools-tests.jar
===================================================================
(Binary files differ)
14 years, 8 months
JBoss Tools SVN: r20207 - in trunk/hibernatetools: plugins/org.hibernate.eclipse/META-INF and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-02-09 17:44:05 -0500 (Tue, 09 Feb 2010)
New Revision: 20207
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/Formatter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.2.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-3.1.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate-jmx.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-api-1.5.8.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-log4j12-1.5.8.jar
Removed:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.1.3.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-2.1.1.jar
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtilsEjb3.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/QLFormatHelper.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath
trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/ejb3-persistence.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-commons-annotations.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/asm.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/javassist.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/jboss-cache.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/jta.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/.classpath
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/ejb3-persistence.jar
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/hibernate3.jar
Log:
JBIDE-5706 Moved to hibernate 3.3.2 to pick up many bugfixes in annotation and entitymanager code.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2010-02-09 21:07:14 UTC (rev 20206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2010-02-09 22:44:05 UTC (rev 20207)
@@ -5,12 +5,8 @@
<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/commons-collections-2.1.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/hibernate/dom4j-1.6.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate3.jar" sourcepath="/hibernate-3.2"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/hibernate3.jar" sourcepath="C:/Temp/_hibernate/hibernate-core-3.3.2.GA-sources.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"/>
@@ -21,21 +17,28 @@
<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/hibernate-tools.jar" sourcepath="/hibernateext.tools"/>
- <classpathentry exported="true" kind="lib" path="lib/tools/freemarker.jar"/>
<classpathentry exported="true" kind="lib" path="lib/bsh-core-2.0b4.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/annotations/ejb3-persistence.jar"/>
<classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-annotations.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/cglib-2.1.3.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/annotations/hibernate-entitymanager.jar" sourcepath="/hibernateext.entitymanager"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-entitymanager.jar" sourcepath="C:/Temp/_hibernate/hibernate-entitymanager-3.4.0.GA-sources.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-commons-annotations.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/hibernate-jmx.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" sourcepath="D:/Temp/_hibernate/slf4j-api-1.5.8-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/cglib-2.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/hibernate-commons-annotations.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/annotations/ejb3-persistence.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/c3p0-0.9.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/hibernate/ehcache-1.2.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate/slf4j-log4j12-1.5.8.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/tools/jtidy-r8-20060801.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-02-09 21:07:14 UTC (rev 20206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-02-09 22:44:05 UTC (rev 20207)
@@ -40,7 +40,12 @@
lib/annotations/hibernate-validator.jar,
lib/annotations/hibernate-search.jar,
lib/annotations/lucene-core-2.2.0.jar,
- lib/hibernate/log4j-1.2.15.jar
+ lib/hibernate/log4j-1.2.15.jar,
+ lib/hibernate/cglib-2.2.jar,
+ lib/hibernate/commons-collections-3.1.jar,
+ lib/hibernate/hibernate-jmx.jar,
+ lib/hibernate/slf4j-api-1.5.8.jar,
+ lib/hibernate/slf4j-log4j12-1.5.8.jar
Bundle-Activator: org.hibernate.eclipse.HibernatePlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
@@ -144,7 +149,9 @@
hbm,
javassist,
javassist.bytecode,
+ javassist.bytecode.analysis,
javassist.bytecode.annotation,
+ javassist.bytecode.stackmap,
javassist.compiler,
javassist.compiler.ast,
javassist.convert,
@@ -183,7 +190,6 @@
net.sf.cglib.proxy,
net.sf.cglib.reflect,
net.sf.cglib.transform,
- net.sf.cglib.transform.hook,
net.sf.cglib.transform.impl,
net.sf.cglib.util,
net.sf.ehcache,
@@ -201,8 +207,17 @@
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,
@@ -251,16 +266,21 @@
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,
@@ -273,7 +293,9 @@
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,
@@ -306,6 +328,7 @@
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,
@@ -362,14 +385,20 @@
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,
@@ -478,6 +507,10 @@
org.logicalcobwebs.proxool.util,
org.objectweb.asm,
org.objectweb.asm.attrs,
+ org.slf4j,
+ org.slf4j.helpers,
+ org.slf4j.impl,
+ org.slf4j.spi,
org.w3c.tidy,
org.w3c.tidy.ant,
pojo
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2010-02-09 21:07:14 UTC (rev 20206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2010-02-09 22:44:05 UTC (rev 20207)
@@ -12,14 +12,17 @@
lib/hibernate/c3p0-0.9.1.jar,\
lib/annotations/hibernate-commons-annotations.jar,\
lib/annotations/hibernate-validator.jar,\
- lib/annotations/hibernate-search.jar,\
- lib/annotations/lucene-core-2.2.0.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
+ plugin.properties,\
+ lib/hibernate/cglib-2.2.jar,\
+ lib/hibernate/commons-collections-3.1.jar,\
+ lib/hibernate/hibernate-jmx.jar
jars.compile.order = org.hibernate.eclipse.jar
source.org.hibernate.eclipse.jar = src/
output.org.hibernate.eclipse.jar = bin/
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/ejb3-persistence.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-commons-annotations.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/asm.jar
===================================================================
(Binary files differ)
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.1.3.jar
===================================================================
(Binary files differ)
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.2.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/cglib-2.2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-2.1.1.jar
===================================================================
(Binary files differ)
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-3.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/commons-collections-3.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate-jmx.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate-jmx.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/javassist.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/jboss-cache.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/jta.jar
===================================================================
(Binary files differ)
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-api-1.5.8.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-api-1.5.8.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-log4j12-1.5.8.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/slf4j-log4j12-1.5.8.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-02-09 21:07:14 UTC (rev 20206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-02-09 22:44:05 UTC (rev 20207)
@@ -34,7 +34,6 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.sql.Connection;
-import java.sql.DatabaseMetaData;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
@@ -66,7 +65,7 @@
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
import org.hibernate.dialect.Dialect;
-import org.hibernate.dialect.DialectFactory;
+import org.hibernate.dialect.resolver.DialectFactory;
import org.hibernate.util.ConfigHelper;
import org.hibernate.util.ReflectHelper;
import org.hibernate.util.StringHelper;
@@ -373,11 +372,8 @@
Connection connection = null;
try {
connection = DriverManager.getConnection(url, user, pass);
- DatabaseMetaData meta = connection.getMetaData();
- String databaseName = meta.getDatabaseProductName();
- int databaseMajorVersion = meta.getDatabaseMajorVersion();
//SQL Dialect:
- Dialect dialect = DialectFactory.buildDialect( localCfg.getProperties(), databaseName, databaseMajorVersion );
+ Dialect dialect = DialectFactory.buildDialect( localCfg.getProperties(), connection );
localCfg.setProperty(Environment.DIALECT, dialect.toString());
} catch (SQLException e) {
//can't determine dialect
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java 2010-02-09 21:07:14 UTC (rev 20206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java 2010-02-09 22:44:05 UTC (rev 20207)
@@ -37,6 +37,10 @@
return null; //throw new UnsupportedOperationException();
}
+ public Object getTransactionIdentifier(Transaction transaction) {
+ return transaction;
+ }
+
}
class FakeTransactionManager implements TransactionManager {
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/Formatter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/Formatter.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/Formatter.java 2010-02-09 22:44:05 UTC (rev 20207)
@@ -0,0 +1,375 @@
+package org.hibernate.eclipse.console.utils;
+
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import org.hibernate.util.StringHelper;
+
+/**
+ * Old formatter from previous Hibernate versions which allowed a bit more control, i.e. we want *less* spaces not more.
+ * In here to simplify migration from 3.2 to 3.3 where this class changed.
+ *
+ */
+@SuppressWarnings({ "unchecked", "nls" })
+public class Formatter {
+
+ private static final Set BEGIN_CLAUSES = new HashSet();
+ private static final Set END_CLAUSES = new HashSet();
+ private static final Set LOGICAL = new HashSet();
+ private static final Set QUANTIFIERS = new HashSet();
+ private static final Set DML = new HashSet();
+ private static final Set MISC = new HashSet();
+ static {
+
+ BEGIN_CLAUSES.add("left");
+ BEGIN_CLAUSES.add("right");
+ BEGIN_CLAUSES.add("inner");
+ BEGIN_CLAUSES.add("outer");
+ BEGIN_CLAUSES.add("group");
+ BEGIN_CLAUSES.add("order");
+
+ END_CLAUSES.add("where");
+ END_CLAUSES.add("set");
+ END_CLAUSES.add("having");
+ END_CLAUSES.add("join");
+ END_CLAUSES.add("from");
+ END_CLAUSES.add("by");
+ END_CLAUSES.add("join");
+ END_CLAUSES.add("into");
+ END_CLAUSES.add("union");
+
+ LOGICAL.add("and");
+ LOGICAL.add("or");
+ LOGICAL.add("when");
+ LOGICAL.add("else");
+ LOGICAL.add("end");
+
+ QUANTIFIERS.add("in");
+ QUANTIFIERS.add("all");
+ QUANTIFIERS.add("exists");
+ QUANTIFIERS.add("some");
+ QUANTIFIERS.add("any");
+
+ DML.add("insert");
+ DML.add("update");
+ DML.add("delete");
+
+ MISC.add("select");
+ MISC.add("on");
+ //MISC.add("values");
+
+ }
+
+ String indentString = " ";
+ String initial = "\n ";
+
+ boolean beginLine = true;
+ boolean afterBeginBeforeEnd = false;
+ boolean afterByOrSetOrFromOrSelect = false;
+ boolean afterValues = false;
+ boolean afterOn = false;
+ boolean afterBetween = false;
+ boolean afterInsert = false;
+ int inFunction = 0;
+ int parensSinceSelect = 0;
+ private LinkedList parenCounts = new LinkedList();
+ private LinkedList afterByOrFromOrSelects = new LinkedList();
+
+ int indent = 1;
+
+ StringBuffer result = new StringBuffer();
+ StringTokenizer tokens;
+ String lastToken;
+ String token;
+ String lcToken;
+
+ public Formatter(String sql) {
+ tokens = new StringTokenizer(
+ sql,
+ "()+*/-=<>'`\"[]," + StringHelper.WHITESPACE,
+ true
+ );
+ }
+
+ public Formatter setInitialString(String initial) {
+ this.initial = initial;
+ return this;
+ }
+
+ public Formatter setIndentString(String indent) {
+ this.indentString = indent;
+ return this;
+ }
+
+ public String format() {
+
+ result.append(initial);
+
+ while ( tokens.hasMoreTokens() ) {
+ token = tokens.nextToken();
+ lcToken = token.toLowerCase();
+
+ if ( "'".equals(token) ) {
+ String t;
+ do {
+ t = tokens.nextToken();
+ token += t;
+ }
+ while ( !"'".equals(t) && tokens.hasMoreTokens() ); // cannot handle single quotes
+ }
+ else if ( "\"".equals(token) ) {
+ String t;
+ do {
+ t = tokens.nextToken();
+ token += t;
+ }
+ while ( !"\"".equals(t) );
+ }
+
+ if ( afterByOrSetOrFromOrSelect && ",".equals(token) ) {
+ commaAfterByOrFromOrSelect();
+ }
+ else if ( afterOn && ",".equals(token) ) {
+ commaAfterOn();
+ }
+
+ else if ( "(".equals(token) ) {
+ openParen();
+ }
+ else if ( ")".equals(token) ) {
+ closeParen();
+ }
+
+ else if ( BEGIN_CLAUSES.contains(lcToken) ) {
+ beginNewClause();
+ }
+
+ else if ( END_CLAUSES.contains(lcToken) ) {
+ endNewClause();
+ }
+
+ else if ( "select".equals(lcToken) ) {
+ select();
+ }
+
+ else if ( DML.contains(lcToken) ) {
+ updateOrInsertOrDelete();
+ }
+
+ else if ( "values".equals(lcToken) ) {
+ values();
+ }
+
+ else if ( "on".equals(lcToken) ) {
+ on();
+ }
+
+ else if ( afterBetween && lcToken.equals("and") ) {
+ misc();
+ afterBetween = false;
+ }
+
+ else if ( LOGICAL.contains(lcToken) ) {
+ logical();
+ }
+
+ else if ( isWhitespace(token) ) {
+ white();
+ }
+
+ else {
+ misc();
+ }
+
+ if ( !isWhitespace( token ) ) lastToken = lcToken;
+
+ }
+ return result.toString();
+ }
+
+ private void commaAfterOn() {
+ out();
+ indent--;
+ newline();
+ afterOn = false;
+ afterByOrSetOrFromOrSelect = true;
+ }
+
+ private void commaAfterByOrFromOrSelect() {
+ out();
+ newline();
+ }
+
+ private void logical() {
+ if ( "end".equals(lcToken) ) indent--;
+ newline();
+ out();
+ beginLine = false;
+ }
+
+ private void on() {
+ indent++;
+ afterOn = true;
+ newline();
+ out();
+ beginLine = false;
+ }
+
+ private void misc() {
+ out();
+ if ( "between".equals(lcToken) ) {
+ afterBetween = true;
+ }
+ if (afterInsert) {
+ newline();
+ afterInsert = false;
+ }
+ else {
+ beginLine = false;
+ if ( "case".equals(lcToken) ) {
+ indent++;
+ }
+ }
+ }
+
+ private void white() {
+ if ( !beginLine ) {
+ result.append(" ");
+ }
+ }
+
+ private void updateOrInsertOrDelete() {
+ out();
+ indent++;
+ beginLine = false;
+ if ( "update".equals(lcToken) ) newline();
+ if ( "insert".equals(lcToken) ) afterInsert = true;
+ }
+
+ private void select() {
+ out();
+ indent++;
+ newline();
+ parenCounts.addLast( new Integer(parensSinceSelect) );
+ afterByOrFromOrSelects.addLast( new Boolean(afterByOrSetOrFromOrSelect) );
+ parensSinceSelect = 0;
+ afterByOrSetOrFromOrSelect = true;
+ }
+
+ private void out() {
+ result.append(token);
+ }
+
+ private void endNewClause() {
+ if (!afterBeginBeforeEnd) {
+ indent--;
+ if (afterOn) {
+ indent--;
+ afterOn=false;
+ }
+ newline();
+ }
+ out();
+ if ( !"union".equals(lcToken) ) indent++;
+ newline();
+ afterBeginBeforeEnd = false;
+ afterByOrSetOrFromOrSelect = "by".equals(lcToken)
+ || "set".equals(lcToken)
+ || "from".equals(lcToken);
+ }
+
+ private void beginNewClause() {
+ if (!afterBeginBeforeEnd) {
+ if (afterOn) {
+ indent--;
+ afterOn=false;
+ }
+ indent--;
+ newline();
+ }
+ out();
+ beginLine = false;
+ afterBeginBeforeEnd = true;
+ }
+
+ private void values() {
+ indent--;
+ newline();
+ out();
+ indent++;
+ newline();
+ afterValues = true;
+ }
+
+ private void closeParen() {
+ parensSinceSelect--;
+ if (parensSinceSelect<0) {
+ indent--;
+ parensSinceSelect = ( (Integer) parenCounts.removeLast() ).intValue();
+ afterByOrSetOrFromOrSelect = ( (Boolean) afterByOrFromOrSelects.removeLast() ).booleanValue();
+ }
+ if ( inFunction>0 ) {
+ inFunction--;
+ out();
+ }
+ else {
+ if (!afterByOrSetOrFromOrSelect) {
+ indent--;
+ newline();
+ }
+ out();
+ }
+ beginLine = false;
+ }
+
+ private void openParen() {
+ if ( isFunctionName( lastToken ) || inFunction>0 ) {
+ inFunction++;
+ }
+ beginLine = false;
+ if ( inFunction>0 ) {
+ out();
+ }
+ else {
+ out();
+ if (!afterByOrSetOrFromOrSelect) {
+ indent++;
+ newline();
+ beginLine = true;
+ }
+ }
+ parensSinceSelect++;
+ }
+
+ private static boolean isFunctionName(String tok) {
+ final char begin = tok.charAt(0);
+ final boolean isIdentifier = Character.isJavaIdentifierStart( begin ) || '"'==begin;
+ return isIdentifier &&
+ !LOGICAL.contains(tok) &&
+ !END_CLAUSES.contains(tok) &&
+ !QUANTIFIERS.contains(tok) &&
+ !DML.contains(tok) &&
+ !MISC.contains(tok);
+ }
+
+ private static boolean isWhitespace(String token) {
+ return StringHelper.WHITESPACE.indexOf(token)>=0;
+ }
+
+ private void newline() {
+ result.append("\n");
+ for ( int i=0; i<indent; i++ ) {
+ result.append(indentString);
+ }
+ beginLine = true;
+ }
+
+ public static void main(String[] args) {
+ if ( args.length>0 ) System.out.println(
+ new Formatter( StringHelper.join(" ", args) ).format()
+ );
+ }
+
+}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtilsEjb3.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtilsEjb3.java 2010-02-09 21:07:14 UTC (rev 20206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtilsEjb3.java 2010-02-09 22:44:05 UTC (rev 20207)
@@ -20,8 +20,14 @@
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.ejb.Ejb3Configuration;
import org.hibernate.ejb.HibernatePersistence;
+import org.hibernate.ejb.packaging.ClassFilter;
+import org.hibernate.ejb.packaging.Entry;
+import org.hibernate.ejb.packaging.FileFilter;
+import org.hibernate.ejb.packaging.Filter;
import org.hibernate.ejb.packaging.JarVisitor;
+import org.hibernate.ejb.packaging.JarVisitorFactory;
import org.hibernate.ejb.packaging.NamedInputStream;
+import org.hibernate.ejb.packaging.PackageFilter;
import org.hibernate.ejb.packaging.PersistenceMetadata;
import org.hibernate.ejb.packaging.PersistenceXmlLoader;
import org.hibernate.util.CollectionHelper;
@@ -88,18 +94,17 @@
URL visitorJarURL = null;
if (metadata.getName() == null) {
visitor = getMainJarVisitor(url, metadata, CollectionHelper.EMPTY_MAP);
- visitorJarURL = JarVisitor.getJarURLFromURLEntry(url, "/" + META_INF_PERS_XML); //$NON-NLS-1$
+ visitorJarURL = JarVisitorFactory.getJarURLFromURLEntry(url, "/" + META_INF_PERS_XML); //$NON-NLS-1$
metadata.setName(visitor.getUnqualifiedJarName());
}
if (persistenceUnitName == null && xmls.hasMoreElements()) {
- //throw new PersistenceException( "No name provided and several persistence units found" );
+ //throw new PersistenceException("No name provided and several persistence units found");
stopErrorFlag = true;
break;
- }
- else if (persistenceUnitName == null || metadata.getName().equals(persistenceUnitName)) {
+ } else if (persistenceUnitName == null || metadata.getName().equals(persistenceUnitName)) {
if (visitor == null) {
visitor = getMainJarVisitor(url, metadata, CollectionHelper.EMPTY_MAP);
- visitorJarURL = JarVisitor.getJarURLFromURLEntry(url, "/" + META_INF_PERS_XML); //$NON-NLS-1$
+ visitorJarURL = JarVisitorFactory.getJarURLFromURLEntry(url, "/" + META_INF_PERS_XML); //$NON-NLS-1$
}
try {
addMetadataFromVisitor(visitor, visitorJarURL.getPath(), metadata);
@@ -145,10 +150,11 @@
* @param integration
* @return
*/
- public static JarVisitor getMainJarVisitor(URL url, PersistenceMetadata metadata, Map integration) {
- URL jarURL = JarVisitor.getJarURLFromURLEntry(url, "/" + META_INF_PERS_XML); //$NON-NLS-1$
- JarVisitor.Filter[] persistenceXmlFilter = getFilters(metadata, integration, metadata.getExcludeUnlistedClasses());
- JarVisitor visitor = JarVisitor.getVisitor(jarURL, persistenceXmlFilter);
+ @SuppressWarnings("unchecked")
+ private static JarVisitor getMainJarVisitor(URL url, PersistenceMetadata metadata, Map integration) {
+ URL jarURL = JarVisitorFactory.getJarURLFromURLEntry(url, "/" + META_INF_PERS_XML); //$NON-NLS-1$
+ Filter[] persistenceXmlFilter = getFilters(metadata, integration, metadata.getExcludeUnlistedClasses());
+ JarVisitor visitor = JarVisitorFactory.getVisitor(jarURL, persistenceXmlFilter);
return visitor;
}
@@ -160,28 +166,28 @@
* @param metadata
* @throws IOException
*/
- public static void addMetadataFromVisitor(JarVisitor visitor, String addPath, PersistenceMetadata metadata) throws IOException {
+ @SuppressWarnings("unchecked")
+ private static void addMetadataFromVisitor(JarVisitor visitor, String addPath, PersistenceMetadata metadata) throws IOException {
Set[] entries = visitor.getMatchingEntries();
- JarVisitor.Filter[] filters = visitor.getFilters();
+ Filter[] filters = visitor.getFilters();
int size = filters.length;
List<String> classes = metadata.getClasses();
List<String> packages = metadata.getPackages();
List<NamedInputStream> hbmFiles = metadata.getHbmfiles();
+ List<String> mappingFiles = metadata.getMappingFiles();
for (int index = 0; index < size; index++) {
- Iterator homogeneousEntry = entries[index].iterator();
- while (homogeneousEntry.hasNext()) {
- JarVisitor.Entry entry = (JarVisitor.Entry) homogeneousEntry.next();
- if (filters[index] instanceof JarVisitor.ClassFilter) {
- //TODO only add entry if there is annotations (Javassist)
+ for (Object o : entries[index]) {
+ Entry entry = (Entry) o;
+ if (filters[index] instanceof ClassFilter) {
classes.add(entry.getName());
- }
- else if (filters[index] instanceof JarVisitor.PackageFilter) {
+ } else if (filters[index] instanceof PackageFilter) {
packages.add(entry.getName());
- }
- else if (filters[index] instanceof JarVisitor.FileFilter) {
- hbmFiles.add(new NamedInputStream(addPath + "/" + entry.getName(), //$NON-NLS-1$
+ } else if (filters[index] instanceof FileFilter) {
+ hbmFiles.add(new NamedInputStream(addPath + "/" + entry.getName(), //$NON-NLS-1$
entry.getInputStream()));
- metadata.getMappingFiles().remove(entry.getName());
+ if (mappingFiles != null) {
+ mappingFiles.remove(entry.getName());
+ }
}
}
}
@@ -196,7 +202,8 @@
* @param excludeIfNotOverriden
* @return
*/
- public static boolean[] getDetectedArtifacts(Properties properties, Map overridenProperties, boolean excludeIfNotOverriden) {
+ @SuppressWarnings("unchecked")
+ private static boolean[] getDetectedArtifacts(Properties properties, Map overridenProperties, boolean excludeIfNotOverriden) {
//result[0] - detect classes
//result[1] - detect hbm
boolean[] result = { false, false };
@@ -205,7 +212,7 @@
detect = detect == null ?
properties.getProperty( HibernatePersistence.AUTODETECTION) : detect;
if (detect == null && excludeIfNotOverriden) {
- //not overriden through HibernatePersistence.AUTODETECTION so we comply with the spec excludeUnlistedClasses
+ //not overridden through HibernatePersistence.AUTODETECTION so we comply with the spec excludeUnlistedClasses
return result;
}
else if (detect == null){
@@ -233,21 +240,26 @@
* @param excludeIfNotOverriden
* @return
*/
- public static JarVisitor.Filter[] getFilters(PersistenceMetadata metadata, Map overridenProperties, boolean excludeIfNotOverriden) {
+ @SuppressWarnings("unchecked")
+ private static Filter[] getFilters(PersistenceMetadata metadata, Map overridenProperties, boolean excludeIfNotOverriden) {
Properties properties = metadata.getProps();
final List<String> mappingFiles = metadata.getMappingFiles();
- boolean[] result = getDetectedArtifacts(properties, overridenProperties, excludeIfNotOverriden);
+ boolean[] detectedArtifacts = getDetectedArtifacts(properties, overridenProperties, excludeIfNotOverriden);
+ return getFilters(detectedArtifacts, true, mappingFiles);
+ }
- int size = ( result[0] ? 2 : 0 ) + 1; //class involves classes and packages, xml files are always involved because of orm.xml
- JarVisitor.Filter[] filters = new JarVisitor.Filter[size];
- if (result[0]) {
- filters[0] = new JarVisitor.PackageFilter(false, null) {
+ private static Filter[] getFilters(final boolean[] detectedArtifacts, final boolean searchORM, final List<String> mappingFiles) {
+ final int mappingFilesSize = mappingFiles != null ? mappingFiles.size() : 0;
+ int size = (detectedArtifacts[0] ? 2 : 0) + ((searchORM || detectedArtifacts[1] || mappingFilesSize > 0) ? 1 : 0);
+ Filter[] filters = new Filter[size];
+ if (detectedArtifacts[0]) {
+ filters[0] = new PackageFilter(false, null) {
public boolean accept(String javaElementName) {
return true;
}
};
- filters[1] = new JarVisitor.ClassFilter(
- false, new Class[]{
+ filters[1] = new ClassFilter(
+ false, new Class[] {
Entity.class,
MappedSuperclass.class,
Embeddable.class}
@@ -257,23 +269,15 @@
}
};
}
- if (result[1]) {
- filters[size - 1] = new JarVisitor.FileFilter(true) {
+ if (detectedArtifacts[1] || searchORM || mappingFilesSize > 0) {
+ filters[size - 1] = new FileFilter(true) {
public boolean accept(String javaElementName) {
- return javaElementName.endsWith("hbm.xml") //$NON-NLS-1$
- || javaElementName.endsWith(META_INF_ORM_XML)
- || mappingFiles.contains(javaElementName);
+ return (detectedArtifacts[1] && javaElementName.endsWith("hbm.xml")) //$NON-NLS-1$
+ || (searchORM && javaElementName.endsWith(META_INF_ORM_XML))
+ || (mappingFilesSize > 0 && mappingFiles.contains(javaElementName));
}
};
}
- else {
- filters[size - 1] = new JarVisitor.FileFilter(true) {
- public boolean accept(String javaElementName) {
- return javaElementName.endsWith(META_INF_ORM_XML)
- || mappingFiles.contains(javaElementName);
- }
- };
- }
return filters;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/QLFormatHelper.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/QLFormatHelper.java 2010-02-09 21:07:14 UTC (rev 20206)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/QLFormatHelper.java 2010-02-09 22:44:05 UTC (rev 20207)
@@ -21,8 +21,6 @@
*/
package org.hibernate.eclipse.console.utils;
-import org.hibernate.pretty.Formatter;
-
public class QLFormatHelper {
static public String formatForScreen(String query) {
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/.classpath
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/.classpath 2010-02-09 21:07:14 UTC (rev 20206)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/.classpath 2010-02-09 22:44:05 UTC (rev 20207)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate-tools-tests.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hsqldb.jar"/>
@@ -17,5 +17,6 @@
<classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/jmock-legacy-2.5.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/jmock-script-2.5.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/objenesis-1.0.jar"/>
+ <classpathentry kind="lib" path="C:/Bin/mysql-connector-java-5.0.7/mysql-connector-java-5.0.7-bin.jar" sourcepath="C:/Bin/mysql-connector-java-5.0.7/src"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/ejb3-persistence.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/hibernate3.jar
===================================================================
(Binary files differ)
14 years, 8 months
JBoss Tools SVN: r20206 - trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-02-09 16:07:14 -0500 (Tue, 09 Feb 2010)
New Revision: 20206
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5819 Maven WAR module dependecies are copied to the WEB-INF/lib directory after calling Run As>Maven package
Modified: trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java 2010-02-09 19:29:59 UTC (rev 20205)
+++ trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java 2010-02-09 21:07:14 UTC (rev 20206)
@@ -330,18 +330,14 @@
plugin.setArtifactId("maven-war-plugin"); //$NON-NLS-1$
Xpp3Dom configuration = new Xpp3Dom( "configuration" ); //$NON-NLS-1$
- Xpp3Dom webappDirectory = new Xpp3Dom("webappDirectory"); //$NON-NLS-1$
IVirtualComponent component = ComponentCore.createComponent(project);
IVirtualFolder rootFolder = component.getRootFolder();
IContainer root = rootFolder.getUnderlyingFolder();
String webContentRoot = root.getProjectRelativePath().toString();
- configuration.addChild(webappDirectory);
Xpp3Dom warSourceDirectory = new Xpp3Dom("warSourceDirectory"); //$NON-NLS-1$
if (webContentRoot.startsWith(SEPARATOR)) {
- webappDirectory.setValue(MavenCoreActivator.BASEDIR + webContentRoot);
warSourceDirectory.setValue(MavenCoreActivator.BASEDIR + webContentRoot);
} else {
- webappDirectory.setValue(MavenCoreActivator.BASEDIR + SEPARATOR + webContentRoot);
warSourceDirectory.setValue(MavenCoreActivator.BASEDIR + SEPARATOR + webContentRoot);
}
14 years, 8 months
JBoss Tools SVN: r20205 - in trunk/hibernatetools: plugins/org.hibernate.eclipse/src/org/hibernate/console/node and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-02-09 14:29:59 -0500 (Tue, 09 Feb 2010)
New Revision: 20205
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ConfigurationCombo.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsProvider.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfigurationListener.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurationsListener.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationListNode.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/KnownConfigurationsTest.java
Log:
fix for JBIDE-5816, introduced configurationReset event to force update of tree when reset occurs.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -129,6 +129,7 @@
}
fakeDrivers.clear();
cleanUpClassLoader();
+ fireConfigurationReset();
executionContext = null;
}
@@ -607,6 +608,12 @@
}
}
+ private void fireConfigurationReset() {
+ for (ConsoleConfigurationListener view : consoleCfgListeners) {
+ view.configurationReset(this);
+ }
+ }
+
private void fireQueryPageCreated(QueryPage qp) {
for (ConsoleConfigurationListener view : consoleCfgListeners) {
view.queryPageCreated(qp);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfigurationListener.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfigurationListener.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfigurationListener.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -45,5 +45,7 @@
public void sessionFactoryClosing(ConsoleConfiguration configuration, SessionFactory aboutToCloseFactory);
public void configurationBuilt(ConsoleConfiguration ccfg);
+
+ public void configurationReset(ConsoleConfiguration ccfg);
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -94,6 +94,14 @@
listener.configurationBuilt(ccfg);
}
});
+ }
+
+ public void configurationReset(final ConsoleConfiguration ccfg) {
+ fireNotification(new Notification() {
+ public void notify(KnownConfigurationsListener listener) {
+ listener.configurationReset(ccfg);
+ }
+ });
};
};
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurationsListener.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurationsListener.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurationsListener.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -34,4 +34,6 @@
public void sessionFactoryClosing(ConsoleConfiguration configuration, SessionFactory closingFactory);
public void configurationRemoved(ConsoleConfiguration root, boolean forUpdate);
+
+ public void configurationReset(ConsoleConfiguration ccfg);
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationListNode.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationListNode.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationListNode.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -21,9 +21,6 @@
*/
package org.hibernate.console.node;
-import java.util.Arrays;
-import java.util.Comparator;
-
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
import org.hibernate.console.KnownConfigurationsAdapter;
@@ -54,6 +51,10 @@
public void configurationRemoved(ConsoleConfiguration root, boolean forUpdate) {
markChildrenForReload();
}
+
+ public void configurationReset(ConsoleConfiguration ccfg) {
+ markChildrenForReload();
+ }
});
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -47,6 +47,10 @@
public void sessionFactoryClosing(ConsoleConfiguration configuration, SessionFactory closedSessionFactory) {
clear();
}
+
+ public void configurationReset(ConsoleConfiguration ccfg) {
+ clear();
+ }
});
name = configuration.getName();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ConfigurationCombo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ConfigurationCombo.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ConfigurationCombo.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -58,6 +58,10 @@
public void configurationAdded(ConsoleConfiguration root) {
populateComboBox();
}
+
+ public void configurationReset(ConsoleConfiguration ccfg) {
+
+ }
};
KnownConfigurations.getInstance().addConsoleConfigurationListener(
listener );
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -141,6 +141,10 @@
}
}
}
+
+ public void configurationReset(ConsoleConfiguration ccfg) {
+
+ }
};
KnownConfigurations.getInstance().addConsoleConfigurationListener(kcl);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsProvider.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsProvider.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsProvider.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -114,12 +114,20 @@
}
public void sessionFactoryClosing(final ConsoleConfiguration configuration, SessionFactory closingFactory) {
+ refreshTree(configuration);
+ }
+
+ public void configurationReset(ConsoleConfiguration ccfg) {
+ refreshTree(ccfg);
+ }
+
+ private void refreshTree(final ConsoleConfiguration configuration) {
Display.getDefault().syncExec(new Runnable() {
public void run() {
tv.collapseToLevel(configuration, AbstractTreeViewer.ALL_LEVELS);
tv.refresh(configuration);
}
- });
+ });
}
public void configurationBuilt(ConsoleConfiguration ccfg) {
@@ -187,6 +195,8 @@
refreshTree();
}
}
+
+
}
\ No newline at end of file
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -143,6 +143,11 @@
public void queryPageCreated(QueryPage qp) {
queryCreated++;
}
+
+ public void configurationReset(ConsoleConfiguration ccfg) {
+ // TODO Auto-generated method stub
+
+ }
}
public void testBuildConfiguration() {
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/KnownConfigurationsTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/KnownConfigurationsTest.java 2010-02-09 17:18:31 UTC (rev 20204)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/KnownConfigurationsTest.java 2010-02-09 19:29:59 UTC (rev 20205)
@@ -42,6 +42,11 @@
fail(ConsoleTestMessages.KnownConfigurationsTest_trying_remove_non_existing_console);
}
}
+
+ public void configurationReset(ConsoleConfiguration ccfg) {
+ // TODO Auto-generated method stub
+
+ }
}
public void testKnownConfigurations() {
14 years, 8 months
JBoss Tools SVN: r20204 - trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-02-09 12:18:31 -0500 (Tue, 09 Feb 2010)
New Revision: 20204
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-02-09 15:34:41 UTC (rev 20203)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-02-09 17:18:31 UTC (rev 20204)
@@ -32,6 +32,7 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
public class InjectedPointHyperlinkDetector extends AbstractHyperlinkDetector{
@@ -63,7 +64,7 @@
if (resource instanceof IFile)
file = (IFile) resource;
} catch (JavaModelException e) {
- // Ignore. It is probably because of Java element's resource is not found
+ CDIExtensionsPlugin.log(e);
}
if(file == null)
@@ -106,7 +107,7 @@
return (IHyperlink[])hyperlinks.toArray(new IHyperlink[hyperlinks.size()]);
}
} catch (JavaModelException jme) {
- // ignore
+ CDIExtensionsPlugin.log(jme);
}
return null;
}
14 years, 8 months
JBoss Tools SVN: r20203 - in trunk: cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-02-09 10:34:41 -0500 (Tue, 09 Feb 2010)
New Revision: 20203
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java 2010-02-09 15:34:41 UTC (rev 20203)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype.broken.withBindingType;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.Stereotype;
+import javax.enterprise.inject.Typed;
+
+@Stereotype
+@Target( { TYPE })
+@Retention(RUNTIME)
+(a)Typed(String.class)
+// This file is used to test JBT and it is missing in TCK.
+@interface StereotypeWithTyped_Broken {
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-02-09 14:44:22 UTC (rev 20202)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-02-09 15:34:41 UTC (rev 20203)
@@ -26,10 +26,45 @@
AbstractResourceMarkerTest.assertMarkerIsCreated(petShopFile, AbstractResourceMarkerTest.MARKER_TYPE, "Bean class or producer method or field specifies a @Typed annotation, and the value member specifies a class which does not correspond to a type in the unrestricted set of bean types of a bean", 9);
int markerNumbers = getMarkersNumber(petShopFile);
assertEquals("PetShop.java should has the only error marker.", markerNumbers, 1);
- // TODO
cleanProject("/lookup/typesafe/resolution");
}
+ /*
+ * 2.7.1.3. Stereotype declares a non-empty @Named annotation (Non-Portable behavior)
+ */
+ public void testNonEmptyNamedForStereotype() throws Exception {
+ IProject p = importPreparedProject("/definition/stereotype");
+ IFile file = p.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/nonEmptyNamed/StereotypeWithNonEmptyNamed_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, "Stereotype declares a non-empty @Named annotation", 15);
+ int markerNumbers = getMarkersNumber(file);
+ assertEquals("StereotypeWithNonEmptyNamed_Broken.java should has the only error marker.", markerNumbers, 1);
+ cleanProject("/definition/stereotype");
+ }
+
+ /*
+ * 2.7.1.3. Stereotype declares any other qualifier annotation
+ */
+ public void testAnnotatedStereotype() throws Exception {
+ IProject p = importPreparedProject("/definition/stereotype");
+ IFile file = p.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithBindingTypes_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, "Stereotype declares any qualifier annotation other than @Named", 14);
+ int markerNumbers = getMarkersNumber(file);
+ assertEquals("StereotypeWithBindingTypes_Broken.java should has the only error marker.", markerNumbers, 1);
+ cleanProject("/definition/stereotype");
+ }
+
+ /*
+ * 2.7.1.3. Stereotype is annotated @Typed
+ */
+ public void testTypedStereotype() throws Exception {
+ IProject p = importPreparedProject("/definition/stereotype");
+ IFile file = p.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/stereotype/broken/withBindingType/StereotypeWithTyped_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, "Stereotype is annotated @Typed", 15);
+ int markerNumbers = getMarkersNumber(file);
+ assertEquals("StereotypeWithTyped_Broken.java should has the only error marker.", markerNumbers, 1);
+ cleanProject("/definition/stereotype");
+ }
+
public static int getMarkersNumber(IResource resource) {
return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2010-02-09 14:44:22 UTC (rev 20202)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2010-02-09 15:34:41 UTC (rev 20203)
@@ -172,7 +172,7 @@
*/
public IStatus validate(Set<IFile> changedFiles, IProject project, ContextValidationHelper validationHelper, ValidatorManager manager, IReporter reporter) throws ValidationException {
init(project, validationHelper, manager, reporter);
- displaySubtask(SeamValidationMessages.SEARCHING_RESOURCES);
+ displaySubtask(SeamValidationMessages.SEARCHING_RESOURCES, new String[]{projectName});
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
Set<ISeamComponent> checkedComponents = new HashSet<ISeamComponent>();
14 years, 8 months
JBoss Tools SVN: r20202 - branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-02-09 09:44:22 -0500 (Tue, 09 Feb 2010)
New Revision: 20202
Modified:
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5816 - build configuration if it is null
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
===================================================================
--- branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2010-02-09 14:43:56 UTC (rev 20201)
+++ branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2010-02-09 14:44:22 UTC (rev 20202)
@@ -449,6 +449,10 @@
return file;
}
java.io.File configXMLFile = consoleConfig.getConfigXMLFile();
+ if (!consoleConfig.hasConfiguration()) {
+ consoleConfig.build();
+ consoleConfig.buildSessionFactory();
+ }
EntityResolver entityResolver = consoleConfig.getConfiguration().getEntityResolver();
Document doc = getDocument(configXMLFile, entityResolver);
if (doc == null) {
14 years, 8 months
JBoss Tools SVN: r20201 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-02-09 09:43:56 -0500 (Tue, 09 Feb 2010)
New Revision: 20201
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5816 - build configuration if it is null
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2010-02-09 14:40:23 UTC (rev 20200)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2010-02-09 14:43:56 UTC (rev 20201)
@@ -449,6 +449,10 @@
return file;
}
java.io.File configXMLFile = consoleConfig.getConfigXMLFile();
+ if (!consoleConfig.hasConfiguration()) {
+ consoleConfig.build();
+ consoleConfig.buildSessionFactory();
+ }
EntityResolver entityResolver = consoleConfig.getConfiguration().getEntityResolver();
Document doc = getDocument(configXMLFile, entityResolver);
if (doc == null) {
14 years, 8 months
JBoss Tools SVN: r20200 - branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-02-09 09:40:23 -0500 (Tue, 09 Feb 2010)
New Revision: 20200
Modified:
branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5817 - fix update - additional check for null
Modified: branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-02-09 14:40:04 UTC (rev 20199)
+++ branches/hibernatetools-switch-to-hibernate-core-3.3/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-02-09 14:40:23 UTC (rev 20200)
@@ -649,22 +649,26 @@
}
if (configXMLFile == null && classLoader != null) {
URL url = classLoader.findResource("hibernate.cfg.xml"); //$NON-NLS-1$
- URI uri = null;
- try {
- uri = url.toURI();
- configXMLFile = new File(uri);
- } catch (URISyntaxException e) {
- // ignore
+ if (url != null) {
+ URI uri = null;
+ try {
+ uri = url.toURI();
+ configXMLFile = new File(uri);
+ } catch (URISyntaxException e) {
+ // ignore
+ }
}
}
if (configXMLFile == null) {
URL url = Environment.class.getClassLoader().getResource("hibernate.cfg.xml"); //$NON-NLS-1$
- URI uri = null;
- try {
- uri = url.toURI();
- configXMLFile = new File(uri);
- } catch (URISyntaxException e) {
- // ignore
+ if (url != null) {
+ URI uri = null;
+ try {
+ uri = url.toURI();
+ configXMLFile = new File(uri);
+ } catch (URISyntaxException e) {
+ // ignore
+ }
}
}
return configXMLFile;
14 years, 8 months