JBoss Tools SVN: r21065 - in branches/modular_build/seam/tests: org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-03-26 15:34:56 -0400 (Fri, 26 Mar 2010)
New Revision: 21065
Modified:
branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1645Test.java
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2227TestCase.java
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/PackageNamesTest.java
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java
branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
Log:
JBDS-486
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2010-03-26 19:34:56 UTC (rev 21065)
@@ -11,7 +11,6 @@
Require-Bundle:
org.junit,
org.jboss.tools.seam.core,
- org.jboss.tools.common.test,
org.jboss.tools.jsf,
org.eclipse.wst.common.project.facet.core,
org.jboss.tools.tests,
@@ -25,7 +24,7 @@
org.eclipse.jdt.ui,
org.eclipse.jst.j2ee,
org.eclipse.text,
- org.eclipse.jdt.core.manipulation;bundle-version="1.3.0",
- org.jboss.tools.common.el.core;bundle-version="2.0.0"
+ org.eclipse.jdt.core.manipulation,
+ org.jboss.tools.common.el.core
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -20,7 +20,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.common.text.ITextSourceReference;
import org.jboss.tools.seam.core.BeanType;
import org.jboss.tools.seam.core.BijectedAttributeType;
@@ -48,6 +47,7 @@
import org.jboss.tools.seam.internal.core.scanner.lib.ClassPath;
import org.jboss.tools.seam.internal.core.scanner.lib.LibraryScanner;
import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class ScannerTest extends TestCase {
IProject project = null;
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamBigProjectTest.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -27,13 +27,13 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.internal.core.SeamProject;
import org.jboss.tools.test.util.JUnitUtils;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
import org.osgi.framework.Bundle;
/**
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2010-03-26 19:34:56 UTC (rev 21065)
@@ -6,35 +6,23 @@
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.junit,
org.jboss.tools.seam.ui,
- org.eclipse.core.runtime,
- org.eclipse.ui,
- org.jboss.tools.tests,
org.jboss.tools.jst.web.ui,
- org.jboss.tools.common.test,
- org.eclipse.core.resources,
org.jboss.tools.common.model,
org.eclipse.ui.navigator,
org.jboss.tools.seam.core.test,
org.jboss.tools.seam.core,
- org.eclipse.wst.validation,
org.eclipse.jst.j2ee,
org.eclipse.ui.ide,
org.eclipse.ui.workbench.texteditor,
- org.eclipse.ui.editors,
- org.eclipse.text,
- org.eclipse.wst.sse.core,
- org.eclipse.wst.sse.ui,
org.jboss.tools.common.text.ext,
org.jboss.tools.jst.text.ext,
org.jboss.tools.seam.text.ext,
org.eclipse.jface.text,
org.eclipse.wst.web.ui,
- org.eclipse.wst.common.modulecore,
org.eclipse.wst.common.project.facet.ui,
org.eclipse.wst.common.frameworks,
org.jboss.tools.jst.firstrun,
org.eclipse.wst.server.core,
- org.eclipse.datatools.connectivity,
org.jboss.tools.jst.jsp,
org.jboss.tools.jst.jsp.test,
org.eclipse.jdt.ui,
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1645Test.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1645Test.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1645Test.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -7,10 +7,10 @@
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.jboss.tools.common.el.ui.ca.ELProposalProcessor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class SeamELContentAssistJbide1645Test extends ContentAssistantTestCase {
TestProjectProvider provider = null;
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -24,9 +24,9 @@
import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.common.el.ui.ca.ELProposalProcessor;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class SeamELContentAssistJbide1676Test extends TestCase {
TestProjectProvider provider = null;
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2227TestCase.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2227TestCase.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide2227TestCase.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -28,9 +28,9 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor;
+import org.jboss.tools.test.util.TestProjectProvider;
import org.jboss.tools.vpe.ui.test.TestUtil;
import org.jboss.tools.vpe.ui.test.VpeTest;
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/jbide/JBide3989Test.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -23,12 +23,12 @@
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.ide.IDE;
import org.eclipse.wst.validation.internal.operations.ValidatorManager;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.ui.marker.SeamRuntimeMarkerResolution;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
/**
* @author snjeza
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/PackageNamesTest.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/PackageNamesTest.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/PackageNamesTest.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -17,11 +17,11 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
-import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.seam.ui.ISeamUiConstants;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.SeamInstallWizardPage;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
/**
* @author dazarov
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamActionNewWizardTest.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -15,10 +15,10 @@
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.seam.ui.ISeamUiConstants;
import org.jboss.tools.seam.ui.wizard.ISeamParameter;
import org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage;
+import org.jboss.tools.test.util.WorkbenchUtils;
/**
* @author eskimo
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamFormNewWizardTest.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -18,9 +18,9 @@
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
-import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.seam.ui.ISeamUiConstants;
import org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage;
+import org.jboss.tools.test.util.WorkbenchUtils;
/**
* @author eskimo
Modified: branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
===================================================================
--- branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2010-03-26 19:23:00 UTC (rev 21064)
+++ branches/modular_build/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2010-03-26 19:34:56 UTC (rev 21065)
@@ -28,12 +28,12 @@
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
-import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.jst.firstrun.JBossASAdapterInitializer;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
import org.jboss.tools.seam.ui.ISeamUiConstants;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
/**
* @author eskimo, akazakov
14 years, 9 months
JBoss Tools SVN: r21064 - in branches/modular_build/jsf/tests: org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-03-26 15:23:00 -0400 (Fri, 26 Mar 2010)
New Revision: 21064
Modified:
branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java
branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java
branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/ModelFormat_2_0_0_Test.java
branches/modular_build/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF
branches/modular_build/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java
branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java
branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/WizardTest.java
branches/modular_build/jsf/tests/org.jboss.tools.jsf.verification.test/META-INF/MANIFEST.MF
branches/modular_build/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JSFVerificationTest.java
Log:
JBDS-486
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2010-03-26 19:23:00 UTC (rev 21064)
@@ -11,16 +11,12 @@
Require-Bundle:
org.junit,
org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
org.jboss.tools.tests,
- org.jboss.tools.common.test,
- org.jboss.tools.common.model,
org.jboss.tools.jsf,
org.jboss.tools.jsf.ui,
- org.jboss.tools.jst.web.ui,
org.jboss.tools.common.model.ui,
- org.eclipse.ui.ide
+ org.eclipse.ui.ide,
+ org.jboss.tools.jst.web.ui
Bundle-Activator: org.jboss.tools.jsf.plugin.JsfTestPlugin
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFBeansTest.java 2010-03-26 19:23:00 UTC (rev 21064)
@@ -10,12 +10,12 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jsf.model.pv.JSFProjectsRoot;
import org.jboss.tools.jsf.model.pv.JSFProjectsTree;
import org.jboss.tools.jst.web.model.pv.WebProjectNode;
import org.jboss.tools.jst.web.project.list.IWebPromptingProvider;
import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
import junit.framework.TestCase;
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFModelTest.java 2010-03-26 19:23:00 UTC (rev 21064)
@@ -15,8 +15,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.common.test.util.TestDescription;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
@@ -27,6 +25,8 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jsf.model.pv.JSFProjectsRoot;
import org.jboss.tools.jsf.model.pv.JSFProjectsTree;
+import org.jboss.tools.test.util.TestDescription;
+import org.jboss.tools.test.util.TestProjectProvider;
import junit.framework.TestCase;
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/ModelFormat_2_0_0_Test.java
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/ModelFormat_2_0_0_Test.java 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/ModelFormat_2_0_0_Test.java 2010-03-26 19:23:00 UTC (rev 21064)
@@ -16,7 +16,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
@@ -25,6 +24,7 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jsf.model.pv.JSFProjectsRoot;
import org.jboss.tools.jsf.model.pv.JSFProjectsTree;
+import org.jboss.tools.test.util.TestProjectProvider;
import junit.framework.TestCase;
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.text.ext.test/META-INF/MANIFEST.MF 2010-03-26 19:23:00 UTC (rev 21064)
@@ -3,19 +3,13 @@
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.jsf.text.ext.test
Bundle-Version: 2.0.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.junit,
+Require-Bundle: org.junit,
org.jboss.tools.jsf.text.ext,
- org.eclipse.wst.sse.ui,
org.eclipse.ui.workbench.texteditor,
org.eclipse.jface.text,
- org.eclipse.core.resources,
org.eclipse.ui.ide,
org.jboss.tools.common.text.ext,
- org.eclipse.wst.sse.core,
org.jboss.tools.common.model,
- org.jboss.tools.common.test,
org.jboss.tools.tests
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/ELExprPartitionerTest.java 2010-03-26 19:23:00 UTC (rev 21064)
@@ -32,11 +32,11 @@
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.ui.internal.editor.EditorModelUtil;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
import org.jboss.tools.common.text.ext.util.AxisUtil;
import org.jboss.tools.jsf.text.ext.hyperlink.JSPExprHyperlinkPartitioner;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class ELExprPartitionerTest extends TestCase {
TestProjectProvider provider = null;
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2010-03-26 19:23:00 UTC (rev 21064)
@@ -5,20 +5,16 @@
Bundle-Version: 1.0.0
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.junit,
- org.eclipse.core.resources;bundle-version="3.4.0",
- org.jboss.tools.tests;bundle-version="2.0.0",
- org.eclipse.core.runtime;bundle-version="3.4.0",
- org.eclipse.jface;bundle-version="3.4.0",
- org.jboss.tools.common.test;bundle-version="2.0.0",
- org.eclipse.ui.workbench;bundle-version="3.4.0",
- org.jboss.tools.jsf.ui;bundle-version="2.0.0",
- org.jboss.tools.jst.web.ui;bundle-version="2.0.0",
- org.jboss.tools.jst.jsp;bundle-version="2.0.0",
- org.jboss.tools.common.model.ui;bundle-version="2.0.0",
- org.eclipse.ui.ide;bundle-version="3.4.1",
- org.eclipse.ltk.core.refactoring;bundle-version="3.5.0",
- org.eclipse.jst.j2ee;bundle-version="1.1.300",
- org.jboss.tools.common.ui
+ org.jboss.tools.tests,
+ org.eclipse.jface,
+ org.eclipse.ui.workbench,
+ org.jboss.tools.jsf.ui,
+ org.jboss.tools.jst.web.ui,
+ org.jboss.tools.jst.jsp,
+ org.jboss.tools.common.model.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.ltk.core.refactoring,
+ org.eclipse.jst.j2ee
Bundle-Localization: plugin
Bundle-ClassPath: jsf-ui-test.jar
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java 2010-03-26 19:23:00 UTC (rev 21064)
@@ -15,8 +15,8 @@
import org.jboss.tools.common.model.ui.wizard.newfile.NewFileContextEx;
import org.jboss.tools.common.model.ui.wizard.newfile.NewFileWizardEx;
import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
public class FacesConfigNewWizardTest extends WizardTest {
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/WizardTest.java
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/WizardTest.java 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/WizardTest.java 2010-03-26 19:23:00 UTC (rev 21064)
@@ -14,8 +14,8 @@
import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
import org.jboss.tools.common.model.ui.wizard.newfile.NewFileContextEx;
import org.jboss.tools.common.model.ui.wizard.newfile.NewFileWizardEx;
-import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.jst.jsp.outline.cssdialog.CSSClassDialog;
+import org.jboss.tools.test.util.WorkbenchUtils;
public abstract class WizardTest extends TestCase {
protected String id;
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.verification.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.verification.test/META-INF/MANIFEST.MF 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.verification.test/META-INF/MANIFEST.MF 2010-03-26 19:23:00 UTC (rev 21064)
@@ -8,14 +8,10 @@
Export-Package: org.jboss.tools.jsf.verification.test
Require-Bundle:
org.junit,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.jboss.tools.common.model,
org.jboss.tools.common.verification,
org.jboss.tools.jsf,
- org.jboss.tools.jsf.verification,
org.jboss.tools.common.model.ui,
- org.jboss.tools.common.test,
- org.jboss.tools.common.verification.test
+ org.jboss.tools.common.verification.test,
+ org.jboss.tools.tests
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/modular_build/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JSFVerificationTest.java
===================================================================
--- branches/modular_build/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JSFVerificationTest.java 2010-03-26 19:18:16 UTC (rev 21063)
+++ branches/modular_build/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JSFVerificationTest.java 2010-03-26 19:23:00 UTC (rev 21064)
@@ -19,10 +19,10 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.test.util.TestDescription;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.common.verification.test.VerificationUtil;
import org.jboss.tools.common.verification.vrules.VResult;
+import org.jboss.tools.test.util.TestDescription;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JSFVerificationTest extends TestCase {
TestProjectProvider provider = null;
14 years, 9 months
JBoss Tools SVN: r21063 - in branches/modular_build/tests: plugins and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-03-26 15:18:16 -0400 (Fri, 26 Mar 2010)
New Revision: 21063
Added:
branches/modular_build/tests/plugins/
branches/modular_build/tests/plugins/org.jboss.tools.tests/
Removed:
branches/modular_build/tests/tests/org.jboss.tools.tests/
Log:
moved test plugin into plugins folder. JBDS-486
Copied: branches/modular_build/tests/plugins/org.jboss.tools.tests (from rev 21062, branches/modular_build/tests/tests/org.jboss.tools.tests)
14 years, 9 months
JBoss Tools SVN: r21062 - in branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test: src/org/jboss/tools/bpel/ui/test/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-03-26 15:10:20 -0400 (Fri, 26 Mar 2010)
New Revision: 21062
Modified:
branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF
branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
Log:
remove common.test dependency from bpel.ui.test
Modified: branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF 2010-03-26 19:03:05 UTC (rev 21061)
+++ branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF 2010-03-26 19:10:20 UTC (rev 21062)
@@ -7,7 +7,7 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit;bundle-version="3.8.2",
- org.jboss.tools.common.test
+ org.jboss.tools.tests;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss by Red Hat
Modified: branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
===================================================================
--- branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java 2010-03-26 19:03:05 UTC (rev 21061)
+++ branches/modular_build/bpel/tests/org.jboss.tools.bpel.ui.test/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java 2010-03-26 19:10:20 UTC (rev 21062)
@@ -1,5 +1,8 @@
package org.jboss.tools.bpel.ui.test.editor;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -9,9 +12,9 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
-
import junit.framework.TestCase;
public class JBossBPELEditorTest extends TestCase{
@@ -42,9 +45,16 @@
}
public IProject createProject(String prjName) throws CoreException {
- TestProjectProvider provider = new TestProjectProvider(BUNDLE, "/projects/" + prjName,
- prjName, true);
- IProject prj = provider.getProject();
+ IProject prj=null;
+ try {
+ prj = ResourcesUtils.importProject(BUNDLE, "/projects/" + prjName);
+ } catch (IOException e) {
+ JUnitUtils.fail("", e);
+ } catch (InvocationTargetException e) {
+ JUnitUtils.fail("", e);
+ } catch (InterruptedException e) {
+ JUnitUtils.fail("", e);
+ }
assertNotNull(prj);
return prj;
}
14 years, 9 months
JBoss Tools SVN: r21061 - in branches/modular_build/common/tests: org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-03-26 15:03:05 -0400 (Fri, 26 Mar 2010)
New Revision: 21061
Modified:
branches/modular_build/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java
branches/modular_build/common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/test/ModelNewWizardTest.java
Log:
JBDS-486
Modified: branches/modular_build/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java 2010-03-26 18:59:55 UTC (rev 21060)
+++ branches/modular_build/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/ClassPathTest.java 2010-03-26 19:03:05 UTC (rev 21061)
@@ -19,8 +19,8 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
import org.osgi.framework.Bundle;
/**
Modified: branches/modular_build/common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/test/ModelNewWizardTest.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/test/ModelNewWizardTest.java 2010-03-26 18:59:55 UTC (rev 21060)
+++ branches/modular_build/common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/test/ModelNewWizardTest.java 2010-03-26 19:03:05 UTC (rev 21061)
@@ -15,7 +15,7 @@
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.model.ui.wizards.standard.DefaultStandardStep;
-import org.jboss.tools.common.util.WorkbenchUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
import junit.framework.TestCase;
14 years, 9 months
JBoss Tools SVN: r21060 - in branches/modular_build: common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/test and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-03-26 14:59:55 -0400 (Fri, 26 Mar 2010)
New Revision: 21060
Added:
branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestDescription.java
branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestDescriptionFactory.java
branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestProjectProvider.java
Removed:
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/test/util/
branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/WorkbenchUtils.java
Modified:
branches/modular_build/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/META-INF/MANIFEST.MF
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForCompositeComponentTest.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForELinStyleTest.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForIDTest.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForUnclosedELTest.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/Jbide1791Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1704Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1717Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1807Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1813Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide2016Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide2437Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1585Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1641Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1759Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/MissingKBBuilderTest.java
branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java
branches/modular_build/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF
branches/modular_build/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java
branches/modular_build/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF
branches/modular_build/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebContentAssistProviderTest.java
branches/modular_build/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF
Log:
JBDS-486
Modified: branches/modular_build/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/META-INF/MANIFEST.MF 2010-03-26 18:59:55 UTC (rev 21060)
@@ -14,8 +14,6 @@
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.common.reporting.test,
org.jboss.tools.common.test,
- org.jboss.tools.common.test.util,
- org.jboss.tools.common.util,
org.jboss.tools.common.util.test,
org.jboss.tools.common.xml.test
Bundle-ClassPath: .
Deleted: branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/WorkbenchUtils.java
===================================================================
--- branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/WorkbenchUtils.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/common/tests/org.jboss.tools.common.test/src/org/jboss/tools/common/util/WorkbenchUtils.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.common.util;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWizard;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.wizards.IWizardDescriptor;
-import org.jboss.tools.common.CommonPlugin;
-
-/**
- * @author eskimo
- *
- */
-public class WorkbenchUtils {
-
- static public IWizard findWizardByDefId(String definitionId) {
- IWizardDescriptor aWizardDescr =
- getWorkbench().getNewWizardRegistry()
- .findWizard(definitionId);
- IWorkbenchWizard aWizard=null;
- try {
- aWizard = aWizardDescr.createWizard();
- } catch (CoreException e) {
- CommonPlugin.getPluginLog().logError("Cannot create IWorkbenchWizard instance",e);
- }
- return aWizard;
- }
-
- public static IWorkbench getWorkbench() {
- return PlatformUI.getWorkbench();
- }
-
- /**
- * @return
- */
- public static IWorkbenchPage getWorkbenchActivePage() {
- // TODO Auto-generated method stub
- return getWorkbench().getActiveWorkbenchWindow().getActivePage();
- }
-}
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/META-INF/MANIFEST.MF 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/META-INF/MANIFEST.MF 2010-03-26 18:59:55 UTC (rev 21060)
@@ -4,7 +4,6 @@
Bundle-SymbolicName: org.jboss.tools.jst.jsp.test
Bundle-Version: 1.0.0
Require-Bundle: org.junit,
- org.jboss.tools.common.test,
org.jboss.tools.tests,
org.eclipse.core.resources,
org.eclipse.core.runtime,
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForCompositeComponentTest.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForCompositeComponentTest.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForCompositeComponentTest.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -1,6 +1,6 @@
package org.jboss.tools.jst.jsp.test.ca;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
public class CAForCompositeComponentTest extends ContentAssistantTestCase{
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForELinStyleTest.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForELinStyleTest.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForELinStyleTest.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -1,6 +1,6 @@
package org.jboss.tools.jst.jsp.test.ca;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
public class CAForELinStyleTest extends ContentAssistantTestCase{
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForIDTest.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForIDTest.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForIDTest.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -1,6 +1,6 @@
package org.jboss.tools.jst.jsp.test.ca;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
public class CAForIDTest extends ContentAssistantTestCase{
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForUnclosedELTest.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForUnclosedELTest.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAForUnclosedELTest.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -1,6 +1,6 @@
package org.jboss.tools.jst.jsp.test.ca;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
public class CAForUnclosedELTest extends ContentAssistantTestCase{
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CommonContentAssistantTestCase.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -13,7 +13,7 @@
package org.jboss.tools.jst.jsp.test.ca;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
/**
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/Jbide1791Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/Jbide1791Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/Jbide1791Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -17,7 +17,7 @@
import org.eclipse.jface.text.FindReplaceDocumentAdapter;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
/**
* Test cast testing http://jira.jboss.com/jira/browse/JBIDE-1791 issue.
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1704Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1704Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1704Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -8,9 +8,9 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
import org.jboss.tools.jst.jsp.test.TestUtil;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JsfJspJbide1704Test extends ContentAssistantTestCase {
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1717Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1717Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1717Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -8,9 +8,9 @@
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JsfJspJbide1717Test extends ContentAssistantTestCase {
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1807Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1807Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1807Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -1,6 +1,6 @@
package org.jboss.tools.jst.jsp.test.ca;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JsfJspJbide1807Test extends ContentAssistantTestCase{
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1813Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1813Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide1813Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -1,6 +1,6 @@
package org.jboss.tools.jst.jsp.test.ca;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JsfJspJbide1813Test extends ContentAssistantTestCase{
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide2016Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide2016Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide2016Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -1,6 +1,6 @@
package org.jboss.tools.jst.jsp.test.ca;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JsfJspJbide2016Test extends ContentAssistantTestCase{
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide2437Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide2437Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JsfJspJbide2437Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -8,10 +8,10 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JsfJspJbide2437Test extends ContentAssistantTestCase {
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1585Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1585Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1585Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -5,9 +5,9 @@
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
import org.jboss.tools.jst.jsp.test.TestUtil;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JstJspJbide1585Test extends ContentAssistantTestCase {
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1641Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1641Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1641Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -5,10 +5,10 @@
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class JstJspJbide1641Test extends ContentAssistantTestCase {
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1759Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1759Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1759Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -9,9 +9,9 @@
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
/**
* JBIDE-4341 JstJspAllTests/testJsfJspJbide1813Test failing with missing applicationScope in completions
*
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/MissingKBBuilderTest.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/MissingKBBuilderTest.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/MissingKBBuilderTest.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -2,9 +2,9 @@
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class MissingKBBuilderTest extends ContentAssistantTestCase{
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -5,9 +5,9 @@
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.test.TestUtil;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class StrutsJspJbide1648Test extends ContentAssistantTestCase {
TestProjectProvider provider = null;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF 2010-03-26 18:59:55 UTC (rev 21060)
@@ -8,8 +8,7 @@
org.eclipse.core.resources,
org.jboss.tools.jst.web.kb,
org.junit,
- org.jboss.tools.common.test,
- org.jboss.tools.tests;bundle-version="2.0.0"
+ org.jboss.tools.tests
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %Bundle-Vendor.0
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -17,13 +17,13 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.web.kb.IKbProject;
import org.jboss.tools.jst.web.kb.internal.scanner.LoadedDeclarations;
import org.jboss.tools.jst.web.kb.internal.scanner.ScannerException;
import org.jboss.tools.jst.web.kb.internal.scanner.XMLScanner;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
import junit.framework.TestCase;
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF 2010-03-26 18:59:55 UTC (rev 21060)
@@ -3,15 +3,9 @@
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.jst.web.test
Bundle-Version: 2.0.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.jboss.tools.jst.web,
- org.jboss.tools.jst.web.kb,
+Require-Bundle: org.jboss.tools.jst.web,
org.junit,
- org.jboss.tools.common.test,
- org.eclipse.core.resources,
- org.jboss.tools.common.model,
- org.jboss.tools.tests;bundle-version="2.0.0"
+ org.jboss.tools.tests
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.jst.web.test
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebContentAssistProviderTest.java
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebContentAssistProviderTest.java 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.web.test/src/org/jboss/tools/jst/web/test/WebContentAssistProviderTest.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -24,9 +24,9 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.Watcher;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
public class WebContentAssistProviderTest extends TestCase {
Modified: branches/modular_build/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF
===================================================================
--- branches/modular_build/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF 2010-03-26 17:57:13 UTC (rev 21059)
+++ branches/modular_build/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF 2010-03-26 18:59:55 UTC (rev 21060)
@@ -5,15 +5,12 @@
Bundle-Version: 1.0.0
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.jboss.tools.jst.web.ui,
- org.junit,
org.eclipse.ui,
- org.eclipse.core.runtime,
org.eclipse.gef,
org.jboss.tools.common.model.ui,
org.jboss.tools.common.model.ui.test,
- org.jboss.tools.common.model.test,
- org.jboss.tools.tests;bundle-version="2.0.0",
- org.eclipse.ui.ide;bundle-version="3.5.0"
+ org.jboss.tools.tests,
+ org.eclipse.ui.ide
Export-Package: org.jboss.tools.jst.web.ui.test
Bundle-ClassPath: jst-web-ui.jar
Bundle-Localization: plugin
Added: branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestDescription.java
===================================================================
--- branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestDescription.java (rev 0)
+++ branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestDescription.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.test.util;
+
+import java.util.Properties;
+
+import org.jboss.tools.common.xml.XMLUtilities;
+import org.w3c.dom.Element;
+
+/**
+ * Test descriptions are contained in xml like this
+ *
+ * <tests>
+ * <test name="testName">
+ * <property name="property1" value="value1"/>
+ * <property name="property2" value="value2"/>
+ * ...
+ * </test>
+ * ...
+ * </tests>
+ *
+ * Several tests can have the same name. A unit-test method
+ * can request for the list of them by the name from
+ * TestDescriptionFactory and process the list.
+ *
+ * @author V.Kabanovich
+ *
+ */
+public class TestDescription extends Properties {
+ private static final long serialVersionUID = 1L;
+
+ String name;
+
+ public TestDescription() {}
+
+ public TestDescription(Element t) {
+ name = t.getAttribute("name");
+ Element[] ps = XMLUtilities.getChildren(t, "property");
+ for (int i = 0; i < ps.length; i++) {
+ String n = ps[i].getAttribute("name");
+ String v = ps[i].getAttribute("value");
+ if(n != null && v != null) setProperty(n, v);
+ }
+ }
+
+ public String getName() {
+ return name;
+ }
+
+}
Added: branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestDescriptionFactory.java
===================================================================
--- branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestDescriptionFactory.java (rev 0)
+++ branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestDescriptionFactory.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.test.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.common.xml.XMLEntityResolver;
+import org.jboss.tools.common.xml.XMLUtilities;
+import org.w3c.dom.Element;
+
+/**
+ * Utility class that helps to do parametrization of
+ * unit tests by data stored in xml.
+ * The xml location can be any place known to a specific unit-test,
+ * i.e. inside test project, or inside test plugin.
+ *
+ * Each named <test> element can declare any set of name-value pairs
+ * in <property> elements, and it is up to the implementation of
+ * a unit test method to request the list of test descriptions
+ * by the name and process them interpreting the properties.
+ *
+ * <!ELEMENT tests (test)*>
+ * <!ELEMENT test (property)*>
+ * <!ATTLIST test name CDATA #REQUIRED>
+ * <!ELEMENT property EMPTY>
+ * <!ATTLIST property name CDATA #REQUIRED>
+ * <!ATTLIST property value CDATA #IMPLIED>
+ *
+ * @author V.Kabanovich
+ *
+ */
+public class TestDescriptionFactory {
+ IFile file = null;
+ Set<TestDescription> testDescriptions = null;
+ Map<String, ArrayList<TestDescription>> testDescriptionsMap = new HashMap<String, ArrayList<TestDescription>>();
+
+ public TestDescriptionFactory(IFile file) {
+ this.file = file;
+ }
+
+ /**
+ * Returns all test descriptions declared in file.
+ * @return
+ */
+ public Set<TestDescription> getTestDescriptions() {
+ if(testDescriptions != null) return testDescriptions;
+ testDescriptions = new HashSet<TestDescription>();
+ if(file == null || !file.exists()) return null;
+ Element tests = XMLUtilities.getElement(file.getLocation().toFile(), XMLEntityResolver.getInstance());
+ if(tests == null) return null;
+ Element[] ts = XMLUtilities.getChildren(tests, "test");
+ for (int i = 0; i < ts.length; i++) {
+ TestDescription t = new TestDescription(ts[i]);
+ testDescriptions.add(t);
+ }
+ return testDescriptions;
+ }
+
+ /**
+ * Return list of test descriptions with the given name.
+ * @param name
+ * @return
+ */
+ public ArrayList<TestDescription> getTestDescriptions(String name) {
+ getTestDescriptions();
+ if(testDescriptions == null) return null;
+ ArrayList<TestDescription> set = testDescriptionsMap.get(name);
+ if(set == null) {
+ set = new ArrayList<TestDescription>();
+ testDescriptionsMap.put(name, set);
+ Iterator<TestDescription> it = testDescriptions.iterator();
+ while(it.hasNext()) {
+ TestDescription t = it.next();
+ if(name.equals(t.getName())) set.add(t);
+ }
+ }
+ return set;
+ }
+
+}
Added: branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestProjectProvider.java
===================================================================
--- branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestProjectProvider.java (rev 0)
+++ branches/modular_build/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/test/util/TestProjectProvider.java 2010-03-26 18:59:55 UTC (rev 21060)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.test.util;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.jboss.tools.common.util.FileUtil;
+
+/**
+ * Test plugins may define test projects to be added
+ * to the test workspace to run tests on them.
+ * This utility class manages adding/removing test projects.
+ *
+ * @author V.Kabanovich
+ */
+
+public class TestProjectProvider {
+ IProject project;
+ boolean makeCopy = false;
+
+ /**
+ *
+ * @param bundleName - name of plugin that contains code of test project.
+ * @param projectPath - path of test project relative to the plugin that
+ * contains it. If null, then by default is computed as '/projects/%name%'
+ * @param name - name of test project. If null, then by default is computed
+ * as last part of projectPath.
+ * @param makeCopy - boolean flag, if true, then test project will be copied
+ * to the test workspace; on test completing, the copy is destroyed.
+ * @throws Exception
+ */
+ public TestProjectProvider(String bundleName, String projectPath, String name, boolean makeCopy) throws CoreException {
+ try {
+ if( null == projectPath ) {
+ project = ResourcesUtils.importProject(bundleName, "projects" + Path.SEPARATOR + name, null);
+ } else {
+ project = ResourcesUtils.importProject(bundleName, projectPath, null);
+ }
+ } catch (IOException e) {
+ throw new CoreException(new Status(Status.ERROR,bundleName,e.getMessage(),e));
+ } catch (InvocationTargetException e) {
+ throw new CoreException(new Status(Status.ERROR,bundleName,e.getMessage(),e));
+ } catch (InterruptedException e) {
+ throw new CoreException(new Status(Status.ERROR,bundleName,e.getMessage(),e));
+ }
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public void dispose() {
+ if (project == null || !project.exists()) {
+ return;
+ }
+ try {
+ boolean oldAutoBuilding = true;
+ try {
+ oldAutoBuilding = ResourcesUtils.setBuildAutomatically(false);
+ JobUtils.waitForIdle(10);
+ project.close(null);
+ JobUtils.waitForIdle(10);
+ project.delete(true, null);
+ JobUtils.waitForIdle(10);
+ } finally {
+ ResourcesUtils.setBuildAutomatically(oldAutoBuilding);
+ }
+ } catch (CoreException ex) {
+ ILog log = Platform.getLog(Platform.getBundle("org.jboss.tools.common.test"));
+ IStatus error = new Status(
+ IStatus.ERROR,
+ "org.jboss.tools.common.test",
+ "Exception occurs during project deletion",ex);
+ log.log(error);
+ }
+ }
+
+ TestDescriptionFactory tests = null;
+
+ public Set<TestDescription> getTestDescriptions() {
+ if(tests == null && project != null && project.isOpen()) {
+ IFile f = project.getFile(new Path("/testCases.xml"));
+ tests = new TestDescriptionFactory(f);
+ }
+ return (tests != null) ? tests.getTestDescriptions() : null;
+ }
+
+ public ArrayList<TestDescription> getTestDescriptions(String name) {
+ getTestDescriptions();
+ return (tests != null) ? tests.getTestDescriptions(name) : null;
+ }
+
+}
14 years, 9 months
JBoss Tools SVN: r21059 - branches.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-03-26 13:57:13 -0400 (Fri, 26 Mar 2010)
New Revision: 21059
Added:
branches/modular_build/
Log:
branch for Ramada Task Force
Copied: branches/modular_build (from rev 21058, trunk)
14 years, 9 months
JBoss Tools SVN: r21058 - in trunk: tests/tests/org.jboss.tools.tests/META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-03-26 13:16:07 -0400 (Fri, 26 Mar 2010)
New Revision: 21058
Added:
trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamContextVariableRefactoringTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringTest.java
trunk/tests/tests/org.jboss.tools.tests/META-INF/MANIFEST.MF
Log:
https://jira.jboss.org/jira/browse/JBIDE-4990
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamContextVariableRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamContextVariableRefactoringTest.java 2010-03-26 16:57:42 UTC (rev 21057)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamContextVariableRefactoringTest.java 2010-03-26 17:16:07 UTC (rev 21058)
@@ -19,62 +19,6 @@
super("Seam Context Variable Refactoring Test");
}
- private void renameContextVariable(ISeamProject seamProject, String fileName, String variableName, String newName, List<TestChangeStructure> changeList) throws CoreException{
- JobUtils.waitForIdle(2000);
-
- // Test before renaming
- for(TestChangeStructure changeStructure : changeList){
- IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
- String content = null;
- try {
- content = FileUtil.readStream(file);
- } catch (CoreException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
-
- for(TestTextChange change : changeStructure.getTextChanges()){
- assertNotSame(change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
- }
- }
-
- IFile sourceFile = seamProject.getProject().getFile(fileName);
-
- // Rename Seam Context Variable
- RenameSeamContextVariableProcessor processor = new RenameSeamContextVariableProcessor(sourceFile, variableName);
- processor.setNewName(newName);
- processor.checkInitialConditions(new NullProgressMonitor());
- processor.checkFinalConditions(new NullProgressMonitor(), null);
- CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
-
- assertEquals("There is unexpected number of changes",changeList.size(), rootChange.getChildren().length);
-
- for(int i = 0; i < rootChange.getChildren().length;i++){
- TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
-
- MultiTextEdit edit = (MultiTextEdit)fileChange.getEdit();
-
- TestChangeStructure change = findChange(changeList, fileChange.getFile());
- if(change != null){
- assertEquals(change.size(), edit.getChildrenSize());
- }
- }
-
- rootChange.perform(new NullProgressMonitor());
- JobUtils.waitForIdle(2000);
-
-
- // Test results
- for(TestChangeStructure changeStructure : changeList){
- IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
- String content = null;
- content = FileUtil.readStream(file);
- for(TestTextChange change : changeStructure.getTextChanges()){
- assertEquals("There is unexpected change in resource - "+file.getName(),change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
- }
- }
- }
-
public void testSeamContextVariable_Component_Rename() throws CoreException {
ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
@@ -128,8 +72,13 @@
change = new TestTextChange(29, 4, "best");
structure.addTextChange(change);
list.add(structure);
+
+ IFile sourceFile = seamEjbProject.getProject().getFile("/WebContent/test.jsp");
+
+ RenameSeamContextVariableProcessor processor = new RenameSeamContextVariableProcessor(sourceFile, "test");
+ processor.setNewName("best");
- renameContextVariable(seamEjbProject, "/WebContent/test.jsp", "test", "best", list);
+ checkRename(processor, list);
}
public void testSeamContextVariable_Factory1_Rename() throws CoreException {
@@ -145,7 +94,12 @@
structure.addTextChange(change);
list.add(structure);
- renameContextVariable(seamEjbProject, "/WebContent/factory.jsp", "abc", "bbc", list);
+ IFile sourceFile = seamEjbProject.getProject().getFile("/WebContent/factory.jsp");
+
+ RenameSeamContextVariableProcessor processor = new RenameSeamContextVariableProcessor(sourceFile, "abc");
+ processor.setNewName("bbc");
+
+ checkRename(processor, list);
}
public void testSeamContextVariable_Factory2_Rename() throws CoreException {
@@ -161,7 +115,12 @@
structure.addTextChange(change);
list.add(structure);
- renameContextVariable(seamEjbProject, "/WebContent/factory.jsp", "cba", "ccc", list);
+ IFile sourceFile = seamEjbProject.getProject().getFile("/WebContent/factory.jsp");
+
+ RenameSeamContextVariableProcessor processor = new RenameSeamContextVariableProcessor(sourceFile, "cba");
+ processor.setNewName("ccc");
+
+ checkRename(processor, list);
}
public void testSeamContextVariable_Out1_Rename() throws CoreException {
@@ -176,8 +135,13 @@
change = new TestTextChange(227, 3, "bbb");
structure.addTextChange(change);
list.add(structure);
+
+ IFile sourceFile = seamEjbProject.getProject().getFile("/WebContent/out.jsp");
- renameContextVariable(seamEjbProject, "/WebContent/out.jsp", "aaa", "bbb", list);
+ RenameSeamContextVariableProcessor processor = new RenameSeamContextVariableProcessor(sourceFile, "aaa");
+ processor.setNewName("bbb");
+
+ checkRename(processor, list);
}
public void testSeamContextVariable_Out2_Rename() throws CoreException {
@@ -192,8 +156,13 @@
change = new TestTextChange(283, 3, "eee");
structure.addTextChange(change);
list.add(structure);
+
+ IFile sourceFile = seamEjbProject.getProject().getFile("/WebContent/out.jsp");
- renameContextVariable(seamEjbProject, "/WebContent/out.jsp", "ddd", "eee", list);
+ RenameSeamContextVariableProcessor processor = new RenameSeamContextVariableProcessor(sourceFile, "ddd");
+ processor.setNewName("eee");
+
+ checkRename(processor, list);
}
public void testSeamContextVariable_DataModel1_Rename() throws CoreException {
@@ -209,7 +178,12 @@
structure.addTextChange(change);
list.add(structure);
- renameContextVariable(seamEjbProject, "/WebContent/datamodel.jsp", "data", "dada", list);
+ IFile sourceFile = seamEjbProject.getProject().getFile("/WebContent/datamodel.jsp");
+
+ RenameSeamContextVariableProcessor processor = new RenameSeamContextVariableProcessor(sourceFile, "data");
+ processor.setNewName("dada");
+
+ checkRename(processor, list);
}
public void testSeamContextVariable_DataModel2_Rename() throws CoreException {
@@ -225,6 +199,11 @@
structure.addTextChange(change);
list.add(structure);
- renameContextVariable(seamEjbProject, "/WebContent/datamodel.jsp", "model", "modal", list);
+ IFile sourceFile = seamEjbProject.getProject().getFile("/WebContent/datamodel.jsp");
+
+ RenameSeamContextVariableProcessor processor = new RenameSeamContextVariableProcessor(sourceFile, "model");
+ processor.setNewName("modal");
+
+ checkRename(processor, list);
}
}
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringTest.java 2010-03-26 16:57:42 UTC (rev 21057)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringTest.java 2010-03-26 17:16:07 UTC (rev 21058)
@@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
@@ -13,10 +12,9 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
+import org.jboss.tools.tests.AbstractRefactorTest;
-import junit.framework.TestCase;
-
-public class SeamRefactoringTest extends TestCase {
+public class SeamRefactoringTest extends AbstractRefactorTest {
static String warProjectName = "Test1";
static String earProjectName = "Test1-ear";
static String ejbProjectName = "Test1-ejb";
@@ -25,6 +23,7 @@
static IProject ejbProject;
static ISeamProject seamWarProject;
static ISeamProject seamEjbProject;
+
public SeamRefactoringTest(String name){
super(name);
}
@@ -57,68 +56,5 @@
return seamProject;
}
- protected TestChangeStructure findChange(List<TestChangeStructure> changeList, IFile file){
- for(TestChangeStructure tcs : changeList){
- if(tcs.getFileName().equals("/"+file.getFullPath().removeFirstSegments(1).toString()))
- return tcs;
- }
- return null;
- }
- class TestChangeStructure{
- private IProject project;
- private String fileName;
- ArrayList<TestTextChange> textChanges = new ArrayList<TestTextChange>();
-
-
- public TestChangeStructure(IProject project, String fileName){
- this.project = project;
- this.fileName = fileName;
- }
-
- public IProject getProject(){
- return project;
- }
-
- public String getFileName(){
- return fileName;
- }
-
- public ArrayList<TestTextChange> getTextChanges(){
- return textChanges;
- }
-
- public void addTextChange(TestTextChange change){
- textChanges.add(change);
- }
-
- public int size(){
- return textChanges.size();
- }
-
- }
-
- class TestTextChange{
- private int offset;
- private int length;
- private String text;
-
- public TestTextChange(int offset, int length, String text){
- this.offset = offset;
- this.length = length;
- this.text = text;
- }
-
- public int getOffset(){
- return offset;
- }
-
- public int getLength(){
- return length;
- }
-
- public String getText(){
- return text;
- }
- }
}
Modified: trunk/tests/tests/org.jboss.tools.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/tests/org.jboss.tools.tests/META-INF/MANIFEST.MF 2010-03-26 16:57:42 UTC (rev 21057)
+++ trunk/tests/tests/org.jboss.tools.tests/META-INF/MANIFEST.MF 2010-03-26 17:16:07 UTC (rev 21058)
@@ -10,7 +10,11 @@
org.junit,
org.eclipse.ui.ide,
org.jboss.tools.jst.web.kb,
- org.apache.xerces;bundle-version="[2.9.0,3.0.0)"
+ org.apache.xerces;bundle-version="[2.9.0,3.0.0)",
+ org.junit4;bundle-version="4.5.0",
+ org.jboss.tools.common;bundle-version="2.0.0",
+ org.eclipse.ltk.core.refactoring;bundle-version="3.5.0",
+ org.eclipse.text;bundle-version="3.5.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.test.util,
org.jboss.tools.test.util.xpl,
Added: trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java (rev 0)
+++ trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java 2010-03-26 17:16:07 UTC (rev 21058)
@@ -0,0 +1,144 @@
+package org.jboss.tools.tests;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
+import org.eclipse.text.edits.MultiTextEdit;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.test.util.JobUtils;
+
+public class AbstractRefactorTest extends TestCase{
+
+ public AbstractRefactorTest(String name){
+ super(name);
+ }
+
+ protected void checkRename(RenameProcessor processor, List<TestChangeStructure> changeList) throws CoreException{
+ JobUtils.waitForIdle(2000);
+
+ // Test before renaming
+ for(TestChangeStructure changeStructure : changeList){
+ IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
+ String content = null;
+ try {
+ content = FileUtil.readStream(file);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+
+ for(TestTextChange change : changeStructure.getTextChanges()){
+ assertNotSame(change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
+ }
+ }
+
+ // Rename
+ processor.checkInitialConditions(new NullProgressMonitor());
+ processor.checkFinalConditions(new NullProgressMonitor(), null);
+ CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
+
+ assertEquals("There is unexpected number of changes",changeList.size(), rootChange.getChildren().length);
+
+ for(int i = 0; i < rootChange.getChildren().length;i++){
+ TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
+
+ MultiTextEdit edit = (MultiTextEdit)fileChange.getEdit();
+
+ TestChangeStructure change = findChange(changeList, fileChange.getFile());
+ if(change != null){
+ assertEquals(change.size(), edit.getChildrenSize());
+ }
+ }
+
+ rootChange.perform(new NullProgressMonitor());
+ JobUtils.waitForIdle(2000);
+
+
+ // Test results
+ for(TestChangeStructure changeStructure : changeList){
+ IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
+ String content = null;
+ content = FileUtil.readStream(file);
+ for(TestTextChange change : changeStructure.getTextChanges()){
+ assertEquals("There is unexpected change in resource - "+file.getName(),change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
+ }
+ }
+ }
+
+
+ protected TestChangeStructure findChange(List<TestChangeStructure> changeList, IFile file){
+ for(TestChangeStructure tcs : changeList){
+ if(tcs.getFileName().equals("/"+file.getFullPath().removeFirstSegments(1).toString()))
+ return tcs;
+ }
+ return null;
+ }
+
+
+ public class TestChangeStructure{
+ private IProject project;
+ private String fileName;
+ ArrayList<TestTextChange> textChanges = new ArrayList<TestTextChange>();
+
+
+ public TestChangeStructure(IProject project, String fileName){
+ this.project = project;
+ this.fileName = fileName;
+ }
+
+ public IProject getProject(){
+ return project;
+ }
+
+ public String getFileName(){
+ return fileName;
+ }
+
+ public ArrayList<TestTextChange> getTextChanges(){
+ return textChanges;
+ }
+
+ public void addTextChange(TestTextChange change){
+ textChanges.add(change);
+ }
+
+ public int size(){
+ return textChanges.size();
+ }
+
+ }
+
+ public class TestTextChange{
+ private int offset;
+ private int length;
+ private String text;
+
+ public TestTextChange(int offset, int length, String text){
+ this.offset = offset;
+ this.length = length;
+ this.text = text;
+ }
+
+ public int getOffset(){
+ return offset;
+ }
+
+ public int getLength(){
+ return length;
+ }
+
+ public String getText(){
+ return text;
+ }
+ }
+
+}
Property changes on: trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 9 months
JBoss Tools SVN: r21057 - in trunk/jsf/docs/userguide/en-US: images/visual_page and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-03-26 12:57:42 -0400 (Fri, 26 Mar 2010)
New Revision: 21057
Modified:
trunk/jsf/docs/userguide/en-US/editors.xml
trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_7c.png
Log:
https://jira.jboss.org/jira/browse/JBDS-1065
Modified: trunk/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/editors.xml 2010-03-26 16:36:54 UTC (rev 21056)
+++ trunk/jsf/docs/userguide/en-US/editors.xml 2010-03-26 16:57:42 UTC (rev 21057)
@@ -1513,7 +1513,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>Here it's possible to edit or remove any listed in the table template.</para>
+ <para>Here it's possible to add a new and edit or remove any listed in the table template.</para>
</section>
<section id="AdvancedSettings954">
<title>VPE Toolbar</title>
Modified: trunk/jsf/docs/userguide/en-US/images/visual_page/visual_page_7c.png
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Tools SVN: r21056 - in branches/hibernatetools-multiversion/hibernatetools: plugins/org.hibernate.eclipse/src/org/hibernate/console/node and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-03-26 12:36:54 -0400 (Fri, 26 Mar 2010)
New Revision: 21056
Added:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DefaultDatabaseCollectorStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HqlSqlTokenTypesStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JDBCReaderStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/util/HqlBaseLexerStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/util/ParserHelper.java
Modified:
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ConsoleConfigurationBasedAction.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/EditConsoleConfiguration.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryParametersPage.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/SchemaExportAction.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/HibernatePropertySourceProvider.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/ConfigurationWorkbenchAdapter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/PersistentClassWorkbenchAdapter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/model/PropertyViewAdapter.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/EclipseHQLCompletionRequestor.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLLexerRule.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AbstractTypeStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ClassMetadataStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EnvironmentStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateConsoleRuntimeException.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCompletionRequestorStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PropertyStub.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStubFactory.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/plugin.xml
branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/SpecialOrmShape.java
branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java
branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6070 - update
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -121,8 +121,8 @@
public ConfigurationStub buildWith(final ConfigurationStub cfg, final boolean includeMappings) {
if (classLoader == null) {
classLoader = createClassLoader();
+ executionContext = new DefaultExecutionContext(getName(), classLoader);
}
- executionContext = new DefaultExecutionContext(getName(), classLoader);
ConfigurationStub result = (ConfigurationStub) executionContext.execute(new ExecutionContext.Command() {
public Object execute() {
ConfigurationStubFactory csf = new ConfigurationStubFactory(prefs);
@@ -224,9 +224,9 @@
}
protected ClassLoader getParentClassLoader() {
- return ClassLoader.getSystemClassLoader();
+ //return ClassLoader.getSystemClassLoader();
//return Thread.currentThread().getContextClassLoader().getParent().getParent();
- //return Thread.currentThread().getContextClassLoader();
+ return Thread.currentThread().getContextClassLoader();
}
public ConfigurationStub getConfiguration() {
return configStub;
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -34,7 +34,6 @@
/**
* @author MAX
- *
*/
public class ClassNode extends BaseNode {
@@ -44,81 +43,76 @@
Object baseObject;
boolean childrenCreated = false;
- public ClassNode(NodeFactory factory, BaseNode parent, String name, ClassMetadataStub metadata, Object baseObject, boolean objectGraph) {
+ public ClassNode(NodeFactory factory, BaseNode parent, String name, ClassMetadataStub metadata,
+ Object baseObject, boolean objectGraph) {
+
super(factory, parent);
- this.name = name;
- this.baseObject = baseObject;
- this.objectGraph = objectGraph;
+ this.name = name;
+ this.baseObject = baseObject;
+ this.objectGraph = objectGraph;
md = metadata;
- if (md != null) { // Don't have any hibernate related info about this one...
- iconName = ImageConstants.MAPPEDCLASS;
- } else {
- iconName = ImageConstants.UNMAPPEDCLASS;
- }
+ if (md != null) { // Don't have any hibernate related info about this one...
+ iconName = ImageConstants.MAPPEDCLASS;
+ } else {
+ iconName = ImageConstants.UNMAPPEDCLASS;
+ }
}
protected void checkChildren() {
- if(!childrenCreated) {
+ if (!childrenCreated) {
createChildren();
childrenCreated = true;
}
}
protected void createChildren() {
- //System.out.println("Creating children for: " + this);
+ // System.out.println("Creating children for: " + this);
- if(objectGraph && getValue()==null || md == null) {
+ if (objectGraph && getValue() == null || md == null) {
return;
}
-
-
- // Identifier
- if(md.getIdentifierPropertyName()!=null) {
- children.add(0, factory.createIdentifierNode(this, md) );
- }
-
- String[] names = md.getPropertyNames();
- for (int i = 0; i < names.length; i++) {
- TypeStub type = md.getPropertyTypes()[i];
-
- if(type.isCollectionType() ) {
- PersistentCollectionNode tn = factory.createPersistentCollectionNode(this, names[i], md, (CollectionTypeStub)type, getValue(), objectGraph);
- children.add(tn);
- } else {
- children.add(factory.createPropertyNode(this, i, md, getValue(), objectGraph) );
- }
- }
+ // Identifier
+ if (md.getIdentifierPropertyName() != null) {
+ children.add(0, factory.createIdentifierNode(this, md));
+ }
+ String[] names = md.getPropertyNames();
+ TypeStub[] types = md.getPropertyTypes();
+ for (int i = 0; i < names.length; i++) {
+ TypeStub type = types[i];
+ if (type.isCollectionType()) {
+ PersistentCollectionNode tn = factory.createPersistentCollectionNode(this,
+ names[i], md, (CollectionTypeStub) type, getValue(), objectGraph);
+ children.add(tn);
+ } else {
+ children.add(factory.createPropertyNode(this, i, md, getValue(), objectGraph));
+ }
+ }
}
public String getHQL() {
List<BaseNode> parents = new ArrayList<BaseNode>();
- BaseNode currentParent = this;
- while (currentParent != null && !(currentParent instanceof ConfigurationEntitiesNode) ) {
- parents.add(currentParent);
- currentParent = currentParent.parent;
- }
-
- if(currentParent instanceof ConfigurationEntitiesNode) {
- currentParent = parents.get(parents.size()-1);
- }
-
- // currentParent is the root
- String cname = ( (ClassNode)currentParent).md.getMappedClass(EntityModeStub.POJO).getName();
-
+ BaseNode currentParent = this;
+ while (currentParent != null && !(currentParent instanceof ConfigurationEntitiesNode)) {
+ parents.add(currentParent);
+ currentParent = currentParent.parent;
+ }
+ if (currentParent instanceof ConfigurationEntitiesNode) {
+ currentParent = parents.get(parents.size() - 1);
+ }
+ // currentParent is the root
+ String cname = ((ClassNode) currentParent).md.getMappedClass(EntityModeStub.POJO).getName();
if (cname.lastIndexOf(".") != -1) { //$NON-NLS-1$
cname = cname.substring(cname.lastIndexOf(".") + 1); //$NON-NLS-1$
}
String alias = cname.toLowerCase();
-
String path = ""; //$NON-NLS-1$
- for (int i = parents.size()-2; i >= 0; i--) {
- path += "." + parents.get(i).getName(); //$NON-NLS-1$
+ for (int i = parents.size() - 2; i >= 0; i--) {
+ path += "." + parents.get(i).getName(); //$NON-NLS-1$
}
-
return "select " + alias + path + " from " + cname + " as " + alias; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
@@ -127,24 +121,22 @@
}
public String renderLabel(boolean fullyQualifiedNames) {
- if(objectGraph) {
+ if (objectGraph) {
Object o = getValue();
- if(HibernateStub.isInitialized(o) ) {
- return super.renderLabel(fullyQualifiedNames) + " = " + o; //$NON-NLS-1$
+ if (HibernateStub.isInitialized(o)) {
+ return super.renderLabel(fullyQualifiedNames) + " = " + o; //$NON-NLS-1$
} else {
- return super.renderLabel(fullyQualifiedNames) + " = " + ConsoleMessages.ClassNode_uninitialized_proxy; //$NON-NLS-1$
+ return super.renderLabel(fullyQualifiedNames)
+ + " = " + ConsoleMessages.ClassNode_uninitialized_proxy; //$NON-NLS-1$
}
-
- } else {
- return super.renderLabel(fullyQualifiedNames);
}
+ return super.renderLabel(fullyQualifiedNames);
}
public Object getValue() {
- if(objectGraph) {
+ if (objectGraph) {
return baseObject;
- } else {
- return null;
}
+ return null;
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/NodeFactory.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -66,7 +66,7 @@
//return new RootNode(this, classes);
}
- public BaseNode createObjectNode(SessionStub sessionStub, Object o) throws HibernateException {
+ public BaseNode createObjectNode(SessionStub sessionStub, Object o) {
ClassMetadataStub md = getMetaData(sessionStub.getEntityName(o));
return internalCreateClassNode(null, md.getEntityName(), md, o, false);
//return new ClassNode(this,null,md.getEntityName(),md,o,true);
@@ -154,18 +154,18 @@
public String getIconNameForType(TypeStub type) {
String result = ImageConstants.UNKNOWNPROPERTY;
- if(type.isEntityType() ) {
+ if (type.isEntityType()) {
EntityTypeStub et = (EntityTypeStub) type;
- if(!et.isOneToOne() ) {
+ if (!et.isOneToOne()) {
result = ImageConstants.MANYTOONE;
} else {
result = ImageConstants.ONETOONE;
}
- } else if (type.isAnyType() ) {
+ } else if (type.isAnyType()) {
result = ImageConstants.ANY;
- } else if (type.isComponentType() ) {
+ } else if (type.isComponentType()) {
result = ImageConstants.COMPONENT;
- } else if (type.isCollectionType() ) {
+ } else if (type.isCollectionType()) {
//CollectionType pct = (CollectionType)type;
result = ImageConstants.ONETOMANY; //could also be values/collecionts?
} else {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -71,10 +71,15 @@
if(collectionObject!=null) return collectionObject;
try {
collectionObject = md.getPropertyValue(baseObject, name, EntityModeStub.POJO);
- } catch (HibernateException e) {
- IllegalArgumentException iae = new IllegalArgumentException(ConsoleMessages.PersistentCollectionNode_could_not_access_property_value);
- iae.initCause(e);
- throw iae;
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ IllegalArgumentException iae = new IllegalArgumentException(ConsoleMessages.PersistentCollectionNode_could_not_access_property_value);
+ iae.initCause(he);
+ throw iae;
+ } else {
+ throw he;
+ }
}
return collectionObject;
}
@@ -120,13 +125,13 @@
}
protected void checkChildren() {
- if(!childrenCreated && objectGraph) {
+ if (!childrenCreated && objectGraph) {
initCollectionObject();
int idx = 0;
- if(!type.isArrayType() ) {
+ if (!type.isArrayType()) {
Iterator<?> i = ( (Collection<?>)collectionObject).iterator();
- while (i.hasNext() ) {
+ while (i.hasNext()) {
Object element = i.next();
children.add(createNode(idx++,element, elementType) );
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -40,8 +40,13 @@
return null;
}
return baseMetaData.getPropertyValue(baseObject, getName(), EntityModeStub.POJO);
- } catch (HibernateException e) {
- e.printStackTrace();
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ he.printStackTrace();
+ } else {
+ throw he;
+ }
return null;
}
} else {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AbstractTypeStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AbstractTypeStub.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/AbstractTypeStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -2,7 +2,7 @@
import org.hibernate.type.AbstractType;
-public abstract class AbstractTypeStub extends TypeStub {
+public class AbstractTypeStub extends TypeStub {
protected AbstractType abstractType;
protected AbstractTypeStub(Object abstractType) {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ClassMetadataStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ClassMetadataStub.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ClassMetadataStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -20,7 +20,7 @@
for (int i = 0; i < types.length; i++) {
res[i] = TypeStubFactory.createTypeStub(types[i]);
}
- return null;
+ return res;
}
public String getIdentifierPropertyName() {
@@ -39,7 +39,6 @@
return TypeStubFactory.createTypeStub(classMetadata.getIdentifierType());
}
- // TODO: should be stub class
public Class getMappedClass(EntityModeStub pojo) {
return classMetadata.getMappedClass(pojo.entityMode);
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStub.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/ConfigurationStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -4,6 +4,7 @@
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -15,6 +16,7 @@
import org.hibernate.console.ConsoleMessages;
import org.hibernate.console.FakeDelegatingDriver;
import org.hibernate.console.stubs.util.ReflectHelper;
+import org.hibernate.mapping.PersistentClass;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.hibernate.tool.hbm2x.Exporter;
import org.hibernate.tool.hbm2x.HibernateMappingExporter;
@@ -82,10 +84,14 @@
return (configuration.getNamingStrategy() != null);
}
- // TODO: temporary?
@SuppressWarnings("unchecked")
- public Iterator getClassMappings() {
- return configuration.getClassMappings();
+ public Iterator<PersistentClassStub> getClassMappings() {
+ Iterator<PersistentClass> it = (Iterator<PersistentClass>)configuration.getClassMappings();
+ ArrayList<PersistentClassStub> arr = new ArrayList<PersistentClassStub>();
+ while (it.hasNext()) {
+ arr.add(PersistentClassStubFactory.createPersistentClassStub(it.next()));
+ }
+ return arr.iterator();
}
// TODO: temporary should be protected and/or PersistentClassStub?
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DefaultDatabaseCollectorStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DefaultDatabaseCollectorStub.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/DefaultDatabaseCollectorStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -0,0 +1,39 @@
+package org.hibernate.console.stubs;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.hibernate.cfg.reveng.DefaultDatabaseCollector;
+import org.hibernate.mapping.Table;
+
+public class DefaultDatabaseCollectorStub {
+ protected DefaultDatabaseCollector defaultDatabaseCollector;
+
+ protected DefaultDatabaseCollectorStub(Object defaultDatabaseCollector) {
+ this.defaultDatabaseCollector = (DefaultDatabaseCollector)defaultDatabaseCollector;
+ }
+
+ public static DefaultDatabaseCollectorStub newInstance() {
+ return new DefaultDatabaseCollectorStub(new DefaultDatabaseCollector());
+ }
+
+ @SuppressWarnings("unchecked")
+ public Iterator<Entry<String, List<TableStub>>> getQualifierEntries() {
+ Iterator<Map.Entry<String, List<Table>>> it = defaultDatabaseCollector.getQualifierEntries();
+ HashMap<String, List<TableStub>> map = new HashMap<String, List<TableStub>>();
+ while (it.hasNext()) {
+ Map.Entry<String, List<Table>> entry = it.next();
+ ArrayList<TableStub> arr = new ArrayList<TableStub>();
+ Iterator<Table> itValue = (Iterator<Table>)entry.getValue().iterator();
+ while (itValue.hasNext()) {
+ arr.add(new TableStub(itValue.next()));
+ }
+ map.put(entry.getKey(), arr);
+ }
+ return map.entrySet().iterator();
+ }
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EnvironmentStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EnvironmentStub.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/EnvironmentStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -10,6 +10,13 @@
public class EnvironmentStub {
public static final String DIALECT = Environment.DIALECT;
+ public static final String DEFAULT_CATALOG = Environment.DEFAULT_CATALOG;
+ public static final String DEFAULT_SCHEMA = Environment.DEFAULT_SCHEMA;
+ public static final String DRIVER = Environment.DRIVER;
+ public static final String PASS = Environment.PASS;
+ public static final String SESSION_FACTORY_NAME = Environment.SESSION_FACTORY_NAME;
+ public static final String URL = Environment.URL;
+ public static final String USER = Environment.USER;
@SuppressWarnings("unchecked")
public static String[] extractHibernateProperties() {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateConsoleRuntimeException.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateConsoleRuntimeException.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HibernateConsoleRuntimeException.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -21,8 +21,6 @@
*/
package org.hibernate.console.stubs;
-import org.hibernate.HibernateException;
-
/**
* @author max
*
@@ -30,21 +28,16 @@
public class HibernateConsoleRuntimeException extends RuntimeException {
private static final long serialVersionUID = -9056528343206573782L;
-
- protected HibernateException he;
- public HibernateConsoleRuntimeException(String message, Object he) {
+ public HibernateConsoleRuntimeException(Throwable cause) {
+ super("HibernateConsoleRuntimeException", cause); //$NON-NLS-1$
+ }
+
+ public HibernateConsoleRuntimeException(String message) {
super(message);
- this.he = (HibernateException)he;
}
-
- public HibernateConsoleRuntimeException(String message, Throwable cause, Object he) {
+
+ public HibernateConsoleRuntimeException(String message, Throwable cause) {
super(message, cause);
- this.he = (HibernateException)he;
}
-
- public HibernateConsoleRuntimeException(Throwable cause, Object he) {
- super(cause);
- this.he = (HibernateException)he;
- }
}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HqlSqlTokenTypesStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HqlSqlTokenTypesStub.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/HqlSqlTokenTypesStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -0,0 +1,7 @@
+package org.hibernate.console.stubs;
+
+import org.hibernate.hql.antlr.HqlSqlTokenTypes;
+
+public class HqlSqlTokenTypesStub {
+ public static final int IDENT = HqlSqlTokenTypes.IDENT;
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCompletionRequestorStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCompletionRequestorStub.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/IHQLCompletionRequestorStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -1,13 +1,24 @@
package org.hibernate.console.stubs;
+import org.hibernate.tool.ide.completion.HQLCompletionProposal;
import org.hibernate.tool.ide.completion.IHQLCompletionRequestor;
public abstract class IHQLCompletionRequestorStub {
protected IHQLCompletionRequestor hqlCompletionRequestor;
- protected IHQLCompletionRequestorStub(Object hqlCompletionRequestor) {
-
+ protected IHQLCompletionRequestorStub() {
+ hqlCompletionRequestor = new IHQLCompletionRequestor() {
+
+ public boolean accept(HQLCompletionProposal proposal) {
+ return IHQLCompletionRequestorStub.this.accept(new HQLCompletionProposalStub(proposal));
+ }
+
+ public void completionFailure(String errorMessage) {
+ IHQLCompletionRequestorStub.this.completionFailure(errorMessage);
+ }
+
+ };
}
public abstract boolean accept(HQLCompletionProposalStub proposal);
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JDBCReaderStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JDBCReaderStub.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/JDBCReaderStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -0,0 +1,27 @@
+package org.hibernate.console.stubs;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.hibernate.cfg.JDBCReaderFactory;
+import org.hibernate.cfg.reveng.JDBCReader;
+import org.hibernate.cfg.reveng.ProgressListener;
+import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
+
+public class JDBCReaderStub {
+
+ protected JDBCReader jdbcReader;
+
+ protected JDBCReaderStub(Properties cfg, SettingsStub settings, ReverseEngineeringStrategy revengStrategy) {
+ jdbcReader = JDBCReaderFactory.newJDBCReader(cfg, settings.settings, revengStrategy);
+ }
+
+ public static JDBCReaderStub newInstance(Properties cfg, SettingsStub settings, ReverseEngineeringStrategy revengStrategy) {
+ return new JDBCReaderStub(cfg, settings, revengStrategy);
+ }
+
+ @SuppressWarnings("unchecked")
+ public List readDatabaseSchema(DefaultDatabaseCollectorStub dbs, String catalog, String schema, ProgressListener progress) {
+ return jdbcReader.readDatabaseSchema(dbs.defaultDatabaseCollector, catalog, schema, progress);
+ }
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStub.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PersistentClassStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -85,4 +85,14 @@
public String getNodeName() {
return persistentClass.getNodeName();
}
+
+ @SuppressWarnings("unchecked")
+ public Iterator<PropertyStub> getPropertyClosureIterator() {
+ Iterator<Property> it = (Iterator<Property>)persistentClass.getPropertyClosureIterator();
+ ArrayList<PropertyStub> al = new ArrayList<PropertyStub>();
+ while (it.hasNext()) {
+ al.add(new PropertyStub(it.next()));
+ }
+ return al.iterator();
+ }
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PropertyStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PropertyStub.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/PropertyStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -5,7 +5,7 @@
public class PropertyStub {
protected Property property;
- protected PropertyStub(Object table) {
+ protected PropertyStub(Object property) {
this.property = (Property)property;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStubFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStubFactory.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/SessionStubFactory.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -14,6 +14,8 @@
import org.hibernate.engine.query.HQLQueryPlan;
import org.hibernate.hql.QueryTranslator;
import org.hibernate.impl.SessionFactoryImpl;
+import org.hibernate.metadata.ClassMetadata;
+import org.hibernate.metadata.CollectionMetadata;
import org.hibernate.type.Type;
public class SessionStubFactory {
@@ -51,21 +53,34 @@
return res;
}
- // TODO: get rid of this - ClassMetadata - should not be public
@SuppressWarnings("unchecked")
public Map<String, ClassMetadataStub> getClassMetaData() {
if (sessionFactory == null) {
return new HashMap<String, ClassMetadataStub>();
}
- return sessionFactory.getAllClassMetadata();
+ Map<String, ClassMetadata> allClassMetadata = sessionFactory.getAllClassMetadata();
+ Iterator<Map.Entry<String, ClassMetadata>> it = allClassMetadata.entrySet().iterator();
+ Map<String, ClassMetadataStub> res = new HashMap<String, ClassMetadataStub>();
+ while (it.hasNext()) {
+ Map.Entry<String, ClassMetadata> entry = it.next();
+ res.put(entry.getKey(), new ClassMetadataStub(entry.getValue()));
+ }
+ return res;
}
- // TODO: get rid of this - ClassMetadata - should not be public
+
@SuppressWarnings("unchecked")
public Map<String, CollectionMetadataStub> getCollectionMetaData() {
if (sessionFactory == null) {
return new HashMap<String, CollectionMetadataStub>();
}
- return sessionFactory.getAllCollectionMetadata();
+ Map<String, CollectionMetadata> allClassMetadata = sessionFactory.getAllCollectionMetadata();
+ Iterator<Map.Entry<String, CollectionMetadata>> it = allClassMetadata.entrySet().iterator();
+ Map<String, CollectionMetadataStub> res = new HashMap<String, CollectionMetadataStub>();
+ while (it.hasNext()) {
+ Map.Entry<String, CollectionMetadata> entry = it.next();
+ res.put(entry.getKey(), new CollectionMetadataStub(entry.getValue()));
+ }
+ return res;
}
/**
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStubFactory.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStubFactory.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/TypeStubFactory.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -1,16 +1,34 @@
package org.hibernate.console.stubs;
+import java.lang.reflect.Type;
+
public class TypeStubFactory {
@SuppressWarnings("unchecked")
public static TypeStub createTypeStub(Object value) {
final Class cl = value.getClass();
- if (0 == "org.hibernate.type.CollectionType".compareTo(cl.getName())) { //$NON-NLS-1$
+ if (isClassOrOffspring(cl, "org.hibernate.type.CollectionType")) { //$NON-NLS-1$
return new CollectionTypeStub(value);
//} else if (0 == "org.hibernate.type.Type".compareTo(cl.getName())) { //$NON-NLS-1$
// return new TypeStub(value);
- } else if (0 == "org.hibernate.type.EntityType".compareTo(cl.getName())) { //$NON-NLS-1$
+ } else if (isClassOrOffspring(cl, "org.hibernate.type.EntityType")) { //$NON-NLS-1$
return new EntityTypeStub(value);
+ } else if (isClassOrOffspring(cl, "org.hibernate.type.NullableType")) { //$NON-NLS-1$
+ return new NullableTypeStub(value);
}
- return null;
+ return new AbstractTypeStub(value);
}
+
+ protected static boolean isClassOrOffspring(final Class<?> cl, final String name) {
+ if (cl == null || name == null) {
+ return false;
+ }
+ if (0 == name.compareTo(cl.getName())) {
+ return true;
+ }
+ Type type = cl.getGenericSuperclass();
+ if (type instanceof Class<?>) {
+ return isClassOrOffspring((Class<?>)type, name);
+ }
+ return false;
+ }
}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/util/HqlBaseLexerStub.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/util/HqlBaseLexerStub.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/util/HqlBaseLexerStub.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -0,0 +1,31 @@
+package org.hibernate.console.stubs.util;
+
+import java.io.Reader;
+
+import org.hibernate.hql.antlr.HqlBaseLexer;
+
+import antlr.Token;
+import antlr.TokenStreamException;
+
+public class HqlBaseLexerStub {
+
+ protected HqlBaseLexer hqlBaseLexer;
+
+ protected HqlBaseLexerStub(HqlBaseLexer hqlBaseLexer) {
+ this.hqlBaseLexer = hqlBaseLexer;
+ }
+
+ public static HqlBaseLexerStub newInstance(Reader in) {
+ return new HqlBaseLexerStub(new HqlBaseLexer(in));
+ }
+
+ // TODO: antlr.Token -> TokenStub?
+ public Token nextToken() {
+ try {
+ return hqlBaseLexer.nextToken();
+ } catch (TokenStreamException e) {
+ return null;
+ }
+ }
+
+}
Added: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/util/ParserHelper.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/util/ParserHelper.java (rev 0)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/stubs/util/ParserHelper.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -0,0 +1,9 @@
+package org.hibernate.console.stubs.util;
+
+public class ParserHelper {
+ public static final String HQL_VARIABLE_PREFIX = ":"; //$NON-NLS-1$
+
+ public static final String HQL_SEPARATORS = " \n\r\f\t,()=<>&|+-=/*'^![]#~\\"; //$NON-NLS-1$
+ //NOTICE: no " or . since they are part of (compound) identifiers
+ public static final String PATH_SEPARATORS = "."; //$NON-NLS-1$
+}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ConsoleConfigurationBasedAction.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ConsoleConfigurationBasedAction.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ConsoleConfigurationBasedAction.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -62,9 +62,14 @@
try {
doRun();
- } catch(HibernateException he) {
- String out = NLS.bind(HibernateConsoleMessages.ConsoleConfigurationBasedAction_problem_while_executing, getText(), he);
- HibernateConsolePlugin.getDefault().showError(null, out, he);
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ String out = NLS.bind(HibernateConsoleMessages.ConsoleConfigurationBasedAction_problem_while_executing, getText(), he);
+ HibernateConsolePlugin.getDefault().showError(null, out, he);
+ } else {
+ throw he;
+ }
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/EditConsoleConfiguration.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/EditConsoleConfiguration.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/EditConsoleConfiguration.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -66,15 +66,25 @@
final ConsoleConfiguration config = (ConsoleConfiguration) node;
edit( config );
}
- } catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(null, HibernateConsoleMessages.EditConsoleConfiguration_exception_while_edit_config, he);
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().showError(null, HibernateConsoleMessages.EditConsoleConfiguration_exception_while_edit_config, he);
+ } else {
+ throw he;
+ }
}
}
} else {
try {
edit(cfg);
- } catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(null, HibernateConsoleMessages.EditConsoleConfiguration_exception_while_edit_config, he);
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().showError(null, HibernateConsoleMessages.EditConsoleConfiguration_exception_while_edit_config, he);
+ } else {
+ throw he;
+ }
}
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -67,11 +67,16 @@
if (cfg.getConfiguration() == null) {
try {
cfg.build();
- } catch (HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(
- HibernateConsolePlugin.getShell(),
- HibernateConsoleMessages.LoadConsoleCFGCompletionProposal_could_not_load_configuration +
- ' ' + cfg.getName(), he);
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().showError(
+ HibernateConsolePlugin.getShell(),
+ HibernateConsoleMessages.LoadConsoleCFGCompletionProposal_could_not_load_configuration +
+ ' ' + cfg.getName(), he);
+ } else {
+ throw he;
+ }
}
}
if (cfg.getConfiguration() != null) {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenQueryEditorAction.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -35,8 +35,13 @@
try {
openQueryEditor( config, generateQuery(path) );
showed = true;
- } catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(null, HibernateConsoleMessages.OpenQueryEditorAction_exception_open_hql_editor, he);
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().showError(null, HibernateConsoleMessages.OpenQueryEditorAction_exception_open_hql_editor, he);
+ } else {
+ throw he;
+ }
}
}
return showed;
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryParametersPage.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryParametersPage.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryParametersPage.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -64,8 +64,8 @@
import org.hibernate.console.ImageConstants;
import org.hibernate.console.QueryInputModel;
import org.hibernate.console.stubs.NullableTypeStub;
-import org.hibernate.console.stubs.TableStub;
import org.hibernate.console.stubs.TypeStub;
+import org.hibernate.console.stubs.util.ParserHelper;
import org.hibernate.console.stubs.util.StringHelper;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.QueryEditor;
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/SchemaExportAction.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/SchemaExportAction.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/SchemaExportAction.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -27,7 +27,6 @@
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.osgi.util.NLS;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.execution.ExecutionContext.Command;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction;
@@ -88,10 +87,15 @@
// the view just react to config being
// build ?
}
- } catch (HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(
- viewer.getControl().getShell(),
- HibernateConsoleMessages.SchemaExportAction_exception_running_schemaexport, he );
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().showError(
+ viewer.getControl().getShell(),
+ HibernateConsoleMessages.SchemaExportAction_exception_running_schemaexport, he );
+ } else {
+ throw he;
+ }
}
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/HibernatePropertySourceProvider.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/HibernatePropertySourceProvider.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/HibernatePropertySourceProvider.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -48,7 +48,8 @@
if (qp != null) {
SessionStub sessionStub = qp.getSessionStub();
String consoleConfigName = qp.getConsoleConfigName();
- if ((sessionStub.isOpen() && sessionStub.contains(obj)) || sessionStub.hasMetaData(obj)) {
+ if ((sessionStub.isOpen() && sessionStub.contains(obj)) ||
+ (obj != null && sessionStub.hasMetaData(obj))) {
res = new EntityPropertySource(obj, sessionStub);
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/ConfigurationWorkbenchAdapter.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/ConfigurationWorkbenchAdapter.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/ConfigurationWorkbenchAdapter.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -37,7 +37,7 @@
@SuppressWarnings("unchecked")
public Object[] getChildren(Object o) {
ConfigurationStub cfg = (ConfigurationStub) o;
- Iterator<? extends PersistentClassStub> classMappings = cfg.getClassMappings();
+ Iterator<PersistentClassStub> classMappings = cfg.getClassMappings();
return toArray(classMappings, PersistentClassStub.class, new Comparator<PersistentClassStub>() {
public int compare(PersistentClassStub p0, PersistentClassStub p1) {
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -31,14 +31,14 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osgi.util.NLS;
-import org.hibernate.cfg.reveng.DefaultDatabaseCollector;
-import org.hibernate.cfg.reveng.JDBCReader;
import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ImageConstants;
import org.hibernate.console.execution.ExecutionContext;
import org.hibernate.console.stubs.ConfigurationStub;
import org.hibernate.console.stubs.ConnectionProviderStub;
+import org.hibernate.console.stubs.DefaultDatabaseCollectorStub;
+import org.hibernate.console.stubs.JDBCReaderStub;
import org.hibernate.console.stubs.SettingsStub;
import org.hibernate.console.stubs.TableStub;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
@@ -51,10 +51,9 @@
return getChildren(o, new NullProgressMonitor());
}
- @SuppressWarnings("unchecked")
public synchronized Object[] getChildren(Object o, final IProgressMonitor monitor) {
LazyDatabaseSchema dbs = getLazyDatabaseSchema( o );
- final DefaultDatabaseCollector db = new DefaultDatabaseCollector();
+ final DefaultDatabaseCollectorStub db = DefaultDatabaseCollectorStub.newInstance();
ConsoleConfiguration consoleConfiguration = dbs.getConsoleConfiguration();
try{
@@ -63,7 +62,7 @@
List<TableContainer> result = new ArrayList<TableContainer>();
Iterator<Map.Entry<String, List<TableStub>>> qualifierEntries = db.getQualifierEntries();
- while ( qualifierEntries.hasNext() ) {
+ while (qualifierEntries.hasNext()) {
Map.Entry<String, List<TableStub>> entry = qualifierEntries.next();
result.add(new TableContainer(entry.getKey(), entry.getValue()));
}
@@ -75,10 +74,15 @@
}
});
- } catch (HibernateException e){
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problems_while_reading_database_schema, e);
- String out = NLS.bind(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_reading_schema_error, e.getMessage());
- return new Object[]{out};
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problems_while_reading_database_schema, he);
+ String out = NLS.bind(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_reading_schema_error, he.getMessage());
+ return new Object[]{out};
+ } else {
+ throw he;
+ }
}
}
@@ -99,7 +103,7 @@
return getLazyDatabaseSchema(o).getConsoleConfiguration();
}
- protected void readDatabaseSchema(final IProgressMonitor monitor, final DefaultDatabaseCollector db, ConsoleConfiguration consoleConfiguration, final ReverseEngineeringStrategy strategy) {
+ protected void readDatabaseSchema(final IProgressMonitor monitor, final DefaultDatabaseCollectorStub db, ConsoleConfiguration consoleConfiguration, final ReverseEngineeringStrategy strategy) {
final ConfigurationStub configuration = consoleConfiguration.buildWith(null, false);
consoleConfiguration.execute(new ExecutionContext.Command() {
@@ -110,13 +114,17 @@
try {
connectionProvider = settings.getConnectionProvider();
- JDBCReader reader = JDBCReaderFactory.newJDBCReader(configuration.getProperties(), settings, strategy);
+ JDBCReaderStub reader = JDBCReaderStub.newInstance(configuration.getProperties(), settings, strategy);
reader.readDatabaseSchema(db, settings.getDefaultCatalogName(), settings.getDefaultSchemaName(), new ProgressListenerMonitor(monitor));
- } catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problem_while_reading_database_schema, he);
- return new Object[] { HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_schema_not_available};
- }
- finally {
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problem_while_reading_database_schema, he);
+ return new Object[] { HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_schema_not_available};
+ } else {
+ throw he;
+ }
+ } finally {
if (connectionProvider!=null) {
connectionProvider.close();
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/PersistentClassWorkbenchAdapter.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/PersistentClassWorkbenchAdapter.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/PersistentClassWorkbenchAdapter.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -23,7 +23,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-import java.util.List;
import org.eclipse.jface.resource.ImageDescriptor;
import org.hibernate.console.ImageConstants;
@@ -33,18 +32,18 @@
public class PersistentClassWorkbenchAdapter extends BasicWorkbenchAdapter {
- @SuppressWarnings("unchecked")
public Object[] getChildren(Object o) {
PersistentClassStub pc = (PersistentClassStub) o;
PropertyStub identifierProperty = pc.getIdentifierProperty();
- List<PropertyStub> properties = new ArrayList<PropertyStub>();
-
- if(identifierProperty!=null) {
- properties.add(identifierProperty);
+ ArrayList<PropertyStub> res = new ArrayList<PropertyStub>();
+ Iterator<PropertyStub> it = pc.getPropertyClosureIterator();
+ while (it.hasNext()) {
+ res.add(it.next());
}
-
- Iterator<PropertyStub> propertyClosureIterator = new JoinedIterator(properties.iterator(), pc.getPropertyClosureIterator());
- return toArray(propertyClosureIterator, PropertyStub.class, null);
+ if (identifierProperty != null) {
+ res.add(identifierProperty);
+ }
+ return res.toArray();
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -178,9 +178,14 @@
try {
consoleConfiguration.build();
consoleConfiguration.buildMappings();
- } catch (HibernateException e) {
- String mess = NLS.bind(HibernateConsoleMessages.CompletionHelper_error_could_not_build_cc, consoleConfiguration.getName());
- HibernateConsolePlugin.getDefault().logErrorMessage(mess, e);
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ String mess = NLS.bind(HibernateConsoleMessages.CompletionHelper_error_could_not_build_cc, consoleConfiguration.getName());
+ HibernateConsolePlugin.getDefault().logErrorMessage(mess, he);
+ } else {
+ throw he;
+ }
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/model/PropertyViewAdapter.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/model/PropertyViewAdapter.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/graph/model/PropertyViewAdapter.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -29,6 +29,7 @@
import org.eclipse.swt.graphics.Image;
import org.hibernate.console.stubs.CollectionStub;
import org.hibernate.console.stubs.EntityTypeStub;
+import org.hibernate.console.stubs.HibernateConsoleRuntimeException;
import org.hibernate.console.stubs.OneToManyStub;
import org.hibernate.console.stubs.PropertyStub;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
@@ -96,8 +97,13 @@
this.addSourceAssociation( pava );
target.addTargetAssociation( pava );
}
- } catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().logWarning( he );
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().logWarning( new HibernateConsoleRuntimeException("", he) ); //$NON-NLS-1$
+ } else {
+ throw he;
+ }
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/EclipseHQLCompletionRequestor.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/EclipseHQLCompletionRequestor.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/EclipseHQLCompletionRequestor.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -33,9 +33,8 @@
import org.hibernate.eclipse.console.utils.EclipseImages;
import org.hibernate.eclipse.console.workbench.HibernateWorkbenchHelper;
import org.hibernate.tool.ide.completion.HQLCompletionProposal;
-import org.hibernate.tool.ide.completion.IHQLCompletionRequestor;
-public class EclipseHQLCompletionRequestor implements IHQLCompletionRequestorStub {
+public class EclipseHQLCompletionRequestor extends IHQLCompletionRequestorStub {
private final List<ICompletionProposal> result = new ArrayList<ICompletionProposal>();
private String lastErrorMessage;
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLLexerRule.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLLexerRule.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLLexerRule.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -27,9 +27,10 @@
import org.eclipse.jface.text.rules.ICharacterScanner;
import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
+import org.hibernate.console.stubs.HqlSqlTokenTypesStub;
+import org.hibernate.console.stubs.util.HqlBaseLexerStub;
import antlr.Token;
-import antlr.TokenStreamException;
public class HQLLexerRule implements IRule {
@@ -40,7 +41,7 @@
}
public IToken evaluate(final ICharacterScanner scanner) {
- HqlBaseLexer lexer = new HqlBaseLexer(new Reader() {
+ HqlBaseLexerStub lexer = HqlBaseLexerStub.newInstance(new Reader() {
public void close() throws IOException {
// noop
@@ -66,16 +67,10 @@
}
});
- try {
- Token token = lexer.nextToken();
- if(token.getType()==HqlSqlTokenTypes.IDENT) {
- return hqlToken;
- }
- }
- catch (TokenStreamException e) {
- // undefined
- }
-
+ Token token = lexer.nextToken();
+ if (token != null && token.getType() == HqlSqlTokenTypesStub.IDENT) {
+ return hqlToken;
+ }
return org.eclipse.jface.text.rules.Token.UNDEFINED;
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/ReverseEngineeringEditor.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -234,9 +234,14 @@
LazyDatabaseSchema lazyDatabaseSchema = new LazyDatabaseSchema(configuration, repository.getReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy()));
return lazyDatabaseSchema;
- } catch(HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(getContainer().getShell(), MapperMessages.ReverseEngineeringEditor_error_while_refreshing_databasetree, he);
- return null;
+ } catch(RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ HibernateConsolePlugin.getDefault().showError(getContainer().getShell(), MapperMessages.ReverseEngineeringEditor_error_while_refreshing_databasetree, he);
+ return null;
+ } else {
+ throw he;
+ }
}
}
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/plugin.xml
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/plugin.xml 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/plugin.xml 2010-03-26 16:36:54 UTC (rev 21056)
@@ -59,9 +59,9 @@
<objectContribution id="diagramEditorAction" objectClass="java.lang.Object">
<visibility>
<or>
- <objectClass name="org.hibernate.cfg.Configuration"/>
+ <objectClass name="org.hibernate.console.stubs.ConfigurationStub"/>
<objectClass name="org.hibernate.console.ConsoleConfiguration"/>
- <objectClass name="org.hibernate.mapping.PersistentClass"/>
+ <objectClass name="org.hibernate.console.stubs.PersistentClassStub"/>
</or>
</visibility>
<action
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/OrmDiagram.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -792,15 +792,20 @@
try {
consoleConfig.build();
consoleConfig.buildMappings();
- } catch (HibernateException he) {
- // here just ignore this
- if (error != null) {
- error.append(consoleConfigName);
- error.append(": "); //$NON-NLS-1$
- error.append(he.getMessage());
- if (error.length() == 0) {
- error.append(he.getCause());
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ // here just ignore this
+ if (error != null) {
+ error.append(consoleConfigName);
+ error.append(": "); //$NON-NLS-1$
+ error.append(he.getMessage());
+ if (error.length() == 0) {
+ error.append(he.getCause());
+ }
}
+ } else {
+ throw he;
}
}
config = consoleConfig.getConfiguration();
Modified: branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/SpecialOrmShape.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/SpecialOrmShape.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/model/SpecialOrmShape.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -17,7 +17,6 @@
import org.hibernate.console.stubs.PropertyStub;
import org.hibernate.console.stubs.RootClassStub;
import org.hibernate.console.stubs.TypeStub;
-import org.hibernate.eclipse.console.HibernateConsolePlugin;
/**
*
@@ -33,7 +32,6 @@
/**
* creates children of the shape,
*/
- @SuppressWarnings("unchecked")
@Override
protected void initModel() {
RootClassStub rootClass = (RootClassStub)getOrmElement();
@@ -61,12 +59,7 @@
return fField.getValue().getType();
}});
} else {
- try{
- type = field.getValue().getType();
- } catch (MappingException e) {
- //type is not accessible
- HibernateConsolePlugin.getDefault().logErrorMessage("MappingException: ", e); //$NON-NLS-1$
- }
+ type = field.getValue().getType();
}
Shape bodyOrmShape = null;
if (type != null && type.isEntityType()) {
Modified: branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -69,10 +69,15 @@
configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
assertTrue(configs[0] instanceof ConfigurationStub);
persClasses = new ConfigurationWorkbenchAdapter().getChildren(configs[0]);
- } catch (InvalidMappingException ex){
- String out = NLS.bind(ConsoleTestMessages.OpenMappingDiagramTest_mapping_diagrams_for_package_cannot_be_opened,
- new Object[]{testPackage.getElementName(), ex.getMessage()});
- fail(out);
+ } catch (RuntimeException ex) {
+ // TODO: RuntimeException ? - find correct solution
+ if (ex.getClass().getName().contains("InvalidMappingException")) { //$NON-NLS-1$
+ String out = NLS.bind(ConsoleTestMessages.OpenMappingDiagramTest_mapping_diagrams_for_package_cannot_be_opened,
+ new Object[]{testPackage.getElementName(), ex.getMessage()});
+ fail(out);
+ } else {
+ throw ex;
+ }
}
if (persClasses.length > 0){
Modified: branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -76,10 +76,15 @@
configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
assertTrue(configs[0] instanceof ConfigurationStub);
persClasses = new ConfigurationWorkbenchAdapter().getChildren(configs[0]);
- } catch (InvalidMappingException ex){
- String out = NLS.bind(ConsoleTestMessages.OpenMappingFileTest_mapping_files_for_package_cannot_be_opened,
- new Object[]{testPackage.getElementName(), ex.getMessage()});
- fail(out);
+ } catch (RuntimeException ex) {
+ // TODO: RuntimeException ? - find correct solution
+ if (ex.getClass().getName().contains("InvalidMappingException")) { //$NON-NLS-1$
+ String out = NLS.bind(ConsoleTestMessages.OpenMappingFileTest_mapping_files_for_package_cannot_be_opened,
+ new Object[]{testPackage.getElementName(), ex.getMessage()});
+ fail(out);
+ } else {
+ throw ex;
+ }
}
if (persClasses.length > 0) {
final String testClass = "class"; //$NON-NLS-1$
Modified: branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -78,10 +78,15 @@
configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
assertTrue(configs[0] instanceof ConfigurationStub);
persClasses = new ConfigurationWorkbenchAdapter().getChildren(configs[0]);
- } catch (InvalidMappingException ex) {
- String out = NLS.bind(ConsoleTestMessages.OpenSourceFileTest_source_files_for_package_cannot_be_opened,
- testPackage.getElementName(), ex.getMessage());
- fail(out);
+ } catch (RuntimeException ex) {
+ // TODO: RuntimeException ? - find correct solution
+ if (ex.getClass().getName().contains("InvalidMappingException")) { //$NON-NLS-1$
+ String out = NLS.bind(ConsoleTestMessages.OpenSourceFileTest_source_files_for_package_cannot_be_opened,
+ testPackage.getElementName(), ex.getMessage());
+ fail(out);
+ } else {
+ throw ex;
+ }
}
if (persClasses.length > 0) {
for (int i = 0; i < persClasses.length; i++) {
Modified: branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java
===================================================================
--- branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java 2010-03-26 16:23:10 UTC (rev 21055)
+++ branches/hibernatetools-multiversion/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java 2010-03-26 16:36:54 UTC (rev 21056)
@@ -170,8 +170,13 @@
try {
ccfg.checkQuery("from TestClass where id = #{some.id.field}", false); //$NON-NLS-1$
fail("should have failed with EL expressions!"); //$NON-NLS-1$
- } catch (HibernateException he) {
- // ok
+ } catch (RuntimeException he) {
+ // TODO: RuntimeException ? - find correct solution
+ if (he.getClass().getName().contains("HibernateException")) { //$NON-NLS-1$
+ // ok
+ } else {
+ throw he;
+ }
}
ccfg.checkQuery("from TestClass where id = #{some.id.field}", true); //$NON-NLS-1$
14 years, 9 months