JBoss Tools SVN: r43120 - in trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core: util/internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-21 05:30:10 -0400 (Tue, 21 Aug 2012)
New Revision: 43120
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
Log:
JBIDE-12280 to trunk
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2012-08-21 09:09:07 UTC (rev 43119)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2012-08-21 09:30:10 UTC (rev 43120)
@@ -314,7 +314,7 @@
for( int j = 0; j < matchingFilesets.length; j++ ) {
IStatus[] errors2 = ModelTruezipBridge.deleteFiles(
matchingFilesets[j], matchingFilesets[j].getMatches(globalPath),
- new NullProgressMonitor(), true);
+ new NullProgressMonitor(), false);
errors.addAll(Arrays.asList(errors2));
if( !seen.contains(matchingFilesets[j])) {
seen.add(matchingFilesets[j]);
@@ -343,7 +343,7 @@
}
IStatus[] errors2 = ModelTruezipBridge.copyFiles(matchingFilesets[j],
matchingFilesets[j].getMatches(globalPath),
- new NullProgressMonitor(), true, true);
+ new NullProgressMonitor(), true, false);
errors.addAll(Arrays.asList(errors2));
}
EventManager.fileUpdated(path, matchingFilesets);
@@ -351,6 +351,7 @@
}
+ // NOW do the synch
TrueZipUtil.sync();
Comparator c = new Comparator() {
public int compare(Object o1, Object o2) {
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2012-08-21 09:09:07 UTC (rev 43119)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2012-08-21 09:30:10 UTC (rev 43120)
@@ -141,9 +141,11 @@
public static boolean updateParentTimestamps(IPath path) {
return updateParentTimestamps(getFile(path));
}
+
+ // Update only the PARENT timestamps.
public static boolean updateParentTimestamps(de.schlichtherle.io.File file) {
long time = System.currentTimeMillis();
- de.schlichtherle.io.File parent = file;
+ de.schlichtherle.io.File parent = (de.schlichtherle.io.File)file.getParentFile();
boolean b = true;
while( parent != null ) {
b &= parent.setLastModified(time);
13 years, 7 months
JBoss Tools SVN: r43119 - 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: 2012-08-21 05:09:07 -0400 (Tue, 21 Aug 2012)
New Revision: 43119
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/WizardTest.java
Log:
modificiation to ensure wizards test order
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/WizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/WizardTest.java 2012-08-21 00:18:06 UTC (rev 43118)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/WizardTest.java 2012-08-21 09:09:07 UTC (rev 43119)
@@ -47,7 +47,19 @@
}
@Test
- public void testQualifier() {
+ public void testComponentsWizards() {
+ testQualifier();
+ testScope();
+ testIBinding();
+ testStereotype();
+ testDecorator();
+ testInterceptor();
+ testBeansXml();
+ testBean();
+ testAnnLiteral();
+ }
+
+ private void testQualifier() {
wizardExt.qualifier(getPackageName(), "Q1", false, false).finish();
util.waitForNonIgnoredJobs();
SWTBotEditor ed = new SWTWorkbenchBot().activeEditor();
@@ -73,8 +85,7 @@
assertTrue(code.startsWith("/**"));
}
- @Test
- public void testScope() {
+ private void testScope() {
wizardExt.scope(getPackageName(), "Scope1", true, false, true, false).finish();
util.waitForNonIgnoredJobs();
SWTBotEditor ed = new SWTWorkbenchBot().activeEditor();
@@ -116,8 +127,7 @@
assertTrue(code.startsWith("/**"));
}
- @Test
- public void testIBinding() {
+ private void testIBinding() {
CDIWizardBase w = wizardExt.binding(getPackageName(), "B1", null, true, false);
assertEquals(2, w.getTargets().size());
w.finish();
@@ -172,8 +182,7 @@
assertTrue(code.contains("@B2"));
}
- @Test
- public void testStereotype() {
+ private void testStereotype() {
CDIWizardBase w = wizardExt.stereotype(getPackageName(), "S1", null, null, false, false, false, false,
false);
assertEquals(9, w.getScopes().size());
@@ -229,8 +238,7 @@
assertFalse(code.startsWith("/**"));
}
- @Test
- public void testDecorator() {
+ private void testDecorator() {
bot.sleep(Timing.time1S());
CDIWizardBase w = wizardExt.decorator(getPackageName(), "", "java.lang.Comparable", null, true, true, false, false);
w.finish();
@@ -265,8 +273,7 @@
assertTrue(code.startsWith("/**"));
}
- @Test
- public void testInterceptor() {
+ private void testInterceptor() {
CDIWizardBase w = wizardExt.interceptor(getPackageName(), "I1", "B2", null, null, false);
w.finish();
util.waitForNonIgnoredJobs();
@@ -297,8 +304,7 @@
assertTrue(code.contains("extends Date"));
}
- @Test
- public void testBeansXml() {
+ private void testBeansXml() {
CDIWizardBase w = new NewCDIFileWizard(CDIWizardType.BEANS_XML).run();
w.setSourceFolder(getProjectName() + "/WebContent/WEB-INF");
assertFalse(w.canFinish());
@@ -310,8 +316,7 @@
w.cancel();
}
- @Test
- public void testBean() {
+ private void testBean() {
CDIWizardBase w = wizardExt.bean(getPackageName(), "Bean1", true, true, false, false, false, false, null, null, null, null);
w.finish();
util.waitForNonIgnoredJobs();
@@ -355,8 +360,7 @@
assertTrue(code.startsWith("/**"));
}
- @Test
- public void testAnnLiteral() {
+ private void testAnnLiteral() {
CDIWizardBase w = wizardExt.annLiteral(getPackageName(), "AnnL1", true, false, true, false, getPackageName() + ".Q1");
w.finish();
util.waitForNonIgnoredJobs();
13 years, 7 months
JBoss Tools SVN: r43118 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-20 20:18:06 -0400 (Mon, 20 Aug 2012)
New Revision: 43118
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/ParametedType.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/ParametedTypeFactory.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/TypeDeclaration.java
Log:
JBIDE-12417
https://issues.jboss.org/browse/JBIDE-12417
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/ParametedType.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/ParametedType.java 2012-08-20 20:15:07 UTC (rev 43117)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/ParametedType.java 2012-08-21 00:18:06 UTC (rev 43118)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.java;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -33,7 +34,7 @@
public class ParametedType implements IParametedType {
protected ParametedTypeFactory typeFactory = null;
protected IType type;
- protected String arrayPrefix = ""; //$NON-NLS-1$
+ protected int arrayIndex = 0;
protected String signature;
protected List<ParametedType> parameterTypes = new ArrayList<ParametedType>();
protected boolean primitive;
@@ -103,10 +104,24 @@
return type;
}
+ public int getArrayIndex() {
+ return arrayIndex;
+ }
+
public String getArrayPrefix() {
- return arrayPrefix;
+ return toArrayPrefix(arrayIndex);
}
+ static String[] PREFIXES = new String[4];
+ static {
+ PREFIXES[0] = ""; //$NON-NLS-1$
+ for (int i = 1; i < PREFIXES.length; i++) PREFIXES[i] = PREFIXES[i - 1] + Signature.C_ARRAY;
+ }
+
+ private static String toArrayPrefix(int arrayIndex) {
+ return arrayIndex < PREFIXES.length ? PREFIXES[arrayIndex] : PREFIXES[3] + toArrayPrefix(arrayIndex - 3);
+ }
+
public String getSignature() {
return signature;
}
@@ -117,11 +132,9 @@
public void setSignature(String signature) {
this.signature = signature;
- arrayPrefix = ""; //$NON-NLS-1$
+ arrayIndex = 0;
if(signature != null) {
- for (int i = 0; i < signature.length(); i++) {
- if(signature.charAt(i) == Signature.C_ARRAY) arrayPrefix += Signature.C_ARRAY; else break;
- }
+ for (; arrayIndex < signature.length() && (signature.charAt(arrayIndex) == Signature.C_ARRAY); arrayIndex++) {}
}
}
@@ -154,7 +167,7 @@
return false;
}
}
- if(!arrayPrefix.equals(other.arrayPrefix)) {
+ if(arrayIndex != other.arrayIndex) {
return false;
}
@@ -170,14 +183,14 @@
boolean objectArray = false;
if(sc != null) {
sc = resolveParameters(sc);
- } else if(!"java.lang.Object".equals(type.getFullyQualifiedName())) {
+ } else if(!"java.lang.Object".equals(type.getFullyQualifiedName())) { //$NON-NLS-1$
sc = ParametedTypeFactory.OBJECT;
- } else if("java.lang.Object".equals(type.getFullyQualifiedName()) && arrayPrefix.length() > 0) {
+ } else if("java.lang.Object".equals(type.getFullyQualifiedName()) && arrayIndex > 0) { //$NON-NLS-1$
objectArray = true;
sc = ParametedTypeFactory.OBJECT;
}
- if(!objectArray && arrayPrefix.length() > 0) {
- sc = arrayPrefix + sc;
+ if(!objectArray && arrayIndex > 0) {
+ sc = getArrayPrefix() + sc;
}
superType = getFactory().getParametedType(type, this, sc);
@@ -196,7 +209,7 @@
String[] is = type.getSuperInterfaceTypeSignatures();
if(is != null) for (int i = 0; i < is.length; i++) {
String p = resolveParameters(is[i]);
- if(arrayPrefix.length() > 0) p = arrayPrefix + p;
+ if(arrayIndex > 0) p = getArrayPrefix() + p;
ParametedType t = getFactory().getParametedType(type, this, p);
if(t != null) {
if(provider != null) {
@@ -304,7 +317,7 @@
return parametersBySignature.get(signature);
}
- public Set<IParametedType> getAllTypes() {
+ public Collection<IParametedType> getAllTypes() {
if(allInheritedTypes == null) {
allInheritedTypes = buildAllTypes(new HashSet<String>(), this, new HashSet<IParametedType>());
}
@@ -328,7 +341,7 @@
}
public String toString() {
- return signature + ":" + super.toString();
+ return signature + ":" + super.toString(); //$NON-NLS-1$
}
public boolean isAssignableTo(ParametedType other, boolean checkInheritance) {
@@ -337,7 +350,7 @@
boolean isAssignableTo(ParametedType other, boolean checkInheritance, Map<String,IType> resolvedVars) {
if(equals(other)) return true;
- if("*".equals(other.getSignature())) {
+ if("*".equals(other.getSignature())) { //$NON-NLS-1$
return true;
}
if(this.type == null) {
@@ -413,7 +426,7 @@
public String getSimpleName() {
if(getSignature()!=null) {
if(isPrimitive()) {
- int array = arrayPrefix.length();
+ int array = arrayIndex;
StringBuilder result = new StringBuilder(primitives.get(Signature.getSignatureSimpleName(getSignature().substring(array))));
if(array > 0) {
for (int i = 0; i < array; i++) {
@@ -425,6 +438,6 @@
return Signature.getSignatureSimpleName(getSignature());
}
}
- return "";
+ return ""; //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/ParametedTypeFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/ParametedTypeFactory.java 2012-08-20 20:15:07 UTC (rev 43117)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/ParametedTypeFactory.java 2012-08-21 00:18:06 UTC (rev 43118)
@@ -95,7 +95,7 @@
result.setFactory(this);
result.setSignature(typeSignature);
- typeSignature = typeSignature.substring(result.getArrayPrefix().length());
+ typeSignature = typeSignature.substring(result.getArrayIndex());
char c = typeSignature.length() == 0 ? '\0' : typeSignature.charAt(0);
if(primitives.containsKey(c) && typeSignature.length() == 1) {
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/TypeDeclaration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/TypeDeclaration.java 2012-08-20 20:15:07 UTC (rev 43117)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/java/TypeDeclaration.java 2012-08-21 00:18:06 UTC (rev 43118)
@@ -25,7 +25,7 @@
public TypeDeclaration(ParametedType type, IResource resource, int startPosition, int length) {
this.setFactory(type.getFactory());
this.type = type.getType();
- arrayPrefix = type.arrayPrefix;
+ arrayIndex = type.arrayIndex;
this.resource = resource;
this.length = length;
this.startPosition = startPosition;
13 years, 7 months
JBoss Tools SVN: r43117 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-08-20 16:15:07 -0400 (Mon, 20 Aug 2012)
New Revision: 43117
Modified:
trunk/build/parent/pom.xml
Log:
https://issues.jboss.org/browse/JBIDE-12438 default profile is not activated by default on mac os
added target platform repository to osx profile
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-08-20 15:32:51 UTC (rev 43116)
+++ trunk/build/parent/pom.xml 2012-08-20 20:15:07 UTC (rev 43117)
@@ -616,6 +616,20 @@
<!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
<platformSystemProperties> -d32 -Dosgi.arch=x86 -XstartOnFirstThread </platformSystemProperties>
</properties>
+ <!-- This is required to have it working by default under mac osx for swtbot tests -->
+ <repositories>
+ <repository>
+ <id>jbosstools-target-site</id>
+ <url>${jbosstools-target-site}</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
</profile>
<profile>
@@ -785,8 +799,6 @@
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
- <!-- Single repo containing contents of unified.target, but without using
- the target file -->
<repository>
<id>jbosstools-target-site</id>
<url>${jbosstools-target-site}</url>
13 years, 7 months
JBoss Tools SVN: r43116 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-08-20 11:32:51 -0400 (Mon, 20 Aug 2012)
New Revision: 43116
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
Log:
Fix error made by previous commit.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2012-08-20 14:44:20 UTC (rev 43115)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2012-08-20 15:32:51 UTC (rev 43116)
@@ -23,7 +23,8 @@
org.jboss.tools.ui.bot.ext.types,
org.jboss.tools.ui.bot.ext.view,
org.jboss.tools.ui.bot.ext.widgets,
- org.jboss.tools.ui.bot.ext.wizards
+ org.jboss.tools.ui.bot.ext.wizards,
+ org.jboss.tools.ui.bot.ext.zest
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
@@ -41,6 +42,8 @@
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.core.resources;bundle-version="3.5.0",
org.eclipse.draw2d;bundle-version="3.6.1",
+ org.eclipse.zest.core;bundle-version="1.2.0",
+ org.eclipse.zest.layouts;bundle-version="1.1.0",
org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.0.0",
org.eclipse.gef;bundle-version="3.6.1",
org.eclipse.ui,
13 years, 7 months
JBoss Tools SVN: r43115 - in trunk/forge/tests/org.jboss.tools.forge.ui.bot.test: resources/properties and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2012-08-20 10:44:20 -0400 (Mon, 20 Aug 2012)
New Revision: 43115
Modified:
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/pom.xml
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/resources/properties/swtbot.properties
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java
Log:
* @Require server added
Modified: trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/pom.xml
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/pom.xml 2012-08-20 14:43:52 UTC (rev 43114)
+++ trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/pom.xml 2012-08-20 14:44:20 UTC (rev 43115)
@@ -14,7 +14,7 @@
<properties>
<jbosstools.test.jboss-as.home>${requirementsDirectory}/jboss-as-7.1.1.Final</jbosstools.test.jboss-as.home>
<additionalSystemProperties></additionalSystemProperties>
- <systemProperties>${additionalSystemProperties} -Dtest.configurations.dir=resources/properties -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home}</systemProperties>
+ <systemProperties>${additionalSystemProperties} -DJAVA_HOME=${JAVA_HOME} -Dtest.configurations.dir=resources/properties -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home}</systemProperties>
</properties>
<profiles>
Modified: trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/resources/properties/swtbot.properties
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/resources/properties/swtbot.properties 2012-08-20 14:43:52 UTC (rev 43114)
+++ trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/resources/properties/swtbot.properties 2012-08-20 14:44:20 UTC (rev 43115)
@@ -3,9 +3,10 @@
# <java version>,<jre/jdk home>
# JAVA=1.6,/usr/java/jdk1.6.0_25/jre
# JAVA=1.6,${JAVA_HOME}
+JAVA=1.x,${JAVA_HOME}
#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>
# note : when server is type of SOA, version is version of SOA (not the bundled EAP)
-SERVER=AS,7.0,default,${jbosstools.test.jboss-as.home}
+SERVER=AS,7.1,1.x,${jbosstools.test.jboss-as.home}
#<seam version>,<seam runtime home>
#SEAM=2.2,/opt/jbdevstudio4.1.1.GA/jboss-eap/seam
#<esb versoin>,<esb runtime home>
Modified: trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java 2012-08-20 14:43:52 UTC (rev 43114)
+++ trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java 2012-08-20 14:44:20 UTC (rev 43115)
@@ -1,7 +1,6 @@
package org.jboss.tools.forge.ui.bot.test.suite;
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
-
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
@@ -10,16 +9,21 @@
import org.jboss.tools.forge.ui.bot.test.util.ConsoleUtils;
import org.jboss.tools.forge.ui.bot.test.util.ViewUtils;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
/**
*
* @author psrna
*
*/
+@Require(server = @Server(type = ServerType.ALL, state = ServerState.Present))
public class ForgeTest extends SWTTestExt {
protected static final String PROJECT_NAME = "testproject";
@@ -164,6 +168,7 @@
}
public static void startForge(){
+ log.info("Trying to start forge...");
if(!isForgeViewActive())
openForgeView();
@@ -175,7 +180,7 @@
//not working with juno ^^^
//workaround:
ViewUtils.getToolbarButton("Start the default Forge runtime").click();
-
+
util.waitForNonIgnoredJobs();
}
13 years, 7 months
JBoss Tools SVN: r43113 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: psuchy
Date: 2012-08-20 10:04:34 -0400 (Mon, 20 Aug 2012)
New Revision: 43113
Modified:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java
Log:
Modified: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java 2012-08-20 13:53:22 UTC (rev 43112)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.java 2012-08-20 14:04:34 UTC (rev 43113)
@@ -14,8 +14,8 @@
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
- //DetectJBoss7.class,
- //OperateJBoss7.class,
+ DetectJBoss7.class,
+ OperateJBoss7.class,
DetectSeam22.class,
CheckSeam22.class,
DetectSeam23.class,
13 years, 7 months
JBoss Tools SVN: r43112 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2012-08-20 09:53:22 -0400 (Mon, 20 Aug 2012)
New Revision: 43112
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaProject.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java
Log:
https://issues.jboss.org/browse/JBIDE-9535
Update logic of getting default schema/catalog
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaProject.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaProject.java 2012-08-20 13:38:35 UTC (rev 43111)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaProject.java 2012-08-20 13:53:22 UTC (rev 43112)
@@ -83,41 +83,75 @@
return null;
}
+ /*
+ * The sequence is(from biggest priority to lowest):
+ * 1) Configuration.getProperty() (if cc.hasConfiguration())
+ * 2) ConsoleConfiguration.getPreference().getProperty()-uses hibernate.properties
+ * 3) JpaProject user overrides
+ * 4) persistence.xml
+ * 5) logic from superclass
+ */
@Override
public String getDefaultSchema() {
+ String schema = null;
ConsoleConfiguration cc = getDefaultConsoleConfiguration();
if (cc != null){
+ if (cc.hasConfiguration()){//was not build yet
+ Configuration configuration = cc.getConfiguration();
+ if (configuration.getProperties().containsKey(Environment.DEFAULT_SCHEMA)){
+ schema = configuration.getProperty(Environment.DEFAULT_SCHEMA);
+ }
+ }
Properties properties = cc.getPreferences().getProperties();
if (properties != null && properties.containsKey(Environment.DEFAULT_SCHEMA)){
- return properties.getProperty(Environment.DEFAULT_SCHEMA);
+ schema = properties.getProperty(Environment.DEFAULT_SCHEMA);
}
}
- String schema = null;
- BasicHibernateProperties prop = getBasicHibernateProperties();
- if (getUserOverrideDefaultSchema() != null){
- schema = getUserOverrideDefaultSchema();
- } else if (prop != null && prop.getSchemaDefault() != null){
- schema = prop.getSchemaDefault();
+ if (schema == null){
+ BasicHibernateProperties prop = getBasicHibernateProperties();
+ if (getUserOverrideDefaultSchema() != null){
+ schema = getUserOverrideDefaultSchema();
+ } else if (prop != null && prop.getSchemaDefault() != null){
+ schema = prop.getSchemaDefault();
+ }
}
return schema != null ? schema : super.getDefaultSchema();
}
+ /*
+ * The sequence is(from biggest priority to lowest):
+ * 1) Configuration.getProperty() (if cc.hasConfiguration())
+ * 2) ConsoleConfiguration.getPreference().getProperty()-uses hibernate.properties
+ * 3) JpaProject user overrides
+ * 4) persistence.xml
+ * 5) logic from superclass
+ */
@Override
public String getDefaultCatalog() {
String catalog = null;
BasicHibernateProperties prop = getBasicHibernateProperties();
ConsoleConfiguration cc = getDefaultConsoleConfiguration();
if (cc != null){
+ if (cc.hasConfiguration()){//was not build yet
+ Configuration configuration = cc.getConfiguration();
+ if (configuration.getProperties().containsKey(Environment.DEFAULT_CATALOG)){
+ catalog = configuration.getProperty(Environment.DEFAULT_CATALOG);
+ }
+
+ }
Properties properties = cc.getPreferences().getProperties();
if (properties != null && properties.containsKey(Environment.DEFAULT_CATALOG)){
- return properties.getProperty(Environment.DEFAULT_CATALOG);
+ catalog = properties.getProperty(Environment.DEFAULT_CATALOG);
}
- } else if (getUserOverrideDefaultCatalog() != null){
- catalog = getUserOverrideDefaultCatalog();
- } else if (prop != null && prop.getCatalogDefault() != null){
- catalog = prop.getCatalogDefault();
}
+ if (catalog == null){
+ if (getUserOverrideDefaultCatalog() != null){
+ catalog = getUserOverrideDefaultCatalog();
+ } else if (prop != null && prop.getCatalogDefault() != null){
+ catalog = prop.getCatalogDefault();
+ }
+ }
return catalog != null ? catalog : super.getDefaultCatalog();
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java 2012-08-20 13:38:35 UTC (rev 43111)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java 2012-08-20 13:53:22 UTC (rev 43112)
@@ -122,8 +122,7 @@
@Override
public void configurationBuilt(ConsoleConfiguration ccfg) {
- if (ccfg.getConfiguration() == null
- || ccfg.getConfiguration().getNamingStrategy() == null){
+ if (ccfg.getConfiguration() == null){
return;
}
revalidateProjects(ccfg);
13 years, 7 months
JBoss Tools SVN: r43111 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext: src/org/jboss/tools/ui/bot/ext and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-08-20 09:38:35 -0400 (Mon, 20 Aug 2012)
New Revision: 43111
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
Log:
Add possibility to screen cast to all SWTBot tests from test run
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2012-08-20 13:19:55 UTC (rev 43110)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2012-08-20 13:38:35 UTC (rev 43111)
@@ -23,8 +23,7 @@
org.jboss.tools.ui.bot.ext.types,
org.jboss.tools.ui.bot.ext.view,
org.jboss.tools.ui.bot.ext.widgets,
- org.jboss.tools.ui.bot.ext.wizards,
- org.jboss.tools.ui.bot.ext.zest
+ org.jboss.tools.ui.bot.ext.wizards
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
@@ -42,8 +41,6 @@
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.core.resources;bundle-version="3.5.0",
org.eclipse.draw2d;bundle-version="3.6.1",
- org.eclipse.zest.core;bundle-version="1.2.0",
- org.eclipse.zest.layouts;bundle-version="1.1.0",
org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.0.0",
org.eclipse.gef;bundle-version="3.6.1",
org.eclipse.ui,
@@ -52,7 +49,8 @@
org.eclipse.core.runtime,
org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.swtbot.forms.finder
+ org.eclipse.swtbot.forms.finder,
+ org.jboss.tools.tests;bundle-version="3.4.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.gef,
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2012-08-20 13:19:55 UTC (rev 43110)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2012-08-20 13:38:35 UTC (rev 43111)
@@ -1,5 +1,8 @@
package org.jboss.tools.ui.bot.ext;
+import java.awt.AWTException;
+import java.io.File;
+import java.io.IOException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
@@ -13,6 +16,7 @@
import org.apache.log4j.Logger;
import org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener;
+import org.jboss.tools.test.util.ScreenRecorderExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.TestConfiguration;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
@@ -43,6 +47,7 @@
*/
public class RequirementAwareSuite extends Suite {
private static boolean runManageBlockingWindow = true;
+ private static ScreenRecorderExt screenRecorderExt = null;
// we have one global instance of cleanup listener
final static DoAfterAllTestsRunListener cleanUp = new DoAfterAllTestsRunListener();
@@ -137,7 +142,7 @@
public List<RequirementBase> getRequirements() {
return Collections.unmodifiableList(this.requirements);
}
-
+
@Override
protected List<FrameworkMethod> computeTestMethods() {
List<FrameworkMethod> testMethods = new ArrayList<FrameworkMethod>();
@@ -175,6 +180,9 @@
try {
super.run(notifier);
} finally {
+ if (System.getProperty("swt.bot.test.record.screencast","false").equalsIgnoreCase("true")){
+ RequirementAwareSuite.stopScreenRecorder();
+ }
notifier.removeListener(failureSpy);
}
}
@@ -186,6 +194,9 @@
@Override
protected Statement withBeforeClasses(Statement statement) {
+ if (System.getProperty("swt.bot.test.record.screencast","false").equalsIgnoreCase("true")){
+ RequirementAwareSuite.startScreenRecorder(getTestClass().getJavaClass().getSimpleName());
+ }
if (RequirementAwareSuite.runManageBlockingWindow){
SWTJBTExt.manageBlockingWidows(false, false);
RequirementAwareSuite.runManageBlockingWindow = false;
@@ -195,6 +206,7 @@
}
log.info("Fullfilling requirements before test "
+ getTestClass().getJavaClass());
+
try {
for (RequirementBase r : requirements) {
r.fulfill();
@@ -450,5 +462,62 @@
ExcludeCategory annotation = klass.getAnnotation(ExcludeCategory.class);
return annotation == null ? null : annotation.value();
}
-
+ /**
+ * Starts Screen Recorder
+ */
+ private static void startScreenRecorder(String className) {
+ if (screenRecorderExt == null) {
+ try {
+ screenRecorderExt = new ScreenRecorderExt();
+ } catch (IOException ioe) {
+ throw new RuntimeException("Unable to initialize Screen Recorder.", ioe);
+ } catch (AWTException awte) {
+ throw new RuntimeException("Unable to initialize Screen Recorder.", awte);
+ }
+ }
+ if (screenRecorderExt != null) {
+ if (screenRecorderExt.isState(ScreenRecorderExt.STATE_DONE)) {
+ try {
+ File screenCastDir = new File ("screencasts");
+ if (!screenCastDir.exists()){
+ screenCastDir.mkdir();
+ }
+ final String fileName = "screencasts" + File.separator + className;
+ log.info("Starting Screen Recorder. Saving Screen Cast to file: " + fileName);
+ screenRecorderExt.start(fileName);
+ } catch (IOException ioe) {
+ throw new RuntimeException("Unable to start Screen Recorder.", ioe);
+ }
+ } else {
+ throw new RuntimeException(
+ "Unable to start Screen Recorder.\nScreen Recorder is not in state DONE.");
+ }
+ } else {
+ log.error("Screen Recorder was not properly initilized");
+ }
+ }
+ /**
+ * Stops Screen Recorder
+ */
+ private static void stopScreenRecorder(){
+ if (screenRecorderExt != null){
+ if (screenRecorderExt.isState(ScreenRecorderExt.STATE_RECORDING)){
+ try {
+ screenRecorderExt.stop();
+ log.info("Screen Recorder stopped.");
+ } catch (IOException ioe) {
+ throw
+ new RuntimeException("Unable to stop Screen Recorder." , ioe);
+ }
+ }
+ else{
+ throw
+ new RuntimeException("Unable to stop Screen Recorder.\nScreen Recorder is no in state RECORDING.");
+ }
+ }
+ else {
+ throw
+ new RuntimeException("Unable to stop Screen Recorder.\nScreen Recorder was not properly initilized");
+ }
+ }
}
13 years, 7 months