JBoss Tools SVN: r43038 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-08-15 05:12:49 -0400 (Wed, 15 Aug 2012)
New Revision: 43038
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
Log:
Make main shell active after closing perspective (was failing on windows slaves)
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2012-08-15 08:20:19 UTC (rev 43037)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2012-08-15 09:12:49 UTC (rev 43038)
@@ -559,14 +559,13 @@
// Get rid of welcome screen. Simple close did not work when run in maven
try {
+ SWTBotShell shell = bot.activeShell();
bot.menu("Window").menu("Close Perspective").click();
+ shell.setFocus();
SWTBotFactory.getOpen().perspective(ActionItem.Perspective.JAVA.LABEL);
} catch (WidgetNotFoundException e){
// ok, Welcome screen not present
log.info("Welcome window not present");
- } catch (TimeoutException e){ //hack by rhopp to make tests work on windows
- //probably no perspective open. Try to open Java perspective anyway
- SWTBotFactory.getOpen().perspective(ActionItem.Perspective.JAVA.LABEL);
}
}
/**
12 years, 5 months
JBoss Tools SVN: r43037 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-08-15 04:20:19 -0400 (Wed, 15 Aug 2012)
New Revision: 43037
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
Log:
Jenkins debugging
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2012-08-15 03:23:47 UTC (rev 43036)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2012-08-15 08:20:19 UTC (rev 43037)
@@ -29,6 +29,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -563,6 +564,9 @@
} catch (WidgetNotFoundException e){
// ok, Welcome screen not present
log.info("Welcome window not present");
+ } catch (TimeoutException e){ //hack by rhopp to make tests work on windows
+ //probably no perspective open. Try to open Java perspective anyway
+ SWTBotFactory.getOpen().perspective(ActionItem.Perspective.JAVA.LABEL);
}
}
/**
12 years, 5 months
JBoss Tools SVN: r43036 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-08-14 23:23:47 -0400 (Tue, 14 Aug 2012)
New Revision: 43036
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java
Log:
Jenkins debugging
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java 2012-08-15 01:06:33 UTC (rev 43035)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/BaseFunctionalityTest.java 2012-08-15 03:23:47 UTC (rev 43036)
@@ -3,14 +3,16 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
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.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
-(a)RunWith(RequirementAwareSuite.class)
+//(a)RunWith(RequirementAwareSuite.class)
@SuiteClasses({CentralAllBotTests.class})
+@Require(perspective="JBoss")
public class BaseFunctionalityTest extends SWTTestExt {
/**
12 years, 5 months
JBoss Tools SVN: r43035 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-08-14 21:06:33 -0400 (Tue, 14 Aug 2012)
New Revision: 43035
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/DisabledAnnotation.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java
Log:
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java 2012-08-14 23:33:07 UTC (rev 43034)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/AbstractTemporaryAnnotation.java 2012-08-15 01:06:33 UTC (rev 43035)
@@ -41,6 +41,7 @@
private static final int WARNING_LAYER;
private static final int ERROR_LAYER;
+ private String problemType;
private Map<String, Object> fAttributes = new HashMap<String, Object>();
@@ -62,8 +63,9 @@
}
}
- public AbstractTemporaryAnnotation(String type, boolean isPersistent, String text, boolean warning) {
+ public AbstractTemporaryAnnotation(String type, String problemType, boolean isPersistent, String text, boolean warning) {
super(type, isPersistent, text);
+ this.setProblemType(problemType);
this.seveirty = warning?WARNING_LAYER:ERROR_LAYER;
}
@@ -102,4 +104,12 @@
public void setAttribute(String key, Object value) {
fAttributes.put(key, value);
}
+
+ public String getProblemType() {
+ return problemType;
+ }
+
+ public void setProblemType(String problemType) {
+ this.problemType = problemType;
+ }
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/DisabledAnnotation.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/DisabledAnnotation.java 2012-08-14 23:33:07 UTC (rev 43034)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/DisabledAnnotation.java 2012-08-15 01:06:33 UTC (rev 43035)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.validation;
+import org.eclipse.jface.text.source.Annotation;
import org.eclipse.ui.internal.WorkbenchImages;
/**
@@ -20,8 +21,12 @@
private static final String warningPath = WorkbenchImages.ICONS_PATH + "dlcl16/showwarn_tsk.gif";
private static final String errorPath = WorkbenchImages.ICONS_PATH + "dlcl16/showerr_tsk.gif";
- public DisabledAnnotation(String type, boolean isPersistent, String text, boolean warning) {
- super(type, isPersistent, text, warning);
+ private Annotation overlaidAnnotation = null;
+
+ public DisabledAnnotation(Annotation overlaidAnnotation, String problemType, boolean warning) {
+ super(overlaidAnnotation.getType(), problemType, false, overlaidAnnotation.getText(), warning);
+ this.overlaidAnnotation = overlaidAnnotation;
+ this.markDeleted(true);
}
/*
@@ -41,4 +46,11 @@
protected String getErrorIconPath() {
return errorPath;
}
+
+ /**
+ * @return the overlaidAnnotation
+ */
+ public Annotation getOverlaidAnnotation() {
+ return overlaidAnnotation;
+ }
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-08-14 23:33:07 UTC (rev 43034)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-08-15 01:06:33 UTC (rev 43035)
@@ -269,7 +269,7 @@
AbstractMarkerAnnotationModel anModel = ((AbstractMarkerAnnotationModel)model);
synchronized (anModel.getLockObject()) {
Iterator iterator = anModel.getAnnotationIterator(reference.getStartPosition(), reference.getLength(), true, true);
- Set<MarkerAnnotation> annotationsToRemove = new HashSet<MarkerAnnotation>();
+ Set<Annotation> annotationsToRemove = new HashSet<Annotation>();
Map<Annotation, Position> newAnnotations = new HashMap<Annotation, Position>();
while (iterator.hasNext()) {
Object o = iterator.next();
@@ -291,12 +291,13 @@
}
}
if(removedProblem) {
- Annotation newAnnotation = new DisabledAnnotation(annotation.getType(), false, annotation.getText(), marker.getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING) == IMarker.SEVERITY_WARNING);
- int length = 0; // marker.getAttribute(IMarker.CHAR_END, 0) - offset;
- Position p = new Position(offset, length);
+ Annotation newAnnotation = new DisabledAnnotation(annotation, type, marker.getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING) == IMarker.SEVERITY_WARNING);
+ Position p = anModel.getPosition(annotation);
newAnnotations.put(newAnnotation, p);
+ annotationsToRemove.add(annotation);
+ } else {
+ annotation.markDeleted(true);
}
- annotationsToRemove.add(annotation);
} else if("org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor".equals(e.getClass().getName()) && "org.eclipse.jst.jsf.facelet.ui.FaceletValidationMarker".equals(type)) {
// Remove WTP's annotations for JBT JSP/XHTML editors.
annotationsToRemove.add(annotation);
@@ -304,13 +305,28 @@
} catch (CoreException ce) {
CommonPlugin.getDefault().logError(ce);
}
+ } else if(o instanceof DisabledAnnotation) {
+ DisabledAnnotation annotation = (DisabledAnnotation)o;
+ Position p = anModel.getPosition(annotation);
+ for (Object object : messageArray) {
+ IMessage message = (IMessage)object;
+ if(getMarkerType().equals(annotation.getProblemType()) && message.getOffset() == p.getOffset() && annotation.getText().equals(message.getText())) {
+ annotationsToRemove.add(annotation);
+ Annotation markerAnnotation = annotation.getOverlaidAnnotation();
+ markerAnnotation.markDeleted(true);
+ Position newPossition = new Position(message.getOffset(), message.getLength());
+ newAnnotations.put(markerAnnotation, newPossition);
+ break;
+ }
+ }
+
}
}
// if(!newAnnotations.isEmpty()) {
// Annotation[] annotationsToRemoveArray = annotationsToRemove.toArray(new Annotation[annotationsToRemove.size()]);
// anModel.replaceAnnotations(annotationsToRemoveArray, newAnnotations);
// }
- for (MarkerAnnotation annotation : annotationsToRemove) {
+ for (Annotation annotation : annotationsToRemove) {
anModel.removeAnnotation(annotation);
}
for (Annotation annotation : newAnnotations.keySet()) {
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java 2012-08-14 23:33:07 UTC (rev 43034)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/ValidationAnnotation.java 2012-08-15 01:06:33 UTC (rev 43035)
@@ -26,8 +26,8 @@
* @param text
* @param warning
*/
- public ValidationAnnotation(String type, boolean isPersistent, String text, boolean warning) {
- super(type, isPersistent, text, warning);
+ public ValidationAnnotation(String type, String problemType, boolean isPersistent, String text, boolean warning) {
+ super(type, problemType, isPersistent, text, warning);
}
/* (non-Javadoc)
12 years, 5 months
JBoss Tools SVN: r43034 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-14 19:33:07 -0400 (Tue, 14 Aug 2012)
New Revision: 43034
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
JBIDE-12423
https://issues.jboss.org/browse/JBIDE-12423
Specializing beans are stored in map by class name to exclude storing several beans while as-you-type model is refreshed.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java 2012-08-14 18:11:35 UTC (rev 43033)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java 2012-08-14 23:33:07 UTC (rev 43034)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
+import java.util.Collection;
import java.util.Set;
import org.jboss.tools.common.java.IJavaReference;
@@ -61,7 +62,7 @@
*
* @return all the directly derived classes that declare annotation @Specializes
*/
- Set<? extends IClassBean> getSpecializingBeans();
+ Collection<? extends IClassBean> getSpecializingBeans();
/**
* Returns class bean of super class of this bean, or null if it is not a bean.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2012-08-14 18:11:35 UTC (rev 43033)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2012-08-14 23:33:07 UTC (rev 43034)
@@ -11,9 +11,11 @@
package org.jboss.tools.cdi.internal.core.impl;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -60,7 +62,7 @@
*/
public class ClassBean extends AbstractBeanElement implements IClassBean {
protected ClassBean superClassBean = null;
- protected Set<ClassBean> specializingClassBeans = new HashSet<ClassBean>();
+ protected Map<String, ClassBean> specializingClassBeans = new HashMap<String, ClassBean>();
protected List<BeanField> fields = new ArrayList<BeanField>();
protected List<BeanMethod> methods = new ArrayList<BeanMethod>();
@@ -210,8 +212,11 @@
return result;
}
- void addSpecializingClassBean(ClassBean bean) {
- specializingClassBeans.add(bean);
+ synchronized void addSpecializingClassBean(ClassBean bean) {
+ if(specializingClassBeans == null) {
+ specializingClassBeans = new Hashtable<String, ClassBean>();
+ }
+ specializingClassBeans.put(bean.getBeanClass().getFullyQualifiedName(), bean);
}
public ClassBean getSuperClassBean() {
@@ -403,8 +408,8 @@
return superClassBean;
}
- public Set<ClassBean> getSpecializingBeans() {
- return specializingClassBeans;
+ public synchronized Collection<ClassBean> getSpecializingBeans() {
+ return specializingClassBeans == null ? Collections.<ClassBean>emptySet() : specializingClassBeans.values();
}
public IAnnotationDeclaration getSpecializesAnnotationDeclaration() {
@@ -416,9 +421,11 @@
return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getSourceType().getFullyQualifiedName());
}
- boolean hasEnabledSpecializingClassBean() {
- for (ClassBean sb: specializingClassBeans) {
- if(sb.hasEnabledSpecializingClassBean() || sb.isEnabled()) return true;
+ synchronized boolean hasEnabledSpecializingClassBean() {
+ if(specializingClassBeans != null) {
+ for (ClassBean sb: specializingClassBeans.values()) {
+ if(sb.hasEnabledSpecializingClassBean() || sb.isEnabled()) return true;
+ }
}
return false;
}
@@ -627,8 +634,8 @@
return getSourceMember();
}
- public void cleanCache() {
- specializingClassBeans.clear();
+ public synchronized void cleanCache() {
+ specializingClassBeans = null;
scope = null;
}
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2012-08-14 18:11:35 UTC (rev 43033)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ProducerMethod.java 2012-08-14 23:33:07 UTC (rev 43034)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.cdi.internal.core.impl;
+import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
import org.eclipse.jdt.core.IType;
@@ -41,7 +43,7 @@
protected AnnotationDeclaration produces;
ProducerMethod specialized = null;
- Set<ProducerMethod> specializingProducerMethods = new HashSet<ProducerMethod>();
+ Map<String, ProducerMethod> specializingProducerMethods = null;
public ProducerMethod() {}
@@ -143,7 +145,12 @@
public void setSpecializedBean(ProducerMethod other) {
specialized = other;
if(other != null) {
- other.specializingProducerMethods.add(this);
+ synchronized (other) {
+ if(other.specializingProducerMethods == null) {
+ other.specializingProducerMethods = new HashMap<String, ProducerMethod>();
+ }
+ other.specializingProducerMethods.put(this.getBeanClass().getFullyQualifiedName(), this);
+ }
}
}
@@ -163,9 +170,11 @@
return scope != null && CDIConstants.DEPENDENT_ANNOTATION_TYPE_NAME.equals(scope.getSourceType().getFullyQualifiedName());
}
- boolean hasEnabledSpecializingProducerMethod() {
- for (ProducerMethod sb: specializingProducerMethods) {
- if(sb.hasEnabledSpecializingProducerMethod() || sb.isEnabled()) return true;
+ synchronized boolean hasEnabledSpecializingProducerMethod() {
+ if(specializingProducerMethods != null) {
+ for (ProducerMethod sb: specializingProducerMethods.values()) {
+ if(sb.hasEnabledSpecializingProducerMethod() || sb.isEnabled()) return true;
+ }
}
return false;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-14 18:11:35 UTC (rev 43033)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-14 23:33:07 UTC (rev 43034)
@@ -979,7 +979,7 @@
*/
if(bean.isEnabled() && specializedBean instanceof IClassBean) {
IClassBean supperClassBean = (IClassBean)specializedBean;
- Set<? extends IClassBean> allSpecializingBeans = supperClassBean.getSpecializingBeans();
+ Collection<? extends IClassBean> allSpecializingBeans = supperClassBean.getSpecializingBeans();
if(allSpecializingBeans.size()>1) {
StringBuffer sb = new StringBuffer(bean.getElementName());
boolean moreThanTwo = false;
12 years, 5 months
JBoss Tools SVN: r43033 - trunk/common/plugins/org.jboss.tools.common.validation.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-08-14 14:11:35 -0400 (Tue, 14 Aug 2012)
New Revision: 43033
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/plugin.xml
Log:
JBIDE-10611
As-you-type CDI validation
Marked the ojbt.common.validation plug-in as "want to be activated at start"
Modified: trunk/common/plugins/org.jboss.tools.common.validation/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/plugin.xml 2012-08-14 16:37:57 UTC (rev 43032)
+++ trunk/common/plugins/org.jboss.tools.common.validation/plugin.xml 2012-08-14 18:11:35 UTC (rev 43033)
@@ -4,6 +4,8 @@
<extension-point id="validator" name="KB Validator" schema="schema/validator.exsd"/>
<extension-point id="warnings" name="Warning names supported by @SuppressWarnings" schema="schema/warnings.exsd"/>
+ <extension point="org.eclipse.ui.startup" />
+
<extension
point="org.eclipse.wst.validation.validator"
id="cd"
12 years, 5 months
JBoss Tools SVN: r43032 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-08-14 12:37:57 -0400 (Tue, 14 Aug 2012)
New Revision: 43032
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
Log:
Replaced generic Exception with specific one
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2012-08-14 16:07:21 UTC (rev 43031)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2012-08-14 16:37:57 UTC (rev 43032)
@@ -18,6 +18,7 @@
import java.util.Properties;
import java.util.Set;
+import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.operations.AbstractOperation;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -486,12 +487,13 @@
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=119066
private void createWTPNature2(AbstractOperation wcco, IProgressMonitor monitor) {
try {
- if(wcco != null) wcco.execute(monitor, null);
+ if(wcco != null) {
+ wcco.execute(monitor, null);
+ }
new RuntimeJob().schedule();
- } catch (Exception e) {
+ } catch (ExecutionException e) {
WebUiPlugin.getPluginLog().logError(e);
}
-
}
class RuntimeJob extends WorkspaceJob {
12 years, 5 months
JBoss Tools SVN: r43031 - trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-08-14 12:07:21 -0400 (Tue, 14 Aug 2012)
New Revision: 43031
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
Log:
Shortened timer on test execution.
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2012-08-14 15:43:19 UTC (rev 43030)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2012-08-14 16:07:21 UTC (rev 43031)
@@ -140,7 +140,7 @@
protected String consoleWaiting () {
// New - the consoles fail to switch....sometimes
- bot.sleep(60000);
+ bot.sleep(Timing.time30S());
boolean consoleSwitched = false;
int switchLimit = 30;
int switchCounter = 0;
12 years, 5 months
JBoss Tools SVN: r43030 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-08-14 11:43:19 -0400 (Tue, 14 Aug 2012)
New Revision: 43030
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java
Log:
Commented out test for Wiki page, because of internal browser bug on juno (https://bugs.eclipse.org/bugs/show_bug.cgi?id=387213)
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java 2012-08-14 15:31:51 UTC (rev 43029)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java 2012-08-14 15:43:19 UTC (rev 43030)
@@ -21,7 +21,8 @@
@Test
public void documentationSectionTest(){
- testHyperlinkToBrowser("Wiki");
+ //Commented out because of bug in eclipse Juno on RHEL 6.3 https://bugs.eclipse.org/bugs/show_bug.cgi?id=387213
+ //testHyperlinkToBrowser("Wiki");
testHyperlinkToBrowser("New and Noteworthy");
testHyperlinkToBrowser("User Forum");
testHyperlinkToBrowser("Reference");
12 years, 5 months
JBoss Tools SVN: r43029 - in trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2012-08-14 11:31:51 -0400 (Tue, 14 Aug 2012)
New Revision: 43029
Added:
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/util/ViewUtils.java
Modified:
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java
Log:
* getToolbar workaround for juno
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-14 15:27:13 UTC (rev 43028)
+++ trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java 2012-08-14 15:31:51 UTC (rev 43029)
@@ -2,16 +2,15 @@
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledText;
import org.eclipse.ui.part.PageBook;
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.types.IDELabel;
-import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -172,7 +171,10 @@
return;
SWTBotView view = getForgeView();
- view.toolbarButton("Start the default Forge runtime").click();
+ /* view.toolbarButton("Start the default Forge runtime").click(); */
+ //not working with juno ^^^
+ //workaround:
+ ViewUtils.getToolbarButton("Start the default Forge runtime").click();
util.waitForNonIgnoredJobs();
}
@@ -183,7 +185,11 @@
openForgeView();
SWTBotView view = getForgeView();
- view.toolbarButton("Stop the running Forge runtime").click();
+ /* view.toolbarButton("Stop the running Forge runtime").click(); */
+ //not working with juno ^^^
+ //workaround:
+ ViewUtils.getToolbarButton("Stop the running Forge runtime").click();
+
bot.sleep(TIME_5S);
}
Added: trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/util/ViewUtils.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/util/ViewUtils.java (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/util/ViewUtils.java 2012-08-14 15:31:51 UTC (rev 43029)
@@ -0,0 +1,80 @@
+package org.jboss.tools.forge.ui.bot.test.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.ListResult;
+import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarDropDownButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarPushButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarRadioButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarSeparatorButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.internal.WorkbenchPartReference;
+import org.jboss.tools.forge.ui.bot.test.suite.ForgeTest;
+
+
+public class ViewUtils {
+
+ public static List<SWTBotToolbarButton> getToolbarButtons() {
+ return UIThreadRunnable.syncExec(new ListResult<SWTBotToolbarButton>() {
+
+ public List<SWTBotToolbarButton> run() {
+ SWTBotView view = ForgeTest.openForgeView();
+ IWorkbenchPart obj = ((WorkbenchPartReference) view.getReference()).getPart(false);
+ ToolBar toolbar = null;
+ IToolBarManager t = ((IViewSite)obj.getSite()).getActionBars().getToolBarManager();
+ if (t instanceof ToolBarManager) {
+ toolbar = ((ToolBarManager)t).getControl();
+ }
+
+ final List<SWTBotToolbarButton> l = new ArrayList<SWTBotToolbarButton>();
+
+ if (toolbar == null)
+ return l;
+
+ ToolItem[] items = toolbar.getItems();
+ for (int i = 0; i < items.length; i++) {
+ try {
+ if (SWTUtils.hasStyle(items[i], SWT.PUSH))
+ l.add(new SWTBotToolbarPushButton(items[i]));
+ else if(SWTUtils.hasStyle(items[i], SWT.CHECK))
+ l.add(new SWTBotToolbarToggleButton(items[i]));
+ else if(SWTUtils.hasStyle(items[i], SWT.RADIO))
+ l.add(new SWTBotToolbarRadioButton(items[i]));
+ else if(SWTUtils.hasStyle(items[i], SWT.DROP_DOWN))
+ l.add(new SWTBotToolbarDropDownButton(items[i]));
+ else if(SWTUtils.hasStyle(items[i], SWT.SEPARATOR))
+ l.add(new SWTBotToolbarSeparatorButton(items[i]));
+ } catch (WidgetNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+ return l;
+ }
+ });
+ }
+
+ public static SWTBotToolbarButton getToolbarButton(String tooltip){
+
+ List<SWTBotToolbarButton> btns = ViewUtils.getToolbarButtons();
+ for (SWTBotToolbarButton btn : btns){
+ if(btn.getToolTipText().equals(tooltip)){
+ return btn;
+ }
+ }
+ return null;
+ }
+
+}
12 years, 5 months