Author: rob.stryker(a)jboss.com
Date: 2012-08-03 02:54:29 -0400 (Fri, 03 Aug 2012)
New Revision: 42847
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/SecurityFailureHandler.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java
Log:
JBIDE-12377 code cleanup to assist in testing
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java 2012-08-03
06:50:11 UTC (rev 42846)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/PollThreadUtils.java 2012-08-03
06:54:29 UTC (rev 42847)
@@ -202,18 +202,22 @@
}
}
+ public static IStatus isServerStarted(DelegatingServerBehavior jbsBehavior) {
+ IServerStatePoller poller = PollThreadUtils.getPoller(IServerStatePoller.SERVER_UP,
jbsBehavior.getServer());
+ return isServerStarted(jbsBehavior.getServer(), poller);
+ }
+
/*
* A solution needs to be found here.
* Should ideally use the poller that the server says is its poller,
* but some pollers such as timeout poller cannot actively check
*/
- public static IStatus isServerStarted(DelegatingServerBehavior jbsBehavior) {
- IServerStatePoller poller = PollThreadUtils.getPoller(IServerStatePoller.SERVER_UP,
jbsBehavior.getServer());
+ public static IStatus isServerStarted(IServer server,IServerStatePoller poller ) {
// Need to be able to FORCE the poller to poll immediately
if( poller == null || !(poller instanceof IServerStatePoller2))
poller = new WebPortPoller();
- IStatus started =
((IServerStatePoller2)poller).getCurrentStateSynchronous(jbsBehavior.getServer());
+ IStatus started = ((IServerStatePoller2)poller).getCurrentStateSynchronous(server);
// Trace
Trace.trace(Trace.STRING_FINER, "Checking if a server is already started: " +
started.getMessage()); //$NON-NLS-1$
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/SecurityFailureHandler.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/SecurityFailureHandler.java 2012-08-03
06:50:11 UTC (rev 42846)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/SecurityFailureHandler.java 2012-08-03
06:54:29 UTC (rev 42847)
@@ -29,6 +29,8 @@
@Override
public boolean accepts(IServerProvider serverProvider,
List<String> requiredProperties) {
+ if( requiredProperties.size() > 2)
+ return false;
IServer s = serverProvider.getServer();
JBossServer jbs = ServerConverter.getJBossServer(s);
if( jbs != null && jbs.hasJMXProvider())
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java 2012-08-03
06:50:11 UTC (rev 42846)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/UserPassCredentialProvider.java 2012-08-03
06:54:29 UTC (rev 42847)
@@ -37,6 +37,8 @@
public boolean accepts(IServerProvider serverProvider,
List<String> requiredProperties) {
+ if( requiredProperties.size() > 2)
+ return false;
IServer s = serverProvider.getServer();
JBossServer jbs = ServerConverter.getJBossServer(s);
if( jbs != null && !jbs.hasJMXProvider())
Show replies by date