JBoss Tools SVN: r30562 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment.detyped and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-13 13:45:07 -0400 (Wed, 13 Apr 2011)
New Revision: 30562
Added:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/MinimalisticStandaloneDeployer.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/MinimalisticDeployerIntegrationTest.java
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
Log:
added minimalistic deployer which does not use deployment plan nor is able to accumulate operations
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-13 17:40:25 UTC (rev 30561)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-13 17:45:07 UTC (rev 30562)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar" sourcepath="jboss-threads-2.0.0.CR8-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar" sourcepath="/home/adietish/jboss-workspaces/jboss-tools/jbosstools-src/jboss-threads-2.0.0.CR8-sources.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="/jboss-as-controller-client"/>
<classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="/jboss-as-protocol"/>
- <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar" sourcepath="/home/adietish/jboss-workspaces/jboss-tools/jbosstools-src/jboss-dmr-1.0.0.Beta5-sources.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta3.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath 2011-04-13 17:40:25 UTC (rev 30561)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath 2011-04-13 17:45:07 UTC (rev 30562)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta3.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="/jboss-as-cli"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="/jboss-as-controller-client"/>
<classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar" sourcepath="/home/adietish/jboss-workspaces/jboss-tools/jbosstools-src/jboss-dmr-1.0.0.Beta5-sources.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/MinimalisticStandaloneDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/MinimalisticStandaloneDeployer.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/MinimalisticStandaloneDeployer.java 2011-04-13 17:45:07 UTC (rev 30562)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.as7.deployment.detyped;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.concurrent.CancellationException;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.controller.client.OperationBuilder;
+import org.jboss.as.protocol.StreamUtils;
+import org.jboss.dmr.ModelNode;
+
+/**
+ * @author André Dietisheim
+ */
+public class MinimalisticStandaloneDeployer {
+
+ public static void undeploy(File file, String host, int port) throws CancellationException, IOException {
+ ModelControllerClient client = ModelControllerClient.Factory.create(host, port);
+
+ String name = file.getName();
+
+ // undeploy
+ ModelNode request = new ModelNode();
+ request.get("operation").set("undeploy");
+ request.get("address").add("deployment", name);
+ ModelNode result = client.execute(request);
+
+ // remove
+ request = new ModelNode();
+ request.get("operation").set("remove");
+ request.get("address").add("deployment", name);
+ result = client.execute(request);
+
+ StreamUtils.safeClose(client);
+ }
+
+ public static void deploy(File file, String host, int port) throws CancellationException, IOException {
+ ModelControllerClient client = ModelControllerClient.Factory.create(host, port);
+
+ String name = file.getName();
+
+
+ ModelNode request = new ModelNode();
+ request.get("operation").set("add");
+ request.get("address").add("deployment", name);
+ request.get("enabled").set(true);
+
+ OperationBuilder op = OperationBuilder.Factory.create(request);
+ op.addInputStream(new BufferedInputStream(new FileInputStream(file)));
+ request.get("input-stream-index").set(0);
+
+ ModelNode result = client.execute(op.build());
+
+ StreamUtils.safeClose(client);
+ }
+
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/MinimalisticStandaloneDeployer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/MinimalisticDeployerIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/MinimalisticDeployerIntegrationTest.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/MinimalisticDeployerIntegrationTest.java 2011-04-13 17:45:07 UTC (rev 30562)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.as7.deployment.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.ide.eclipse.as7.deployment.DeployerException;
+import org.jboss.ide.eclipse.as7.deployment.StandaloneTypedOperations;
+import org.jboss.ide.eclipse.as7.deployment.detyped.MinimalisticStandaloneDeployer;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ *
+ * @author André Dietisheim
+ */
+public class MinimalisticDeployerIntegrationTest {
+
+ private static final String WAR_FOLDER = "/wars/";
+ private static final String BUNDLE_ID = "org.jboss.ide.eclipse.as7.deployment.tests";
+
+ private static final int WEBAPP_RESPONSE_TIMEOUT = 10 * 1024;
+
+ private static final String HOST = "localhost";
+ private static final int MGMT_PORT = 9999;
+ private static final int WEB_PORT = 8080;
+
+ @Test
+ public void canDeploy() throws Exception {
+ File warFile = getWarFile("minimalistic.war");
+ try {
+ MinimalisticStandaloneDeployer.deploy(warFile, HOST, MGMT_PORT);
+
+ String response = getServerResponse(new URL(
+ MessageFormat.format(
+ "http://{0}:{1}/{2}", HOST, String.valueOf(WEB_PORT), "minimalistic")));
+ assertTrue(response.indexOf("minimalistic") >= 0);
+
+ } finally {
+ quietlyUndeploy(warFile);
+ }
+ }
+
+ @Test(expected = DeployerException.class)
+ public void cannotDeployWarTwice() throws Exception {
+ StandaloneTypedOperations deployer = null;
+ File warFile = getWarFile("minimalistic.war");
+ try {
+ deployer = new StandaloneTypedOperations(HOST, MGMT_PORT);
+ deployer.deploy(warFile).execute();
+ deployer.deploy(warFile).execute();
+ } finally {
+ quietlyUndeploy(warFile);
+ }
+ }
+
+ private File getWarFile(String name) throws URISyntaxException, IOException {
+ Bundle bundle = Platform.getBundle(BUNDLE_ID);
+ URL entryUrl = bundle.getEntry(WAR_FOLDER + name);
+ return new File(FileLocator.resolve(entryUrl).toURI());
+ }
+
+ private String getServerResponse(URL url) throws IOException {
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setUseCaches(false);
+ connection.setDoInput(true);
+ connection.setAllowUserInteraction(false);
+ connection.setConnectTimeout(WEBAPP_RESPONSE_TIMEOUT);
+ connection.setInstanceFollowRedirects(true);
+ connection.setDoOutput(false);
+ BufferedInputStream in = new BufferedInputStream(connection.getInputStream());
+ return toString(in);
+ }
+
+ private String toString(InputStream in) throws IOException {
+ StringWriter writer = new StringWriter();
+ for (int data = -1; ((data = in.read()) != -1);) {
+ writer.write(data);
+ }
+ return writer.toString();
+ }
+
+ private void quietlyUndeploy(File file) {
+ try {
+ MinimalisticStandaloneDeployer.undeploy(file, HOST, MGMT_PORT);
+ } catch (Exception e) {
+ e.printStackTrace();
+ // ignore
+ }
+ }
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/MinimalisticDeployerIntegrationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 7 months
JBoss Tools SVN: r30561 - in trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui: commands and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-04-13 13:40:25 -0400 (Wed, 13 Apr 2011)
New Revision: 30561
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/SetOnEventVariableTypeCommand.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/InvokeImplSection.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/util/ModelHelper.java
Log:
https://issues.jboss.org/browse/JBIDE-8305
added support for selecting an "element" for OnEvent handler
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java 2011-04-13 16:31:30 UTC (rev 30560)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/Messages.java 2011-04-13 17:40:25 UTC (rev 30561)
@@ -458,6 +458,11 @@
public static String InvokeImplDetails_Partner__10;
public static String InvokeImplDetails_Request_3_Plain;
public static String InvokeImplDetails_Response_4_Plain;
+ // https://issues.jboss.org/browse/JBIDE-8305
+ public static String InvokeImplDetails_MessageType;
+ public static String InvokeImplDetails_Element;
+ public static String InvokeImplDetails_MessageTypeOrElement;
+
public static String InvokeImplSection_None_1;
public static String JoinConditionSection_Create_a_New_Condition_3;
public static String JoinConditionSection_No_condition_specified_1;
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/SetOnEventVariableTypeCommand.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/SetOnEventVariableTypeCommand.java 2011-04-13 16:31:30 UTC (rev 30560)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/commands/SetOnEventVariableTypeCommand.java 2011-04-13 17:40:25 UTC (rev 30561)
@@ -15,32 +15,41 @@
import org.eclipse.wst.wsdl.Input;
import org.eclipse.wst.wsdl.Message;
import org.eclipse.wst.wsdl.Operation;
+import org.eclipse.wst.wsdl.Part;
+import org.eclipse.xsd.XSDElementDeclaration;
-public class SetOnEventVariableTypeCommand extends AutoUndoCommand {
+public class SetOnEventVariableTypeCommand extends SetCommand {
- OnEvent onEvent;
-
public SetOnEventVariableTypeCommand(OnEvent onEvent) {
- super(onEvent);
- this.onEvent = onEvent;
+ super(onEvent,null);
}
@Override
public void doExecute() {
- if (onEvent.getVariable() == null) {
- onEvent.setMessageType(null);
- } else {
- Message message = null;
- if (onEvent.getOperation() != null) {
- Operation op = onEvent.getOperation();
- if (op != null) {
- Input input = op.getEInput();
- if (input != null) {
- message = input.getEMessage();
+ if (fTarget instanceof OnEvent) {
+ OnEvent onEvent = (OnEvent) fTarget;
+ if (onEvent.getVariable() == null) {
+ onEvent.setMessageType(null);
+ } else {
+ if (fNewValue instanceof XSDElementDeclaration) {
+ onEvent.setMessageType(null);
+ onEvent.setXSDElement((XSDElementDeclaration)fNewValue);
+ }
+ else {
+ Message message = null;
+ if (onEvent.getOperation() != null) {
+ Operation op = onEvent.getOperation();
+ if (op != null) {
+ Input input = op.getEInput();
+ if (input != null) {
+ message = input.getEMessage();
+ }
+ }
}
+ onEvent.setMessageType(message);
+ onEvent.setXSDElement(null);
}
}
- onEvent.setMessageType(message);
}
}
-}
+}
\ No newline at end of file
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2011-04-13 16:31:30 UTC (rev 30560)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/messages.properties 2011-04-13 17:40:25 UTC (rev 30561)
@@ -355,6 +355,9 @@
InvokeImplDetails_Partner__10=Par&tner Link\:
InvokeImplDetails_Request_3_Plain=Request
InvokeImplDetails_Response_4_Plain=Response
+InvokeImplDetails_MessageType=Message Type\:
+InvokeImplDetails_Element=Element\:
+InvokeImplDetails_MessageTypeOrElement=Message/Element\:
InvokeImplSection_None_1=(none)
InvokeImplSection_0=Create Global Partner Link.
InvokeImplSection_1=Create Local Partner Link.
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/InvokeImplSection.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/InvokeImplSection.java 2011-04-13 16:31:30 UTC (rev 30560)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/InvokeImplSection.java 2011-04-13 17:40:25 UTC (rev 30561)
@@ -102,8 +102,10 @@
import org.eclipse.wst.wsdl.Message;
import org.eclipse.wst.wsdl.Operation;
import org.eclipse.wst.wsdl.Output;
+import org.eclipse.wst.wsdl.Part;
import org.eclipse.wst.wsdl.PortType;
import org.eclipse.wst.wsdl.WSDLFactory;
+import org.eclipse.xsd.XSDElementDeclaration;
/**
* Details section for the Partner/PortType/Operation properties of a
@@ -138,6 +140,9 @@
private Text faultText;
// https://issues.jboss.org/browse/JBIDE-7861
private boolean ignoreQuickPickSelection = false;
+ // https://issues.jboss.org/browse/JBIDE-8305
+ private Label messageOrElementLabel;
+ private Text messageOrElementText;
private IControlContentAdapter fTextContentAdapter = new TextContentAdapter() {
@Override
@@ -216,11 +221,13 @@
updatePartnerWidgets();
updatePortTypeWidgets();
updateOperationWidgets();
+ updateMessageOrElementWidgets(); // https://issues.jboss.org/browse/JBIDE-8305
updateFaultWidgets();
} else if (ModelHelper.isOperationAffected(input, n)) {
upp = true;
updatePortTypeWidgets();
- updateOperationWidgets();
+ updateOperationWidgets();
+ updateMessageOrElementWidgets(); // https://issues.jboss.org/browse/JBIDE-8305
updateFaultWidgets();
} else {
updateFaultWidgets();
@@ -265,6 +272,7 @@
updatePartnerWidgets();
updatePortTypeWidgets();
updateOperationWidgets();
+ updateMessageOrElementWidgets(); // https://issues.jboss.org/browse/JBIDE-8305
updateFaultWidgets();
}
@@ -654,8 +662,40 @@
return composite;
}
+ // https://issues.jboss.org/browse/JBIDE-8305
+ private Composite createMessageOrElementWidgets(Composite top, Composite parent) {
+ FlatFormData data;
+
+ final Composite composite = createFlatFormComposite(parent);
+ data = new FlatFormData();
+ if (top == null) {
+ data.top = new FlatFormAttachment(0, IDetailsAreaConstants.VSPACE);
+ } else {
+ data.top = new FlatFormAttachment(top, IDetailsAreaConstants.VSPACE );
+ }
+ data.left = new FlatFormAttachment(0, IDetailsAreaConstants.HSPACE);
+ data.right = new FlatFormAttachment(SPLIT_POINT, -SPLIT_POINT_OFFSET);
+ composite.setLayoutData(data);
+
+ messageOrElementLabel = fWidgetFactory.createLabel(composite, Messages.InvokeImplDetails_MessageTypeOrElement);
+ messageOrElementText = fWidgetFactory.createText(composite,EMPTY_STRING,SWT.NONE);
+ messageOrElementText.setEditable(false); // read-only text for visual feedback of Quick Pick tree selection
+
+
+ data = new FlatFormData();
+ data.left = new FlatFormAttachment(0, BPELUtil.calculateLabelWidth(messageOrElementLabel, STANDARD_LABEL_WIDTH_SM));
+ data.right = new FlatFormAttachment(operationButton, 0);
+ messageOrElementText.setLayoutData(data);
+
+ data = new FlatFormData();
+ data.left = new FlatFormAttachment(0, 0);
+ data.right = new FlatFormAttachment(messageOrElementText, -IDetailsAreaConstants.HSPACE);
+ data.top = new FlatFormAttachment(messageOrElementText, 0, SWT.CENTER);
+ messageOrElementLabel.setLayoutData(data);
+
+ return composite;
+ }
-
// protected Composite createInputVariableWidgets(Composite top, Composite parent) {
// FlatFormData data;
//
@@ -1135,7 +1175,10 @@
quickPickTreeViewer.setLabelProvider(new ModelTreeLabelProvider());
quickPickTreeViewer.addFilter( fPartnerRoleFilter );
quickPickTreeViewer.setInput ( null );
- quickPickTreeViewer.setAutoExpandLevel(3);
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // show tree down to message part level so that tree node highlight works
+ // when the tree viewer is constructed.
+ quickPickTreeViewer.setAutoExpandLevel(5);
// end tree viewer for variable structure
data = new FlatFormData();
@@ -1175,7 +1218,7 @@
Composite ref = createPartnerWidgets(null,composite);
ref = createPortTypeWidgets(ref, composite);
ref = createOperationWidgets(ref,composite);
-
+ ref = createMessageOrElementWidgets(ref,composite); // https://issues.jboss.org/browse/JBIDE-8305
ref = createFaultComposite ( ref, composite );
@@ -1297,6 +1340,13 @@
if (obj!=partnerLink)
return false;
}
+ // https://issues.jboss.org/browse/JBIDE-8305
+ else if (obj instanceof Input) {
+ obj = ModelHelper.getMessageType(obj);
+ }
+ else if (obj instanceof Part) {
+ obj = ModelHelper.getVariableTypeFrom(obj);
+ }
if (model==obj) {
quickPickTree.setSelection(item);
return true;
@@ -1337,8 +1387,50 @@
} else {
operationText.setText ( EMPTY_STRING );
}
+ if (getInput() instanceof OnEvent) {
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // show the message type or message part in the quick pick tree
+ OnEvent onEvent = (OnEvent)getInput();
+ Message message = onEvent.getMessageType();
+ if (message!=null) {
+ updateQuickPickSelection(message);
+ }
+ else {
+ XSDElementDeclaration element = onEvent.getXSDElement();
+ if (element!=null)
+ updateQuickPickSelection(element);
+ }
+ }
}
+ // https://issues.jboss.org/browse/JBIDE-8305
+ private void updateMessageOrElementWidgets() {
+ boolean visible = (getInput() instanceof OnEvent);
+ if (visible) {
+ OnEvent onEvent = (OnEvent)getInput();
+ String text = "";
+ String label = Messages.InvokeImplDetails_MessageTypeOrElement;
+ if (onEvent.getVariable()!=null) {
+ Message message = onEvent.getMessageType();
+ if (message!=null) {
+ text = message.getQName().getLocalPart();
+ label = Messages.InvokeImplDetails_MessageType;
+ }
+ else {
+ XSDElementDeclaration element = onEvent.getXSDElement();
+ if (element!=null) {
+ text = element.getName();
+ label = Messages.InvokeImplDetails_Element;
+ }
+ }
+ }
+ messageOrElementText.setText(text);
+ messageOrElementLabel.setText(label);
+ }
+ messageOrElementLabel.setVisible(visible);
+ messageOrElementText.setVisible(visible);
+ }
+
/**
* replyFaultEnabled() Checks if the active activity is a reply activity and
* has a fault name
@@ -1684,7 +1776,8 @@
List cmdList = basicCommandList( input , null, null);
PartnerLink pl = null;
- Operation op = null;
+ Operation op = null;
+ Part part = null;
SetCommand setCommand = null;
for (int i=0,j=path.getSegmentCount(); i < j; i++) {
@@ -1726,10 +1819,20 @@
// attempt to locate a variable matching the type
alterCommands (cmdList,input,pl,op,(Input) op.getInput() );
alterCommands (cmdList,input,pl,op,(Output)op.getOutput() );
-
- } else {
- break;
- }
+
+ } else if (model instanceof Part) {
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // if a message part was selected, set the OnEvent "element" attribute
+ part = (Part) model;
+ setCommand = (SetCommand) ListMap.Find ( cmdList, new ListMap.Visitor() {
+ public Object visit(Object obj) {
+ return (obj instanceof SetOnEventVariableTypeCommand ? obj : ListMap.IGNORE);
+ }
+ });
+ if (setCommand!=null)
+ setCommand.setNewValue( part.getElementDeclaration() );
+
+ }
// System.out.println( "segment[" + i + "]=" + path.getSegment( i ));
}
@@ -1799,7 +1902,10 @@
}
variable.setName ( name );
variable.setMessageType( msg );
- cmds.add(0, new AddVariableCommand(input, variable));
+ // https://issues.jboss.org/browse/JBIDE-8305
+ // don't create a new variable for OnEvent - this is an "implicit" variable
+ if (input instanceof OnEvent == false)
+ cmds.add(0, new AddVariableCommand(input, variable));
}
SetVariableCommand cmd = (SetVariableCommand) ListMap.Find(cmds, new ListMap.Visitor() {
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/util/ModelHelper.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/util/ModelHelper.java 2011-04-13 16:31:30 UTC (rev 30560)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/util/ModelHelper.java 2011-04-13 17:40:25 UTC (rev 30561)
@@ -883,6 +883,13 @@
if (context instanceof PropertyAlias) {
return (Message)((PropertyAlias)context).getMessageType();
}
+ // https://issues.jboss.org/browse/JBIDE-8305
+ if (context instanceof OnEvent) {
+ return (Message)((OnEvent)context).getMessageType();
+ }
+ if (context instanceof org.eclipse.wst.wsdl.Input) {
+ return (Message)((org.eclipse.wst.wsdl.Input)context).getMessage();
+ }
throw new IllegalArgumentException();
}
13 years, 7 months
JBoss Tools SVN: r30559 - in trunk/xulrunner2: plugins/org.mozilla.xulrunner.cocoa.macosx and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-13 12:20:35 -0400 (Wed, 13 Apr 2011)
New Revision: 30559
Added:
trunk/xulrunner2/features/org.mozilla.xulrunner.feature/.project
trunk/xulrunner2/plugins/org.mozilla.xulrunner.cocoa.macosx/.project
trunk/xulrunner2/plugins/org.mozilla.xulrunner.cocoa.macosx/xulrunner/plugins/
trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/.project
trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/xulrunner/plugins/
trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/.project
trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/xulrunner/plugins/
trunk/xulrunner2/plugins/org.mozilla.xulrunner.win32.win32.x86/.project
Log:
check in rest of Xulrunner2 incomplete commit
Added: trunk/xulrunner2/features/org.mozilla.xulrunner.feature/.project
===================================================================
--- trunk/xulrunner2/features/org.mozilla.xulrunner.feature/.project (rev 0)
+++ trunk/xulrunner2/features/org.mozilla.xulrunner.feature/.project 2011-04-13 16:20:35 UTC (rev 30559)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.mozilla.xulrunner.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/xulrunner2/plugins/org.mozilla.xulrunner.cocoa.macosx/.project
===================================================================
--- trunk/xulrunner2/plugins/org.mozilla.xulrunner.cocoa.macosx/.project (rev 0)
+++ trunk/xulrunner2/plugins/org.mozilla.xulrunner.cocoa.macosx/.project 2011-04-13 16:20:35 UTC (rev 30559)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.mozilla.xulrunner.cocoa.macosx</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/.project
===================================================================
--- trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/.project (rev 0)
+++ trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/.project 2011-04-13 16:20:35 UTC (rev 30559)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.mozilla.xulrunner.gtk.linux.x86</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/.project
===================================================================
--- trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/.project (rev 0)
+++ trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/.project 2011-04-13 16:20:35 UTC (rev 30559)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.mozilla.xulrunner.gtk.linux.x86_64</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/xulrunner2/plugins/org.mozilla.xulrunner.win32.win32.x86/.project
===================================================================
--- trunk/xulrunner2/plugins/org.mozilla.xulrunner.win32.win32.x86/.project (rev 0)
+++ trunk/xulrunner2/plugins/org.mozilla.xulrunner.win32.win32.x86/.project 2011-04-13 16:20:35 UTC (rev 30559)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.mozilla.xulrunner.win32.win32.x86</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
13 years, 7 months
JBoss Tools SVN: r30557 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-13 09:45:30 -0400 (Wed, 13 Apr 2011)
New Revision: 30557
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/StandaloneDetypedOperations.java
Log:
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/StandaloneDetypedOperations.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/StandaloneDetypedOperations.java 2011-04-13 13:31:38 UTC (rev 30556)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/StandaloneDetypedOperations.java 2011-04-13 13:45:30 UTC (rev 30557)
@@ -75,6 +75,9 @@
} catch (Exception e) {
throw new DeployerException(e);
}
+ finally {
+ dispose();
+ }
}
public void dispose() {
13 years, 7 months
JBoss Tools SVN: r30556 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-13 09:31:38 -0400 (Wed, 13 Apr 2011)
New Revision: 30556
Removed:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-as-cli-7.0.0.Beta3-SNAPSHOT-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-dmr-1.0.0.Beta5-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-threads-2.0.0.CR8-sources.jar
Log:
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-as-cli-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-dmr-1.0.0.Beta5-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-threads-2.0.0.CR8-sources.jar
===================================================================
(Binary files differ)
13 years, 7 months
JBoss Tools SVN: r30555 - in workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-13 09:30:51 -0400 (Wed, 13 Apr 2011)
New Revision: 30555
Added:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-logging-3.0.0.Beta3.jar
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties
Log:
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath 2011-04-13 13:30:26 UTC (rev 30554)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath 2011-04-13 13:30:51 UTC (rev 30555)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta3.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF 2011-04-13 13:30:26 UTC (rev 30554)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF 2011-04-13 13:30:51 UTC (rev 30555)
@@ -10,7 +10,8 @@
jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,
jboss-dmr-1.0.0.Beta5.jar,
jboss-marshalling-1.3.0.CR8.jar,
- jboss-threads-2.0.0.CR8.jar
+ jboss-threads-2.0.0.CR8.jar,
+ jboss-logging-3.0.0.Beta3.jar
Export-Package: org.jboss.as.cli,
org.jboss.as.cli.handlers,
org.jboss.as.cli.operation,
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties 2011-04-13 13:30:26 UTC (rev 30554)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties 2011-04-13 13:30:51 UTC (rev 30555)
@@ -7,4 +7,5 @@
jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,\
jboss-dmr-1.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8.jar,\
- jboss-threads-2.0.0.CR8.jar
+ jboss-threads-2.0.0.CR8.jar,\
+ jboss-logging-3.0.0.Beta3.jar
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-logging-3.0.0.Beta3.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-logging-3.0.0.Beta3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
13 years, 7 months
JBoss Tools SVN: r30554 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-13 09:30:26 -0400 (Wed, 13 Apr 2011)
New Revision: 30554
Removed:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-dmr-1.0.0.Beta5-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-marshalling-1.3.0.CR8-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-threads-2.0.0.CR8-sources.jar
Log:
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-dmr-1.0.0.Beta5-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-marshalling-1.3.0.CR8-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-threads-2.0.0.CR8-sources.jar
===================================================================
(Binary files differ)
13 years, 7 months
JBoss Tools SVN: r30553 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment/META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-13 09:21:53 -0400 (Wed, 13 Apr 2011)
New Revision: 30553
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF
Log:
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-13 13:03:43 UTC (rev 30552)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-13 13:21:53 UTC (rev 30553)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar" sourcepath="jboss-threads-2.0.0.CR8-sources.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="/jboss-as-controller-client"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="/jboss-as-protocol"/>
<classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta3.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF 2011-04-13 13:03:43 UTC (rev 30552)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF 2011-04-13 13:21:53 UTC (rev 30553)
@@ -28,5 +28,7 @@
org.jboss.marshalling,
org.jboss.marshalling.cloner,
org.jboss.marshalling.reflect,
- org.jboss.marshalling.util
+ org.jboss.marshalling.util,
+ org.jboss.threads,
+ org.jboss.threads.management
Bundle-Vendor: JBoss by Red Hat
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath 2011-04-13 13:03:43 UTC (rev 30552)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath 2011-04-13 13:21:53 UTC (rev 30553)
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="/jboss-as-cli"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF 2011-04-13 13:03:43 UTC (rev 30552)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF 2011-04-13 13:21:53 UTC (rev 30553)
@@ -6,9 +6,29 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .,
jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar,
+ jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,
jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,
- jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,
jboss-dmr-1.0.0.Beta5.jar,
- jboss-threads-2.0.0.CR8.jar,
- jboss-marshalling-1.3.0.CR8.jar
-Export-Package: org.jboss.ide.eclipse.as7.deployment.detyped
+ jboss-marshalling-1.3.0.CR8.jar,
+ jboss-threads-2.0.0.CR8.jar
+Export-Package: org.jboss.as.cli,
+ org.jboss.as.cli.handlers,
+ org.jboss.as.cli.operation,
+ org.jboss.as.cli.operation.impl,
+ org.jboss.as.cli.operation.parsing,
+ org.jboss.as.controller.client,
+ org.jboss.as.controller.client.helpers,
+ org.jboss.as.controller.client.helpers.domain,
+ org.jboss.as.controller.client.helpers.domain.impl,
+ org.jboss.as.controller.client.helpers.standalone,
+ org.jboss.as.controller.client.helpers.standalone.impl,
+ org.jboss.as.protocol,
+ org.jboss.as.protocol.mgmt,
+ org.jboss.dmr,
+ org.jboss.ide.eclipse.as7.deployment.detyped,
+ org.jboss.marshalling,
+ org.jboss.marshalling.cloner,
+ org.jboss.marshalling.reflect,
+ org.jboss.marshalling.util,
+ org.jboss.threads,
+ org.jboss.threads.management
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties 2011-04-13 13:03:43 UTC (rev 30552)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties 2011-04-13 13:21:53 UTC (rev 30553)
@@ -3,8 +3,8 @@
bin.includes = META-INF/,\
.,\
jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar,\
+ jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,\
jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,\
- jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,\
jboss-dmr-1.0.0.Beta5.jar,\
- jboss-threads-2.0.0.CR8.jar,\
- jboss-marshalling-1.3.0.CR8.jar
+ jboss-marshalling-1.3.0.CR8.jar,\
+ jboss-threads-2.0.0.CR8.jar
13 years, 7 months
JBoss Tools SVN: r30552 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment.detyped and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-13 09:03:43 -0400 (Wed, 13 Apr 2011)
New Revision: 30552
Added:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-marshalling-1.3.0.CR8.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-threads-2.0.0.CR8-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-threads-2.0.0.CR8.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDetypedOperationsIntegrationTest.java
Removed:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDetypedOperations.java
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/StandaloneDetypedOperations.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneOperationsIntegrationTest.java
Log:
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDetypedOperations.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDetypedOperations.java 2011-04-13 12:44:34 UTC (rev 30551)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDetypedOperations.java 2011-04-13 13:03:43 UTC (rev 30552)
@@ -1,143 +0,0 @@
-package org.jboss.ide.eclipse.as7.deployment;
-
-import static org.jboss.as.protocol.StreamUtils.safeClose;
-
-import java.io.File;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import org.jboss.as.controller.client.ModelControllerClient;
-import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
-import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
-
-public class StandaloneDetypedOperations {
-
- public static final long DEFAULT_TIMEOUT = 15000;
-
- private final List<IDeploymentPlanBuilderOperation> deployments = new ArrayList<IDeploymentPlanBuilderOperation>();
- private final ModelControllerClient client;
- private final ServerDeploymentManager manager;
- private long timeout = DEFAULT_TIMEOUT;
-
- public StandaloneDetypedOperations(String host, int port) throws UnknownHostException {
- client = ModelControllerClient.Factory.create(host, port);
- manager = ServerDeploymentManager.Factory.create(client);
- }
-
- public synchronized StandaloneDetypedOperations deploy(File file) {
- deployments.add(new DeployOperation(file));
- return this;
- }
-
- public synchronized StandaloneDetypedOperations deploy(String name, File file) {
- deployments.add(new DeployOperation(name, file));
- return this;
- }
-
- public synchronized StandaloneDetypedOperations undeploy(String name) {
- deployments.add(new UndeployOperation(name));
- return this;
- }
-
- public synchronized StandaloneDetypedOperations undeploy(File file) {
- deployments.add(new UndeployOperation(file));
- return this;
- }
-
- public synchronized void execute() throws DeployerException {
- try {
- DeploymentPlanBuilder builder = manager.newDeploymentPlan();
- for (IDeploymentPlanBuilderOperation deployment : deployments) {
- builder = deployment.addTo(builder);
- }
- manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
- } catch (Exception e) {
- throw new DeployerException(e);
- }
- }
-
- public void setTimeout(long timeout) {
- this.timeout = timeout;
- }
-
- public void dispose() {
- safeClose(client);
- }
-
- private static class DeployOperation extends FileOperation {
-
- private DeployOperation(File file) {
- super(file);
- }
-
- private DeployOperation(String name, File file) {
- super(name, file);
- }
-
- public synchronized DeploymentPlanBuilder addTo(DeploymentPlanBuilder builder) throws Exception {
- String name = getName();
- return builder.add(name, getFile()).deploy(name);
- }
- }
-
- private static class UndeployOperation extends FileOperation {
-
- private UndeployOperation(File file) {
- super(file);
- }
-
- private UndeployOperation(String name) {
- super(name, null);
- }
-
- public synchronized DeploymentPlanBuilder addTo(DeploymentPlanBuilder builder) throws Exception {
- String name = getName();
- return builder.undeploy(name).undeploy(name);
- }
- }
-
- private abstract static class FileOperation extends NamedOperation {
-
- private File file;
-
- private FileOperation(File file) {
- this(null, file);
- }
-
- private FileOperation(String name, File file) {
- super(name);
- this.file = file;
- }
-
- protected File getFile() {
- return file;
- }
-
- protected String getName() {
- if (name != null) {
- return name;
- } else {
- return file.getName();
- }
- }
-
- }
-
- private abstract static class NamedOperation implements IDeploymentPlanBuilderOperation {
-
- protected String name;
-
- private NamedOperation(String name) {
- this.name = name;
- }
- }
-
- private interface IDeploymentPlanBuilderOperation {
-
- public DeploymentPlanBuilder addTo(DeploymentPlanBuilder builder) throws Exception;
-
- }
-
-}
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath 2011-04-13 12:44:34 UTC (rev 30551)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/.classpath 2011-04-13 13:03:43 UTC (rev 30552)
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF 2011-04-13 12:44:34 UTC (rev 30551)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/META-INF/MANIFEST.MF 2011-04-13 13:03:43 UTC (rev 30552)
@@ -8,4 +8,7 @@
jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar,
jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,
jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,
- jboss-dmr-1.0.0.Beta5.jar
+ jboss-dmr-1.0.0.Beta5.jar,
+ jboss-threads-2.0.0.CR8.jar,
+ jboss-marshalling-1.3.0.CR8.jar
+Export-Package: org.jboss.ide.eclipse.as7.deployment.detyped
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties 2011-04-13 12:44:34 UTC (rev 30551)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/build.properties 2011-04-13 13:03:43 UTC (rev 30552)
@@ -5,4 +5,6 @@
jboss-as-cli-7.0.0.Beta3-SNAPSHOT.jar,\
jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,\
jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,\
- jboss-dmr-1.0.0.Beta5.jar
+ jboss-dmr-1.0.0.Beta5.jar,\
+ jboss-threads-2.0.0.CR8.jar,\
+ jboss-marshalling-1.3.0.CR8.jar
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-marshalling-1.3.0.CR8.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-marshalling-1.3.0.CR8.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-threads-2.0.0.CR8-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-threads-2.0.0.CR8-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-threads-2.0.0.CR8.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/jboss-threads-2.0.0.CR8.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/StandaloneDetypedOperations.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/StandaloneDetypedOperations.java 2011-04-13 12:44:34 UTC (rev 30551)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/StandaloneDetypedOperations.java 2011-04-13 13:03:43 UTC (rev 30552)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.ide.eclipse.as7.deployment.detyped;
import java.io.File;
@@ -14,6 +35,9 @@
import org.jboss.as.protocol.StreamUtils;
import org.jboss.dmr.ModelNode;
+/**
+ * @author André Dietisheim
+ */
public class StandaloneDetypedOperations {
private final List<IDeploymentOperation> deployments = new ArrayList<IDeploymentOperation>();
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF 2011-04-13 12:44:34 UTC (rev 30551)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF 2011-04-13 13:03:43 UTC (rev 30552)
@@ -6,6 +6,7 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit;bundle-version="[4.8.1,5.0.0)",
org.eclipse.core.runtime;bundle-version="3.7.0",
- org.jboss.ide.eclipse.as7.deployment;bundle-version="0.0.1"
+ org.jboss.ide.eclipse.as7.deployment;bundle-version="0.0.1",
+ org.jboss.ide.eclipse.as7.deployment.detyped;bundle-version="1.0.0"
Bundle-ClassPath: .,
wars/
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDetypedOperationsIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDetypedOperationsIntegrationTest.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDetypedOperationsIntegrationTest.java 2011-04-13 13:03:43 UTC (rev 30552)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.as7.deployment.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.ide.eclipse.as7.deployment.DeployerException;
+import org.jboss.ide.eclipse.as7.deployment.detyped.StandaloneDetypedOperations;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author André Dietisheim
+ */
+public class StandaloneDetypedOperationsIntegrationTest {
+
+ private static final String WAR_FOLDER = "/wars/";
+ private static final String BUNDLE_ID = "org.jboss.ide.eclipse.as7.deployment.tests";
+
+ private static final int WEBAPP_RESPONSE_TIMEOUT = 10 * 1024;
+
+ private static final String HOST = "localhost";
+ private static final int MGMT_PORT = 9999;
+ private static final int WEB_PORT = 8080;
+
+ @Test
+ public void canDeploy() throws Exception {
+ StandaloneDetypedOperations deployer = null;
+ File warFile = getWarFile("minimalistic.war");
+ try {
+ deployer = new StandaloneDetypedOperations(HOST, MGMT_PORT);
+ quietlyUndeploy(warFile, deployer);
+ deployer.deploy(warFile).execute();
+
+ String response = getServerResponse(new URL(
+ MessageFormat.format(
+ "http://{0}:{1}/{2}", HOST, String.valueOf(WEB_PORT), "minimalistic")));
+ assertTrue(response.indexOf("minimalistic") >= 0);
+
+ } finally {
+ quietlyUndeploy(warFile, deployer);
+ }
+ }
+
+ @Test(expected = DeployerException.class)
+ public void cannotDeployWarTwice() throws Exception {
+ StandaloneDetypedOperations deployer = null;
+ File warFile = getWarFile("minimalistic.war");
+ try {
+ deployer = new StandaloneDetypedOperations(HOST, MGMT_PORT);
+ deployer.deploy(warFile).execute();
+ deployer.deploy(warFile).execute();
+ } finally {
+ quietlyUndeploy(warFile, deployer);
+ }
+ }
+
+ private File getWarFile(String name) throws URISyntaxException, IOException {
+ Bundle bundle = Platform.getBundle(BUNDLE_ID);
+ URL entryUrl = bundle.getEntry(WAR_FOLDER + name);
+ return new File(FileLocator.resolve(entryUrl).toURI());
+ }
+
+ private String getServerResponse(URL url) throws IOException {
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setUseCaches(false);
+ connection.setDoInput(true);
+ connection.setAllowUserInteraction(false);
+ connection.setConnectTimeout(WEBAPP_RESPONSE_TIMEOUT);
+ connection.setInstanceFollowRedirects(true);
+ connection.setDoOutput(false);
+ BufferedInputStream in = new BufferedInputStream(connection.getInputStream());
+ return toString(in);
+ }
+
+ private String toString(InputStream in) throws IOException {
+ StringWriter writer = new StringWriter();
+ for (int data = -1; ((data = in.read()) != -1);) {
+ writer.write(data);
+ }
+ return writer.toString();
+ }
+
+ private void quietlyUndeploy(File file, StandaloneDetypedOperations deployer) {
+ try {
+ if (deployer != null) {
+ deployer.undeploy(file).execute();
+ deployer.dispose();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // ignore
+ }
+ }
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDetypedOperationsIntegrationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneOperationsIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneOperationsIntegrationTest.java 2011-04-13 12:44:34 UTC (rev 30551)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneOperationsIntegrationTest.java 2011-04-13 13:03:43 UTC (rev 30552)
@@ -42,8 +42,7 @@
/**
*
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
+ * @author André Dietisheim
*/
public class StandaloneOperationsIntegrationTest {
13 years, 7 months