JBoss Tools SVN: r35924 - in trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core: internal/buildpath and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-10-24 05:00:26 -0400 (Mon, 24 Oct 2011)
New Revision: 35924
Modified:
trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/ILibraryMaterializationPostProcessor.java
trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/ILibraryMaterializationPostProcessorFactory.java
trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/MaterializeLibraryJob.java
trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/internal/buildpath/LibraryMaterializationPostProcessorFactory.java
trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/internal/buildpath/MavenLibraryMaterializationPostProcessor.java
Log:
JBIDE-9996 : fix remove exclusion patterns on source folders when materializing Maven Library
Modified: trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/ILibraryMaterializationPostProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/ILibraryMaterializationPostProcessor.java 2011-10-24 06:56:50 UTC (rev 35923)
+++ trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/ILibraryMaterializationPostProcessor.java 2011-10-24 09:00:26 UTC (rev 35924)
@@ -1,13 +1,23 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.common.jdt.core.buildpath;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IJavaProject;
public interface ILibraryMaterializationPostProcessor {
- void execute(IJavaProject javaProject, IPath containerPath) throws CoreException;
+ void execute(IJavaProject javaProject, IPath containerPath, IProgressMonitor monitor) throws CoreException;
boolean applies(IJavaProject javaProject, IPath containerPath) throws CoreException;
Modified: trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/ILibraryMaterializationPostProcessorFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/ILibraryMaterializationPostProcessorFactory.java 2011-10-24 06:56:50 UTC (rev 35923)
+++ trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/ILibraryMaterializationPostProcessorFactory.java 2011-10-24 09:00:26 UTC (rev 35924)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.common.jdt.core.buildpath;
public interface ILibraryMaterializationPostProcessorFactory {
Modified: trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/MaterializeLibraryJob.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/MaterializeLibraryJob.java 2011-10-24 06:56:50 UTC (rev 35923)
+++ trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/buildpath/MaterializeLibraryJob.java 2011-10-24 09:00:26 UTC (rev 35924)
@@ -90,7 +90,7 @@
//Finally execute post processors (needed to remove project nature, for ex.)
for (ILibraryMaterializationPostProcessor processor : getPostProcessors()) {
- processor.execute(javaProject, containerToRemovePath);
+ processor.execute(javaProject, containerToRemovePath, monitor);
}
//Refresh project
Modified: trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/internal/buildpath/LibraryMaterializationPostProcessorFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/internal/buildpath/LibraryMaterializationPostProcessorFactory.java 2011-10-24 06:56:50 UTC (rev 35923)
+++ trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/internal/buildpath/LibraryMaterializationPostProcessorFactory.java 2011-10-24 09:00:26 UTC (rev 35924)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.common.jdt.core.internal.buildpath;
import org.jboss.tools.common.jdt.core.buildpath.ILibraryMaterializationPostProcessor;
Modified: trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/internal/buildpath/MavenLibraryMaterializationPostProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/internal/buildpath/MavenLibraryMaterializationPostProcessor.java 2011-10-24 06:56:50 UTC (rev 35923)
+++ trunk/common/plugins/org.jboss.tools.common.jdt/src/org/jboss/tools/common/jdt/core/internal/buildpath/MavenLibraryMaterializationPostProcessor.java 2011-10-24 09:00:26 UTC (rev 35924)
@@ -1,26 +1,78 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.common.jdt.core.internal.buildpath;
+import java.util.ArrayList;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.jdt.core.buildpath.ILibraryMaterializationPostProcessor;
-public class MavenLibraryMaterializationPostProcessor implements ILibraryMaterializationPostProcessor {
+class MavenLibraryMaterializationPostProcessor implements ILibraryMaterializationPostProcessor {
- private static final String MAVEN_NATURE_ID = "org.eclipse.m2e.core.maven2Nature";
-
- public boolean applies(IJavaProject javaProject, IPath containerPath) throws CoreException {
- boolean applies = javaProject != null && javaProject.getProject().hasNature(MAVEN_NATURE_ID)
- && ("org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER".equals(containerPath.toPortableString()));
- return applies;
- }
-
- public void execute(IJavaProject javaProject, IPath containerPath) throws CoreException {
- if (applies(javaProject, containerPath)) {
- System.err.println("Removing "+ MAVEN_NATURE_ID + " from "+ javaProject.getProject().getName());
- EclipseUtil.removeNatureFromProject(javaProject.getProject(), MAVEN_NATURE_ID);
- }
- }
+ private static final String MAVEN_NATURE_ID = "org.eclipse.m2e.core.maven2Nature";
+ public boolean applies(IJavaProject javaProject, IPath containerPath) throws CoreException {
+ boolean applies = javaProject != null
+ && javaProject.getProject().hasNature(MAVEN_NATURE_ID)
+ && ("org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
+ .equals(containerPath.toPortableString()));
+ return applies;
+ }
+
+ public void execute(IJavaProject javaProject, IPath containerPath,
+ IProgressMonitor monitor) throws CoreException {
+ if (applies(javaProject, containerPath)) {
+ removeExclusionPatterns(javaProject, monitor);
+ EclipseUtil.removeNatureFromProject(javaProject.getProject(), MAVEN_NATURE_ID);
+ }
+ }
+
+ private void removeExclusionPatterns(IJavaProject javaProject, IProgressMonitor monitor) throws JavaModelException {
+ IClasspathEntry[] entries = javaProject.getRawClasspath();
+ ArrayList<IClasspathEntry> newEntriesList = new ArrayList<IClasspathEntry>(entries.length);
+ for (IClasspathEntry entry : entries) {
+ if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+ IPath[] newExclusionPatterns = getExclusionPatterns(entry.getExclusionPatterns());
+ IClasspathEntry newEntry = JavaCore.newSourceEntry( entry.getPath(),
+ entry.getInclusionPatterns(),
+ newExclusionPatterns,
+ entry.getOutputLocation(),
+ entry.getExtraAttributes());
+ newEntriesList.add(newEntry);
+ } else {
+ newEntriesList.add(entry);
+ }
+ }
+
+ IClasspathEntry[] newEntries = new IClasspathEntry[newEntriesList.size()];
+ newEntriesList.toArray(newEntries);
+ javaProject.setRawClasspath(newEntries, monitor);
+ }
+
+ private IPath[] getExclusionPatterns(IPath[] existingPatterns ) {
+ ArrayList<IPath> exclusionPatterns = new ArrayList<IPath>(existingPatterns.length);
+ for (IPath p : existingPatterns) {
+ if (!"**".equals(p.toPortableString())) {
+ exclusionPatterns.add(p);
+ }
+ }
+ IPath[] newExclusionPatterns = new IPath[exclusionPatterns.size()];
+ exclusionPatterns.toArray(newExclusionPatterns);
+ return newExclusionPatterns;
+ }
}
13 years, 2 months
JBoss Tools SVN: r35923 - trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-10-24 02:56:50 -0400 (Mon, 24 Oct 2011)
New Revision: 35923
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main/module.xml
Log:
JBIDE-9998
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main/module.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main/module.xml 2011-10-22 10:46:27 UTC (rev 35922)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/modules/org/jboss/tools/forge/runtime/ext/main/module.xml 2011-10-24 06:56:50 UTC (rev 35923)
@@ -7,7 +7,8 @@
</resources>
<dependencies>
- <module name="org.jboss.forge.shell-api"/>
+ <module name="org.jboss.forge.shell.api" optional="true" />
+ <module name="org.jboss.forge.shell-api" optional="true" />
<module name="javax.api"/>
</dependencies>
13 years, 2 months
JBoss Tools SVN: r35922 - workspace/snjeza/portlet-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-22 06:46:27 -0400 (Sat, 22 Oct 2011)
New Revision: 35922
Modified:
workspace/snjeza/portlet-examples/testseamportlet.zip
Log:
JBIDE-9013 Cannot deploy Seam Portlet Example to JBoss EPP 4.3
Modified: workspace/snjeza/portlet-examples/testseamportlet.zip
===================================================================
(Binary files differ)
13 years, 2 months
JBoss Tools SVN: r35921 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-10-21 22:59:44 -0400 (Fri, 21 Oct 2011)
New Revision: 35921
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BuiltInBeanInjectionTest.java
Log:
It is necessary now to get new reference to cdiProject. I do not know why.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BuiltInBeanInjectionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BuiltInBeanInjectionTest.java 2011-10-22 02:58:59 UTC (rev 35920)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BuiltInBeanInjectionTest.java 2011-10-22 02:59:44 UTC (rev 35921)
@@ -16,6 +16,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IBuiltInBean;
import org.jboss.tools.cdi.core.IClassBean;
@@ -132,6 +133,7 @@
* that is visible to our model, our built-in bean is replaced by it.
*/
public void testBuiltInConversationBeanCustomImplementation() throws CoreException {
+ cdiProject = CDICorePlugin.getCDIProject(tckProject, false);
String c = "JavaSource/org/jboss/jsr299/tck/tests/jbt/builtin/ConversationImpl.java";
String c_active = "JavaSource/org/jboss/jsr299/tck/tests/jbt/builtin/ConversationImpl.changed";
String c_original = "JavaSource/org/jboss/jsr299/tck/tests/jbt/builtin/ConversationImpl.original";
13 years, 2 months
JBoss Tools SVN: r35920 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-10-21 22:58:59 -0400 (Fri, 21 Oct 2011)
New Revision: 35920
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolvedTypesCacheTest.java
Log:
It is necessary now to get new reference to cdiProject. I do not know why.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolvedTypesCacheTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolvedTypesCacheTest.java 2011-10-22 00:41:10 UTC (rev 35919)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolvedTypesCacheTest.java 2011-10-22 02:58:59 UTC (rev 35920)
@@ -21,6 +21,7 @@
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPointField;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
@@ -56,6 +57,7 @@
static String PATH_C = "JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/cache/C.java";
public void testCache() throws CoreException, IOException {
+ cdiProject = CDICorePlugin.getCDIProject(tckProject, false);
IJavaProject javaProject = EclipseResourceUtil.getJavaProject(tckProject);
IType t = EclipseJavaUtil.findType(javaProject, "org.jboss.jsr299.tck.tests.jbt.resolution.cache.A");
assertEquals("org.jboss.jsr299.tck.tests.jbt.resolution.cache.C.D", EclipseJavaUtil.resolveType(t, "B.D"));
13 years, 2 months
JBoss Tools SVN: r35919 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common: meta/impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-10-21 20:41:10 -0400 (Fri, 21 Oct 2011)
New Revision: 35919
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/XModelEntity.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XChildrenImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectLoaderUtil.java
Log:
JBIDE-9917
https://issues.jboss.org/browse/JBIDE-9917
XModelEntityImpl.getRequiredChildren() is reimplemented.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/XModelEntity.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/XModelEntity.java 2011-10-22 00:29:49 UTC (rev 35918)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/XModelEntity.java 2011-10-22 00:41:10 UTC (rev 35919)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.common.meta;
+import java.util.Set;
+
import org.jboss.tools.common.meta.action.XActionList;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.loaders.XObjectLoader;
@@ -46,7 +48,7 @@
public int getPropertyIndex(String name, boolean register);
public int getPropertyCount();
public String getChildByXML(String xmlname);
- public java.util.HashSet<String> getRequiredChildren();
+ public Set<String> getRequiredChildren();
public String testImplementation();
public String testLoader();
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XChildrenImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XChildrenImpl.java 2011-10-22 00:29:49 UTC (rev 35918)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XChildrenImpl.java 2011-10-22 00:41:10 UTC (rev 35919)
@@ -11,12 +11,14 @@
package org.jboss.tools.common.meta.impl;
import java.util.*;
+
import org.w3c.dom.*;
import org.jboss.tools.common.meta.*;
public class XChildrenImpl implements XMetaDataConstants {
protected XChild[] children = new XChild[0];
protected HashMap<String,XChild> children_map = new HashMap<String,XChild>(10);
+ private Set<String> requiredChildren = new HashSet<String>();
public XChildrenImpl() {}
@@ -28,6 +30,15 @@
return children;
}
+ /**
+ * Returns copy of set with names of required child entities.
+ *
+ * @return
+ */
+ public Set<String> getRequiredChildren() {
+ return (requiredChildren.isEmpty()) ? Collections.<String>emptySet() : new HashSet<String>(requiredChildren);
+ }
+
public void load(Element el) {
Element p = XMetaDataLoader.getUniqueChild(el, XMODEL_CHILDREN);
if(p == null) return;
@@ -38,6 +49,9 @@
m.load(es[i]);
children_map.put(m.getName(), m);
c.add(m);
+ if(m.getMaxCount() == 1 && m.isRequired()) {
+ requiredChildren.add(m.getName());
+ }
}
children = c.toArray(new XChild[0]);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java 2011-10-22 00:29:49 UTC (rev 35918)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java 2011-10-22 00:41:10 UTC (rev 35919)
@@ -372,24 +372,10 @@
return xmlmap.getProperty(xmlname);
}
- private HashSet<String> requiredchildren = null;
- private boolean requiredloaded = false;
-
- public java.util.HashSet<String> getRequiredChildren() {
- if(!requiredloaded) {
- XChild[] cs = children.getChildren();
- requiredchildren = new HashSet<String>(cs.length);
- for (int i = 0; i < cs.length; i++) {
- boolean required = (cs[i].getMaxCount() == 1 && cs[i].isRequired());
- if(required) requiredchildren.add(cs[i].getName());
- }
- if(requiredchildren.size() == 0) requiredchildren = null;
- requiredloaded = true;
- }
- return (requiredchildren == null) ? null : (HashSet<String>)requiredchildren.clone();
+ public Set<String> getRequiredChildren() {
+ return children.getRequiredChildren();
}
-
/**
* FIXME Move to ModelTest plugin
*/
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectLoaderUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectLoaderUtil.java 2011-10-22 00:29:49 UTC (rev 35918)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectLoaderUtil.java 2011-10-22 00:41:10 UTC (rev 35919)
@@ -306,7 +306,7 @@
public void loadChildren(Element element, XModelObject o) {
XModelEntity entity = o.getModelEntity();
XModel model = o.getModel();
- HashSet<String> childset = entity.getRequiredChildren();
+ Set<String> childset = entity.getRequiredChildren();
NodeList nl = element.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node n = nl.item(i);
@@ -351,12 +351,14 @@
}
continue;
}
- if(childset != null) childset.remove(en);
+ if(childset.contains(en)) {
+ childset.remove(en);
+ }
}
- if(childset != null && childset.size() > 0) {
- String[] ens = childset.toArray(new String[childset.size()]);
- for (int i = 0; i < ens.length; i++)
- o.addChild(createValidObject(model, ens[i]));
+ if(!childset.isEmpty()) { //in most cases the set is empty and this check is faster than creating an iterator.
+ for (String en: childset) {
+ o.addChild(createValidObject(model, en));
+ }
}
}
13 years, 2 months
JBoss Tools SVN: r35917 - in trunk/cdi/tests: org.jboss.tools.cdi.core.test/projects/tck and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-10-21 19:56:04 -0400 (Fri, 21 Oct 2011)
New Revision: 35917
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSetup.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELProposalFilteringTest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9952 CDI validator should validate resource in the context of its project
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/.classpath 2011-10-21 23:56:04 UTC (rev 35917)
@@ -13,5 +13,6 @@
<attribute name="owner.project.facets" value="jst.java"/>
</attributes>
</classpathentry>
+ <classpathentry combineaccessrules="false" kind="src" path="/tck-parent"/>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
</classpath>
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath 2011-10-21 23:56:04 UTC (rev 35917)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/tck"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project 2011-10-21 23:56:04 UTC (rev 35917)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tck-child</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml 2011-10-21 23:56:04 UTC (rev 35917)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd"/>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-child/src/META-INF/beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath 2011-10-21 23:56:04 UTC (rev 35917)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project 2011-10-21 23:56:04 UTC (rev 35917)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tck-parent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml 2011-10-21 23:56:04 UTC (rev 35917)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd"/>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck-parent/src/META-INF/beans.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2011-10-21 23:56:04 UTC (rev 35917)
@@ -82,6 +82,7 @@
suiteAll.addTestSuite(CDIImagesTest.class);
suiteAll.addTestSuite(TypeTest.class);
TestSuite suite = new TestSuite("TCK Tests");
+ // TCK project tests
suite.addTestSuite(ResolutionByNameTest.class);
suite.addTestSuite(BeanDefinitionTest.class);
suite.addTestSuite(NameDefinitionTest.class);
@@ -127,6 +128,9 @@
// Refactoring test
suite.addTestSuite(NamedBeanRefactoringTest.class);
+ suiteAll.addTestSuite(DisableCDISupportTest.class); // This test removes tck test projects. It's better to run it after all main TCK tests.
+
+ // Not TCK tests
suiteAll.addTestSuite(TwoWebContentFoldersTest.class);
suiteAll.addTestSuite(RemoveJarFromClasspathTest.class);
suiteAll.addTestSuite(ExtensionFactoryTest.class);
@@ -150,8 +154,6 @@
new String[]{"CDITestBrokenBuilderOrder"});
suiteAll.addTest(testSetup);
- suiteAll.addTestSuite(DisableCDISupportTest.class);
-
suiteAll.addTestSuite(ValidationExceptionTest.class); // This test should be added last!
return suiteAll;
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSetup.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSetup.java 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreTestSetup.java 2011-10-21 23:56:04 UTC (rev 35917)
@@ -15,7 +15,6 @@
import org.eclipse.core.resources.IProject;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
-import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
/**
@@ -24,22 +23,32 @@
public class CDICoreTestSetup extends TestSetup {
protected IProject tckProject;
+ protected IProject[] projects;
public CDICoreTestSetup(Test test) {
super(test);
}
+ /*
+ * (non-Javadoc)
+ * @see junit.extensions.TestSetup#setUp()
+ */
@Override
protected void setUp() throws Exception {
- tckProject = TCKTest.importPreparedProject("/");
+ projects = TCKTest.importPreparedProjects();
+ tckProject = projects[1];
}
+ /*
+ * (non-Javadoc)
+ * @see junit.extensions.TestSetup#tearDown()
+ */
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- JobUtils.waitForIdle();
- tckProject.delete(true, true, null);
- JobUtils.waitForIdle();
+ for (IProject project : projects) {
+ project.delete(true, true, null);
+ }
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2011-10-21 23:56:04 UTC (rev 35917)
@@ -2,8 +2,10 @@
import java.io.File;
import java.io.FileFilter;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Set;
import junit.framework.TestCase;
@@ -46,8 +48,10 @@
public class TCKTest extends TestCase {
protected final static String PLUGIN_ID = "org.jboss.tools.cdi.core.test";
- public final static String PROJECT_NAME = "tck";
- protected final static String PROJECT_PATH = "/projects/tck";
+ public final static String MAIN_PROJECT_NAME = "tck";
+ public final static String[] PROJECT_NAMES = {"tck-parent", MAIN_PROJECT_NAME, "tck-child"};
+ private final static String MAIN_PROJECT_PATH = "/projects/tck";
+ private final static String[] PROJECT_PATHS = {"/projects/tck-parent", MAIN_PROJECT_PATH, "/projects/tck-child"};
public final static String JAVA_SOURCE_SUFFIX = "/JavaSource";
public final static String WEB_CONTENT_SUFFIX = "/WebContent";
@@ -61,13 +65,23 @@
protected static String TCK_RESOURCES_PREFIX = "/resources/tck";
protected IProject tckProject;
+ protected IProject rootProject;
+ protected IProject parentProject;
protected ICDIProject cdiProject;
public TCKTest() {
tckProject = getTestProject();
+ parentProject = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAMES[0]);
+ rootProject = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAMES[2]);
cdiProject = CDICorePlugin.getCDIProject(tckProject, false);
}
+ protected void deleteTestProject() throws Exception {
+ rootProject.delete(true, true, null);
+ tckProject.delete(true, true, null);
+ parentProject.delete(true, true, null);
+ }
+
public IProject getTestProject() {
if(tckProject==null) {
try {
@@ -92,19 +106,37 @@
}
public static IProject findTestProject() {
- return ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(MAIN_PROJECT_NAME);
}
+ public static IProject[] importPreparedProjects() throws Exception {
+ List<IProject> projects = new ArrayList<IProject>();
+ importPreparedProject("/");
+ for (String name : PROJECT_NAMES) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ assertTrue(project.exists());
+ projects.add(project);
+ }
+ return projects.toArray(new IProject[projects.size()]);
+ }
+
public static IProject importPreparedProject(String packPath) throws Exception {
Bundle b = Platform.getBundle(PLUGIN_ID);
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
- if(!project.exists()) {
- project = ResourcesUtils.importProject(b, PROJECT_PATH);
- project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ IProject tckP = ResourcesPlugin.getWorkspace().getRoot().getProject(MAIN_PROJECT_NAME);
+ if(!tckP.exists()) {
+ for (String name : PROJECT_NAMES) {
+ IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ assertFalse("Error during importing TCK Project. Project " + p.getName() + " already exists.", p.exists());
+ }
+
+ for (String path : PROJECT_PATHS) {
+ IProject project = ResourcesUtils.importProject(b, path);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ }
}
- String projectPath = project.getLocation().toOSString();
+ String projectPath = tckP.getLocation().toOSString();
String resourcePath = FileLocator.resolve(b.getEntry(TCK_RESOURCES_PREFIX)).getFile();
-
+
File from = new File(resourcePath + packPath);
if(from.isDirectory()) {
File javaSourceTo = new File(projectPath + JAVA_SOURCE_SUFFIX + PACKAGE + packPath);
@@ -116,10 +148,10 @@
File webInfTo = new File(projectPath + WEB_CONTENT_SUFFIX + WEB_INF_SUFFIX);
FileUtil.copyDir(from, webInfTo, true, true, true, new XmlFileFilter());
}
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
- TestUtil._waitForValidation(project);
+ tckP.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ TestUtil._waitForValidation(tckP);
// JobUtils.waitForIdle();
- return project;
+ return tckP;
}
protected Set<IBean> getBeans(String typeName, String... qualifierNames) throws JavaModelException {
@@ -486,10 +518,11 @@
assertEquals("Wrong length", length, reference.getLength());
}
+ /*
public static void cleanProject(String _resourcePath) throws Exception {
Bundle b = Platform.getBundle(PLUGIN_ID);
String projectPath = FileLocator.resolve(b.getEntry(PROJECT_PATH)).getFile();
-
+
File javaSourceTo = new File(projectPath + JAVA_SOURCE_SUFFIX);
File[] fs = javaSourceTo.listFiles();
if(fs != null) for (int i = 0; i < fs.length; i++) {
@@ -516,4 +549,5 @@
FileUtil.remove(fs[i]);
}
}
+ */
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java 2011-10-21 23:56:04 UTC (rev 35917)
@@ -67,15 +67,17 @@
public void testAllRelatedProjectsIncluded() {
CDIProjectTree set = new CDIProjectTree(tckProject);
assertTrue("TCKProject is not included in the set of CDI projects", set.getAllProjects().contains(tckProject));
+ assertTrue("TCKProject is not included in the set of CDI projects", set.getAllProjects().contains(rootProject));
+ assertTrue("TCKProject is not included in the set of CDI projects", set.getAllProjects().contains(parentProject));
}
/**
* https://issues.jboss.org/browse/JBIDE-7961
*/
public void testValidationContext() {
- LinkCollection collection = getCoreLinks(tckProject);
+ LinkCollection collection = getCoreLinks(rootProject);
assertFalse("Validation context for CDIproject is empty", collection.isEmpty());
- collection = getCoreLinks(tckProject, "jboss.seam");
+ collection = getCoreLinks(rootProject, "jboss.seam");
assertTrue("Validation context for CDIproject with wrong ID is not empty", collection.isEmpty());
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DisableCDISupportTest.java 2011-10-21 23:56:04 UTC (rev 35917)
@@ -16,10 +16,8 @@
import org.jboss.tools.cdi.core.CDIUtil;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
-import org.jboss.tools.common.base.test.validation.TestUtil;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
-import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -35,7 +33,6 @@
@Override
protected void setUp() throws Exception {
tckProject = TCKTest.importPreparedProject("/");
- TestUtil._waitForValidation(tckProject);
}
/*
@@ -45,7 +42,7 @@
@Override
protected void tearDown() throws Exception {
boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
- tckProject.delete(true, true, null);
+ deleteTestProject();
JobUtils.waitForIdle();
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELProposalFilteringTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELProposalFilteringTest.java 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CAELProposalFilteringTest.java 2011-10-21 23:56:04 UTC (rev 35917)
@@ -41,7 +41,7 @@
}
public void setUp() {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TCKTest.PROJECT_NAME);
+ project = TCKTest.findTestProject();
caTest.setProject(project);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CATest.java 2011-10-21 23:56:04 UTC (rev 35917)
@@ -33,7 +33,7 @@
private Image[] propertyImages = new Image[] {CDIImages.BEAN_FIELD_IMAGE, CDIImages.BEAN_METHOD_IMAGE};
public void setUp() {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TCKTest.PROJECT_NAME);
+ project = TCKTest.findTestProject();
caTest.setProject(project);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java 2011-10-21 22:02:00 UTC (rev 35916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java 2011-10-21 23:56:04 UTC (rev 35917)
@@ -11,7 +11,6 @@
package org.jboss.tools.cdi.ui.test.wizard;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
@@ -19,7 +18,6 @@
import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.ui.wizard.OpenCDINamedBeanDialog;
import org.jboss.tools.cdi.ui.wizard.OpenCDINamedBeanDialog.CDINamedBeanWrapper;
-import org.jboss.tools.common.base.test.validation.TestUtil;
import org.jboss.tools.test.util.JobUtils;
/**
@@ -33,7 +31,7 @@
@Override
protected void setUp() throws Exception {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(TCKTest.PROJECT_NAME);
+ project = TCKTest.findTestProject();
}
public void testCDINamedBeanDialogSearch() throws CoreException {
13 years, 2 months
JBoss Tools SVN: r35916 - branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2011-10-21 18:02:00 -0400 (Fri, 21 Oct 2011)
New Revision: 35916
Modified:
branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-10005 ignoring modules without git repo
Modified: branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2011-10-21 21:48:06 UTC (rev 35915)
+++ branches/jbosstools-3.3.0.M4/as/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2011-10-21 22:02:00 UTC (rev 35916)
@@ -6,6 +6,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.jgit.lib.Repository;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
@@ -43,6 +44,13 @@
throws CoreException {
int state = behaviour.getServer().getModulePublishState(module);
IProject p = module[module.length-1].getProject();
+
+ Repository repository = EGitUtils.getRepository(p);
+
+ if (repository==null) {
+ return IServer.PUBLISH_STATE_UNKNOWN;
+ }
+
int changed = EGitUtils.countCommitableChanges(p, new NullProgressMonitor() );
if( changed == 0 || (kind == IServer.PUBLISH_FULL || state == IServer.PUBLISH_STATE_FULL)) {
if( changed != 0 && requestCommitAndPushApproval(module, changed)) {
13 years, 2 months
JBoss Tools SVN: r35915 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-21 17:48:06 -0400 (Fri, 21 Oct 2011)
New Revision: 35915
Modified:
trunk/build/pom-core.xml
trunk/build/pom.xml
Log:
fix swimlanes and component dependencies
Modified: trunk/build/pom-core.xml
===================================================================
--- trunk/build/pom-core.xml 2011-10-21 21:35:09 UTC (rev 35914)
+++ trunk/build/pom-core.xml 2011-10-21 21:48:06 UTC (rev 35915)
@@ -109,6 +109,7 @@
<id>as-bootstrap</id>
<modules>
<module>../tests</module>
+ <module>../common</module>
<module>../archives</module>
<module>../jmx</module>
<module>../as</module>
@@ -264,6 +265,17 @@
<id>portlet-bootstrap</id>
<modules>
<module>../tests</module>
+ <module>../jmx</module>
+ <module>../archives</module>
+ <module>../as</module>
+ <module>../hibernatetools</module>
+ <module>../common</module>
+ <module>../jst</module>
+ <module>../xulrunner</module>
+ <module>../vpe</module>
+ <module>../jsf</module>
+ <module>../usage</module>
+ <module>../seam</module>
<module>../portlet</module>
</modules>
</profile>
@@ -404,6 +416,19 @@
<id>maven-bootstrap</id>
<modules>
<module>../tests</module>
+ <module>../jmx</module>
+ <module>../archives</module>
+ <module>../as</module>
+ <module>../hibernatetools</module>
+ <module>../common</module>
+ <module>../examples</module>
+ <module>../jst</module>
+ <module>../xulrunner</module>
+ <module>../vpe</module>
+ <module>../jsf</module>
+ <module>../seam</module>
+ <module>../usage</module>
+ <module>../cdi</module>
<module>../maven</module>
</modules>
</profile>
@@ -468,6 +493,23 @@
</profile>
<profile>
+ <id>runtime-bootstrap</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>../tests</module>
+ <module>../common</module>
+ <module>../jmx</module>
+ <module>../usage</module>
+ <module>../examples</module>
+ <module>../runtime</module>
+ </modules>
+ </profile>
+ </modules>
+ </profile>
+
+ <profile>
<id>usage</id>
<activation>
<activeByDefault>true</activeByDefault>
@@ -507,6 +549,9 @@
<module>../seam</module>
<module>../portlet</module>
<module>../examples</module>
+ <module>../esb</module>
+ <module>../jbpm</module>
+ <module>../flow</module>
<module>../central</module>
</modules>
</profile>
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2011-10-21 21:35:09 UTC (rev 35914)
+++ trunk/build/pom.xml 2011-10-21 21:48:06 UTC (rev 35915)
@@ -255,6 +255,17 @@
<id>portlet-bootstrap</id>
<modules>
<module>../tests</module>
+ <module>../jmx</module>
+ <module>../archives</module>
+ <module>../as</module>
+ <module>../hibernatetools</module>
+ <module>../common</module>
+ <module>../jst</module>
+ <module>../xulrunner</module>
+ <module>../vpe</module>
+ <module>../jsf</module>
+ <module>../usage</module>
+ <module>../seam</module>
<module>../portlet</module>
</modules>
</profile>
@@ -478,6 +489,19 @@
<id>maven-bootstrap</id>
<modules>
<module>../tests</module>
+ <module>../jmx</module>
+ <module>../archives</module>
+ <module>../as</module>
+ <module>../hibernatetools</module>
+ <module>../common</module>
+ <module>../examples</module>
+ <module>../jst</module>
+ <module>../xulrunner</module>
+ <module>../vpe</module>
+ <module>../jsf</module>
+ <module>../seam</module>
+ <module>../usage</module>
+ <module>../cdi</module>
<module>../maven</module>
</modules>
</profile>
@@ -597,6 +621,21 @@
</profile>
<profile>
+ <id>runtime-bootstrap</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>../tests</module>
+ <module>../common</module>
+ <module>../jmx</module>
+ <module>../usage</module>
+ <module>../examples</module>
+ <module>../runtime</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>richfaces</id>
<activation>
<activeByDefault>false</activeByDefault>
13 years, 2 months