Author: max.andersen(a)jboss.com
Date: 2008-02-07 07:08:40 -0500 (Thu, 07 Feb 2008)
New Revision: 6150
Modified:
branches/jbosstools-2.0.x/
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java
branches/jbosstools-2.0.x/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
branches/jbosstools-2.0.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
branches/jbosstools-2.0.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
branches/jbosstools-2.0.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java
branches/jbosstools-2.0.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
Log:
Merged revisions 6137-6142 via svnmerge from
https://svn.jboss.org/repos/jbosstools/trunk
........
r6137 | dgolovin | 2008-02-06 23:00:44 +0100 (Wed, 06 Feb 2008) | 1 line
fix errors in testActionHandlers JUnit test
........
r6138 | dgolovin | 2008-02-06 23:16:02 +0100 (Wed, 06 Feb 2008) | 1 line
fix testJiraJbide1631 error: Failure Marker matches the '"foo1" cannot be
resolved' pattern wasn't found
........
r6139 | dgolovin | 2008-02-07 02:13:52 +0100 (Thu, 07 Feb 2008) | 1 line
fix for hibernate console tests errors
........
r6140 | dgolovin | 2008-02-07 03:12:11 +0100 (Thu, 07 Feb 2008) | 1 line
Run test only for xulRunner view with about:blank to understand is it started at all?
Since it looks like all errors in VPE tests related to XHTML. Now html and struts tests
run without errors, but they have html and jsp files.
........
r6141 | dgolovin | 2008-02-07 04:55:39 +0100 (Thu, 07 Feb 2008) | 1 line
rollback code for waitForJobs method
........
r6142 | dgolovin | 2008-02-07 07:15:54 +0100 (Thu, 07 Feb 2008) | 1 line
fix compilation error
........
Property changes on: branches/jbosstools-2.0.x
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-6135
+ /trunk:1-6135,6137-6142
Modified:
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java
===================================================================
---
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java 2008-02-07
12:03:04 UTC (rev 6149)
+++
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/ConsoleConfigurationTest.java 2008-02-07
12:08:40 UTC (rev 6150)
@@ -1,11 +1,14 @@
package org.hibernate.eclipse.console.test;
import java.io.File;
+import java.io.IOException;
import java.net.URL;
import java.util.Properties;
import junit.framework.TestCase;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
import org.hibernate.SessionFactory;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ConsoleConfigurationListener;
@@ -13,6 +16,7 @@
import org.hibernate.console.KnownConfigurations;
import org.hibernate.console.QueryPage;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
+import org.osgi.framework.Bundle;
import org.w3c.dom.Element;
public class ConsoleConfigurationTest extends TestCase {
@@ -54,7 +58,15 @@
}
public File getConfigXMLFile() {
- return null;
+ File xmlConfig = null;
+ Bundle bundle = HibernateConsoleTestPlugin.getDefault().getBundle();
+ try {
+ URL url =
FileLocator.resolve(bundle.getEntry("/res/project/hibernate.cfg.xml"));
+ xmlConfig = new File(url.getFile());
+ } catch (IOException e) {
+ fail("Cannot find /res/project/hibernate.cfg.xml file");
+ }
+ return xmlConfig;
}
public Properties getProperties() {
Modified:
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java
===================================================================
---
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java 2008-02-07
12:03:04 UTC (rev 6149)
+++
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/HibernateConsoleTest.java 2008-02-07
12:08:40 UTC (rev 6150)
@@ -1,9 +1,13 @@
package org.hibernate.eclipse.console.test;
+import java.util.logging.Logger;
+
import junit.framework.TestCase;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.ui.IPackagesViewPart;
import org.eclipse.jdt.ui.JavaUI;
@@ -89,7 +93,7 @@
if (!display.readAndDispatch())
display.sleep();
}
- display.update();
+ //display.update();
}
// Otherwise, perform a simple sleep.
@@ -107,9 +111,20 @@
*/
public void waitForJobs() {
while (Platform.getJobManager().currentJob() != null)
- delay(1000);
+ delay(2000);
}
+ public boolean noMoreJobs() {
+ Job[] queuedJobs= Job.getJobManager().find(null);
+ for (int i= 0; i < queuedJobs.length; i++) {
+ Job entry= queuedJobs[i];
+ if (entry.getState() == Job.RUNNING || entry.getState() == Job.WAITING) {
+ return false;
+ }
+ }
+ return true;
+ }
+
protected SimpleTestProject getProject() {
return this.project;
}
Modified:
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java
===================================================================
---
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java 2008-02-07
12:03:04 UTC (rev 6149)
+++
branches/jbosstools-2.0.x/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestProject.java 2008-02-07
12:08:40 UTC (rev 6150)
@@ -14,6 +14,8 @@
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -27,6 +29,7 @@
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -38,6 +41,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.PackageFragmentRoot;
+import org.hibernate.eclipse.console.test.HibernateConsoleTestPlugin;
/**
@@ -109,13 +113,16 @@
project.delete(true, true, null);
}
- private void buildBigTestProject() throws JavaModelException, CoreException {
+ private void buildBigTestProject() throws JavaModelException, CoreException, IOException
{
project = buildNewProject(PROJECT_NAME);
javaProject = buildJavaProject(project);
-
IPath resourcePath = new Path(RESOURCE_PATH);
File resourceFolder = resourcePath.toFile();
+ URL entry =
HibernateConsoleTestPlugin.getDefault().getBundle().getEntry(RESOURCE_PATH);
+ URL resProject = FileLocator.resolve(entry);
+ String tplPrjLcStr= FileLocator.resolve(resProject).getFile();
+ resourceFolder = new File(tplPrjLcStr);
if (!resourceFolder.exists())
throw new RuntimeException("Folder " + RESOURCE_PATH + " not
found!");
@@ -340,7 +347,7 @@
StringWriter writer = new StringWriter();
int bytes_read;
while ((bytes_read = reader.read(buffer)) != -1)
- {
+ {resourceFolder.exists()
writer.write(buffer, 0, bytes_read);
}
return (writer.toString());
Modified:
branches/jbosstools-2.0.x/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
===================================================================
---
branches/jbosstools-2.0.x/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2008-02-07
12:03:04 UTC (rev 6149)
+++
branches/jbosstools-2.0.x/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2008-02-07
12:08:40 UTC (rev 6150)
@@ -1063,16 +1063,7 @@
<Editor name="Uneditable"/>
</XModelAttribute>
</XModelAttributes>
- <XActionItem kind="list">
- <XActionItem
-
HandlerClassName="org.jboss.tools.struts.webprj.model.handlers.SetLocationHandler"
- ICON="action.webprj.set_location" WizardClassName="%Default%"
- displayName="Set location..." kind="action"
name="SetLocation">
- <EntityData EntityName="WebPrjCreateStepDirs">
- <AttributeData AttributeName="location" Mandatory="no"/>
- </EntityData>
- </XActionItem>
- </XActionItem>
+ <XActionItem kind="list"/>
<XDependencies/>
</XModelEntity>
<XModelEntity name="WebPrjRegisterApplication">
@@ -1543,23 +1534,6 @@
HandlerClassName="org.jboss.tools.jst.web.project.handlers.CreateWebPrjHandler"
ICON="main.projects.new" SAVE_REQUIRED="yes"
displayName="Create New Project..." kind="action"
name="CreateStrutsProject"/>
- <XActionItem HIDE="always"
-
HandlerClassName="org.jboss.tools.struts.webprj.model.handlers.ImportWebPrjHandler"
- ICON="main.projects.item"
-
PROPERTIES="support=org.jboss.tools.struts.webprj.model.handlers.ImportWebPrjSupport"
- SAVE_REQUIRED="yes" displayName="Adopt Existing Project..."
- kind="action" name="ImportStrutsProject">
- <EntityData EntityName="WebPrjCreateStepName">
- <AttributeData AttributeName="name"/>
- <AttributeData AttributeName="location"/>
- </EntityData>
- <EntityData EntityName="WebPrjCreateStepDirs">
- <AttributeData AttributeName="webroot"/>
- <AttributeData AttributeName="classes" Mandatory="no"/>
- <AttributeData AttributeName="lib" Mandatory="no"/>
- <AttributeData AttributeName="src" Mandatory="no"/>
- </EntityData>
- </XActionItem>
<XActionItem HandlerClassName="%SpecialWizard%"
ICON="action.empty"
PROPERTIES="support=org.jboss.tools.struts.webprj.model.helpers.sync.SyncProjectSupport"
displayName="Modules Configuration" kind="action"
name="SynchronizeModules"/>
Modified:
branches/jbosstools-2.0.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
---
branches/jbosstools-2.0.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2008-02-07
12:03:04 UTC (rev 6149)
+++
branches/jbosstools-2.0.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2008-02-07
12:08:40 UTC (rev 6150)
@@ -76,6 +76,13 @@
return seamProject;
}
+ public void testJiraJbide1631() throws CoreException {
+ // Test for
http://jira.jboss.com/jira/browse/JBIDE-1631
+ IFile jbide1631XHTMLFile = project.getFile("WebContent/JBIDE-1631.xhtml");
+ assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo1\" cannot be
resolved", 16 );
+ assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo2\" cannot be
resolved", 17 );
+ }
+
public void testComponentsValidator() {
ISeamProject seamProject = getSeamProject(project);
@@ -743,13 +750,6 @@
assertTrue("Problem marker has wrong line number", lineNumbers[0] == 22);
}
- public void testJiraJbide1631() throws CoreException {
- // Test for
http://jira.jboss.com/jira/browse/JBIDE-1631
- IFile jbide1631XHTMLFile = project.getFile("WebContent/JBIDE-1631.xhtml");
- assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo1\" cannot be
resolved", 16 );
- assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo2\" cannot be
resolved", 17 );
- }
-
public void testInheritedMethods() {
ISeamProject seamProject = getSeamProject(project);
Modified:
branches/jbosstools-2.0.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
===================================================================
---
branches/jbosstools-2.0.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2008-02-07
12:03:04 UTC (rev 6149)
+++
branches/jbosstools-2.0.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2008-02-07
12:08:40 UTC (rev 6150)
@@ -3,6 +3,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.common.log.BaseUIPlugin;
+import org.jboss.tools.common.log.IPluginLog;
import org.osgi.framework.BundleContext;
/**
@@ -64,4 +65,8 @@
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
+
+ public static IPluginLog getPluginLog() {
+ return getDefault();
+ }
}
Modified:
branches/jbosstools-2.0.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java
===================================================================
---
branches/jbosstools-2.0.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java 2008-02-07
12:03:04 UTC (rev 6149)
+++
branches/jbosstools-2.0.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/test/XulRunnerAllTests.java 2008-02-07
12:08:40 UTC (rev 6150)
@@ -18,7 +18,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("Test for " +
XulRunnerAllTests.class.getName());
//add test cases for dom elements
- suite.addTestSuite(DOMCreatingTest.class);
+ suite.addTestSuite(XulRunnerBrowserTest.class);
return suite;
}
Modified:
branches/jbosstools-2.0.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java
===================================================================
---
branches/jbosstools-2.0.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java 2008-02-07
12:03:04 UTC (rev 6149)
+++
branches/jbosstools-2.0.x/vpe/tests/org.jboss.tools.vpe.xulrunner.test/src/org/jboss/tools/vpe/xulrunner/view/XulRunnerView.java 2008-02-07
12:08:40 UTC (rev 6150)
@@ -1,15 +1,17 @@
package org.jboss.tools.vpe.xulrunner.view;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
+import org.jboss.tools.vpe.xulrunner.BrowserPlugin;
import org.jboss.tools.vpe.xulrunner.XulRunnerException;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
public class XulRunnerView extends ViewPart {
- private static final String INIT_URL = "about:buildconfig";
+ private static final String INIT_URL = "about:blank";
private XulRunnerEditor xulrunnerEditor;
@Override
@@ -20,7 +22,7 @@
xulrunnerEditor.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, true));
} catch (XulRunnerException e) {
- // Ignore exception
+ BrowserPlugin.getPluginLog().logError(e);
}
}