JBoss Tools SVN: r23743 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-07-27 04:43:54 -0400 (Tue, 27 Jul 2010)
New Revision: 23743
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
Log:
Updated isOurCase method in order to avoid possible NPE
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2010-07-27 08:18:54 UTC (rev 23742)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/JSPProblemMarkerResolutionGenerator.java 2010-07-27 08:43:54 UTC (rev 23743)
@@ -73,8 +73,17 @@
private boolean isOurCase(IMarker marker) throws CoreException{
String message = (String)marker.getAttribute(IMarker.MESSAGE);
- final int start = ((Integer)marker.getAttribute(IMarker.CHAR_START)).intValue();
- final int end = ((Integer)marker.getAttribute(IMarker.CHAR_END)).intValue();
+
+ Integer attribute = ((Integer)marker.getAttribute(IMarker.CHAR_START));
+ if(attribute == null)
+ return false;
+ final int start = attribute.intValue();
+
+ attribute = ((Integer)marker.getAttribute(IMarker.CHAR_END));
+ if(attribute == null)
+ return false;
+ final int end = attribute.intValue();
+
if(!message.startsWith("Unknown tag")) //$NON-NLS-1$
return false;
13 years, 10 months
JBoss Tools SVN: r23742 - in workspace/rstryker/rse/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-07-27 04:18:54 -0400 (Tue, 27 Jul 2010)
New Revision: 23742
Added:
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/IRSEConstants.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSection.java
Modified:
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/DeploymentPreferenceLoader.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/IDeploymentTypeUI.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PollerSection.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java
workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-6580 - moved publish method from second page to first, cleaned up second page, added RSE ui for first page
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -19,6 +19,7 @@
* @author rob.stryker(a)jboss.com
*/
public interface IDeployableServer {
+ public static final String SERVER_MODE = "org.jboss.ide.eclipse.as.core.server.serverMode"; //$NON-NLS-1$
public static final String DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.deployDirectory"; //$NON-NLS-1$
public static final String TEMP_DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.tempDeployDirectory"; //$NON-NLS-1$
public static final String DEPLOY_DIRECTORY_TYPE = "org.jboss.ide.eclipse.as.core.server.deployDirectoryType"; //$NON-NLS-1$
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/DeploymentPreferenceLoader.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/DeploymentPreferenceLoader.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/DeploymentPreferenceLoader.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -24,7 +24,9 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.internal.Server;
import org.jboss.ide.eclipse.as.core.ExtensionManager;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.tools.jmx.core.IMemento;
import org.jboss.tools.jmx.core.util.XMLMemento;
@@ -43,8 +45,7 @@
* @return
*/
public static IJBossServerPublishMethodType getCurrentDeploymentMethodType(IServer server) {
- DeploymentPreferences prefs = DeploymentPreferenceLoader.loadPreferencesFromServer(server);
- String type = prefs.getProperty(DeploymentPreferenceLoader.CURRENT_METHOD_PROPERTY);
+ String type = server.getAttribute(IDeployableServer.SERVER_MODE, (String)null);
if( type != null ) {
return ExtensionManager.getDefault().getPublishMethod(type);
}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -13,10 +13,12 @@
import java.util.ArrayList;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -107,4 +109,8 @@
return ret;
}
+ public static IJBossServerRuntime getJBossRuntime(IServer server) {
+ IRuntime rt = server.getRuntime();
+ return (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, null);
+ }
}
Added: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/IRSEConstants.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/IRSEConstants.java (rev 0)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/IRSEConstants.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.rse.core;
+
+public interface IRSEConstants {
+ public static final String RSE_SERVER_CONFIG = "org.jboss.ide.eclipse.as.rse.core.RSEServerConfig"; //$NON-NLS-1$
+ public static final String RSE_SERVER_HOME_DIR = "org.jboss.ide.eclipse.as.rse.core.RSEServerHomeDir"; //$NON-NLS-1$
+ public static final String RSE_SERVER_HOST = "org.jboss.ide.eclipse.as.rse.core.ServerHost"; //$NON-NLS-1$
+ public static final String RSE_SERVER_DEFAULT_HOST = "Local"; //$NON-NLS-1$
+}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -34,7 +34,9 @@
public class RSEPublishMethod extends AbstractPublishMethod {
public static final String RSE_ID = "rse"; //$NON-NLS-1$
-
+
+ private DeployableServerBehavior behaviour;
+
@Override
public String getPublishMethodId() {
return RSE_ID;
@@ -45,6 +47,7 @@
private IPath remoteTemporaryFolder;
public void publishStart(DeployableServerBehavior behaviour,
IProgressMonitor monitor) throws CoreException {
+ this.behaviour = behaviour;
loadRemoteDeploymentDetails();
if (fileSubSystem != null && !fileSubSystem.isConnected()) {
try {
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2010-07-27 08:18:54 UTC (rev 23742)
@@ -53,7 +53,8 @@
org.jboss.tools.jmx.ui,
org.jboss.tools.jmx.core,
org.eclipse.jst.j2ee.core,
- org.eclipse.rse.ui;bundle-version="3.1.100"
+ org.eclipse.rse.ui;resolution:=optional,
+ org.eclipse.rse.core;resolution:=optional
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.ide.eclipse.as.ui,
org.jboss.ide.eclipse.as.ui.dialogs,
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -73,6 +73,7 @@
public static String swf_NameInUse;
public static String swf_DeployEditorHeading;
public static String swf_DeploymentDescription;
+ public static String swf_DeploymentDescriptionLabel;
public static String swf_DeployDirectory;
public static String swf_TempDeployDirectory;
public static String swf_CloneConfiguration;
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-07-27 08:18:54 UTC (rev 23742)
@@ -41,7 +41,8 @@
swf_BaseName=JBoss _VERSION_ Server
swf_NameInUse=Server name already in use
swf_DeployEditorHeading=Default Settings
-swf_DeploymentDescription=This section sets where any non-customized module will be deployed to.\nThe temporary deploy folder should be on the same file-system as the deploy folder.\nThis will ensure safe and complete file copies.\nCustomizations can be made in the table below on a per-module basis.\nBlank columns will use the default values.\nChanges should *not* be made to this page while the server is running.
+swf_DeploymentDescriptionLabel=Set the default publish settings for your deployments.\nSettings can be overridden per-module in the table below.
+swf_DeploymentDescription=This section sets the default deploy folders for your deployments. To ensure safe and fast file copies, the temporary deploy folder should be on the same file-system as the main deploy folder.\n\nCustomizations can be made in the table below on a per-module basis. Blank (uncustomized) modules will continue to use the default values. Customized paths may be absolute or relative to the server's root directory (eg: server/default/deploy/custom/folder).\n\nChanges should *not* be made to this page while the server is running.
swf_DeployDirectory=Deploy Directory
swf_TempDeployDirectory=Temporary Deploy Directory
swf_CloneConfiguration=Copy this configuration into workspace metadata
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -19,7 +19,9 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
@@ -101,6 +103,9 @@
if (ExploreUtils.getExploreCommand() == null) {
return false;
}
+ DeployableServerBehavior dsb = ServerConverter.getDeployableServerBehavior(server);
+ if( !dsb.createPublishMethod().getPublishMethodType().getId().equals(LocalPublishMethod.LOCAL_PUBLISH_METHOD))
+ return false;
return true;
}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -118,6 +118,7 @@
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
| ExpandableComposite.TITLE_BAR);
section.setText(Messages.swf_DeployEditorHeading);
+ section.setToolTipText(Messages.swf_DeploymentDescription);
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
| GridData.VERTICAL_ALIGN_FILL));
@@ -126,7 +127,8 @@
composite.setLayout(new FormLayout());
Label descriptionLabel = toolkit.createLabel(composite,
- Messages.swf_DeploymentDescription);
+ Messages.swf_DeploymentDescriptionLabel);
+ descriptionLabel.setToolTipText(Messages.swf_DeploymentDescription);
Control top = descriptionLabel;
Composite inner = toolkit.createComposite(composite);
inner.setLayout(new GridLayout(1, false));
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/IDeploymentTypeUI.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/IDeploymentTypeUI.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/IDeploymentTypeUI.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -25,7 +25,7 @@
* new class which extends Composite and can maintain state.
*
* @param parent
- * @param page
+ * @param modeSection
*/
- public void fillComposite(Composite parent, ModuleDeploymentPage page);
+ public void fillComposite(Composite parent, ServerModeSection modeSection);
}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -19,26 +19,17 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.ScrolledPageBook;
-import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServerWorkingCopy;
@@ -47,17 +38,12 @@
import org.eclipse.wst.server.ui.internal.command.ServerCommand;
import org.eclipse.wst.server.ui.internal.editor.ServerEditorPartInput;
import org.eclipse.wst.server.ui.internal.editor.ServerResourceCommandManager;
-import org.jboss.ide.eclipse.as.core.ExtensionManager;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentModulePrefs;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentPreferences;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
-import org.jboss.ide.eclipse.as.ui.UIUtil;
public class ModuleDeploymentPage extends ServerEditorPart {
protected ServerResourceCommandManager commandManager;
@@ -114,17 +100,10 @@
}
- private ArrayList<DeployUIAdditions> deployAdditions;
- private ScrolledPageBook preferencePageBook;
- private Combo deployTypeCombo;
- private Composite absolutePageRoot;
- private Section publishTypeSection;
public void createPartControl(Composite parent) {
- absolutePageRoot = parent;
preferences = DeploymentPreferenceLoader.loadPreferencesFromServer(server.getOriginal());
Composite innerContent = createPageStructure(parent);
- Control top = createPublishMethodSection(innerContent);
- addDeploymentLocationControls(innerContent, top);
+ addDeploymentLocationControls(innerContent, null);
}
private Composite createPageStructure(Composite parent) {
@@ -147,7 +126,10 @@
Composite defaultComposite = tab.createDefaultComposite(parent);
FormData fd = new FormData();
fd.left = new FormAttachment(0, 5);
- fd.top = new FormAttachment(top, 5);
+ if( top == null )
+ fd.top = new FormAttachment(0, 5);
+ else
+ fd.top = new FormAttachment(top, 5);
fd.right = new FormAttachment(100, -5);
defaultComposite.setLayoutData(fd);
@@ -161,104 +143,7 @@
}
- private class DeployUIAdditions {
- private IJBossServerPublishMethodType publishType;
- private IDeploymentTypeUI ui;
- private boolean registered = false;
- public DeployUIAdditions(IJBossServerPublishMethodType type,IDeploymentTypeUI ui) {
- this.publishType = type;
- this.ui = ui;
- }
- public boolean isRegistered() {
- return registered;
- }
- public IJBossServerPublishMethodType getPublishType() {
- return publishType;
- }
- public void createComposite(Composite parent) {
- // UI can be null
- if( ui != null ) {
- ui.fillComposite(parent, ModuleDeploymentPage.this);
- registered = true;
- }
- }
- }
- private void loadDeployTypeData() {
- deployAdditions = new ArrayList<DeployUIAdditions>();
- IJBossServerPublishMethodType[] publishMethodTypes = ExtensionManager.getDefault().findPossiblePublishMethods(getServer().getOriginal());
- for( int i = 0; i < publishMethodTypes.length; i++) {
- IDeploymentTypeUI ui = EditorExtensionManager.getDefault().getPublishPreferenceUI(publishMethodTypes[i].getId());
- deployAdditions.add(new DeployUIAdditions(publishMethodTypes[i], ui));
- }
- }
-
- private Control createPublishMethodSection(Composite parent) {
- loadDeployTypeData();
-
- FormToolkit toolkit2 = new FormToolkit(parent.getDisplay());
- publishTypeSection = toolkit2.createSection(parent,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
- | ExpandableComposite.TITLE_BAR);
- publishTypeSection.setText("Publish Method");
- Composite c = toolkit2.createComposite(publishTypeSection);
- publishTypeSection.setClient(c);
- FormData fd = UIUtil.createFormData2(0, 5, null, 0, 0, 5, 100, -5);
- publishTypeSection.setLayoutData(fd);
- c.setLayout(new FormLayout());
- deployTypeCombo = new Combo(c, SWT.DEFAULT);
- fd = UIUtil.createFormData2(0, 5, null, 0, 0, 5, 50, -5);
- deployTypeCombo.setLayoutData(fd);
-
-
- preferencePageBook = toolkit2.createPageBook(c, SWT.FLAT|SWT.TOP);
- preferencePageBook.setLayoutData(UIUtil.createFormData2(
- deployTypeCombo, 5, 0, 150, 0, 5, 100, -5));
-// deployTypeCombo, 5, null, 0, 0, 5, 100, -5));
-
- // fill widgets
- String[] nameList = new String[deployAdditions.size()];
- for( int i = 0; i < nameList.length; i++ ) {
- nameList[i] = deployAdditions.get(i).getPublishType().getName();
- }
- deployTypeCombo.setItems(nameList);
- DeployableServerBehavior ds = ServerConverter.getDeployableServerBehavior(getServer().getOriginal());
- if( ds != null ) {
- String current = ds.createPublishMethod().getPublishMethodType().getName();
- int index = deployTypeCombo.indexOf(current);
- if( index != -1 )
- deployTypeCombo.select(index);
- }
- deployTypeCombo.addModifyListener(new ModifyListener(){
- @Override
- public void modifyText(ModifyEvent e) {
- deployTypeChanged(true);
- }});
- return publishTypeSection;
- }
-
- private void deployTypeChanged(boolean fireEvent) {
- int index = deployTypeCombo.getSelectionIndex();
- if( index != -1 ) {
- DeployUIAdditions ui = deployAdditions.get(index);
- if( !ui.isRegistered()) {
- Composite newRoot = preferencePageBook.createPage(ui);
- ui.createComposite(newRoot);
- }
- preferencePageBook.showPage(ui);
- //((Composite)publishTypeSection.getClient()).layout(true, true);
- absolutePageRoot.layout(true, true);
- if( fireEvent ) {
- commandManager.execute(new ChangeRootDeployPreference(preferences,
- DeploymentPreferenceLoader.CURRENT_METHOD_PROPERTY,
- ui.getPublishType().getId(), "Change Publish Method"));
- }
- } else {
- // null selection
- }
- }
-
-
public void execute(ServerCommand command) {
commandManager.execute(command);
}
@@ -267,29 +152,6 @@
commandManager.execute(new ChangePropertyCommand(p,key,val,cmdName));
}
-
- private class ChangeRootDeployPreference extends ServerCommand {
- private DeploymentPreferences p;
- private String key;
- private String oldVal;
- private String newVal;
- public ChangeRootDeployPreference(DeploymentPreferences p, String key, String val, String command) {
- super(ModuleDeploymentPage.this.server, command);
- this.p = p;
- this.key = key;
- this.newVal = val;
- this.oldVal = p.getProperty(key);
- }
- public void execute() {
- p.setProperty(key, newVal);
- savePreferencesToWorkingCopy();
- }
- public void undo() {
- p.setProperty(key, oldVal);
- savePreferencesToWorkingCopy();
- }
- }
-
private class ChangePropertyCommand extends ServerCommand {
private DeploymentModulePrefs p;
private String key;
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PollerSection.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PollerSection.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PollerSection.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.ui.editor;
import org.eclipse.swt.SWT;
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -179,7 +179,7 @@
Composite child = new Composite(parent, SWT.NONE);
child.setLayout(new FormLayout());
label = new Label(child, SWT.NONE);
- text = new Text(child, SWT.DEFAULT);
+ text = new Text(child, SWT.SINGLE | SWT.BORDER);
detect = new Button(child, SWT.CHECK);
link = new Link(child, SWT.NONE);
Added: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSection.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSection.java (rev 0)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerModeSection.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.editor;
+
+import java.util.ArrayList;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledPageBook;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.ui.editor.IServerEditorPartInput;
+import org.eclipse.wst.server.ui.editor.ServerEditorSection;
+import org.eclipse.wst.server.ui.internal.command.ServerCommand;
+import org.eclipse.wst.server.ui.internal.editor.ServerEditorPartInput;
+import org.eclipse.wst.server.ui.internal.editor.ServerResourceCommandManager;
+import org.jboss.ide.eclipse.as.core.ExtensionManager;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.ui.UIUtil;
+
+public class ServerModeSection extends ServerEditorSection {
+ private ArrayList<DeployUIAdditions> deployAdditions;
+ private ScrolledPageBook preferencePageBook;
+ private Combo deployTypeCombo;
+ private Section publishTypeSection;
+ private ServerResourceCommandManager commandManager;
+
+ public void init(IEditorSite site, IEditorInput input) {
+ super.init(site, input);
+ if (input instanceof IServerEditorPartInput) {
+ IServerEditorPartInput sepi = (IServerEditorPartInput) input;
+ server = sepi.getServer();
+ commandManager = ((ServerEditorPartInput) sepi).getServerCommandManager();
+ }
+ }
+
+ public ServerResourceCommandManager getCommandManager() {
+ return commandManager;
+ }
+
+ public IServerWorkingCopy getServer() {
+ return server;
+ }
+
+ public void createSection(Composite parent) {
+ super.createSection(parent);
+ createPublishMethodSection(parent);
+ }
+
+
+ private class DeployUIAdditions {
+ private IJBossServerPublishMethodType publishType;
+ private IDeploymentTypeUI ui;
+ private boolean registered = false;
+ public DeployUIAdditions(IJBossServerPublishMethodType type,IDeploymentTypeUI ui) {
+ this.publishType = type;
+ this.ui = ui;
+ }
+ public boolean isRegistered() {
+ return registered;
+ }
+ public IJBossServerPublishMethodType getPublishType() {
+ return publishType;
+ }
+ public void createComposite(Composite parent) {
+ // UI can be null
+ if( ui != null ) {
+ ui.fillComposite(parent, ServerModeSection.this);
+ registered = true;
+ }
+ }
+ }
+
+ private void loadDeployTypeData() {
+ deployAdditions = new ArrayList<DeployUIAdditions>();
+ IJBossServerPublishMethodType[] publishMethodTypes = ExtensionManager.getDefault().findPossiblePublishMethods(server.getOriginal());
+ for( int i = 0; i < publishMethodTypes.length; i++) {
+ IDeploymentTypeUI ui = EditorExtensionManager.getDefault().getPublishPreferenceUI(publishMethodTypes[i].getId());
+ deployAdditions.add(new DeployUIAdditions(publishMethodTypes[i], ui));
+ }
+ }
+
+ private Control createPublishMethodSection(Composite parent) {
+ loadDeployTypeData();
+
+ FormToolkit toolkit2 = new FormToolkit(parent.getDisplay());
+ publishTypeSection = toolkit2.createSection(parent,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+ | ExpandableComposite.TITLE_BAR);
+ publishTypeSection.setText("Server Behaviour");
+ Composite c = toolkit2.createComposite(publishTypeSection);
+ publishTypeSection.setClient(c);
+ publishTypeSection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
+ c.setLayout(new FormLayout());
+ deployTypeCombo = new Combo(c, SWT.DEFAULT);
+ FormData fd = UIUtil.createFormData2(0, 5, null, 0, 0, 5, 50, -5);
+ deployTypeCombo.setLayoutData(fd);
+
+
+ preferencePageBook = toolkit2.createPageBook(c, SWT.FLAT|SWT.TOP);
+ preferencePageBook.setLayoutData(UIUtil.createFormData2(
+ deployTypeCombo, 5, 0, 150, 0, 5, 100, -5));
+
+ // fill widgets
+ String[] nameList = new String[deployAdditions.size()];
+ for( int i = 0; i < nameList.length; i++ ) {
+ nameList[i] = deployAdditions.get(i).getPublishType().getName();
+ }
+ deployTypeCombo.setItems(nameList);
+ DeployableServerBehavior ds = ServerConverter.getDeployableServerBehavior(server.getOriginal());
+ if( ds != null ) {
+ String current = ds.createPublishMethod().getPublishMethodType().getName();
+ int index = deployTypeCombo.indexOf(current);
+ if( index != -1 )
+ deployTypeCombo.select(index);
+ }
+ deployTypeCombo.addModifyListener(new ModifyListener(){
+ @Override
+ public void modifyText(ModifyEvent e) {
+ deployTypeChanged(true);
+ }});
+ deployTypeChanged(false);
+ return publishTypeSection;
+ }
+
+ private void deployTypeChanged(boolean fireEvent) {
+ int index = deployTypeCombo.getSelectionIndex();
+ if( index != -1 ) {
+ DeployUIAdditions ui = deployAdditions.get(index);
+ if( !ui.isRegistered()) {
+ Composite newRoot = preferencePageBook.createPage(ui);
+ ui.createComposite(newRoot);
+ }
+ preferencePageBook.showPage(ui);
+ if( fireEvent ) {
+ commandManager.execute(new ChangeServerPropertyCommand(
+ server, IDeployableServer.SERVER_MODE,
+ ui.getPublishType().getId(), "Change server mode"));
+ }
+ } else {
+ // null selection
+ }
+ }
+
+
+ public static class ChangeServerPropertyCommand extends ServerCommand {
+ private IServerWorkingCopy server;
+ private String key;
+ private String oldVal;
+ private String newVal;
+ public ChangeServerPropertyCommand(IServerWorkingCopy server, String key, String val, String commandName) {
+ super(server, commandName);
+ this.server = server;
+ this.key = key;
+ this.newVal = val;
+ this.oldVal = server.getAttribute(key, "local");
+ }
+ public void execute() {
+ server.setAttribute(key, newVal);
+ }
+ public void undo() {
+ server.setAttribute(key, oldVal);
+ }
+ }
+
+}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -33,6 +33,7 @@
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.ModuleUtil;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
@@ -197,10 +198,9 @@
private IPath getDeployPath() {
ModuleServer ms = selection[0];
IModule[] module = ms.module;
- IJBossServerPublishMethodType type =
- DeploymentPreferenceLoader.getCurrentDeploymentMethodType(ms.server);
+ DeployableServerBehavior dsb = ServerConverter.getDeployableServerBehavior(ms.server);
IJBossServerPublisher publisher = ExtensionManager.getDefault()
- .getPublisher(ms.getServer(), module, type.getId());
+ .getPublisher(ms.getServer(), module, dsb.createPublishMethod().getPublishMethodType().getId());
IPath path = null;
IDeployableServer deployableServer = ServerConverter
.getDeployableServer(ms.server);
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/rse/ui/RSEDeploymentPreferenceUI.java 2010-07-27 08:18:54 UTC (rev 23742)
@@ -10,38 +10,113 @@
******************************************************************************/
package org.jboss.tools.as.rse.ui;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.ui.widgets.SystemHostCombo;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.rse.core.IRSEConstants;
import org.jboss.ide.eclipse.as.ui.UIUtil;
import org.jboss.ide.eclipse.as.ui.editor.IDeploymentTypeUI;
-import org.jboss.ide.eclipse.as.ui.editor.ModuleDeploymentPage;
+import org.jboss.ide.eclipse.as.ui.editor.ServerModeSection;
+import org.jboss.ide.eclipse.as.ui.editor.ServerModeSection.ChangeServerPropertyCommand;
public class RSEDeploymentPreferenceUI implements IDeploymentTypeUI {
-
public RSEDeploymentPreferenceUI() {
- // TODO Auto-generated constructor stub
+ // Do nothing
}
@Override
public void fillComposite(Composite parent,
- ModuleDeploymentPage page) {
+ ServerModeSection modeSection) {
parent.setLayout(new FillLayout());
- new RSEDeploymentPreferenceComposite(parent, SWT.NONE, page);
+ new RSEDeploymentPreferenceComposite(parent, SWT.NONE, modeSection);
}
public static class RSEDeploymentPreferenceComposite extends Composite {
- private ModuleDeploymentPage page;
- public RSEDeploymentPreferenceComposite(Composite parent, int style, ModuleDeploymentPage page) {
+ private ServerModeSection modeSection;
+ private SystemHostCombo combo;
+ private Text rseServerHome,rseServerConfig;
+ public RSEDeploymentPreferenceComposite(Composite parent, int style, ServerModeSection modeSection) {
super(parent, style);
- this.page = page;
+ this.modeSection = modeSection;
setLayout(new FormLayout());
- Label l = new Label(this, SWT.NONE);
- l.setLayoutData(UIUtil.createFormData2(0, 5, 0,70,0,5,100,-5));
- l.setText("This belongs to rse");
+ Composite child = new Composite(this, SWT.None);
+ child.setLayoutData(UIUtil.createFormData2(0, 0, null, 0, 0, 5, 100, 0));
+ child.setLayout(new GridLayout());
+ String current = modeSection.getServer().getAttribute(IRSEConstants.RSE_SERVER_HOST, IRSEConstants.RSE_SERVER_DEFAULT_HOST);
+ combo = new SystemHostCombo(child, SWT.NULL, findHost(current), false,
+ /* ISubSystemConfigurationCategories.SUBSYSTEM_CATEGORY_FILES*/
+ "files");
+ combo.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ rseHostChanged();
+ }
+ });
+ Label serverHomeLabel = new Label(this, SWT.NONE);
+ serverHomeLabel.setText("Remote Server Home: ");
+ rseServerHome = new Text(this, SWT.SINGLE | SWT.BORDER);
+ serverHomeLabel.setLayoutData(UIUtil.createFormData2(child, 7, null, 0, 0, 10, null, 0));
+ rseServerHome.setLayoutData(UIUtil.createFormData2(child, 5, null, 0, serverHomeLabel, 5, 100, -5));
+ rseServerHome.setText(modeSection.getServer().getAttribute(IRSEConstants.RSE_SERVER_HOME_DIR,
+ getRuntime().getRuntime().getLocation().toString()));
+ rseServerHome.addModifyListener(new ModifyListener(){
+ public void modifyText(ModifyEvent e) {
+ serverHomeChanged();
+ }});
+
+ Label serverConfigLabel = new Label(this, SWT.NONE);
+ serverConfigLabel.setText("Remote Server Configuration: ");
+ rseServerConfig= new Text(this, SWT.SINGLE | SWT.BORDER);
+ serverConfigLabel.setLayoutData(UIUtil.createFormData2(rseServerHome, 7, null, 0, 0, 10, null, 0));
+ rseServerConfig.setLayoutData(UIUtil.createFormData2(rseServerHome, 5, null, 0, serverConfigLabel, 5, 100, -5));
+ rseServerConfig.setText(modeSection.getServer().getAttribute(IRSEConstants.RSE_SERVER_CONFIG,
+ getRuntime().getJBossConfiguration()));
+ rseServerConfig.addModifyListener(new ModifyListener(){
+ public void modifyText(ModifyEvent e) {
+ serverConfigChanged();
+ }});
+}
+
+ protected IJBossServerRuntime getRuntime() {
+ return ServerConverter.getJBossRuntime(modeSection.getServer().getOriginal());
}
+
+ protected void rseHostChanged() {
+ modeSection.getCommandManager().execute(new ChangeServerPropertyCommand(
+ modeSection.getServer(), IRSEConstants.RSE_SERVER_HOST, combo.getHost().getAliasName(),
+ "Change RSE Host"));
+ }
+
+ protected void serverHomeChanged() {
+ modeSection.getCommandManager().execute(new ChangeServerPropertyCommand(
+ modeSection.getServer(), IRSEConstants.RSE_SERVER_HOME_DIR, rseServerHome.getText(),
+ "Change RSE Server's Home Directory"));
+ }
+
+ protected void serverConfigChanged() {
+ modeSection.getCommandManager().execute(new ChangeServerPropertyCommand(
+ modeSection.getServer(), IRSEConstants.RSE_SERVER_CONFIG, rseServerConfig.getText(),
+ "Change RSE Server's Configuration"));
+ }
+
+ public IHost findHost(String name) {
+ IHost[] hosts = RSECorePlugin.getTheSystemRegistry().getHosts();
+ for( int i = 0; i < hosts.length; i++ ) {
+ if( hosts[i].getAliasName().equals(name))
+ return hosts[i];
+ }
+ return null;
+ }
}
Modified: workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-07-27 08:18:16 UTC (rev 23741)
+++ workspace/rstryker/rse/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-07-27 08:18:54 UTC (rev 23742)
@@ -175,6 +175,12 @@
insertionId="org.eclipse.wst.server.editor.overview.left"
order="10"
typeIds="%AllJBossServerTypes"/>
+ <section
+ class="org.jboss.ide.eclipse.as.ui.editor.ServerModeSection"
+ id="org.jboss.ide.eclipse.as.ui.editor.serverModeSection"
+ insertionId="org.eclipse.wst.server.editor.overview.left"
+ order="9"
+ typeIds="%AllJBossServerTypes"/>
</extension>
13 years, 10 months
JBoss Tools SVN: r23741 - trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-07-27 04:18:16 -0400 (Tue, 27 Jul 2010)
New Revision: 23741
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/EventHyperlinkDetectorTest.java
Log:
https://jira.jboss.org/browse/JBIDE-3124
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/EventHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/EventHyperlinkDetectorTest.java 2010-07-27 07:39:19 UTC (rev 23740)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/EventHyperlinkDetectorTest.java 2010-07-27 08:18:16 UTC (rev 23741)
@@ -3,7 +3,7 @@
import java.util.ArrayList;
import org.eclipse.jface.text.Region;
-import org.jboss.tools.cdi.text.ext.hyperlink.EventHyperlinkDetector;
+import org.jboss.tools.cdi.text.ext.hyperlink.EventAndObserverMethodHyperlinkDetector;
public class EventHyperlinkDetectorTest extends HyperlinkDetectorTest {
@@ -23,7 +23,7 @@
regionList.add(new Region(1235, 11));
regionList.add(new Region(1334, 42));
- checkRegions("JavaSource/org/jboss/jsr299/tck/tests/event/bindingTypes/EventEmitter.java", regionList, new EventHyperlinkDetector());
+ checkRegions("JavaSource/org/jboss/jsr299/tck/tests/event/bindingTypes/EventEmitter.java", regionList, new EventAndObserverMethodHyperlinkDetector());
}
}
\ No newline at end of file
13 years, 10 months
JBoss Tools SVN: r23740 - branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-07-27 03:39:19 -0400 (Tue, 27 Jul 2010)
New Revision: 23740
Added:
branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.classpath
branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.project
Log:
Added: branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.classpath
===================================================================
--- branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.classpath (rev 0)
+++ branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.classpath 2010-07-27 07:39:19 UTC (rev 23740)
@@ -0,0 +1,8 @@
+<?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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="lib/xmlunit-1.1.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.project
===================================================================
--- branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.project (rev 0)
+++ branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.project 2010-07-27 07:39:19 UTC (rev 23740)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.smooks.core.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>
Property changes on: branches/smooks-dmb/tests/org.jboss.tools.smooks.ecore.model.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 10 months
JBoss Tools SVN: r23739 - in branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-07-27 00:44:14 -0400 (Tue, 27 Jul 2010)
New Revision: 23739
Added:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.project
Modified:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/META-INF/MANIFEST.MF
Log:
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath 2010-07-27 04:44:14 UTC (rev 23739)
@@ -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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.project
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.project (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.project 2010-07-27 04:44:14 UTC (rev 23739)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.smooks.ecore.model</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>
+ <linkedResources>
+ </linkedResources>
+</projectDescription>
+
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/META-INF/MANIFEST.MF
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/META-INF/MANIFEST.MF 2010-07-27 04:39:26 UTC (rev 23738)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ecore.model/META-INF/MANIFEST.MF 2010-07-27 04:44:14 UTC (rev 23739)
@@ -10,7 +10,6 @@
Require-Bundle: org.eclipse.core.runtime,
org.jboss.tools.smooks.runtime,
org.eclipse.emf.ecore
-Bundle-Activator: org.jboss.tools.smooks.model.plugin.SmooksModelActivator
Export-Package: org.jboss.tools.smooks.model,
org.jboss.tools.smooks.model.core
Bundle-ClassPath: .,
13 years, 10 months
JBoss Tools SVN: r23738 - in trunk/hibernatetools/docs/task-reference/en-US: fallback_content and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: benlc
Date: 2010-07-27 00:39:26 -0400 (Tue, 27 Jul 2010)
New Revision: 23738
Added:
trunk/hibernatetools/docs/task-reference/en-US/fallback_content/
trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Conventions.xml
trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Feedback.xml
trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Legal_Notice.xml
Modified:
trunk/hibernatetools/docs/task-reference/en-US/Book_Info.xml
trunk/hibernatetools/docs/task-reference/en-US/Preface.xml
trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Create_Hibernate_Configuration_File.xml
trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Edit_Mapping_File.xml
trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-New_Hibernate_XML_Mapping_files.xml
trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_One.xml
trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_Three.xml
trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_Two.xml
trunk/hibernatetools/docs/task-reference/en-US/proc-JBT-New_JPA_Project.xml
trunk/hibernatetools/docs/task-reference/en-US/proc-JBT-Open_Perspective.xml
trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Project_creation.xml
trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API.xml
Log:
'committing changes to proc-*.xml files and fallback content for maven build compatibility'
Modified: trunk/hibernatetools/docs/task-reference/en-US/Book_Info.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/Book_Info.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/Book_Info.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -22,7 +22,20 @@
</imageobject>
</inlinemediaobject>
</corpauthor>
+ <!--FOR PUBLICAN -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="Common_Content/Legal_Notice.xml">
+ <!--FOR JDOCBOOK:-->
+ <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="fallback_content/Legal_Notice.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ </xi:include>
+ </xi:fallback>
+ </xi:include>
+
+<!--
<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>
Modified: trunk/hibernatetools/docs/task-reference/en-US/Preface.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/Preface.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/Preface.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -5,9 +5,21 @@
]>
<preface id="pref-Hibernate_Tools_Reference_Guide-Preface">
<title>Preface</title>
+ <!--FOR PUBLICAN -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="Feedback.xml">
+ <!--FOR JDOCBOOK:-->
+ <xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="fallback_content/Feedback.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ </xi:include>
+ </xi:fallback>
+ </xi:include>
+<!--
<xi:include href="Common_Content/Conventions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude"><xi:fallback xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="Common_Content/Feedback.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</xi:fallback>
</xi:include>
+ -->
</preface>
Added: trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Conventions.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Conventions.xml (rev 0)
+++ trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Conventions.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -0,0 +1,165 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<section>
+ <title>Document Conventions</title>
+ <para>
+ This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.
+ </para>
+ <para>
+ In PDF and paper editions, this manual uses typefaces drawn from the <ulink url="https://fedorahosted.org/liberation-fonts/">Liberation Fonts</ulink> set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default.
+ </para>
+ <section>
+ <title>Typographic Conventions</title>
+ <para>
+ Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.
+ </para>
+ <para>
+ <literal>Mono-spaced Bold</literal>
+ </para>
+ <para>
+ Used to highlight system input, including shell commands, file names and paths. Also used to highlight keycaps and key combinations. For example:
+ </para>
+ <blockquote>
+ <para>
+ To see the contents of the file <filename>my_next_bestselling_novel</filename> in your current working directory, enter the <command>cat my_next_bestselling_novel</command> command at the shell prompt and press <keycap>Enter</keycap> to execute the command.
+ </para>
+ </blockquote>
+ <para>
+ The above includes a file name, a shell command and a keycap, all presented in mono-spaced bold and all distinguishable thanks to context.
+ </para>
+ <para>
+ Key combinations can be distinguished from keycaps by the hyphen connecting each part of a key combination. For example:
+ </para>
+ <blockquote>
+ <para>
+ Press <keycap>Enter</keycap> to execute the command.
+ </para>
+ <para>
+ Press <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>F1</keycap></keycombo> to switch to the first virtual terminal. Press <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>F7</keycap></keycombo> to return to your X-Windows session.
+ </para>
+ </blockquote>
+ <para>
+ The first paragraph highlights the particular keycap to press. The second highlights two key combinations (each a set of three keycaps with each set pressed simultaneously).
+ </para>
+ <para>
+ If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in <literal>mono-spaced bold</literal>. For example:
+ </para>
+ <blockquote>
+ <para>
+ File-related classes include <classname>filesystem</classname> for file systems, <classname>file</classname> for files, and <classname>dir</classname> for directories. Each class has its own associated set of permissions.
+ </para>
+ </blockquote>
+ <para>
+ <application>Proportional Bold</application>
+ </para>
+ <para>
+ This denotes words or phrases encountered on a system, including application names; dialog box text; labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example:
+ </para>
+ <blockquote>
+ <para>
+ Choose <menuchoice><guimenu>System</guimenu><guisubmenu>Preferences</guisubmenu><guimenuitem>Mouse</guimenuitem></menuchoice> from the main menu bar to launch <application>Mouse Preferences</application>. In the <guilabel>Buttons</guilabel> tab, click the <guilabel>Left-handed mouse</guilabel> check box and click <guibutton>Close</guibutton> to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).
+ </para>
+ <para>
+ To insert a special character into a <application>gedit</application> file, choose <menuchoice><guimenu>Applications</guimenu><guisubmenu>Accessories</guisubmenu><guimenuitem>Character Map</guimenuitem></menuchoice> from the main menu bar. Next, choose <menuchoice><guimenu>Search</guimenu><guimenuitem>Find…</guimenuitem></menuchoice> from the <application>Character Map</application> menu bar, type the name of the character in the <guilabel>Search</guilabel> field and click <guibutton>Next</guibutton>. The character you sought will be highlighted in the <guilabel>Character Table</guilabel>. Double-click this highlighted character to place it in the <guilabel>Text to copy</guilabel> field and then click the <guibutton>Copy</guibutton> button. Now switch back to your document and choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Paste</guimenuitem></menuchoice> from the <application>gedit</application> menu bar.
+ </para>
+ </blockquote>
+ <para>
+ The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context.
+ </para>
+ <para>
+ <command><replaceable>Mono-spaced Bold Italic</replaceable></command> or <application><replaceable>Proportional Bold Italic</replaceable></application>
+ </para>
+ <para>
+ Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example:
+ </para>
+ <blockquote>
+ <para>
+ To connect to a remote machine using ssh, type <command>ssh <replaceable>username</replaceable>@<replaceable>domain.name</replaceable></command> at a shell prompt. If the remote machine is <filename>example.com</filename> and your username on that machine is john, type <command>ssh john(a)example.com</command>.
+ </para>
+ <para>
+ The <command>mount -o remount <replaceable>file-system</replaceable></command> command remounts the named file system. For example, to remount the <filename>/home</filename> file system, the command is <command>mount -o remount /home</command>.
+ </para>
+ <para>
+ To see the version of a currently installed package, use the <command>rpm -q <replaceable>package</replaceable></command> command. It will return a result as follows: <command><replaceable>package-version-release</replaceable></command>.
+ </para>
+ </blockquote>
+ <para>
+ Note the words in bold italics above — username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system.
+ </para>
+ <para>
+ Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example:
+ </para>
+ <blockquote>
+ <para>
+ Publican is a <firstterm>DocBook</firstterm> publishing system.
+ </para>
+ </blockquote>
+ </section>
+
+ <section>
+ <title>Pull-quote Conventions</title>
+ <para>
+ Terminal output and source code listings are set off visually from the surrounding text.
+ </para>
+ <para>
+ Output sent to a terminal is set in <computeroutput>mono-spaced roman</computeroutput> and presented thus:
+ </para>
+
+<screen>books Desktop documentation drafts mss photos stuff svn
+books_tests Desktop1 downloads images notes scripts svgs
+</screen>
+ <para>
+ Source-code listings are also set in <computeroutput>mono-spaced roman</computeroutput> but add syntax highlighting as follows:
+ </para>
+
+<programlisting language="Java">package org.jboss.book.jca.ex1;
+
+import javax.naming.InitialContext;
+
+public class ExClient
+{
+ public static void main(String args[])
+ throws Exception
+ {
+ InitialContext iniCtx = new InitialContext();
+ Object ref = iniCtx.lookup("EchoBean");
+ EchoHome home = (EchoHome) ref;
+ Echo echo = home.create();
+
+ System.out.println("Created Echo");
+
+ System.out.println("Echo.echo('Hello') = " + echo.echo("Hello"));
+ }
+}
+</programlisting>
+ </section>
+
+ <section>
+ <title>Notes and Warnings</title>
+ <para>
+ Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.
+ </para>
+ <note>
+ <title>Note</title>
+ <para>
+ Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.
+ </para>
+ </note>
+ <important>
+ <title>Important</title>
+ <para>
+ Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled 'Important' won't cause data loss but may cause irritation and frustration.
+ </para>
+ </important>
+ <warning>
+ <title>Warning</title>
+ <para>
+ Warnings should not be ignored. Ignoring warnings will most likely cause data loss.
+ </para>
+ </warning>
+ </section>
+
+</section>
+
+
Added: trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Feedback.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Feedback.xml (rev 0)
+++ trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Feedback.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<section>
+ <title>We Need Feedback!</title>
+ <indexterm>
+ <primary>feedback</primary>
+ <secondary>contact information for this manual</secondary>
+ </indexterm>
+ <para>
+ You should over ride this by creating your own local Feedback.xml file.
+ </para>
+</section>
+
+
Added: trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Legal_Notice.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Legal_Notice.xml (rev 0)
+++ trunk/hibernatetools/docs/task-reference/en-US/fallback_content/Legal_Notice.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE legalnotice PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+]>
+<legalnotice>
+ <para>
+ Copyright <trademark class="copyright"></trademark> &YEAR; &HOLDER; This material may only be distributed subject to the terms and conditions set forth in the GNU Free Documentation License (GFDL), V1.2 or later (the latest version is presently available at <ulink url="http://www.gnu.org/licenses/fdl.txt">http://www.gnu.org/licenses/fdl.txt</ulink>).
+ </para>
+</legalnotice>
+
Modified: trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Create_Hibernate_Configuration_File.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Create_Hibernate_Configuration_File.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Create_Hibernate_Configuration_File.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE procedure PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide_Template.ent">
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
%BOOK_ENTITIES;
]>
<procedure id="proc-HIB-Create_Hibernate_Configuration_File">
Modified: trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Edit_Mapping_File.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Edit_Mapping_File.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Edit_Mapping_File.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -1,6 +1,6 @@
<?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" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide_Template.ent">
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
%BOOK_ENTITIES;
]>
Modified: trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-New_Hibernate_XML_Mapping_files.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-New_Hibernate_XML_Mapping_files.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-New_Hibernate_XML_Mapping_files.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -1,6 +1,6 @@
<?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" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide_Template.ent">
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
%BOOK_ENTITIES;
]>
Modified: trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_One.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_One.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_One.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE procedure PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide_Template.ent">
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
%BOOK_ENTITIES;
]>
Modified: trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_Three.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_Three.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_Three.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -1,6 +1,6 @@
<?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" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide_Template.ent">
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
%BOOK_ENTITIES;
]>
Modified: trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_Two.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_Two.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/proc-HIB-Template_Two.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE procedure PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide_Template.ent">
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
%BOOK_ENTITIES;
]>
<procedure id="proc-HIB-Template_Two">
Modified: trunk/hibernatetools/docs/task-reference/en-US/proc-JBT-New_JPA_Project.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/proc-JBT-New_JPA_Project.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/proc-JBT-New_JPA_Project.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE procedure PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide_Template.ent">
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
%BOOK_ENTITIES;
]>
<procedure id="proc-JBT-New_JPA_Project">
Modified: trunk/hibernatetools/docs/task-reference/en-US/proc-JBT-Open_Perspective.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/proc-JBT-Open_Perspective.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/proc-JBT-Open_Perspective.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE procedure PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide_Template.ent">
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
%BOOK_ENTITIES;
]>
Modified: trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Project_creation.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Project_creation.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Project_creation.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -6,9 +6,9 @@
<section id="sect-Hibernate_Tools_Reference_Guide-Tasks-Project_creation">
<title>Project creation</title>
<para>
- <xref linkend="proc-JBT-New_Project"/> describes the steps to create a new project in JBoss Tools.
+ <!-- <xref linkend="proc-JBT-New_Project"/> describes the steps to create a new project in JBoss Tools. -->
</para>
- <xi:include href="proc-JBT-New_Project.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- <xi:include href="proc-JBT-New_Project.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> -->
<para>
Continue by defining a JPA project type as described in <xref linkend="proc-JBT-New_JPA_Project"/>:
</para>
Modified: trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API.xml 2010-07-27 02:46:09 UTC (rev 23737)
+++ trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API.xml 2010-07-27 04:39:26 UTC (rev 23738)
@@ -8,9 +8,8 @@
<para>
</para>
- <xi:include href="sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Project_creation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Project_creation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Data_definition_language_generation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Entity_generation.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Supported_annotations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
+ <xi:include href="sect-Hibernate_Tools_Reference_Guide-Tasks-Java_persistence_API-Supported_annotations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
\ No newline at end of file
13 years, 10 months
JBoss Tools SVN: r23736 - trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-07-26 22:44:35 -0400 (Mon, 26 Jul 2010)
New Revision: 23736
Modified:
trunk/parent-pom.xml
Log:
add http://download.jboss.org/jbosstools/updates/helios/ to repos available for Helios
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-07-26 23:39:52 UTC (rev 23735)
+++ trunk/parent-pom.xml 2010-07-27 02:44:35 UTC (rev 23736)
@@ -181,6 +181,17 @@
</activation>
<repositories>
<repository>
+ <id>helios-jboss-mirror</id>
+ <url>http://download.jboss.org/jbosstools/updates/helios/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
<id>helios</id>
<url>http://download.eclipse.org/releases/helios/</url>
<layout>p2</layout>
13 years, 10 months
JBoss Tools SVN: r23734 - in trunk/maven/tests/org.jboss.tools.maven.ui.bot.test: .settings and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-07-26 18:03:56 -0400 (Mon, 26 Jul 2010)
New Revision: 23734
Added:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.classpath
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.project
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.settings/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/build.properties
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/log4j.xml
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Activator.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6714 Add SWTBot tests for JBoss Maven Integration
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.classpath
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.classpath (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.classpath 2010-07-26 22:03:56 UTC (rev 23734)
@@ -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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.project
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.project (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.project 2010-07-26 22:03:56 UTC (rev 23734)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.maven.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/maven/tests/org.jboss.tools.maven.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.settings/org.eclipse.jdt.core.prefs 2010-07-26 22:03:56 UTC (rev 23734)
@@ -0,0 +1,8 @@
+#Mon Jul 26 00:52:23 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2010-07-26 22:03:56 UTC (rev 23734)
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: JBoss Maven Integration Tests
+Bundle-SymbolicName: org.jboss.tools.maven.ui.bot.test;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.maven.ui.bot.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.apache.log4j,
+ org.eclipse.swtbot.eclipse.core,
+ org.eclipse.swtbot.swt.finder,
+ org.eclipse.swtbot.eclipse.finder,
+ org.eclipse.swtbot.eclipse.ui,
+ org.eclipse.swtbot.junit4_x,
+ org.eclipse.swtbot.swt.finder,
+ org.junit4,
+ org.jboss.tools.seam.core,
+ org.eclipse.wst.server.core,
+ org.eclipse.datatools.connectivity;visibility:=reexport,
+ org.eclipse.datatools.connectivity.db.generic,
+ org.jboss.tools.common,
+ org.jboss.tools.tests,
+ org.maven.ide.eclipse;bundle-version="0.10.0",
+ org.jboss.ide.eclipse.as.core
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Eclipse-RegisterBuddy: org.apache.log4j
+
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/build.properties
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/build.properties (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/build.properties 2010-07-26 22:03:56 UTC (rev 23734)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/log4j.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/log4j.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/log4j.xml 2010-07-26 22:03:56 UTC (rev 23734)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
+ debug="false">
+
+ <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
+ </layout>
+ </appender>
+
+ <appender name="fileAppender" class="org.apache.log4j.FileAppender">
+ <param name="File" value="/tmp/debug.log" />
+ <param name="Append" value="false" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
+ </layout>
+ </appender>
+
+ <appender name="asyncAppender" class="org.apache.log4j.AsyncAppender">
+ <!-- appender-ref ref="consoleAppender" / -->
+ <appender-ref ref="fileAppender" />
+ </appender>
+
+ <!-- don't log matchers, this is very high amount of chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.matchers">
+ <priority value="OFF" />
+ </category>
+
+ <!--
+ don't log widget notification events, this is moderately high chatter
+ -->
+ <category name="org.eclipse.swtbot.swt.finder.widgets">
+ <priority value="OFF" />
+ </category>
+
+ <!-- don't log finders, this is moderate chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.finders">
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot.swt.finder.keyboard">
+ <!-- set to a value higher than debug to turn on. -->
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot">
+ <priority value="ALL" />
+ </category>
+
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Activator.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Activator.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Activator.java 2010-07-26 22:03:56 UTC (rev 23734)
@@ -0,0 +1,50 @@
+package org.jboss.tools.maven.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.maven.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;
+ }
+
+}
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2010-07-26 22:03:56 UTC (rev 23734)
@@ -0,0 +1,492 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2009 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+
+package org.jboss.tools.maven.ui.bot.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.ConnectionProfileException;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
+import org.eclipse.datatools.connectivity.drivers.DriverInstance;
+import org.eclipse.datatools.connectivity.drivers.DriverManager;
+import org.eclipse.datatools.connectivity.drivers.IDriverMgmtConstants;
+import org.eclipse.datatools.connectivity.drivers.IPropertySet;
+import org.eclipse.datatools.connectivity.drivers.PropertySetImpl;
+import org.eclipse.datatools.connectivity.drivers.models.TemplateDescriptor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.results.Result;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+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.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IPerspectiveRegistry;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IPreferenceConstants;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.util.PrefUtil;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerType;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
+import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
+import org.jboss.tools.seam.core.project.facet.SeamRuntime;
+import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
+import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.jboss.tools.test.util.JobUtils;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.maven.ide.eclipse.core.IMavenConstants;
+
+/**
+ * @author Snjeza
+ *
+ */
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class CreateMavenizedSeamProjectTest {
+
+ /**
+ *
+ */
+ private static final String CONNECTION_PROFILE_NAME = "DefaultDS";
+
+ /**
+ *
+ */
+ private static final String SEAM_RUNTIME_NAME = "Seam 2.2";
+
+ /**
+ *
+ */
+ private static final String JBOSS_AS_RUNTIME_NAME = "JBoss AS 5.1 Runtime";
+
+ /**
+ *
+ */
+ private static final String JBOSS_AS_SERVER_NAME = "JBoss AS 5.1 Server";
+
+ public static final String JBOSS_AS_HOST = "localhost"; //$NON-NLS-1$
+
+ public static final String JBOSS_AS_DEFAULT_CONFIGURATION_NAME = "default"; //$NON-NLS-1$
+
+ public static final String HSQL_DRIVER_DEFINITION_ID
+ = "DriverDefn.Hypersonic DB"; //$NON-NLS-1$
+
+ public static final String HSQL_DRIVER_NAME = "Hypersonic DB"; //$NON-NLS-1$
+
+ public static final String HSQL_DRIVER_TEMPLATE_ID
+ = "org.eclipse.datatools.enablement.hsqldb.1_8.driver"; //$NON-NLS-1$
+
+ public static final String DTP_DB_URL_PROPERTY_ID
+ = "org.eclipse.datatools.connectivity.db.URL"; //$NON-NLS-1$
+
+ public static final String HSQL_PROFILE_ID = "org.eclipse.datatools.enablement.hsqldb.connectionProfile";
+
+ public static final String JBOSS_AS_HOME = System.getProperty("jbosstools.test.jboss.home.5.1", "E:\\jboss-5.1.0.GA");
+
+ public static final String JBOSS_AS_RUNTIME_ID = "org.jboss.ide.eclipse.as.runtime.51";
+
+ public static final String JBOSS_AS_SERVER_ID = "org.jboss.ide.eclipse.as.51";
+
+ public static final String SEAM_HOME_PROPERTY = System.getProperty("jbosstools.test.seam.2.0.1.GA.home", "E:\\jboss-seam-2.2.0.GA");
+
+ public static final String HSQLDB_DRIVER_JAR_NAME = "hsqldb.jar"; //$NON-NLS-1$
+
+ public static final String HSQLDB_DRIVER_LOCATION = "/common/lib/" + HSQLDB_DRIVER_JAR_NAME; //$NON-NLS-1$
+
+ public static final String PROJECT_NAME = "MavenizedSeamProject";
+
+ public static final String EAR_PROJECT_NAME = "MavenizedSeamProject-ear";
+
+ public static final String EJB_PROJECT_NAME = "MavenizedSeamProject-ejb";
+
+ public static final String TEST_PROJECT_NAME = "MavenizedSeamProject-test";
+
+ public static final String PARENT_PROJECT_NAME = "MavenizedSeamProject-parent";
+
+ public static final String DEPOY_TYPE = "EAR";
+
+ protected static SWTWorkbenchBot bot;
+
+ @BeforeClass
+ public final static void beforeClass() throws Exception {
+ initSWTBot();
+
+ switchPerspective("org.jboss.tools.seam.ui.SeamPerspective");
+
+ String asLocation = JBOSS_AS_HOME;
+
+ String runtimeType = JBOSS_AS_RUNTIME_ID;
+ String serverType = JBOSS_AS_SERVER_ID;
+
+ createJBossServer(new File(asLocation), serverType, runtimeType, JBOSS_AS_SERVER_NAME, JBOSS_AS_RUNTIME_NAME);
+
+ String seamPath = SEAM_HOME_PROPERTY;
+ createSeamRuntime(SEAM_RUNTIME_NAME, seamPath, SeamVersion.SEAM_2_2);
+
+ createDriver(asLocation, HSQLDB_DRIVER_LOCATION);
+
+ createNewSeamWebProjectWizard(PROJECT_NAME, DEPOY_TYPE);
+ }
+
+ private static void initSWTBot() throws CoreException {
+ bot = new SWTWorkbenchBot();
+ SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
+ SWTBotPreferences.TIMEOUT = 1000;
+ SWTBotPreferences.PLAYBACK_DELAY = 25;
+ JobUtils.waitForIdle(60000);
+ try {
+ SWTBotView view = bot.viewByTitle("Welcome");
+ if (view != null) {
+ view.close();
+ }
+ } catch (WidgetNotFoundException ignore) {
+ }
+
+ SWTBotShell[] shells = bot.shells();
+ for (SWTBotShell shell : shells) {
+ final Shell widget = shell.widget;
+ Object parent = UIThreadRunnable.syncExec(shell.display,
+ new Result<Object>() {
+ public Object run() {
+ return widget.isDisposed() ? null : widget.getParent();
+ }
+ });
+ if (parent == null) {
+ continue;
+ }
+ shell.close();
+ }
+
+ List<? extends SWTBotEditor> editors = bot.editors();
+ for (SWTBotEditor e : editors) {
+ e.close();
+ }
+
+ removeProjects();
+
+ WorkbenchPlugin.getDefault().getPreferenceStore()
+ .setValue(IPreferenceConstants.RUN_IN_BACKGROUND, true);
+
+ PrefUtil.getAPIPreferenceStore().setValue(
+ IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS, false);
+ }
+
+ private static void removeProjects() throws CoreException {
+ final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ workspace.run(new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ IProject[] projects = workspace.getRoot().getProjects();
+ for (int i = 0; i < projects.length; i++) {
+ projects[i].delete(true, true, monitor);
+ }
+ }
+ }, new NullProgressMonitor());
+ }
+
+ protected static void switchPerspective(final String pid) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IPerspectiveRegistry perspectiveRegistry = workbench
+ .getPerspectiveRegistry();
+ IPerspectiveDescriptor perspective = perspectiveRegistry
+ .findPerspectiveWithId(pid);
+ workbench.getActiveWorkbenchWindow().getActivePage()
+ .setPerspective(perspective);
+ }
+ });
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ UIThreadRunnable.syncExec(new VoidResult() {
+ public void run() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()
+ .forceActive();
+ }
+ });
+ }
+
+ @After
+ public void tearDown() throws Exception {
+
+ }
+
+ @AfterClass
+ public final static void afterClass() throws Exception {
+ removeProjects();
+ }
+
+ protected static void createJBossServer(File asLocation, String serverType, String runtimeType, String name, String runtimeName) throws CoreException {
+ if (!asLocation.isDirectory()) {
+ return;
+ }
+ IPath jbossAsLocationPath = new Path(asLocation.getAbsolutePath());
+
+ IServer[] servers = ServerCore.getServers();
+ for (int i = 0; i < servers.length; i++) {
+ IRuntime runtime = servers[i].getRuntime();
+ if(runtime != null && runtime.getLocation().equals(jbossAsLocationPath)) {
+ return;
+ }
+ }
+
+ IRuntime runtime = null;
+ IRuntime[] runtimes = ServerCore.getRuntimes();
+ for (int i = 0; i < runtimes.length; i++) {
+ if (runtimes[0].getLocation().equals(jbossAsLocationPath)) {
+ runtime = runtimes[0].createWorkingCopy();
+ break;
+ }
+ }
+
+ IProgressMonitor progressMonitor = new NullProgressMonitor();
+ if (runtime == null) {
+ runtime = createRuntime(runtimeName, asLocation.getAbsolutePath(), progressMonitor, runtimeType);
+ }
+ if (runtime != null) {
+ createServer( runtime, serverType, name, progressMonitor);
+ }
+ }
+
+ protected static IRuntime createRuntime(String runtimeName, String jbossASLocation, IProgressMonitor progressMonitor, String runtimeType) throws CoreException {
+ IRuntimeWorkingCopy runtime = null;
+ String type = null;
+ String version = null;
+ String runtimeId = null;
+ IPath jbossAsLocationPath = new Path(jbossASLocation);
+ IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(type, version, runtimeType);
+ if (runtimeTypes.length > 0) {
+ runtime = runtimeTypes[0].createRuntime(runtimeId, progressMonitor);
+ runtime.setLocation(jbossAsLocationPath);
+ if(runtimeName!=null) {
+ runtime.setName(runtimeName);
+ }
+ ((RuntimeWorkingCopy) runtime).setAttribute("org.jboss.ide.eclipse.as.core.runtime.configurationName", JBOSS_AS_DEFAULT_CONFIGURATION_NAME); //$NON-NLS-1$
+
+ return runtime.save(false, progressMonitor);
+ }
+ return runtime;
+ }
+
+ protected static void createDriver(String jbossASLocation, String driverLocation) throws ConnectionProfileException, IOException {
+ if(ProfileManager.getInstance().getProfileByName(CONNECTION_PROFILE_NAME) != null) {
+ return;
+ }
+ String driverPath = new File(jbossASLocation + driverLocation).getCanonicalPath(); //$NON-NLS-1$
+
+ DriverInstance driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
+ if (driver == null) {
+ TemplateDescriptor descr = TemplateDescriptor.getDriverTemplateDescriptor(HSQL_DRIVER_TEMPLATE_ID);
+ IPropertySet instance = new PropertySetImpl(HSQL_DRIVER_NAME, HSQL_DRIVER_DEFINITION_ID);
+ instance.setName(HSQL_DRIVER_NAME);
+ instance.setID(HSQL_DRIVER_DEFINITION_ID);
+ Properties props = new Properties();
+
+ IConfigurationElement[] template = descr.getProperties();
+ for (int i = 0; i < template.length; i++) {
+ IConfigurationElement prop = template[i];
+ String id = prop.getAttribute("id"); //$NON-NLS-1$
+
+ String value = prop.getAttribute("value"); //$NON-NLS-1$
+ props.setProperty(id, value == null ? "" : value); //$NON-NLS-1$
+ }
+ props.setProperty(DTP_DB_URL_PROPERTY_ID, "jdbc:hsqldb:."); //$NON-NLS-1$
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_TYPE, descr.getId());
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST, driverPath);
+
+ instance.setBaseProperties(props);
+ DriverManager.getInstance().removeDriverInstance(instance.getID());
+ System.gc();
+ DriverManager.getInstance().addDriverInstance(instance);
+ }
+
+ driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
+ if (driver != null && ProfileManager.getInstance().getProfileByName(CONNECTION_PROFILE_NAME) == null) { //$NON-NLS-1$
+ // create profile
+ Properties props = new Properties();
+ props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID, HSQL_DRIVER_DEFINITION_ID);
+ props.setProperty(IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID, ""); //$NON-NLS-1$
+ props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID, "Default"); //$NON-NLS-1$
+ props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, ""); //$NON-NLS-1$
+ props.setProperty(IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID, "false"); //$NON-NLS-1$
+ props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.URL_PROP_ID));
+
+ ProfileManager.getInstance().createProfile(CONNECTION_PROFILE_NAME, "The JBoss AS Hypersonic embedded database", HSQL_PROFILE_ID, props, "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ }
+
+ protected static IServerWorkingCopy createServer(IRuntime runtime, String runtimeType, String name, IProgressMonitor progressMonitor) throws CoreException {
+ IServerType serverType = ServerCore.findServerType(runtimeType);
+ IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
+
+ server.setHost(JBOSS_AS_HOST);
+ server.setName(name);
+
+ // JBossServer.DEPLOY_DIRECTORY
+ String deployVal = runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("deploy").toOSString(); //$NON-NLS-1$ //$NON-NLS-2$
+ ((ServerWorkingCopy) server).setAttribute("org.jboss.ide.eclipse.as.core.server.deployDirectory", deployVal); //$NON-NLS-1$
+
+ // IDeployableServer.TEMP_DEPLOY_DIRECTORY
+ String deployTmpFolderVal = runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("tmp").append("jbosstoolsTemp").toOSString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ((ServerWorkingCopy) server).setAttribute("org.jboss.ide.eclipse.as.core.server.tempDeployDirectory", deployTmpFolderVal); //$NON-NLS-1$
+
+ // If we'd need to set up a username / pw for JMX, do it here.
+// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_USERNAME, authUser);
+// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_PASSWORD, authPass);
+
+ server.save(false, progressMonitor);
+ return server;
+ }
+
+ protected static void createSeamRuntime(String name, String seamPath, SeamVersion seamVersion) {
+ SeamRuntime seamRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(name);
+ if (seamRuntime != null) {
+ return;
+ }
+ File seamFolder = new File(seamPath);
+ if(seamFolder.exists() && seamFolder.isDirectory()) {
+ SeamRuntime rt = new SeamRuntime();
+ rt.setHomeDir(seamPath);
+ rt.setName(name);
+ rt.setDefault(true);
+ rt.setVersion(seamVersion);
+ SeamRuntimeManager.getInstance().addRuntime(rt);
+ }
+ }
+
+ public static void createNewSeamWebProjectWizard(String projectName, String deployType) throws Exception {
+ JobUtils.waitForIdle(60000);
+ bot.menu("File").menu("New").menu("Seam Web Project").click();
+
+ SWTBotShell mainShell = bot.shell("New Seam Project");
+ mainShell.activate();
+
+ bot.textWithLabel("Project name:").setText(projectName);
+ bot.button("Modify...").click();
+ SWTBotShell shell = bot.shell("Project Facets");
+ shell.activate();
+
+ SWTBotTree treeWidget = bot.tree();
+ SWTBotTreeItem jmi = treeWidget.getTreeItem("JBoss Maven Integration");
+ jmi.check();
+
+ bot.button("OK").click();
+
+ mainShell.activate();
+
+ bot.comboBox(0).setSelection(JBOSS_AS_RUNTIME_NAME);
+ bot.comboBox(2).setSelection(JBOSS_AS_SERVER_NAME);
+
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+
+ bot.comboBox(0).setSelection("Library Provided by Target Runtime");
+ bot.button("Next >").click();
+
+ bot.comboBox(0).setSelection(SEAM_RUNTIME_NAME);
+ bot.radio(DEPOY_TYPE).click();
+ bot.comboBox(1).setSelection("HSQL");
+ bot.comboBox(2).setSelection(CONNECTION_PROFILE_NAME);
+ bot.button("Finish").click();
+
+ JobUtils.waitForIdle(60000);
+
+ }
+
+ @Test
+ public void testErrors() throws Exception {
+ checkErrors(PROJECT_NAME);
+ checkErrors(EAR_PROJECT_NAME);
+ checkErrors(EJB_PROJECT_NAME);
+ checkErrors(TEST_PROJECT_NAME);
+ checkErrors(PARENT_PROJECT_NAME);
+ }
+
+ private void checkErrors(String projectName) throws CoreException {
+ List<IMarker> markers = new ArrayList<IMarker>();
+ IProject project = ResourcesPlugin.getWorkspace().getRoot()
+ .getProject(projectName);
+ IMarker[] projectMarkers = project.findMarkers(IMarker.PROBLEM, true,
+ IResource.DEPTH_INFINITE);
+ for (int i = 0; i < projectMarkers.length; i++) {
+ if (projectMarkers[i].getAttribute(IMarker.SEVERITY,
+ IMarker.SEVERITY_ERROR) == IMarker.SEVERITY_ERROR) {
+ markers.add(projectMarkers[i]);
+ }
+ }
+ assertTrue("The '" + projectName + "' contains errors.", markers.size() == 0);
+ }
+
+ @Test
+ public void testMavenProjects() throws Exception {
+ isMavenProject(PROJECT_NAME);
+ isMavenProject(EAR_PROJECT_NAME);
+ isMavenProject(EJB_PROJECT_NAME);
+ isMavenProject(TEST_PROJECT_NAME);
+ isMavenProject(PARENT_PROJECT_NAME);
+ }
+
+ private void isMavenProject(String projectName) throws CoreException {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ assertTrue("The '" + projectName + "' project isn't a Maven project.", project.hasNature(IMavenConstants.NATURE_ID));
+ }
+
+}
13 years, 10 months
JBoss Tools SVN: r23733 - trunk/maven/tests.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-07-26 18:00:51 -0400 (Mon, 26 Jul 2010)
New Revision: 23733
Added:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/
Log:
Initial import.
13 years, 10 months