JBoss Tools SVN: r44390 - trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-10-09 20:43:45 -0400 (Tue, 09 Oct 2012)
New Revision: 44390
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java
Log:
Corrected typo
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java 2012-10-09 23:14:26 UTC (rev 44389)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java 2012-10-10 00:43:45 UTC (rev 44390)
@@ -32,8 +32,7 @@
CreateRuntimeFromSOA.class,
NewProjectUsingRuntime.class,
NewProjectUsingBundledInEAP.class,
-// SimpleMylyn.class
-// Editing.class
+ Editing.class,
HelloWorld.class,
HelloWorldAction.class,
HelloWorldFileAction.class,
12 years, 3 months
JBoss Tools SVN: r44389 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-10-09 19:14:26 -0400 (Tue, 09 Oct 2012)
New Revision: 44389
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
Log:
"Add missing required attribute(s)" quick fix for "Missing required attribute" WTP problem marker https://issues.jboss.org/browse/JBIDE-12390
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java 2012-10-09 23:13:56 UTC (rev 44388)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java 2012-10-09 23:14:26 UTC (rev 44389)
@@ -72,6 +72,7 @@
public static String WebCompoundEditor_WebXMLEditor;
public static String XActionProvider_CompanyName;
public static String AddTLDMarkerResolution_Name;
+ public static String AddAttributeMarkerResolution_Name;
public static String UI_WIZARD_XHTML_NEW_TITLE;
public static String UI_WIZARD_XHTML_NEW_Description;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2012-10-09 23:13:56 UTC (rev 44388)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2012-10-09 23:14:26 UTC (rev 44389)
@@ -66,6 +66,7 @@
WebCompoundEditor_WebXMLEditor=Web XML Editor
XActionProvider_CompanyName=JBoss Tools
AddTLDMarkerResolution_Name=Insert ''{0}'' tag library definition
+AddAttributeMarkerResolution_Name= Insert ''{0}'' attribute to ''{1}'' tag
NewXHTMLTemplatesWizardPage_0=Select XHTML Template
NewXHTMLTemplatesWizardPage_1=Select a template as initial content in theX HTML page.
NewXHTMLTemplatesWizardPage_2=Name
12 years, 3 months
JBoss Tools SVN: r44388 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-10-09 19:13:56 -0400 (Tue, 09 Oct 2012)
New Revision: 44388
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddAttributeMarkerResolution.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
Log:
"Add missing required attribute(s)" quick fix for "Missing required attribute" WTP problem marker https://issues.jboss.org/browse/JBIDE-12390
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddAttributeMarkerResolution.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddAttributeMarkerResolution.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddAttributeMarkerResolution.java 2012-10-09 23:13:56 UTC (rev 44388)
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.ui.action;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.DocumentProviderRegistry;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.jboss.tools.common.model.ui.ModelUIImages;
+import org.jboss.tools.common.quickfix.IQuickFix;
+import org.jboss.tools.common.ui.CommonUIPlugin;
+import org.jboss.tools.jst.web.ui.Messages;
+import org.jboss.tools.jst.web.ui.WebUiPlugin;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * The Marker Resolution that adds missing attribute to the tag in jsp or xhtml file
+ *
+ * @author Daniel Azarov
+ *
+ */
+public class AddAttributeMarkerResolution implements IQuickFix{
+ private IFile file;
+
+ private int start, end;
+ private String attributeName;
+ private Node node;
+
+ public AddAttributeMarkerResolution(IFile file, Node node, String attributeName, int start, int end){
+ this.file = file;
+ this.node = node;
+ this.attributeName = attributeName;
+ this.start = start;
+ this.end = end;
+ }
+
+ @Override
+ public String getLabel() {
+ return NLS.bind(Messages.AddAttributeMarkerResolution_Name, attributeName, node.getNodeName());
+ }
+
+ @Override
+ public void run(IMarker marker) {
+ FileEditorInput input = new FileEditorInput(file);
+ IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input);
+ try {
+ provider.connect(input);
+
+ boolean dirty = provider.canSaveDocument(input);
+
+ IDocument document = provider.getDocument(input);
+
+ apply(document);
+
+ if(!dirty){
+ provider.aboutToChange(input);
+ provider.saveDocument(new NullProgressMonitor(), input, document, true);
+ provider.changed(input);
+ }
+
+ provider.disconnect(input);
+ }catch(CoreException ex){
+ WebUiPlugin.getPluginLog().logError(ex);
+ }
+ }
+
+ @Override
+ public String getDescription() {
+ return getLabel();
+ }
+
+ @Override
+ public Image getImage() {
+ return CommonUIPlugin.getImageDescriptorRegistry().get(ModelUIImages.getImageDescriptor(ModelUIImages.TAGLIB_FILE));
+ }
+
+ @Override
+ public void apply(IDocument document) {
+ String text = "<"+node.getNodeName()+" ";
+
+ NamedNodeMap attributes = node.getAttributes();
+ for(int i = 0; i < attributes.getLength(); i++){
+ Node att = attributes.item(i);
+ text += att.getNodeName()+"=\""+att.getNodeValue()+"\" ";
+ }
+
+ text += attributeName+"=\"\">";
+ try {
+ document.replace(start, end-start, text);
+ } catch (BadLocationException ex) {
+ WebUiPlugin.getPluginLog().logError(ex);
+ }
+ }
+
+ @Override
+ public Point getSelection(IDocument document) {
+ return null;
+ }
+
+ @Override
+ public String getAdditionalProposalInfo() {
+ return getDescription();
+ }
+
+ @Override
+ public String getDisplayString() {
+ return getLabel();
+ }
+
+ @Override
+ public IContextInformation getContextInformation() {
+ return null;
+ }
+
+ @Override
+ public int getRelevance() {
+ return 0;
+ }
+}
\ No newline at end of file
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddAttributeMarkerResolution.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java 2012-10-09 21:24:50 UTC (rev 44387)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddTLDMarkerResolution.java 2012-10-09 23:13:56 UTC (rev 44388)
@@ -16,7 +16,6 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.text.contentassist.IContextInformation;
@@ -31,7 +30,7 @@
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.jboss.tools.common.model.ui.ModelUIImages;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
-import org.jboss.tools.common.quickfix.IBaseMarkerResolution;
+import org.jboss.tools.common.quickfix.IQuickFix;
import org.jboss.tools.common.ui.CommonUIPlugin;
import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
import org.jboss.tools.jst.jsp.jspeditor.dnd.PaletteTaglibInserter;
@@ -44,7 +43,7 @@
* @author Daniel Azarov
*
*/
-public class AddTLDMarkerResolution implements IBaseMarkerResolution, IJavaCompletionProposal{
+public class AddTLDMarkerResolution implements IQuickFix{
private IFile file;
private String resolutionName;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2012-10-09 21:24:50 UTC (rev 44387)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2012-10-09 23:13:56 UTC (rev 44388)
@@ -24,6 +24,9 @@
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.DocumentProviderRegistry;
+import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
@@ -33,6 +36,8 @@
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.quickfix.IQuickFixGenerator;
import org.jboss.tools.common.refactoring.MarkerResolutionUtils;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
import org.jboss.tools.jst.web.kb.IKbProject;
import org.jboss.tools.jst.web.kb.KbProjectFactory;
import org.jboss.tools.jst.web.kb.PageContextFactory;
@@ -41,6 +46,9 @@
import org.jboss.tools.jst.web.kb.taglib.INameSpace;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
/**
* Shows the Marker Resolutions for Unknown tag JSP Problem Marker
@@ -55,10 +63,12 @@
private static final String UNKNOWN_TAG = "Unknown tag"; //$NON-NLS-1$
+ private static final String MISSING_ATTRIBUTE = "Missing required attribute"; //$NON-NLS-1$
+
@Override
public IMarkerResolution[] getResolutions(IMarker marker) {
try{
- return isOurCase(marker);
+ return findResolutions(marker);
}catch(CoreException ex){
WebUiPlugin.getPluginLog().logError(ex);
}
@@ -99,38 +109,49 @@
return true;
}
- private IJavaCompletionProposal[] isOurCase(Annotation annotation, Position position){
- ArrayList<IJavaCompletionProposal> proposals = new ArrayList<IJavaCompletionProposal>();
- if(!(annotation instanceof TemporaryAnnotation)){
- return new IJavaCompletionProposal[]{};
- }
- TemporaryAnnotation ta = (TemporaryAnnotation)annotation;
+ private void getAddAttribute(ArrayList<IJavaCompletionProposal> proposals, TemporaryAnnotation ta, String message, int start, int end){
+ String attributeName = getAttributeName(message);
- String message = annotation.getText();
- if(ta.getPosition() == null)
- return new IJavaCompletionProposal[]{};
- final int start = position.getOffset();
-
- final int end = position.getOffset()+position.getLength();
-
- if(!message.startsWith(UNKNOWN_TAG))
- return new IJavaCompletionProposal[]{};
-
+ IFile file = MarkerResolutionUtils.getFile();
+ if(file == null)
+ return;
+
+ Object additionalInfo = ta.getAdditionalFixInfo();
+ if(additionalInfo instanceof IDocument){
+ IStructuredModel model = StructuredModelManager.getModelManager().getModelForRead((IStructuredDocument)additionalInfo);
+ IDOMDocument xmlDocument = (model instanceof IDOMModel) ? ((IDOMModel) model).getDocument() : null;
+
+ Node n = Utils.findNodeForOffset(xmlDocument, start);
+
+ if (n == null || !(n instanceof Attr))
+ return;
+
+ Node node = ((Attr)n).getOwnerElement();
+
+ String prefix = node.getPrefix();
+ String tagName = node.getNodeName();
+
+ proposals.add(new AddAttributeMarkerResolution(file, node, attributeName, start, end));
+
+ }
+ }
+
+ private void getAddTLD(ArrayList<IJavaCompletionProposal> proposals, TemporaryAnnotation ta, String message, int start, int end){
String prefix = getPrifix(message);
if(prefix == null)
- return new IJavaCompletionProposal[]{};
+ return;
String tagName = getTagName(message);
if(tagName == null)
- return new IJavaCompletionProposal[]{};
+ return;
IFile file = MarkerResolutionUtils.getFile();
if(file == null)
- return new IJavaCompletionProposal[]{};
+ return;
if(!validatePrefix(file, start, prefix)){
- return new IJavaCompletionProposal[]{};
+ return;
}
Object additionalInfo = ta.getAdditionalFixInfo();
@@ -139,6 +160,9 @@
IDOMDocument xmlDocument = (model instanceof IDOMModel) ? ((IDOMModel) model).getDocument() : null;
IKbProject kbProject = KbProjectFactory.getKbProject(file.getProject(), true);
+ if(kbProject == null){
+ return;
+ }
List<ITagLibrary> libraries = kbProject.getAllTagLibraries();
ArrayList<String> names = new ArrayList<String>();
@@ -171,7 +195,28 @@
}
}
+ }
+
+ private IJavaCompletionProposal[] findProposals(Annotation annotation, Position position){
+ ArrayList<IJavaCompletionProposal> proposals = new ArrayList<IJavaCompletionProposal>();
+ if(!(annotation instanceof TemporaryAnnotation)){
+ return new IJavaCompletionProposal[]{};
+ }
+ TemporaryAnnotation ta = (TemporaryAnnotation)annotation;
+ String message = annotation.getText();
+ if(ta.getPosition() == null)
+ return new IJavaCompletionProposal[]{};
+
+ final int start = position.getOffset();
+
+ final int end = position.getOffset()+position.getLength();
+
+ if(message.startsWith(UNKNOWN_TAG)){
+ getAddTLD(proposals, ta, message, start, end);
+ }else if(message.startsWith(MISSING_ATTRIBUTE)){
+ getAddAttribute(proposals, ta, message, start, end);
+ }
return proposals.toArray(new IJavaCompletionProposal[]{});
}
@@ -184,35 +229,45 @@
return null;
}
- private IMarkerResolution[] isOurCase(IMarker marker) throws CoreException{
- ArrayList<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
- String message = (String)marker.getAttribute(IMarker.MESSAGE);
+ private void getAddAttribute(ArrayList<IMarkerResolution> resolutions, IMarker marker, String message, int start, int end) throws CoreException{
+ String attributeName = getAttributeName(message);
- Integer attribute = ((Integer)marker.getAttribute(IMarker.CHAR_START));
- if(attribute == null)
- return new IMarkerResolution[]{};
- final int start = attribute.intValue();
+ IFile file = (IFile)marker.getResource();
- attribute = ((Integer)marker.getAttribute(IMarker.CHAR_END));
- if(attribute == null)
- return new IMarkerResolution[]{};
- final int end = attribute.intValue();
-
- if(!message.startsWith(UNKNOWN_TAG))
- return new IMarkerResolution[]{};
-
+ FileEditorInput input = new FileEditorInput(file);
+ IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input);
+ IDocument document = provider.getDocument(input);
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ try {
+ smw.init(document);
+ Document xmlDocument = smw.getDocument();
+ if (xmlDocument == null) return;
+
+ Node node = Utils.findNodeForOffset(xmlDocument, start);
+
+ if (node == null) return;
+
+ String tagName = node.getNodeName();
+
+ resolutions.add(new AddAttributeMarkerResolution(file, node, attributeName, start, end));
+ } finally {
+ smw.dispose();
+ }
+ }
+
+ private void getAddTLD(ArrayList<IMarkerResolution> resolutions, IMarker marker, String message, int start, int end) throws CoreException{
String prefix = getPrifix(message);
if(prefix == null)
- return new IMarkerResolution[]{};
+ return;
String tagName = getTagName(message);
if(tagName == null)
- return new IMarkerResolution[]{};
+ return;
IFile file = (IFile)marker.getResource();
if(!validatePrefix(file, start, prefix)){
- return new IMarkerResolution[]{};
+ return;
}
IKbProject kbProject = KbProjectFactory.getKbProject(file.getProject(), true);
@@ -245,7 +300,28 @@
names.add(resolutionName);
}
}
+ }
+
+ private IMarkerResolution[] findResolutions(IMarker marker) throws CoreException{
+ ArrayList<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
+ String message = (String)marker.getAttribute(IMarker.MESSAGE);
+ Integer attribute = ((Integer)marker.getAttribute(IMarker.CHAR_START));
+ if(attribute == null)
+ return new IMarkerResolution[]{};
+ final int start = attribute.intValue();
+
+ attribute = ((Integer)marker.getAttribute(IMarker.CHAR_END));
+ if(attribute == null)
+ return new IMarkerResolution[]{};
+ final int end = attribute.intValue();
+
+ if(message.startsWith(UNKNOWN_TAG)){
+ getAddTLD(resolutions, marker, message, start, end);
+ }else if(message.startsWith(MISSING_ATTRIBUTE)){
+ getAddAttribute(resolutions, marker, message, start, end);
+ }
+
return resolutions.toArray(new IMarkerResolution[]{});
}
@@ -280,6 +356,22 @@
return tagName;
}
+
+ public static String getAttributeName(String message){
+ String attributeName=""; //$NON-NLS-1$
+
+ int start = message.indexOf("\""); //$NON-NLS-1$
+ if(start < 0)
+ return null;
+
+ int end = message.lastIndexOf("\""); //$NON-NLS-1$
+ if(end < 0)
+ return null;
+
+ attributeName = message.substring(start+1, end);
+
+ return attributeName;
+ }
@Override
public boolean hasResolutions(IMarker marker) {
@@ -300,6 +392,6 @@
@Override
public IJavaCompletionProposal[] getProposals(Annotation annotation, Position position) {
- return isOurCase(annotation, position);
+ return findProposals(annotation, position);
}
}
\ No newline at end of file
12 years, 3 months
JBoss Tools SVN: r44387 - in trunk/tests: scripts/installation-updates/src/main/groovy and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2012-10-09 17:24:50 -0400 (Tue, 09 Oct 2012)
New Revision: 44387
Modified:
trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java
trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy
Log:
Added support for installing selected IUs in testInstall.groovy
Modified: trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java 2012-10-09 19:13:10 UTC (rev 44386)
+++ trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java 2012-10-09 21:24:50 UTC (rev 44387)
@@ -87,7 +87,7 @@
if(selectedIUs != null){
//select IUs to install
for(String iu : selectedIUs.split(",")){
- assertFalse("IU: \"" + iu + "\" NOT FOUND!", !checkIU(iu));
+ assertFalse("Unit: \"" + iu + "\" NOT FOUND!", !checkIU(iu));
}
} else {
Modified: trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy
===================================================================
--- trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy 2012-10-09 19:13:10 UTC (rev 44386)
+++ trunk/tests/scripts/installation-updates/src/main/groovy/testInstall.groovy 2012-10-09 21:24:50 UTC (rev 44387)
@@ -2,6 +2,7 @@
import java.text.SimpleDateFormat;
void usage() {
+ println "-------------------------------------------------------------";
println "Script to test installation";
println "usage: groovy.sh testInstall.groovy <eclipse_home> <file_containing_list_of_sites|repository_url|CHECK_FOR_UPDATES>*";
println " <eclipse_home>: an eclipse installation will be performed on";
@@ -9,11 +10,15 @@
println " separated by spaces or line breaks";
println " <repository_url>: URL of a p2 repo to install from";
println " CHECK_FOR_UPDATES: will trigger the check for updates";
+ println "--------------------------------------------------------------";
+ println "usage for installing selected units: groovy.sh -DIUs=\"comma separated list of features\" testInstall.groovy <eclipse_home> <repository_url>";
+ println "--------------------------------------------------------------";
}
// Takes a repo or a directory.xml URL single parameter
void installUrl(String repoUrl, File eclipseHome, String product) {
+
if (repoUrl.endsWith(".xml")) {
installFromCentral(repoUrl, eclipseHome, product);
} else if (repoUrl.equals("CHECK_FOR_UPDATES")) {
@@ -28,6 +33,12 @@
void installRepo(String repoUrl, File eclipseHome, String productName) {
println("Installing content from " + repoUrl);
String additionalVMArgs = "-DUPDATE_SITE=" + repoUrl;
+
+ String ius = System.properties['IUs'];
+ if(ius != null){
+ println("Units to install:" + ius);
+ additionalVMArgs += " -DIUs=\"" + ius + "\"";
+ }
runSWTBotInstallRoutine(eclipseHome, productName, additionalVMArgs, "org.jboss.tools.tests.installation.InstallTest");
}
@@ -82,9 +93,10 @@
// Takes a Central directory.xml URL single parameter
void installFromCentral(String discoveryUrl, File eclipseHome, String productName) {
- println("Installing content from " + discoveryUrl);
- String report = "TEST-install-" + new SimpleDateFormat("yyyyMMddh-hmm").format(new Date()) + ".xml";
- runSWTBotInstallRoutine(eclipseHome, productName, "-Djboss.discovery.directory.url=" + discoveryUrl, "org.jboss.tools.tests.installation.InstallFromCentralTest");
+ println("Installing content from " + discoveryUrl);
+ String additionalVMArgs = "-Djboss.discovery.directory.url=" + discoveryUrl;
+
+ runSWTBotInstallRoutine(eclipseHome, productName, additionalVMArgs, "org.jboss.tools.tests.installation.InstallFromCentralTest");
}
// Check for updates
@@ -105,6 +117,13 @@
System.exit(2);
}
+if(System.properties['IUs'] && (args.length != 2)){
+ println("Installing selected/filtered Units is supported only from one repository_url!");
+ usage();
+ System.exit(2);
+}
+
+
println "Preparing tests, installing framework";
// Install test framework
12 years, 3 months
JBoss Tools SVN: r44386 - trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-10-09 15:13:10 -0400 (Tue, 09 Oct 2012)
New Revision: 44386
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java
Log:
Reduced the set of tests temporarily - to focus on MAC failures
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java 2012-10-09 18:54:57 UTC (rev 44385)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java 2012-10-09 19:13:10 UTC (rev 44386)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.esb.ui.bot.tests;
+import org.jboss.tools.esb.ui.bot.tests.examples.SimpleMylyn;
import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorld;
import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorldAction;
import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorldFileAction;
@@ -31,7 +32,8 @@
CreateRuntimeFromSOA.class,
NewProjectUsingRuntime.class,
NewProjectUsingBundledInEAP.class,
- Editing.class,
+// SimpleMylyn.class
+// Editing.class
HelloWorld.class,
HelloWorldAction.class,
HelloWorldFileAction.class,
12 years, 3 months
JBoss Tools SVN: r44385 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-10-09 14:54:57 -0400 (Tue, 09 Oct 2012)
New Revision: 44385
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java
Log:
Minor change to log message only
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java 2012-10-09 17:44:43 UTC (rev 44384)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java 2012-10-09 18:54:57 UTC (rev 44385)
@@ -150,7 +150,7 @@
}
/* ldimaggi - debugging failures of SOA examples on Jenkins/Mac */
- log.info("wait until shell closes");
+ log.info("waiting until shell closes");
try {
bot.waitUntil(shellCloses(shell),Timing.time(projSize*20*1000));;
}
12 years, 3 months
JBoss Tools SVN: r44384 - trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-10-09 13:44:43 -0400 (Tue, 09 Oct 2012)
New Revision: 44384
Modified:
trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b/compositeArt...
trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b/compositeCon...
Log:
JBDS-2281, JBDS-2282 bump up to latest subclipse 1.8 and testng 6.7
Modified: trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b/compositeArt...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b/compositeArt... 2012-10-09 15:40:41 UTC (rev 44383)
+++ trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b/compositeArt... 2012-10-09 17:44:43 UTC (rev 44384)
@@ -3,7 +3,7 @@
<repository name='JBoss Tools Requirements - Composite Indigo Mirror - Extras' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1349454219000'/>
+<property name='p2.timestamp' value='1349804567000'/>
</properties>
<children size='8'>
@@ -25,11 +25,11 @@
<!-- TODO: JBDS-2280 bump up to 3.0.0.201208090952-RELEASE -->
<child location='../../../requirements/springide/2.7.2.201109122348/'/>
-<!-- TODO: JBDS-2282 bump to 1.8.16_1.7.5.v1 -->
-<child location='../../../requirements/subclipse/1.6_1.3/'/>
+<!-- JBDS-2282 -->
+<child location='../../../requirements/subclipse/1.8.16_1.7.5.v1//'/>
-<!-- TODO: JBDS-2281 bump to 6.7.0.20120825_1316 -->
-<child location='../../../requirements/testng/6.1.1.20110823_1537/'/>
+<!-- JBDS-2281 -->
+<child location='../../../requirements/testng/6.7.0.20120825_1316/'/>
<!-- JBDS-2189 remove <child location='../../../requirements/jslint/1.5/'/> -->
<!-- JBDS-2278 remove as not included in Central (there is an Indigo version available if we want it later) <child location='../../../requirements/subversive/0.7.9_2.2.2_1.3/'/> -->
Modified: trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b/compositeCon...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b/compositeCon... 2012-10-09 15:40:41 UTC (rev 44383)
+++ trunk/download.jboss.org/jbosstools/updates/juno/extras/SR0b/compositeCon... 2012-10-09 17:44:43 UTC (rev 44384)
@@ -3,7 +3,7 @@
<repository name='JBoss Tools Requirements - Composite Indigo Mirror - Extras' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1349454219000'/>
+<property name='p2.timestamp' value='1349804567000'/>
</properties>
<children size='8'>
@@ -25,11 +25,11 @@
<!-- TODO: JBDS-2280 bump up to 3.0.0.201208090952-RELEASE -->
<child location='../../../requirements/springide/2.7.2.201109122348/'/>
-<!-- TODO: JBDS-2282 bump to 1.8.16_1.7.5.v1 -->
-<child location='../../../requirements/subclipse/1.6_1.3/'/>
+<!-- JBDS-2282 -->
+<child location='../../../requirements/subclipse/1.8.16_1.7.5.v1//'/>
-<!-- TODO: JBDS-2281 bump to 6.7.0.20120825_1316 -->
-<child location='../../../requirements/testng/6.1.1.20110823_1537/'/>
+<!-- JBDS-2281 -->
+<child location='../../../requirements/testng/6.7.0.20120825_1316/'/>
<!-- JBDS-2189 remove <child location='../../../requirements/jslint/1.5/'/> -->
<!-- JBDS-2278 remove as not included in Central (there is an Indigo version available if we want it later) <child location='../../../requirements/subversive/0.7.9_2.2.2_1.3/'/> -->
12 years, 3 months
JBoss Tools SVN: r44382 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-10-09 11:33:34 -0400 (Tue, 09 Oct 2012)
New Revision: 44382
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java
Log:
The downloading shell is not detected when running on Mac/Jekins - trapping the exception
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java 2012-10-09 15:12:20 UTC (rev 44381)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java 2012-10-09 15:33:34 UTC (rev 44382)
@@ -127,7 +127,7 @@
//assertTrue(String.format("Example project name changed, have '%s', expected '%s'",hasProjName,getProjectNames()[0]),hasProjName.equals(getProjectNames()[0]));
int projSize = getProjectSize(wiz.textWithLabel(JBossToolsProjectExamples.TEXT_PROJECT_SIZE).getText());
wiz.button(IDELabel.Button.FINISH).click();
-
+
/* ldimaggi - debugging failures of SOA examples on Jenkins/Mac */
SWTBotShell shell = null;
log.info("Downloading the example");
@@ -135,22 +135,30 @@
shell = bot.shell("Downloading...");
}
catch (Exception E) {
- log.error("Could not find the Downloading... shell: " + E.getMessage());
+ log.error("Could not find the Downloading... shell: " + shell.getText() + E.getMessage());
E.printStackTrace();
}
- log.info("Activate the downloading shell");
/* ldimaggi - debugging failures of SOA examples on Jenkins/Mac */
+ log.info("Activate the downloading shell");
try {
shell.activate();
}
catch (Exception E) {
- log.error("Could not activate shell: " + E.getMessage());
+ log.error("Could not activate shell: " + shell.getText() + E.getMessage());
E.printStackTrace();
}
+ /* ldimaggi - debugging failures of SOA examples on Jenkins/Mac */
log.info("wait until shell closes");
- bot.waitUntil(shellCloses(shell),Timing.time(projSize*20*1000));
+ try {
+ bot.waitUntil(shellCloses(shell),Timing.time(projSize*20*1000));;
+ }
+ catch (Exception E) {
+ log.error("Could not wait for shell to close: " + shell.getText() + E.getMessage());
+ E.printStackTrace();
+ }
+
log.info("wait for ignored jobs");
util.waitForNonIgnoredJobs(Timing.time20S());
12 years, 3 months
JBoss Tools SVN: r44381 - trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2012-10-09 11:12:20 -0400 (Tue, 09 Oct 2012)
New Revision: 44381
Modified:
trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallFromCentralTest.java
trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java
Log:
Modified: trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallFromCentralTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallFromCentralTest.java 2012-10-09 14:41:00 UTC (rev 44380)
+++ trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallFromCentralTest.java 2012-10-09 15:12:20 UTC (rev 44381)
@@ -75,7 +75,7 @@
public String getFailureMessage() {
return "Blocking while calculating deps";
}
- }, 10 * 60000); // 5 minutes timeout
+ }, 10 * 60000); // 10 minutes timeout
if (this.bot.activeShell().getText().equals("Problem Occured")) {
String reason = this.bot.text().getText();
Assert.fail("Could not install Central content from " + System.getProperty("org.jboss.tools.central.discovery") + "\n" + reason);
Modified: trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java 2012-10-09 14:41:00 UTC (rev 44380)
+++ trunk/tests/plugins/org.jboss.tools.tests.installation/src/org/jboss/tools/tests/installation/InstallTest.java 2012-10-09 15:12:20 UTC (rev 44381)
@@ -109,7 +109,7 @@
public String getFailureMessage() {
return "Blocking while calculating deps";
}
- }, 10 * 60000); // 5 minutes timeout
+ }, 10 * 60000); // 10 minutes timeout
try {
continueInstall(bot);
} catch (InstallFailureException ex) {
@@ -145,7 +145,7 @@
public String getFailureMessage() {
return null;
}
- }, 40 * 60000); // 40 minutes_tino
+ }, 60 * 60000); // 40 minutes_tino
if (bot.activeShell().getText().equals("Security Warning")) {
bot.button("OK").click();
System.err.println("OK clicked");
@@ -181,10 +181,6 @@
// Eclipse 4.2 => "No"
restartShellBot.button("No").click();
}
- } catch (TimeoutException ex) {
-
- fail("Installation Timeout Exception: " + ex.getMessage());
-
} catch (Exception ex) {
String installDesc = bot.text().getText();
12 years, 3 months