JBoss Tools SVN: r41092 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/action and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-16 17:35:31 -0400 (Wed, 16 May 2012)
New Revision: 41092
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
Log:
Fixed - JBIDE-11890
OpenShift Explorer: NPE when launching "New OpenShift Application"
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-05-16 21:35:14 UTC (rev 41091)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-05-16 21:35:31 UTC (rev 41092)
@@ -146,7 +146,7 @@
return null;
}
public List<IApplication> getApplications() throws OpenShiftException, SocketTimeoutException {
- if(checkForPassword()) {
+ if(checkForPassword() && delegate.hasDomain()) {
return delegate.getDefaultDomain().getApplications();
}
return null;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-05-16 21:35:14 UTC (rev 41091)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateApplicationAction.java 2012-05-16 21:35:31 UTC (rev 41092)
@@ -10,19 +10,24 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.action;
+import java.net.SocketTimeoutException;
+
import org.eclipse.jface.viewers.ITreeSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import org.jboss.tools.openshift.express.internal.ui.wizard.NewOpenShiftExpressApplicationWizard;
import org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard;
+import com.openshift.client.OpenShiftException;
+
/**
* @author Xavier Coulon
*/
-public class CreateApplicationAction extends AbstractAction {
+public class CreateApplicationAction extends AbstractAction {
/**
* Constructor
@@ -37,10 +42,10 @@
* created, otherwise, it is displayed. {@inheritDoc}
*/
@Override
- public void run() {
- if (selection != null && selection instanceof ITreeSelection ) {
- Object sel = ((ITreeSelection)selection).getFirstElement();
- if( sel instanceof UserDelegate) {
+ public void run() {
+ if (selection != null && selection instanceof ITreeSelection) {
+ Object sel = ((ITreeSelection) selection).getFirstElement();
+ if (sel instanceof UserDelegate) {
UserDelegate user = (UserDelegate) sel;
OpenShiftExpressApplicationWizard wizard = new NewOpenShiftExpressApplicationWizard(user);
new WizardDialog(new Shell(), wizard).open();
@@ -48,5 +53,26 @@
}
}
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.jface.action.Action#isEnabled()
+ */
+ @Override
+ public boolean isEnabled() {
+ if (selection != null && selection instanceof ITreeSelection) {
+ Object sel = ((ITreeSelection) selection).getFirstElement();
+ if (sel instanceof UserDelegate) {
+ UserDelegate user = (UserDelegate) sel;
+ try {
+ return user.getDefaultDomain() != null;
+ } catch (SocketTimeoutException e) {
+ Logger.error("Failed to check if selected user has a domain", e);
+ } catch (OpenShiftException e) {
+ Logger.error("Failed to check if selected user has a domain", e);
+ }
+ }
+ }
+ return false;
+ }
}
12 years, 8 months
JBoss Tools SVN: r41091 - trunk/documentation/whatsnew/openshift/images.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-16 17:35:14 -0400 (Wed, 16 May 2012)
New Revision: 41091
Modified:
trunk/documentation/whatsnew/openshift/images/delete-domain.png
trunk/documentation/whatsnew/openshift/images/port-forwarding-menu.png
trunk/documentation/whatsnew/openshift/images/show-environment.png
Log:
[JBIDE-11763] writing N&N: updated screenshots
Modified: trunk/documentation/whatsnew/openshift/images/delete-domain.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/whatsnew/openshift/images/port-forwarding-menu.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/whatsnew/openshift/images/show-environment.png
===================================================================
(Binary files differ)
12 years, 8 months
JBoss Tools SVN: r41090 - trunk/documentation/whatsnew/maven.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-05-16 17:24:55 -0400 (Wed, 16 May 2012)
New Revision: 41090
Added:
trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta3.html
Log:
Maven N&N skeleton
Added: trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta3.html
===================================================================
--- trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta3.html (rev 0)
+++ trunk/documentation/whatsnew/maven/maven-news-3.3.0.Beta3.html 2012-05-16 21:24:55 UTC (rev 41090)
@@ -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>What's New in Maven Tools</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>Maven Tools</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a
+href="../ws/openshift-news-2.3.0.Beta3">OpenShift Tools ></a></p>
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>JBoss Maven Integration</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname1" id="itemname1"></a><b>Annotation Processing support</b></td>
+ <td valign="top">
+ <p>TODO Fred</p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-8208">JBIDE-8208</a> for more details.
+ </small></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname2" id="itemname2"></a><b>New GWT configurator</b></td>
+ <td valign="top">
+ <p>TODO Denis</p>
+ <p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-11224">JBIDE-11224</a> and <a href="https://issues.jboss.org/browse/JBIDE-11224">JBIDE-11224</a> for more details.
+ </small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname3" id="itemname3"></a><b>Automatic Source Lookup plugin</b></td>
+ <td valign="top">
+ <p>TODO Snjeza</p>
+ <p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-9688">JBIDE-9688</a> for more details.
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <a name="itemname3" id="itemname4"></a><b>New Hibernate 3.6.x and 4.x maven provided libraries</b></td>
+ <td valign="top">
+ <p>TODO Fred</p>
+ <p>
+ <small>
+ See <a href="https://issues.jboss.org/browse/JBIDE-10911">JBIDE-10911</a> for more details.
+ </small>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
12 years, 8 months
JBoss Tools SVN: r41089 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2012-05-16 17:02:12 -0400 (Wed, 16 May 2012)
New Revision: 41089
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java
Log:
JBIDE-11900 - Fixing issue with single regex parm not parsing correctly when rendering values in url
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java 2012-05-16 20:32:31 UTC (rev 41088)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java 2012-05-16 21:02:12 UTC (rev 41089)
@@ -86,6 +86,34 @@
}
/*
+ * See http://munkymorgy.blogspot.com/2010/01/java-string-search-and-replace.html
+ */
+ private String replaceString(String input, String find, String replace, boolean casesensitive){
+ String input_case_adjusted = input;
+ if (casesensitive == false) {
+ //For Case Insensitive searches
+ //Lowercase everything (but replace in the original string)
+ input_case_adjusted = input.toLowerCase() ;
+ find = find.toLowerCase() ;
+ }
+
+ int startPosition = input_case_adjusted.indexOf(find);
+ String start = ""; //$NON-NLS-1$
+ String end = ""; //$NON-NLS-1$
+
+ if (startPosition >= 0) {
+ if (startPosition > 0) {
+ start = input.substring(0, startPosition);
+ }
+ end = input.substring(startPosition + find.length());
+
+ return start + replace + end;
+ } else {
+ return input;
+ }
+ }
+
+ /*
* If we have values for parms, send them back
* @return
*/
@@ -95,7 +123,7 @@
for (int i = 0; i < parms.length; i++) {
Parameter parm = parms[i];
if (parm.value != null) {
- modified = modified.replaceFirst("\\" + parm.originalString, parm.value);//$NON-NLS-1$
+ modified = replaceString(modified, parm.originalString, parm.value, true);
}
}
modified = modified.replace("//", "/"); //$NON-NLS-1$ //$NON-NLS-2$
12 years, 8 months
JBoss Tools SVN: r41088 - in trunk/documentation/whatsnew/openshift: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-16 16:32:31 -0400 (Wed, 16 May 2012)
New Revision: 41088
Added:
trunk/documentation/whatsnew/openshift/images/create-scalable-applications.png
trunk/documentation/whatsnew/openshift/images/delete-domain.png
trunk/documentation/whatsnew/openshift/images/environment-variables.png
trunk/documentation/whatsnew/openshift/images/port-forwarding-menu.png
trunk/documentation/whatsnew/openshift/images/port-forwarding.png
trunk/documentation/whatsnew/openshift/images/select-existing-project.png
trunk/documentation/whatsnew/openshift/images/show-environment.png
Modified:
trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta3.html
Log:
[JBIDE-11763] writing N&N
Added: trunk/documentation/whatsnew/openshift/images/create-scalable-applications.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/create-scalable-applications.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/delete-domain.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/delete-domain.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/environment-variables.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/environment-variables.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/port-forwarding-menu.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/port-forwarding-menu.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/port-forwarding.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/port-forwarding.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/select-existing-project.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/select-existing-project.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/openshift/images/show-environment.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/openshift/images/show-environment.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta3.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta3.html 2012-05-16 20:31:29 UTC (rev 41087)
+++ trunk/documentation/whatsnew/openshift/openshift-news-2.3.0.Beta3.html 2012-05-16 20:32:31 UTC (rev 41088)
@@ -47,10 +47,12 @@
<b>Show environment</b>
</td>
<td valign="top">
- some content
+ some content<br />
+ <img src="images/show-environment.png" alt="show environment" />
+ <img src="images/environment-variables.png" alt="environment variables""/>
<p>
<small>
- <a href="https://issues.jboss.org/browse/JBIDE-11632">Related Jira</a>,
+ <a href="https://issues.jboss.org/browse/JBIDE-11632">Related Jira</a>
</small>
</p>
</td>
@@ -61,7 +63,9 @@
<b>Port forwarding</b>
</td>
<td valign="top">
- some content
+ some content<br />
+ <img src="images/port-forwarding-menu.png" alt="port forwarding menu" />
+ <img src="images/port-forwarding.png" alt="port forwarding""/>
<p>
<small>
<a href="https://issues.jboss.org/browse/JBIDE-11073">Related Jira</a>,
@@ -75,7 +79,8 @@
<b>Delete Domain</b>
</td>
<td valign="top">
- Delete domain with all applications
+ Delete domain with all applications</br>
+ <img src="images/delete-domain.png" alt="delete domain" />
<p>
<small>
<a href="https://issues.jboss.org/browse/JBIDE-10666">Related Jira</a>,
@@ -97,9 +102,10 @@
</td>
<td valign="top">
some content
+ <img src="images/select-existing-project.png" alt="select any project" />
<p>
<small>
- <a href="https://issues.jboss.org/browse/JBIDE-11162">Related Jira</a>,
+ <a href="https://issues.jboss.org/browse/JBIDE-11162">Related Jira</a>
</small>
</p>
</td>
@@ -110,10 +116,10 @@
<b>Scalable applications</b>
</td>
<td valign="top">
- some content
+ <img src="images/create-scalable-applications.png" alt="create scalable applications" />
<p>
<small>
- <a href="https://issues.jboss.org/browse/JBIDE-11505">Related Jira</a>,
+ <a href="https://issues.jboss.org/browse/JBIDE-11505">Related Jira</a>
</small>
</p>
</td>
@@ -134,7 +140,7 @@
some content
<p>
<small>
- <a href="https://issues.jboss.org/browse/JBIDE-11166">Related Jira</a>,
+ <a href="https://issues.jboss.org/browse/JBIDE-11166">Related Jira</a>
</small>
</p>
</td>
12 years, 8 months
JBoss Tools SVN: r41087 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2012-05-16 16:31:29 -0400 (Wed, 16 May 2012)
New Revision: 41087
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java
Log:
JBIDE-11770 - the parms dialog now understands defaults and populates them in the dialog value field
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java 2012-05-16 20:10:31 UTC (rev 41086)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java 2012-05-16 20:31:29 UTC (rev 41087)
@@ -441,6 +441,26 @@
// ignore, move on
}
}
+ // now handle the default value cases
+ // {from:int=1000}
+ for (int i = 0; i < parms.length; i++) {
+ String regEx = parms[i].regEx;
+ String datatype = parms[i].datatype;
+
+ if ((datatype == null || datatype.trim().isEmpty()) &&
+ (regEx != null && !regEx.trim().isEmpty())) {
+ String[] values = parseString(regEx, "=");//$NON-NLS-1$
+ if (values != null && values.length > 1) {
+ String left = values[0];
+ String right = values[1];
+ if (supportedTypes.contains(left)) {
+ parms[i].datatype = left;
+ parms[i].value = right;
+ parms[i].regEx = null;
+ }
+ }
+ }
+ }
return parms;
}
}
12 years, 8 months
JBoss Tools SVN: r41086 - trunk/requirements/soap.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-05-16 16:10:31 -0400 (Wed, 16 May 2012)
New Revision: 41086
Modified:
trunk/requirements/soap/build.properties
trunk/requirements/soap/buildRequirement.xml
Log:
Added references to SOA-P 5.3.0 - http://jawa05.englab.brq.redhat.com/candidate/soa-5.3.0.ER2/
Modified: trunk/requirements/soap/build.properties
===================================================================
--- trunk/requirements/soap/build.properties 2012-05-16 20:08:51 UTC (rev 41085)
+++ trunk/requirements/soap/build.properties 2012-05-16 20:10:31 UTC (rev 41086)
@@ -34,3 +34,11 @@
soap52.build.archive.md5=4d2768e7291e83240398adf8d57ff8b8
soap52.build.archive.root=jboss-soa-p.5.2.0
+# Added May 16 2012 - ldimaggi
+# http://jawa05.englab.brq.redhat.com/candidate/soa-5.3.0.ER1/soa-p-5.3.0.E...
+soap53.build.uri=http://jawa05.englab.brq.redhat.com/candidate/soa-5.3.0.ER2/
+soap53.build.name=soa-p-5.3.0.ER2
+soap53.build.archive=${soap53.build.name}.zip
+soap53.build.archive.md5=1f70c15b26a0d812ba2a39a96c6a8c57
+soap53.build.archive.root=jboss-soa-p.5.3.0
+
Modified: trunk/requirements/soap/buildRequirement.xml
===================================================================
--- trunk/requirements/soap/buildRequirement.xml 2012-05-16 20:08:51 UTC (rev 41085)
+++ trunk/requirements/soap/buildRequirement.xml 2012-05-16 20:10:31 UTC (rev 41086)
@@ -33,6 +33,15 @@
<param name="build.archive" value="${soap52.build.archive}"/>
<param name="md5" value="${soap52.build.archive.md5}" />
</antcall>
+
+ <antcall target="build.soap">
+ <param name="build.uri" value="${soap53.build.uri}"/>
+ <param name="build.archive" value="${soap53.build.archive}"/>
+ <param name="md5" value="${soap53.build.archive.md5}" />
+ </antcall>
+
+
+
</target>
</project>
12 years, 8 months
JBoss Tools SVN: r41085 - trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-16 16:08:51 -0400 (Wed, 16 May 2012)
New Revision: 41085
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java
Log:
Fixed - JBIDE-11892
JaxRsMetaModelBuilder runs on non-JAXRS enabled projects
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java 2012-05-16 20:04:41 UTC (rev 41084)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java 2012-05-16 20:08:51 UTC (rev 41085)
@@ -16,19 +16,21 @@
import static org.eclipse.jdt.core.IJavaElementDelta.F_REMOVED_FROM_CLASSPATH;
import static org.eclipse.jdt.core.IJavaElementDelta.REMOVED;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
+import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.jboss.tools.ws.jaxrs.core.configuration.ProjectNatureUtils;
import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
/**
- * Listens to all change events (Java elements and resources) and triggers a new
- * job for each change.<br>
- * Yet, it avoids trigger new Jobs for high level changes (JavaModel,
- * WorkspaceRoot, etc.)
+ * Listens to all change events (Java elements and resources) and triggers a new job for each change.<br>
+ * Yet, it avoids trigger new Jobs for high level changes (JavaModel, WorkspaceRoot, etc.)
*
* @author xcoulon
*/
@@ -41,19 +43,41 @@
*/
@Override
public void elementChanged(ElementChangedEvent event) {
- logDelta(event.getDelta(), event.getType());
- Job job = new JaxrsMetamodelBuildJob(event);
- job.schedule();
+ try {
+ if (isApplicable(event.getDelta())) {
+ logDelta(event.getDelta(), event.getType());
+ Job job = new JaxrsMetamodelBuildJob(event);
+ job.schedule();
+ }
+ } catch (CoreException e) {
+ Logger.error("Failed to process Java Element change", e);
+ }
}
+ private boolean isApplicable(IJavaElementDelta delta) throws CoreException {
+ IJavaProject javaProject = delta.getElement().getJavaProject();
+ if (javaProject != null) {
+ IProject project = javaProject.getProject();
+ if (ProjectNatureUtils.isProjectNatureInstalled(project, ProjectNatureUtils.JAXRS_NATURE_ID)) {
+ return true;
+ }
+ }
+ // carry on with children elements.
+ for (IJavaElementDelta affectedChild : delta.getAffectedChildren()) {
+ if(isApplicable(affectedChild)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private void logDelta(final IJavaElementDelta delta, final int eventType) {
IJavaElement element = delta.getElement();
// skip as the project is closed
int deltaKind = retrieveDeltaKind(delta);
int flags = delta.getFlags();
CompilationUnit compilationUnitAST = null;
- final JavaElementDelta event = new JavaElementDelta(element, deltaKind, eventType,
- compilationUnitAST, flags);
+ final JavaElementDelta event = new JavaElementDelta(element, deltaKind, eventType, compilationUnitAST, flags);
Logger.trace("Event {}", event);
// carry on with children elements.
for (IJavaElementDelta affectedChild : delta.getAffectedChildren()) {
@@ -65,8 +89,7 @@
}
/**
- * Retrieves the appropriate kind of the given delta, with some specific
- * adaptations for some element types.
+ * Retrieves the appropriate kind of the given delta, with some specific adaptations for some element types.
*
* @param delta
* the delta.
12 years, 8 months
JBoss Tools SVN: r41084 - trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2012-05-16 16:04:41 -0400 (Wed, 16 May 2012)
New Revision: 41084
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java
Log:
JBIDE-11768 - Fixed handling of MatrixParam in parameter dialog
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java 2012-05-16 19:41:44 UTC (rev 41083)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/dialogs/WSTesterURLInputsDialog.java 2012-05-16 20:04:41 UTC (rev 41084)
@@ -95,7 +95,7 @@
for (int i = 0; i < parms.length; i++) {
Parameter parm = parms[i];
if (parm.value != null) {
- modified = modified.replace(parm.originalString, parm.value);
+ modified = modified.replaceFirst("\\" + parm.originalString, parm.value);//$NON-NLS-1$
}
}
modified = modified.replace("//", "/"); //$NON-NLS-1$ //$NON-NLS-2$
12 years, 8 months
JBoss Tools SVN: r41083 - in trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui: views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2012-05-16 15:41:44 -0400 (Wed, 16 May 2012)
New Revision: 41083
Modified:
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXRSTester.java
trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java
Log:
JBIDE-11732 - Fixing issue with extra '?' in JAX-RS parameterized URL
Modified: trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXRSTester.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXRSTester.java 2012-05-16 19:24:17 UTC (rev 41082)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/JAXRSTester.java 2012-05-16 19:41:44 UTC (rev 41083)
@@ -160,9 +160,9 @@
// build the complete URL
URL url = null;
- if (query != null) {
+ if (query != null && query.trim().length() > 0) {
// add the ? if there are parameters
- if (!address.endsWith("?")) {//$NON-NLS-1$
+ if (!address.endsWith("?") && !address.contains("?")) {//$NON-NLS-1$ //$NON-NLS-2$
// if we're a "GET" - add the ? by default
if (methodType.equalsIgnoreCase("GET")) { //$NON-NLS-1$
@@ -177,6 +177,8 @@
address = address + "?"; //$NON-NLS-1$
}
}
+ } else if (address.contains("?")) { //$NON-NLS-1$
+ address = address + "&"; //$NON-NLS-1$
}
// add parms to the url if we have some
url = new URL(address + query);
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-05-16 19:24:17 UTC (rev 41082)
+++ trunk/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/views/JAXRSWSTestView2.java 2012-05-16 19:41:44 UTC (rev 41083)
@@ -1655,6 +1655,10 @@
getCurrentHistoryEntry().setWsTech(wsTech);
+ if (!getCurrentHistoryEntry().getUrl().contentEquals(urlText)) {
+ getCurrentHistoryEntry().setUrl(urlText);
+ }
+
final String url = getCurrentHistoryEntry().getUrl();
final String action = getCurrentHistoryEntry().getAction();
String tempBody = getCurrentHistoryEntry().getBody();
12 years, 8 months