JBoss Tools SVN: r41972 - in trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard: action/xpl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-06-14 09:20:31 -0400 (Thu, 14 Jun 2012)
New Revision: 41972
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewJSFPortletClassWizardPage.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/action/xpl/AddJavaEEArtifactOperationEx.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/xpl/NewJavaClassWizardPageEx.java
Log:
JBIDE-12174 - Portlet wizards should not be restricted to portlet enabled projects (regression)
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewJSFPortletClassWizardPage.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewJSFPortletClassWizardPage.java 2012-06-14 12:46:56 UTC (rev 41971)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewJSFPortletClassWizardPage.java 2012-06-14 13:20:31 UTC (rev 41972)
@@ -299,7 +299,7 @@
if (!result)
return result;
try {
- result = FacetedProjectFramework.hasProjectFacet(project, IPortletConstants.JSFPORTLET_FACET_ID);
+ result = project.isAccessible() && FacetedProjectFramework.hasProjectFacet(project, IPortletConstants.JSFPORTLET_FACET_ID);
if (!result) {
return result;
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2012-06-14 12:46:56 UTC (rev 41971)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2012-06-14 13:20:31 UTC (rev 41972)
@@ -16,6 +16,7 @@
import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.USE_EXISTING_CLASS;
import static org.eclipse.jst.servlet.ui.internal.wizard.IWebWizardConstants.BROWSE_BUTTON_LABEL;
import static org.eclipse.jst.servlet.ui.internal.wizard.IWebWizardConstants.CLASS_NAME_LABEL;
+import static org.eclipse.wst.common.componentcore.internal.operation.IArtifactEditOperationDataModelProperties.PROJECT_NAME;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
@@ -24,8 +25,8 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.window.Window;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
import org.eclipse.jst.j2ee.internal.war.ui.util.WebServletGroupItemProvider;
import org.eclipse.jst.j2ee.internal.wizard.AnnotationsStandaloneGroup;
import org.eclipse.jst.j2ee.internal.wizard.NewJavaClassWizardPage;
@@ -43,14 +44,13 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.eclipse.wst.common.project.facet.core.internal.FacetedProject;
import org.jboss.tools.portlet.core.IPortletConstants;
import org.jboss.tools.portlet.ui.Messages;
import org.jboss.tools.portlet.ui.MultiSelectFilteredFileSelectionDialog;
+import org.jboss.tools.portlet.ui.PortletUIActivator;
import org.jboss.tools.portlet.ui.internal.wizard.xpl.NewJavaClassWizardPageEx;
public class NewPortletClassWizardPage extends NewJavaClassWizardPageEx {
@@ -86,7 +86,12 @@
protected boolean isProjectValid(IProject project) {
boolean result;
try {
- return FacetedProjectFramework.hasProjectFacet(project, IPortletConstants.PORTLET_FACET_ID);
+ result = project.isAccessible() &&
+ project.hasNature(JavaCore.NATURE_ID);
+ if ("External Plug-in Libraries".equals(project.getName()) || //$NON-NLS-1$
+ ".JETEmitters".equals(project.getName()) ) { //$NON-NLS-1$
+ result = false;
+ }
} catch (CoreException ce) {
result = false;
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/action/xpl/AddJavaEEArtifactOperationEx.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/action/xpl/AddJavaEEArtifactOperationEx.java 2012-06-14 12:46:56 UTC (rev 41971)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/action/xpl/AddJavaEEArtifactOperationEx.java 2012-06-14 13:20:31 UTC (rev 41972)
@@ -6,6 +6,7 @@
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -17,6 +18,7 @@
import org.eclipse.jst.j2ee.model.ModelProviderManager;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
import org.jboss.tools.portlet.ui.PortletUIActivator;
public abstract class AddJavaEEArtifactOperationEx extends AbstractDataModelOperation {
@@ -53,6 +55,14 @@
}
private IModelProvider getModelProvider() {
+ IProject project = getTargetProject();
+ try {
+ if (!FacetedProjectFramework.isFacetedProject(project)) {
+ return null;
+ }
+ } catch (CoreException e1) {
+ return null;
+ }
IModelProvider modelProvider = null;
try {
modelProvider = ModelProviderManager.getModelProvider(getTargetProject());
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/xpl/NewJavaClassWizardPageEx.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/xpl/NewJavaClassWizardPageEx.java 2012-06-14 12:46:56 UTC (rev 41971)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/xpl/NewJavaClassWizardPageEx.java 2012-06-14 13:20:31 UTC (rev 41972)
@@ -80,8 +80,6 @@
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.jboss.tools.portlet.core.IPortletConstants;
import org.jboss.tools.portlet.ui.PortletUIActivator;
/**
@@ -241,7 +239,9 @@
protected boolean isProjectValid(IProject project) {
boolean result;
try {
- return FacetedProjectFramework.hasProjectFacet(project, IPortletConstants.JSFPORTLET_FACET_ID);
+ result = project.isAccessible() &&
+ project.hasNature(IModuleConstants.MODULE_NATURE_ID) &&
+ J2EEProjectUtilities.getJ2EEProjectType(project).equals(projectType);
} catch (CoreException ce) {
result = false;
}
13 years, 10 months
JBoss Tools SVN: r41971 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-06-14 08:46:56 -0400 (Thu, 14 Jun 2012)
New Revision: 41971
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/VariousProjectsArchiving.java
Log:
fixing order of removing errors in error log in archive bot test
Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/VariousProjectsArchiving.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/VariousProjectsArchiving.java 2012-06-14 12:46:29 UTC (rev 41970)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/VariousProjectsArchiving.java 2012-06-14 12:46:56 UTC (rev 41971)
@@ -21,7 +21,6 @@
import org.jboss.tools.ui.bot.ext.gen.INewObject;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.After;
-import org.junit.BeforeClass;
import org.junit.Test;
/**
@@ -33,15 +32,9 @@
server = @Server(state = ServerState.NotRunning,
version = "6.0", operator = ">="))
public class VariousProjectsArchiving extends ArchivesTestBase {
-
- @BeforeClass
- public static void prepareWorkspace() {
- showErrorView();
- clearErrorView();
- }
@After
- public void testEmptyErrorLog() {
+ public void checkErrorLog() {
assertClearErrorLog();
}
@@ -52,6 +45,9 @@
/* create dynamic web project */
createDynamicWebProject(project);
+ /* clear error view before creating an archive */
+ clearErrorView();
+
/* open view for project */
ProjectArchivesView view = viewForProject(project);
@@ -70,6 +66,9 @@
/* create ejb project */
createEJBProject(project);
+ /* clear error view before creating an archive */
+ clearErrorView();
+
/* open view for project */
ProjectArchivesView view = viewForProject(project);
13 years, 10 months
JBoss Tools SVN: r41970 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-06-14 08:46:29 -0400 (Thu, 14 Jun 2012)
New Revision: 41970
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/UserLibrariesFilesetTest.java
Log:
remove @Ignore annotation in archive bot test -> test yet unimplemented feature
Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/UserLibrariesFilesetTest.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/UserLibrariesFilesetTest.java 2012-06-14 12:42:49 UTC (rev 41969)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/UserLibrariesFilesetTest.java 2012-06-14 12:46:29 UTC (rev 41970)
@@ -21,7 +21,6 @@
import org.jboss.tools.ui.bot.ext.gen.IPreference;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
/**
@@ -60,8 +59,8 @@
/* test if folder was created */
assertItemExistsInView(view, projectName, ARCHIVE_PATH, USER_LIBRARY_1);
}
- @Ignore // not implemented in tools yet
- @Test
+
+ @Test // not implemented in tools yet
public void testCreatingUserLibraryFileSetInExplorer() {
/* prepare view for testing */
ProjectArchivesExplorer explorer = explorerForProject(projectName);
13 years, 10 months
JBoss Tools SVN: r41969 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-06-14 08:42:49 -0400 (Thu, 14 Jun 2012)
New Revision: 41969
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
Log:
JBIDE-10738
As-you-type EL validation
Avoided multiple sequential validations on the same region
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-06-14 11:58:49 UTC (rev 41968)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-06-14 12:42:49 UTC (rev 41969)
@@ -11,8 +11,10 @@
package org.jboss.tools.common.validation.java;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.jdt.core.ICompilationUnit;
@@ -65,6 +67,10 @@
private boolean fIsCanceled = false;
private boolean fInRewriteSession = false;
private IDocumentRewriteSessionListener fDocumentRewriteSessionListener = new DocumentRewriteSessionListener();
+ private Set<ITypedRegion> fPartitionsToProcess = new HashSet<ITypedRegion>();
+ private int fStartPartitionsToProcess = -1;
+ private int fEndPartitionsToProcess = -1;
+
// AsYouType EL Validation 'marker type' name.
// marker type is used in the quickFixProcessor extension point
public static final String MARKER_TYPE= "org.jboss.tools.common.validation.el"; //$NON-NLS-1$
@@ -421,6 +427,13 @@
super.uninstall();
}
+ @Override
+ protected void beginProcessing() {
+ fPartitionsToProcess.clear();
+ fStartPartitionsToProcess = -1;
+ fEndPartitionsToProcess = -1;
+ }
+
protected void process(DirtyRegion dirtyRegion) {
IDocument doc = getDocument();
@@ -462,16 +475,31 @@
LogHelper.logError(CommonValidationPlugin.getDefault(), e);
}
+ fStartPartitionsToProcess = (fStartPartitionsToProcess == -1 || fStartPartitionsToProcess > start) ? start : fStartPartitionsToProcess;
+ fEndPartitionsToProcess = (fEndPartitionsToProcess == -1 || fEndPartitionsToProcess < end) ? end : fEndPartitionsToProcess;
+
ITypedRegion[] partitions = computePartitioning(start, end - start);
if (fReporter != null) {
fReporter.clearAnnotations(start, end);
}
- for (int i = 0; i < partitions.length; i++) {
- if (partitions[i] != null && !fIsCanceled && IJavaPartitions.JAVA_STRING.equals(partitions[i].getType())) {
- if (fValidatorManager != null)
- fValidatorManager.validate(partitions[i], fHelper, fReporter);
+ for (ITypedRegion partition : partitions) {
+ if (partition != null && !fIsCanceled && IJavaPartitions.JAVA_STRING.equals(partition.getType()) && !fPartitionsToProcess.contains(partition)) {
+ fPartitionsToProcess.add(partition);
}
}
}
+
+ @Override
+ protected void endProcessing() {
+ if (fValidatorManager == null || fPartitionsToProcess.isEmpty() || fStartPartitionsToProcess == -1 || fEndPartitionsToProcess == -1)
+ return;
+
+ if (fReporter != null) {
+ fReporter.clearAnnotations(fStartPartitionsToProcess, fEndPartitionsToProcess);
+ }
+ for (ITypedRegion partition : fPartitionsToProcess) {
+ fValidatorManager.validate(partition, fHelper, fReporter);
+ }
+ }
}
\ No newline at end of file
13 years, 10 months
JBoss Tools SVN: r41968 - trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-06-14 07:58:49 -0400 (Thu, 14 Jun 2012)
New Revision: 41968
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/
Log:
ignore screenshots
Property changes on: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test
___________________________________________________________________
Added: svn:ignore
+ screenshots
13 years, 10 months
JBoss Tools SVN: r41967 - in trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test: projects and 24 other directories.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-06-14 07:48:13 -0400 (Thu, 14 Jun 2012)
New Revision: 41967
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.classpath
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.project
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/.jsdtscope
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.jdt.core.prefs
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.common.component
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/META-INF/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/META-INF/MANIFEST.MF
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/WEB-INF/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/WEB-INF/lib/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/index.jsp
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/org/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/org/jboss/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/org/jboss/tools/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/org/jboss/tools/tests/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/org/jboss/tools/tests/as/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/org/jboss/tools/tests/as/HelloWorld.class
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/jboss/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/jboss/tools/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/jboss/tools/tests/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/jboss/tools/tests/as/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/jboss/tools/tests/as/HelloWorld.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeployJSPProject.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/web/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/web/PageSourceMatcher.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/ImportProjectWizard.java
Removed:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/entity/XMLConfiguration.java
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/build.properties
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/Activator.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/AllTestsSuite.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/OperateAS7Server.java
trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/editor/ServerEditor.java
Log:
Added new tests
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test
___________________________________________________________________
Modified: svn:ignore
- bin
+ bin
screenshots
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/build.properties
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/build.properties 2012-06-14 11:44:51 UTC (rev 41966)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/build.properties 2012-06-14 11:48:13 UTC (rev 41967)
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ resources/
output.. = bin/
bin.includes = META-INF/,\
.
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.classpath
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.classpath (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.classpath 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.project
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.project (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.project 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jsp-as7</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/.jsdtscope
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/.jsdtscope (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/.jsdtscope 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.jdt.core.prefs 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,7 @@
+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/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.common.component 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="jsp-as7">
+ <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="jsp-as7"/>
+ <property name="java-output-path" value="/jsp-as7/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.common.project.facet.core.xml 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.web"/>
+ <fixed facet="java"/>
+ <fixed facet="wst.jsdt.web"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.jsdt.ui.superType.container 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/.settings/org.eclipse.wst.jsdt.ui.superType.name 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/META-INF/MANIFEST.MF 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/index.jsp
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/index.jsp (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/WebContent/index.jsp 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,6 @@
+<%@ page language="java" import="org.jboss.tools.tests.as.*" errorPage="" %>
+<html>
+<body>
+ <%=HelloWorld.sayHello()%>
+</body>
+</html>
\ No newline at end of file
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/org/jboss/tools/tests/as/HelloWorld.class
===================================================================
(Binary files differ)
Property changes on: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/build/classes/org/jboss/tools/tests/as/HelloWorld.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/jboss/tools/tests/as/HelloWorld.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/jboss/tools/tests/as/HelloWorld.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/projects/jsp-as7/src/org/jboss/tools/tests/as/HelloWorld.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,8 @@
+package org.jboss.tools.tests.as;
+
+public class HelloWorld {
+
+ public static String sayHello(){
+ return "Hello tests!";
+ }
+}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/Activator.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/Activator.java 2012-06-14 11:44:51 UTC (rev 41966)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/Activator.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -5,6 +5,8 @@
public class Activator implements BundleActivator {
+ public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.ui.bot.test";
+
private static BundleContext context;
static BundleContext getContext() {
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/AllTestsSuite.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/AllTestsSuite.java 2012-06-14 11:44:51 UTC (rev 41966)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/AllTestsSuite.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -2,6 +2,7 @@
import org.jboss.ide.eclipse.as.ui.bot.test.as7.CreateAS7Test;
import org.jboss.ide.eclipse.as.ui.bot.test.as7.DeleteAS7Server;
+import org.jboss.ide.eclipse.as.ui.bot.test.as7.DeployJSPProject;
import org.jboss.ide.eclipse.as.ui.bot.test.as7.OperateAS7Server;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.junit.runner.RunWith;
@@ -10,7 +11,8 @@
@RunWith(RequirementAwareSuite.class)
@Suite.SuiteClasses({
CreateAS7Test.class,
- OperateAS7Server.class,
+ OperateAS7Server.class,
+ DeployJSPProject.class,
DeleteAS7Server.class
})
public class AllTestsSuite {
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java 2012-06-14 11:44:51 UTC (rev 41966)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/CreateAS7Test.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -7,12 +7,13 @@
import java.util.List;
import org.jboss.ide.eclipse.as.ui.bot.test.editor.ServerEditor;
-import org.jboss.ide.eclipse.as.ui.bot.test.entity.XMLConfiguration;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.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.jboss.tools.ui.bot.ext.entity.XMLConfiguration;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
import org.junit.Test;
/**
@@ -32,7 +33,8 @@
assertThat("8080", is(editor.getWebPort()));
assertThat("9999", is(editor.getManagementPort()));
- List<XMLConfiguration> configurations = editor.getXMLConfiguration("Ports");
+ ServersView view = new ServersView();
+ List<XMLConfiguration> configurations = view.getXMLConfiguration(configuredState.getServer().name, "Ports");
assertThat(configurations, hasItem(new XMLConfiguration("JBoss Management", "${jboss.management.native.port:9999}")));
assertThat(configurations, hasItem(new XMLConfiguration("JBoss Web", "8080")));
}
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeployJSPProject.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeployJSPProject.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/DeployJSPProject.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,51 @@
+package org.jboss.ide.eclipse.as.ui.bot.test.as7;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.not;
+
+import org.jboss.ide.eclipse.as.ui.bot.test.Activator;
+import org.jboss.ide.eclipse.as.ui.bot.test.web.PageSourceMatcher;
+import org.jboss.ide.eclipse.as.ui.bot.test.wizard.ImportProjectWizard;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
+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.jboss.tools.ui.bot.ext.matcher.console.ConsoleOutputMatcher;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
+import org.junit.Before;
+import org.junit.Test;
+
+@Require(server=(a)Server(type=ServerType.EAP, state=ServerState.Running))
+public class DeployJSPProject extends SWTTestExt {
+
+ private static final String PROJECT_NAME = "jsp-as7";
+
+ @Before
+ public void importProject(){
+ ImportProjectWizard wizard = new ImportProjectWizard();
+ wizard.setCopyProjectsIntoWorkspace(true);
+ wizard.setProjectPath(SWTUtilExt.getPathToFileWithinPlugin(Activator.PLUGIN_ID, "projects"));
+ wizard.setProjectNames(PROJECT_NAME);
+ wizard.execute();
+ }
+
+ @Test
+ public void deployJSPProject(){
+ ServersView serversView = new ServersView();
+ serversView.addProjectToServer(PROJECT_NAME, configuredState.getServer().name);
+
+ // console
+ assertThat("Exception:", not(new ConsoleOutputMatcher(TaskDuration.NORMAL)));
+ assertThat("Registering web context: /" + PROJECT_NAME, new ConsoleOutputMatcher(TaskDuration.NORMAL));
+ // view
+ assertTrue("Server contains project", serversView.containsProject(configuredState.getServer().name, PROJECT_NAME));
+ assertEquals("Started", serversView.getServerStatus(configuredState.getServer().name));
+ assertEquals("Synchronized", serversView.getServerPublishStatus(configuredState.getServer().name));
+ // web
+ serversView.openWebPage(configuredState.getServer().name, PROJECT_NAME);
+ assertThat("Hello tests!", new PageSourceMatcher());
+ }
+}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/OperateAS7Server.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/OperateAS7Server.java 2012-06-14 11:44:51 UTC (rev 41966)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/as7/OperateAS7Server.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -5,10 +5,14 @@
import static org.hamcrest.Matchers.not;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.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.jboss.tools.ui.bot.ext.matcher.console.ConsoleOutputMatcher;
import org.jboss.tools.ui.bot.ext.view.ServersView;
import org.junit.Test;
-
+@Require(server=(a)Server(type=ServerType.EAP, state=ServerState.NotRunning))
public class OperateAS7Server extends SWTTestExt {
private ServersView serversView = new ServersView();
@@ -26,22 +30,26 @@
public void startServer(){
serversView.startServer(getServerName());
+ serversView.openWebPage(configuredState.getServer().name);
assertNoException("Starting server");
assertServerState("Starting server", "Started");
-
+ assertWebPageContains("Welcome to EAP 6");
}
public void restartServer(){
serversView.restartServer(getServerName());
-
+ serversView.openWebPage(configuredState.getServer().name);
+
assertNoException("Restarting server");
assertServerState("Restarting server", "Started");
+ assertWebPageContains("Welcome to EAP 6");
}
public void stopServer(){
serversView.stopServer(getServerName());
-
+ serversView.openWebPage(configuredState.getServer().name);
+
assertNoException("Stopping server");
assertServerState("Stopping server", "Stopped");
}
@@ -53,4 +61,8 @@
protected void assertServerState(String message, String state) {
assertThat(message, serversView.getServerStatus(getServerName()), is(state));
}
+
+ private void assertWebPageContains(String string) {
+ serversView.openWebPage(configuredState.getServer().name);
+ }
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/editor/ServerEditor.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/editor/ServerEditor.java 2012-06-14 11:44:51 UTC (rev 41966)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/editor/ServerEditor.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -1,12 +1,5 @@
package org.jboss.ide.eclipse.as.ui.bot.test.editor;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.waits.ICondition;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.ide.eclipse.as.ui.bot.test.entity.XMLConfiguration;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.view.ServersView;
@@ -38,46 +31,4 @@
public String getManagementPort(){
return SWTBotFactory.getBot().textWithLabel("Management").getText();
}
-
- public List<XMLConfiguration> getXMLConfiguration(String categoryName){
- SWTBotTreeItem server = serversView.findServerByName(name);
- server.expand();
- final SWTBotTreeItem category = server.expandNode("XML Configuration", categoryName);
-
- SWTBotFactory.getBot().waitUntil(new TreeItemLabelChangedCondition(category.getNode(0)));
-
- List<XMLConfiguration> configurations = new ArrayList<XMLConfiguration>();
- for (SWTBotTreeItem item : category.getItems()){
- String[] columns = item.getText().split(" ");
- configurations.add(new XMLConfiguration(columns[0].trim(), columns[1].trim()));
- }
- return configurations;
- }
-
- private static class TreeItemLabelChangedCondition implements ICondition {
-
- private String firstTimeText;
-
- private SWTBotTreeItem item;
-
- public TreeItemLabelChangedCondition(SWTBotTreeItem item) {
- super();
- this.item = item;
- }
-
- @Override
- public void init(SWTBot bot) {
- firstTimeText = item.getText();
- }
-
- @Override
- public boolean test() throws Exception {
- return !firstTimeText.equals(item.getText());
- }
-
- @Override
- public String getFailureMessage() {
- return "Expected the tree item's text to change";
- }
- }
}
Deleted: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/entity/XMLConfiguration.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/entity/XMLConfiguration.java 2012-06-14 11:44:51 UTC (rev 41966)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/entity/XMLConfiguration.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -1,70 +0,0 @@
-package org.jboss.ide.eclipse.as.ui.bot.test.entity;
-
-public class XMLConfiguration {
-
- private String key;
-
- private String value;
-
- public XMLConfiguration() {
- // default
- }
-
- public XMLConfiguration(String key, String value) {
- super();
- this.key = key;
- this.value = value;
- }
-
- public String getKey() {
- return key;
- }
-
- public void setKey(String key) {
- this.key = key;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- @Override
- public String toString() {
- return getKey() + "=" + getValue();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((key == null) ? 0 : key.hashCode());
- result = prime * result + ((value == null) ? 0 : value.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- XMLConfiguration other = (XMLConfiguration) obj;
- if (key == null) {
- if (other.key != null)
- return false;
- } else if (!key.equals(other.key))
- return false;
- if (value == null) {
- if (other.value != null)
- return false;
- } else if (!value.equals(other.value))
- return false;
- return true;
- }
-}
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/web/PageSourceMatcher.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/web/PageSourceMatcher.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/web/PageSourceMatcher.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,26 @@
+package org.jboss.ide.eclipse.as.ui.bot.test.web;
+
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+
+public class PageSourceMatcher extends TypeSafeMatcher<String> {
+
+ private String pageText;
+
+ public PageSourceMatcher() {
+ super();
+ }
+
+ @Override
+ public boolean matchesSafely(String item) {
+ pageText = SWTBotFactory.getBot().browser().getText();
+ return pageText.contains(item);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("is on the page, but there was instead: ");
+ description.appendValue(pageText);
+ }
+}
Added: trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/ImportProjectWizard.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/ImportProjectWizard.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/wizard/ImportProjectWizard.java 2012-06-14 11:48:13 UTC (rev 41967)
@@ -0,0 +1,111 @@
+package org.jboss.ide.eclipse.as.ui.bot.test.wizard;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactory;
+import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.wizards.SWTBotImportWizard;
+
+public class ImportProjectWizard {
+
+ private SWTBotImportWizard wizard = new SWTBotImportWizard();
+
+ private String[] projectNames;
+
+ private String projectPath;
+
+ private String zipFilePath;
+
+ private boolean copyProjectsIntoWorkspace;
+
+ public void execute(){
+ wizard.open(ActionItem.Import.GeneralExistingProjectsintoWorkspace.LABEL.getName(), ActionItem.Import.GeneralExistingProjectsintoWorkspace.LABEL.getGroupPath().get(0));
+ loadProjects();
+ selectProjects();
+ wizard.finishWithWait();
+ }
+
+ private void loadProjects() {
+ if (projectPath != null && zipFilePath != null){
+ throw new IllegalArgumentException("You have to choose between folder and ZIP path");
+ }
+
+ if (projectPath != null){
+ loadProjectsFromFolder();
+ return;
+ }
+
+ if (zipFilePath != null){
+ loadProjectsFromZIP();
+ return;
+ }
+
+ throw new IllegalArgumentException("You have to provide either folder or ZIP path");
+ }
+
+ private void loadProjectsFromFolder() {
+ getBot().text(0).setText(projectPath);
+ KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.TAB);
+ }
+
+ private void loadProjectsFromZIP() {
+ getBot().radio("Select archive file:").click();
+ getBot().text(1).setText(zipFilePath);
+ KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.TAB);
+ }
+
+ private void selectProjects() {
+ selectCopyProjectsIntoWorkspace();
+ getBot().button("Deselect All").click();
+ SWTBotTree projectsTree = getBot().treeWithLabel("Projects:");
+ for (String projectName : projectNames){
+ SWTBotTreeItem projectItem = projectsTree.getTreeItem(getProjectLabel(projectName));
+ projectItem.check();
+ }
+ }
+
+ private void selectCopyProjectsIntoWorkspace() {
+ if (isFileSystem()){
+ if (copyProjectsIntoWorkspace){
+ getBot().checkBox("Copy projects into workspace").select();
+ } else {
+ getBot().checkBox("Copy projects into workspace").deselect();
+ }
+ }
+ }
+
+ private String getProjectLabel(String project){
+ if (isFileSystem()){
+ return project + " (" + projectPath + "/" + project + ")";
+ } else {
+ return project + " (" + project + ")";
+ }
+ }
+
+ private boolean isFileSystem(){
+ return projectPath != null;
+ }
+
+ public void setProjectNames(String... projectNames) {
+ this.projectNames = projectNames;
+ }
+
+ public void setProjectPath(String projectPath) {
+ this.projectPath = projectPath;
+ }
+
+ public void setZipFilePath(String zipFilePath) {
+ this.zipFilePath = zipFilePath;
+ }
+
+ public void setCopyProjectsIntoWorkspace(boolean copyProjectsIntoWorkspace) {
+ this.copyProjectsIntoWorkspace = copyProjectsIntoWorkspace;
+ }
+
+ private SWTBot getBot(){
+ return SWTBotFactory.getBot();
+ }
+}
13 years, 10 months
JBoss Tools SVN: r41966 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-06-14 07:44:51 -0400 (Thu, 14 Jun 2012)
New Revision: 41966
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/InterfaceAndAbstractValidationTest.java
Log:
seam3 bot test fixed according to JBIDE-12165
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/InterfaceAndAbstractValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/InterfaceAndAbstractValidationTest.java 2012-06-14 11:41:06 UTC (rev 41965)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/InterfaceAndAbstractValidationTest.java 2012-06-14 11:44:51 UTC (rev 41966)
@@ -48,7 +48,7 @@
/* assert message contains expected value */
assertMessageContainsExpectedValue(MarkerHelper.getMarkerMessage(markers[0]),
- "Interface ", "cannot be configured as a bean");
+ "Abstract type", "cannot be configured as a bean");
}
13 years, 10 months
JBoss Tools SVN: r41965 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext: view and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-06-14 07:41:06 -0400 (Thu, 14 Jun 2012)
New Revision: 41965
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
Log:
Added new methods to ServersView
Copied: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java (from rev 41882, trunk/as/tests/org.jboss.ide.eclipse.as.ui.bot.test/src/org/jboss/ide/eclipse/as/ui/bot/test/entity/XMLConfiguration.java)
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/entity/XMLConfiguration.java 2012-06-14 11:41:06 UTC (rev 41965)
@@ -0,0 +1,70 @@
+package org.jboss.tools.ui.bot.ext.entity;
+
+public class XMLConfiguration {
+
+ private String key;
+
+ private String value;
+
+ public XMLConfiguration() {
+ // default
+ }
+
+ public XMLConfiguration(String key, String value) {
+ super();
+ this.key = key;
+ this.value = value;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return getKey() + "=" + getValue();
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((key == null) ? 0 : key.hashCode());
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ XMLConfiguration other = (XMLConfiguration) obj;
+ if (key == null) {
+ if (other.key != null)
+ return false;
+ } else if (!key.equals(other.key))
+ return false;
+ if (value == null) {
+ if (other.value != null)
+ return false;
+ } else if (!value.equals(other.value))
+ return false;
+ return true;
+ }
+}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2012-06-14 11:40:41 UTC (rev 41964)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java 2012-06-14 11:41:06 UTC (rev 41965)
@@ -1,5 +1,8 @@
package org.jboss.tools.ui.bot.ext.view;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.waits.ICondition;
@@ -8,10 +11,12 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
+import org.jboss.tools.ui.bot.ext.entity.XMLConfiguration;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.ServerServers;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -100,19 +105,19 @@
ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, "Restart", false)).click();
handleServerAlreadyRunning(bot);
-
+
bot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.VERY_LONG.getTimeout());
bot.waitUntil(new ICondition() {
-
+
@Override
public boolean test() throws Exception {
return "Started".equals(getServerStatus(serverName));
}
-
+
@Override
public void init(SWTBot bot) {
}
-
+
@Override
public String getFailureMessage() {
return "The server does not have status 'Started'";
@@ -179,10 +184,16 @@
}
return null;
}
-
+
+ public SWTBotTreeItem findServerByName(String name) {
+
+ SWTBot bot = show().bot();
+ return findServerByName(bot.tree(), name);
+ }
+
public boolean serverExists(String serverName){
SWTBot bot = show().bot();
-
+
try {
// if there are no servers the following text appears
bot.link("No servers available. Define a new server from the <a>new server wizard</a>...");
@@ -190,21 +201,57 @@
} catch (WidgetNotFoundException e){
// ok, there are some servers, let's check the name
}
-
+
SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
return server != null;
}
-
+
public String getServerStatus(String serverName){
SWTBot bot = show().bot();
SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
-
+
String label = server.getText();
int startIndex = label.indexOf('[') + 1;
int endIndex = label.indexOf(',');
return label.substring(startIndex, endIndex);
}
+ public String getServerPublishStatus(String serverName){
+ SWTBot bot = show().bot();
+ SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
+
+ String label = server.getText();
+ int startIndex = label.indexOf(',') + 2;
+ int endIndex = label.indexOf(']');
+ return label.substring(startIndex, endIndex);
+ }
+
+ public boolean containsProject(String serverName, String project){
+ SWTBot bot = show().bot();
+ SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
+ server.expand();
+
+ try {
+ getProjectNode(server, project);
+ return true;
+ } catch (WidgetNotFoundException e){
+ return false;
+ }
+ }
+
+ private SWTBotTreeItem getProjectNode(SWTBotTreeItem server, String projectName){
+ for (SWTBotTreeItem child : server.getItems()){
+ String name = child.getText();
+ if (name.contains("[")){
+ name = name.substring(0, name.indexOf("["));
+ }
+ if (name.trim().equals(projectName)){
+ return child;
+ }
+ }
+ throw new WidgetNotFoundException("Project " + projectName + " was not found within server");
+ }
+
/**
* removes project with given name from all servers
* @param projectName
@@ -249,4 +296,84 @@
}
+ public void addProjectToServer(String projectName, String serverName){
+ SWTBot bot = show().bot();
+ SWTBotTree serversTree = bot.tree();
+ SWTBotTreeItem server = findServerByName(serversTree, serverName);
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(serversTree,server);
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(serversTree, IDELabel.Menu.ADD_AND_REMOVE, false)).click();
+
+ SWTBot shellBot = bot.shell("Add and Remove...").bot();
+
+ shellBot.tree(0).getTreeItem(projectName).select();
+ shellBot.button("Add >").click();
+ shellBot.button("Finish").click();
+ shellBot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.VERY_LONG.getTimeout());
+ }
+
+ public void openServerEditor(String serverName){
+ SWTBot bot = show().bot();
+ SWTBotTreeItem server = findServerByName(bot.tree(), serverName);
+ server.doubleClick();
+ }
+
+ public void openWebPage(String serverName){
+ SWTBot bot = show().bot();
+ SWTBotTree serversTree = bot.tree();
+ SWTBotTreeItem server = findServerByName(serversTree, serverName);
+
+ server.contextMenu("Web Browser").click();
+ }
+
+ public void openWebPage(String serverName, String projectName){
+ SWTBot bot = show().bot();
+ SWTBotTree serversTree = bot.tree();
+ SWTBotTreeItem server = findServerByName(serversTree, serverName);
+ SWTBotTreeItem project = getProjectNode(server, projectName);
+ project.contextMenu("Web Browser").click();
+ }
+
+ public List<XMLConfiguration> getXMLConfiguration(String serverName, String categoryName){
+ SWTBotTreeItem server = findServerByName(serverName);
+ server.expand();
+ final SWTBotTreeItem category = server.expandNode("XML Configuration", categoryName);
+
+ String separator = " ";
+ SWTBotFactory.getBot().waitUntil(new TreeItemLabelDecorated(category.getNode(0), separator));
+
+ List<XMLConfiguration> configurations = new ArrayList<XMLConfiguration>();
+ for (final SWTBotTreeItem item : category.getItems()){
+ String[] columns = item.getText().split(separator);
+ configurations.add(new XMLConfiguration(columns[0].trim(), columns[1].trim()));
+ }
+ return configurations;
+ }
+
+ private static class TreeItemLabelDecorated implements ICondition {
+
+ private String separator;
+
+ private SWTBotTreeItem item;
+
+ public TreeItemLabelDecorated(SWTBotTreeItem item, String separator) {
+ super();
+ this.item = item;
+ this.separator = separator;
+ }
+
+ @Override
+ public void init(SWTBot bot) {
+ }
+
+ @Override
+ public boolean test() throws Exception {
+ return item.getText().contains(separator);
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return "Expected the tree item to be decorated with separator '" + separator + "'";
+ }
+ }
}
13 years, 10 months
JBoss Tools SVN: r41964 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-06-14 07:40:41 -0400 (Thu, 14 Jun 2012)
New Revision: 41964
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console/ConsoleOutputMatcher.java
Log:
Added possibility to wait until the required text appears in console
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console/ConsoleOutputMatcher.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console/ConsoleOutputMatcher.java 2012-06-14 05:24:49 UTC (rev 41963)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/matcher/console/ConsoleOutputMatcher.java 2012-06-14 11:40:41 UTC (rev 41964)
@@ -1,11 +1,15 @@
package org.jboss.tools.ui.bot.ext.matcher.console;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.waits.ICondition;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
/**
- * Checks if the console contains specified text.
+ * Checks if the console contains specified text (and waits for it to appear if necessary).
*
* @author Lucia Jelinkova
*
@@ -13,18 +17,63 @@
public class ConsoleOutputMatcher extends TypeSafeMatcher<String> {
private String consoleText;
+
+ private long timeout;
+
+ public ConsoleOutputMatcher() {
+ timeout = 0;
+ }
+ public ConsoleOutputMatcher(long timeout) {
+ this.timeout = timeout;
+ }
+
+ public ConsoleOutputMatcher(TaskDuration taskDuration) {
+ this.timeout = taskDuration.getTimeout();
+ }
+
@Override
public boolean matchesSafely(String item) {
- consoleText = SWTBotFactory.getConsole().getConsoleText();
- if (consoleText == null){
- throw new IllegalStateException("No console output present");
+ try {
+ SWTBotFactory.getBot().waitUntil(new ConsoleContainsTextCondition(item), timeout);
+ if (consoleText == null){
+ throw new IllegalStateException("No console output present");
+ }
+ return true;
+ } catch (TimeoutException e){
+ return false;
}
- return consoleText.contains(item);
}
@Override
public void describeTo(Description description) {
description.appendText("is in console output, but instead: \n" + consoleText);
}
+
+ private class ConsoleContainsTextCondition implements ICondition {
+
+ private String expectedText;
+
+ public ConsoleContainsTextCondition(String item) {
+ this.expectedText = item;
+ }
+
+ @Override
+ public boolean test() throws Exception {
+ consoleText = SWTBotFactory.getConsole().getConsoleText();
+ if (consoleText == null){
+ return false;
+ }
+ return consoleText.contains(expectedText);
+ }
+
+ @Override
+ public void init(SWTBot bot) {
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return null;
+ }
+ }
}
13 years, 10 months
JBoss Tools SVN: r41963 - trunk/maven/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-06-14 01:24:49 -0400 (Thu, 14 Jun 2012)
New Revision: 41963
Added:
trunk/maven/docs/reference/en-US/Author_Group.xml
trunk/maven/docs/reference/en-US/Book_Info.xml
trunk/maven/docs/reference/en-US/Maven_Tools_Reference_Guide.ent
trunk/maven/docs/reference/en-US/Maven_Tools_Reference_Guide.xml
trunk/maven/docs/reference/en-US/adding_maven_support.xml
trunk/maven/docs/reference/en-US/creating_a_maven_module.xml
Modified:
trunk/maven/docs/reference/en-US/Revision_History.xml
Log:
updating book, the files didn't go up last time
Added: trunk/maven/docs/reference/en-US/Author_Group.xml
===================================================================
--- trunk/maven/docs/reference/en-US/Author_Group.xml (rev 0)
+++ trunk/maven/docs/reference/en-US/Author_Group.xml 2012-06-14 05:24:49 UTC (rev 41963)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE authorgroup PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<authorgroup>
+ <author>
+ <firstname>Isaac</firstname>
+ <surname>Rooskov</surname>
+ </author>
+</authorgroup>
+
Added: trunk/maven/docs/reference/en-US/Book_Info.xml
===================================================================
--- trunk/maven/docs/reference/en-US/Book_Info.xml (rev 0)
+++ trunk/maven/docs/reference/en-US/Book_Info.xml 2012-06-14 05:24:49 UTC (rev 41963)
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<bookinfo id="book-Maven_Integration_Guide-Maven_Integration_Guide">
+ <title>Maven Tools Reference Guide</title>
+ <subtitle>
+ Provides information about the use of <application>Maven</application> within the <application>JBoss Developer Studio</application>.
+ </subtitle>
+
+ <productname>JBoss Developer Studio</productname>
+
+ <productnumber>5.0</productnumber>
+
+ <edition>5.0.0</edition>
+
+ <pubsnumber>3</pubsnumber>
+
+ <abstract>
+ <para>
+ The Maven Tools Reference Guide explains how to utilize Maven from within the JBoss Developer Studio.
+ </para>
+ </abstract>
+
+ <corpauthor>
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="Common_Content/images/title_logo.svg" format="SVG" />
+ </imageobject>
+ </inlinemediaobject>
+ </corpauthor>
+
+ <xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+ <xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</bookinfo>
Added: trunk/maven/docs/reference/en-US/Maven_Tools_Reference_Guide.ent
===================================================================
--- trunk/maven/docs/reference/en-US/Maven_Tools_Reference_Guide.ent (rev 0)
+++ trunk/maven/docs/reference/en-US/Maven_Tools_Reference_Guide.ent 2012-06-14 05:24:49 UTC (rev 41963)
@@ -0,0 +1,7 @@
+<!ENTITY PRODUCT "JBoss">
+<!ENTITY BOOKID "Maven_Tools_Reference_Guide">
+<!ENTITY YEAR "2012">
+<!ENTITY HOLDER "Red Hat">
+<!ENTITY BZPRODUCT "JBoss Developer Studio">
+<!ENTITY BZCOMPONENT "Maven Tools Reference Guide">
+<!ENTITY BZURL "<ulink url='https://bugzilla.redhat.com/enter_bug.cgi?product=JBoss%20Develope...'>http://bugzilla.redhat.com/</ulink>">
Added: trunk/maven/docs/reference/en-US/Maven_Tools_Reference_Guide.xml
===================================================================
--- trunk/maven/docs/reference/en-US/Maven_Tools_Reference_Guide.xml (rev 0)
+++ trunk/maven/docs/reference/en-US/Maven_Tools_Reference_Guide.xml 2012-06-14 05:24:49 UTC (rev 41963)
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<book>
+ <xi:include href="Book_Info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="creating_a_maven_project.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="creating_a_maven_module.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="adding_maven_support.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="Revision_History.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</book>
+
Modified: trunk/maven/docs/reference/en-US/Revision_History.xml
===================================================================
--- trunk/maven/docs/reference/en-US/Revision_History.xml 2012-06-14 05:16:11 UTC (rev 41962)
+++ trunk/maven/docs/reference/en-US/Revision_History.xml 2012-06-14 05:24:49 UTC (rev 41963)
@@ -1,24 +1,25 @@
<?xml version='1.0' encoding='utf-8' ?>
-<appendix id="appe-Beginners_Guide-Revision_History">
- <title>Revision History</title>
- <simpara>
- <revhistory>
- <revision>
- <revnumber>0-0</revnumber>
- <date>Mon May 21 2012</date>
- <author>
- <firstname>Isaac</firstname>
- <surname>Rooskov</surname>
- </author>
- <email></email>
- <revdescription>
- <simplelist>
- <member>Initial creation of book</member>
- </simplelist>
- </revdescription>
- </revision>
- </revhistory>
- </simpara>
-</appendix>
-
+ <appendix id="appe-Maven_Tools_Reference_Guide-Revision_History">
+ <title>Revision History</title>
+ <simpara>
+ <revhistory>
+ <revision>
+ <revnumber>1-0</revnumber>
+ <date>Thu Jun 14 2012</date>
+ <author>
+ <firstname>Isaac</firstname>
+ <surname>Rooskov</surname>
+ <email>irooskov(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Initial creation of book</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ </revhistory>
+ </simpara>
+ </appendix>
+
+
\ No newline at end of file
Added: trunk/maven/docs/reference/en-US/adding_maven_support.xml
===================================================================
--- trunk/maven/docs/reference/en-US/adding_maven_support.xml (rev 0)
+++ trunk/maven/docs/reference/en-US/adding_maven_support.xml 2012-06-14 05:24:49 UTC (rev 41963)
@@ -0,0 +1,108 @@
+<chapter id="adding_maven_support">
+ <title>Adding Maven support to an existing project</title>
+ <para>
+ Select the project that Maven support will be added to from the <guilabel>Project Explorer</guilabel>.
+ </para>
+ <figure id="adding_maven_support_00">
+ <title>Selecting Maven project conversion</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/adding_maven_support/adding_maven_support_00.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Selecting Convert to Maven Project from the context menu of the chosen project.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Right-click on the project to bring up the context menu.
+ </para>
+ <para>
+ From the context menu navigate to <menuchoice><guimenuitem>Configure</guimenuitem><guimenuitem>Convert to Maven Project</guimenuitem></menuchoice>.
+ </para>
+ <figure id="adding_maven_support_01">
+ <title>Selecting Maven project conversion</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/adding_maven_support/adding_maven_support_01.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Selecting Convert to Maven Project from the context menu of the chosen project.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click on the <guimenuitem>Convert to Maven Project</guimenuitem> menu option.
+ </para>
+ <para>
+ A <guilabel>Maven POM</guilabel> wizard will launch. The wizard will create a <filename>pom.xml</filename> file for your project. This file will contain the projects Maven settings. All necessary fields of the wizard will be automatically filled.
+ </para>
+ <figure id="adding_maven_support_02">
+ <title>Maven POM wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/adding_maven_support/adding_maven_support_02.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The wizard to create a <filename>pom.xml</filename> file for your project.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ It is recommended that you change the <guilabel>Packaging</guilabel> option to <guimenuitem>pom</guimenuitem> to avoid any issues in expansion of the project with Maven modules in the future.
+ </para>
+ <figure id="adding_maven_support_03">
+ <title>Changing Packaging setting to pom</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/adding_maven_support/adding_maven_support_03.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Showing the selection of pom from the drop-down menu of the Packaging setting.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click <guibutton>Finish</guibutton>.
+ </para>
+ <para>
+ Once Maven support has been added to the project, a new <filename>pom.xml</filename> file will appear in the list of files for the project. This can be viewed in the <guilabel>Project Explorer</guilabel>.
+ </para>
+ <figure id="adding_maven_support_04">
+ <title>New pom.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/adding_maven_support/adding_maven_support_04.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The project now has a new pom.xml file, seen in the Project Explorer.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Double-click on the <filename>pom.xml</filename> file to view the settings associated with it. The settings here were set in the <guilabel>Maven POM</guilabel> wizard and can be edited from this <guilabel>Overview</guilabel> screen.
+ </para>
+ <figure id="adding_maven_support_05">
+ <title>Overview screen for pom.xml</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/adding_maven_support/adding_maven_support_05.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The Overview screen for the new pom.xml file.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+</chapter>
\ No newline at end of file
Added: trunk/maven/docs/reference/en-US/creating_a_maven_module.xml
===================================================================
--- trunk/maven/docs/reference/en-US/creating_a_maven_module.xml (rev 0)
+++ trunk/maven/docs/reference/en-US/creating_a_maven_module.xml 2012-06-14 05:24:49 UTC (rev 41963)
@@ -0,0 +1,168 @@
+<chapter id="creating_a_maven_application">
+ <title>Creating a Maven Module</title>
+ <para>
+ A Maven module is a sub-project. To create a Maven module you will need to already have a Maven project available.
+ </para>
+ <para>
+ The parent project must have its <guilabel>Packaing</guilabel> option be pre-configured to <guimenuitem>pom</guimenuitem> for a module to be created and associated to it. To ensure your parent project has this option set correctly before proceeding, double-click on the <filename>pom.xml</filename> file of your parent project in the <guilabel>Project Explorer</guilabel>.
+ </para>
+ <para>
+ In the <guilabel>Overview</guilabel> settings page that is now displayed in your workbench, confirm that the option <guibutton>Packaging</guibutton> is set to <guimenuitem>pom</guimenuitem>. If it is not, select <guimenuitem>pom</guimenuitem> from the list menu and save the changes to your <filename>pom.xml</filename> file.
+ </para>
+ <figure id="module_creation_01">
+ <title>Parent project pom.xml file settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_01.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The settings associated with the pom.xml file of the parent project.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ From your workspace navigate to <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Other</guimenuitem></menuchoice> and from the wizard selection screen select <menuchoice><guimenuitem>Maven</guimenuitem><guimenuitem>Maven Module</guimenuitem></menuchoice>.
+ </para>
+ <figure id="module_creation_02">
+ <title>Selecting the Maven Module wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_02.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Wizard selection screen with the Maven Module wizard selected.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Type a name for the module in the <guilabel>Module Name</guilabel> field.
+ </para>
+ <figure id="module_creation_03">
+ <title>Naming the module</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_03.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Typing a name for the module.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click the <guibutton>Browse</guibutton> button beside the <guilabel>Parent Project</guilabel> field. This will launch a project selection box.
+ </para>
+ <para>
+ Select the project to be used as the parent project of the module you are creating, and click <guibutton>OK</guibutton>.
+ </para>
+ <figure id="module_creation_04">
+ <title>Selecting the parent project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_04.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Selecting the project that will be the parent project of the module.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ You will be returned to the <guilabel>Select a parent project</guilabel> screen and the <guilabel>Parent Project</guilabel> field will contain the name of the project you selected.
+ </para>
+ <figure id="module_creation_05">
+ <title>Parent Project field populated with project name</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_05.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The Select a parent project screen with the Parent Project field now containing the name of the selected project.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click the <guibutton>Next</guibutton> button.
+ </para>
+ <para>
+ Select an archetype available in the list displayed. For the purposes of this example the <guimenuitem>maven-archetype-quickstart</guimenuitem> is selected.
+ </para>
+ <figure id="module_creation_06">
+ <title>Archetype selection screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_06.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Selecting an archetype for the module.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click the <guibutton>Next</guibutton> button.
+ </para>
+ <para>
+ Specify archetype parameters <guilabel>Group Id</guilabel> and <guilabel>Version</guilabel>. Ensure that the values you specify for these fields are unique from those set in the parent project.
+ </para>
+ <para>
+ In this example, the <guilabel>Group Id</guilabel> and <guilabel>Version</guilabel> settings of the parent project used are set to <property>group_id</property> and <property>0.0.1-SNAPSHOT</property> respectively. For the module <guilabel>Group Id</guilabel> and <guilabel>Version</guilabel> settings are being specified as <property>sub_group_id</property> and <property>0.1.1-SNAPSHOT</property> respectively, to avoid conflict.
+ </para>
+ <figure id="module_creation_07">
+ <title>Archetype parameter settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_07.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Specifying the settings to be used by the archetype for the module being created.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Click the <guibutton>Finish</guibutton> button.
+ </para>
+ <para>
+ The module will now be created and appear in your <guilabel>Project Explorer</guilabel>.
+ </para>
+ <figure id="module_creation_08">
+ <title>Created module in the Project Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_08.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The module has now been created and appears in the Project Explorer.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ You can view and change settings associated with the module by selecting the module's <filename>pom.xml</filename> file from the <guilabel>Project Explorer</guilabel> and double-clicking on it. This will launch an <guilabel>Overview</guilabel> screen containing the module settings.
+ </para>
+ <figure id="module_creation_09">
+ <title>Module Overview screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/module_creation/module_creation_09.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The module Overview page, where settings can be viewed and changed.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+</chapter>
\ No newline at end of file
13 years, 10 months