JBoss Tools SVN: r39211 - in trunk/ws/plugins/org.jboss.tools.ws.ui: src/org/jboss/tools/ws/ui/messages and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2012-02-29 18:47:57 -0500 (Wed, 29 Feb 2012)
New Revision: 39211
Added:
trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/hierarchicalLayout.gif
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SOAPDOMParser.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeNode.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeParent.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SchemaUtils.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java
Log:
[JBIDE-6327] Added simplified data input for XML request messages to the WS Tester
[JBIDE-10947] For JSON & XML response data, cleaned up output with CRLF & indentation
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/hierarchicalLayout.gif
===================================================================
(Binary files differ)
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/icons/obj16/hierarchicalLayout.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2012-02-29 22:41:35 UTC (rev 39210)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2012-02-29 23:47:57 UTC (rev 39211)
@@ -140,6 +140,7 @@
JAXRSWSTestView2_Go_Tooltip=Invoke
JAXRSWSTestView2_Headers_Section=Request Headers
JAXRSWSTestView2_Msg_No_Results_Check_Headers=No textual results to display. Check Response Headers list.
+JAXRSWSTestView2_Name_column=Name
JAXRSWSTestView2_OpenInEditor_Action=Open in Editor
JAXRSWSTestView2_Parameters_Section=Request Parameters
JAXRSWSTestView2_RequestDetails_Section=Request Details
@@ -150,8 +151,11 @@
JAXRSWSTestView2_SaveResponseText_tooltip=Save to File
JAXRSWSTestView2_ShowInBrowser_Tooltip=Show in Browser
JAXRSWSTestView2_ShowRaw_Tooltip=Show Raw
+JAXRSWSTestView2_ShowRequestTree_toolbar_btn=Show Request Tree
+JAXRSWSTestView2_ShowRequestXML_toolbar_btn=Show Request XML
JAXRSWSTestView2_Text_Msg_May_Be_Out_of_Date=Should we replace the existing request message with one generated by your WSDL service/port/binding/operation selection?
JAXRSWSTestView2_Title_Msg_May_Be_Out_of_Date=Message May Be Incorrect for Selected WSDL
+JAXRSWSTestView2_Value_column=Value
ResultsXMLStorageInput_WS_Invocation_Results_Prefix=Web Service Invocation Results\:
WSDLBrowseDialog_Dialog_Title=Select WSDL
WSDLBrowseDialog_Error_Msg_Invalid_URL=Invalid URL specified for WSDl.
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2012-02-29 22:41:35 UTC (rev 39210)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2012-02-29 23:47:57 UTC (rev 39211)
@@ -171,6 +171,7 @@
public static String JAXRSWSTestView2_Go_Tooltip;
public static String JAXRSWSTestView2_Headers_Section;
public static String JAXRSWSTestView2_Msg_No_Results_Check_Headers;
+ public static String JAXRSWSTestView2_Name_column;
public static String JAXRSWSTestView2_OpenInEditor_Action;
public static String JAXRSWSTestView2_Parameters_Section;
public static String JAXRSWSTestView2_RequestDetails_Section;
@@ -181,8 +182,11 @@
public static String JAXRSWSTestView2_SaveResponseText_tooltip;
public static String JAXRSWSTestView2_ShowInBrowser_Tooltip;
public static String JAXRSWSTestView2_ShowRaw_Tooltip;
+ public static String JAXRSWSTestView2_ShowRequestTree_toolbar_btn;
+ public static String JAXRSWSTestView2_ShowRequestXML_toolbar_btn;
public static String JAXRSWSTestView2_Text_Msg_May_Be_Out_of_Date;
public static String JAXRSWSTestView2_Title_Msg_May_Be_Out_of_Date;
+ public static String JAXRSWSTestView2_Value_column;
public static String ResultsXMLStorageInput_WS_Invocation_Results_Prefix;
public static String TesterWSDLUtils_WSDL_HTTPS_Secured_Inaccessible;
public static String TesterWSDLUtils_WSDL_Inaccessible;
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SOAPDOMParser.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SOAPDOMParser.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SOAPDOMParser.java 2012-02-29 23:47:57 UTC (rev 39211)
@@ -0,0 +1,291 @@
+/*******************************************************************************
+ * Copyright (c) 2011-2012 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.ui.utils;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.ls.DOMImplementationLS;
+import org.w3c.dom.ls.LSOutput;
+import org.w3c.dom.ls.LSSerializer;
+import org.xml.sax.SAXException;
+
+/**
+ * Utility class for processing SOAP request XML
+ * @author bfitzpat
+ *
+ */
+public class SOAPDOMParser {
+
+ Document dom;
+ TreeParent root;
+
+ /**
+ * Parse the file into the nodes
+ * @param filepath
+ */
+ public void parseXmlFile(String fileContents){
+
+ root = new TreeParent("Invisible Root"); //$NON-NLS-1$
+
+ //get the factory
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+
+ try {
+
+ //Using factory get an instance of document builder
+ DocumentBuilder db = dbf.newDocumentBuilder();
+
+ //parse using builder to get DOM representation of the XML file
+ ByteArrayInputStream bais = new ByteArrayInputStream(fileContents.getBytes());
+ dom = db.parse(bais);
+ dom.getDocumentElement().normalize();
+
+ parseDocument();
+
+ }catch(ParserConfigurationException pce) {
+ pce.printStackTrace();
+ }catch(SAXException se) {
+ se.printStackTrace();
+ }catch(IOException ioe) {
+ ioe.printStackTrace();
+ }
+ }
+
+ /*
+ * Work through the configuration
+ */
+ private void parseDocument(){
+ //get the root elememt
+ Element docEle = dom.getDocumentElement();
+
+ TreeParent soapRoot = new TreeParent(docEle.getTagName());
+ soapRoot.setData(docEle);
+
+ processChildren(soapRoot, docEle);
+ root.addChild(soapRoot);
+ }
+
+ /*
+ * Work down the children tree
+ * @param parent
+ * @param el
+ */
+ private void processChildren ( TreeParent parent, Element el ) {
+ el.normalize();
+ parent.setData(el);
+
+ NodeList children = el.getChildNodes();
+ for (int i = 0; i < children.getLength(); i++) {
+ if (children.item(i) instanceof Element) {
+ Element child = (Element) children.item(i);
+ String name = child.getTagName();
+ TreeParent childNode = new TreeParent(name);
+ processChildren(childNode, child);
+ parent.addChild(childNode);
+ }
+ }
+ }
+
+ /**
+ * Update the value in the XML
+ * @param input
+ * @param tp
+ * @param value
+ * @return
+ */
+ public String updateValue ( String input, TreeParent tp, String value) {
+ parseXmlFile(input);
+ dom.normalizeDocument();
+ Element docEle = dom.getDocumentElement();
+ Element toFind = (Element) tp.getData();
+ NodeList nl = docEle.getElementsByTagName(toFind.getTagName());
+ if (nl.getLength() > 0) {
+ Element found = (Element) nl.item(0);
+ if (found.getChildNodes() != null && found.getChildNodes().getLength() > 0) {
+ Node node = found.getChildNodes().item(0);
+ node.setTextContent(value);
+
+ TransformerFactory transFactory = TransformerFactory.newInstance();
+ Transformer transformer;
+ try {
+ transformer = transFactory.newTransformer();
+ StringWriter buffer = new StringWriter();
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); //$NON-NLS-1$
+ transformer.transform(new DOMSource(docEle),
+ new StreamResult(buffer));
+ String str = buffer.toString();
+ return str;
+ } catch (TransformerConfigurationException e) {
+ e.printStackTrace();
+ } catch (TransformerException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return the actual root
+ * @return
+ */
+ public TreeParent getRoot() {
+ return this.root;
+ }
+
+ /**
+ * Pretty print
+ * @param xml
+ * @return
+ */
+ public static String prettyPrint ( String xml ) {
+ //get the factory
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ Document dom;
+
+ try {
+
+ //Using factory get an instance of document builder
+ DocumentBuilder db = dbf.newDocumentBuilder();
+
+ //parse using builder to get DOM representation of the XML file
+ ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes());
+ dom = db.parse(bais);
+
+ String stringOutput = prettyPrintWithDOM3LS(dom);
+ return stringOutput;
+
+ }catch(ParserConfigurationException pce) {
+ pce.printStackTrace();
+ }catch(SAXException se) {
+ se.printStackTrace();
+ }catch(IOException ioe) {
+ ioe.printStackTrace();
+ }
+ return null;
+ }
+
+ /*
+ * @param document
+ * @return
+ */
+ static String prettyPrintWithDOM3LS(Document document) {
+ // Pretty-prints a DOM document to XML using DOM Load and Save's LSSerializer.
+ // Note that the "format-pretty-print" DOM configuration parameter can only be set in JDK 1.6+.
+ DOMImplementation domImplementation = document.getImplementation();
+ if (domImplementation.hasFeature("LS", "3.0") && domImplementation.hasFeature("Core", "2.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ DOMImplementationLS domImplementationLS = (DOMImplementationLS) domImplementation.getFeature("LS", "3.0"); //$NON-NLS-1$ //$NON-NLS-2$
+ LSSerializer lsSerializer = domImplementationLS.createLSSerializer();
+ DOMConfiguration domConfiguration = lsSerializer.getDomConfig();
+ if (domConfiguration.canSetParameter("format-pretty-print", Boolean.TRUE)) { //$NON-NLS-1$
+ lsSerializer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE); //$NON-NLS-1$
+ LSOutput lsOutput = domImplementationLS.createLSOutput();
+ lsOutput.setEncoding("UTF-8"); //$NON-NLS-1$
+ StringWriter stringWriter = new StringWriter();
+ lsOutput.setCharacterStream(stringWriter);
+ lsSerializer.write(document, lsOutput);
+ return stringWriter.toString();
+ } else {
+ throw new RuntimeException("DOMConfiguration 'format-pretty-print' parameter isn't settable."); //$NON-NLS-1$
+ }
+ } else {
+ throw new RuntimeException("DOM 3.0 LS and/or DOM 2.0 Core not supported."); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * from http://jaysonlorenzen.wordpress.com/2009/01/29/48/
+ * @param inXMLStr
+ * @return
+ */
+ public static boolean isXMLLike(String inXMLStr) {
+
+ boolean retBool = false;
+ Pattern pattern;
+ Matcher matcher;
+
+ // REGULAR EXPRESSION TO SEE IF IT AT LEAST STARTS AND ENDS
+ // WITH THE SAME ELEMENT
+ final String XML_PATTERN_STR = "<(\\S+?)(.*?)>(.*?)</\\1>"; //$NON-NLS-1$
+
+ // IF WE HAVE A STRING
+ if (inXMLStr != null && inXMLStr.trim().length() > 0) {
+
+ // IF WE EVEN RESEMBLE XML
+ if (inXMLStr.trim().startsWith("<")) { //$NON-NLS-1$
+
+ pattern = Pattern.compile(XML_PATTERN_STR,
+ Pattern.CASE_INSENSITIVE | Pattern.DOTALL | Pattern.MULTILINE);
+
+ // RETURN TRUE IF IT HAS PASSED BOTH TESTS
+ matcher = pattern.matcher(inXMLStr);
+ retBool = matcher.matches();
+ }
+ // ELSE WE ARE FALSE
+ }
+
+ return retBool;
+ }
+
+ /**
+ * Simple JSON pretty print to format JSON output
+ * @param inJSON
+ * @return
+ */
+ public static String prettyPrintJSON ( String inJSON ) {
+ int numberOfSpaces = 4;
+ String spaces = String.format("%" + numberOfSpaces + "s", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ inJSON = inJSON.trim();
+ if (inJSON.startsWith("{") && inJSON.endsWith("}")) { //$NON-NLS-1$ //$NON-NLS-2$
+ String output = ""; //$NON-NLS-1$
+ char[] chars = inJSON.toCharArray();
+ for (int i = 0; i < chars.length; i++) {
+ char current = chars[i];
+ switch (current) {
+ case '{':
+ output = output + current + "\r\n" + spaces; //$NON-NLS-1$
+ break;
+ case '}':
+ output = output + "\r\n" + current; //$NON-NLS-1$
+ break;
+ case ',':
+ output = output + current + "\r\n" + spaces; //$NON-NLS-1$
+ break;
+ default:
+ output = output + current;
+ break;
+ }
+ }
+ return output;
+ }
+ return inJSON;
+ }}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SOAPDOMParser.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SchemaUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SchemaUtils.java 2012-02-29 22:41:35 UTC (rev 39210)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SchemaUtils.java 2012-02-29 23:47:57 UTC (rev 39211)
@@ -988,7 +988,12 @@
}
if (element.getAttribute("type") != null) {//$NON-NLS-1$
elemType = element.getAttributeValue("type");//$NON-NLS-1$
- String nsprefix = elemType.substring(0, elemType.indexOf(':'));
+ String nsprefix = ""; //$NON-NLS-1$
+ try {
+ nsprefix = elemType.substring(0, elemType.indexOf(':'));
+ } catch (StringIndexOutOfBoundsException e) {
+ // ignore
+ }
String testUri = getURIfromSchemaPrefix(element, nsprefix);
if (elemType.indexOf(':') > -1) {
if (!(elemType.startsWith("xs:") || elemType.startsWith("xsd:"))){ //$NON-NLS-1$ //$NON-NLS-2$
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeNode.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeNode.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeNode.java 2012-02-29 23:47:57 UTC (rev 39211)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.ui.utils;
+
+import org.eclipse.core.runtime.IAdaptable;
+
+/**
+ * Simple container node
+ * @author bfitzpat
+ *
+ */
+public class TreeNode implements IAdaptable {
+
+ private String name;
+ private TreeParent parent;
+ private String ref;
+ private boolean isLockedFlag = false;
+ private Object data;
+
+ /**
+ * Constructor
+ * @param name
+ */
+ public TreeNode(String name) {
+ this.name = name;
+ }
+ /**
+ * Get the name (basic string)
+ * @return
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * Set the name (basic string)
+ * @param newName
+ */
+ public void setName(String newName) {
+ this.name = newName;
+ }
+ /**
+ * Add the parent node so we can claw back up the chain
+ * @param parent
+ */
+ public void setParent(TreeParent parent) {
+ this.parent = parent;
+ }
+ /**
+ * Get the parent node
+ * @return
+ */
+ public TreeParent getParent() {
+ return parent;
+ }
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return getName();
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
+ @SuppressWarnings("rawtypes")
+ public Object getAdapter(Class key) {
+ return null;
+ }
+ /**
+ * Get the referenced node
+ * @return
+ */
+ public String getRef() {
+ return ref;
+ }
+ /**
+ * Set the referenced node
+ * @param ref
+ */
+ public void setRef(String ref) {
+ this.ref = ref;
+ }
+ /**
+ * Is this node locked for movement?
+ * @return
+ */
+ protected boolean isMovementLocked() {
+ return isLockedFlag;
+ }
+ /**
+ * Set the "isLocked" flag
+ * @param isLocked
+ */
+ protected void setIsMovementLocked(boolean isLocked) {
+ this.isLockedFlag = isLocked;
+ }
+ /**
+ * Return the stashed Java object
+ * @return
+ */
+ public Object getData() {
+ return data;
+ }
+ /**
+ * Stash a java object
+ * @param data
+ */
+ protected void setData(Object data) {
+ this.data = data;
+ }
+}
\ No newline at end of file
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeNode.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeParent.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeParent.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeParent.java 2012-02-29 23:47:57 UTC (rev 39211)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.ui.utils;
+
+import java.util.ArrayList;
+
+/**
+ * Extend the base node so it can track a list of children
+ * @author bfitzpat
+ */
+public class TreeParent extends TreeNode {
+
+ private ArrayList<TreeNode> children;
+ /**
+ * Constructor
+ * @param name
+ */
+ public TreeParent(String name) {
+ super(name);
+ children = new ArrayList<TreeNode>();
+ }
+ /**
+ * Add a child to the child list
+ * @param child
+ */
+ public void addChild(TreeNode child) {
+ children.add(child);
+ child.setParent(this);
+ }
+ /**
+ * Remove a child from the child list
+ * @param child
+ */
+ public void removeChild(TreeNode child) {
+ children.remove(child);
+ child.setParent(null);
+ }
+ /**
+ * Get the list of children
+ * @return
+ */
+ public TreeNode [] getChildren() {
+ return (TreeNode [])children.toArray(new TreeNode[children.size()]);
+ }
+ /**
+ * Does the node have children?
+ * @return
+ */
+ public boolean hasChildren() {
+ return children.size()>0;
+ }
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/TreeParent.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java 2012-02-29 22:41:35 UTC (rev 39210)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java 2012-02-29 23:47:57 UTC (rev 39211)
@@ -19,6 +19,7 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Stack;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@@ -54,6 +55,14 @@
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
@@ -71,6 +80,7 @@
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
@@ -90,6 +100,8 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
@@ -109,8 +121,10 @@
import org.jboss.tools.ws.ui.utils.JAXWSTester2;
import org.jboss.tools.ws.ui.utils.ResultsXMLStorage;
import org.jboss.tools.ws.ui.utils.ResultsXMLStorageInput;
+import org.jboss.tools.ws.ui.utils.SOAPDOMParser;
import org.jboss.tools.ws.ui.utils.SchemaUtils;
import org.jboss.tools.ws.ui.utils.TesterWSDLUtils;
+import org.jboss.tools.ws.ui.utils.TreeParent;
import org.jboss.tools.ws.ui.utils.WSTestUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -137,7 +151,8 @@
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
private static final String RESULT_HEADER_DELIMITER = "%";//$NON-NLS-1$
private static final String HTTPS_STRING = "https";//$NON-NLS-1$
-
+ private static final String[] TREE_COLUMNS = new String[] { "name", "value" }; //$NON-NLS-1$ //$NON-NLS-2$
+
/**
* The ID of the view as specified by the extension.
*/
@@ -152,6 +167,11 @@
private Text bodyText;
private List resultHeadersList;
+ private TreeViewer treeRequestBody;
+ private ScrolledPageBook requestPageBook;
+ private ShowInTreeAction treeAction;
+ private ShowRawRequestAction rawRequestAction;
+
private DelimitedStringList parmsList;
private SOAPEnvelope envelope;
@@ -174,6 +194,7 @@
private static final String IMG_DESC_START = "icons/obj16/run.gif"; //$NON-NLS-1$
private static final String IMG_DESC_SHOWRAW = "icons/obj16/binary.gif"; //$NON-NLS-1$
+ private static final String IMG_DESC_SHOWTREE = "icons/obj16/hierarchicalLayout.gif"; //$NON-NLS-1$
private static final String IMG_DESC_SHOWWEB = "icons/obj16/web.gif"; //$NON-NLS-1$
private static final String IMG_DESC_SHOWEDITOR = "icons/obj16/properties.gif"; //$NON-NLS-1$
private static final String IMG_DESC_SAVE = "icons/obj16/save_edit.gif"; //$NON-NLS-1$
@@ -205,6 +226,11 @@
public void setJAXRS ( String url, String method ) {
this.urlCombo.setText(url);
+ this.bodyText.setText(EMPTY_STRING);
+ this.treeRequestBody.setInput(null);
+ this.resultsText.setText(EMPTY_STRING);
+ this.resultsBrowser.setText(EMPTY_STRING);
+// getCurrentHistoryEntry().setUrl(url);
String uCaseMethod = method.toUpperCase();
if (uCaseMethod.equalsIgnoreCase(GET))
this.methodCombo.setText(GET);
@@ -242,8 +268,29 @@
mImageRegistry.put(IMG_DESC_SAVE, ImageDescriptor
.createFromURL(JBossWSUIPlugin.getDefault().getBundle()
.getEntry(IMG_DESC_SAVE)));
+ mImageRegistry.put(IMG_DESC_SHOWTREE, ImageDescriptor
+ .createFromURL(JBossWSUIPlugin.getDefault().getBundle()
+ .getEntry(IMG_DESC_SHOWTREE)));
}
+ private void createRequestToolbar ( ExpandableComposite parent ) {
+
+ // create a couple of actions for toggling views
+ rawRequestAction = new ShowRawRequestAction();
+ rawRequestAction.setChecked(true);
+ treeAction = new ShowInTreeAction();
+
+ ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
+ ToolBar toolbar = toolBarManager.createControl(parent);
+
+ toolBarManager.add(rawRequestAction);
+ toolBarManager.add(treeAction);
+
+ toolBarManager.update(true);
+
+ parent.setTextClient(toolbar);
+ }
+
private void createResponseToolbar ( ExpandableComposite parent ) {
// create a couple of actions for toggling views
@@ -349,6 +396,43 @@
}
}
+ class ShowRawRequestAction extends ToggleAction {
+ public void run() {
+ if (treeAction.isChecked()) treeAction.setChecked(false);
+
+ JAXRSWSTestView2.this.requestPageBook.showPage(PAGE1_KEY);
+ }
+ @Override
+ public String getToolTipText() {
+ return JBossWSUIMessages.JAXRSWSTestView2_ShowRequestXML_toolbar_btn;
+ }
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return mImageRegistry.getDescriptor(IMG_DESC_SHOWRAW);
+ }
+ }
+
+ class ShowInTreeAction extends ToggleAction {
+ public void run() {
+ if (rawRequestAction.isChecked()) rawRequestAction.setChecked(false);
+ if (JAXRSWSTestView2.this.bodyText.getText().length() > 0 ) {
+ JAXRSWSTestView2.this.treeRequestBody.setInput
+ (JAXRSWSTestView2.this.bodyText.getText());
+ } else {
+ JAXRSWSTestView2.this.treeRequestBody.setInput(null);
+ }
+ JAXRSWSTestView2.this.requestPageBook.showPage(PAGE2_KEY);
+ }
+ @Override
+ public String getToolTipText() {
+ return JBossWSUIMessages.JAXRSWSTestView2_ShowRequestTree_toolbar_btn;
+ }
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return mImageRegistry.getDescriptor(IMG_DESC_SHOWTREE);
+ }
+ }
+
private String getCurrentTestType() {
if (methodCombo.getText().equalsIgnoreCase(JAX_WS))
return JAX_WS;
@@ -505,6 +589,7 @@
String opNameInBody = getOpNameFromRequestBody();
if (opNameInBody == null) {
bodyText.setText(soapIn);
+ treeRequestBody.setInput(soapIn);
getCurrentHistoryEntry().setBody(soapIn);
getCurrentHistoryEntry().setAction(actionURL);
} else if (opNameInBody.contentEquals(getCurrentHistoryEntry().getOperationName())) {
@@ -515,6 +600,7 @@
JBossWSUIMessages.JAXRSWSTestView2_Text_Msg_May_Be_Out_of_Date)) {
bodyText.setText(soapIn);
+ treeRequestBody.setInput(soapIn);
getCurrentHistoryEntry().setBody(soapIn);
getCurrentHistoryEntry().setAction(actionURL);
@@ -528,6 +614,7 @@
if (opNameInBody == null || isSOAP12 != isRequestSOAP12 ) {
bodyText.setText(soapIn);
+ treeRequestBody.setInput(soapIn);
getCurrentHistoryEntry().setBody(soapIn);
getCurrentHistoryEntry().setAction(actionURL);
} else if (opNameInBody.contentEquals(getCurrentHistoryEntry().getOperationName())) {
@@ -538,6 +625,7 @@
JBossWSUIMessages.JAXRSWSTestView2_Text_Msg_May_Be_Out_of_Date)) {
bodyText.setText(soapIn);
+ treeRequestBody.setInput(soapIn);
getCurrentHistoryEntry().setBody(soapIn);
getCurrentHistoryEntry().setAction(actionURL);
@@ -603,7 +691,7 @@
try {
currentHistoryEntry = (TestHistoryEntry) entry.clone();
// currentHistoryEntry = entry;
- getCurrentHistoryEntry().setAction(null);
+// getCurrentHistoryEntry().setAction(null);
setControlsForSelectedEntry(entry);
} catch (CloneNotSupportedException e1) {
e1.printStackTrace();
@@ -737,7 +825,235 @@
ExpandableComposite.CLIENT_INDENT |
ExpandableComposite.EXPANDED);
ec5.setText(JBossWSUIMessages.JAXRSWSTestView2_BodyText_Section);
- bodyText = toolkit.createText(ec5, EMPTY_STRING, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
+ requestPageBook = toolkit.createPageBook(ec5, SWT.NONE);
+
+ createRequestToolbar(ec5);
+
+ Composite page1 = requestPageBook.createPage(PAGE1_KEY);
+ page1.setLayout(new GridLayout());
+ bodyText = toolkit.createText(page1, EMPTY_STRING, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
+ GridData gd7 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ // gd7.minimumHeight = 100;
+ gd7.heightHint = 1;
+ bodyText.setLayoutData(gd7);
+
+ requestPageBook.showPage(PAGE1_KEY);
+
+ Composite page2 = requestPageBook.createPage(PAGE2_KEY);
+ page2.setLayout(new GridLayout());
+ treeRequestBody = new TreeViewer(page2, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.FULL_SELECTION );
+ JAXRSWSTestView2.this.treeRequestBody.setAutoExpandLevel(TreeViewer.ALL_LEVELS);
+ GridData gd11 = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd11.heightHint = 1;
+ // gd10.minimumHeight = 100;
+ toolkit.adapt(treeRequestBody.getTree());
+ treeRequestBody.getTree().setLayoutData(gd11);
+ treeRequestBody.getTree().setHeaderVisible(true);
+ TreeColumn nameColumn = new TreeColumn(treeRequestBody.getTree(), SWT.LEFT);
+ nameColumn.setText(JBossWSUIMessages.JAXRSWSTestView2_Name_column);
+ nameColumn.setWidth(200);
+ TreeColumn valueColumn = new TreeColumn(treeRequestBody.getTree(), SWT.LEFT);
+ valueColumn.setText(JBossWSUIMessages.JAXRSWSTestView2_Value_column);
+ valueColumn.setWidth(200);
+
+ treeRequestBody.setColumnProperties(TREE_COLUMNS);
+
+ treeRequestBody.setLabelProvider(new ITableLabelProvider() {
+
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ if (element instanceof TreeParent && property.equalsIgnoreCase("name")) { //$NON-NLS-1$
+ return true;
+ } else if (element instanceof TreeParent && property.equalsIgnoreCase("value")) { //$NON-NLS-1$
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof TreeParent && columnIndex == 0) {
+ return ((TreeParent)element).getName();
+ } else if (element instanceof TreeParent && columnIndex == 1) {
+ TreeParent tp = (TreeParent) element;
+ if (tp.getData() != null && tp.getData() instanceof Element) {
+ Element tpelement = (Element) tp.getData();
+ if (tpelement.getChildNodes() != null && tpelement.getChildNodes().getLength() > 0) {
+ Node node = tpelement.getChildNodes().item(0);
+ if (node.getNodeType() == Node.TEXT_NODE) {
+ return node.getTextContent();
+ }
+ }
+ }
+ }
+ return null;
+ }
+ });
+
+ treeRequestBody.setContentProvider(new ITreeContentProvider(){
+
+ String text;
+ TreeParent tree;
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput,
+ Object newInput) {
+ if (newInput instanceof String) {
+ text = (String) newInput;
+ SOAPDOMParser parser = new SOAPDOMParser();
+ parser.parseXmlFile(text);
+ if (parser.getRoot().getChildren().length > 0)
+ tree = (TreeParent) parser.getRoot().getChildren()[0];
+ else
+ tree = null;
+ }
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof String && tree != null) {
+ return new Object[] {this.tree};
+ } else if (inputElement instanceof TreeParent) {
+ return ((TreeParent)inputElement).getChildren();
+ }
+ return null;
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement == null && tree != null) {
+ return new Object[] {this.tree};
+ } else if (parentElement instanceof TreeParent && ((TreeParent)parentElement).hasChildren()) {
+ return ((TreeParent)parentElement).getChildren();
+ }
+ return null;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof TreeParent) {
+ return ((TreeParent)element).getParent();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof TreeParent) {
+ return ((TreeParent)element).hasChildren();
+ }
+ return false;
+ }
+ });
+
+ treeRequestBody.setCellModifier(new ICellModifier() {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
+ */
+ public boolean canModify(Object element, String property) {
+ if (element instanceof TreeParent && property.equalsIgnoreCase("value")) {//$NON-NLS-1$
+ TreeParent tp = (TreeParent) element;
+ if (tp.getData() != null && tp.getData() instanceof Element) {
+ Element tpelement = (Element) tp.getData();
+ if (tpelement.getChildNodes() != null && tpelement.getChildNodes().getLength() > 0) {
+ Node node = tpelement.getChildNodes().item(0);
+ if (node.getNodeType() == Node.TEXT_NODE && node.getNodeValue().trim().length() > 0) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object, java.lang.String)
+ */
+ public Object getValue(Object element, String property) {
+ TreeParent tp = (TreeParent) element;
+ if (tp.getData() != null && tp.getData() instanceof Element) {
+ Element tpelement = (Element) tp.getData();
+ if (tpelement.getChildNodes() != null && tpelement.getChildNodes().getLength() > 0) {
+ Node node = tpelement.getChildNodes().item(0);
+ return node.getTextContent();
+ }
+ }
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object, java.lang.String, java.lang.Object)
+ */
+ public void modify(Object element, String property, Object value) {
+ TreeItem ti = (TreeItem) element;
+ TreeParent tp = (TreeParent) ti.getData();
+ if (tp.getData() != null && tp.getData() instanceof Element) {
+ Element tpelement = (Element) tp.getData();
+ if (tpelement.getChildNodes() != null && tpelement.getChildNodes().getLength() > 0) {
+ Node node = tpelement.getChildNodes().item(0);
+ if (node.getNodeType() == Node.TEXT_NODE) {
+ node.setTextContent((String)value);
+ treeRequestBody.update(tp, null);
+ SOAPDOMParser parser = new SOAPDOMParser();
+ String updatedOut =
+ parser.updateValue((String) treeRequestBody.getInput(), tp, (String)value);
+ if (updatedOut != null && updatedOut.trim().length() > 0) {
+ Stack<String> pathStack = new Stack<String>();
+ pathStack.push(ti.getText());
+ TreeItem tiPath = ti;
+ while (tiPath.getParentItem() != null ) {
+ tiPath = tiPath.getParentItem();
+ pathStack.push(tiPath.getText());
+ }
+ bodyText.setText(updatedOut);
+ getCurrentHistoryEntry().setBody(bodyText.getText());
+ treeRequestBody.setInput(updatedOut);
+ treeRequestBody.setAutoExpandLevel(TreeViewer.ALL_LEVELS);
+ while (!pathStack.isEmpty()) {
+ TreeItem[] items = treeRequestBody.getTree().getItems();
+ String find = pathStack.pop();
+ /*boolean found =*/ findTreeItem(find, items);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ });
+ treeRequestBody.setCellEditors(new CellEditor[] { null, new TextCellEditor(treeRequestBody.getTree()) });
+
+ requestPageBook.showPage(PAGE1_KEY);
+
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); //GridData.FILL_HORIZONTAL);
+ gd.heightHint = 1;
+ gd.minimumHeight = 100;
+ requestPageBook.setLayoutData(gd);
+
+ requestPageBook.showPage(PAGE1_KEY);
+
bodyText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
if (!restoringFromHistoryEntry)
@@ -756,7 +1072,7 @@
}
}
});
- ec5.setClient(bodyText);
+ ec5.setClient(requestPageBook);
GridData gd9 = new GridData(SWT.FILL, SWT.FILL, true, true);
gd9.minimumHeight = 200;
ec5.setLayoutData(gd9);
@@ -766,6 +1082,36 @@
section.setClient(sectionClient);
}
+// private boolean findString(String searchString, TreeItem[] treeItems) {
+// for (TreeItem treeItem : treeItems) {
+// for (int i = 0; i < tree.getColumnCount(); i++) {
+// String text = treeItem.getText(i);
+// if ((text.toUpperCase().contains(searchString.toUpperCase()))) {
+// tree.setSelection(treeItem);
+// return true;
+// }
+// }
+// }
+//
+// return false;
+// }
+
+ private boolean findTreeItem ( String name, TreeItem[] treeItems ) {
+ for (TreeItem treeItem : treeItems) {
+ for (int i = 0; i < treeRequestBody.getTree().getColumnCount(); i++) {
+ String text = treeItem.getText(i);
+ if ((text.toUpperCase().contains(name.toUpperCase()))) {
+ treeRequestBody.getTree().setSelection(treeItem);
+ return true;
+ }
+ if (treeItem.getItemCount() > 0) {
+ return findTreeItem (name, treeItem.getItems());
+ }
+ }
+ }
+ return false;
+ }
+
private TestHistoryEntry getCurrentHistoryEntry() {
if (this.currentHistoryEntry == null) {
this.currentHistoryEntry = new TestHistoryEntry();
@@ -858,8 +1204,7 @@
page2.setLayout(new GridLayout());
resultsBrowser = new Browser(page2, SWT.BORDER | SWT.WRAP );// | SWT.V_SCROLL);
GridData gd10 = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd7.heightHint = 1;
- // gd10.minimumHeight = 100;
+ gd10.heightHint = 1;
toolkit.adapt(resultsBrowser);
resultsBrowser.setLayoutData(gd10);
@@ -1123,6 +1468,16 @@
if (bodyText.isEnabled()) {
bodyText.setText(entry.getBody());
}
+ if (!treeRequestBody.getTree().isDisposed()) {
+ if (entry.getBody().trim().length() > 0) {
+ if (SOAPDOMParser.isXMLLike(entry.getBody()))
+ treeRequestBody.setInput(entry.getBody());
+ else
+ treeRequestBody.setInput(null);
+ } else {
+ treeRequestBody.setInput(null);
+ }
+ }
if (dlsList.isEnabled()) {
dlsList.setSelection(entry.getHeaders());
}
@@ -1184,8 +1539,10 @@
(methodType.equalsIgnoreCase(GET) ||
methodType.equalsIgnoreCase(OPTIONS))) {
bodyText.setEnabled(false);
+ treeRequestBody.getTree().setEnabled(false);
} else {
bodyText.setEnabled(true);
+ treeRequestBody.getTree().setEnabled(true);
}
}
@@ -1196,6 +1553,7 @@
private void setControlsForWSType ( String wsType ) {
if (wsType.equalsIgnoreCase(JAX_WS)) {
bodyText.setEnabled(true);
+ treeRequestBody.getTree().setEnabled(true);
parmsList.setEnabled(false);
parmsList.removeAll();
dlsList.setEnabled(false);
@@ -1206,17 +1564,21 @@
if (bodyText.getText().trim().length() == 0) {
bodyText.setText(emptySOAP);
+ treeRequestBody.setInput(emptySOAP);
}
openWSDLToolItem.setEnabled(true);
}
else if (wsType.equalsIgnoreCase(JAX_RS)) {
bodyText.setEnabled(true);
+ treeRequestBody.getTree().setEnabled(true);
parmsList.setEnabled(true);
dlsList.setEnabled(true);
openWSDLToolItem.setEnabled(false);
if (bodyText.getText().trim().length() > 0) {
bodyText.setText(EMPTY_STRING);
+ treeRequestBody.setInput(null);
+// getCurrentHistoryEntry().setBody(EMPTY_STRING);
}
}
setMenusForCurrentState();
@@ -1281,7 +1643,13 @@
final String url = getCurrentHistoryEntry().getUrl();
final String action = getCurrentHistoryEntry().getAction();
- final String body = getCurrentHistoryEntry().getBody();
+ String tempBody = getCurrentHistoryEntry().getBody();
+
+ // if it's XML, clean up the empty space and crlf between tags
+ if (SOAPDOMParser.isXMLLike(tempBody)) {
+ tempBody = tempBody.replaceAll(">\\s+<", "><"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ final String body = tempBody;
final String method = getCurrentHistoryEntry().getMethod();
final String headers = getCurrentHistoryEntry().getHeaders();
final String parms = getCurrentHistoryEntry().getParms();
@@ -1336,13 +1704,21 @@
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
public void run() {
if (status.getResultsText() != null) {
- getCurrentHistoryEntry().setResultText(status.getResultsText());
- JAXRSWSTestView2.this.resultsText.setText(status.getResultsText());
- JAXRSWSTestView2.this.resultsBrowser.setText(status.getResultsText());
+ String results = status.getResultsText();
+ if (SOAPDOMParser.isXMLLike(results)) {
+ results = SOAPDOMParser.prettyPrint(results);
+ } else {
+ results = SOAPDOMParser.prettyPrintJSON(results);
+ }
+ getCurrentHistoryEntry().setResultText(results);
+ getCurrentHistoryEntry().setUrl(urlCombo.getText());
+ JAXRSWSTestView2.this.resultsText.setText(results);
+ JAXRSWSTestView2.this.resultsBrowser.setText(results);
JAXRSWSTestView2.this.form.reflow(true);
}
else if (status.getMessage() != null) {
getCurrentHistoryEntry().setResultText(status.getMessage());
+ getCurrentHistoryEntry().setUrl(urlCombo.getText());
JAXRSWSTestView2.this.resultsText.setText(status.getMessage());
JAXRSWSTestView2.this.resultsBrowser.setText(status.getMessage());
JAXRSWSTestView2.this.form.reflow(true);
12 years, 9 months
JBoss Tools SVN: r39210 - in trunk/documentation/guides/GettingStartedGuide/en-US: images/getting_started and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-02-29 17:41:35 -0500 (Wed, 29 Feb 2012)
New Revision: 39210
Added:
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_05a_gwt.png
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_01.png
trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_04.png
trunk/documentation/guides/GettingStartedGuide/en-US/jboss_central.xml
Log:
updated with beta1 info for central
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-02-29 20:15:11 UTC (rev 39209)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2012-02-29 22:41:35 UTC (rev 39210)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
-<pubsnumber>8</pubsnumber>
+<pubsnumber>9</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_01.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_04.png
===================================================================
(Binary files differ)
Added: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_05a_gwt.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en-US/images/getting_started/jboss_central_05a_gwt.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/jboss_central.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/jboss_central.xml 2012-02-29 20:15:11 UTC (rev 39209)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/jboss_central.xml 2012-02-29 22:41:35 UTC (rev 39210)
@@ -39,7 +39,7 @@
</mediaobject>
</figure>
<para>
- From the <guilabel>Create Projects</guilabel> section you can create a <guilabel>Dynamic Web Project</guilabel>, <guilabel>OpenShift Express Application</guilabel>, <guilabel>Java EE Web Project</guilabel>, <guilabel>Java EE Project</guilabel>, <guilabel>HTML5 Project</guilabel>, <guilabel>Spring MVC Project</guilabel>, <guilabel>RichFaces Project</guilabel>, or any one of many <guilabel>Project Examples</guilabel>. To access a complete list of projects you can create, click on the window icon at the top-right of the <guilabel>Create Projects</guilabel> section <inlinemediaobject>
+ From the <guilabel>Create Projects</guilabel> section you can create a <guilabel>Dynamic Web Project</guilabel>, <guilabel>OpenShift Express Application</guilabel>, <guilabel>Java EE Web Project</guilabel>, <guilabel>Java EE Project</guilabel>, <guilabel>HTML5 Project</guilabel>, <guilabel>Spring MVC Project</guilabel>, <guilabel>RichFaces Project</guilabel>, <guilabel>GWT Web Project</guilabel>, or any one of many <guilabel>Project Examples</guilabel>. To access a complete list of projects you can create, click on the window icon at the top-right of the <guilabel>Create Projects</guilabel> section <inlinemediaobject>
<imageobject>
<imagedata fileref="images/getting_started/jboss_central_icon_01.png"/>
</imageobject>
@@ -58,6 +58,20 @@
</imageobject>
</mediaobject>
</figure>
+ <formalpara>
+ <title>GWT (Google Web Toolkit) Web Project creation</title>
+ <para>
+ To create a GWT web project, the latest m2e-wtp and Google plug-ins have to be installed. If these plug-ins have not been previously installed, the first page of the GWT web project wizard will provide you with the ability to install the plug-ins.
+ </para>
+ </formalpara>
+ <figure>
+ <title>GWT Web Project creation: plug-in page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/jboss_central_05a_gwt.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<para>
Under the <guilabel>Project Examples</guilabel> section you can expand and view <guilabel>JBoss Quickstarts</guilabel>. Each quickstart is an example to assist first time users.
</para>
12 years, 9 months
JBoss Tools SVN: r39209 - trunk/modeshape/tests.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2012-02-29 15:15:11 -0500 (Wed, 29 Feb 2012)
New Revision: 39209
Modified:
trunk/modeshape/tests/pom.xml
Log:
JBIDE-10702
Modified: trunk/modeshape/tests/pom.xml
===================================================================
--- trunk/modeshape/tests/pom.xml 2012-02-29 20:14:48 UTC (rev 39208)
+++ trunk/modeshape/tests/pom.xml 2012-02-29 20:15:11 UTC (rev 39209)
@@ -12,6 +12,7 @@
<name>modeshape.tests</name>
<packaging>pom</packaging>
<modules>
+ <module>org.jboss.tools.modeshape.jcr.test</module>
<module>org.jboss.tools.modeshape.rest.test</module>
<module>org.jboss.tools.modeshape.rest.ui.bot.test</module>
</modules>
12 years, 9 months
JBoss Tools SVN: r39208 - trunk/modeshape/plugins.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2012-02-29 15:14:48 -0500 (Wed, 29 Feb 2012)
New Revision: 39208
Modified:
trunk/modeshape/plugins/pom.xml
Log:
JBIDE-10702
Modified: trunk/modeshape/plugins/pom.xml
===================================================================
--- trunk/modeshape/plugins/pom.xml 2012-02-29 20:10:39 UTC (rev 39207)
+++ trunk/modeshape/plugins/pom.xml 2012-02-29 20:14:48 UTC (rev 39208)
@@ -12,6 +12,8 @@
<name>modeshape.plugins</name>
<packaging>pom</packaging>
<modules>
+ <module>org.jboss.tools.modeshape.client</module>
+ <module>org.jboss.tools.modeshape.jcr</module>
<module>org.jboss.tools.modeshape.rest</module>
<module>org.jboss.tools.modeshape.rest.doc.user</module>
</modules>
12 years, 9 months
JBoss Tools SVN: r39203 - trunk.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2012-02-29 14:21:35 -0500 (Wed, 29 Feb 2012)
New Revision: 39203
Removed:
trunk/plugins/
Log:
Created new plugin in wrong place
12 years, 9 months
JBoss Tools SVN: r39201 - in trunk/documentation/whatsnew/examples: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-02-29 14:07:23 -0500 (Wed, 29 Feb 2012)
New Revision: 39201
Added:
trunk/documentation/whatsnew/examples/examples-news-3.3.0.Beta1.html
trunk/documentation/whatsnew/examples/images/jbide-10264page1.png
trunk/documentation/whatsnew/examples/images/jbide-10264page2.png
trunk/documentation/whatsnew/examples/images/jbide-10264page3.png
trunk/documentation/whatsnew/examples/images/jbide-10264page4.png
trunk/documentation/whatsnew/examples/images/jbide-10264page5.png
Log:
JBIDE-11028 Project Examples in N&N
Added: trunk/documentation/whatsnew/examples/examples-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/examples/examples-news-3.3.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/examples/examples-news-3.3.0.Beta1.html 2012-02-29 19:07:23 UTC (rev 39201)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css"/>
+<title>Examples 3.3.0.Beta1 What's New</title>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-17645367-5']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script></head>
+<body>
+<h1>Examples 3.3.0.M5 What's New</h1>
+<p align="right"><a href="../index.html">< Main Index</a> <a
+href="../maven/maven-news-3.3.0.Beta1.html">Maven Tools ></a>
+</p>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>Project Examples</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemnam1e" id="itemname1"></a><b>New Project Example wizard</b>
+ </td>
+ <td width="70%" valign="top">
+ <p>JBoss Tools now includes a new wizard to download and import project examples.<br/>
+ The wizard starts using Help>Project Examples or by clicking an item in the JBoss Central editor.
+ </p>
+ <p>
+ <img src="images/jbide-10264page1.png" />
+ </p>
+
+ <p>
+ <img src="images/jbide-10264page2.png" />
+ </p>
+
+ <p>
+ <img src="images/jbide-10264page3.png" />
+ </p>
+
+ <p>
+ <img src="images/jbide-10264page4.png" />
+ </p>
+
+ <p>
+ <img src="images/jbide-10264page5.png" />
+ </p>
+ <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-10264">Related Jira</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemnam1e" id="itemname1"></a><b>Project Examples can be dynamically added to JBoss Central</b>
+ </td>
+ <td width="70%" valign="top">
+ <p> A project example can be dynamically added to the Project Examples section of the JBoss Central editor. <br/>
+ It is enough to add the central tag to the project example xml file. The JBoss Quickstarts category in
+ <a href="http://download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml">http://download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml</a>
+ can serve as an example.
+ </p>
+
+ <p><small><a href="https://jira.jboss.org/jira/browse/JBIDE-10641">Related Jira</a></small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemnam1e" id="itemname1"></a><b>Defining a category</b>
+ </td>
+ <td width="70%" valign="top">
+ <p> Now it is possible to add a description and priority for categories as well as a priority for project examples. See
+ <a href="http://download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml">http://download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml</a>
+ </p>
+
+ <p>For more details, see <a href="https://jira.jboss.org/jira/browse/JBIDE-10658">JBIDE-10658</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+</table>
+
+</body>
+
+</html>
Added: trunk/documentation/whatsnew/examples/images/jbide-10264page1.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/examples/images/jbide-10264page1.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/examples/images/jbide-10264page2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/examples/images/jbide-10264page2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/examples/images/jbide-10264page3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/examples/images/jbide-10264page3.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/examples/images/jbide-10264page4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/examples/images/jbide-10264page4.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/examples/images/jbide-10264page5.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/examples/images/jbide-10264page5.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 9 months