[jbosstools-commits] JBoss Tools SVN: r24106 - in trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui: views and 1 other directory.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Thu Aug 12 11:24:03 EDT 2010
Author: bfitzpat
Date: 2010-08-12 11:24:02 -0400 (Thu, 12 Aug 2010)
New Revision: 24106
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/views/JAXRSWSTestView2.java
Log:
OPEN - issue JBIDE-6797: Web Service Tester: Add menu item "OPTIONS" for JAX-RS
https://jira.jboss.org/browse/JBIDE-6797
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 2010-08-12 15:16:49 UTC (rev 24105)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUI.properties 2010-08-12 15:24:02 UTC (rev 24106)
@@ -112,6 +112,7 @@
JAXRSWSTestView2_GetFromWSDL_Tooltip=Get from WSDL
JAXRSWSTestView2_Go_Tooltip=Invoke
JAXRSWSTestView2_Headers_Section=Headers
+JAXRSWSTestView2_Msg_No_Results_Check_Headers=No textual results to display. Check Response Headers list.
JAXRSWSTestView2_OpenInEditor_Action=Open in Editor
JAXRSWSTestView2_Parameters_Section=Parameters
JAXRSWSTestView2_RequestDetails_Section=Request Details
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 2010-08-12 15:16:49 UTC (rev 24105)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/messages/JBossWSUIMessages.java 2010-08-12 15:24:02 UTC (rev 24106)
@@ -143,6 +143,7 @@
public static String JAXRSWSTestView2_GetFromWSDL_Tooltip;
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_OpenInEditor_Action;
public static String JAXRSWSTestView2_Parameters_Section;
public static String JAXRSWSTestView2_RequestDetails_Section;
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 2010-08-12 15:16:49 UTC (rev 24105)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java 2010-08-12 15:24:02 UTC (rev 24106)
@@ -130,6 +130,7 @@
private static final String PUT = "PUT";//$NON-NLS-1$
private static final String POST = "POST";//$NON-NLS-1$
private static final String GET = "GET";//$NON-NLS-1$
+ private static final String OPTIONS = "OPTIONS";//$NON-NLS-1$
private static final String JAX_WS = "JAX-WS"; //$NON-NLS-1$
private static final String JAX_RS = "JAX-RS"; //$NON-NLS-1$
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
@@ -577,7 +578,7 @@
CoolItem wsMethodCoolItem = new CoolItem(coolBar, SWT.PUSH | SWT.FLAT);
methodCombo = new Combo(coolBar, SWT.BORDER | SWT.READ_ONLY);
methodCombo.setBackground(form.getBody().getBackground());
- String[] methods = {JAX_WS, GET, POST, PUT, DELETE};
+ String[] methods = {JAX_WS, GET, POST, PUT, DELETE, OPTIONS};
methodCombo.setItems(methods);
methodCombo.pack();
Point size = methodCombo.computeSize (SWT.DEFAULT, SWT.DEFAULT);
@@ -641,6 +642,12 @@
sectionClient.setLayout(new GridLayout());
sectionClient.setLayoutData(new GridData());
+ useBasicAuthCB = toolkit.createButton(sectionClient,
+ JBossWSUIMessages.JAXRSWSTestView2_Checkbox_Basic_Authentication, SWT.CHECK);
+ GridData gd10 = new GridData(SWT.FILL, SWT.NONE, true, false);
+ gd10.horizontalIndent = 3;
+ useBasicAuthCB.setLayoutData(gd10);
+
ExpandableComposite ec = toolkit.createExpandableComposite(sectionClient,
ExpandableComposite.TREE_NODE| ExpandableComposite.TITLE_BAR |
ExpandableComposite.CLIENT_INDENT);
@@ -705,11 +712,6 @@
ec5.setLayoutData(gd9);
ec5.addExpansionListener(new FormExpansionAdapter());
- useBasicAuthCB = toolkit.createButton(sectionClient,
- JBossWSUIMessages.JAXRSWSTestView2_Checkbox_Basic_Authentication, SWT.CHECK);
- GridData gd10 = new GridData(SWT.FILL, SWT.NONE, true, false);
- useBasicAuthCB.setLayoutData(gd10);
-
section.addExpansionListener(new FormExpansionAdapter());
section.setClient(sectionClient);
}
@@ -1064,7 +1066,8 @@
*/
private void setControlsForMethodType ( String methodType ) {
if (getCurrentTestType().equalsIgnoreCase(JAX_RS) &&
- methodType.equalsIgnoreCase(GET)) {
+ (methodType.equalsIgnoreCase(GET) ||
+ methodType.equalsIgnoreCase(OPTIONS))) {
bodyText.setEnabled(false);
} else {
bodyText.setEnabled(true);
@@ -1231,6 +1234,13 @@
}
}
getCurrentHistoryEntry().setResultHeadersList(headers);
+ if (JAXRSWSTestView2.this.resultsText.getText().trim().length() == 0) {
+ if (headers != null && headers.length > 0) {
+ JAXRSWSTestView2.this.resultsText.setText(
+ JBossWSUIMessages.JAXRSWSTestView2_Msg_No_Results_Check_Headers);
+ JAXRSWSTestView2.this.form.reflow(true);
+ }
+ }
history.getEntries().add(getCurrentHistoryEntry());
}
});
More information about the jbosstools-commits
mailing list