JBoss Tools SVN: r42064 - trunk/build/util.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-06-18 14:51:38 -0400 (Mon, 18 Jun 2012)
New Revision: 42064
Added:
trunk/build/util/purgeRemoteFiles.sh
trunk/build/util/purgeRemoteFolders.sh
Log:
add two scripts to purge remote files over sftp/rsync (to clean up download.jboss.org) JBIDE-12208
Added: trunk/build/util/purgeRemoteFiles.sh
===================================================================
--- trunk/build/util/purgeRemoteFiles.sh (rev 0)
+++ trunk/build/util/purgeRemoteFiles.sh 2012-06-18 18:51:38 UTC (rev 42064)
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# first need a list of files to purge, like this:
+#
+#tools/updates/requirements/testng/.gitignore
+#tools/updates/requirements/swtbot/.gitignore
+
+# can get such a file like this:
+# rsync -Pr --rsh=ssh --protocol=28 $TOOLS -f "+ */" -f "+ .git*" -f "- *" | tee ~/tmp/dotsvn.files.list.txt
+# then clean out file metadata (sed -i "s#.+ tools/#tools/#g" file)
+# then purge all but the files you want (eg., .gitignore)
+
+DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/
+inputfile=/home/nboldt/tmp/dotsvn.files.list.grepped.txt
+if [[ $1 ]]; then inputfile=$1; fi
+
+for l in $(cat ${inputfile}); do
+ echo "$l ...";
+ # make it editable
+ echo "chmod 777 $l" | sftp ${DESTINATION}
+ # remove the now-empty dir
+ echo "rm $l" | sftp ${DESTINATION}
+done
Property changes on: trunk/build/util/purgeRemoteFiles.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/build/util/purgeRemoteFolders.sh
===================================================================
--- trunk/build/util/purgeRemoteFolders.sh (rev 0)
+++ trunk/build/util/purgeRemoteFolders.sh 2012-06-18 18:51:38 UTC (rev 42064)
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# first need a list of folders to purge, like this:
+#
+#tools/builds/staging/_composite_/soa-tooling/3.3.0.Nightly/.svn
+#tools/builds/staging/_composite_/soa-tooling/3.3.0.Beta1/.svn
+#tools/builds/staging/_composite_/soa-tooling/3.3.0.Beta2/.svn
+
+# can get such a file like this:
+# rsync -Pr --rsh=ssh --protocol=28 $TOOLS -f "+ */" -f "+ .svn" -f "+ .git*" -f "- *" | tee ~/tmp/dotsvn.files.list.txt
+# then clean out file metadata (sed -i "s#.+ tools/#tools/#g" file)
+# then purge all but the parent dirs you want (.svn, but not .svn/tmp)
+
+
+DESTINATION=tools@filemgmt.jboss.org:/downloads_htdocs/
+inputfile=/home/nboldt/tmp/dotsvn.folders.list.grepped.txt
+if [[ $1 ]]; then inputfile=$1; fi
+
+tmpdir=/tmp/purgeRemoteFolders.sh.empty
+mkdir ${tmpdir}
+pushd ${tmpdir} >/dev/null
+
+for l in $(cat ${inputfile}); do
+ echo "$l ...";
+ # make it editable
+ echo "chmod 777 $l" | sftp ${DESTINATION}
+ # empty the target folder
+ rsync -rPz --rsh=ssh --protocol=28 --delete ${tmpdir}/ ${DESTINATION}/$l/
+ # remove the now-empty dir
+ echo "rmdir $l" | sftp ${DESTINATION}
+done
+
+popd >/dev/null
+rm -fr ${tmpdir}
Property changes on: trunk/build/util/purgeRemoteFolders.sh
___________________________________________________________________
Added: svn:executable
+ *
13 years, 9 months
JBoss Tools SVN: r42063 - in trunk: cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-06-18 14:49:23 -0400 (Mon, 18 Jun 2012)
New Revision: 42063
Added:
trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAsYouTypeValidationTest.java
trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/src/org/jboss/tools/jst/jsp/test/validation/
trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/src/org/jboss/tools/jst/jsp/test/validation/BaseAsYouTypeValidationTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaValidationTest.java
trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/java/BaseAsYouTypeInJavaValidationTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/validation/JSFAsYouTypeValidationTest.java
trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/META-INF/MANIFEST.MF
Log:
JBIDE-10738
As-you-type EL validation
JUnit tests are updated
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2012-06-18 17:26:56 UTC (rev 42062)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2012-06-18 18:49:23 UTC (rev 42063)
@@ -62,8 +62,13 @@
suite.addTestSuite(ELReferencesQueryParticipantTest.class);
suite.addTestSuite(CATest.class);
suite.addTestSuite(OpenCDINamedBeanDialogTest.class);
- suite.addTestSuite(CDIAsYouTypeInJavaValidationTest.class);
+ /*
+ * The following test is reserved for CDI As-You-Type Validation:
+ *
+ * suite.addTestSuite(CDIAsYouTypeInJavaValidationTest.class);
+ */
+
suiteAll.addTest(new CDICoreTestSetup(suite));
suiteAll.addTestSuite(AddQualifiersToBeanWizardTest.class);
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaValidationTest.java 2012-06-18 17:26:56 UTC (rev 42062)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/validation/java/CDIAsYouTypeInJavaValidationTest.java 2012-06-18 18:49:23 UTC (rev 42063)
@@ -1,25 +1,35 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.cdi.ui.test.validation.java;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
-import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.common.base.test.validation.java.BaseAsYouTypeInJavaValidationTest;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.preferences.ELSeverityPreferences;
-import org.jboss.tools.test.util.ProjectImportTestSetup;
+/**
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
public class CDIAsYouTypeInJavaValidationTest extends TCKTest {
private static final String PAGE_NAME = "JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/el/TestBean.java";
private BaseAsYouTypeInJavaValidationTest baseTest = null;
protected IProject project;
-
private static final String [][] EL2VALIDATE =
{
@@ -59,5 +69,4 @@
}
*/
}
-
}
Added: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAsYouTypeValidationTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAsYouTypeValidationTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAsYouTypeValidationTest.java 2012-06-18 18:49:23 UTC (rev 42063)
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.base.test.validation;
+
+import java.util.Iterator;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+/**
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+public abstract class AbstractAsYouTypeValidationTest extends TestCase {
+ private static final int MAX_SECONDS_TO_WAIT = 10;
+
+ protected String fileName;
+ protected IProject project = null;
+ protected IEditorPart editorPart = null;
+ protected ITextEditor textEditor = null;
+ protected ISourceViewer viewer = null;
+ protected IDocument document = null;
+ protected IFile file = null;
+ IAnnotationModel annotationModel = null;
+
+ public static final String EL2FIND_START = "#{";
+ public static final String EL2FIND_END = "}";
+
+ public AbstractAsYouTypeValidationTest(IProject project) {
+ this.project = project;
+ }
+ public AbstractAsYouTypeValidationTest() {
+ }
+
+ public void openEditor(String fileName) {
+ this.fileName = fileName;
+ editorPart = WorkbenchUtils.openEditor(project.getName()
+ + "/" + fileName); //$NON-NLS-1$
+ obtainEditor(editorPart);
+
+ annotationModel = getAnnotationModel();
+ assertNotNull("Cannot find an Annotation Model for the Java Editor",
+ annotationModel);
+
+ // clean deffered events
+ while (Display.getCurrent().readAndDispatch())
+ ;
+
+ viewer = getTextViewer();
+ document = viewer.getDocument();
+ }
+
+ public void closeEditor() {
+ if (editorPart != null) {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage().closeEditor(editorPart, false);
+ editorPart = null;
+ textEditor = null;
+ viewer = null;
+ document = null;
+ }
+ }
+
+ protected abstract void obtainEditor(IEditorPart editorPart);
+
+ protected IAnnotationModel getAnnotationModel() {
+ final IDocumentProvider documentProvider = textEditor.getDocumentProvider();
+ if (documentProvider == null) {
+ return null;
+ }
+ return documentProvider.getAnnotationModel(textEditor.getEditorInput());
+ }
+
+ protected abstract ISourceViewer getTextViewer();
+
+ public void doAsYouTipeInJavaValidationTest(String elToValidate,
+ String errorMessage) throws JavaModelException, BadLocationException {
+ String documentContent = document.get();
+ int start = (documentContent == null ? -1 : documentContent
+ .indexOf(EL2FIND_START));
+ assertFalse("No EL found in Java Strings: Starting '" + EL2FIND_START
+ + "' characters are not found in document", (start == -1));
+ int end = (documentContent == null ? -1 : documentContent.indexOf(
+ EL2FIND_END, start));
+ assertFalse("EL is not closed in Java Strings: Ending '"
+ + EL2FIND_START + "' characters are not found in document",
+ (end == -1));
+
+ int length = end - start + EL2FIND_END.length();
+
+ document.replace(start, length, elToValidate);
+
+ end = start + elToValidate.length();
+
+ Annotation problemAnnotation = waitForProblemAnnotationAppearance(
+ start, end, MAX_SECONDS_TO_WAIT);
+ assertNotNull("No ProblemAnnotation found!", problemAnnotation);
+
+ String message = problemAnnotation.getText();
+ assertEquals(
+ "Not expected error message found in ProblemAnnotation. Expected: ["
+ + errorMessage + "], Found: [" + message + "]",
+ errorMessage, message);
+ }
+
+ private Annotation waitForProblemAnnotationAppearance(
+ final int start, final int end, final int seconds) {
+ final Annotation[] result = new Annotation[] { null };
+
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ int secondsLeft = seconds;
+ while (secondsLeft-- > 0) {
+ JobUtils.delay(1000);
+
+ // clean deffered events
+ while (Display.getCurrent().readAndDispatch())
+ ;
+
+ annotationModel = getAnnotationModel();
+ boolean found = false;
+ @SuppressWarnings("rawtypes")
+ Iterator it = annotationModel.getAnnotationIterator();
+ while (!found && it.hasNext()) {
+ Object o = it.next();
+
+ if (!(o instanceof Annotation))
+ continue;
+
+ Annotation annotation = (Annotation) o;
+ Position position = annotationModel
+ .getPosition(annotation);
+
+ if (position.getOffset() < start
+ || position.getOffset() >= end)
+ continue;
+
+ if (position.getOffset() + position.getLength() >= end)
+ continue;
+
+
+ if (!isAnnotationAcceptable(annotation))
+ continue;
+
+ result[0] = (Annotation)o;
+ return;
+ }
+ }
+ }
+ });
+
+ return result[0];
+ }
+
+ abstract protected boolean isAnnotationAcceptable(Annotation annotation);
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/AbstractAsYouTypeValidationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/java/BaseAsYouTypeInJavaValidationTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/java/BaseAsYouTypeInJavaValidationTest.java 2012-06-18 17:26:56 UTC (rev 42062)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/validation/java/BaseAsYouTypeInJavaValidationTest.java 2012-06-18 18:49:23 UTC (rev 42063)
@@ -10,54 +10,24 @@
******************************************************************************/
package org.jboss.tools.common.base.test.validation.java;
-import java.util.Iterator;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.WorkingCopyOwner;
import org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.ProblemAnnotation;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.jboss.tools.test.util.JobUtils;
-import org.jboss.tools.test.util.WorkbenchUtils;
+import org.jboss.tools.common.base.test.validation.AbstractAsYouTypeValidationTest;
/**
*
* @author Victor V. Rubezhny
*
*/
-public class BaseAsYouTypeInJavaValidationTest extends TestCase {
- private static final int MAX_SECONDS_TO_WAIT = 10;
-
- protected String fileName;
- protected IProject project = null;
- protected IEditorPart editorPart = null;
- protected JavaEditor javaEditor = null;
- protected ISourceViewer viewer = null;
- protected IDocument document = null;
- protected IFile file = null;
- IAnnotationModel annotationModel = null;
-
- /** The working copy owner */
- protected final WorkingCopyOwner workingCopyOwner = new WorkingCopyOwner() {
- };
-
+@SuppressWarnings("restriction")
+public class BaseAsYouTypeInJavaValidationTest extends AbstractAsYouTypeValidationTest {
public static final String MARKER_TYPE = "org.jboss.tools.common.validation.el"; //$NON-NLS-1$
- public static final String EL2FIND_START = "#{";
- public static final String EL2FIND_END = "}";
public BaseAsYouTypeInJavaValidationTest(IProject project) {
this.project = project;
@@ -65,144 +35,39 @@
public BaseAsYouTypeInJavaValidationTest() {
}
- public void openEditor(String fileName) {
- this.fileName = fileName;
- editorPart = WorkbenchUtils.openEditor(project.getName()
- + "/" + fileName); //$NON-NLS-1$
- obtainJavaEditor(editorPart);
- viewer = getTextViewer();
- document = viewer.getDocument();
- }
-
- public void closeEditor() {
- if (editorPart != null) {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getActivePage().closeEditor(editorPart, false);
- editorPart = null;
- javaEditor = null;
- viewer = null;
- document = null;
- }
- }
-
- protected void obtainJavaEditor(IEditorPart editorPart) {
+ @Override
+ protected void obtainEditor(IEditorPart editorPart) {
if (!(editorPart instanceof JavaEditor)
|| editorPart instanceof ClassFileEditor)
return;
- javaEditor = (JavaEditor) editorPart;
+ textEditor = (JavaEditor) editorPart;
assertNotNull(
"Cannot get the Java Text Editor instance for Java Class file \"" //$NON-NLS-1$
- + fileName + "\"", javaEditor);
+ + fileName + "\"", textEditor);
assertTrue("Java Editor is opened for a binary Java Class",
- javaEditor.getEditorInput() instanceof IFileEditorInput);
- file = ((IFileEditorInput) javaEditor.getEditorInput()).getFile();
+ textEditor.getEditorInput() instanceof IFileEditorInput);
+ file = ((IFileEditorInput) textEditor.getEditorInput()).getFile();
assertNotNull("Java Editor is opened for a binary Java Class", file);
-
- annotationModel = getAnnotationModel();
- assertNotNull("Cannot find an Annotation Model for the Java Editor",
- annotationModel);
-
- // clean deffered events
- while (Display.getCurrent().readAndDispatch())
- ;
}
- protected IAnnotationModel getAnnotationModel() {
- final IDocumentProvider documentProvider = javaEditor
- .getDocumentProvider();
- if (documentProvider == null) {
- return null;
- }
- return documentProvider.getAnnotationModel(javaEditor.getEditorInput());
- }
-
protected ISourceViewer getTextViewer() {
- return javaEditor != null ? javaEditor.getViewer() : null;
+ return textEditor instanceof JavaEditor ? ((JavaEditor)textEditor).getViewer() : null;
}
- public void doAsYouTipeInJavaValidationTest(String elToValidate,
- String errorMessage) throws JavaModelException, BadLocationException {
- String documentContent = document.get();
- int start = (documentContent == null ? -1 : documentContent
- .indexOf(EL2FIND_START));
- assertFalse("No EL found in Java Strings: Starting '" + EL2FIND_START
- + "' characters are not found in document", (start == -1));
- int end = (documentContent == null ? -1 : documentContent.indexOf(
- EL2FIND_END, start));
- assertFalse("EL is not closed in Java Strings: Ending '"
- + EL2FIND_START + "' characters are not found in document",
- (end == -1));
+ @Override
+ protected boolean isAnnotationAcceptable(Annotation annotation) {
+ if (!(annotation instanceof ProblemAnnotation))
+ return false;
- int offset = start;
- int length = end - start + EL2FIND_END.length();
+ ProblemAnnotation problemAnnotation = (ProblemAnnotation) annotation;
- document.replace(start, length, elToValidate);
+ String markerType = problemAnnotation.getMarkerType();
+ if (!MARKER_TYPE.equalsIgnoreCase(markerType))
+ return false;
- end = start + elToValidate.length();
-
- ProblemAnnotation problemAnnotation = waitForProblemAnnotationAppearance(
- start, end, MARKER_TYPE, MAX_SECONDS_TO_WAIT);
- assertNotNull("No ProblemAnnotation found for Marker Type: "
- + MARKER_TYPE, problemAnnotation);
-
- String message = problemAnnotation.getText();
- assertEquals(
- "Not expected error message found in ProblemAnnotation. Expected: ["
- + errorMessage + "], Found: [" + message + "]",
- errorMessage, message);
+ return true;
}
-
- private ProblemAnnotation waitForProblemAnnotationAppearance(
- final int start, final int end, final String markerType,
- final int seconds) {
- final ProblemAnnotation[] result = new ProblemAnnotation[] { null };
-
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- int secondsLeft = seconds;
- while (secondsLeft-- > 0) {
- JobUtils.delay(1000);
-
- // clean deffered events
- while (Display.getCurrent().readAndDispatch())
- ;
-
- annotationModel = getAnnotationModel();
- boolean found = false;
- Iterator it = annotationModel.getAnnotationIterator();
- while (!found && it.hasNext()) {
- Object o = it.next();
-
- if (!(o instanceof ProblemAnnotation))
- continue;
-
- ProblemAnnotation problemAnnotation = (ProblemAnnotation) o;
- Position position = annotationModel
- .getPosition(problemAnnotation);
-
- if (position.getOffset() < start
- || position.getOffset() >= end)
- continue;
-
- if (position.getOffset() + position.getLength() >= end)
- continue;
-
- String paMarkerType = problemAnnotation.getMarkerType();
- if (!markerType.equalsIgnoreCase(markerType))
- continue;
-
- System.out.println("Problem: " + problemAnnotation.getText());
- result[0] = problemAnnotation;
- return;
- }
- }
- }
- });
-
- return result[0];
- }
-
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2012-06-18 17:26:56 UTC (rev 42062)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2012-06-18 18:49:23 UTC (rev 42063)
@@ -47,6 +47,7 @@
import org.jboss.tools.jsf.jsp.ca.test.WebContentAssistProviderTest;
import org.jboss.tools.jsf.jsp.hover.ELTooltipTest;
import org.jboss.tools.jsf.ui.test.refactoring.ELReferencesRenameTest;
+import org.jboss.tools.jsf.ui.test.validation.JSFAsYouTypeValidationTest;
import org.jboss.tools.jsf.ui.test.validation.java.JSFAsYouTypeInJavaValidationTest;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -56,6 +57,7 @@
TestSuite suite = new TestSuite("JSF UI tests"); //$NON-NLS-1$
ValidationFramework.getDefault().suspendAllValidation(true);
+
suite.addTestSuite(JBossPerspectiveTest.class);
suite.addTestSuite(NewJSFProjectTest.class);
suite.addTestSuite(CAForUnclosedELTest.class);
@@ -178,6 +180,11 @@
new String[] { "JSF2KickStartWithoutLibs" })); //$NON-NLS-1$
suite.addTest(new ProjectImportTestSetup(new TestSuite(
+ JSFAsYouTypeValidationTest.class), "org.jboss.tools.jsf.base.test", //$NON-NLS-1$
+ new String[] { "projects/JSF2KickStartWithoutLibs", }, //$NON-NLS-1$
+ new String[] { "JSF2KickStartWithoutLibs" })); //$NON-NLS-1$
+
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(
CAJsfPredictiveTagNameProposalsTest.class), "org.jboss.tools.jsf.base.test", //$NON-NLS-1$
new String[] { "projects/JSF2KickStartWithoutLibs", }, //$NON-NLS-1$
new String[] { "JSF2KickStartWithoutLibs" })); //$NON-NLS-1$
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/validation/JSFAsYouTypeValidationTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/validation/JSFAsYouTypeValidationTest.java 2012-06-18 17:26:56 UTC (rev 42062)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/validation/JSFAsYouTypeValidationTest.java 2012-06-18 18:49:23 UTC (rev 42063)
@@ -10,26 +10,16 @@
******************************************************************************/
package org.jboss.tools.jsf.ui.test.validation;
-import java.util.Iterator;
-
import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.common.preferences.SeverityPreferences;
-import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+import org.jboss.tools.jst.jsp.test.validation.BaseAsYouTypeValidationTest;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.preferences.ELSeverityPreferences;
-import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
/**
@@ -37,7 +27,7 @@
* @author Victor V. Rubezhny
*
*/
-public class JSFAsYouTypeValidationTest extends ContentAssistantTestCase {
+public class JSFAsYouTypeValidationTest extends BaseAsYouTypeValidationTest {
private static final String PROJECT_NAME = "JSF2KickStartWithoutLibs";
private static final String PAGE_NAME = "WebContent/pages/inputname.xhtml";
@@ -48,8 +38,6 @@
{"#{['}", "EL syntax error: Expecting expression."}
};
- private static final int MAX_SECONDS_TO_WAIT = 10;
- public static final String MARKER_TYPE = "org.jboss.tools.common.validation.asyoutype"; //$NON-NLS-1$
public static final String EL2FIND_START = "#{";
public static final String EL2FIND_END = "}";
@@ -86,99 +74,4 @@
closeEditor();
}
}
-
- public void doAsYouTipeInJavaValidationTest(String elToValidate,
- String errorMessage) throws JavaModelException, BadLocationException {
- String documentContent = document.get();
- int start = (documentContent == null ? -1 : documentContent
- .indexOf(EL2FIND_START));
- assertFalse("No EL found in Java Strings: Starting '" + EL2FIND_START
- + "' characters are not found in document", (start == -1));
- int end = (documentContent == null ? -1 : documentContent.indexOf(
- EL2FIND_END, start));
- assertFalse("EL is not closed in Java Strings: Ending '"
- + EL2FIND_START + "' characters are not found in document",
- (end == -1));
-
- int offset = start;
- int length = end - start + EL2FIND_END.length();
-
- IProgressMonitor monitor = new NullProgressMonitor();
- document.replace(start, length, elToValidate);
-
- end = start + elToValidate.length();
-
- TemporaryAnnotation problemAnnotation = waitForProblemAnnotationAppearance(
- start, end, MARKER_TYPE, MAX_SECONDS_TO_WAIT);
- assertNotNull("No ProblemAnnotation found for Marker Type: "
- + MARKER_TYPE, problemAnnotation);
-
- String message = problemAnnotation.getText();
- assertEquals(
- "Not expected error message found in ProblemAnnotation. Expected: ["
- + errorMessage + "], Found: [" + message + "]",
- errorMessage, message);
- }
-
- private TemporaryAnnotation waitForProblemAnnotationAppearance(
- final int start, final int end, final String markerType,
- final int seconds) {
- final TemporaryAnnotation[] result = new TemporaryAnnotation[] { null };
-
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- int secondsLeft = seconds;
- while (secondsLeft-- > 0) {
- JobUtils.delay(1000);
-
- // clean deffered events
- while (Display.getCurrent().readAndDispatch())
- ;
-
- IAnnotationModel annotationModel = getAnnotationModel(textEditor);
- boolean found = false;
- Iterator it = annotationModel.getAnnotationIterator();
- while (!found && it.hasNext()) {
- Object o = it.next();
-
- if (!(o instanceof TemporaryAnnotation))
- continue;
-
- TemporaryAnnotation temporaryAnnotation = (TemporaryAnnotation) o;
- Position position = annotationModel
- .getPosition(temporaryAnnotation);
-
- if (position.getOffset() < start
- || position.getOffset() >= end)
- continue;
-
- if (position.getOffset() + position.getLength() >= end)
- continue;
-
- if (temporaryAnnotation.getAttributes() == null && temporaryAnnotation.getAttributes().isEmpty())
- continue;
-
- Object value = temporaryAnnotation.getAttributes().get(MARKER_TYPE);
-
- if (Boolean.TRUE != value)
- continue;
-
- result[0] = temporaryAnnotation;
- return;
- }
- }
- }
- });
-
- return result[0];
- }
-
- protected IAnnotationModel getAnnotationModel(ITextEditor editor) {
- final IDocumentProvider documentProvider = editor.getDocumentProvider();
- if (documentProvider == null) {
- return null;
- }
- return documentProvider.getAnnotationModel(editor.getEditorInput());
- }
-
}
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/META-INF/MANIFEST.MF 2012-06-18 17:26:56 UTC (rev 42062)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/META-INF/MANIFEST.MF 2012-06-18 18:49:23 UTC (rev 42063)
@@ -24,4 +24,5 @@
org.jboss.tools.common.validation
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.jboss.tools.jst.jsp.test.ca
+Export-Package: org.jboss.tools.jst.jsp.test.ca,
+ org.jboss.tools.jst.jsp.test.validation
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/src/org/jboss/tools/jst/jsp/test/validation/BaseAsYouTypeValidationTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/src/org/jboss/tools/jst/jsp/test/validation/BaseAsYouTypeValidationTest.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/src/org/jboss/tools/jst/jsp/test/validation/BaseAsYouTypeValidationTest.java 2012-06-18 18:49:23 UTC (rev 42063)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.jsp.test.validation;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.sse.ui.internal.reconcile.TemporaryAnnotation;
+import org.jboss.tools.common.base.test.validation.AbstractAsYouTypeValidationTest;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+
+/**
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+@SuppressWarnings("restriction")
+public class BaseAsYouTypeValidationTest extends AbstractAsYouTypeValidationTest {
+ public static final String MARKER_TYPE = "org.jboss.tools.common.validation.asyoutype"; //$NON-NLS-1$
+
+ public BaseAsYouTypeValidationTest(IProject project) {
+ this.project = project;
+ }
+ public BaseAsYouTypeValidationTest() {
+ }
+
+ @Override
+ protected void obtainEditor(IEditorPart editorPart) {
+ JSPMultiPageEditor jspEditor = null;
+
+ if (editorPart instanceof JSPMultiPageEditor)
+ jspEditor = (JSPMultiPageEditor) editorPart;
+
+ assertNotNull("Cannot get the JSP Text Editor instance for page \"" //$NON-NLS-1$
+ + fileName + "\"", jspEditor);
+
+ // clean deffered events
+ while (Display.getCurrent().readAndDispatch());
+
+ textEditor = jspEditor.getJspEditor();
+
+ assertNotNull("Cannot get the JSP Text Editor instance for page \"" //$NON-NLS-1$
+ + fileName + "\"", textEditor);
+
+ file = ((IFileEditorInput) textEditor.getEditorInput()).getFile();
+ assertNotNull("Cannot get the JSP Text Editor instance for page \"" //$NON-NLS-1$
+ + fileName + "\"", file);
+ }
+
+ protected ISourceViewer getTextViewer() {
+ return ((StructuredTextEditor)textEditor).getTextViewer();
+ }
+
+ @Override
+ protected boolean isAnnotationAcceptable(Annotation annotation) {
+ if (!(annotation instanceof TemporaryAnnotation))
+ return false;
+
+ TemporaryAnnotation temporaryAnnotation = (TemporaryAnnotation) annotation;
+
+ if (temporaryAnnotation.getAttributes() == null && temporaryAnnotation.getAttributes().isEmpty())
+ return false;
+
+ Object value = temporaryAnnotation.getAttributes().get(MARKER_TYPE);
+
+ if (Boolean.TRUE != value)
+ return false;
+
+ return true;
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.base.test/src/org/jboss/tools/jst/jsp/test/validation/BaseAsYouTypeValidationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 9 months
JBoss Tools SVN: r42062 - workspace/mistria/install-tests/scripts/scenarios.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-06-18 13:26:56 -0400 (Mon, 18 Jun 2012)
New Revision: 42062
Modified:
workspace/mistria/install-tests/scripts/scenarios/update_ko
workspace/mistria/install-tests/scripts/scenarios/update_ok
Log:
JBIDE-11713 : Fixed scenarios.
Modified: workspace/mistria/install-tests/scripts/scenarios/update_ko
===================================================================
--- workspace/mistria/install-tests/scripts/scenarios/update_ko 2012-06-18 17:09:08 UTC (rev 42061)
+++ workspace/mistria/install-tests/scripts/scenarios/update_ko 2012-06-18 17:26:56 UTC (rev 42062)
@@ -1,2 +1,2 @@
-http://download.jboss.org/jbosstools/updates/nightly/core/trunk/
-http://download.jboss.org/jbosstools/updates/JBossTools-3.3.0.Beta2.core/
+http://download.jboss.org/jbosstools/updates/JBossTools-3.3.0.Final.core/
+http://download.jboss.org/jbosstools/updates/development/indigo/
Modified: workspace/mistria/install-tests/scripts/scenarios/update_ok
===================================================================
--- workspace/mistria/install-tests/scripts/scenarios/update_ok 2012-06-18 17:09:08 UTC (rev 42061)
+++ workspace/mistria/install-tests/scripts/scenarios/update_ok 2012-06-18 17:26:56 UTC (rev 42062)
@@ -1,2 +1,3 @@
-http://download.jboss.org/jbosstools/updates/JBossTools-3.3.0.Beta2.core/
-http://download.jboss.org/jbosstools/updates/nightly/core/trunk/
+http://download.jboss.org/jbosstools/updates/development/indigo/
+http://download.jboss.org/jbosstools/updates/JBossTools-3.3.0.Final.core/
+
13 years, 9 months
JBoss Tools SVN: r42061 - trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-06-18 13:09:08 -0400 (Mon, 18 Jun 2012)
New Revision: 42061
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java
Log:
JBIDE-12207 : Bump default Seam version in the JBoss Maven Facet wizard page
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java 2012-06-18 16:09:10 UTC (rev 42060)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java 2012-06-18 17:09:08 UTC (rev 42061)
@@ -157,11 +157,11 @@
if ("2.0".equals(seamFacetVersion.getVersionString())) { //$NON-NLS-1$
seamVersion.setText("2.0.2.SP1"); //$NON-NLS-1$
} else if ("2.1".equals(seamFacetVersion.getVersionString())) { //$NON-NLS-1$
- seamVersion.setText("2.1.1.GA"); //$NON-NLS-1$
+ seamVersion.setText("2.1.2.GA"); //$NON-NLS-1$
} else if ("2.2".equals(seamFacetVersion.getVersionString())) { //$NON-NLS-1$
- seamVersion.setText("2.2.1.Final"); //$NON-NLS-1$
+ seamVersion.setText("2.2.2.Final"); //$NON-NLS-1$
} else if ("2.3".equals(seamFacetVersion.getVersionString())) { //$NON-NLS-1$
- seamVersion.setText("2.3.0.ALPHA"); //$NON-NLS-1$
+ seamVersion.setText("2.3.0.Beta2"); //$NON-NLS-1$
}
Button removeWTPContainers = new Button(composite,SWT.CHECK);
removeWTPContainers.setText(Messages.MavenFacetInstallPage_Remove_WTP_Classpath_containers);
13 years, 9 months
JBoss Tools SVN: r42060 - workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-06-18 12:09:10 -0400 (Mon, 18 Jun 2012)
New Revision: 42060
Modified:
workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests/InstallTest.java
Log:
JBIDE-11713 : Added smarter error reporting
Modified: workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests/InstallTest.java
===================================================================
--- workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests/InstallTest.java 2012-06-18 14:41:21 UTC (rev 42059)
+++ workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests/InstallTest.java 2012-06-18 16:09:10 UTC (rev 42060)
@@ -21,8 +21,16 @@
try {
installFromSite(site);
- } catch (WidgetNotFoundException ex) {
- Assert.fail(ex.getMessage());
+ } catch (Exception ex) {
+ String installDesc = this.bot.text().getText();
+ if (installDesc == null || installDesc.isEmpty()) {
+ throw new RuntimeException("Internal error", ex);
+ }
+ StringBuilder message = new StringBuilder();
+ message.append("Could not install from: " + site);
+ message.append(installDesc);
+ System.err.println(message.toString());
+ Assert.fail(message.toString());
}
}
13 years, 9 months
JBoss Tools SVN: r42059 - in trunk/requirements: teiid and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2012-06-18 10:41:21 -0400 (Mon, 18 Jun 2012)
New Revision: 42059
Added:
trunk/requirements/teiid/
trunk/requirements/teiid/build.properties
trunk/requirements/teiid/buildRequirement.xml
Removed:
trunk/requirements/teiid-7.4.0.Final/
trunk/requirements/teiid-7.5.0.Final/
trunk/requirements/teiid-7.6.0.Final/
trunk/requirements/teiid-7.7.0.Final/
trunk/requirements/teiid-8.0.0.Alpha1/
Log:
JBIDE-12088 Merge all Teiid requirement builders (7.4 - 8.0) into a single target. Updated as recommended in the description and tested.
Added: trunk/requirements/teiid/build.properties
===================================================================
--- trunk/requirements/teiid/build.properties (rev 0)
+++ trunk/requirements/teiid/build.properties 2012-06-18 14:41:21 UTC (rev 42059)
@@ -0,0 +1,29 @@
+teiid80.build.uri=http://sourceforge.net/projects/teiid/files/teiid/8.0/alpha1
+teiid80.build.name=teiid-8.0.0.alpha1-jboss-dist
+teiid80.build.archive=${teiid80.build.name}.zip
+teiid80.build.archive.root=teiid-8.0.0.Alpha1
+teiid80.build.archive.md5=1856eb444c774d8d0134e81cf0999fd4
+
+teiid77.build.uri=http://sourceforge.net/projects/teiid/files/teiid/7.7/Final
+teiid77.build.name=teiid-7.7.0.Final-jboss-dist
+teiid77.build.archive=${teiid77.build.name}.zip
+teiid77.build.archive.root=teiid-7.7.0.Final
+teiid77.build.archive.md5=d5107e33b5c18673cbc74698e08b7612
+
+teiid76.build.uri=http://sourceforge.net/projects/teiid/files/teiid/7.6/Final
+teiid76.build.name=teiid-7.6.0.Final-jboss-dist
+teiid76.build.archive=${teiid76.build.name}.zip
+teiid76.build.archive.root=teiid-7.6.0.Final
+teiid76.build.archive.md5=0a5a388c4c7b51134c8c12b7f885c1ff
+
+teiid75.build.uri=http://sourceforge.net/projects/teiid/files/teiid/7.5/Final
+teiid75.build.name=teiid-7.5.0.Final-jboss-dist
+teiid75.build.archive=${teiid75.build.name}.zip
+teiid75.build.archive.root=teiid-7.5.0.Final
+teiid75.build.archive.md5=8b33f8780fce327904d338987001df26
+
+teiid74.build.uri=http://sourceforge.net/projects/teiid/files/teiid/7.4/Final
+teiid74.build.name=teiid-7.4.0.Final-jboss-dist
+teiid74.build.archive=${teiid74.build.name}.zip
+teiid74.build.archive.md5=fb8bc9b737dbff20715260bc1e17f5b6
+teiid74.build.archive.root=teiid-7.4.0.Final
\ No newline at end of file
Property changes on: trunk/requirements/teiid/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/requirements/teiid/buildRequirement.xml
===================================================================
--- trunk/requirements/teiid/buildRequirement.xml (rev 0)
+++ trunk/requirements/teiid/buildRequirement.xml 2012-06-18 14:41:21 UTC (rev 42059)
@@ -0,0 +1,58 @@
+<project default="build.requirement">
+
+ <property file="build.properties"/>
+
+ <target name="build.this">
+ <ant antfile="../generic/build.xml" target="build.driver" inheritall="true">
+ <property name="driver.properties" value="${basedir}/build.properties"/>
+ <property name="requirement" value="${requirement.name}"/>
+ <property name="unzip.dest" value="${unzip.dest}"/>
+ <property name="md5" value="${md5}" />
+ </ant>
+ </target>
+
+ <target name="build.requirement">
+
+ <antcall target="build.this">
+ <param name="build.uri" value="${teiid80.build.uri}"/>
+ <param name="build.archive" value="${teiid80.build.archive}"/>
+ <param name="requirement.name" value="${teiid80.build.name}"/>
+ <param name="unzip.dest" value="../target/${teiid80.build.archive.root}"/>
+ <param name="md5" value="${teiid80.build.archive.md5}" />
+ </antcall>
+
+ <antcall target="build.this">
+ <param name="build.uri" value="${teiid77.build.uri}"/>
+ <param name="build.archive" value="${teiid77.build.archive}"/>
+ <param name="requirement.name" value="${teiid77.build.name}"/>
+ <param name="unzip.dest" value="../target/${teiid77.build.archive.root}"/>
+ <param name="md5" value="${teiid77.build.archive.md5}" />
+ </antcall>
+
+ <antcall target="build.this">
+ <param name="build.uri" value="${teiid76.build.uri}"/>
+ <param name="build.archive" value="${teiid76.build.archive}"/>
+ <param name="requirement.name" value="${teiid76.build.name}"/>
+ <param name="unzip.dest" value="../target/${teiid76.build.archive.root}"/>
+ <param name="md5" value="${teiid76.build.archive.md5}" />
+ </antcall>
+
+ <antcall target="build.this">
+ <param name="build.uri" value="${teiid75.build.uri}"/>
+ <param name="build.archive" value="${teiid75.build.archive}"/>
+ <param name="requirement.name" value="${teiid75.build.name}"/>
+ <param name="unzip.dest" value="../target/${teiid75.build.archive.root}"/>
+ <param name="md5" value="${teiid75.build.archive.md5}" />
+ </antcall>
+
+ <antcall target="build.this">
+ <param name="build.uri" value="${teiid74.build.uri}"/>
+ <param name="build.archive" value="${teiid74.build.archive}"/>
+ <param name="requirement.name" value="${teiid74.build.name}"/>
+ <param name="unzip.dest" value="../target/${teiid74.build.archive.root}"/>
+ <param name="md5" value="${teiid74.build.archive.md5}" />
+ </antcall>
+
+ </target>
+
+</project>
Property changes on: trunk/requirements/teiid/buildRequirement.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 9 months
JBoss Tools SVN: r42058 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-06-18 10:18:46 -0400 (Mon, 18 Jun 2012)
New Revision: 42058
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
Log:
fixing nature of ws all bot tests
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project 2012-06-18 11:42:58 UTC (rev 42057)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project 2012-06-18 14:18:46 UTC (rev 42058)
@@ -26,18 +26,12 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
13 years, 9 months
JBoss Tools SVN: r42057 - workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-06-18 07:42:58 -0400 (Mon, 18 Jun 2012)
New Revision: 42057
Modified:
workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests/InstallTest.java
Log:
JBIDE-11713 : Added smarter error reporting
Modified: workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests/InstallTest.java
===================================================================
--- workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests/InstallTest.java 2012-06-18 09:34:00 UTC (rev 42056)
+++ workspace/mistria/install-tests/plugins/org.jboss.tools.qa.install.tests/src/org/jboss/tools/qa/install/tests/InstallTest.java 2012-06-18 11:42:58 UTC (rev 42057)
@@ -15,10 +15,18 @@
public class InstallTest extends SWTBotEclipseTestCase {
@Test
- public void testInstall() {
+ public void testInstall() throws Exception {
String site = System.getProperty("UPDATE_SITE");
Assert.assertNotNull("No site specified, set UPDATE_SITE system property first", site);
+ try {
+ installFromSite(site);
+ } catch (WidgetNotFoundException ex) {
+ Assert.fail(ex.getMessage());
+ }
+ }
+
+ private void installFromSite(String site) {
this.bot.menu("Help").menu("Install New Software...").click();
this.bot.shell("Install").bot().button("Add...").click();
this.bot.shell("Add Repository").activate().setFocus();
13 years, 9 months
JBoss Tools SVN: r42056 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-06-18 05:34:00 -0400 (Mon, 18 Jun 2012)
New Revision: 42056
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
Log:
JBIDE-12046 and JBIDE-12201 to trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java 2012-06-18 03:48:01 UTC (rev 42055)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/AbstractRSELaunchDelegate.java 2012-06-18 09:34:00 UTC (rev 42056)
@@ -44,11 +44,13 @@
behavior.setServerStopped();
throw new CoreException(new Status(IStatus.ERROR,
org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
- MessageFormat.format("Could not execute command on remote server {0}", behavior.getServer().getName()), sme));
+ MessageFormat.format("Could not execute command on remote server {0}. Please ensure the server is reachable.", behavior.getServer().getName()), sme));
}
}
// Only for debugging
private void addShellOutputListener(IHostShell shell) {
+ if( shell == null )
+ return; // No listener needed for a null shell.
IHostShellOutputListener listener = null;
listener = new IHostShellOutputListener() {
public void shellOutputChanged(IHostShellChangeEvent event) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java 2012-06-18 03:48:01 UTC (rev 42055)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEHostShellModel.java 2012-06-18 09:34:00 UTC (rev 42056)
@@ -109,6 +109,8 @@
startupShell = hs;
startupShell.addOutputListener(listener);
return hs;
+ } catch(SystemMessageException sme) {
+ throw sme;
} catch(RuntimeException re) {
throw new CoreException(new Status(IStatus.ERROR, org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
re.getMessage(), re));
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-06-18 03:48:01 UTC (rev 42055)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-06-18 09:34:00 UTC (rev 42056)
@@ -23,12 +23,16 @@
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.files.IFileService;
+import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.Trace;
+import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.publishers.AbstractPublishMethod;
+import org.jboss.ide.eclipse.as.core.publishers.AbstractServerToolsPublisher;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.IPublishCopyCallbackHandler;
@@ -39,6 +43,7 @@
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel.ServerShellModel;
+import org.jboss.ide.eclipse.as.rse.core.RSERemotePublishHandler.RunnableWithProgress2;
public class RSEPublishMethod extends AbstractPublishMethod {
@@ -64,11 +69,15 @@
public void publishStart(DeployableServerBehavior behaviour,
IProgressMonitor monitor) throws CoreException {
- super.publishStart(behaviour, monitor);
+ monitor.beginTask("Beginning Publish for server " + behaviour.getServer().getName(), 300);
+ super.publishStart(behaviour, AbstractServerToolsPublisher.getSubMon(monitor, 100));
this.behaviour = behaviour;
loadRemoteDeploymentDetails();
- ensureConnection(monitor);
-
+ IStatus connected = ensureConnection(AbstractServerToolsPublisher.getSubMon(monitor, 100));
+ if( !connected.isOK() ) {
+ throw new CoreException(connected);
+ }
+
DelegatingServerBehavior b = (DelegatingServerBehavior) behaviour.getServer().loadAdapter(DelegatingServerBehavior.class, new NullProgressMonitor());
if( b != null && getServer().getServerState() == IServer.STATE_STARTED ) {
stopDeploymentScanner();
@@ -135,18 +144,38 @@
return behaviour.getServer();
}
- public boolean ensureConnection(IProgressMonitor monitor) {
+ public IStatus ensureConnection(IProgressMonitor monitor) {
+ monitor.beginTask("Verifying connectivity to remote server", 200);
+ Exception caught = null;
Trace.trace(Trace.STRING_FINER, "Ensuring connection to remote server for server " + getServer().getName());
if (fileSubSystem != null && !fileSubSystem.isConnected()) {
try {
- fileSubSystem.connect(monitor, false);
+ fileSubSystem.connect(AbstractServerToolsPublisher.getSubMon(monitor, 100), false);
} catch (Exception e) {
Trace.trace(Trace.STRING_FINER, "Exception connecting to remote server: " + e.getMessage());
- // I'd rather not catch Exception, but that's all they throw
- return false;
+ // I'd rather not catch raw Exception, but that's all they throw
+ caught = e;
}
}
- return fileSubSystem != null && fileSubSystem.isConnected();
+ boolean isConnected = fileSubSystem != null && fileSubSystem.isConnected();
+ String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
+ if( isConnected ) {
+ // The RSE tools might be mistaken here. The user may in fact have lost internet connectivity
+ RunnableWithProgress2 run = new RunnableWithProgress2("Accessing Remote System Root") {
+ public void run(IProgressMonitor monitor) throws CoreException,
+ SystemMessageException, RuntimeException {
+ getFileService().getRoots(monitor);
+ }
+ };
+ IProgressMonitor childMonitor = AbstractServerToolsPublisher.getSubMon(monitor, 100);
+ Exception e = RSERemotePublishHandler.wrapRemoteCallStatusTimeLimit(run, "null", "null", null, 15000, childMonitor);
+ if( e == null )
+ return Status.OK_STATUS;
+ return new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
+ "The remote server " + connectionName + " is currently not responding to file system requests.", e);
+ }
+ return new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
+ "Unable to communicate with remote connection: " + connectionName, caught);
}
public IPath getRemoteRootFolder() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2012-06-18 03:48:01 UTC (rev 42055)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2012-06-18 09:34:00 UTC (rev 42056)
@@ -45,13 +45,20 @@
return shouldRestartModule;
}
- private interface RunnableWithProgress2 {
- public void run(IProgressMonitor monitor) throws CoreException, SystemMessageException, RuntimeException;
+ abstract static class RunnableWithProgress2 {
+ private String name;
+ public RunnableWithProgress2(String name){
+ this.name = name;
+ }
+ public abstract void run(IProgressMonitor monitor) throws CoreException, SystemMessageException, RuntimeException;
+ public String getName() {
+ return name;
+ }
}
- protected IStatus generateFailStatus(String message, String resource, Exception sme) {
- String connectionName = RSEUtils.getRSEConnectionName(method.getBehaviour().getServer());
- IHost host = RSEUtils.findHost(connectionName);
+ protected static IStatus generateFailStatus(String message, String resource, RSEPublishMethod method, Exception sme) {
+ String connectionName = method == null ? null : RSEUtils.getRSEConnectionName(method.getBehaviour().getServer());
+ IHost host = connectionName == null ? null : RSEUtils.findHost(connectionName);
IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
NLS.bind(message, resource, host == null ? null : host.getName()), sme);
return s;
@@ -60,12 +67,52 @@
private IStatus[] wrapRemoteCall(final RunnableWithProgress2 runnable,
final String remoteResource, final String failErrorMessage,
final IProgressMonitor monitor) throws CoreException, RuntimeException {
- return wrapRemoteCall(runnable, remoteResource, failErrorMessage, true, monitor);
+ return wrapRemoteCall(runnable, remoteResource, failErrorMessage, true,
+ method, monitor);
}
+
+ static IStatus[] wrapRemoteCall(final RunnableWithProgress2 runnable,
+ final String remoteResource, final String failErrorMessage,
+ final boolean alwaysThrow, RSEPublishMethod method, final IProgressMonitor monitor) throws CoreException, RuntimeException {
+ IStatus s = wrapRemoteCall2(runnable, remoteResource, failErrorMessage,
+ alwaysThrow, method, monitor);
+ return s == null ? new IStatus[]{} : new IStatus[]{s};
+ }
- private IStatus[] wrapRemoteCall(final RunnableWithProgress2 runnable,
+ static Exception wrapRemoteCallStatusTimeLimit(final RunnableWithProgress2 runnable,
final String remoteResource, final String failErrorMessage,
- final boolean alwaysThrow, final IProgressMonitor monitor) throws CoreException, RuntimeException {
+ RSEPublishMethod method, final int maxDelay, final IProgressMonitor monitor) {
+ Thread t = new Thread("Remote call timer") {
+ public void run() {
+ try {
+ Thread.sleep(maxDelay);
+ monitor.setCanceled(true);
+ } catch( InterruptedException ie) {
+ // Do Nothing
+ }
+ }
+ };
+ t.start();
+ try {
+ wrapRemoteCall2(runnable, remoteResource, failErrorMessage,
+ true, method, monitor);
+ } catch (CoreException e) {
+ if( e.getStatus().getSeverity() == IStatus.CANCEL ) {
+ return new CoreException(new Status(IStatus.CANCEL,RSECorePlugin.PLUGIN_ID,
+ "The remote operation has been canceled because it did not finish in the alloted time (" + maxDelay + "ms)"));
+ }
+ return e;
+ } catch (RuntimeException e) {
+ return e;
+ } finally {
+ t.interrupt();
+ }
+ return null;
+ }
+
+ static IStatus wrapRemoteCall2(final RunnableWithProgress2 runnable,
+ final String remoteResource, final String failErrorMessage,
+ final boolean alwaysThrow, final RSEPublishMethod method, final IProgressMonitor monitor) throws CoreException, RuntimeException {
final CoreException[] coreEx = new CoreException[1];
final RuntimeException[] runtEx = new RuntimeException[1];
@@ -80,7 +127,8 @@
} catch( CoreException ce ) {
coreEx[0] = ce;
} catch( SystemMessageException sme ) {
- IStatus stat = generateFailStatus(failErrorMessage, remoteResource, sme);
+ IStatus stat = generateFailStatus(failErrorMessage,
+ remoteResource, method, sme);
if( alwaysThrow )
coreEx[0] = new CoreException(stat);
else
@@ -99,14 +147,19 @@
}
}
- if( monitor.isCanceled()) {
- throw new CoreException(Status.CANCEL_STATUS);
+ if( monitor.isCanceled()) {
+ if( t.isAlive()) {
+ t.interrupt();
+ }
+ IStatus s = new Status(IStatus.CANCEL, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
+ "Remote operation was canceled: " + runnable.getName(), null);
+ throw new CoreException(s);
}
- if( runtEx[0] != null ) throw runtEx[0];
- if( coreEx[0] != null ) throw coreEx[0];
- if( failStat[0] != null ) return failStat;
- return new IStatus[]{};
-
+ // To ensure a full stack-trace, throw all new exceptions.
+ if( runtEx[0] != null ) throw new RuntimeException(runtEx[0]);
+ if( coreEx[0] != null ) throw new CoreException(coreEx[0].getStatus());
+ if( failStat[0] != null ) return failStat[0];
+ return null;
}
public IStatus[] copyFile(final IModuleFile mf, final IPath path,
@@ -116,7 +169,7 @@
final IPath remotePath = root.append(path);
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Copy file to remote location: " + remotePath.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
method.getFileService().upload(file, remotePath.removeLastSegments(1).toString(),
@@ -130,14 +183,14 @@
public IStatus[] deleteResource(final IPath path, final IProgressMonitor monitor)
throws CoreException {
final IPath remotePath = root.append(path);
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Delete remote file: " + remotePath.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
method.getFileService().delete(remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(), monitor);
}
};
- return wrapRemoteCall(run, remotePath.toString(), "failed to delete {0} on host {1}", false, monitor);
+ return wrapRemoteCall(run, remotePath.toString(), "failed to delete {0} on host {1}", false, method, monitor);
}
public IStatus[] makeDirectoryIfRequired(final IPath dir,
@@ -149,22 +202,23 @@
if( createdFolders.contains(toMake))
return new IStatus[]{Status.OK_STATUS};
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Create Remote Directory: " + toMake.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
if( toMake.segmentCount() > 0 ) {
method.getFileService().createFolder(toMake.removeLastSegments(1).toString(),
toMake.lastSegment(), monitor);
+ createdFolders.add(toMake);
}
}
};
- return wrapRemoteCall(run, toMake.toString(), "failed to create folder {0} on host {1}", false, monitor);
+ return wrapRemoteCall(run, toMake.toString(), "failed to create folder {0} on host {1}", false, method, monitor);
}
public IStatus[] touchResource(final IPath path, IProgressMonitor monitor) {
final IPath file = root.append(path);
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Touch remote resource" + file.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
@@ -175,7 +229,7 @@
}
};
try {
- return wrapRemoteCall(run, file.toString(), "failed to touch resource {0} on host {1}", false, monitor);
+ return wrapRemoteCall(run, file.toString(), "failed to touch resource {0} on host {1}", false, method, monitor);
} catch(CoreException ce) {
return new IStatus[]{ce.getStatus()};
}
@@ -188,7 +242,7 @@
final Boolean[] boolRet = new Boolean[1];
boolRet[0] = null;
- RunnableWithProgress2 run = new RunnableWithProgress2() {
+ RunnableWithProgress2 run = new RunnableWithProgress2("Verify remote file exists: " + file.toString()) {
public void run(IProgressMonitor monitor) throws CoreException,
SystemMessageException, RuntimeException {
IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
13 years, 9 months
JBoss Tools SVN: r42055 - branches/jbosstools-3.3.x/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-06-17 23:48:01 -0400 (Sun, 17 Jun 2012)
New Revision: 42055
Modified:
branches/jbosstools-3.3.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
Log:
updated for brew
Modified: branches/jbosstools-3.3.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- branches/jbosstools-3.3.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-06-18 03:16:42 UTC (rev 42054)
+++ branches/jbosstools-3.3.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-06-18 03:48:01 UTC (rev 42055)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
-<pubsnumber>25</pubsnumber>
+<pubsnumber>26</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
13 years, 9 months