Author: vyemialyanchyk
Date: 2009-04-07 08:59:51 -0400 (Tue, 07 Apr 2009)
New Revision: 14564
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPTuiTestPlugin.java
Log:
JBIDE-4137
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java 2009-04-07
12:59:24 UTC (rev 14563)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java 2009-04-07
12:59:51 UTC (rev 14564)
@@ -136,7 +136,7 @@
* mock hibernate factory, redefine some methods of base GenericJpaFactory
* to avoid unnecessary checks, which are not a subject of testing.
*/
- public class MockHibernateFactory extends HibernateFactory {
+ static public class MockHibernateFactory extends HibernateFactory {
/**
* during the testing our file has relevant content,
* so just return true without dig into the base code.
@@ -170,7 +170,7 @@
/**
* mock input stream to simulate javaFileName file reading
*/
- public class MockJavaInputStream extends InputStream {
+ public static class MockJavaInputStream extends InputStream {
protected int pointer = 0;
@@ -186,7 +186,7 @@
/**
* mock input stream to simulate .classpath file reading
*/
- public class MockClassPathInputStream extends InputStream {
+ public static class MockClassPathInputStream extends InputStream {
protected int pointer = 0;
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPTuiTestPlugin.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPTuiTestPlugin.java 2009-04-07
12:59:24 UTC (rev 14563)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPTuiTestPlugin.java 2009-04-07
12:59:51 UTC (rev 14564)
@@ -50,7 +50,7 @@
*/
public void start(BundleContext context) throws Exception {
super.start(context);
- plugin = this;
+ setPlugin(this);
}
/*
@@ -61,7 +61,7 @@
* )
*/
public void stop(BundleContext context) throws Exception {
- plugin = null;
+ setPlugin(null);
super.stop(context);
}
@@ -74,6 +74,10 @@
return plugin;
}
+ private static void setPlugin(HibernateJPTuiTestPlugin plugin) {
+ HibernateJPTuiTestPlugin.plugin = plugin;
+ }
+
public File getFileInPlugin(IPath path) throws CoreException {
try {
URL installURL = new URL(getBundle().getEntry("/"), path.toString());
//$NON-NLS-1$