JBoss Tools SVN: r37289 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui: src/org/jboss/ide/eclipse/as/classpath/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-13 13:56:41 -0500 (Tue, 13 Dec 2011)
New Revision: 37289
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom/CustomClasspathPreferencePage.java
Log:
JBIDE-10463 - patch to trunk with confirmation dialog
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/META-INF/MANIFEST.MF 2011-12-13 18:48:57 UTC (rev 37288)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/META-INF/MANIFEST.MF 2011-12-13 18:56:41 UTC (rev 37289)
@@ -14,7 +14,9 @@
org.eclipse.jdt.core;bundle-version="3.7.0",
org.eclipse.core.resources;bundle-version="3.7.100",
org.jboss.ide.eclipse.as.ui;bundle-version="2.2.0",
- org.jboss.ide.eclipse.archives.webtools;bundle-version="2.2.0"
+ org.jboss.ide.eclipse.archives.webtools;bundle-version="2.2.0",
+ org.eclipse.jst.common.project.facet.core;bundle-version="1.4.200",
+ org.eclipse.wst.common.project.facet.core;bundle-version="1.4.200"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java 2011-12-13 18:48:57 UTC (rev 37288)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java 2011-12-13 18:56:41 UTC (rev 37289)
@@ -41,6 +41,11 @@
public static String JBossEJB3LibrariesPage_ConfigurationDoesNotContainEJB3Libraries;
public static String JBossSelectionPage_ButtonText;
public static String JBossSelectionPage_Name;
+ public static String CustomClasspathsWorkspaceJob;
+ public static String CustomClasspathsSettingsChanged;
+ public static String CustomClasspathsRequiresRebuild;
+
+
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.properties 2011-12-13 18:48:57 UTC (rev 37288)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.properties 2011-12-13 18:56:41 UTC (rev 37289)
@@ -14,3 +14,6 @@
JBossEJB3LibrariesPage_ConfigurationDoesNotContainEJB3Libraries=The selected configuration ("{0}") does not contain the expected EJB3 libraries. Please install JBoss with EJB3 enabled, or try another configuration.
JBossSelectionPage_ButtonText=Create a JBoss Server
JBossSelectionPage_Name=JBoss Server Selection
+CustomClasspathsWorkspaceJob=Rebuilding Affected Projects
+CustomClasspathsSettingsChanged=Runtime Classpath Settings Changed
+CustomClasspathsRequiresRebuild=A full rebuild of the affected projects is required for the classpath settings to take affect. Do the full build now?
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom/CustomClasspathPreferencePage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom/CustomClasspathPreferencePage.java 2011-12-13 18:48:57 UTC (rev 37288)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom/CustomClasspathPreferencePage.java 2011-12-13 18:56:41 UTC (rev 37289)
@@ -16,8 +16,23 @@
import java.util.Comparator;
import java.util.Iterator;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.ui.util.CoreUtility;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
@@ -25,14 +40,21 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IRuntimeType;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.archives.webtools.filesets.Fileset;
import org.jboss.ide.eclipse.archives.webtools.filesets.FilesetDialog;
import org.jboss.ide.eclipse.archives.webtools.filesets.FilesetLabelProvider;
+import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
+import org.jboss.ide.eclipse.as.classpath.core.RuntimeKey;
import org.jboss.ide.eclipse.as.classpath.core.runtime.CustomRuntimeClasspathModel;
import org.jboss.ide.eclipse.as.classpath.core.runtime.CustomRuntimeClasspathModel.IDefaultPathProvider;
+import org.jboss.ide.eclipse.as.classpath.ui.Messages;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.preferences.ServerTypePreferencePage;
import org.osgi.service.prefs.BackingStoreException;
@@ -54,12 +76,16 @@
String[] changed2 = rootComp.getChanged();
ArrayList<Object> list;
IDefaultPathProvider[] arr;
+ final ArrayList<IProject> projectsNeedRefresh = new ArrayList<IProject>();
for( int i = 0; i < changed2.length; i++ ) {
String runtimeId = changed2[i];
IRuntimeType rt = ServerCore.findRuntimeType(runtimeId);
list = rootComp.getDataForComboSelection(changed2[i]);
arr = (IDefaultPathProvider[]) list.toArray(new IDefaultPathProvider[list.size()]);
CustomRuntimeClasspathModel.saveFilesets(rt, arr);
+ clearRuntimeTypeCachedClasspathEntries(rt);
+ IProject[] projectsTargeting = findProjectsTargeting(rt);
+ projectsNeedRefresh.addAll(Arrays.asList(projectsTargeting));
}
// Save the recently selected
@@ -70,11 +96,72 @@
prefs.flush();
} catch(BackingStoreException e) {
}
-
+
+ MessageDialog dialog= new MessageDialog(getShell(),
+ Messages.CustomClasspathsSettingsChanged, null,
+ Messages.CustomClasspathsRequiresRebuild,
+ MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 2);
+
+ int res= dialog.open();
+ if (res == 0) {
+ Job j = new WorkspaceJob(Messages.CustomClasspathsWorkspaceJob) {
+ public IStatus runInWorkspace(IProgressMonitor monitor) {
+ Iterator<IProject> i = projectsNeedRefresh.iterator();
+ monitor.beginTask(Messages.CustomClasspathsWorkspaceJob, projectsNeedRefresh.size());
+ while(i.hasNext()) {
+ IJavaProject jp = JavaCore.create(i.next());
+ try {
+ // Must reset the classpath to actually force both views and models to refresh
+ // A full build is not enough
+ jp.setRawClasspath(jp.getRawClasspath(), new NullProgressMonitor());
+ } catch( JavaModelException jme ) {
+ // TODO
+ }
+ CoreUtility.getBuildJob(jp.getProject()).schedule();
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ }
+ };
+ j.setRule(ResourcesPlugin.getWorkspace().getRoot());
+ j.schedule();
+ }
rootComp.clearChanged();
return true;
}
+ /* Clear the cached entries for this runtime */
+ private void clearRuntimeTypeCachedClasspathEntries(IRuntimeType rt) {
+ IRuntime[] allRuntimes = ServerCore.getRuntimes();
+ for( int i = 0; i < allRuntimes.length; i++ ) {
+ if( allRuntimes[i].getRuntimeType().getId().equals(rt.getId())) {
+ RuntimeKey key = ClasspathCorePlugin.getRuntimeKey(allRuntimes[i]);
+ ClasspathCorePlugin.getRuntimeClasspaths().put(key, null);
+ }
+ }
+ }
+
+ private IProject[] findProjectsTargeting(IRuntimeType rt) {
+ ArrayList<IProject> matching = new ArrayList<IProject>();
+ IProject[] allProjs = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ for( int i = 0; i < allProjs.length; i++ ) {
+ try {
+ if(FacetedProjectFramework.isFacetedProject(allProjs[i])) {
+ IFacetedProject fp = ProjectFacetsManager.create(allProjs[i]);
+ org.eclipse.wst.common.project.facet.core.runtime.IRuntime primary = fp.getPrimaryRuntime();
+ if( primary != null ) {
+ IRuntime wstRuntime = ServerCore.findRuntime(primary.getName());
+ if( wstRuntime.getRuntimeType().getId().equals(rt.getId()))
+ matching.add(allProjs[i]);
+ }
+ }
+ } catch(CoreException ce) {
+ // Exception thrown if project does not exist or is closed, can ignore safely
+ }
+ }
+ return matching.toArray(new IProject[matching.size()]);
+ }
+
public class CustomClasspathPreferenceComposite extends AbstractComboDataPreferenceComposite {
public CustomClasspathPreferenceComposite(Composite parent, int style) {
super(parent, style);
14 years, 4 months
JBoss Tools SVN: r37288 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-12-13 13:48:57 -0500 (Tue, 13 Dec 2011)
New Revision: 37288
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/build.properties
Log:
https://issues.jboss.org/browse/JBIDE-10361 Code generation fails when Hibernate 4.0 version is used
added missing libraries
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/build.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/build.properties 2011-12-13 18:47:18 UTC (rev 37287)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate4_0/build.properties 2011-12-13 18:48:57 UTC (rev 37288)
@@ -4,8 +4,4 @@
.,\
plugin.xml,\
plugin.properties,\
- lib/bsh-core-2.0b4.jar,\
- lib/jpa/,\
- lib/required/,\
- lib/tools/,\
- lib/required/slf4j-api-1.5.8.jar
+ lib/
14 years, 4 months
JBoss Tools SVN: r37287 - branches/jbosstools-3.3.0.M5/hibernatetools/plugins/org.jboss.tools.hibernate4_0.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-12-13 13:47:18 -0500 (Tue, 13 Dec 2011)
New Revision: 37287
Modified:
branches/jbosstools-3.3.0.M5/hibernatetools/plugins/org.jboss.tools.hibernate4_0/build.properties
Log:
https://issues.jboss.org/browse/JBIDE-10361 Code generation fails when Hibernate 4.0 version is used
added missing libraries
Modified: branches/jbosstools-3.3.0.M5/hibernatetools/plugins/org.jboss.tools.hibernate4_0/build.properties
===================================================================
--- branches/jbosstools-3.3.0.M5/hibernatetools/plugins/org.jboss.tools.hibernate4_0/build.properties 2011-12-13 18:13:39 UTC (rev 37286)
+++ branches/jbosstools-3.3.0.M5/hibernatetools/plugins/org.jboss.tools.hibernate4_0/build.properties 2011-12-13 18:47:18 UTC (rev 37287)
@@ -4,8 +4,4 @@
.,\
plugin.xml,\
plugin.properties,\
- lib/bsh-core-2.0b4.jar,\
- lib/jpa/,\
- lib/required/,\
- lib/tools/,\
- lib/required/slf4j-api-1.5.8.jar
+ lib/
14 years, 4 months
JBoss Tools SVN: r37286 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-12-13 13:13:39 -0500 (Tue, 13 Dec 2011)
New Revision: 37286
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java
Log:
Renaming one test in CDIProjectWithDynamicWizardTest
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java 2011-12-13 18:08:20 UTC (rev 37285)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java 2011-12-13 18:13:39 UTC (rev 37286)
@@ -33,7 +33,7 @@
}
@Test
- public void testCDIFacet() {
+ public void testDynamicWizard() {
if (projectHelper.projectExists(getProjectName())) {
LOGGER.info("CDI project was sucessfully created by Dynamic Web Project wizard");
assertTrue(projectHelper.checkCDISupport(getProjectName()));
14 years, 4 months
JBoss Tools SVN: r37285 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-12-13 13:08:20 -0500 (Tue, 13 Dec 2011)
New Revision: 37285
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
Log:
Removing DummyTest
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-12-13 18:02:25 UTC (rev 37284)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-12-13 18:08:20 UTC (rev 37285)
@@ -39,7 +39,6 @@
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
-import org.test.DummyTest;
/**
* This test suite requires JBoss AS 6 or newer
14 years, 4 months
JBoss Tools SVN: r37284 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: quickfix/base and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-12-13 13:02:25 -0500 (Tue, 13 Dec 2011)
New Revision: 37284
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ConfigValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/injection/ProblemEligibleInjectionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3GenericOpenOnTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ResourceOpenOnTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3TestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/PerspectiveTest.java
Log:
CDIProjectWithDynamicWizardTest added + template of Seam3ConfigValidationTest added + all cdi tests will use new CDI project wizard to create CDI project
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -26,9 +26,11 @@
import org.jboss.tools.cdi.bot.test.quickfix.test.QualifierValidationQuickFixTest;
import org.jboss.tools.cdi.bot.test.quickfix.test.ScopeValidationQuickFixTest;
import org.jboss.tools.cdi.bot.test.quickfix.test.StereotypeValidationQuickFixTest;
+import org.jboss.tools.cdi.bot.test.seam3.Seam3ConfigValidationTest;
import org.jboss.tools.cdi.bot.test.seam3.Seam3GenericOpenOnTest;
import org.jboss.tools.cdi.bot.test.seam3.Seam3ResourceOpenOnTest;
import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
+import org.jboss.tools.cdi.bot.test.wizard.CDIProjectWithDynamicWizardTest;
import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
@@ -37,6 +39,7 @@
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
+import org.test.DummyTest;
/**
* This test suite requires JBoss AS 6 or newer
@@ -54,7 +57,7 @@
* JAVA=1.6,/space/java/sdk/jdk1.6.0_22
*
*
- * Suite duration: aprox. 29min
+ * Suite duration: aprox. 30min
*
* @author Lukas Jungmann
* @author Jaroslav Jankovic
@@ -64,6 +67,7 @@
// PerspectiveTest.class,
ConfigurationPresetTest.class,
FacetTest.class,
+ CDIProjectWithDynamicWizardTest.class,
WizardTest.class,
BeansEditorTest.class,
NamedRefactoringTest.class,
@@ -83,6 +87,7 @@
FindObserverForEventTest.class,
Seam3ResourceOpenOnTest.class,
Seam3GenericOpenOnTest.class,
+ Seam3ConfigValidationTest.class,
})
public class CDIAllBotTests extends CDITestBase {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -12,6 +12,7 @@
import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
+import org.jboss.tools.cdi.bot.test.wizard.CDIProjectWithDynamicWizardTest;
import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
@@ -46,6 +47,7 @@
//PerspectiveTest.class,
ConfigurationPresetTest.class,
FacetTest.class,
+ CDIProjectWithDynamicWizardTest.class,
WizardTest.class,
BeansEditorTest.class,
})
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -50,7 +50,7 @@
@Before
public void checkAndCreateProject() {
if (!projectHelper.projectExists(getProjectName())) {
- projectHelper.createCDIProject(getProjectName());
+ projectHelper.createCDIProjectWithCDIWizard(getProjectName());
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/EligibleInjectionQuickFixTestBase.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -47,16 +47,26 @@
SpecifyBeanDialogWizard spBeanDialogWizard = new SpecifyBeanDialogWizard();
if (operation == QualifierOperation.ADD) {
+ boolean qualifFound = false;
for (String availQualifer : spBeanDialogWizard.getAvailableQualifiers()) {
if (availQualifer.equals(qualifier + " - " + getPackageName())) {
+ qualifFound = true;
spBeanDialogWizard.addQualifier(availQualifer);
}
}
- // there was no such qualifer, it has to be created
- if (!spBeanDialogWizard.canFinish()) {
+ // there was no such qualifer, it has to be created, after creation it
+ // has to be added to in Bean qualifiers
+ if (!qualifFound) {
spBeanDialogWizard.createNewQualifier(qualifier, getPackageName()).
setName(qualifier).finish();
+ bot.sleep(Timing.time2S());
+ for (String availQualifer : spBeanDialogWizard.getAvailableQualifiers()) {
+ if (availQualifer.equals(qualifier + " - " + getPackageName())) {
+ spBeanDialogWizard.addQualifier(availQualifer);
+ }
+ }
}
+
} else {
for (String inBeanQualifer : spBeanDialogWizard.getInBeanQualifiers()) {
if (inBeanQualifer.equals(qualifier + " - " + getPackageName())) {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/QuickFixTestBase.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -38,13 +38,6 @@
public class QuickFixTestBase extends QuickFixHelper {
- @Override
- public void checkAndCreateProject() {
- if (!projectHelper.projectExists(getProjectName())) {
- projectHelper.createCDIProject(getProjectName());
- }
- }
-
@BeforeClass
public static void setup() {
problems.show();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/injection/ProblemEligibleInjectionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/injection/ProblemEligibleInjectionTest.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/injection/ProblemEligibleInjectionTest.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -14,6 +14,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.quickfix.base.EligibleInjectionQuickFixTestBase;
import org.junit.After;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -61,8 +62,9 @@
resolveMultipleBeans(DOG, QUALIFIER, QualifierOperation.ADD);
- String code = bot.editorByTitle(BROKEN_FARM + ".java").
- toTextEditor().getText();
+ bot.editorByTitle(BROKEN_FARM + ".java").show();
+ setEd(bot.activeEditor().toTextEditor());
+ String code = getEd().getText();
assertTrue(code.contains("@Inject @" + QUALIFIER));
code = bot.editorByTitle(DOG + ".java").toTextEditor().getText();
assertTrue(code.contains("@" + QUALIFIER));
@@ -82,16 +84,16 @@
getPackageName(), null, "/resources/quickfix/" +
"injection/removeQualifier/Dog.java.cdi");
-
wizard.createCDIComponentWithContent(CDIWizardType.BEAN, BROKEN_FARM,
getPackageName(), null, "/resources/quickfix/" +
"injection/removeQualifier/BrokenFarm.java.cdi");
resolveMultipleBeans(DOG, QUALIFIER, QualifierOperation.REMOVE);
- String code = bot.editorByTitle(BROKEN_FARM + ".java").
- toTextEditor().getText();
- assertTrue(code.contains("@Inject private"));
+ bot.editorByTitle(BROKEN_FARM + ".java").show();
+ setEd(bot.activeEditor().toTextEditor());
+ String code = getEd().getText();
+ assertTrue(code.contains("@Inject private") || code.contains("@Inject private"));
code = bot.editorByTitle(DOG + ".java").toTextEditor().getText();
assertTrue(!code.contains("@" + QUALIFIER));
}
@@ -113,8 +115,9 @@
resolveMultipleBeans(DOG, QUALIFIER, QualifierOperation.ADD);
- String code = bot.editorByTitle(BROKEN_FARM + ".java").
- toTextEditor().getText();
+ bot.editorByTitle(BROKEN_FARM + ".java").show();
+ setEd(bot.activeEditor().toTextEditor());
+ String code = getEd().getText();
assertTrue(code.contains("@Inject @" + QUALIFIER));
code = bot.editorByTitle(DOG + ".java").toTextEditor().getText();
assertTrue(code.contains("@" + QUALIFIER));
@@ -140,8 +143,9 @@
resolveMultipleBeans(DOG, QUALIFIER, QualifierOperation.ADD);
- String code = bot.editorByTitle(BROKEN_FARM + ".java").
- toTextEditor().getText();
+ bot.editorByTitle(BROKEN_FARM + ".java").show();
+ setEd(bot.activeEditor().toTextEditor());
+ String code = getEd().getText();
assertTrue(code.contains("@Inject @" + QUALIFIER));
code = bot.editorByTitle(DOG + ".java").toTextEditor().getText();
assertTrue(code.contains("@" + QUALIFIER));
@@ -165,8 +169,9 @@
resolveMultipleBeans(DOG, QUALIFIER, QualifierOperation.ADD);
- String code = bot.editorByTitle(BROKEN_FARM + ".java").
- toTextEditor().getText();
+ bot.editorByTitle(BROKEN_FARM + ".java").show();
+ setEd(bot.activeEditor().toTextEditor());
+ String code = getEd().getText();
assertTrue(code.contains("@Inject @" + QUALIFIER));
code = bot.editorByTitle(DOG + ".java").toTextEditor().getText();
assertTrue(code.contains("@" + QUALIFIER));
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ConfigValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ConfigValidationTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ConfigValidationTest.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.cdi.bot.test.seam3;
+
+
+public class Seam3ConfigValidationTest extends Seam3TestBase {
+
+ @Override
+ public String getProjectName() {
+ return "Seam3ConfigValidation";
+ }
+
+}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3GenericOpenOnTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3GenericOpenOnTest.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3GenericOpenOnTest.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -31,7 +31,7 @@
@Override
public String getProjectName() {
- return "Seam3GenericOpenOnTest";
+ return "Seam3GenericOpenOn";
}
/**
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ResourceOpenOnTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ResourceOpenOnTest.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3ResourceOpenOnTest.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -25,7 +25,7 @@
@Override
public String getProjectName() {
- return "Seam3ResourceOpenOnTest";
+ return "Seam3ResourceOpenOn";
}
/**
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3TestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3TestBase.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/seam3/Seam3TestBase.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -45,7 +45,7 @@
@Override
public void checkAndCreateProject() {
if (!projectHelper.projectExists(getProjectName())) {
- projectHelper.createCDIProject(getProjectName());
+ projectHelper.createCDIProjectWithCDIWizard(getProjectName());
addSeamSolderLibrary();
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -24,10 +24,23 @@
public class CDIProjectHelper extends CDIBase{
/**
- * Method creates new CDI Project - Dynamic Web Project + CDI Support
+ * Method creates new CDI Project with CDI Web Project wizard
* @param projectName
*/
- public void createCDIProject(String projectName) {
+ public void createCDIProjectWithCDIWizard(String projectName) {
+
+ new NewFileWizardAction().run()
+ .selectTemplate("CDI (Context and Dependency Injection)", "CDI Web Project").next();
+ new DynamicWebProjectWizard().setProjectName(projectName).finish();
+ util.waitForNonIgnoredJobs();
+ }
+
+ /**
+ * Method creates new CDI Project with Dynamic Web Project, after that it
+ * adds CDI Support
+ * @param projectName
+ */
+ public void createCDIProjectWithDynamicWizard(String projectName) {
createDynamicWebProject(projectName);
addCDISupport(projectName);
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.cdi.bot.test.wizard;
+
+import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
+import org.jboss.tools.cdi.bot.test.CDISmokeBotTests;
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.junit.Test;
+import org.junit.runners.Suite.SuiteClasses;
+
+@SuiteClasses({ CDIAllBotTests.class , CDISmokeBotTests.class })
+public class CDIProjectWithDynamicWizardTest extends CDITestBase {
+
+ @Override
+ public void checkAndCreateProject() {
+ if (!projectHelper.projectExists(getProjectName())) {
+ projectHelper.createCDIProjectWithDynamicWizard(getProjectName());
+ }
+ }
+
+ @Override
+ public String getProjectName() {
+ return "CDIDynamicWizardProject";
+ }
+
+ @Test
+ public void testCDIFacet() {
+ if (projectHelper.projectExists(getProjectName())) {
+ LOGGER.info("CDI project was sucessfully created by Dynamic Web Project wizard");
+ assertTrue(projectHelper.checkCDISupport(getProjectName()));
+ LOGGER.info("Project has correctly set CDI support");
+ } else {
+ fail("CDI project was not succesfully created with Dynamic Web Project wizard");
+ }
+
+ }
+
+}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -41,8 +41,14 @@
@Test
public void testCDIPreset() {
- LOGGER.info("Dynamic Web Project with CDI Configuration Preset created");
- assertTrue(projectHelper.checkCDISupport(getProjectName()));
+ if (projectHelper.projectExists(getProjectName())) {
+ LOGGER.info("Dynamic Web Project with CDI Configuration Preset created");
+ assertTrue(projectHelper.checkCDISupport(getProjectName()));
+ LOGGER.info("Project has correctly set CDI support");
+ } else {
+ fail("CDI project was not succesfully created with Dynamic Web Project wizard with CDI preset");
+ }
+
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -40,9 +40,14 @@
@Test
public void testCDIFacet() {
- LOGGER.info("Dynamic Web Project with CDI Facet created");
- assertTrue("Error: beans.xml should be created when selecting CDI Facet",
- projectExplorer.isFilePresent(getProjectName(), "WebContent/WEB-INF/beans.xml".split("/")));
+ if (projectHelper.projectExists(getProjectName())) {
+ LOGGER.info("Dynamic Web Project with CDI Facet created");
+ assertTrue("Error: beans.xml should be created when selecting CDI Facet",
+ projectExplorer.isFilePresent(getProjectName(), "WebContent/WEB-INF/beans.xml".split("/")));
+ } else {
+ fail("CDI project was not succesfully created with Dynamic Web Project wizard with CDI facet");
+ }
+ ;
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/PerspectiveTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/PerspectiveTest.java 2011-12-13 17:52:54 UTC (rev 37283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/PerspectiveTest.java 2011-12-13 18:02:25 UTC (rev 37284)
@@ -37,7 +37,7 @@
@Override
public void checkAndCreateProject() {
if (!projectHelper.projectExists(getProjectName())) {
- projectHelper.createCDIProject(getProjectName());
+ projectHelper.createCDIProjectWithCDIWizard(getProjectName());
eclipse.openPerspective(PerspectiveType.CDI);
LOGGER.info("CDI perspective selected");
bot.sleep(Timing.time2S());
14 years, 4 months
JBoss Tools SVN: r37283 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-13 12:52:54 -0500 (Tue, 13 Dec 2011)
New Revision: 37283
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-10129 - commit for as7.1 as well
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-12-13 17:34:26 UTC (rev 37282)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-12-13 17:52:54 UTC (rev 37283)
@@ -957,6 +957,16 @@
</default-facets>
<default-facets>
<runtime-component
+ id="org.jboss.ide.eclipse.as.runtime.component"
+ version="7.1">
+ </runtime-component>
+ <facet
+ id="jst.java"
+ version="6.0">
+ </facet>
+ </default-facets>
+ <default-facets>
+ <runtime-component
id="org.jboss.ide.eclipse.eap.runtime.component"
version="4.3">
</runtime-component>
14 years, 4 months