JBoss Tools SVN: r36621 - in trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test: core and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-11-24 10:42:08 -0500 (Thu, 24 Nov 2011)
New Revision: 36621
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/RunJSFPortletOnServer.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunPortletOnServerTemplate.java
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortlet.java
Log:
created RunJSFPortletOnServer (and refactored RunJavaPortletOnServer)
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java 2011-11-24 15:41:23 UTC (rev 36620)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java 2011-11-24 15:42:08 UTC (rev 36621)
@@ -5,6 +5,7 @@
import org.jboss.tools.portlet.ui.bot.test.core.RunJavaPortletOnServer;
import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortlet;
import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortletProject;
+import org.jboss.tools.portlet.ui.bot.test.jsf.RunJSFPortletOnServer;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -14,7 +15,8 @@
CreateJavaPortlet.class,
RunJavaPortletOnServer.class,
CreateJSFPortletProject.class,
- CreateJSFPortlet.class
+ CreateJSFPortlet.class,
+ RunJSFPortletOnServer.class
})
public class AllTestsSuite {
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java 2011-11-24 15:41:23 UTC (rev 36620)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/JSFPortletTestSuite.java 2011-11-24 15:42:08 UTC (rev 36621)
@@ -2,13 +2,15 @@
import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortlet;
import org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortletProject;
+import org.jboss.tools.portlet.ui.bot.test.jsf.RunJSFPortletOnServer;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(RequirementAwareUsageWindowClosingSuite.class)
@Suite.SuiteClasses({
CreateJSFPortletProject.class,
- CreateJSFPortlet.class
+ CreateJSFPortlet.class,
+ RunJSFPortletOnServer.class
})
public class JSFPortletTestSuite {
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java 2011-11-24 15:41:23 UTC (rev 36620)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/core/RunJavaPortletOnServer.java 2011-11-24 15:42:08 UTC (rev 36621)
@@ -1,18 +1,8 @@
package org.jboss.tools.portlet.ui.bot.test.core;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.jboss.tools.portlet.ui.bot.matcher.factory.DefaultMatchersFactory.inConsoleOutput;
import static org.jboss.tools.portlet.ui.bot.test.core.CreateJavaPortletProject.PROJECT_NAME;
-import static org.hamcrest.Matchers.not;
-import org.jboss.tools.portlet.ui.bot.task.console.ConsoleClearingTask;
-import org.jboss.tools.portlet.ui.bot.task.server.RunninngProjectOnServerTask;
-import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.junit.Test;
+import org.jboss.tools.portlet.ui.bot.test.template.RunPortletOnServerTemplate;
/**
* Performs Run on Server on the java portlet project and checks if there is no exception in the
@@ -21,15 +11,10 @@
* @author Lucia Jelinkova
*
*/
-@Require(clearWorkspace=false, clearProjects=false, server=@Server(required=true, state=ServerState.Running, type=ServerType.EPP))
-public class RunJavaPortletOnServer extends SWTTaskBasedTestCase {
+public class RunJavaPortletOnServer extends RunPortletOnServerTemplate {
- @Test
- public void testRunOnServer(){
- doPerform(new ConsoleClearingTask());
- doPerform(new RunninngProjectOnServerTask(PROJECT_NAME));
-
- assertThat("Exception", not(inConsoleOutput()));
- System.out.println();
+ @Override
+ protected String getProjectName() {
+ return PROJECT_NAME;
}
}
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortlet.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortlet.java 2011-11-24 15:41:23 UTC (rev 36620)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/CreateJSFPortlet.java 2011-11-24 15:42:08 UTC (rev 36621)
@@ -37,7 +37,11 @@
return Arrays.asList(
JSF_FOLDER + "edit.jsp",
JSF_FOLDER + "view.jsp",
- JSF_FOLDER + "help.jsp");
+ JSF_FOLDER + "help.jsp",
+ "WebContent/WEB-INF/default-object.xml",
+ "WebContent/WEB-INF/portlet-instances.xml",
+ "WebContent/WEB-INF/jboss-app.xml",
+ "WebContent/WEB-INF/jboss-portlet.xml");
}
@Override
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/RunJSFPortletOnServer.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/RunJSFPortletOnServer.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/jsf/RunJSFPortletOnServer.java 2011-11-24 15:42:08 UTC (rev 36621)
@@ -0,0 +1,20 @@
+package org.jboss.tools.portlet.ui.bot.test.jsf;
+
+import static org.jboss.tools.portlet.ui.bot.test.jsf.CreateJSFPortletProject.PROJECT_NAME;
+
+import org.jboss.tools.portlet.ui.bot.test.template.RunPortletOnServerTemplate;
+
+/**
+ * Performs Run on Server on the jsf portlet project and checks if there is no exception in the
+ * console.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class RunJSFPortletOnServer extends RunPortletOnServerTemplate {
+
+ @Override
+ protected String getProjectName() {
+ return PROJECT_NAME;
+ }
+}
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunPortletOnServerTemplate.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunPortletOnServerTemplate.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunPortletOnServerTemplate.java 2011-11-24 15:42:08 UTC (rev 36621)
@@ -0,0 +1,35 @@
+package org.jboss.tools.portlet.ui.bot.test.template;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.not;
+import static org.jboss.tools.portlet.ui.bot.matcher.factory.DefaultMatchersFactory.inConsoleOutput;
+
+import org.jboss.tools.portlet.ui.bot.task.console.ConsoleClearingTask;
+import org.jboss.tools.portlet.ui.bot.task.server.RunninngProjectOnServerTask;
+import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.junit.Test;
+
+/**
+ * Performs Run on Server on the specified portlet project and checks if there is no exception in the
+ * console.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+@Require(clearWorkspace=false, clearProjects=false, server=@Server(required=true, state=ServerState.Running, type=ServerType.EPP))
+public abstract class RunPortletOnServerTemplate extends SWTTaskBasedTestCase {
+
+ protected abstract String getProjectName();
+
+ @Test
+ public void testRunOnServer(){
+ doPerform(new ConsoleClearingTask());
+ doPerform(new RunninngProjectOnServerTask(getProjectName()));
+
+ assertThat("Exception", not(inConsoleOutput()));
+ }
+}
13 years, 1 month
JBoss Tools SVN: r36620 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/web.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-11-24 10:41:23 -0500 (Thu, 24 Nov 2011)
New Revision: 36620
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/web/DynamicWebProjectWizardPageFillingTask.java
Log:
changed input method from typeTest (does not work well with openjdk) to setText
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/web/DynamicWebProjectWizardPageFillingTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/web/DynamicWebProjectWizardPageFillingTask.java 2011-11-24 15:37:41 UTC (rev 36619)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/web/DynamicWebProjectWizardPageFillingTask.java 2011-11-24 15:41:23 UTC (rev 36620)
@@ -22,7 +22,7 @@
@Override
public void perform() {
- getBot().textWithLabel("Project name:").typeText(projectName);
+ getBot().textWithLabel("Project name:").setText(projectName);
if (webModuleVersion != null){
getBot().comboBoxInGroup("Dynamic web module version").setSelection(webModuleVersion);
13 years, 1 month
JBoss Tools SVN: r36619 - trunk/build/aggregate.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-24 10:37:41 -0500 (Thu, 24 Nov 2011)
New Revision: 36619
Modified:
trunk/build/aggregate/build.xml
Log:
can now inherit associate.properties from parent folder (eg., site/sources/ could pull properties from site/ folder)
Modified: trunk/build/aggregate/build.xml
===================================================================
--- trunk/build/aggregate/build.xml 2011-11-24 15:14:11 UTC (rev 36618)
+++ trunk/build/aggregate/build.xml 2011-11-24 15:37:41 UTC (rev 36619)
@@ -31,10 +31,11 @@
<condition property="associate.properties" value="${output.dir}/associate.properties">
<available file="${output.dir}/associate.properties" type="file" />
</condition>
- <condition property="associate.properties" value="associate.properties">
- <available file="associate.properties" type="file" />
+ <condition property="associate.properties" value="${output.dir}/../associate.properties">
+ <available file="${output.dir}/../associate.properties" type="file" />
</condition>
<property file="${associate.properties}" />
+ <echo level="verbose">Loaded associate sites from ${associate.properties}</echo>
<property name="web.content.files" value="index.html, web/*.css, README*, *directory.xml" />
<target name="init">
13 years, 1 month
JBoss Tools SVN: r36618 - trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-24 10:14:11 -0500 (Thu, 24 Nov 2011)
New Revision: 36618
Removed:
trunk/bpel-old/
Log:
bpel-old exists in the 3.3.0.M4 branch and is no longer needed in trunk. time to delete
13 years, 1 month
JBoss Tools SVN: r36617 - trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2011-11-24 09:30:49 -0500 (Thu, 24 Nov 2011)
New Revision: 36617
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java
Log:
Prevent resource changes analysis if the enclosing project is closed
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java 2011-11-24 13:29:45 UTC (rev 36616)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ElementChangedEventScanner.java 2011-11-24 14:30:49 UTC (rev 36617)
@@ -22,6 +22,7 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceDelta;
@@ -81,6 +82,10 @@
private List<JavaElementChangedEvent> scanDelta(IResourceDelta delta) throws CoreException {
final List<JavaElementChangedEvent> events = new ArrayList<JavaElementChangedEvent>();
final IResource resource = delta.getResource();
+ if(resource.getType() == IResource.PROJECT && !((IProject)resource).isOpen()) {
+ // skip as the project is closed
+ return Collections.emptyList();
+ }
final boolean isJavaFile = resource.getType() == IResource.FILE && ("java").equals(resource.getFileExtension());
final boolean javaFileAdded = isJavaFile && delta.getKind() == ADDED;
final boolean javaFileWithMarkers = isJavaFile && delta.getKind() == CHANGED
@@ -142,6 +147,11 @@
private List<JavaElementChangedEvent> scanDelta(IJavaElementDelta delta) throws CoreException {
final List<JavaElementChangedEvent> events = new ArrayList<JavaElementChangedEvent>();
IJavaElement element = delta.getElement();
+ if(element == null || !element.getJavaProject().getProject().isOpen()) {
+ // skip as the project is closed
+ return Collections.emptyList();
+ }
+
int elementKind = element.getElementType(); // retrieveJavaElementKind(delta);
int deltaKind = retrieveDeltaKind(delta);
int[] flags = retrieveFlags(delta);
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java 2011-11-24 13:29:45 UTC (rev 36616)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java 2011-11-24 14:30:49 UTC (rev 36617)
@@ -31,20 +31,18 @@
private static final int SCALE = 10;
- private final IJavaProject javaProject;
-
private final Object event;
public JaxrsMetamodelBuildJob(final IProject project, final boolean requiresReset) throws CoreException {
super("JAX-RS Metamodel build for " + project.getName() + "...");
- this.javaProject = JavaCore.create(project);
+ IJavaProject javaProject = JavaCore.create(project);
JavaElementDelta delta = new JavaElementDelta(javaProject);
delta.added();
this.event = new ElementChangedEvent(delta, ElementChangedEvent.POST_RECONCILE);
final JaxrsMetamodel metamodel = JaxrsMetamodel.get(javaProject);
if (metamodel == null) {
JaxrsMetamodel.create(javaProject);
- } else if(requiresReset) {
+ } else if (requiresReset) {
metamodel.reset();
}
}
@@ -52,12 +50,10 @@
public JaxrsMetamodelBuildJob(final IResourceChangeEvent event) {
super("Incremental JAX-RS Metamodel build..."); //$NON-NLS-1$
this.event = event;
- this.javaProject = JavaCore.create(event.getDelta().getResource().getProject());
}
public JaxrsMetamodelBuildJob(final ElementChangedEvent event) {
super("Incremental JAX-RS Metamodel build..."); //$NON-NLS-1$
- this.javaProject = event.getDelta().getElement().getJavaProject();
this.event = event;
}
@@ -65,19 +61,9 @@
protected IStatus run(IProgressMonitor progressMonitor) {
try {
progressMonitor.beginTask("Build JAX-RS Metamodel", 8 * SCALE);
- /*
- * JaxrsMetamodel metamodel = JaxrsMetamodel.get(javaProject);
- * if (metamodel == null) {
- * metamodel = JaxrsMetamodel.create(javaProject);
- * }
- * if (kind == IncrementalProjectBuilder.FULL_BUILD) {
- * metamodel.reset();
- * }
- */
progressMonitor.worked(SCALE);
// create fake event at the JavaProject level:
// scan and filter delta, retrieve a list of java changes
-
final List<JavaElementChangedEvent> events = new ElementChangedEventScanner().scanAndFilterEvent(event,
new SubProgressMonitor(progressMonitor, SCALE));
// process events against HTTP Methods, retrieve jaxrs changes
13 years, 1 month
JBoss Tools SVN: r36616 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test: jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-11-24 08:29:45 -0500 (Thu, 24 Nov 2011)
New Revision: 36616
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/Jbide10020_TestHotKeyForVpeRefresh.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
https://issues.jboss.org/browse/JBIDE-10020 - Test for "Hot key for VPE refresh" was added.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-11-24 13:03:27 UTC (rev 36615)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-11-24 13:29:45 UTC (rev 36616)
@@ -70,6 +70,7 @@
import org.jboss.tools.vpe.ui.bot.test.editor.tags.VirtualEarthTagTest;
import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE4556Test;
import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE9445Test_DuplicateSourceMenu;
+import org.jboss.tools.vpe.ui.bot.test.jbide.Jbide10020_TestHotKeyForVpeRefresh;
import org.jboss.tools.vpe.ui.bot.test.jbide.Jbide9827_TestNPEinHugeFile;
import org.jboss.tools.vpe.ui.bot.test.palette.CancelTagLibDefenitionTest;
import org.jboss.tools.vpe.ui.bot.test.palette.ImportTagsFromTLDFileTest;
@@ -178,7 +179,8 @@
XhtmlFilePerformanceTest.class,
MarkersTest.class,
JBIDE9445Test_DuplicateSourceMenu.class,
- Jbide9827_TestNPEinHugeFile.class
+ Jbide9827_TestNPEinHugeFile.class,
+ Jbide10020_TestHotKeyForVpeRefresh.class
})
public class VPEAllBotTests extends SWTBotTestCase{
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/Jbide10020_TestHotKeyForVpeRefresh.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/Jbide10020_TestHotKeyForVpeRefresh.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/Jbide10020_TestHotKeyForVpeRefresh.java 2011-11-24 13:29:45 UTC (rev 36616)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.jbide;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+public class Jbide10020_TestHotKeyForVpeRefresh extends VPEAutoTestCase {
+
+ private final String TOOL_TIP = "Refresh (F5)"; //$NON-NLS-1$
+ private final String TOOL_TIP2 = "Refresh"; //$NON-NLS-1$
+ private final String ERROR_MESSAGE =
+ "Could not find tool bar button with tooltip '" + TOOL_TIP //$NON-NLS-1$
+ + "' on the toolbar. Hot key 'F5' for VPE refresh is broken."; //$NON-NLS-1$
+
+ public Jbide10020_TestHotKeyForVpeRefresh() {
+ super();
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+
+ public void testHotKeyForVpeRefresh() {
+ SWTBotEditor editor = SWTTestExt.packageExplorer.openFile(
+ JBT_TEST_PROJECT_NAME, "WebContent", "pages", TEST_PAGE); //$NON-NLS-1$ //$NON-NLS-2$
+ /*
+ * Case 1:
+ * When focus is on in the VPE --
+ * Find "Refresh (F5)" toolbar button
+ */
+ editor.setFocus();
+ try {
+ bot.toolbarButtonWithTooltip(TOOL_TIP);
+ } catch (Exception e) {
+ fail(ERROR_MESSAGE);
+ }
+ /*
+ * Case 2:
+ * When focus is on in Package Explorer --
+ * Find "Refresh" toolbar button without HotKey defined.
+ */
+ packageExplorer.show();
+ try {
+ bot.toolbarButtonWithTooltip(TOOL_TIP2);
+ } catch (Exception e) {
+ fail("Hot key for VPE refresh is *NOT* disabled in Package Explorer"); //$NON-NLS-1$
+ }
+ }
+}
13 years, 1 month
JBoss Tools SVN: r36615 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-11-24 08:03:27 -0500 (Thu, 24 Nov 2011)
New Revision: 36615
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
Log:
[JBIDE-10237] code cleanup
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java 2011-11-24 12:59:39 UTC (rev 36614)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java 2011-11-24 13:03:27 UTC (rev 36615)
@@ -69,4 +69,8 @@
public IApplication createApplication(String name, ICartridge cartridge) throws OpenShiftException {
return getUser().createApplication(name, cartridge);
}
+
+ public boolean hasApplication(String name) throws OpenShiftException {
+ return user.hasApplication(name);
+ }
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-11-24 12:59:39 UTC (rev 36614)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPage.java 2011-11-24 13:03:27 UTC (rev 36615)
@@ -357,7 +357,7 @@
protected IStatus run(IProgressMonitor monitor) {
try {
model.loadDomain();
- final Collection<IApplication> applications = model.loadApplications();
+ final Collection<IApplication> applications = model.getApplications();
setViewerInput(applications);
return Status.OK_STATUS;
} catch (NotFoundOpenShiftException e) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java 2011-11-24 12:59:39 UTC (rev 36614)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardPageModel.java 2011-11-24 13:03:27 UTC (rev 36615)
@@ -75,7 +75,7 @@
setDomain(getUser().getDomain());
}
- public List<IApplication> loadApplications() throws OpenShiftException {
+ public List<IApplication> getApplications() throws OpenShiftException {
IUser user = getUser();
if (user == null) {
return Collections.emptyList();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-11-24 12:59:39 UTC (rev 36614)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPageModel.java 2011-11-24 13:03:27 UTC (rev 36615)
@@ -106,7 +106,7 @@
public boolean hasApplication(String name) {
try {
- return wizardModel.getUser().getApplicationByName(name) != null;
+ return wizardModel.hasApplication(name);
} catch (OpenShiftException e) {
OpenShiftUIActivator.log(
OpenShiftUIActivator.createErrorStatus("Could not get application by name", e));
13 years, 1 month
JBoss Tools SVN: r36614 - trunk/openshift/plugins/org.jboss.tools.openshift.express.client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-11-24 07:59:39 -0500 (Thu, 24 Nov 2011)
New Revision: 36614
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
Log:
[JBIDE-9927] updated to the latest client jar
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/org.jboss.tools.openshift.express.client-2.3.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
13 years, 1 month
JBoss Tools SVN: r36613 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test: jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-11-24 07:35:00 -0500 (Thu, 24 Nov 2011)
New Revision: 36613
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/Jbide9827_TestNPEinHugeFile.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
https://issues.jboss.org/browse/JBIDE-9827 - Test for "NPE occurs when edit big page "
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-11-24 12:27:29 UTC (rev 36612)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-11-24 12:35:00 UTC (rev 36613)
@@ -70,6 +70,7 @@
import org.jboss.tools.vpe.ui.bot.test.editor.tags.VirtualEarthTagTest;
import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE4556Test;
import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE9445Test_DuplicateSourceMenu;
+import org.jboss.tools.vpe.ui.bot.test.jbide.Jbide9827_TestNPEinHugeFile;
import org.jboss.tools.vpe.ui.bot.test.palette.CancelTagLibDefenitionTest;
import org.jboss.tools.vpe.ui.bot.test.palette.ImportTagsFromTLDFileTest;
import org.jboss.tools.vpe.ui.bot.test.palette.ManagePaletteGroupsTest;
@@ -176,7 +177,8 @@
OpenOnTest.class,
XhtmlFilePerformanceTest.class,
MarkersTest.class,
- JBIDE9445Test_DuplicateSourceMenu.class
+ JBIDE9445Test_DuplicateSourceMenu.class,
+ Jbide9827_TestNPEinHugeFile.class
})
public class VPEAllBotTests extends SWTBotTestCase{
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/Jbide9827_TestNPEinHugeFile.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/Jbide9827_TestNPEinHugeFile.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/Jbide9827_TestNPEinHugeFile.java 2011-11-24 12:35:00 UTC (rev 36613)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.jbide;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.FileHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+public class Jbide9827_TestNPEinHugeFile extends VPEAutoTestCase {
+
+ private static final String TEST_PAGE_NAME = "employee.xhtml"; //$NON-NLS-1$
+
+ public Jbide9827_TestNPEinHugeFile() {
+ super();
+ }
+
+ @Override
+ protected void closeUnuseDialogs() { }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+
+ public void testNPEwhenTypingTagName() {
+ /*
+ * copy big XHTML page from resources folder
+ */
+ try {
+ String resourceWebContentLocation = getPathToResources("WebContent"); //$NON-NLS-1$
+ FileHelper.copyFilesBinaryRecursively(
+ new File(resourceWebContentLocation),
+ new File(FileHelper.getProjectLocation(
+ JBT_TEST_PROJECT_NAME, bot),
+ IDELabel.JsfProjectTree.WEB_CONTENT), null);
+ } catch (IOException ioe) {
+ throw new RuntimeException(
+ "Unable to copy necessary files from plugin's resources directory", //$NON-NLS-1$
+ ioe);
+ }
+ bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.REFRESH).click();
+ bot.sleep(Timing.time1S());
+ /*
+ * open main page
+ */
+ packageExplorer.openFile(JBT_TEST_PROJECT_NAME,
+ IDELabel.JsfProjectTree.WEB_CONTENT, TEST_PAGE_NAME);
+ final SWTBotEclipseEditor xhtmlTextEditor = bot.editorByTitle(TEST_PAGE_NAME).toTextEditor();
+ xhtmlTextEditor.typeText(18, 9,
+ "veryLongNewTagNameIsTypingAndTypingUntilWeWillGetNPEExceptionWhileRefreshingDOMTree"); //$NON-NLS-1$
+ /*
+ * Sleep for 20sec, wait for refresh.
+ * 10sec could be enough also.
+ */
+ bot.sleep(Timing.time20S());
+ Throwable e = getException();
+ if (e != null) {
+ /*
+ * Show internal stack trace
+ */
+ Writer result = new StringWriter();
+ PrintWriter printWriter = new PrintWriter(result);
+ e.printStackTrace(printWriter);
+ fail("Internal Error: " + result.toString()); //$NON-NLS-1$
+ }
+ }
+}
13 years, 1 month
JBoss Tools SVN: r36612 - in trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test: .settings and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: sbunciak
Date: 2011-11-24 07:27:29 -0500 (Thu, 24 Nov 2011)
New Revision: 36612
Added:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.classpath
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.project
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.settings/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/build.properties
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/Activator.java
Log:
Set-up of OpenShift SWTBot tests
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.classpath
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.classpath (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.classpath 2011-11-24 12:27:29 UTC (rev 36612)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.project
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.project (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.project 2011-11-24 12:27:29 UTC (rev 36612)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.openshift.ui.bot.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/.settings/org.eclipse.jdt.core.prefs 2011-11-24 12:27:29 UTC (rev 36612)
@@ -0,0 +1,8 @@
+#Thu Nov 24 11:09:03 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF 2011-11-24 12:27:29 UTC (rev 36612)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: OpenShift SWTBot Tests
+Bundle-SymbolicName: org.jboss.tools.openshift.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.openshift.ui.bot.test.Activator
+Bundle-Vendor: Red Hat
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/build.properties
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/build.properties (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/build.properties 2011-11-24 12:27:29 UTC (rev 36612)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/Activator.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/Activator.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/Activator.java 2011-11-24 12:27:29 UTC (rev 36612)
@@ -0,0 +1,50 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.openshift.ui.bot.test"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
13 years, 1 month