JBoss Tools SVN: r27227 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-08 07:47:34 -0500 (Wed, 08 Dec 2010)
New Revision: 27227
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7836] corrected tab order (bad widget creation order)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-08 12:45:41 UTC (rev 27226)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-08 12:47:34 UTC (rev 27227)
@@ -96,7 +96,7 @@
private Text keyText;
private Combo hardware;
private Button keyManage;
- private Button findImage;
+ private Button findImageButton;
private Combo realmCombo;
private ProfileComposite currPage;
private Map<String, ProfileComposite> profilePages;
@@ -331,9 +331,9 @@
// createRealmsControl(container, getRealmNames(realms));
createRealmsControl(container);
- findImage = new Button(container, SWT.NULL);
- findImage.setText(WizardMessages.getString(FIND_BUTTON_LABEL));
- findImage.addSelectionListener(findListener);
+ findImageButton = new Button(container, SWT.NULL);
+ findImageButton.setText(WizardMessages.getString(FIND_BUTTON_LABEL));
+ findImageButton.addSelectionListener(findListener);
Label archLabel = new Label(container, SWT.NULL);
archLabel.setText(WizardMessages.getString(ARCH_LABEL));
@@ -370,7 +370,7 @@
Point p1 = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
Point p2 = nameText.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point p3 = findImage.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Point p3 = findImageButton.computeSize(SWT.DEFAULT, SWT.DEFAULT);
int centering = (p2.y - p1.y + 1) / 2;
int centering2 = (p3.y - p2.y + 1) / 2;
@@ -387,7 +387,7 @@
imageLabel.setLayoutData(f);
int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- Point minSize1 = findImage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ Point minSize1 = findImageButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
Point minSize2 = keyManage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
int buttonWidth = Math.max(widthHint, minSize1.x);
buttonWidth = Math.max(buttonWidth, minSize2.x);
@@ -396,9 +396,9 @@
f.top = new FormAttachment(nameText, 8);
f.right = new FormAttachment(realmCombo, 0, SWT.RIGHT);
f.width = buttonWidth;
- findImage.setLayoutData(f);
+ findImageButton.setLayoutData(f);
- f = UIUtils.createFormData(nameText, 8 + centering2, null, 0, hardwareLabel, 5, findImage, -10);
+ f = UIUtils.createFormData(nameText, 8 + centering2, null, 0, hardwareLabel, 5, findImageButton, -10);
imageText.setLayoutData(f);
f = UIUtils.createFormData(imageLabel, 8 + centering, null, 0, 0, 0, null, 0);
14 years
JBoss Tools SVN: r27226 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-08 07:45:41 -0500 (Wed, 08 Dec 2010)
New Revision: 27226
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7836] corrected tab order (bad widget creation order)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-08 12:40:43 UTC (rev 27225)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-08 12:45:41 UTC (rev 27226)
@@ -1,5 +1,7 @@
2010-12-08 André Dietisheim <adietish(a)redhat.com>
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (createWidgets):
+ [JBIDE-7836] corrected tab order (bad widget creation order)
* src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java:
renamed FindImage to FindImageWizard since it is a wizard
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-08 12:40:43 UTC (rev 27225)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-08 12:45:41 UTC (rev 27226)
@@ -103,7 +103,6 @@
private DeltaCloudHardwareProfile[] allProfiles;
private List<DeltaCloudRealm> realms;
- private Label imageLabel, archLabel, nameLabel, realmLabel;
private Group groupContainer;
private ModifyListener comboListener = new ModifyListener() {
@@ -317,29 +316,27 @@
container.setLayout(layout);
Label dummyLabel = new Label(container, SWT.NULL);
- imageLabel = new Label(container, SWT.NULL);
- imageLabel.setText(WizardMessages.getString(IMAGE_LABEL));
- archLabel = new Label(container, SWT.NULL);
- archLabel.setText(WizardMessages.getString(ARCH_LABEL));
-
- nameLabel = new Label(container, SWT.NULL);
+ Label nameLabel = new Label(container, SWT.NULL);
nameLabel.setText(WizardMessages.getString(NAME_LABEL));
+ nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
- realmLabel = new Label(container, SWT.NULL);
+ Label imageLabel = new Label(container, SWT.NULL);
+ imageLabel.setText(WizardMessages.getString(IMAGE_LABEL));
+ imageText = new Text(container, SWT.BORDER | SWT.SINGLE);
+
+ Label realmLabel = new Label(container, SWT.NULL);
realmLabel.setText(WizardMessages.getString(REALM_LABEL));
- nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
-
// createRealmsControl(container, getRealmNames(realms));
createRealmsControl(container);
- imageText = new Text(container, SWT.BORDER | SWT.SINGLE);
-
findImage = new Button(container, SWT.NULL);
findImage.setText(WizardMessages.getString(FIND_BUTTON_LABEL));
findImage.addSelectionListener(findListener);
+ Label archLabel = new Label(container, SWT.NULL);
+ archLabel.setText(WizardMessages.getString(ARCH_LABEL));
arch = new Label(container, SWT.NULL);
Label hardwareLabel = new Label(container, SWT.NULL);
14 years
JBoss Tools SVN: r27225 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools: internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-08 07:40:43 -0500 (Wed, 08 Dec 2010)
New Revision: 27225
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java
Log:
renamed NewInstancePage2 to NewInstancePage, NewInstanceWizard2 to NewInstanceWizard
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java 2010-12-08 12:26:46 UTC (rev 27224)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java 2010-12-08 12:40:43 UTC (rev 27225)
@@ -24,7 +24,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
-import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstanceWizard2;
+import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstanceWizard;
/**
* @author Andre Dietisheim
@@ -45,7 +45,7 @@
private void createInstance(DeltaCloudImage deltaCloudImage, Shell shell) {
if (deltaCloudImage != null) {
DeltaCloud deltaCloud = deltaCloudImage.getDeltaCloud();
- IWizard wizard = new NewInstanceWizard2(deltaCloud, deltaCloudImage);
+ IWizard wizard = new NewInstanceWizard(deltaCloud, deltaCloudImage);
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.open();
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java 2010-12-08 12:26:46 UTC (rev 27224)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java 2010-12-08 12:40:43 UTC (rev 27225)
@@ -24,7 +24,7 @@
import org.jboss.tools.deltacloud.ui.views.cloud.CloudViewElement;
import org.jboss.tools.deltacloud.ui.views.cloud.DeltaCloudViewElement;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
-import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstanceWizard2;
+import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstanceWizard;
/**
* @author Jeff Johnston
@@ -42,7 +42,7 @@
if (element != null) {
CloudViewElement cloudElement = (CloudViewElement) element;
DeltaCloud cloud = (DeltaCloud) cloudElement.getModel();
- IWizard wizard = new NewInstanceWizard2(cloud);
+ IWizard wizard = new NewInstanceWizard(cloud);
WizardDialog dialog = new WizardDialog(UIUtils.getActiveWorkbenchWindow().getShell(),
wizard);
dialog.create();
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java 2010-12-08 12:26:46 UTC (rev 27224)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java 2010-12-08 12:40:43 UTC (rev 27225)
@@ -1,38 +0,0 @@
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import org.eclipse.jface.wizard.Wizard;
-import org.jboss.tools.deltacloud.core.DeltaCloud;
-
-public class FindImage extends Wizard {
-
- private DeltaCloud cloud;
- private FindImagePage mainPage;
- private String imageId;
-
- public FindImage(DeltaCloud cloud) {
- this.cloud = cloud;
- }
-
- public String getImageId() {
- return imageId;
- }
-
- @Override
- public void addPages() {
- // TODO Auto-generated method stub
- mainPage = new FindImagePage(cloud);
- addPage(mainPage);
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
- @Override
- public boolean performFinish() {
- imageId = mainPage.getImageId();
- return true;
- }
-
-}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (from rev 27222, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-08 12:40:43 UTC (rev 27225)
@@ -0,0 +1,633 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * 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:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.databinding.Binding;
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.UpdateValueStrategy;
+import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.IValueChangeListener;
+import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.databinding.wizard.WizardPageSupport;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
+import org.jboss.tools.deltacloud.core.DeltaCloudHardwareProfile;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.DeltaCloudRealm;
+import org.jboss.tools.deltacloud.ui.ErrorUtils;
+import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
+import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+
+/**
+ * @author Jeff Jonston
+ */
+public class NewInstancePage extends WizardPage {
+
+ private static final int IMAGE_CHECK_DELAY = 500;
+
+ private final static String NAME = "NewInstance.name"; //$NON-NLS-1$
+ private final static String DESCRIPTION = "NewInstance.desc"; //$NON-NLS-1$
+ private final static String TITLE = "NewInstance.title"; //$NON-NLS-1$
+
+ private static final String NAME_LABEL = "Name.label"; //$NON-NLS-1$
+ private static final String IMAGE_LABEL = "Image.label"; //$NON-NLS-1$
+ private static final String ARCH_LABEL = "Arch.label"; //$NON-NLS-1$
+ private static final String HARDWARE_LABEL = "Profile.label"; //$NON-NLS-1$
+ private static final String REALM_LABEL = "Realm.label"; //$NON-NLS-1$
+ private static final String KEY_LABEL = "Key.label"; //$NON-NLS-1$
+ private static final String MANAGE_BUTTON_LABEL = "ManageButton.label"; //$NON-NLS-1$
+ private static final String FIND_BUTTON_LABEL = "FindButton.label"; //$NON-NLS-1$
+ private static final String PROPERTIES_LABEL = "Properties.label"; //$NON-NLS-1$
+ private static final String MUST_ENTER_A_NAME = "ErrorMustProvideName.text"; //$NON-NLS-1$
+ private static final String MUST_ENTER_A_KEYNAME = "ErrorMustProvideKeyName.text"; //$NON-NLS-1$
+ private static final String MUST_ENTER_IMAGE_ID = "ErrorMustProvideImageId.text"; //$NON-NLS-1$
+ private static final String NONE_RESPONSE = "None.response"; //$NON-NLS-1$
+ private static final String LOADING_VALUE = "Loading.value"; //$NON-NLS-1$
+
+ private NewInstanceModel model;
+
+ private DeltaCloud cloud;
+ private DeltaCloudImage image;
+ private Label arch;
+ private Text nameText;
+ private Text imageText;
+ private Text keyText;
+ private Combo hardware;
+ private Button keyManage;
+ private Button findImage;
+ private Combo realmCombo;
+ private ProfileComposite currPage;
+ private Map<String, ProfileComposite> profilePages;
+ private DeltaCloudHardwareProfile[] allProfiles;
+ private List<DeltaCloudRealm> realms;
+
+ private Label imageLabel, archLabel, nameLabel, realmLabel;
+ private Group groupContainer;
+
+ private ModifyListener comboListener = new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ int index = hardware.getSelectionIndex();
+ String id = index > -1 ? hardware.getItem(hardware.getSelectionIndex()) : null;
+ if (currPage != null)
+ currPage.setVisible(false);
+ if (id != null) {
+ currPage = profilePages.get(id);
+ currPage.setVisible(true);
+ }
+ }
+ };
+
+ private SelectionListener manageListener = new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent event) {
+ Shell shell = getShell();
+ ManageKeysWizard wizard = new ManageKeysWizard(cloud, ".pem"); //$NON-NLS-1$
+ WizardDialog dialog = new CustomWizardDialog(shell, wizard,
+ IDialogConstants.OK_LABEL);
+ dialog.create();
+ dialog.open();
+ String keyname = wizard.getKeyName();
+ if (keyname != null)
+ keyText.setText(keyname);
+ }
+
+ };
+
+ private SelectionListener findListener = new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent event) {
+ Shell shell = getShell();
+ FindImageWizard wizard = new FindImageWizard(cloud);
+ WizardDialog dialog = new CustomWizardDialog(shell, wizard,
+ IDialogConstants.OK_LABEL);
+ dialog.create();
+ dialog.open();
+ String imageId = wizard.getImageId();
+ if (imageId != null)
+ imageText.setText(imageId);
+ }
+
+ };
+
+ public NewInstancePage(DeltaCloud cloud) {
+ super(WizardMessages.getString(NAME));
+ this.cloud = cloud;
+ String defaultKeyname = cloud.getLastKeyname();
+ model = new NewInstanceModel("", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ "", //$NON-NLS-1$
+ defaultKeyname, ""); //$NON-NLS-1$
+ setDescription(WizardMessages.getString(DESCRIPTION));
+ setTitle(WizardMessages.getString(TITLE));
+ setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
+ setPageComplete(false);
+ }
+
+ public String getHardwareProfile() {
+ return hardware.getText();
+ }
+
+ public String getRealmId() {
+ if (realmCombo instanceof Combo) {
+ int index = ((Combo) realmCombo).getSelectionIndex();
+ return realms.get(index).getId();
+ } else {
+ return null;
+ }
+ }
+
+ public String getCpuProperty() {
+ return currPage.getCPU();
+ }
+
+ public String getStorageProperty() {
+ return currPage.getStorage();
+ }
+
+ public String getMemoryProperty() {
+ return currPage.getMemory();
+ }
+
+ public String getInstanceName() {
+ return nameText.getText();
+ }
+
+ public String getKeyName() {
+ return keyText.getText();
+ }
+
+ public String getImageId() {
+ return imageText.getText();
+ }
+
+ public void setImage(DeltaCloudImage image) {
+ this.image = image;
+ }
+
+ public void clearProfiles() {
+ hardware.removeModifyListener(comboListener);
+ hardware.removeAll();
+ if (currPage != null) {
+ currPage.setVisible(false);
+ }
+ hardware.setEnabled(false);
+ hardware.addModifyListener(comboListener);
+ }
+
+ private DeltaCloudHardwareProfile[] getProfiles() {
+ List<DeltaCloudHardwareProfile> profiles = new ArrayList<DeltaCloudHardwareProfile>();
+ try {
+ DeltaCloudHardwareProfile[] allProfiles = cloud.getProfiles();
+ for (DeltaCloudHardwareProfile p : allProfiles) {
+ profiles.add(p);
+ }
+ } catch (DeltaCloudException e) {
+ // TODO internationalize strings
+ ErrorUtils.handleError("Error",
+ MessageFormat.format("Could not get profiles from cloud {0}", cloud.getName()), e, getShell());
+ }
+ return profiles.toArray(new DeltaCloudHardwareProfile[profiles.size()]);
+ }
+
+ public void filterProfiles() {
+ if (allProfiles == null)
+ return;
+
+ ArrayList<DeltaCloudHardwareProfile> profiles = new ArrayList<DeltaCloudHardwareProfile>();
+ for (DeltaCloudHardwareProfile p : allProfiles) {
+ if (p.getArchitecture() == null || image == null || image.getArchitecture().equals(p.getArchitecture())) {
+ profiles.add(p);
+ }
+ }
+ String[] ids = new String[profiles.size()];
+ for (int i = 0; i < profiles.size(); ++i) {
+ DeltaCloudHardwareProfile p = profiles.get(i);
+ ids[i] = p.getId();
+ }
+ if (ids.length > 0) {
+ hardware.removeModifyListener(comboListener);
+ hardware.setItems(ids);
+ hardware.setText(ids[0]);
+ currPage = profilePages.get(ids[0]);
+ currPage.setVisible(true);
+ hardware.setEnabled(true);
+ hardware.addModifyListener(comboListener);
+ }
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ DataBindingContext dbc = new DataBindingContext();
+ WizardPageSupport.create(this, dbc);
+ Composite container = createWidgets(parent);
+ bindWidgets(dbc);
+
+ launchFetchRealms();
+ launchFetchProfiles();
+
+ // We have to set the image id here instead of in the constructor
+ // of the model because the image id triggers other items to fill
+ // in their values such as the architecture and hardware profiles.
+ String defaultImage = cloud.getLastImageId();
+ model.setImageId(defaultImage);
+ setControl(container);
+
+ // lastly, if there's already an image set, use it
+ if (image != null) {
+ imageText.setText(image.getId());
+ filterProfiles();
+ }
+ }
+
+ private void bindWidgets(DataBindingContext dbc) {
+ bindText(dbc, nameText, NewInstanceModel.PROPERTY_NAME, MUST_ENTER_A_NAME);
+ dbc.bindValue(
+ WidgetProperties.text(SWT.Modify).observeDelayed(IMAGE_CHECK_DELAY, imageText),
+ BeanProperties.value(NewInstanceModel.class, NewInstanceModel.PROPERTY_IMAGE_ID)
+ .observe(model),
+ new UpdateValueStrategy().setAfterGetValidator(new MandatoryStringValidator(
+ WizardMessages.getString(MUST_ENTER_IMAGE_ID))),
+ null);
+ bindArchLabel(dbc, imageText, arch, this);
+
+ IObservableValue realmObservable = WidgetProperties.text().observe(realmCombo);
+ dbc.bindValue(
+ realmObservable,
+ BeanProperties.value(NewInstanceModel.class, NewInstanceModel.PROPERTY_REALM).observe(
+ model));
+
+ IObservableValue hardwareObservable = WidgetProperties.text().observe(hardware);
+ dbc.bindValue(
+ hardwareObservable,
+ BeanProperties.value(NewInstanceModel.class, NewInstanceModel.PROPERTY_PROFILE).observe(
+ model));
+ bindText(dbc, keyText, NewInstanceModel.PROPERTY_KEYNAME, MUST_ENTER_A_KEYNAME);
+ }
+
+ private Composite createWidgets(Composite parent) {
+ final Composite container = new Composite(parent, SWT.NULL);
+ FormLayout layout = new FormLayout();
+ layout.marginHeight = 5;
+ layout.marginWidth = 5;
+ container.setLayout(layout);
+
+ Label dummyLabel = new Label(container, SWT.NULL);
+ imageLabel = new Label(container, SWT.NULL);
+ imageLabel.setText(WizardMessages.getString(IMAGE_LABEL));
+
+ archLabel = new Label(container, SWT.NULL);
+ archLabel.setText(WizardMessages.getString(ARCH_LABEL));
+
+ nameLabel = new Label(container, SWT.NULL);
+ nameLabel.setText(WizardMessages.getString(NAME_LABEL));
+
+ realmLabel = new Label(container, SWT.NULL);
+ realmLabel.setText(WizardMessages.getString(REALM_LABEL));
+
+ nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
+
+ // createRealmsControl(container, getRealmNames(realms));
+ createRealmsControl(container);
+
+ imageText = new Text(container, SWT.BORDER | SWT.SINGLE);
+
+ findImage = new Button(container, SWT.NULL);
+ findImage.setText(WizardMessages.getString(FIND_BUTTON_LABEL));
+ findImage.addSelectionListener(findListener);
+
+ arch = new Label(container, SWT.NULL);
+
+ Label hardwareLabel = new Label(container, SWT.NULL);
+ hardwareLabel.setText(WizardMessages.getString(HARDWARE_LABEL));
+
+ hardware = new Combo(container, SWT.READ_ONLY);
+ hardware.setEnabled(false);
+ hardware.setItems(new String[] { WizardMessages.getString(LOADING_VALUE) });
+ hardware.select(0);
+
+ groupContainer = new Group(container, SWT.BORDER);
+ groupContainer.setText(WizardMessages.getString(PROPERTIES_LABEL));
+ FormLayout groupLayout = new FormLayout();
+ groupLayout.marginHeight = 0;
+ groupLayout.marginWidth = 0;
+ groupContainer.setLayout(groupLayout);
+ hardware.setEnabled(false);
+
+ // add invisible dummy widget to guarantee a min size
+ dummyLabel = new Label(groupContainer, SWT.NONE);
+ dummyLabel.setText("\n\n\n\n\n");
+ FormData dummyData = UIUtils.createFormData(0, 0, 0, 150, null, 0, null, 0);
+ dummyLabel.setLayoutData(dummyData);
+ dummyLabel.setVisible(false);
+
+ keyManage = new Button(container, SWT.NULL);
+ keyManage.setText(WizardMessages.getString(MANAGE_BUTTON_LABEL));
+ keyManage.addSelectionListener(manageListener);
+ if (cloud.getType().equals(DeltaCloud.MOCK_TYPE))
+ keyManage.setEnabled(false);
+
+ Point p1 = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Point p2 = nameText.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Point p3 = findImage.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ int centering = (p2.y - p1.y + 1) / 2;
+ int centering2 = (p3.y - p2.y + 1) / 2;
+
+ FormData f = UIUtils.createFormData(null, 0, null, 0, 0, 0, 100, 0);
+ dummyLabel.setLayoutData(f);
+
+ f = UIUtils.createFormData(dummyLabel, 8 + centering, null, 0, 0, 0, null, 0);
+ nameLabel.setLayoutData(f);
+
+ f = UIUtils.createFormData(dummyLabel, 8, null, 0, hardwareLabel, 5, 100, 0);
+ nameText.setLayoutData(f);
+
+ f = UIUtils.createFormData(nameText, 8 + centering + centering2, null, 0, 0, 0, null, 0);
+ imageLabel.setLayoutData(f);
+
+ int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ Point minSize1 = findImage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ Point minSize2 = keyManage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ int buttonWidth = Math.max(widthHint, minSize1.x);
+ buttonWidth = Math.max(buttonWidth, minSize2.x);
+
+ f = new FormData();
+ f.top = new FormAttachment(nameText, 8);
+ f.right = new FormAttachment(realmCombo, 0, SWT.RIGHT);
+ f.width = buttonWidth;
+ findImage.setLayoutData(f);
+
+ f = UIUtils.createFormData(nameText, 8 + centering2, null, 0, hardwareLabel, 5, findImage, -10);
+ imageText.setLayoutData(f);
+
+ f = UIUtils.createFormData(imageLabel, 8 + centering, null, 0, 0, 0, null, 0);
+ archLabel.setLayoutData(f);
+
+ f = UIUtils.createFormData(imageLabel, 8 + centering, null, 0, hardwareLabel, 5, 100, 0);
+ arch.setLayoutData(f);
+
+ f = UIUtils.createFormData(arch, 8 + centering, null, 0, 0, 0, null, 0);
+ realmLabel.setLayoutData(f);
+
+ f = UIUtils.createFormData(arch, 8, null, 0, hardwareLabel, 5, 100, 0);
+ realmCombo.setLayoutData(f);
+
+ Control control = realmCombo;
+
+ Label keyLabel = new Label(container, SWT.NULL);
+ keyLabel.setText(WizardMessages.getString(KEY_LABEL));
+
+ keyText = new Text(container, SWT.BORDER | SWT.SINGLE);
+
+ f = UIUtils.createFormData(realmCombo, 8 + centering + centering2, null, 0, 0, 0, null, 0);
+ keyLabel.setLayoutData(f);
+
+ f = new FormData();
+ f.width = buttonWidth;
+ f.top = new FormAttachment(realmCombo, 8);
+ f.right = new FormAttachment(realmCombo, 0, SWT.RIGHT);
+ keyManage.setLayoutData(f);
+
+ f = UIUtils.createFormData(realmCombo, 8 + centering2, null, 0, hardwareLabel, 5, keyManage, -10);
+ keyText.setLayoutData(f);
+
+ control = keyText;
+
+ f = UIUtils.createFormData(control, 8 + centering, null, 0, 0, 0, null, 0);
+ hardwareLabel.setLayoutData(f);
+
+ f = UIUtils.createFormData(control, 8, null, 0, hardwareLabel, 5, 100, 0);
+ hardware.setLayoutData(f);
+
+ f = UIUtils.createFormData(hardware, 10, 100, 0, 0, 0, 100, 0);
+ groupContainer.setLayoutData(f);
+ return container;
+ }
+
+ private void createProfileComposites() {
+ for (DeltaCloudHardwareProfile p : allProfiles) {
+ ProfileComposite pc = new ProfileComposite(p, groupContainer);
+ profilePages.put(p.getId(), pc);
+ pc.setVisible(false);
+ }
+ groupContainer.layout();
+ }
+
+ private void launchFetchRealms() {
+ Thread t = new Thread() {
+ public void run() {
+ realms = getRealms();
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ updateRealmCombo();
+ }
+ });
+ }
+ };
+ t.start();
+ }
+
+ private void launchFetchProfiles() {
+ Thread t = new Thread() {
+ public void run() {
+ allProfiles = getProfiles();
+ profilePages = new HashMap<String, ProfileComposite>();
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ createProfileComposites();
+ clearProfiles();
+ if (allProfiles.length > 0)
+ hardware.setEnabled(true);
+ filterProfiles();
+ }
+ });
+ }
+ };
+ t.start();
+ }
+
+ /**
+ * Displays the arch in the given label if the given binding is valid.
+ *
+ * @param archLabel
+ * the arch label
+ * @return the value change listener
+ */
+ private class ArchAdapter implements IValueChangeListener {
+
+ private Label archLabel;
+ private NewInstanceModel.ImageContainer container;
+ private NewInstancePage page;
+
+ public ArchAdapter(Label archLabel,
+ NewInstanceModel.ImageContainer container,
+ NewInstancePage page) {
+ this.archLabel = archLabel;
+ this.page = page;
+ this.container = container;
+ }
+
+ @Override
+ public void handleValueChange(ValueChangeEvent event) {
+ IStatus status = (IStatus) event.diff.getNewValue();
+ if (status.isOK()) {
+ archLabel.setText(model.getArch());
+ page.setImage(container.getImage());
+ page.filterProfiles();
+ } else {
+ archLabel.setText("");
+ page.clearProfiles();
+ }
+ }
+ }
+
+ /**
+ * Binds the architecture label to the given image id text widget. Attaches
+ * a listener to the image id text widget Adds a validity decorator to the
+ * image text widget.
+ *
+ * @param dbc
+ * the databinding context to use
+ * @param imageText
+ * the image id text widget
+ * @param archLabel
+ * the label to display the image architecture in
+ * @return
+ * @return the binding that was created
+ */
+ private Binding bindArchLabel(DataBindingContext dbc, Text imageText, final Label archLabel,
+ final NewInstancePage page) {
+ UpdateValueStrategy updateStrategy = new UpdateValueStrategy();
+ NewInstanceModel.ImageContainer c = new NewInstanceModel.ImageContainer();
+ updateStrategy.setConverter(new NewInstanceModel.ArchConverter(cloud, c, String.class, String.class));
+ updateStrategy.setBeforeSetValidator(new NewInstanceModel.ArchValidator());
+
+ Binding binding = dbc.bindValue(
+ WidgetProperties.text(SWT.Modify).observeDelayed(100, imageText),
+ BeanProperties.value(NewInstanceModel.PROPERTY_ARCH).observe(model),
+ updateStrategy,
+ new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
+ binding.getValidationStatus().addValueChangeListener(new ArchAdapter(archLabel, c, page));
+ ControlDecorationSupport.create(binding, SWT.LEFT | SWT.TOP);
+ return binding;
+ }
+
+ /**
+ * Bind the given text widget to the cloud connection model. Attaches
+ * validator to the binding that enforce a non-empty input.
+ *
+ * @param dbc
+ * the databinding context to use
+ * @param text
+ * the name text widget to bind
+ */
+ private void bindText(DataBindingContext dbc, final Text text, String property, String errMsgId) {
+ Binding nameTextBinding = dbc.bindValue(
+ WidgetProperties.text(SWT.Modify).observe(text),
+ BeanProperties.value(NewInstanceModel.class, property)
+ .observe(model),
+ new UpdateValueStrategy().setBeforeSetValidator(new MandatoryStringValidator(WizardMessages
+ .getString(errMsgId))),
+ null);
+ ControlDecorationSupport.create(nameTextBinding, SWT.LEFT | SWT.TOP);
+ }
+
+ private List<String> getRealmNames(List<DeltaCloudRealm> realms) {
+ List<String> realmNames = new ArrayList<String>();
+ for (DeltaCloudRealm realm : realms) {
+ realmNames.add(
+ new StringBuilder()
+ .append(realm.getId())
+ .append(" [") //$NON-NLS-1$
+ .append(realm.getName())
+ .append("]") //$NON-NLS-1$
+ .toString());
+ }
+ return realmNames;
+ }
+
+ private List<DeltaCloudRealm> getRealms() {
+ List<DeltaCloudRealm> realms = new ArrayList<DeltaCloudRealm>();
+ try {
+ realms = Arrays.asList(cloud.getRealms());
+ } catch (DeltaCloudException e) {
+ ErrorUtils.handleErrorAsync("Error",
+ MessageFormat.format("Could not get realms from cloud {0}", cloud.getName()), e, getShell());
+ }
+ return realms;
+ }
+
+ /**
+ * Creates the control that shall display the available realms. It creates
+ * either a combo, if there are realms available, or a label if none are
+ * available.
+ *
+ * @param parent
+ * the container
+ * @param realmNames
+ * the realm names
+ */
+ private void createRealmsControl(final Composite parent) {
+ Combo combo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
+ realmCombo = combo;
+ combo.setEnabled(false);
+ combo.setItems(new String[] { WizardMessages.getString(LOADING_VALUE) });
+ combo.select(0);
+ }
+
+ private void updateRealmCombo() {
+ List<String> names = getRealmNames(realms != null ? realms : new ArrayList<DeltaCloudRealm>());
+ if (names.size() > 0) {
+ realmCombo.setItems(names.toArray(new String[names.size()]));
+ realmCombo.setEnabled(true);
+ realmCombo.select(0);
+ } else {
+ realmCombo.setItems(new String[] { WizardMessages.getString(NONE_RESPONSE) });
+ realmCombo.select(0);
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java 2010-12-08 12:26:46 UTC (rev 27224)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java 2010-12-08 12:40:43 UTC (rev 27225)
@@ -1,633 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * 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:
- * Red Hat Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.DataBindingContext;
-import org.eclipse.core.databinding.UpdateValueStrategy;
-import org.eclipse.core.databinding.beans.BeanProperties;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.wizard.WizardPageSupport;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
-import org.jboss.tools.deltacloud.core.DeltaCloudHardwareProfile;
-import org.jboss.tools.deltacloud.core.DeltaCloudImage;
-import org.jboss.tools.deltacloud.core.DeltaCloudRealm;
-import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
-import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
-
-/**
- * @author Jeff Jonston
- */
-public class NewInstancePage2 extends WizardPage {
-
- private static final int IMAGE_CHECK_DELAY = 500;
-
- private final static String NAME = "NewInstance.name"; //$NON-NLS-1$
- private final static String DESCRIPTION = "NewInstance.desc"; //$NON-NLS-1$
- private final static String TITLE = "NewInstance.title"; //$NON-NLS-1$
-
- private static final String NAME_LABEL = "Name.label"; //$NON-NLS-1$
- private static final String IMAGE_LABEL = "Image.label"; //$NON-NLS-1$
- private static final String ARCH_LABEL = "Arch.label"; //$NON-NLS-1$
- private static final String HARDWARE_LABEL = "Profile.label"; //$NON-NLS-1$
- private static final String REALM_LABEL = "Realm.label"; //$NON-NLS-1$
- private static final String KEY_LABEL = "Key.label"; //$NON-NLS-1$
- private static final String MANAGE_BUTTON_LABEL = "ManageButton.label"; //$NON-NLS-1$
- private static final String FIND_BUTTON_LABEL = "FindButton.label"; //$NON-NLS-1$
- private static final String PROPERTIES_LABEL = "Properties.label"; //$NON-NLS-1$
- private static final String MUST_ENTER_A_NAME = "ErrorMustProvideName.text"; //$NON-NLS-1$
- private static final String MUST_ENTER_A_KEYNAME = "ErrorMustProvideKeyName.text"; //$NON-NLS-1$
- private static final String MUST_ENTER_IMAGE_ID = "ErrorMustProvideImageId.text"; //$NON-NLS-1$
- private static final String NONE_RESPONSE = "None.response"; //$NON-NLS-1$
- private static final String LOADING_VALUE = "Loading.value"; //$NON-NLS-1$
-
- private NewInstanceModel model;
-
- private DeltaCloud cloud;
- private DeltaCloudImage image;
- private Label arch;
- private Text nameText;
- private Text imageText;
- private Text keyText;
- private Combo hardware;
- private Button keyManage;
- private Button findImage;
- private Combo realmCombo;
- private ProfileComposite currPage;
- private Map<String, ProfileComposite> profilePages;
- private DeltaCloudHardwareProfile[] allProfiles;
- private List<DeltaCloudRealm> realms;
-
- private Label imageLabel, archLabel, nameLabel, realmLabel;
- private Group groupContainer;
-
- private ModifyListener comboListener = new ModifyListener() {
-
- @Override
- public void modifyText(ModifyEvent e) {
- int index = hardware.getSelectionIndex();
- String id = index > -1 ? hardware.getItem(hardware.getSelectionIndex()) : null;
- if (currPage != null)
- currPage.setVisible(false);
- if (id != null) {
- currPage = profilePages.get(id);
- currPage.setVisible(true);
- }
- }
- };
-
- private SelectionListener manageListener = new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent event) {
- Shell shell = getShell();
- ManageKeysWizard wizard = new ManageKeysWizard(cloud, ".pem"); //$NON-NLS-1$
- WizardDialog dialog = new CustomWizardDialog(shell, wizard,
- IDialogConstants.OK_LABEL);
- dialog.create();
- dialog.open();
- String keyname = wizard.getKeyName();
- if (keyname != null)
- keyText.setText(keyname);
- }
-
- };
-
- private SelectionListener findListener = new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent event) {
- Shell shell = getShell();
- FindImageWizard wizard = new FindImageWizard(cloud);
- WizardDialog dialog = new CustomWizardDialog(shell, wizard,
- IDialogConstants.OK_LABEL);
- dialog.create();
- dialog.open();
- String imageId = wizard.getImageId();
- if (imageId != null)
- imageText.setText(imageId);
- }
-
- };
-
- public NewInstancePage2(DeltaCloud cloud) {
- super(WizardMessages.getString(NAME));
- this.cloud = cloud;
- String defaultKeyname = cloud.getLastKeyname();
- model = new NewInstanceModel("", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- "", //$NON-NLS-1$
- defaultKeyname, ""); //$NON-NLS-1$
- setDescription(WizardMessages.getString(DESCRIPTION));
- setTitle(WizardMessages.getString(TITLE));
- setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
- setPageComplete(false);
- }
-
- public String getHardwareProfile() {
- return hardware.getText();
- }
-
- public String getRealmId() {
- if (realmCombo instanceof Combo) {
- int index = ((Combo) realmCombo).getSelectionIndex();
- return realms.get(index).getId();
- } else {
- return null;
- }
- }
-
- public String getCpuProperty() {
- return currPage.getCPU();
- }
-
- public String getStorageProperty() {
- return currPage.getStorage();
- }
-
- public String getMemoryProperty() {
- return currPage.getMemory();
- }
-
- public String getInstanceName() {
- return nameText.getText();
- }
-
- public String getKeyName() {
- return keyText.getText();
- }
-
- public String getImageId() {
- return imageText.getText();
- }
-
- public void setImage(DeltaCloudImage image) {
- this.image = image;
- }
-
- public void clearProfiles() {
- hardware.removeModifyListener(comboListener);
- hardware.removeAll();
- if (currPage != null) {
- currPage.setVisible(false);
- }
- hardware.setEnabled(false);
- hardware.addModifyListener(comboListener);
- }
-
- private DeltaCloudHardwareProfile[] getProfiles() {
- List<DeltaCloudHardwareProfile> profiles = new ArrayList<DeltaCloudHardwareProfile>();
- try {
- DeltaCloudHardwareProfile[] allProfiles = cloud.getProfiles();
- for (DeltaCloudHardwareProfile p : allProfiles) {
- profiles.add(p);
- }
- } catch (DeltaCloudException e) {
- // TODO internationalize strings
- ErrorUtils.handleError("Error",
- MessageFormat.format("Could not get profiles from cloud {0}", cloud.getName()), e, getShell());
- }
- return profiles.toArray(new DeltaCloudHardwareProfile[profiles.size()]);
- }
-
- public void filterProfiles() {
- if (allProfiles == null)
- return;
-
- ArrayList<DeltaCloudHardwareProfile> profiles = new ArrayList<DeltaCloudHardwareProfile>();
- for (DeltaCloudHardwareProfile p : allProfiles) {
- if (p.getArchitecture() == null || image == null || image.getArchitecture().equals(p.getArchitecture())) {
- profiles.add(p);
- }
- }
- String[] ids = new String[profiles.size()];
- for (int i = 0; i < profiles.size(); ++i) {
- DeltaCloudHardwareProfile p = profiles.get(i);
- ids[i] = p.getId();
- }
- if (ids.length > 0) {
- hardware.removeModifyListener(comboListener);
- hardware.setItems(ids);
- hardware.setText(ids[0]);
- currPage = profilePages.get(ids[0]);
- currPage.setVisible(true);
- hardware.setEnabled(true);
- hardware.addModifyListener(comboListener);
- }
- }
-
- @Override
- public void createControl(Composite parent) {
- DataBindingContext dbc = new DataBindingContext();
- WizardPageSupport.create(this, dbc);
- Composite container = createWidgets(parent);
- bindWidgets(dbc);
-
- launchFetchRealms();
- launchFetchProfiles();
-
- // We have to set the image id here instead of in the constructor
- // of the model because the image id triggers other items to fill
- // in their values such as the architecture and hardware profiles.
- String defaultImage = cloud.getLastImageId();
- model.setImageId(defaultImage);
- setControl(container);
-
- // lastly, if there's already an image set, use it
- if (image != null) {
- imageText.setText(image.getId());
- filterProfiles();
- }
- }
-
- private void bindWidgets(DataBindingContext dbc) {
- bindText(dbc, nameText, NewInstanceModel.PROPERTY_NAME, MUST_ENTER_A_NAME);
- dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observeDelayed(IMAGE_CHECK_DELAY, imageText),
- BeanProperties.value(NewInstanceModel.class, NewInstanceModel.PROPERTY_IMAGE_ID)
- .observe(model),
- new UpdateValueStrategy().setAfterGetValidator(new MandatoryStringValidator(
- WizardMessages.getString(MUST_ENTER_IMAGE_ID))),
- null);
- bindArchLabel(dbc, imageText, arch, this);
-
- IObservableValue realmObservable = WidgetProperties.text().observe(realmCombo);
- dbc.bindValue(
- realmObservable,
- BeanProperties.value(NewInstanceModel.class, NewInstanceModel.PROPERTY_REALM).observe(
- model));
-
- IObservableValue hardwareObservable = WidgetProperties.text().observe(hardware);
- dbc.bindValue(
- hardwareObservable,
- BeanProperties.value(NewInstanceModel.class, NewInstanceModel.PROPERTY_PROFILE).observe(
- model));
- bindText(dbc, keyText, NewInstanceModel.PROPERTY_KEYNAME, MUST_ENTER_A_KEYNAME);
- }
-
- private Composite createWidgets(Composite parent) {
- final Composite container = new Composite(parent, SWT.NULL);
- FormLayout layout = new FormLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 5;
- container.setLayout(layout);
-
- Label dummyLabel = new Label(container, SWT.NULL);
- imageLabel = new Label(container, SWT.NULL);
- imageLabel.setText(WizardMessages.getString(IMAGE_LABEL));
-
- archLabel = new Label(container, SWT.NULL);
- archLabel.setText(WizardMessages.getString(ARCH_LABEL));
-
- nameLabel = new Label(container, SWT.NULL);
- nameLabel.setText(WizardMessages.getString(NAME_LABEL));
-
- realmLabel = new Label(container, SWT.NULL);
- realmLabel.setText(WizardMessages.getString(REALM_LABEL));
-
- nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
-
- // createRealmsControl(container, getRealmNames(realms));
- createRealmsControl(container);
-
- imageText = new Text(container, SWT.BORDER | SWT.SINGLE);
-
- findImage = new Button(container, SWT.NULL);
- findImage.setText(WizardMessages.getString(FIND_BUTTON_LABEL));
- findImage.addSelectionListener(findListener);
-
- arch = new Label(container, SWT.NULL);
-
- Label hardwareLabel = new Label(container, SWT.NULL);
- hardwareLabel.setText(WizardMessages.getString(HARDWARE_LABEL));
-
- hardware = new Combo(container, SWT.READ_ONLY);
- hardware.setEnabled(false);
- hardware.setItems(new String[] { WizardMessages.getString(LOADING_VALUE) });
- hardware.select(0);
-
- groupContainer = new Group(container, SWT.BORDER);
- groupContainer.setText(WizardMessages.getString(PROPERTIES_LABEL));
- FormLayout groupLayout = new FormLayout();
- groupLayout.marginHeight = 0;
- groupLayout.marginWidth = 0;
- groupContainer.setLayout(groupLayout);
- hardware.setEnabled(false);
-
- // add invisible dummy widget to guarantee a min size
- dummyLabel = new Label(groupContainer, SWT.NONE);
- dummyLabel.setText("\n\n\n\n\n");
- FormData dummyData = UIUtils.createFormData(0, 0, 0, 150, null, 0, null, 0);
- dummyLabel.setLayoutData(dummyData);
- dummyLabel.setVisible(false);
-
- keyManage = new Button(container, SWT.NULL);
- keyManage.setText(WizardMessages.getString(MANAGE_BUTTON_LABEL));
- keyManage.addSelectionListener(manageListener);
- if (cloud.getType().equals(DeltaCloud.MOCK_TYPE))
- keyManage.setEnabled(false);
-
- Point p1 = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point p2 = nameText.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point p3 = findImage.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- int centering = (p2.y - p1.y + 1) / 2;
- int centering2 = (p3.y - p2.y + 1) / 2;
-
- FormData f = UIUtils.createFormData(null, 0, null, 0, 0, 0, 100, 0);
- dummyLabel.setLayoutData(f);
-
- f = UIUtils.createFormData(dummyLabel, 8 + centering, null, 0, 0, 0, null, 0);
- nameLabel.setLayoutData(f);
-
- f = UIUtils.createFormData(dummyLabel, 8, null, 0, hardwareLabel, 5, 100, 0);
- nameText.setLayoutData(f);
-
- f = UIUtils.createFormData(nameText, 8 + centering + centering2, null, 0, 0, 0, null, 0);
- imageLabel.setLayoutData(f);
-
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- Point minSize1 = findImage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- Point minSize2 = keyManage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- int buttonWidth = Math.max(widthHint, minSize1.x);
- buttonWidth = Math.max(buttonWidth, minSize2.x);
-
- f = new FormData();
- f.top = new FormAttachment(nameText, 8);
- f.right = new FormAttachment(realmCombo, 0, SWT.RIGHT);
- f.width = buttonWidth;
- findImage.setLayoutData(f);
-
- f = UIUtils.createFormData(nameText, 8 + centering2, null, 0, hardwareLabel, 5, findImage, -10);
- imageText.setLayoutData(f);
-
- f = UIUtils.createFormData(imageLabel, 8 + centering, null, 0, 0, 0, null, 0);
- archLabel.setLayoutData(f);
-
- f = UIUtils.createFormData(imageLabel, 8 + centering, null, 0, hardwareLabel, 5, 100, 0);
- arch.setLayoutData(f);
-
- f = UIUtils.createFormData(arch, 8 + centering, null, 0, 0, 0, null, 0);
- realmLabel.setLayoutData(f);
-
- f = UIUtils.createFormData(arch, 8, null, 0, hardwareLabel, 5, 100, 0);
- realmCombo.setLayoutData(f);
-
- Control control = realmCombo;
-
- Label keyLabel = new Label(container, SWT.NULL);
- keyLabel.setText(WizardMessages.getString(KEY_LABEL));
-
- keyText = new Text(container, SWT.BORDER | SWT.SINGLE);
-
- f = UIUtils.createFormData(realmCombo, 8 + centering + centering2, null, 0, 0, 0, null, 0);
- keyLabel.setLayoutData(f);
-
- f = new FormData();
- f.width = buttonWidth;
- f.top = new FormAttachment(realmCombo, 8);
- f.right = new FormAttachment(realmCombo, 0, SWT.RIGHT);
- keyManage.setLayoutData(f);
-
- f = UIUtils.createFormData(realmCombo, 8 + centering2, null, 0, hardwareLabel, 5, keyManage, -10);
- keyText.setLayoutData(f);
-
- control = keyText;
-
- f = UIUtils.createFormData(control, 8 + centering, null, 0, 0, 0, null, 0);
- hardwareLabel.setLayoutData(f);
-
- f = UIUtils.createFormData(control, 8, null, 0, hardwareLabel, 5, 100, 0);
- hardware.setLayoutData(f);
-
- f = UIUtils.createFormData(hardware, 10, 100, 0, 0, 0, 100, 0);
- groupContainer.setLayoutData(f);
- return container;
- }
-
- private void createProfileComposites() {
- for (DeltaCloudHardwareProfile p : allProfiles) {
- ProfileComposite pc = new ProfileComposite(p, groupContainer);
- profilePages.put(p.getId(), pc);
- pc.setVisible(false);
- }
- groupContainer.layout();
- }
-
- private void launchFetchRealms() {
- Thread t = new Thread() {
- public void run() {
- realms = getRealms();
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- updateRealmCombo();
- }
- });
- }
- };
- t.start();
- }
-
- private void launchFetchProfiles() {
- Thread t = new Thread() {
- public void run() {
- allProfiles = getProfiles();
- profilePages = new HashMap<String, ProfileComposite>();
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- createProfileComposites();
- clearProfiles();
- if (allProfiles.length > 0)
- hardware.setEnabled(true);
- filterProfiles();
- }
- });
- }
- };
- t.start();
- }
-
- /**
- * Displays the arch in the given label if the given binding is valid.
- *
- * @param archLabel
- * the arch label
- * @return the value change listener
- */
- private class ArchAdapter implements IValueChangeListener {
-
- private Label archLabel;
- private NewInstanceModel.ImageContainer container;
- private NewInstancePage2 page;
-
- public ArchAdapter(Label archLabel,
- NewInstanceModel.ImageContainer container,
- NewInstancePage2 page) {
- this.archLabel = archLabel;
- this.page = page;
- this.container = container;
- }
-
- @Override
- public void handleValueChange(ValueChangeEvent event) {
- IStatus status = (IStatus) event.diff.getNewValue();
- if (status.isOK()) {
- archLabel.setText(model.getArch());
- page.setImage(container.getImage());
- page.filterProfiles();
- } else {
- archLabel.setText("");
- page.clearProfiles();
- }
- }
- }
-
- /**
- * Binds the architecture label to the given image id text widget. Attaches
- * a listener to the image id text widget Adds a validity decorator to the
- * image text widget.
- *
- * @param dbc
- * the databinding context to use
- * @param imageText
- * the image id text widget
- * @param archLabel
- * the label to display the image architecture in
- * @return
- * @return the binding that was created
- */
- private Binding bindArchLabel(DataBindingContext dbc, Text imageText, final Label archLabel,
- final NewInstancePage2 page) {
- UpdateValueStrategy updateStrategy = new UpdateValueStrategy();
- NewInstanceModel.ImageContainer c = new NewInstanceModel.ImageContainer();
- updateStrategy.setConverter(new NewInstanceModel.ArchConverter(cloud, c, String.class, String.class));
- updateStrategy.setBeforeSetValidator(new NewInstanceModel.ArchValidator());
-
- Binding binding = dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observeDelayed(100, imageText),
- BeanProperties.value(NewInstanceModel.PROPERTY_ARCH).observe(model),
- updateStrategy,
- new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
- binding.getValidationStatus().addValueChangeListener(new ArchAdapter(archLabel, c, page));
- ControlDecorationSupport.create(binding, SWT.LEFT | SWT.TOP);
- return binding;
- }
-
- /**
- * Bind the given text widget to the cloud connection model. Attaches
- * validator to the binding that enforce a non-empty input.
- *
- * @param dbc
- * the databinding context to use
- * @param text
- * the name text widget to bind
- */
- private void bindText(DataBindingContext dbc, final Text text, String property, String errMsgId) {
- Binding nameTextBinding = dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observe(text),
- BeanProperties.value(NewInstanceModel.class, property)
- .observe(model),
- new UpdateValueStrategy().setBeforeSetValidator(new MandatoryStringValidator(WizardMessages
- .getString(errMsgId))),
- null);
- ControlDecorationSupport.create(nameTextBinding, SWT.LEFT | SWT.TOP);
- }
-
- private List<String> getRealmNames(List<DeltaCloudRealm> realms) {
- List<String> realmNames = new ArrayList<String>();
- for (DeltaCloudRealm realm : realms) {
- realmNames.add(
- new StringBuilder()
- .append(realm.getId())
- .append(" [") //$NON-NLS-1$
- .append(realm.getName())
- .append("]") //$NON-NLS-1$
- .toString());
- }
- return realmNames;
- }
-
- private List<DeltaCloudRealm> getRealms() {
- List<DeltaCloudRealm> realms = new ArrayList<DeltaCloudRealm>();
- try {
- realms = Arrays.asList(cloud.getRealms());
- } catch (DeltaCloudException e) {
- ErrorUtils.handleErrorAsync("Error",
- MessageFormat.format("Could not get realms from cloud {0}", cloud.getName()), e, getShell());
- }
- return realms;
- }
-
- /**
- * Creates the control that shall display the available realms. It creates
- * either a combo, if there are realms available, or a label if none are
- * available.
- *
- * @param parent
- * the container
- * @param realmNames
- * the realm names
- */
- private void createRealmsControl(final Composite parent) {
- Combo combo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- realmCombo = combo;
- combo.setEnabled(false);
- combo.setItems(new String[] { WizardMessages.getString(LOADING_VALUE) });
- combo.select(0);
- }
-
- private void updateRealmCombo() {
- List<String> names = getRealmNames(realms != null ? realms : new ArrayList<DeltaCloudRealm>());
- if (names.size() > 0) {
- realmCombo.setItems(names.toArray(new String[names.size()]));
- realmCombo.setEnabled(true);
- realmCombo.select(0);
- } else {
- realmCombo.setItems(new String[] { WizardMessages.getString(NONE_RESPONSE) });
- realmCombo.select(0);
- }
- }
-}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java (from rev 27119, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2010-12-08 12:40:43 UTC (rev 27225)
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * 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:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.rse.core.model.IHost;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudException;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.ui.Activator;
+import org.jboss.tools.deltacloud.ui.ErrorUtils;
+import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
+import org.jboss.tools.deltacloud.ui.RSEUtils;
+import org.osgi.service.prefs.Preferences;
+
+public class NewInstanceWizard extends Wizard {
+
+ private final static String CREATE_INSTANCE_FAILURE_TITLE = "CreateInstanceError.title"; //$NON-NLS-1$
+ private final static String CREATE_INSTANCE_FAILURE_MSG = "CreateInstanceError.msg"; //$NON-NLS-1$
+ private final static String CONFIRM_CREATE_TITLE = "ConfirmCreate.title"; //$NON-NLS-1$
+ private final static String CONFIRM_CREATE_MSG = "ConfirmCreate.msg"; //$NON-NLS-1$
+ private final static String DONT_SHOW_THIS_AGAIN_MSG = "DontShowThisAgain.msg"; //$NON-NLS-1$
+ private final static String STARTING_INSTANCE_MSG = "StartingInstance.msg"; //$NON-NLS-1$
+ private final static String STARTING_INSTANCE_TITLE = "StartingInstance.title"; //$NON-NLS-1$
+
+ protected NewInstancePage mainPage;
+ protected DeltaCloud cloud;
+ protected DeltaCloudInstance instance;
+ /**
+ * Initial image, may be null
+ */
+ private DeltaCloudImage image;
+
+ public NewInstanceWizard(DeltaCloud cloud) {
+ this.cloud = cloud;
+ }
+
+ public NewInstanceWizard(DeltaCloud cloud, DeltaCloudImage image) {
+ this(cloud);
+ this.image = image;
+ }
+
+ @Override
+ public void addPages() {
+ mainPage = new NewInstancePage(cloud);
+ if( image != null )
+ mainPage.setImage(image);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ private class WatchCreateJob extends Job {
+
+ private DeltaCloud cloud;
+ private String instanceId;
+ private String instanceName;
+
+ public WatchCreateJob(String title, DeltaCloud cloud,
+ String instanceId, String instanceName) {
+ super(title);
+ this.cloud = cloud;
+ this.instanceId = instanceId;
+ this.instanceName = instanceName;
+ }
+
+ public IStatus run(IProgressMonitor pm) {
+ if (!pm.isCanceled()) {
+ DeltaCloudInstance instance = null;
+ try {
+ pm.beginTask(
+ WizardMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] { instanceName }),
+ IProgressMonitor.UNKNOWN);
+ pm.worked(1);
+ cloud.registerInstanceJob(instanceId, this);
+ instance = cloud.waitWhilePending(instanceId, pm);
+ } catch (Exception e) {
+ // do nothing
+ } finally {
+ cloud.replaceInstance(instance);
+ cloud.removeInstanceJob(instanceId, this);
+ String hostname = RSEUtils.createHostName(instance);
+ if (hostname != null && hostname.length() > 0 && isAutoconnect()) {
+ try {
+ String connectionName = RSEUtils.createConnectionName(instance);
+ IHost host = RSEUtils.createHost(connectionName,
+ RSEUtils.createHostName(instance),
+ RSEUtils.getSSHOnlySystemType(),
+ RSEUtils.getSystemRegistry());
+ RSEUtils.connect(connectionName, RSEUtils.getConnectorService(host));
+ } catch (Exception e) {
+ return ErrorUtils.handleError("Error", "Could not launch remote system explorer for instance \""
+ + instance.getName() + "\"", e, getShell());
+ }
+ }
+ pm.done();
+ }
+ return Status.OK_STATUS;
+ } else {
+ pm.done();
+ return Status.CANCEL_STATUS;
+ }
+ }
+
+ private boolean isAutoconnect() {
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+ boolean autoConnect = prefs.getBoolean(IDeltaCloudPreferenceConstants.AUTO_CONNECT_INSTANCE, true);
+ return autoConnect;
+ }
+ };
+
+ @Override
+ public boolean performFinish() {
+ String imageId = mainPage.getImageId().trim();
+ String profileId = mainPage.getHardwareProfile();
+ String realmId = mainPage.getRealmId();
+ String memory = mainPage.getMemoryProperty();
+ String storage = mainPage.getStorageProperty();
+ String keyname = mainPage.getKeyName();
+ String name = getName();
+
+ // Save persistent settings for this particular cloud
+ cloud.setLastImageId(imageId);
+ cloud.setLastKeyname(keyname);
+
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+
+ boolean result = false;
+ Exception e = null;
+ try {
+ DeltaCloudManager.getDefault().saveClouds();
+ boolean dontShowDialog = prefs.getBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE,
+ false);
+ if (!dontShowDialog) {
+ MessageDialogWithToggle dialog =
+ MessageDialogWithToggle.openOkCancelConfirm(getShell(),
+ WizardMessages.getString(CONFIRM_CREATE_TITLE),
+ WizardMessages.getString(CONFIRM_CREATE_MSG),
+ WizardMessages.getString(DONT_SHOW_THIS_AGAIN_MSG),
+ false, null, null);
+ int retCode = dialog.getReturnCode();
+ boolean toggleState = dialog.getToggleState();
+ if (retCode == Dialog.CANCEL)
+ return true;
+ // If warning turned off by user, set the preference for future
+ // usage
+ if (toggleState) {
+ prefs.putBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE, true);
+ }
+ }
+ instance = cloud.createInstance(name, imageId, realmId, profileId, keyname, memory, storage);
+ if (instance != null)
+ result = true;
+ if (instance != null && instance.getState().equals(DeltaCloudInstance.PENDING)) {
+ final String instanceId = instance.getId();
+ final String instanceName = name;
+ Job job = new WatchCreateJob(WizardMessages.getString(STARTING_INSTANCE_TITLE),
+ cloud, instanceId, instanceName);
+ job.setUser(true);
+ job.schedule();
+ }
+ } catch (DeltaCloudException ex) {
+ e = ex;
+ }
+ if (!result) {
+ ErrorUtils.handleError(
+ WizardMessages.getString(CREATE_INSTANCE_FAILURE_TITLE),
+ WizardMessages.getFormattedString(CREATE_INSTANCE_FAILURE_MSG, new String[] { name, imageId, realmId, profileId }),
+ e, getShell());
+ }
+ return result;
+ }
+
+ private String getName() {
+ try {
+ return URLEncoder.encode(mainPage.getInstanceName(), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ // TODO: implement proper handling
+ return "";
+ } //$NON-NLS-1$
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java 2010-12-08 12:26:46 UTC (rev 27224)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java 2010-12-08 12:40:43 UTC (rev 27225)
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * 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:
- * Red Hat Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.rse.core.model.IHost;
-import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
-import org.jboss.tools.deltacloud.core.DeltaCloudImage;
-import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
-import org.jboss.tools.deltacloud.core.DeltaCloudManager;
-import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
-import org.jboss.tools.deltacloud.ui.RSEUtils;
-import org.osgi.service.prefs.Preferences;
-
-public class NewInstanceWizard2 extends Wizard {
-
- private final static String CREATE_INSTANCE_FAILURE_TITLE = "CreateInstanceError.title"; //$NON-NLS-1$
- private final static String CREATE_INSTANCE_FAILURE_MSG = "CreateInstanceError.msg"; //$NON-NLS-1$
- private final static String CONFIRM_CREATE_TITLE = "ConfirmCreate.title"; //$NON-NLS-1$
- private final static String CONFIRM_CREATE_MSG = "ConfirmCreate.msg"; //$NON-NLS-1$
- private final static String DONT_SHOW_THIS_AGAIN_MSG = "DontShowThisAgain.msg"; //$NON-NLS-1$
- private final static String STARTING_INSTANCE_MSG = "StartingInstance.msg"; //$NON-NLS-1$
- private final static String STARTING_INSTANCE_TITLE = "StartingInstance.title"; //$NON-NLS-1$
-
- protected NewInstancePage2 mainPage;
- protected DeltaCloud cloud;
- protected DeltaCloudInstance instance;
- /**
- * Initial image, may be null
- */
- private DeltaCloudImage image;
-
- public NewInstanceWizard2(DeltaCloud cloud) {
- this.cloud = cloud;
- }
-
- public NewInstanceWizard2(DeltaCloud cloud, DeltaCloudImage image) {
- this(cloud);
- this.image = image;
- }
-
- @Override
- public void addPages() {
- mainPage = new NewInstancePage2(cloud);
- if( image != null )
- mainPage.setImage(image);
- addPage(mainPage);
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
- private class WatchCreateJob extends Job {
-
- private DeltaCloud cloud;
- private String instanceId;
- private String instanceName;
-
- public WatchCreateJob(String title, DeltaCloud cloud,
- String instanceId, String instanceName) {
- super(title);
- this.cloud = cloud;
- this.instanceId = instanceId;
- this.instanceName = instanceName;
- }
-
- public IStatus run(IProgressMonitor pm) {
- if (!pm.isCanceled()) {
- DeltaCloudInstance instance = null;
- try {
- pm.beginTask(
- WizardMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] { instanceName }),
- IProgressMonitor.UNKNOWN);
- pm.worked(1);
- cloud.registerInstanceJob(instanceId, this);
- instance = cloud.waitWhilePending(instanceId, pm);
- } catch (Exception e) {
- // do nothing
- } finally {
- cloud.replaceInstance(instance);
- cloud.removeInstanceJob(instanceId, this);
- String hostname = RSEUtils.createHostName(instance);
- if (hostname != null && hostname.length() > 0 && isAutoconnect()) {
- try {
- String connectionName = RSEUtils.createConnectionName(instance);
- IHost host = RSEUtils.createHost(connectionName,
- RSEUtils.createHostName(instance),
- RSEUtils.getSSHOnlySystemType(),
- RSEUtils.getSystemRegistry());
- RSEUtils.connect(connectionName, RSEUtils.getConnectorService(host));
- } catch (Exception e) {
- return ErrorUtils.handleError("Error", "Could not launch remote system explorer for instance \""
- + instance.getName() + "\"", e, getShell());
- }
- }
- pm.done();
- }
- return Status.OK_STATUS;
- } else {
- pm.done();
- return Status.CANCEL_STATUS;
- }
- }
-
- private boolean isAutoconnect() {
- Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
- boolean autoConnect = prefs.getBoolean(IDeltaCloudPreferenceConstants.AUTO_CONNECT_INSTANCE, true);
- return autoConnect;
- }
- };
-
- @Override
- public boolean performFinish() {
- String imageId = mainPage.getImageId().trim();
- String profileId = mainPage.getHardwareProfile();
- String realmId = mainPage.getRealmId();
- String memory = mainPage.getMemoryProperty();
- String storage = mainPage.getStorageProperty();
- String keyname = mainPage.getKeyName();
- String name = getName();
-
- // Save persistent settings for this particular cloud
- cloud.setLastImageId(imageId);
- cloud.setLastKeyname(keyname);
-
- Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
-
- boolean result = false;
- Exception e = null;
- try {
- DeltaCloudManager.getDefault().saveClouds();
- boolean dontShowDialog = prefs.getBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE,
- false);
- if (!dontShowDialog) {
- MessageDialogWithToggle dialog =
- MessageDialogWithToggle.openOkCancelConfirm(getShell(),
- WizardMessages.getString(CONFIRM_CREATE_TITLE),
- WizardMessages.getString(CONFIRM_CREATE_MSG),
- WizardMessages.getString(DONT_SHOW_THIS_AGAIN_MSG),
- false, null, null);
- int retCode = dialog.getReturnCode();
- boolean toggleState = dialog.getToggleState();
- if (retCode == Dialog.CANCEL)
- return true;
- // If warning turned off by user, set the preference for future
- // usage
- if (toggleState) {
- prefs.putBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE, true);
- }
- }
- instance = cloud.createInstance(name, imageId, realmId, profileId, keyname, memory, storage);
- if (instance != null)
- result = true;
- if (instance != null && instance.getState().equals(DeltaCloudInstance.PENDING)) {
- final String instanceId = instance.getId();
- final String instanceName = name;
- Job job = new WatchCreateJob(WizardMessages.getString(STARTING_INSTANCE_TITLE),
- cloud, instanceId, instanceName);
- job.setUser(true);
- job.schedule();
- }
- } catch (DeltaCloudException ex) {
- e = ex;
- }
- if (!result) {
- ErrorUtils.handleError(
- WizardMessages.getString(CREATE_INSTANCE_FAILURE_TITLE),
- WizardMessages.getFormattedString(CREATE_INSTANCE_FAILURE_MSG, new String[] { name, imageId, realmId, profileId }),
- e, getShell());
- }
- return result;
- }
-
- private String getName() {
- try {
- return URLEncoder.encode(mainPage.getInstanceName(), "UTF-8");
- } catch (UnsupportedEncodingException e) {
- // TODO: implement proper handling
- return "";
- } //$NON-NLS-1$
- }
-
-}
14 years
JBoss Tools SVN: r27224 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-08 07:26:46 -0500 (Wed, 08 Dec 2010)
New Revision: 27224
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
Log:
various cleanups
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-08 12:25:25 UTC (rev 27223)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-08 12:26:46 UTC (rev 27224)
@@ -117,6 +117,7 @@
String arch = archText.getText();
String desc = descText.getText();
+ // TODO remove this filter related functionality. bad encapsulation!
hasError = validateFilters(hasError, name, id, arch, desc);
if (selectedElement == null)
@@ -124,6 +125,7 @@
if (!hasError) {
setErrorMessage(null);
+ // TODO remove this filter related functionality. bad encapsulation!
String newRules = name + "*;" //$NON-NLS-1$
+ id + "*;" //$NON-NLS-1$
+ arch + "*;" //$NON-NLS-1$
14 years
JBoss Tools SVN: r27223 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-08 07:25:25 -0500 (Wed, 08 Dec 2010)
New Revision: 27223
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
Log:
various cleanups
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-08 12:04:18 UTC (rev 27222)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-08 12:25:25 UTC (rev 27223)
@@ -46,10 +46,7 @@
private DeltaCloud cloud;
private TableViewer viewer;
- private Composite container;
- private ImageViewLabelAndContentProvider contentProvider;
-
private Text nameText;
private Text idText;
private Text archText;
@@ -120,13 +117,7 @@
String arch = archText.getText();
String desc = descText.getText();
- if (name.contains(";") || //$NON-NLS-1$
- id.contains(";") || //$NON-NLS-1$
- arch.contains(";") || //$NON-NLS-1$
- desc.contains(";")) { //$NON-NLS-1$
- setErrorMessage(WizardMessages.getString(INVALID_SEMICOLON));
- hasError = true;
- }
+ hasError = validateFilters(hasError, name, id, arch, desc);
if (selectedElement == null)
isComplete = false;
@@ -148,10 +139,20 @@
setPageComplete(isComplete && !hasError);
}
+ private boolean validateFilters(boolean hasError, String name, String id, String arch, String desc) {
+ if (name.contains(";") || //$NON-NLS-1$
+ id.contains(";") || //$NON-NLS-1$
+ arch.contains(";") || //$NON-NLS-1$
+ desc.contains(";")) { //$NON-NLS-1$
+ setErrorMessage(WizardMessages.getString(INVALID_SEMICOLON));
+ hasError = true;
+ }
+ return hasError;
+ }
+
@Override
public void createControl(Composite parent) {
- // TODO Auto-generated method stub
- container = new Composite(parent, SWT.NULL);
+ Composite container = new Composite(parent, SWT.NULL);
FormLayout layout = new FormLayout();
layout.marginHeight = 5;
layout.marginWidth = 5;
@@ -193,7 +194,7 @@
Table table = viewer.getTable();
table.setHeaderVisible(true);
table.setLinesVisible(true);
- contentProvider = new ImageViewLabelAndContentProvider();
+ ImageViewLabelAndContentProvider contentProvider = new ImageViewLabelAndContentProvider();
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(contentProvider);
TableViewerColumnComparator comparator = new TableViewerColumnComparator();
14 years
JBoss Tools SVN: r27222 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-08 07:04:18 -0500 (Wed, 08 Dec 2010)
New Revision: 27222
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java
Log:
renamed FindImage to FindImageWizard since it is a wizard
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-08 10:37:26 UTC (rev 27221)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-08 12:04:18 UTC (rev 27222)
@@ -1,3 +1,8 @@
+2010-12-08 André Dietisheim <adietish(a)redhat.com>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java:
+ renamed FindImage to FindImageWizard since it is a wizard
+
2010-12-07 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/cloud/CVCloudElementCategoryElement.java (setLoadingIndicator):
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java (from rev 27061, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java 2010-12-08 12:04:18 UTC (rev 27222)
@@ -0,0 +1,38 @@
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+
+public class FindImageWizard extends Wizard {
+
+ private DeltaCloud cloud;
+ private FindImagePage mainPage;
+ private String imageId;
+
+ public FindImageWizard(DeltaCloud cloud) {
+ this.cloud = cloud;
+ }
+
+ public String getImageId() {
+ return imageId;
+ }
+
+ @Override
+ public void addPages() {
+ // TODO Auto-generated method stub
+ mainPage = new FindImagePage(cloud);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ @Override
+ public boolean performFinish() {
+ imageId = mainPage.getImageId();
+ return true;
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java 2010-12-08 10:37:26 UTC (rev 27221)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java 2010-12-08 12:04:18 UTC (rev 27222)
@@ -141,7 +141,7 @@
public void widgetSelected(SelectionEvent event) {
Shell shell = getShell();
- FindImage wizard = new FindImage(cloud);
+ FindImageWizard wizard = new FindImageWizard(cloud);
WizardDialog dialog = new CustomWizardDialog(shell, wizard,
IDialogConstants.OK_LABEL);
dialog.create();
14 years
JBoss Tools SVN: r27221 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-08 05:37:26 -0500 (Wed, 08 Dec 2010)
New Revision: 27221
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java
Log:
cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java 2010-12-08 08:57:20 UTC (rev 27220)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java 2010-12-08 10:37:26 UTC (rev 27221)
@@ -27,13 +27,13 @@
ICloudElementFilter<CLOUDELEMENT> {
private DeltaCloud cloud;
+ private IFieldMatcher nameRule;
+ private IFieldMatcher idRule;
public AbstractCloudElementFilter(DeltaCloud cloud) {
this.cloud = cloud;
}
- private IFieldMatcher nameRule;
- private IFieldMatcher idRule;
public Collection<CLOUDELEMENT> filter(CLOUDELEMENT[] cloudElements) throws DeltaCloudException {
List<CLOUDELEMENT> filteredElements = new ArrayList<CLOUDELEMENT>();
14 years
JBoss Tools SVN: r27220 - in trunk/ws/tests/org.jboss.tools.ws.creation.core.test: src/org/jboss/tools/ws/creation/core/test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2010-12-08 03:57:20 -0500 (Wed, 08 Dec 2010)
New Revision: 27220
Added:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/util/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/util/JBossWSCreationCoreTestUtils.java
Removed:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSCommandTest.java
Modified:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSClientCommandTest.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSTopDownCommandTest.java
Log:
JBIDE-6581: modify thes ws tests for using AS new api
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF 2010-12-08 08:53:28 UTC (rev 27219)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF 2010-12-08 08:57:20 UTC (rev 27220)
@@ -32,7 +32,8 @@
org.eclipse.jface.text,
org.jboss.ide.eclipse.as.classpath.core,
org.jboss.ide.eclipse.as.ui;bundle-version="2.1.0",
- org.jboss.ide.eclipse.as.wtp.core;bundle-version="2.1.0"
+ org.jboss.ide.eclipse.as.wtp.core;bundle-version="2.1.0",
+ org.jboss.ide.eclipse.as.test;bundle-version="2.2.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.ws.creation.core.test,
org.jboss.tools.ws.creation.core.test.command
Deleted: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSCommandTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSCommandTest.java 2010-12-08 08:53:28 UTC (rev 27219)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSCommandTest.java 2010-12-08 08:57:20 UTC (rev 27220)
@@ -1,475 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.ws.creation.core.test.command;
-
-import java.io.File;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.IStreamListener;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IStreamMonitor;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.server.core.IModule;
-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.IServer.IOperationListener;
-import org.eclipse.wst.server.core.IServerListener;
-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.ServerEvent;
-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.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior.JBossBehaviourDelegate;
-import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossBehaviorDelegate;
-import org.jboss.tools.test.util.JobUtils;
-import org.jboss.tools.test.util.ResourcesUtils;
-import org.jboss.tools.test.util.TestProjectProvider;
-import org.jboss.tools.ws.creation.core.data.ServiceModel;
-
-@SuppressWarnings("restriction")
-public abstract class AbstractJBossWSCommandTest extends TestCase {
- public static final IVMInstall VM_INSTALL = JavaRuntime
- .getDefaultVMInstall();
- protected static final IWorkspace ws = ResourcesPlugin.getWorkspace();
- protected static final IWorkbench wb = PlatformUI.getWorkbench();
-
- protected static final int DEFAULT_STARTUP_TIME = 150000;
- protected static final int DEFAULT_SHUTDOWN_TIME = 90000;
-
- public static final String JBOSSWS_42_HOME = "jbosstools.test.jboss.home.4.2";
- public static final String JBOSS_RUNTIME_42 = "org.jboss.ide.eclipse.as.runtime.42";
- public static final String JBOSS_AS_42_HOME = System.getProperty(
- JBOSSWS_42_HOME);
- public static final String JBOSS_SERVER_42 = "org.jboss.ide.eclipse.as.42";
-
- protected final Set<IResource> resourcesToCleanup = new HashSet<IResource>();
-
- protected static final IProjectFacetVersion dynamicWebVersion;
- protected static final IProjectFacetVersion javaVersion;
- protected static final IProjectFacetVersion jbosswsFacetVersion;
- private static final IProjectFacet jbosswsFacet;
-
- static String wsdlFileName = "hello_world.wsdl";
- static String BUNDLE = "org.jboss.tools.ws.creation.core.test";
-
- IFacetedProject fproject;
- protected IRuntime currentRuntime;
- protected IServer currentServer;
- protected ServerStateListener stateListener;
-
- static {
- javaVersion = ProjectFacetsManager.getProjectFacet("jst.java")
- .getVersion("5.0");
- dynamicWebVersion = ProjectFacetsManager.getProjectFacet("jst.web")
- .getVersion("2.5");
- jbosswsFacet = ProjectFacetsManager.getProjectFacet("jbossws.core");
- jbosswsFacetVersion = jbosswsFacet.getVersion("2.0");
-
- }
-
- public AbstractJBossWSCommandTest() {
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- // create jbossws web project
-
- createServer(JBOSS_RUNTIME_42, JBOSS_SERVER_42, getJBossWSHomeFolder().getAbsolutePath(),
- "default");
- // first thing's first. Let's add a server state listener
- stateListener = new ServerStateListener();
- currentServer.addServerListener(stateListener);
-
- JobUtils.delay(3000);
- }
-
- public IProject createProject(String prjName) throws CoreException {
- TestProjectProvider provider = new TestProjectProvider(BUNDLE, "/projects/" + prjName,
- prjName, true);
- IProject prj = provider.getProject();
- return prj;
- }
-
- protected void tearDown() throws Exception {
- // Wait until all jobs is finished to avoid delete project problems
-
- undeployWebProject();
-
- boolean oldAutoBuilding = ResourcesUtils.setBuildAutomatically(false);
- Exception last = null;
-
- try {
- JobUtils.delay(500);
- for (IResource r : this.resourcesToCleanup) {
- try {
- System.out.println("Deleting " + r);
- r.delete(true, null);
- JobUtils.delay(500);
- } catch (Exception e) {
- System.out.println("Error deleting " + r);
- e.printStackTrace();
- last = e;
- }
- }
- } finally {
- ResourcesUtils.setBuildAutomatically(oldAutoBuilding);
- }
-
- if (last != null)
- throw last;
-
- resourcesToCleanup.clear();
- // cleanProjectFromServer() ;
- shutdown();
- currentServer.removeServerListener(stateListener);
- currentRuntime.delete();
- currentServer.delete();
-
- super.tearDown();
- }
-
- protected void createServer(String runtimeID, String serverID,
- String location, String configuration) throws CoreException {
- // if file doesnt exist, abort immediately.
- assertTrue(new Path(location).toFile().exists());
-
- currentRuntime = createRuntime(runtimeID, location, configuration);
- IServerType serverType = ServerCore.findServerType(serverID);
- IServerWorkingCopy serverWC = serverType.createServer(null, null,
- new NullProgressMonitor());
- serverWC.setRuntime(currentRuntime);
- serverWC.setName(serverID);
- serverWC.setServerConfiguration(null);
- IPath path = new Path(location).append("server").append("default")
- .append("deploy");
- ((ServerWorkingCopy) serverWC).setAttribute(
- DeployableServer.DEPLOY_DIRECTORY, path.toOSString());
- currentServer = serverWC.save(true, new NullProgressMonitor());
-
- }
-
- private IRuntime createRuntime(String runtimeId, String homeDir,
- String config) throws CoreException {
- IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(null, null,
- runtimeId);
- assertEquals("expects only one runtime type", runtimeTypes.length, 1);
- IRuntimeType runtimeType = runtimeTypes[0];
- IRuntimeWorkingCopy runtimeWC = runtimeType.createRuntime(null,
- new NullProgressMonitor());
- runtimeWC.setName(runtimeId);
- runtimeWC.setLocation(new Path(homeDir));
- ((RuntimeWorkingCopy) runtimeWC).setAttribute(
- IJBossServerRuntime.PROPERTY_VM_ID, VM_INSTALL.getId());
- ((RuntimeWorkingCopy) runtimeWC).setAttribute(
- IJBossServerRuntime.PROPERTY_VM_TYPE_ID, VM_INSTALL
- .getVMInstallType().getId());
- ((RuntimeWorkingCopy) runtimeWC).setAttribute(
- IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, config);
- IRuntime savedRuntime = runtimeWC.save(true, new NullProgressMonitor());
- return savedRuntime;
- }
-
- protected ServiceModel createServiceModel() {
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
- model.setWsdlURI(wsdlFile.getLocation().toOSString());
- model.setCustomPackage("org.apache.hello_world_soap_http");
-
- return model;
-
- }
-
- protected void publishWebProject() throws CoreException {
- IModule[] modules = ServerUtil.getModules(currentServer.getServerType()
- .getRuntimeType().getModuleTypes());
- IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
- serverWC.modifyModules(modules, null, null);
- serverWC.save(true, null).publish(0, null);
- currentServer.publish(IServer.PUBLISH_FULL, null);
-
- }
-
- protected void undeployWebProject() throws CoreException {
- IModule[] modules = ServerUtil.getModules(currentServer.getServerType()
- .getRuntimeType().getModuleTypes());
- IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
- serverWC.modifyModules(null, modules, null);
- serverWC.save(true, null).publish(0, null);
- currentServer.publish(IServer.PUBLISH_FULL, null);
-
- }
-
- protected void cleanProjectFromServer() throws CoreException {
- IModule[] modules = ServerUtil.getModules(currentServer.getServerType()
- .getRuntimeType().getModuleTypes());
- IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
- serverWC.modifyModules(null, modules, null);
- currentServer.publish(0, null);
- currentServer.stop(true);
-
- }
-
- protected boolean isServerSupplied() {
- return false;
- }
-
- protected IFacetedProject createJBossWSProject(String baseProjectName,
- boolean isServerSupplied) throws CoreException {
- IProject project = createProject(baseProjectName);
- final IFacetedProject fproj = ProjectFacetsManager.create(project);
-
- // installDependentFacets(fproj);
- fproj.installProjectFacet(jbosswsFacetVersion,
- createJBossWSDataModel(isServerSupplied), null);
-
- assertNotNull(project);
-
- this.addResourceToCleanup(project);
-
- return fproj;
- }
-
- abstract IDataModel createJBossWSDataModel(boolean isServerSupplied);
-
- protected final void addResourceToCleanup(final IResource resource) {
- this.resourcesToCleanup.add(resource);
- }
-
- protected File getJBossWSHomeFolder() {
-
- String jbosshome = System.getProperty(JBOSSWS_42_HOME);
- if (jbosshome==null) {
- String message = "{0} system property is not defined. Use -D{0}=/path/to/the/server in command line or in VM Arguments group of Aclipse Application Launch Configuration Arguments tab";
- throw new IllegalArgumentException(MessageFormat.format(message, JBOSSWS_42_HOME));
- }
- String wrongLocationMessage = "{0} system property points to none existing folder";
- File runtimelocation = new File(jbosshome);
- assertTrue(MessageFormat.format(wrongLocationMessage,JBOSSWS_42_HOME), runtimelocation.exists());
-
- String cmdFileLocation = jbosshome + File.separator + "bin"
- + File.separator + "wsconsume.sh";
- assertTrue(jbosshome + " is not a valid jboss EAP home", new File(
- cmdFileLocation).exists());
- return runtimelocation;
- }
-
- protected void startup() {
- startup(DEFAULT_STARTUP_TIME);
- }
-
- protected void startup(int maxWait) {
- long finishTime = new Date().getTime() + maxWait;
-
- // operation listener, which is only alerted when the startup is *done*
- final StatusWrapper opWrapper = new StatusWrapper();
- final IOperationListener listener = new IOperationListener() {
- public void done(IStatus result) {
- opWrapper.setStatus(result);
- }
- };
-
- // a stream listener to listen for errors
- ErrorStreamListener streamListener = new ErrorStreamListener();
-
- // the thread to actually start the server
- Thread startThread = new Thread() {
- public void run() {
- currentServer.start(ILaunchManager.RUN_MODE, listener);
- }
- };
-
- startThread.start();
-
- boolean addedStream = false;
- while (finishTime > new Date().getTime()
- && opWrapper.getStatus() == null) {
- // we're waiting for startup to finish
- if (!addedStream) {
- IStreamMonitor mon = getStreamMonitor();
- if (mon != null) {
- mon.addListener(streamListener);
- addedStream = true;
- }
- }
- try {
- Display.getDefault().readAndDispatch();
- } catch (SWTException swte) {
- }
- }
-
- try {
- assertTrue(
- "Startup has taken longer than what is expected for a default startup",
- finishTime >= new Date().getTime());
- assertFalse("Startup had System.error output", streamListener
- .hasError());
- } catch (AssertionFailedError afe) {
- // cleanup
- currentServer.stop(true);
- // rethrow
- throw afe;
- }
- getStreamMonitor().removeListener(streamListener);
- }
-
- protected void shutdown() {
- shutdown(DEFAULT_SHUTDOWN_TIME);
- }
-
- protected void shutdown(int maxWait) {
- long finishTime = new Date().getTime() + maxWait;
-
- // operation listener, which is only alerted when the startup is *done*
- final StatusWrapper opWrapper = new StatusWrapper();
- final IOperationListener listener = new IOperationListener() {
- public void done(IStatus result) {
- opWrapper.setStatus(result);
- }
- };
-
- // a stream listener to listen for errors
- ErrorStreamListener streamListener = new ErrorStreamListener();
- if (getStreamMonitor() != null)
- getStreamMonitor().addListener(streamListener);
-
- // the thread to actually start the server
- Thread stopThread = new Thread() {
- public void run() {
- currentServer.stop(false, listener);
- }
- };
-
- stopThread.start();
-
- while (finishTime > new Date().getTime()
- && opWrapper.getStatus() == null) {
- // we're waiting for startup to finish
- try {
- Display.getDefault().readAndDispatch();
- } catch (SWTException swte) {
- }
- }
-
- try {
- assertTrue(
- "Startup has taken longer than what is expected for a default startup",
- finishTime >= new Date().getTime());
- assertFalse("Startup had System.error output", streamListener
- .hasError());
- } catch (AssertionFailedError afe) {
- // cleanup
- currentServer.stop(true);
- // rethrow
- throw afe;
- }
- }
-
- protected IStreamMonitor getStreamMonitor() {
- JBossServerBehavior behavior = (JBossServerBehavior) currentServer
- .loadAdapter(JBossServerBehavior.class, null);
- if (behavior != null) {
- JBossBehaviourDelegate del = behavior.getDelegate();
- if( del instanceof LocalJBossBehaviorDelegate ) {
- IProcess p = ((LocalJBossBehaviorDelegate)del).getProcess();
- if (p != null) {
- return p.getStreamsProxy()
- .getOutputStreamMonitor();
- }
- }
- }
- return null;
- }
-
- protected class ServerStateListener implements IServerListener {
- private ArrayList<Integer> stateChanges;
-
- public ServerStateListener() {
- this.stateChanges = new ArrayList<Integer>();
- }
-
- public ArrayList<Integer> getStateChanges() {
- return stateChanges;
- }
-
- public void serverChanged(ServerEvent event) {
- if ((event.getKind() & ServerEvent.SERVER_CHANGE) != 0) {
- if ((event.getKind() & ServerEvent.STATE_CHANGE) != 0) {
- if (event.getState() != IServer.STATE_STOPPED)
- stateChanges.add(new Integer(event.getState()));
- }
- }
- }
- }
-
- protected class ErrorStreamListener implements IStreamListener {
- protected boolean errorFound = false;
- String entireLog = "";
-
- public void streamAppended(String text, IStreamMonitor monitor) {
- entireLog += text;
- }
-
- // will need to be fixed or decided how to figure out errors
- public boolean hasError() {
- return errorFound;
- }
- }
-
- public class StatusWrapper {
- protected IStatus status;
-
- public IStatus getStatus() {
- return this.status;
- }
-
- public void setStatus(IStatus s) {
- this.status = s;
- }
- }
-
-}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/AbstractJBossWSGenerationTest.java 2010-12-08 08:57:20 UTC (rev 27220)
@@ -0,0 +1,172 @@
+package org.jboss.tools.ws.creation.core.test.command;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.jboss.ide.eclipse.as.test.ASTest;
+import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
+import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
+import org.jboss.tools.ws.core.classpath.JBossWSRuntimeManager;
+import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
+import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
+
+public class AbstractJBossWSGenerationTest extends ServerRuntimeUtils {
+ protected IServer currentServer;
+ protected final Set<IResource> resourcesToCleanup = new HashSet<IResource>();
+ static String BUNDLE = "org.jboss.tools.ws.creation.core.test";
+ private String RuntimeName = "testjbosswsruntime";
+ public String wsdlFileName = "hello_world.wsdl";
+ public ServiceModel model;
+ private String JBOSS_AS_423_HOME = ASTest.JBOSS_AS_42_HOME;
+ private String JBOSS_WS_HOME = JBOSS_AS_423_HOME;
+ public String wsHomePath;
+ IFacetedProject fproject;
+ public IFile wsdlFile;
+
+ public void setUp() throws Exception{
+ super.setUp();
+ createWSServer();
+ wsHomePath = getJBossWSHomeFolder().toString();
+ JBossWSRuntimeManager.getInstance().addRuntime(RuntimeName,wsHomePath, "", true);
+ }
+
+ public void createWSServer() throws Exception {
+ currentServer = create42Server();
+ }
+
+ public IProject createProject(String prjName) throws CoreException {
+ TestProjectProvider provider = new TestProjectProvider(BUNDLE, "/projects/" + prjName,
+ prjName, true);
+ IProject prj = provider.getProject();
+ return prj;
+ }
+
+ public IFacetedProject createJBossWSProject(String baseProjectName) throws CoreException {
+ IProject project = createProject(baseProjectName);
+ final IFacetedProject fproj = ProjectFacetsManager.create(project);
+ fproj.installProjectFacet(getJBossWSFacetVersion(),createJBossWSDataModel(isServerSupplied()), null);
+ assertNotNull(project);
+ this.addResourceToCleanup(project);
+
+ return fproj;
+ }
+
+ public IProjectFacetVersion getJBossWSFacetVersion(){
+ IProjectFacet jbosswsFacet = ProjectFacetsManager.getProjectFacet("jbossws.core");
+ IProjectFacetVersion jbosswsFacetVersion = jbosswsFacet.getVersion("3.0");
+ return jbosswsFacetVersion;
+ }
+
+ protected ServiceModel createServiceModel() {
+ model = new ServiceModel();
+ model.setWebProjectName(fproject.getProject().getName());
+ if(wsdlFile != null) {
+ model.setWsdlURI(wsdlFile.getLocationURI().toString());
+ }
+ model.setCustomPackage("org.apache.hello_world_soap_http");
+ model.setUpdateWebxml(true);
+ return model;
+ }
+
+ public void publishWebProject() throws CoreException {
+ IModule[] modules = ServerUtil.getModules(currentServer.getServerType()
+ .getRuntimeType().getModuleTypes());
+ IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
+ serverWC.modifyModules(modules, null, null);
+ serverWC.save(true, null).publish(0, null);
+ currentServer.publish(IServer.PUBLISH_FULL, null);
+ }
+
+ private boolean isServerSupplied() {
+ return false;
+ }
+
+ public void tearDown() throws Exception{
+ undeployWebProject();
+ cleanResouces();
+ JBossWSRuntime runtime = JBossWSRuntimeManager.getInstance().findRuntimeByName(RuntimeName);
+ JBossWSRuntimeManager.getInstance().removeRuntime(runtime);
+ shutdown(currentServer);
+ try {
+ if( currentServer != null )
+ currentServer.delete();
+ } catch( CoreException ce ) {
+ // report
+ }
+ super.tearDown();
+ }
+
+ private void cleanResouces() throws Exception {
+ boolean oldAutoBuilding = ResourcesUtils.setBuildAutomatically(false);
+ Exception last = null;
+ try {
+ JobUtils.delay(500);
+ for (IResource r : this.resourcesToCleanup) {
+ try {
+ r.delete(true, null);
+ JobUtils.delay(500);
+ } catch (Exception e) {
+ e.printStackTrace();
+ last = e;
+ }
+ }
+ } finally {
+ ResourcesUtils.setBuildAutomatically(oldAutoBuilding);
+ }
+ if (last != null)
+ throw last;
+ resourcesToCleanup.clear();
+ }
+
+ protected void undeployWebProject() throws CoreException {
+ IModule[] modules = ServerUtil.getModules(currentServer.getServerType()
+ .getRuntimeType().getModuleTypes());
+ IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
+ serverWC.modifyModules(null, modules, null);
+ serverWC.save(true, null).publish(0, null);
+ currentServer.publish(IServer.PUBLISH_FULL, null);
+ }
+
+ private final void addResourceToCleanup(final IResource resource) {
+ this.resourcesToCleanup.add(resource);
+ }
+
+ private IDataModel createJBossWSDataModel( boolean isServerSupplied) {
+ IDataModel config = (IDataModel) new JBossWSFacetInstallDataModelProvider().create();
+ if(isServerSupplied) {
+ config.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED, true);
+ } else {
+ config.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY, false);
+ config.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, RuntimeName);
+ config.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, wsHomePath);
+ }
+ return config;
+ }
+
+ private File getJBossWSHomeFolder() {
+ assertTrue("No system property for the WS Home",JBOSS_WS_HOME != null);
+ File runtimelocation = new File(JBOSS_WS_HOME);
+ assertTrue("The system WS Home doesn't exist",runtimelocation.exists());
+ String cmdFileLocation = JBOSS_WS_HOME + File.separator + "bin" + File.separator + "wsconsume.sh";
+ assertTrue(JBOSS_WS_HOME + " is not a valid jboss AS home", new File(cmdFileLocation).exists());
+ return runtimelocation;
+ }
+}
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSClientCommandTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSClientCommandTest.java 2010-12-08 08:53:28 UTC (rev 27219)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSClientCommandTest.java 2010-12-08 08:57:20 UTC (rev 27220)
@@ -11,82 +11,47 @@
package org.jboss.tools.ws.creation.core.test.command;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.ws.internal.wsrt.IWebServiceClient;
import org.eclipse.wst.ws.internal.wsrt.WebServiceClientInfo;
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
-import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
-import org.jboss.tools.ws.core.classpath.JBossWSRuntimeManager;
import org.jboss.tools.ws.core.classpath.JBossWSRuntimeClassPathInitializer.JBossWSRuntimeClasspathContainer;
-import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
-import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
import org.jboss.tools.ws.creation.core.JBossWSCreationCorePlugin;
import org.jboss.tools.ws.creation.core.commands.ClientSampleCreationCommand;
import org.jboss.tools.ws.creation.core.commands.InitialClientCommand;
import org.jboss.tools.ws.creation.core.commands.RemoveClientJarsCommand;
import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand;
-import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.core.test.util.JBossWSCreationCoreTestUtils;
import org.jboss.tools.ws.creation.ui.wsrt.JBossWebServiceClient;
/**
* @author Grid Qian
*/
@SuppressWarnings("restriction")
-public class JBossWSClientCommandTest extends AbstractJBossWSCommandTest {
+public class JBossWSClientCommandTest extends AbstractJBossWSGenerationTest {
- private static final String RuntimeName;
- private static final boolean isDeployed;
-
- static {
- RuntimeName = "testjbosswsruntime";
- isDeployed = false;
- }
-
public JBossWSClientCommandTest() {
}
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
- JBossWSRuntimeManager.getInstance().addRuntime(RuntimeName,
- getJBossWSHomeFolder().toString(), "", true);
// create jbossws web project
- fproject = createJBossWSProject("JBossWSTestProject",
- isServerSupplied());
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
-
+ fproject = createJBossWSProject("JBossWSTestProject");
+ wsdlFile = fproject.getProject().getFile(wsdlFileName);
+ model = createServiceModel();
assertTrue(wsdlFile.exists());
}
- protected void tearDown() throws Exception {
- super.tearDown();
- resourcesToCleanup.clear();
- JBossWSRuntime runtime = JBossWSRuntimeManager.getInstance()
- .findRuntimeByName(RuntimeName);
- JBossWSRuntimeManager.getInstance().removeRuntime(runtime);
- }
-
public void testInitialClientCommand() throws CoreException,
ExecutionException {
-
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- model.setCustomPackage("org.apache.hello_world_soap_http");
- // model.setWsdlURI(wsdlFile.getLocation().toOSString());
-
WebServiceClientInfo info = new WebServiceClientInfo();
info.setWsdlURL(wsdlFile.getLocation().toOSString());
IWebServiceClient ws = new JBossWebServiceClient(info);
@@ -96,57 +61,37 @@
WebServiceScenario.CLIENT);
IStatus status = cmdInitial.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
-
assertEquals(wsdlFile.getLocation().toOSString(), model.getWsdlURI());
- assertEquals("", model
- .getCustomPackage());
+ assertEquals("", model.getCustomPackage());
}
public void testClientCodeGenerationCommand() throws ExecutionException {
-
- ServiceModel model = createServiceModel();
IProject project = fproject.getProject();
+
// test wsdl2Javacommand
WSDL2JavaCommand cmdW2j = new WSDL2JavaCommand(model);
IStatus status = cmdW2j.execute(null, null);
assertFalse(status.getMessage(), Status.ERROR == status.getSeverity());
- assertTrue(project.getFile(
- "src/org/apache/hello_world_soap_http/Greeter.java").exists());
+ assertTrue(project.getFile("src/org/apache/hello_world_soap_http/Greeter.java").exists());
// test ClientSampleCreationCommand
- ClientSampleCreationCommand cmdImpl = new ClientSampleCreationCommand(
- model);
+ ClientSampleCreationCommand cmdImpl = new ClientSampleCreationCommand(model);
status = cmdImpl.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
- assertTrue(
- "failed to generate sample class",
- project
- .getFile(
- "src/org/apache/hello_world_soap_http/clientsample/ClientSample.java")
- .exists());
-
+ assertTrue("failed to generate sample class",project.getFile("src/org/apache/hello_world_soap_http/clientsample/ClientSample.java").exists());
}
public void testRemoveClientJarsCommand() throws ExecutionException {
-
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
-
RemoveClientJarsCommand command = new RemoveClientJarsCommand(model);
IStatus status = command.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
try {
- IClasspathEntry[] entries = getJavaProjectByName(
- fproject.getProject().getName()).getRawClasspath();
-
+ IClasspathEntry[] entries = JBossWSCreationCoreTestUtils.getJavaProjectByName(fproject.getProject().getName()).getRawClasspath();
for (IClasspathEntry entry : entries) {
- IClasspathContainer container = JavaCore.getClasspathContainer(
- entry.getPath(), getJavaProjectByName(fproject
- .getProject().getName()));
+ IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), JBossWSCreationCoreTestUtils.getJavaProjectByName(fproject.getProject().getName()));
if (container instanceof JBossWSRuntimeClasspathContainer) {
boolean nojar = true;
- for (IClasspathEntry jar : ((JBossWSRuntimeClasspathContainer) container)
- .getClasspathEntries()) {
+ for (IClasspathEntry jar : ((JBossWSRuntimeClasspathContainer) container).getClasspathEntries()) {
if (jar.getPath().toString().contains("jaxws-rt.jar")) {
nojar = false;
}
@@ -157,48 +102,5 @@
} catch (JavaModelException e) {
JBossWSCreationCorePlugin.getDefault().logError(e);
}
-
}
-
- public static IJavaProject getJavaProjectByName(String projectName)
- throws JavaModelException {
-
- IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace()
- .getRoot());
- model.open(null);
-
- IJavaProject[] projects = model.getJavaProjects();
-
- for (IJavaProject proj : projects) {
- if (proj.getProject().getName().equals(projectName)) {
- return proj;
- }
- }
-
- return null;
- }
-
- @Override
- IDataModel createJBossWSDataModel(boolean isServerSupplied) {
- IDataModel config = (IDataModel) new JBossWSFacetInstallDataModelProvider()
- .create();
- if (isServerSupplied) {
- config
- .setBooleanProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED,
- true);
- } else {
- config.setBooleanProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY,
- isDeployed);
- config.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID,
- RuntimeName);
- config.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME,
- getJBossWSHomeFolder().toString());
- }
- return config;
- }
-
}
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java 2010-12-08 08:53:28 UTC (rev 27219)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSJavaFirstCommandTest.java 2010-12-08 08:57:20 UTC (rev 27220)
@@ -18,7 +18,6 @@
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -28,204 +27,118 @@
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.console.AbstractConsole;
-import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsoleListener;
import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.TextConsole;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.ws.internal.wsrt.IWebService;
import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
-import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
-import org.jboss.tools.ws.core.classpath.JBossWSRuntimeManager;
-import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
-import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.ws.creation.core.commands.InitialCommand;
+import org.jboss.tools.ws.creation.core.commands.Java2WSCommand;
import org.jboss.tools.ws.creation.core.commands.MergeWebXMLCommand;
import org.jboss.tools.ws.creation.core.commands.RemoveClientJarsCommand;
import org.jboss.tools.ws.creation.core.commands.ValidateWSImplCommand;
-import org.jboss.tools.ws.creation.core.commands.Java2WSCommand;
-import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.creation.core.messages.JBossWSCreationCoreMessages;
+import org.jboss.tools.ws.creation.core.test.util.JBossWSCreationCoreTestUtils;
import org.jboss.tools.ws.creation.ui.wsrt.JBossWebService;
/**
* @author Grid Qian
*/
@SuppressWarnings("restriction")
-public class JBossWSJavaFirstCommandTest extends AbstractJBossWSCommandTest {
- protected static final IWorkspace ws = ResourcesPlugin.getWorkspace();
- protected static final IWorkbench wb = PlatformUI.getWorkbench();
-
- private static final String RuntimeName;
- private static final boolean isDeployed;
+public class JBossWSJavaFirstCommandTest extends AbstractJBossWSGenerationTest {
private IProject clientProject;
- static {
- RuntimeName = "testjbosswsruntime";
- isDeployed = false;
- }
-
public JBossWSJavaFirstCommandTest() {
}
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
- JBossWSRuntimeManager.getInstance().addRuntime(RuntimeName,
- getJBossWSHomeFolder().toString(), "", true);
- // create jbossws web project
- fproject = createJBossWSProject("JavaFirstTestProject",
- isServerSupplied());
-
+ //create jbossws web project
+ fproject = createJBossWSProject("JavaFirstTestProject");
+ model = createServiceModel();
+
if (!ResourcesPlugin.getWorkspace().getRoot().getProject("ClientTest")
.exists()) {
createProject("ClientTest");
- // this.addResourceToCleanup(clientProject);
}
-
}
+
- protected void tearDown() throws Exception {
- super.tearDown();
+ public void testDeployResult() throws ExecutionException, CoreException,IOException {
+ doInitialCommand();
+ doValidateWSImplCommand();
+ doJava2WSCommand();
- resourcesToCleanup.clear();
- JBossWSRuntime runtime = JBossWSRuntimeManager.getInstance()
- .findRuntimeByName(RuntimeName);
- JBossWSRuntimeManager.getInstance().removeRuntime(runtime);
- }
+ IProject project = fproject.getProject();
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ project.build(IncrementalProjectBuilder.FULL_BUILD, null);
+
+ publishWebProject();
+ assertTrue(currentServer.getModules().length > 0);
+ startup(currentServer);
+ JobUtils.delay(12000);
+ String webServiceUrl = "http://127.0.0.1:8080/JavaFirstTestProject/HelloWorld?wsdl";
+ URL url = new URL(webServiceUrl);
+ URLConnection conn = url.openConnection();
+ assertEquals("unable to start JBoss server", IServer.STATE_STARTED,currentServer.getServerState());
+ conn.connect();
+ assertFalse("The url connection's status is "+ ((HttpURLConnection) conn).getResponseMessage(), "Ok".equals(((HttpURLConnection) conn).getResponseMessage()));
- public void testInitialCommand() throws CoreException, ExecutionException {
+ model.setWebProjectName("ClientTest");
+ RemoveClientJarsCommand cmd = new RemoveClientJarsCommand(model);
+ assertTrue(cmd.execute(null, null).getMessage(), cmd.execute(null, null).isOK());
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
+ clientProject = ResourcesPlugin.getWorkspace().getRoot().getProject("ClientTest");
+ clientProject.open(null);
+ clientProject.refreshLocal(IResource.DEPTH_INFINITE, null);
+
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType("org.eclipse.jdt.launching.localJavaApplication");
+ ILaunchConfigurationWorkingCopy wc = launchConfigurationType.newInstance(null, "ClientSample");
+ wc.setAttribute("org.eclipse.debug.core.MAPPED_RESOURCE_TYPES", "1");
+ wc.setAttribute("org.eclipse.jdt.launching.MAIN_TYPE","org.example.www.helloworld.clientsample.ClientSample");
+ wc.setAttribute("org.eclipse.jdt.launching.PROGRAM_ARGUMENTS", "Test");
+ wc.setAttribute("org.eclipse.jdt.launching.PROJECT_ATTR", "ClientTest");
+ wc.doSave();
+ wc.launch(ILaunchManager.RUN_MODE, null);
+ IConsoleManager consolemanager = JBossWSCreationCoreTestUtils.getConsoleManager();
+ checkText(consolemanager.getConsoles());
+ }
+
+ public void doInitialCommand() throws CoreException, ExecutionException {
WebServiceInfo info = new WebServiceInfo();
info.setImplURL("org.example.www.helloworld.HelloWorld");
IWebService ws = new JBossWebService(info);
// test initial command
- InitialCommand cmdInitial = new InitialCommand(model, ws,
- WebServiceScenario.BOTTOMUP);
+ InitialCommand cmdInitial = new InitialCommand(model, ws, WebServiceScenario.BOTTOMUP);
IStatus status = cmdInitial.execute(null, null);
-
assertTrue(status.getMessage(), status.isOK());
- assertTrue(model.getServiceClasses().get(0).equals(
- "org.example.www.helloworld.HelloWorld"));
+ assertTrue(model.getServiceClasses().get(0).equals("org.example.www.helloworld.HelloWorld"));
}
- public void testValidateWSImplCommand() throws ExecutionException {
-
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- model.addServiceClasses("org.example.www.helloworld.HelloWorld");
-
+ public void doValidateWSImplCommand() throws ExecutionException {
ValidateWSImplCommand command = new ValidateWSImplCommand(model);
IStatus status = command.execute(null, null);
-
assertTrue(status.getMessage(), status.isOK());
-
}
- public void testJava2WSCommand() throws ExecutionException, CoreException {
-
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- model.addServiceClasses("org.example.www.helloworld.HelloWorld");
+ public void doJava2WSCommand() throws ExecutionException, CoreException {
model.setGenWSDL(true);
IProject project = fproject.getProject();
-
- fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
-
Java2WSCommand command = new Java2WSCommand(model);
IStatus status = command.execute(null, null);
-
assertFalse(status.getMessage(), Status.ERROR == status.getSeverity());
- assertTrue(project.getFile(
- "src/org/example/www/helloworld/jaxws/SayHello.java").exists());
+ assertTrue(project.getFile("src/org/example/www/helloworld/jaxws/SayHello.java").exists());
assertTrue(project.getFile("wsdl/HelloWorldService.wsdl").exists());
- }
-
- public void testDeployResult() throws ExecutionException, CoreException,
- IOException {
-
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
-
- WebServiceInfo info = new WebServiceInfo();
- info.setImplURL("org.example.www.helloworld.HelloWorld");
- IWebService ws = new JBossWebService(info);
-
- // test initial command
- AbstractDataModelOperation cmd = new InitialCommand(model, ws,
- WebServiceScenario.BOTTOMUP);
- IStatus status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
-
- cmd = new Java2WSCommand(model);
+
+ MergeWebXMLCommand cmd = new MergeWebXMLCommand(model);
status = cmd.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
-
- cmd = new MergeWebXMLCommand(model);
- status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
- publishWebProject();
-
- assertTrue(currentServer.getModules().length > 0);
- String webServiceUrl = "http://localhost:8080/JavaFirstTestProject/HelloWorld?wsdl";
- URL url = new URL(webServiceUrl);
- URLConnection conn = url.openConnection();
-
- startup();
-
- assertEquals("unable to start JBoss server", IServer.STATE_STARTED,
- currentServer.getServerState());
-
- conn.connect();
- assertFalse("The url connection's status is "
- + ((HttpURLConnection) conn).getResponseMessage(), "Ok"
- .equals(((HttpURLConnection) conn).getResponseMessage()));
-
- model = new ServiceModel();
- model.setWebProjectName("ClientTest");
-
- cmd = new RemoveClientJarsCommand(model);
- status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- clientProject = ResourcesPlugin.getWorkspace().getRoot().getProject(
- "ClientTest");
- clientProject.open(null);
- clientProject.refreshLocal(IResource.DEPTH_INFINITE, null);
-
- ILaunchManager launchManager = DebugPlugin.getDefault()
- .getLaunchManager();
- ILaunchConfigurationType launchConfigurationType = launchManager
- .getLaunchConfigurationType("org.eclipse.jdt.launching.localJavaApplication");
- ILaunchConfigurationWorkingCopy wc = launchConfigurationType
- .newInstance(null, "ClientSample");
- wc.setAttribute("org.eclipse.debug.core.MAPPED_RESOURCE_TYPES", "1");
- wc.setAttribute("org.eclipse.jdt.launching.MAIN_TYPE",
- "org.example.www.helloworld.clientsample.ClientSample");
- wc.setAttribute("org.eclipse.jdt.launching.PROGRAM_ARGUMENTS", "Test");
- wc.setAttribute("org.eclipse.jdt.launching.PROJECT_ATTR", "ClientTest");
- wc.doSave();
- wc.launch(ILaunchManager.RUN_MODE, null);
- IConsoleManager consolemanager = getConsoleManager();
- checkText(consolemanager.getConsoles());
}
private void checkText(IConsole[] consoles) {
@@ -233,18 +146,11 @@
for (IConsole console : consoles) {
if (console.getName().contains("ClientSample")) {
int i = 0;
- while (i < 30
- && !isContainString(
- console,
- JBossWSCreationCoreMessages.Client_Sample_Run_Over)) {
- delay(1000);
+ while (i < 30&& !isContainString(console,JBossWSCreationCoreMessages.Client_Sample_Run_Over)) {
+ JBossWSCreationCoreTestUtils.delay(1000);
i++;
}
- assertTrue(
- ((TextConsole) console).getDocument().get(),
- isContainString(
- console,
- JBossWSCreationCoreMessages.Client_Sample_Run_Over));
+ assertTrue(((TextConsole) console).getDocument().get(),isContainString(console,JBossWSCreationCoreMessages.Client_Sample_Run_Over));
}
}
}
@@ -252,68 +158,4 @@
public static boolean isContainString(IConsole console, String str) {
return ((TextConsole) console).getDocument().get().contains(str);
}
-
- public static void delay(long durationInMilliseconds) {
- Display display = Display.getCurrent();
- if (display != null) {
- long t2 = System.currentTimeMillis() + durationInMilliseconds;
- while (System.currentTimeMillis() < t2) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- display.update();
- } else {
- try {
- Thread.sleep(durationInMilliseconds);
- } catch (InterruptedException e) {
- }
- }
- }
-
- public static IConsoleManager getConsoleManager() {
- IConsoleManager consolemanager = ConsolePlugin.getDefault()
- .getConsoleManager();
-
- consolemanager.addConsoleListener(new IConsoleListener() {
- public void consolesAdded(IConsole[] consoles) {
- for (int i = 0; i < consoles.length; i++) {
- ((AbstractConsole) consoles[i]).activate();
- }
-
- }
-
- public void consolesRemoved(IConsole[] consoles) {
- for (int i = 0; i < consoles.length; i++) {
- ((AbstractConsole) consoles[i]).destroy();
- }
-
- }
- });
- return consolemanager;
- }
-
- @Override
- IDataModel createJBossWSDataModel(boolean isServerSupplied) {
- IDataModel config = (IDataModel) new JBossWSFacetInstallDataModelProvider()
- .create();
- if (isServerSupplied) {
- config
- .setBooleanProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED,
- true);
- } else {
- config.setBooleanProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY,
- isDeployed);
- config.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID,
- RuntimeName);
- config.setStringProperty(
- IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME,
- getJBossWSHomeFolder().toString());
- }
- return config;
- }
-
}
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSTopDownCommandTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSTopDownCommandTest.java 2010-12-08 08:53:28 UTC (rev 27219)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/command/JBossWSTopDownCommandTest.java 2010-12-08 08:57:20 UTC (rev 27220)
@@ -11,6 +11,7 @@
package org.jboss.tools.ws.creation.core.test.command;
import java.io.IOException;
+import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
@@ -18,9 +19,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -30,100 +29,74 @@
import org.eclipse.jst.javaee.web.Servlet;
import org.eclipse.jst.javaee.web.ServletMapping;
import org.eclipse.jst.javaee.web.WebApp;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.ws.internal.wsrt.IWebService;
import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
-import org.jboss.tools.ws.core.classpath.JBossWSRuntime;
-import org.jboss.tools.ws.core.classpath.JBossWSRuntimeManager;
-import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
-import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.ws.creation.core.commands.ImplementationClassCreationCommand;
import org.jboss.tools.ws.creation.core.commands.InitialCommand;
import org.jboss.tools.ws.creation.core.commands.MergeWebXMLCommand;
import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand;
-import org.jboss.tools.ws.creation.core.data.ServiceModel;
import org.jboss.tools.ws.creation.ui.wsrt.JBossWebService;
@SuppressWarnings("restriction")
-public class JBossWSTopDownCommandTest extends AbstractJBossWSCommandTest {
- protected static final IWorkspace ws = ResourcesPlugin.getWorkspace();
- protected static final IWorkbench wb = PlatformUI.getWorkbench();
+public class JBossWSTopDownCommandTest extends AbstractJBossWSGenerationTest {
-
-
- private static final String RuntimeName;
- private static final boolean isDeployed;
-
- static String wsdlFileName = "hello_world.wsdl";
-
- static {
- RuntimeName = "testjbosswsruntime";
- isDeployed = false;
- }
-
public JBossWSTopDownCommandTest() {
}
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
- JBossWSRuntimeManager.getInstance().addRuntime(RuntimeName, getJBossWSHomeFolder().toString(), "", true);
//create jbossws web project
- fproject = createJBossWSProject("JBossWSTestProject", isServerSupplied());
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
-
+ fproject = createJBossWSProject("JBossWSTestProject");
+ wsdlFile = fproject.getProject().getFile(wsdlFileName);
+ model = createServiceModel();
assertTrue(wsdlFile.exists());
}
-
-
- protected void tearDown() throws Exception {
- // Wait until all jobs is finished to avoid delete project problems
- super.tearDown();
- resourcesToCleanup.clear();
- JBossWSRuntime runtime = JBossWSRuntimeManager.getInstance().findRuntimeByName(RuntimeName);
- JBossWSRuntimeManager.getInstance().removeRuntime(runtime);
+ public void testDeployResult() throws ExecutionException, CoreException, IOException{
+ doInitialCommand();
+ doCodeGenerationCommand();
+ doMergeWebXMLCommand();
+
+ fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+ publishWebProject();
+ startup(currentServer);
+ JobUtils.delay(12000);
+ assertTrue(currentServer.getModules().length > 0);
+ String webServiceUrl = "http://127.0.0.1:8080/JBossWSTestProject/Greeter?wsdl";
+ URL url = new URL(webServiceUrl);
+ URLConnection conn = url.openConnection();
+ assertEquals("unable to start JBoss server",IServer.STATE_STARTED, currentServer.getServerState());
+ conn.connect();
+ assertFalse("The url connection's status is "+ ((HttpURLConnection) conn).getResponseMessage(), "Ok".equals(((HttpURLConnection) conn).getResponseMessage()));
+ conn.getContent();
}
-
- public void testInitialCommand() throws CoreException, ExecutionException{
-
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- model.setCustomPackage("org.apache.hello_world_soap_http");
- //model.setWsdlURI(wsdlFile.getLocation().toOSString());
-
-
+ public void doInitialCommand() throws CoreException, ExecutionException{
WebServiceInfo info = new WebServiceInfo();
- info.setWsdlURL(wsdlFile.getLocation().toOSString());
+ info.setWsdlURL(wsdlFile.getLocationURI().toString());
IWebService ws = new JBossWebService(info);
//test initial command
InitialCommand cmdInitial = new InitialCommand(model, ws, WebServiceScenario.TOPDOWN);
IStatus status = cmdInitial.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
-
- assertEquals(wsdlFile.getLocation().toOSString(), model.getWsdlURI());
- assertEquals("", model.getCustomPackage());
-
+ assertEquals(wsdlFile.getLocationURI().toString(), model.getWsdlURI());
+ assertEquals("", model.getCustomPackage());
}
- public void testCodeGenerationCommand() throws ExecutionException{
-
- ServiceModel model = createServiceModel();
+ public void doCodeGenerationCommand() throws ExecutionException{
IProject project = fproject.getProject();
+
//test wsdl2Javacommand
WSDL2JavaCommand cmdW2j = new WSDL2JavaCommand(model);
IStatus status = cmdW2j.execute(null, null);
- assertTrue(status.getMessage(), status.getSeverity() != Status.ERROR);
-
+ assertTrue(status.getMessage(), status.getSeverity() != Status.ERROR);
assertTrue(project.getFile("src/org/apache/hello_world_soap_http/Greeter.java").exists());
// test ImplementationClassCreationCommand
@@ -137,17 +110,13 @@
cmdImpl = new ImplementationClassCreationCommand(model);
status = cmdImpl.execute(null, null);
assertTrue(status.getMessage(), status.getSeverity() != Status.ERROR);
- assertTrue("failed to generate implemenatation class", project.getFile("src/org/apache/hello_world_soap_http/GreeterImpl.java").exists());
-
-
+ assertTrue("failed to generate implemenatation class", project.getFile("src/org/apache/hello_world_soap_http/GreeterImpl.java").exists());
}
- public void testMergeWebXMLCommand() throws ExecutionException{
- ServiceModel model = createServiceModel();
+ public void doMergeWebXMLCommand() throws ExecutionException{
model.setGenerateImplementatoin(true);
- model.setUpdateWebxml(true);
- model.setWebProjectName(fproject.getProject().getName());
model.addServiceClasses("org.apache.hello_world_soap_http.GreeterImpl");
+
MergeWebXMLCommand cmdweb = new MergeWebXMLCommand(model);
IStatus status = cmdweb.execute(null, null);
assertTrue(status.getMessage(), status.isOK());
@@ -155,21 +124,18 @@
IProject project = fproject.getProject();
IFile webxml = project.getFile("WebContent/WEB-INF/web.xml");
assertTrue(webxml.exists());
- IModelProvider provider = ModelProviderManager
- .getModelProvider(project);
+ IModelProvider provider = ModelProviderManager.getModelProvider(project);
Object object = provider.getModelObject();
if (object instanceof WebApp) {
WebApp webApp = (WebApp) object;
assertTrue("failed to update web.xml ", webApp.getServlets().size() > 0);
Servlet servlet = (Servlet)webApp.getServlets().get(0);
- assertEquals("the servlet with the name 'Greeger' was not created", servlet.getServletName(), "Greeter");
- assertTrue("the servlet display names should contain 'Greeter'", servlet.getDisplayNames().contains("Greeter"));
+ assertEquals("the servlet with the name 'Greeter' was not created", servlet.getServletName(), "Greeter");
assertEquals("org.apache.hello_world_soap_http.GreeterImpl", servlet.getServletClass());
ServletMapping mapping = (ServletMapping)webApp.getServletMappings().get(0);
- assertTrue("url patterns should contain '/Greeter'", mapping.getUrlPatterns().contains("/Greeter"));
assertEquals("Greeter", mapping.getServletName());
- }else if(object instanceof org.eclipse.jst.j2ee.webapplication.WebApp){
+ }else if (object instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) object;
assertTrue("failed to update web.xml ", webApp.getServlets().size() > 0);
org.eclipse.jst.j2ee.webapplication.Servlet servlet = (org.eclipse.jst.j2ee.webapplication.Servlet)webApp.getServlets().get(0);
@@ -178,98 +144,10 @@
if(servlet.getWebType() instanceof ServletType){
ServletType webtype = (ServletType)servlet.getWebType();
assertEquals("org.apache.hello_world_soap_http.GreeterImpl", webtype.getClassName());
- }
-
+ }
org.eclipse.jst.j2ee.webapplication.ServletMapping mapping = (org.eclipse.jst.j2ee.webapplication.ServletMapping)webApp.getServletMappings().get(0);
assertEquals("url pattern: ","/Greeter", mapping.getUrlPattern());
assertEquals("Greeter", mapping.getServlet().getServletName());
- }
- //ServerType d; d.createServer(id, file, monitor)
-
+ }
}
-
- public void testDeployResult() throws ExecutionException, CoreException, IOException{
-
- //currentServer.start(ILaunchManager.RUN_MODE, new NullProgressMonitor());
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- model.setCustomPackage("org.apache.hello_world_soap_http");
- //model.setWsdlURI(wsdlFile.getLocation().toOSString());
-
-
- WebServiceInfo info = new WebServiceInfo();
- info.setWsdlURL(wsdlFile.getLocation().toOSString());
- IWebService ws = new JBossWebService(info);
-
- //test initial command
- AbstractDataModelOperation cmd = new InitialCommand(model, ws, WebServiceScenario.TOPDOWN);
- IStatus status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.getSeverity() != Status.ERROR);
-
- cmd = new WSDL2JavaCommand(model);
- status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.getSeverity() != Status.ERROR);
-
- cmd = new ImplementationClassCreationCommand(model);
- status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.getSeverity() != Status.ERROR);
-
- cmd = new MergeWebXMLCommand(model);
- status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
- fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
- publishWebProject();
-
- assertTrue(currentServer.getModules().length > 0);
- String webServiceUrl = "http://localhost:8080/JBossWSTestProject/Greeter?wsdl";
- URL url = new URL(webServiceUrl);
- URLConnection conn = url.openConnection();
-
- startup();
-
- assertEquals("unable to start JBoss server",IServer.STATE_STARTED, currentServer.getServerState());
-
- conn.connect();
- conn.getContent();
-
-
-
- }
-
- protected ServiceModel createServiceModel(){
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
- model.setWsdlURI(wsdlFile.getLocation().toOSString());
- model.setCustomPackage("org.apache.hello_world_soap_http");
-
- return model;
-
- }
-
-
- protected boolean isServerSupplied(){
- return false;
- }
-
-
-
- protected IDataModel createJBossWSDataModel( boolean isServerSupplied) {
- IDataModel config = (IDataModel) new JBossWSFacetInstallDataModelProvider().create();
- if(isServerSupplied){
- config.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED, true);
- }else{
- config.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY, isDeployed);
- config.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, RuntimeName);
- config.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, getJBossWSHomeFolder().toString());
- }
- return config;
- }
-
-
-
-
}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/util/JBossWSCreationCoreTestUtils.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/util/JBossWSCreationCoreTestUtils.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/src/org/jboss/tools/ws/creation/core/test/util/JBossWSCreationCoreTestUtils.java 2010-12-08 08:57:20 UTC (rev 27220)
@@ -0,0 +1,72 @@
+package org.jboss.tools.ws.creation.core.test.util;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jdt.core.IJavaModel;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.console.AbstractConsole;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleListener;
+import org.eclipse.ui.console.IConsoleManager;
+
+public class JBossWSCreationCoreTestUtils {
+
+ public static IJavaProject getJavaProjectByName(String projectName)
+ throws JavaModelException {
+
+ IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace()
+ .getRoot());
+ model.open(null);
+
+ IJavaProject[] projects = model.getJavaProjects();
+
+ for (IJavaProject proj : projects) {
+ if (proj.getProject().getName().equals(projectName)) {
+ return proj;
+ }
+ }
+
+ return null;
+ }
+
+ public static IConsoleManager getConsoleManager() {
+ IConsoleManager consolemanager = ConsolePlugin.getDefault()
+ .getConsoleManager();
+ consolemanager.addConsoleListener(new IConsoleListener() {
+ public void consolesAdded(IConsole[] consoles) {
+ for (int i = 0; i < consoles.length; i++) {
+ ((AbstractConsole) consoles[i]).activate();
+ }
+
+ }
+ public void consolesRemoved(IConsole[] consoles) {
+ for (int i = 0; i < consoles.length; i++) {
+ ((AbstractConsole) consoles[i]).destroy();
+ }
+
+ }
+ });
+ return consolemanager;
+ }
+
+ public static void delay(long durationInMilliseconds) {
+ Display display = Display.getCurrent();
+ if (display != null) {
+ long t2 = System.currentTimeMillis() + durationInMilliseconds;
+ while (System.currentTimeMillis() < t2) {
+ if (!display.readAndDispatch()) {
+ display.sleep();
+ }
+ }
+ display.update();
+ } else {
+ try {
+ Thread.sleep(durationInMilliseconds);
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+}
14 years
JBoss Tools SVN: r27219 - in trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects: ClientTest and 43 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2010-12-08 03:53:28 -0500 (Wed, 08 Dec 2010)
New Revision: 27219
Added:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.classpath
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.project
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/.jsdtscope
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.common.component
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/META-INF/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/WEB-INF/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/WEB-INF/lib/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/WEB-INF/web.xml
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/HelloWorld.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/HelloWorldService.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/ObjectFactory.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello2.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello2Response.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHelloResponse.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/clientsample/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/clientsample/ClientSample.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/package-info.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/jars/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/jars/jaxb-api.jar
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/jars/jbossws-native-jaxws.jar
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/HelloWorld.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/HelloWorldService.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/ObjectFactory.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello2.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello2Response.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHelloResponse.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/clientsample/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/clientsample/ClientSample.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/package-info.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.classpath
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.project
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/.jsdtscope
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.common.component
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/META-INF/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/WEB-INF/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/WEB-INF/lib/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/WEB-INF/web.xml
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/build/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/build/classes/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/hello_world.wsdl
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/src/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.classpath
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.project
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/.jsdtscope
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.common.component
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/META-INF/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/WEB-INF/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/WEB-INF/lib/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/WEB-INF/web.xml
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/classes/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/classes/org/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/classes/org/example/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/classes/org/example/www/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/classes/org/example/www/helloworld/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/classes/org/example/www/helloworld/HelloWorld.class
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/jars/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/jars/jbossws-native-jaxws.jar
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/org/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/org/example/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/org/example/www/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/org/example/www/helloworld/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/org/example/www/helloworld/HelloWorld.java
Modified:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/WebTest/.classpath
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/WebTest/.settings/org.eclipse.jdt.core.prefs
Log:
JBIDE-6581: add new test projects fro ws test
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.classpath 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="lib" path="jars/jbossws-native-jaxws.jar"/>
+ <classpathentry kind="lib" path="jars/jaxb-api.jar"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.project 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ClientTest</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/.jsdtscope
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/.jsdtscope (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/.jsdtscope 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.jdt.core.prefs 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,8 @@
+#Mon Dec 06 14:48:58 CST 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/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.common.component 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="ClientTest">
+ <wb-resource deploy-path="/" source-path="/WebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="ClientTest"/>
+ <property name="java-output-path" value="/ClientTest/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="java" version="1.5"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.jsdt.ui.superType.container 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/.settings/org.eclipse.wst.jsdt.ui.superType.name 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/META-INF/MANIFEST.MF 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/WebContent/WEB-INF/web.xml 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+ <display-name>ClientTest</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/HelloWorld.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/HelloWorld.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/HelloWorldService.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/HelloWorldService.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/ObjectFactory.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/ObjectFactory.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello2.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello2.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello2Response.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHello2Response.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHelloResponse.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/SayHelloResponse.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/clientsample/ClientSample.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/clientsample/ClientSample.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/package-info.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/build/classes/org/example/www/helloworld/package-info.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/jars/jaxb-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/jars/jaxb-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/jars/jbossws-native-jaxws.jar
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/jars/jbossws-native-jaxws.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/HelloWorld.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/HelloWorld.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/HelloWorld.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,50 @@
+
+package org.example.www.helloworld;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "HelloWorld", targetNamespace = "http://www.example.org/HelloWorld")
+public interface HelloWorld {
+
+
+ /**
+ *
+ * @param sayHelloRequest
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod(action = "http://www.example.org/HelloWorld/sayHello")
+ @WebResult(name = "sayHelloResponse", targetNamespace = "")
+ @RequestWrapper(localName = "sayHello", targetNamespace = "http://www.example.org/HelloWorld", className = "org.example.www.helloworld.SayHello")
+ @ResponseWrapper(localName = "sayHelloResponse", targetNamespace = "http://www.example.org/HelloWorld", className = "org.example.www.helloworld.SayHelloResponse")
+ public String sayHello(
+ @WebParam(name = "sayHelloRequest", targetNamespace = "")
+ String sayHelloRequest);
+
+ /**
+ *
+ * @param sayHelloRequest2
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod(action = "http://www.example.org/HelloWorld/sayHello2")
+ @WebResult(name = "sayHelloResponse2", targetNamespace = "")
+ @RequestWrapper(localName = "sayHello2", targetNamespace = "http://www.example.org/HelloWorld", className = "org.example.www.helloworld.SayHello2")
+ @ResponseWrapper(localName = "sayHello2Response", targetNamespace = "http://www.example.org/HelloWorld", className = "org.example.www.helloworld.SayHello2Response")
+ public String sayHello2(
+ @WebParam(name = "sayHelloRequest2", targetNamespace = "")
+ String sayHelloRequest2);
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/HelloWorldService.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/HelloWorldService.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/HelloWorldService.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,53 @@
+
+package org.example.www.helloworld;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.0
+ *
+ */
+@WebServiceClient(name = "HelloWorldService", targetNamespace = "http://www.example.org/HelloWorld", wsdlLocation = "http://localhost:8080/JavaFirstTestProject/HelloWorld?wsdl")
+public class HelloWorldService
+ extends Service
+{
+
+ private final static URL HELLOWORLDSERVICE_WSDL_LOCATION;
+
+ static {
+ URL url = null;
+ try {
+ url = new URL("http://localhost:8080/JavaFirstTestProject/HelloWorld?wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ HELLOWORLDSERVICE_WSDL_LOCATION = url;
+ }
+
+ public HelloWorldService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public HelloWorldService() {
+ super(HELLOWORLDSERVICE_WSDL_LOCATION, new QName("http://www.example.org/HelloWorld", "HelloWorldService"));
+ }
+
+ /**
+ *
+ * @return
+ * returns HelloWorld
+ */
+ @WebEndpoint(name = "HelloWorldPort")
+ public HelloWorld getHelloWorldPort() {
+ return (HelloWorld)super.getPort(new QName("http://www.example.org/HelloWorld", "HelloWorldPort"), HelloWorld.class);
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/ObjectFactory.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/ObjectFactory.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/ObjectFactory.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,107 @@
+
+package org.example.www.helloworld;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.example.www.helloworld package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _SayHello2_QNAME = new QName("http://www.example.org/HelloWorld", "sayHello2");
+ private final static QName _SayHello_QNAME = new QName("http://www.example.org/HelloWorld", "sayHello");
+ private final static QName _SayHello2Response_QNAME = new QName("http://www.example.org/HelloWorld", "sayHello2Response");
+ private final static QName _SayHelloResponse_QNAME = new QName("http://www.example.org/HelloWorld", "sayHelloResponse");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.example.www.helloworld
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link SayHello2Response }
+ *
+ */
+ public SayHello2Response createSayHello2Response() {
+ return new SayHello2Response();
+ }
+
+ /**
+ * Create an instance of {@link SayHello }
+ *
+ */
+ public SayHello createSayHello() {
+ return new SayHello();
+ }
+
+ /**
+ * Create an instance of {@link SayHelloResponse }
+ *
+ */
+ public SayHelloResponse createSayHelloResponse() {
+ return new SayHelloResponse();
+ }
+
+ /**
+ * Create an instance of {@link SayHello2 }
+ *
+ */
+ public SayHello2 createSayHello2() {
+ return new SayHello2();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link SayHello2 }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.example.org/HelloWorld", name = "sayHello2")
+ public JAXBElement<SayHello2> createSayHello2(SayHello2 value) {
+ return new JAXBElement<SayHello2>(_SayHello2_QNAME, SayHello2 .class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link SayHello }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.example.org/HelloWorld", name = "sayHello")
+ public JAXBElement<SayHello> createSayHello(SayHello value) {
+ return new JAXBElement<SayHello>(_SayHello_QNAME, SayHello.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link SayHello2Response }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.example.org/HelloWorld", name = "sayHello2Response")
+ public JAXBElement<SayHello2Response> createSayHello2Response(SayHello2Response value) {
+ return new JAXBElement<SayHello2Response>(_SayHello2Response_QNAME, SayHello2Response.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link SayHelloResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://www.example.org/HelloWorld", name = "sayHelloResponse")
+ public JAXBElement<SayHelloResponse> createSayHelloResponse(SayHelloResponse value) {
+ return new JAXBElement<SayHelloResponse>(_SayHelloResponse_QNAME, SayHelloResponse.class, null, value);
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,60 @@
+
+package org.example.www.helloworld;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for sayHello complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="sayHello">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="sayHelloRequest" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHello", propOrder = {
+ "sayHelloRequest"
+})
+public class SayHello {
+
+ protected String sayHelloRequest;
+
+ /**
+ * Gets the value of the sayHelloRequest property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSayHelloRequest() {
+ return sayHelloRequest;
+ }
+
+ /**
+ * Sets the value of the sayHelloRequest property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSayHelloRequest(String value) {
+ this.sayHelloRequest = value;
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello2.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello2.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello2.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,60 @@
+
+package org.example.www.helloworld;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for sayHello2 complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="sayHello2">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="sayHelloRequest2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHello2", propOrder = {
+ "sayHelloRequest2"
+})
+public class SayHello2 {
+
+ protected String sayHelloRequest2;
+
+ /**
+ * Gets the value of the sayHelloRequest2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSayHelloRequest2() {
+ return sayHelloRequest2;
+ }
+
+ /**
+ * Sets the value of the sayHelloRequest2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSayHelloRequest2(String value) {
+ this.sayHelloRequest2 = value;
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello2Response.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello2Response.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHello2Response.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,60 @@
+
+package org.example.www.helloworld;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for sayHello2Response complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="sayHello2Response">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="sayHelloResponse2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHello2Response", propOrder = {
+ "sayHelloResponse2"
+})
+public class SayHello2Response {
+
+ protected String sayHelloResponse2;
+
+ /**
+ * Gets the value of the sayHelloResponse2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSayHelloResponse2() {
+ return sayHelloResponse2;
+ }
+
+ /**
+ * Sets the value of the sayHelloResponse2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSayHelloResponse2(String value) {
+ this.sayHelloResponse2 = value;
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHelloResponse.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHelloResponse.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/SayHelloResponse.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,60 @@
+
+package org.example.www.helloworld;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for sayHelloResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="sayHelloResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="sayHelloResponse" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHelloResponse", propOrder = {
+ "sayHelloResponse"
+})
+public class SayHelloResponse {
+
+ protected String sayHelloResponse;
+
+ /**
+ * Gets the value of the sayHelloResponse property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSayHelloResponse() {
+ return sayHelloResponse;
+ }
+
+ /**
+ * Sets the value of the sayHelloResponse property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSayHelloResponse(String value) {
+ this.sayHelloResponse = value;
+ }
+
+}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/clientsample/ClientSample.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/clientsample/ClientSample.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/clientsample/ClientSample.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,19 @@
+package org.example.www.helloworld.clientsample;
+
+import org.example.www.helloworld.*;
+
+public class ClientSample {
+
+ public static void main(String[] args) {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ HelloWorldService service1 = new HelloWorldService();
+ System.out.println("Create Web Service...");
+ HelloWorld port1 = service1.getHelloWorldPort();
+ System.out.println("Create Web Service Operation...");
+ System.out.println("Server said: " + port1.sayHello(args[0]));
+ System.out.println("Server said: " + port1.sayHello2(args[0]));
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/package-info.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/package-info.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/src/org/example/www/helloworld/package-info.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,2 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://www.example.org/HelloWorld")
+package org.example.www.helloworld;
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.classpath 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.project 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>JBossWSTestProject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/.jsdtscope
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/.jsdtscope (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/.jsdtscope 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.jdt.core.prefs 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,8 @@
+#Mon Dec 06 15:06:48 CST 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/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.common.component 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="JBossWSTestProject">
+ <wb-resource deploy-path="/" source-path="/WebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="JBossWSTestProject"/>
+ <property name="java-output-path" value="/JBossWSTestProject/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="java" version="1.5"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/META-INF/MANIFEST.MF 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/WebContent/WEB-INF/web.xml 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+ <display-name>JBossWSTestProject</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/hello_world.wsdl
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/hello_world.wsdl (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/hello_world.wsdl 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://apache.org/hello_world_soap_http"
+ xmlns:x1="http://apache.org/hello_world_soap_http/types"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <schema targetNamespace="http://apache.org/hello_world_soap_http/types"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://apache.org/hello_world_soap_http/types"
+ elementFormDefault="qualified">
+ <simpleType name="MyStringType">
+ <restriction base="string">
+ <maxLength value="30" />
+ </restriction>
+ </simpleType>
+
+ <element name="sayHi">
+ <complexType/>
+ </element>
+ <element name="sayHiResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMe">
+ <complexType>
+ <sequence>
+ <element name="requestType" type="tns:MyStringType"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeOneWay">
+ <complexType>
+ <sequence>
+ <element name="requestType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="pingMe">
+ <complexType/>
+ </element>
+ <element name="pingMeResponse">
+ <complexType/>
+ </element>
+ <element name="faultDetail">
+ <complexType>
+ <sequence>
+ <element name="minor" type="short"/>
+ <element name="major" type="short"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+ <wsdl:message name="sayHiRequest">
+ <wsdl:part element="x1:sayHi" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="sayHiResponse">
+ <wsdl:part element="x1:sayHiResponse" name="out"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeRequest">
+ <wsdl:part element="x1:greetMe" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeResponse">
+ <wsdl:part element="x1:greetMeResponse" name="out"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeOneWayRequest">
+ <wsdl:part element="x1:greetMeOneWay" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeRequest">
+ <wsdl:part name="in" element="x1:pingMe"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeResponse">
+ <wsdl:part name="out" element="x1:pingMeResponse"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeFault">
+ <wsdl:part name="faultDetail" element="x1:faultDetail"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Greeter">
+ <wsdl:operation name="sayHi">
+ <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+ <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMe">
+ <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+ <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMeOneWay">
+ <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="pingMe">
+ <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+ <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+ <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="sayHi">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="sayHiRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sayHiResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMe">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="greetMeResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMeOneWay">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeOneWayRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+
+ <wsdl:operation name="pingMe">
+ <soap:operation style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="pingMeFault">
+ <soap:fault name="pingMeFault" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ </wsdl:binding>
+ <wsdl:service name="SOAPService">
+ <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+ <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
+
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.classpath (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.classpath 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="lib" path="jars/jbossws-native-jaxws.jar"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.project (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.project 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>JavaFirstTestProject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/.jsdtscope
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/.jsdtscope (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/.jsdtscope 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.jdt.core.prefs 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,8 @@
+#Mon Dec 06 15:05:06 CST 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/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.common.component 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="JavaFirstTestProject">
+ <wb-resource deploy-path="/" source-path="/WebContent"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="JavaFirstTestProject"/>
+ <property name="java-output-path" value="/JavaFirstTestProject/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="java" version="1.5"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.container 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/.settings/org.eclipse.wst.jsdt.ui.superType.name 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/META-INF/MANIFEST.MF 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/WebContent/WEB-INF/web.xml 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+ <display-name>JavaFirstTestProject</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/classes/org/example/www/helloworld/HelloWorld.class
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/build/classes/org/example/www/helloworld/HelloWorld.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/jars/jbossws-native-jaxws.jar
===================================================================
(Binary files differ)
Property changes on: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/jars/jbossws-native-jaxws.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/org/example/www/helloworld/HelloWorld.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/org/example/www/helloworld/HelloWorld.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/src/org/example/www/helloworld/HelloWorld.java 2010-12-08 08:53:28 UTC (rev 27219)
@@ -0,0 +1,25 @@
+
+package org.example.www.helloworld;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+
+@WebService(name = "HelloWorld", targetNamespace = "http://www.example.org/HelloWorld")
+public class HelloWorld{
+
+
+ @WebMethod(action = "http://www.example.org/HelloWorld/sayHello")
+ @WebResult(name = "sayHelloResponse", partName = "sayHelloResponse")
+ public String sayHello(@WebParam(name = "sayHelloRequest", partName = "sayHelloRequest") String str){
+ return "Hello World";
+ }
+
+ @WebMethod(action = "http://www.example.org/HelloWorld/sayHello2")
+ @WebResult(name = "sayHelloResponse2", partName = "sayHelloResponse2")
+ public String sayHello2(@WebParam(name = "sayHelloRequest2", partName = "sayHelloRequest2") String str){
+ return "Hello qq";
+ }
+
+}
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/WebTest/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/WebTest/.classpath 2010-12-08 08:48:35 UTC (rev 27218)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/WebTest/.classpath 2010-12-08 08:53:28 UTC (rev 27219)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_15">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="owner.project.facets" value="jst.java"/>
</attributes>
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/WebTest/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/WebTest/.settings/org.eclipse.jdt.core.prefs 2010-12-08 08:48:35 UTC (rev 27218)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/WebTest/.settings/org.eclipse.jdt.core.prefs 2010-12-08 08:53:28 UTC (rev 27219)
@@ -1,5 +1,6 @@
-#Wed Apr 07 14:51:03 CST 2010
+#Mon Dec 06 15:08:41 CST 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
14 years
JBoss Tools SVN: r27218 - trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2010-12-08 03:48:35 -0500 (Wed, 08 Dec 2010)
New Revision: 27218
Removed:
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/ClientTest/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JBossWSTestProject/
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/projects/JavaFirstTestProject/
Log:
JBIDE-6581: remove the test projects from ws test
14 years