JBoss Tools SVN: r3547 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: preferencepages and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:42:31 -0400 (Tue, 11 Sep 2007)
New Revision: 3547
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
Log:
Moved many interfaces into as.core.server for public access
Moved PollThread and ServerStatePollerType into as.core.server.internal
Moved the remainder of polling to as.core.extensions.polling
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java 2007-09-11 05:42:28 UTC (rev 3546)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java 2007-09-11 05:42:31 UTC (rev 3547)
@@ -27,7 +27,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.ui.actions.INodeActionDelegate;
import org.jboss.ide.eclipse.as.core.modules.ArchivesBuildListener;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public class PublishAction implements INodeActionDelegate {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java 2007-09-11 05:42:28 UTC (rev 3546)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java 2007-09-11 05:42:31 UTC (rev 3547)
@@ -63,11 +63,11 @@
import org.eclipse.wst.server.core.internal.ServerType;
import org.eclipse.wst.server.ui.ServerUICore;
import org.jboss.ide.eclipse.as.core.ExtensionManager;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.IServerStatePoller;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.ServerStatePollerType;
-import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
+import org.jboss.ide.eclipse.as.core.server.IServerPollingAttributes;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerStatePollerType;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.Messages;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-09-11 05:42:28 UTC (rev 3546)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-09-11 05:42:31 UTC (rev 3547)
@@ -10,7 +10,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.preferencepages.ViewProviderPreferenceComposite;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-09-11 05:42:28 UTC (rev 3546)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-09-11 05:42:31 UTC (rev 3547)
@@ -56,7 +56,7 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.archives.core.model.ArchivesModelCore;
import org.jboss.ide.eclipse.archives.ui.util.composites.FilesetPreviewComposite;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.SimplePropertiesViewExtension;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-09-11 05:42:28 UTC (rev 3546)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-09-11 05:42:31 UTC (rev 3547)
@@ -35,11 +35,11 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.ui.internal.provisional.UIDecoratorManager;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.IServerStatePoller;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.JMXPoller;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread.PollThreadEvent;
+import org.jboss.ide.eclipse.as.core.extensions.polling.JMXPoller;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
+import org.jboss.ide.eclipse.as.core.server.internal.PollThread.PollThreadEvent;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.IEventLogLabelProvider;
/**
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2007-09-11 05:42:28 UTC (rev 3546)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2007-09-11 05:42:31 UTC (rev 3547)
@@ -63,8 +63,8 @@
import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.attributes.IServerStartupParameters;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IServerStartupParameters;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-09-11 05:42:28 UTC (rev 3546)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-09-11 05:42:31 UTC (rev 3547)
@@ -52,7 +52,7 @@
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
16 years, 9 months
JBoss Tools SVN: r3546 - trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:42:28 -0400 (Tue, 11 Sep 2007)
New Revision: 3546
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASClasspathTest.java
Log:
Moved many interfaces into as.core.server for public access
Moved PollThread and ServerStatePollerType into as.core.server.internal
Moved the remainder of polling to as.core.extensions.polling
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASClasspathTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASClasspathTest.java 2007-09-11 05:42:18 UTC (rev 3545)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASClasspathTest.java 2007-09-11 05:42:28 UTC (rev 3546)
@@ -22,7 +22,7 @@
import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.tools.common.test.util.TestProjectProvider;
public class ASClasspathTest extends TestCase {
16 years, 9 months
JBoss Tools SVN: r3545 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:42:18 -0400 (Tue, 11 Sep 2007)
New Revision: 3545
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerPollingAttributes.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStartupParameters.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStatePoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerStatePollerType.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/IServerStatePoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ServerStatePollerType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/NullPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/SingleFilePublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ASLaunchConfigurationConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
Moved many interfaces into as.core.server for public access
Moved PollThread and ServerStatePollerType into as.core.server.internal
Moved the remainder of polling to as.core.extensions.polling
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2007-09-11 05:42:18 UTC (rev 3545)
@@ -25,11 +25,10 @@
org.jboss.ide.eclipse.as.core.extensions.archives,
org.jboss.ide.eclipse.as.core.extensions.descriptors,
org.jboss.ide.eclipse.as.core.extensions.events,
+ org.jboss.ide.eclipse.as.core.extensions.polling,
org.jboss.ide.eclipse.as.core.modules,
org.jboss.ide.eclipse.as.core.publishers,
- org.jboss.ide.eclipse.as.core.runtime,
- org.jboss.ide.eclipse.as.core.runtime.server.polling,
- org.jboss.ide.eclipse.as.core.server.attributes,
+ org.jboss.ide.eclipse.as.core.server,
org.jboss.ide.eclipse.as.core.server.internal,
org.jboss.ide.eclipse.as.core.server.internal.launch,
org.jboss.ide.eclipse.as.core.server.xpl,
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -28,7 +28,7 @@
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.ServerStatePollerType;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerStatePollerType;
/**
*
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling)
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/IServerStatePoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/IServerStatePoller.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/IServerStatePoller.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -1,44 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.runtime.server.polling;
-
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
-
-public interface IServerStatePoller extends IServerPollingAttributes {
-
- public static final boolean SERVER_UP = true;
- public static final boolean SERVER_DOWN = false;
-
- public static final int CANCEL = 0;
- public static final int TIMEOUT_REACHED = 1;
-
- public void beginPolling(IServer server, boolean expectedState, PollThread pt); // expected to launch own thread
- public boolean isComplete() throws PollingException;
- public boolean getState() throws PollingException;
- public void cancel(int type); // cancel the polling
- public void cleanup(); // clean up any resources / processes. Will ALWAYS be called
-
- public class PollingException extends Exception {
- public PollingException(String message) {super(message);}
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/JMXPoller.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -1,283 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.runtime.server.polling;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.security.Principal;
-import java.util.Date;
-import java.util.Properties;
-
-import javax.management.AttributeNotFoundException;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.naming.CommunicationException;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
-import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
-
-public class JMXPoller implements IServerStatePoller {
-
- public static final String STATUS = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.status";
-
- public static final String TYPE_TERMINATED = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.TYPE_TERMINATED";
- public static final String TYPE_RESULT = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.TYPE_RESULT";
-
- public static final int STATE_STARTED = 1;
- public static final int STATE_STOPPED = 0;
- public static final int STATE_TRANSITION = -1;
-
- private int started;
- private boolean canceled;
- private boolean done;
- private IServer server;
- private PollingException pollingException = null;
-
- private EventLogTreeItem event;
-
- public void beginPolling(IServer server, boolean expectedState,
- PollThread pt) {
- this.canceled = false;
- this.done = false;
- this.server = server;
- event = pt.getActiveEvent();
- launchJMXPoller();
- }
-
- private class PollerRunnable implements Runnable {
- public void run() {
- ClassLoader currentLoader = Thread.currentThread()
- .getContextClassLoader();
- ClassLoader twiddleLoader = getClassLoader();
- if( pollingException != null ) {done = true; return;}
- if (twiddleLoader != null) {
- int port = ServerConverter.getJBossServer(server).getJNDIPort();
-
- Thread.currentThread().setContextClassLoader(twiddleLoader);
- Properties props = new Properties();
- props.put("java.naming.factory.initial",
- "org.jnp.interfaces.NamingContextFactory");
- props.put("java.naming.factory.url.pkgs",
- "org.jboss.naming:org.jnp.interfaces");
- props.put("java.naming.provider.url", "jnp://"
- + server.getHost() + ":" + port);
-
- setCredentials();
- if( pollingException != null ) {done = true; return;}
-
- Exception failingException = null;
- while (!done && !canceled) {
- InitialContext ic;
- try {
- ic = new InitialContext(props);
- Object obj = ic.lookup("jmx/invoker/RMIAdaptor");
- ic.close();
- if (obj instanceof MBeanServerConnection) {
- MBeanServerConnection connection = (MBeanServerConnection) obj;
- Object attInfo = connection.getAttribute(
- new ObjectName("jboss.system:type=Server"),
- "Started");
- boolean b = ((Boolean) attInfo).booleanValue();
- started = b ? STATE_STARTED : STATE_TRANSITION;
- done = b;
- }
- } catch (SecurityException se) {
- pollingException = new PollingSecurityException(
- "Security Exception: " + se.getMessage());
- done = true;
- } catch (CommunicationException ce) {
- started = STATE_STOPPED;
- } catch (NamingException nnfe) {
- started = STATE_STOPPED;
- } catch (AttributeNotFoundException e) {
- failingException = e;
- } catch (InstanceNotFoundException e) {
- failingException = e;
- } catch (MalformedObjectNameException e) {
- failingException = e;
- } catch (MBeanException e) {
- failingException = e;
- } catch (ReflectionException e) {
- failingException = e;
- } catch (NullPointerException e) {
- failingException = e;
- } catch (IOException e) {
- failingException = e;
- }
- if( failingException != null ) {
- pollingException = new PollingException(failingException.getMessage());
- done = true;
- }
-
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- }
- } // end while
- }
-
- Thread.currentThread().setContextClassLoader(currentLoader);
- }
-
- protected void setCredentials() {
- Exception temp = null;
- try {
- ILaunchConfiguration lc = server.getLaunchConfiguration(true,
- new NullProgressMonitor());
- // get user from the IServer, but override with launch configuration
- String user = ServerConverter.getJBossServer(server).getUsername();
-
- // get password from the IServer, but override with launch configuration
- String pass = ServerConverter.getJBossServer(server).getPassword();
-
- // get our methods
- Class simplePrincipal = Thread.currentThread()
- .getContextClassLoader().loadClass(
- "org.jboss.security.SimplePrincipal");
- Class securityAssoc = Thread.currentThread()
- .getContextClassLoader().loadClass(
- "org.jboss.security.SecurityAssociation");
- securityAssoc.getMethods(); // force-init the methods since the
- // class hasn't been initialized yet.
-
- Constructor newSimplePrincipal = simplePrincipal
- .getConstructor(new Class[] { String.class });
- Object newPrincipalInstance = newSimplePrincipal
- .newInstance(new Object[] { user });
-
- // set the principal
- Method setPrincipalMethod = securityAssoc.getMethod(
- "setPrincipal", new Class[] { Principal.class });
- setPrincipalMethod.invoke(null,
- new Object[] { newPrincipalInstance });
-
- // set the credential
- Method setCredentialMethod = securityAssoc.getMethod(
- "setCredential", new Class[] { Object.class });
- setCredentialMethod.invoke(null, new Object[] { pass });
- } catch (CoreException e) {
- temp = e;
- } catch (ClassNotFoundException e) {
- temp = e;
- } catch (SecurityException e) {
- temp = e;
- } catch (NoSuchMethodException e) {
- temp = e;
- } catch (IllegalArgumentException e) {
- temp = e;
- } catch (InstantiationException e) {
- temp = e;
- } catch (IllegalAccessException e) {
- temp = e;
- } catch (InvocationTargetException e) {
- temp = e;
- }
- if( temp != null ) {
- pollingException = new PollingException(temp.getMessage());
- }
- }
-
- protected ClassLoader getClassLoader() {
- try {
- IRuntime rt = server.getRuntime();
- IPath loc = rt.getLocation();
- URL url = loc.append("client").append("jbossall-client.jar")
- .toFile().toURI().toURL();
- URL url2 = loc.append("bin").append("twiddle.jar").toFile()
- .toURI().toURL();
- URLClassLoader loader = new URLClassLoader(new URL[] { url,
- url2 }, Thread.currentThread().getContextClassLoader());
- return loader;
- } catch (MalformedURLException murle) {
- pollingException = new PollingException(murle.getMessage());
- }
- return null;
- }
- }
-
- private void launchJMXPoller() {
- PollerRunnable run = new PollerRunnable();
- Thread t = new Thread(run, "JMX Poller");
- t.start();
- }
-
- public void cancel(int type) {
- canceled = true;
- }
-
- public void cleanup() {
- }
-
- public class PollingSecurityException extends PollingException {
- public PollingSecurityException(String msg) {
- super(msg);
- }
- }
-
- public boolean getState() throws PollingException {
- if (pollingException != null)
- throw pollingException;
- if (started == 0)
- return SERVER_DOWN;
- if (started == 1)
- return SERVER_UP;
-
- if (!done && !canceled)
- return SERVER_DOWN; // Not there yet.
-
- return SERVER_UP; // done or canceled, doesnt matter
- }
-
- public boolean isComplete() throws PollingException {
- if (pollingException != null)
- throw pollingException;
- return done;
- }
-
- public class JMXPollerEvent extends EventLogTreeItem {
- public JMXPollerEvent(SimpleTreeItem parent, String type, int status,
- boolean expectedState) {
- super(parent, PollThread.SERVER_STATE_MAJOR_TYPE, type);
- setProperty(PollThread.EXPECTED_STATE, new Boolean(expectedState));
- setProperty(STATUS, new Integer(status));
- setProperty(DATE, new Long(new Date().getTime()));
- }
- }
-}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java (from rev 3544, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/JMXPoller.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,285 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.extensions.polling;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.Principal;
+import java.util.Date;
+import java.util.Properties;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.naming.CommunicationException;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
+
+public class JMXPoller implements IServerStatePoller {
+
+ public static final String STATUS = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.status";
+
+ public static final String TYPE_TERMINATED = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.TYPE_TERMINATED";
+ public static final String TYPE_RESULT = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.TYPE_RESULT";
+
+ public static final int STATE_STARTED = 1;
+ public static final int STATE_STOPPED = 0;
+ public static final int STATE_TRANSITION = -1;
+
+ private int started;
+ private boolean canceled;
+ private boolean done;
+ private IServer server;
+ private PollingException pollingException = null;
+
+ private EventLogTreeItem event;
+
+ public void beginPolling(IServer server, boolean expectedState,
+ PollThread pt) {
+ this.canceled = false;
+ this.done = false;
+ this.server = server;
+ event = pt.getActiveEvent();
+ launchJMXPoller();
+ }
+
+ private class PollerRunnable implements Runnable {
+ public void run() {
+ ClassLoader currentLoader = Thread.currentThread()
+ .getContextClassLoader();
+ ClassLoader twiddleLoader = getClassLoader();
+ if( pollingException != null ) {done = true; return;}
+ if (twiddleLoader != null) {
+ int port = ServerConverter.getJBossServer(server).getJNDIPort();
+
+ Thread.currentThread().setContextClassLoader(twiddleLoader);
+ Properties props = new Properties();
+ props.put("java.naming.factory.initial",
+ "org.jnp.interfaces.NamingContextFactory");
+ props.put("java.naming.factory.url.pkgs",
+ "org.jboss.naming:org.jnp.interfaces");
+ props.put("java.naming.provider.url", "jnp://"
+ + server.getHost() + ":" + port);
+
+ setCredentials();
+ if( pollingException != null ) {done = true; return;}
+
+ Exception failingException = null;
+ while (!done && !canceled) {
+ InitialContext ic;
+ try {
+ ic = new InitialContext(props);
+ Object obj = ic.lookup("jmx/invoker/RMIAdaptor");
+ ic.close();
+ if (obj instanceof MBeanServerConnection) {
+ MBeanServerConnection connection = (MBeanServerConnection) obj;
+ Object attInfo = connection.getAttribute(
+ new ObjectName("jboss.system:type=Server"),
+ "Started");
+ boolean b = ((Boolean) attInfo).booleanValue();
+ started = b ? STATE_STARTED : STATE_TRANSITION;
+ done = b;
+ }
+ } catch (SecurityException se) {
+ pollingException = new PollingSecurityException(
+ "Security Exception: " + se.getMessage());
+ done = true;
+ } catch (CommunicationException ce) {
+ started = STATE_STOPPED;
+ } catch (NamingException nnfe) {
+ started = STATE_STOPPED;
+ } catch (AttributeNotFoundException e) {
+ failingException = e;
+ } catch (InstanceNotFoundException e) {
+ failingException = e;
+ } catch (MalformedObjectNameException e) {
+ failingException = e;
+ } catch (MBeanException e) {
+ failingException = e;
+ } catch (ReflectionException e) {
+ failingException = e;
+ } catch (NullPointerException e) {
+ failingException = e;
+ } catch (IOException e) {
+ failingException = e;
+ }
+ if( failingException != null ) {
+ pollingException = new PollingException(failingException.getMessage());
+ done = true;
+ }
+
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ }
+ } // end while
+ }
+
+ Thread.currentThread().setContextClassLoader(currentLoader);
+ }
+
+ protected void setCredentials() {
+ Exception temp = null;
+ try {
+ ILaunchConfiguration lc = server.getLaunchConfiguration(true,
+ new NullProgressMonitor());
+ // get user from the IServer, but override with launch configuration
+ String user = ServerConverter.getJBossServer(server).getUsername();
+
+ // get password from the IServer, but override with launch configuration
+ String pass = ServerConverter.getJBossServer(server).getPassword();
+
+ // get our methods
+ Class simplePrincipal = Thread.currentThread()
+ .getContextClassLoader().loadClass(
+ "org.jboss.security.SimplePrincipal");
+ Class securityAssoc = Thread.currentThread()
+ .getContextClassLoader().loadClass(
+ "org.jboss.security.SecurityAssociation");
+ securityAssoc.getMethods(); // force-init the methods since the
+ // class hasn't been initialized yet.
+
+ Constructor newSimplePrincipal = simplePrincipal
+ .getConstructor(new Class[] { String.class });
+ Object newPrincipalInstance = newSimplePrincipal
+ .newInstance(new Object[] { user });
+
+ // set the principal
+ Method setPrincipalMethod = securityAssoc.getMethod(
+ "setPrincipal", new Class[] { Principal.class });
+ setPrincipalMethod.invoke(null,
+ new Object[] { newPrincipalInstance });
+
+ // set the credential
+ Method setCredentialMethod = securityAssoc.getMethod(
+ "setCredential", new Class[] { Object.class });
+ setCredentialMethod.invoke(null, new Object[] { pass });
+ } catch (CoreException e) {
+ temp = e;
+ } catch (ClassNotFoundException e) {
+ temp = e;
+ } catch (SecurityException e) {
+ temp = e;
+ } catch (NoSuchMethodException e) {
+ temp = e;
+ } catch (IllegalArgumentException e) {
+ temp = e;
+ } catch (InstantiationException e) {
+ temp = e;
+ } catch (IllegalAccessException e) {
+ temp = e;
+ } catch (InvocationTargetException e) {
+ temp = e;
+ }
+ if( temp != null ) {
+ pollingException = new PollingException(temp.getMessage());
+ }
+ }
+
+ protected ClassLoader getClassLoader() {
+ try {
+ IRuntime rt = server.getRuntime();
+ IPath loc = rt.getLocation();
+ URL url = loc.append("client").append("jbossall-client.jar")
+ .toFile().toURI().toURL();
+ URL url2 = loc.append("bin").append("twiddle.jar").toFile()
+ .toURI().toURL();
+ URLClassLoader loader = new URLClassLoader(new URL[] { url,
+ url2 }, Thread.currentThread().getContextClassLoader());
+ return loader;
+ } catch (MalformedURLException murle) {
+ pollingException = new PollingException(murle.getMessage());
+ }
+ return null;
+ }
+ }
+
+ private void launchJMXPoller() {
+ PollerRunnable run = new PollerRunnable();
+ Thread t = new Thread(run, "JMX Poller");
+ t.start();
+ }
+
+ public void cancel(int type) {
+ canceled = true;
+ }
+
+ public void cleanup() {
+ }
+
+ public class PollingSecurityException extends PollingException {
+ public PollingSecurityException(String msg) {
+ super(msg);
+ }
+ }
+
+ public boolean getState() throws PollingException {
+ if (pollingException != null)
+ throw pollingException;
+ if (started == 0)
+ return SERVER_DOWN;
+ if (started == 1)
+ return SERVER_UP;
+
+ if (!done && !canceled)
+ return SERVER_DOWN; // Not there yet.
+
+ return SERVER_UP; // done or canceled, doesnt matter
+ }
+
+ public boolean isComplete() throws PollingException {
+ if (pollingException != null)
+ throw pollingException;
+ return done;
+ }
+
+ public class JMXPollerEvent extends EventLogTreeItem {
+ public JMXPollerEvent(SimpleTreeItem parent, String type, int status,
+ boolean expectedState) {
+ super(parent, PollThread.SERVER_STATE_MAJOR_TYPE, type);
+ setProperty(PollThread.EXPECTED_STATE, new Boolean(expectedState));
+ setProperty(STATUS, new Integer(status));
+ setProperty(DATE, new Long(new Date().getTime()));
+ }
+ }
+}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/PollThread.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -1,265 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.runtime.server.polling;
-
-import java.util.Date;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.internal.ServerType;
-import org.jboss.ide.eclipse.as.core.ExtensionManager;
-import org.jboss.ide.eclipse.as.core.model.EventLogModel;
-import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogRoot;
-import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.IServerStatePoller.PollingException;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
-import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
-import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
-
-/**
- *
- * @author rob.stryker(a)jboss.com
- */
-public class PollThread extends Thread {
- public static final String SERVER_STATE_MAJOR_TYPE = "org.jboss.ide.eclipse.as.core.runtime.server.polling.MajorType";
-
-
- public static final String SERVER_STARTING = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.server.starting";
- public static final String SERVER_STOPPING = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.server.stopping";
- public static final String FAILURE = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.failure";
- public static final String SUCCESS = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.success";
- public static final String POLLER_NOT_FOUND = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.pollerNotFound";
- public static final String POLL_THREAD_ABORTED = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.aborted";
- public static final String POLL_THREAD_TIMEOUT = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.timeout";
- public static final String EXPECTED_STATE = "org.jboss.ide.eclipse.as.core.runtime.server.PollThreadEvent.expectedState";
- public static final String POLL_THREAD_EXCEPTION = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.exception";
- public static final String POLL_THREAD_EXCEPTION_MESSAGE = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.exception.message";
-
-
- private boolean expectedState;
- private IServerStatePoller poller;
- private boolean abort;
- private JBossServerBehavior behavior;
- private EventLogRoot eventRoot;
-
- private PollThreadEvent activeEvent;
-
- public PollThread(String name, boolean expectedState, JBossServerBehavior behavior) {
- super(name);
- this.expectedState = expectedState;
- this.abort = false;
- this.behavior = behavior;
- eventRoot = EventLogModel.getModel(behavior.getServer()).getRoot();
-
- poller = discoverPoller(behavior, expectedState);
- }
-
- protected IServerStatePoller discoverPoller(JBossServerBehavior behavior, boolean expectedState) {
- JBossServer s = ServerConverter.getJBossServer(behavior.getServer());
- ServerAttributeHelper helper = s.getAttributeHelper();
- String key = expectedState == IServerStatePoller.SERVER_UP ?
- IServerPollingAttributes.STARTUP_POLLER_KEY :
- IServerPollingAttributes.SHUTDOWN_POLLER_KEY;
- String defaultPoller = expectedState == IServerStatePoller.SERVER_UP ?
- IServerPollingAttributes.DEFAULT_STARTUP_POLLER :
- IServerPollingAttributes.DEFAULT_SHUTDOWN_POLLER;
- String pollerId = helper.getAttribute(key, defaultPoller);
- ServerStatePollerType type = ExtensionManager.getDefault().getPollerType(pollerId);
- return type == null ? null : type.createPoller();
- }
-
- public void cancel() {
- abort = true;
- }
-
-
- // Getting the timeouts. First from plugin.xml as default, or from user settings.
- public int getTimeout() {
- int timeout;
- JBossServer jbs = ((JBossServer)getServer().loadAdapter(JBossServer.class, null));
- ServerAttributeHelper helper = (ServerAttributeHelper)jbs.getAttributeHelper();
- if( expectedState == IServerStatePoller.SERVER_UP) {
- int def = ((ServerType)getServer().getServerType()).getStartTimeout();
- timeout = helper.getAttribute(IServerPollingAttributes.START_TIMEOUT, def);
- } else {
- int def = ((ServerType)getServer().getServerType()).getStopTimeout();
- timeout = helper.getAttribute(IServerPollingAttributes.STOP_TIMEOUT, def);
- }
- return timeout;
- }
-
-
- public void run() {
- // Poller not found
- if( poller == null ) {
- alertEventLogStarting();
- alertPollerNotFound();
- alertBehavior(getTimeoutBehavior(), false);
- return;
- }
-
- int maxWait = getTimeout();
- alertEventLogStarting();
-
- long startTime = new Date().getTime();
- boolean done = false;
- poller.beginPolling(getServer(), expectedState, this);
-
- // begin the loop; ask the poller every so often
- while( !abort && !done && new Date().getTime() < startTime + maxWait ) {
- try {
- Thread.sleep(100);
- } catch( InterruptedException ie ) { }
-
- try {
- done = poller.isComplete();
- } catch( PollingException e ) {
- // abort and put the message in event log
- poller.cancel(IServerStatePoller.CANCEL);
- poller.cleanup();
- alertEventLogPollerException(e);
- alertBehavior(IServerStatePoller.SERVER_DOWN, false);
- return;
- }
- }
-
- boolean currentState = !expectedState;
- // we stopped. Did we abort?
- if( abort ) {
- poller.cancel(IServerStatePoller.CANCEL);
- poller.cleanup();
- alertEventLogAbort();
- } else {
- boolean finalAlert = true;
- if( done ) {
- // the poller has an answer
- try {
- currentState = poller.getState();
- poller.cleanup();
- } catch( PollingException pe) {
- // abort and put the message in event log
- poller.cancel(IServerStatePoller.CANCEL);
- poller.cleanup();
- alertEventLogPollerException(pe);
- alertBehavior(IServerStatePoller.SERVER_DOWN, false);
- return;
- }
- } else {
- // we timed out. get response from preferences
- poller.cancel(IServerStatePoller.TIMEOUT_REACHED);
- currentState = getTimeoutBehavior();
- poller.cleanup();
- alertEventLogTimeout();
- finalAlert = false;
- }
- alertBehavior(currentState, finalAlert);
- }
- }
-
- protected void alertBehavior(boolean currentState, boolean finalAlert) {
- if( currentState != expectedState ) {
- // it didnt work... cancel all processes! force stop
- behavior.forceStop(false);
- if( finalAlert ) alertEventLogFailure();
- } else {
- if( currentState == IServerStatePoller.SERVER_UP )
- behavior.setServerStarted();
- else {
- behavior.forceStop(false);
- }
- if( finalAlert ) alertEventLogSuccess(currentState);
- }
- }
-
- protected boolean getTimeoutBehavior() {
- // timeout has been reached, so let the user's preferences override
- JBossServer jbs = ((JBossServer)getServer().loadAdapter(JBossServer.class, null));
- ServerAttributeHelper helper = (ServerAttributeHelper)jbs.getAttributeHelper();
-
- boolean behavior = helper.getAttribute(IServerPollingAttributes.TIMEOUT_BEHAVIOR, IServerPollingAttributes.TIMEOUT_IGNORE);
- if( behavior == IServerPollingAttributes.TIMEOUT_ABORT )
- return !expectedState;
-
- return expectedState;
- }
-
- protected IServer getServer() {
- return behavior.getServer();
- }
-
-
- /*
- * Event Log Stuff here!
- */
- protected void alertEventLogStarting() {
- if( expectedState == IServerStatePoller.SERVER_UP) {
- activeEvent = new PollThreadEvent(eventRoot, SERVER_STARTING, expectedState);
- } else {
- activeEvent = new PollThreadEvent(eventRoot, SERVER_STOPPING, expectedState);
- }
- EventLogModel.markChanged(eventRoot);
- }
-
- public PollThreadEvent getActiveEvent() {
- return activeEvent;
- }
-
- protected void alertEventLogPollerException(PollingException e) {
- PollThreadEvent event = new PollThreadEvent(activeEvent, POLL_THREAD_EXCEPTION, expectedState);
- event.setProperty(POLL_THREAD_EXCEPTION_MESSAGE, e.getMessage());
- EventLogModel.markChanged(activeEvent);
- }
-
- protected void alertEventLogAbort() {
- PollThreadEvent event = new PollThreadEvent(activeEvent, POLL_THREAD_ABORTED, expectedState);
- EventLogModel.markChanged(activeEvent);
- }
- protected void alertEventLogTimeout() {
- PollThreadEvent event = new PollThreadEvent(activeEvent, POLL_THREAD_TIMEOUT, expectedState);
- EventLogModel.markChanged(activeEvent);
- }
- protected void alertEventLogFailure() {
- PollThreadEvent event = new PollThreadEvent(eventRoot, FAILURE, expectedState);
- EventLogModel.markChanged(eventRoot);
- }
- protected void alertEventLogSuccess(boolean currentState) {
- PollThreadEvent event = new PollThreadEvent(activeEvent, SUCCESS, expectedState);
- EventLogModel.markChanged(eventRoot);
- }
- protected void alertPollerNotFound() {
- PollThreadEvent event = new PollThreadEvent(activeEvent, POLLER_NOT_FOUND, expectedState);
- EventLogModel.markChanged(activeEvent);
- }
-
- public class PollThreadEvent extends EventLogTreeItem {
- public PollThreadEvent(SimpleTreeItem parent, String type, boolean expectedState) {
- super(parent, SERVER_STATE_MAJOR_TYPE, type);
- setProperty(EXPECTED_STATE, new Boolean(expectedState));
- }
-
- public boolean getExpectedState() {
- return ((Boolean) getProperty(EXPECTED_STATE)).booleanValue();
- }
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -1,38 +0,0 @@
-package org.jboss.ide.eclipse.as.core.runtime.server.polling;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
-
-/**
- * Essentially does nothing because the process already has a listener
- * on it that sets the server state to stopped once the process dies.
- *
- * It's here to make the shutdown include no polling though, thus
- * more efficient.
- * @author rob
- *
- */
-public class ProcessTerminatedPoller implements IServerStatePoller {
-
- private JBossServerBehavior server;
- public void beginPolling(IServer server, boolean expectedState,
- PollThread pt) {
- this.server = (JBossServerBehavior)server.loadAdapter(JBossServerBehavior.class, new NullProgressMonitor());
- }
-
- public void cancel(int type) {
- }
-
- public void cleanup() {
- }
-
- public boolean getState() throws PollingException {
- return !isComplete();
- }
-
- public boolean isComplete() throws PollingException {
- return server.getProcess() == null || server.getProcess().isTerminated();
- }
-
-}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java (from rev 3544, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,40 @@
+package org.jboss.ide.eclipse.as.core.extensions.polling;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
+
+/**
+ * Essentially does nothing because the process already has a listener
+ * on it that sets the server state to stopped once the process dies.
+ *
+ * It's here to make the shutdown include no polling though, thus
+ * more efficient.
+ * @author rob
+ *
+ */
+public class ProcessTerminatedPoller implements IServerStatePoller {
+
+ private JBossServerBehavior server;
+ public void beginPolling(IServer server, boolean expectedState,
+ PollThread pt) {
+ this.server = (JBossServerBehavior)server.loadAdapter(JBossServerBehavior.class, new NullProgressMonitor());
+ }
+
+ public void cancel(int type) {
+ }
+
+ public void cleanup() {
+ }
+
+ public boolean getState() throws PollingException {
+ return !isComplete();
+ }
+
+ public boolean isComplete() throws PollingException {
+ return server.getProcess() == null || server.getProcess().isTerminated();
+ }
+
+}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ServerStatePollerType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ServerStatePollerType.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ServerStatePollerType.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -1,29 +0,0 @@
-package org.jboss.ide.eclipse.as.core.runtime.server.polling;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-
-public class ServerStatePollerType {
- private IConfigurationElement el;
- public ServerStatePollerType(IConfigurationElement el) {
- this.el = el;
- }
- public boolean supportsStartup() {
- return Boolean.parseBoolean(el.getAttribute("supportsStartup"));
- }
- public boolean supportsShutdown() {
- return Boolean.parseBoolean(el.getAttribute("supportsShutdown"));
- }
- public String getName() {
- return el.getAttribute("name");
- }
- public String getId() {
- return el.getAttribute("id");
- }
- public IServerStatePoller createPoller() {
- try {
- return (IServerStatePoller)el.createExecutableExtension("class");
- } catch( Exception e ) {
- }
- return null;
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -1,86 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.runtime.server.polling;
-
-import java.util.Date;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.internal.ServerType;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
-import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
-
-// Wait 15 seconds, then say it's at it's expected state
-public class TimeoutPoller implements IServerStatePoller {
-
- private boolean expectedState;
- private long endTime;
- private IServer server;
- int timeout = -1;
-
-
- public void beginPolling(IServer server, boolean expectedState, PollThread pt) {
- this.expectedState = expectedState;
- this.server = server;
- this.endTime = new Date().getTime() + getTimeout() - 2000;
- }
-
- public void cancel(int type) {
- }
-
- public boolean getState() {
- if( new Date().getTime() > endTime ) return expectedState;
- return !expectedState;
- }
-
- public boolean isComplete() {
- if( new Date().getTime() > endTime ) return true;
- return false;
- }
-
- public void cleanup() {
- }
-
- public int getTimeout() {
- int timeout;
- JBossServer jbs = ((JBossServer)server.loadAdapter(JBossServer.class, null));
- ServerAttributeHelper helper = (ServerAttributeHelper)jbs.getAttributeHelper();
- if( expectedState == IServerStatePoller.SERVER_UP) {
- int def = ((ServerType)server.getServerType()).getStartTimeout();
- timeout = helper.getAttribute(IServerPollingAttributes.START_TIMEOUT, def);
- } else {
- int def = ((ServerType)server.getServerType()).getStopTimeout();
- timeout = helper.getAttribute(IServerPollingAttributes.STOP_TIMEOUT, def);
- }
- return timeout;
- }
-
- public boolean supportsShutdown() {
- return true;
- }
-
- public boolean supportsStartup() {
- return true;
- }
-
-
-}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java (from rev 3544, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,88 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.extensions.polling;
+
+import java.util.Date;
+
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.ServerType;
+import org.jboss.ide.eclipse.as.core.server.IServerPollingAttributes;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+
+// Wait 15 seconds, then say it's at it's expected state
+public class TimeoutPoller implements IServerStatePoller {
+
+ private boolean expectedState;
+ private long endTime;
+ private IServer server;
+ int timeout = -1;
+
+
+ public void beginPolling(IServer server, boolean expectedState, PollThread pt) {
+ this.expectedState = expectedState;
+ this.server = server;
+ this.endTime = new Date().getTime() + getTimeout() - 2000;
+ }
+
+ public void cancel(int type) {
+ }
+
+ public boolean getState() {
+ if( new Date().getTime() > endTime ) return expectedState;
+ return !expectedState;
+ }
+
+ public boolean isComplete() {
+ if( new Date().getTime() > endTime ) return true;
+ return false;
+ }
+
+ public void cleanup() {
+ }
+
+ public int getTimeout() {
+ int timeout;
+ JBossServer jbs = ((JBossServer)server.loadAdapter(JBossServer.class, null));
+ ServerAttributeHelper helper = (ServerAttributeHelper)jbs.getAttributeHelper();
+ if( expectedState == IServerStatePoller.SERVER_UP) {
+ int def = ((ServerType)server.getServerType()).getStartTimeout();
+ timeout = helper.getAttribute(IServerPollingAttributes.START_TIMEOUT, def);
+ } else {
+ int def = ((ServerType)server.getServerType()).getStopTimeout();
+ timeout = helper.getAttribute(IServerPollingAttributes.STOP_TIMEOUT, def);
+ }
+ return timeout;
+ }
+
+ public boolean supportsShutdown() {
+ return true;
+ }
+
+ public boolean supportsStartup() {
+ return true;
+ }
+
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -41,7 +41,7 @@
import org.jboss.ide.eclipse.archives.core.model.other.IArchiveModelListener;
import org.jboss.ide.eclipse.archives.core.util.ModelUtil;
import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory.PackagedModuleDelegate;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.publishers;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.IModuleResourceDelta;
-
-public interface IJBossServerPublisher {
- public IStatus publishModule(int kind, int deltaKind, int modulePublishState,
- IModule module, IProgressMonitor monitor)
- throws CoreException;
- public int getPublishState();
- public void setDelta(IModuleResourceDelta[] delta);
-
-}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -47,7 +47,7 @@
import org.eclipse.wst.server.core.util.PublishUtil;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.NestedPublishInfo;
import org.jboss.ide.eclipse.as.core.server.xpl.ModulePackager;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/NullPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/NullPublisher.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/NullPublisher.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -27,6 +27,7 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
/**
*
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -41,7 +41,8 @@
import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory.PackagedModuleDelegate;
import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.PublishEvent;
import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.PublisherFileUtilListener;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/SingleFilePublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/SingleFilePublisher.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/SingleFilePublisher.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -12,7 +12,8 @@
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.modules.SingleDeployableFactory;
import org.jboss.ide.eclipse.as.core.modules.SingleDeployableFactory.SingleDeployableModuleDelegate;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java (from rev 3541, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IDeployableServer.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,36 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+
+/**
+ *
+ * @author rob.stryker(a)jboss.com
+ */
+public interface IDeployableServer {
+ public String getDeployDirectory();
+ public String getConfigDirectory();
+ public ServerAttributeHelper getAttributeHelper();
+ public IServer getServer();
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublisher.java (from rev 3535, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublisher.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublisher.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+
+public interface IJBossServerPublisher {
+ public IStatus publishModule(int kind, int deltaKind, int modulePublishState,
+ IModule module, IProgressMonitor monitor)
+ throws CoreException;
+ public int getPublishState();
+ public void setDelta(IModuleResourceDelta[] delta);
+
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/IJBossServerRuntime.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,35 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server;
+
+import org.eclipse.jdt.launching.IVMInstall;
+
+public interface IJBossServerRuntime {
+ public static String PROPERTY_VM_ID = "PROPERTY_VM_ID";
+ public static String PROPERTY_VM_TYPE_ID = "PROPERTY_VM_TYPE_ID";
+
+ public static String PROPERTY_CONFIGURATION_NAME = "org.jboss.ide.eclipse.as.core.runtime.configurationName";
+
+ public IVMInstall getVM();
+ public String getJBossConfiguration();
+ public String getId();
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerPollingAttributes.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerPollingAttributes.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerPollingAttributes.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,36 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server;
+
+public interface IServerPollingAttributes {
+ public static final String START_TIMEOUT = "org.jboss.ide.eclipse.as.core.server.attributes.startTimeout";
+ public static final String STOP_TIMEOUT = "org.jboss.ide.eclipse.as.core.server.attributes.stopTimeout";
+
+ public static final String TIMEOUT_BEHAVIOR = "org.jboss.ide.eclipse.as.core.server.attributes.timeoutBehavior";
+ public static final String STARTUP_POLLER_KEY = "org.jboss.ide.eclipse.as.core.server.attributes.startupPollerKey";
+ public static final String SHUTDOWN_POLLER_KEY = "org.jboss.ide.eclipse.as.core.server.attributes.shutdownPollerKey";
+ public static final String DEFAULT_STARTUP_POLLER = "org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller";
+ public static final String DEFAULT_SHUTDOWN_POLLER = "org.jboss.ide.eclipse.as.core.runtime.server.processTerminatedPoller";
+ public static final boolean TIMEOUT_ABORT = true;
+ public static final boolean TIMEOUT_IGNORE = false;
+
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStartupParameters.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerStartupParameters.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStartupParameters.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStartupParameters.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,33 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server;
+
+public interface IServerStartupParameters {
+ public static final String JBOSS_SERVER_HOME_DIR = "jboss.server.home.dir";
+ public static final String JBOSS_SERVER_BASE_DIR = "jboss.server.base.dir";
+ public static final String JBOSS_SERVER_NAME = "jboss.server.name";
+ public static final String JBOSS_HOME_DIR = "jboss.home.dir";
+
+ public static final String DEFAULT_SERVER_NAME = "default";
+ public static final String DEPLOY = "deploy";
+ public static final String SERVER = "server";
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStatePoller.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/IServerStatePoller.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStatePoller.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStatePoller.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,44 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
+
+public interface IServerStatePoller extends IServerPollingAttributes {
+
+ public static final boolean SERVER_UP = true;
+ public static final boolean SERVER_DOWN = false;
+
+ public static final int CANCEL = 0;
+ public static final int TIMEOUT_REACHED = 1;
+
+ public void beginPolling(IServer server, boolean expectedState, PollThread pt); // expected to launch own thread
+ public boolean isComplete() throws PollingException;
+ public boolean getState() throws PollingException;
+ public void cancel(int type); // cancel the polling
+ public void cleanup(); // clean up any resources / processes. Will ALWAYS be called
+
+ public class PollingException extends Exception {
+ public PollingException(String message) {super(message);}
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -36,7 +36,7 @@
import org.eclipse.wst.server.core.internal.ServerPlugin;
import org.eclipse.wst.server.core.model.RuntimeDelegate;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
public abstract class AbstractJBossServerRuntime extends RuntimeDelegate implements IJBossServerRuntime {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -8,7 +8,7 @@
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.model.ServerDelegate;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
public class DeployableServer extends ServerDelegate implements IDeployableServer {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -20,12 +20,12 @@
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory;
-import org.jboss.ide.eclipse.as.core.publishers.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.publishers.JstPublisher;
import org.jboss.ide.eclipse.as.core.publishers.NullPublisher;
import org.jboss.ide.eclipse.as.core.publishers.PackagesPublisher;
import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger;
import org.jboss.ide.eclipse.as.core.publishers.SingleFilePublisher;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.internal.launch.DeployableLaunchConfiguration;
public class DeployableServerBehavior extends ServerBehaviourDelegate {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -46,9 +46,9 @@
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
-import org.jboss.ide.eclipse.as.core.server.attributes.IServerStartupParameters;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IServerStartupParameters;
import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
public class JBossServer extends ServerDelegate
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -31,8 +31,7 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.IServerStatePoller;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,263 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server.internal;
+
+import java.util.Date;
+
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.ServerType;
+import org.jboss.ide.eclipse.as.core.ExtensionManager;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogRoot;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
+import org.jboss.ide.eclipse.as.core.server.IServerPollingAttributes;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller.PollingException;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
+
+/**
+ *
+ * @author rob.stryker(a)jboss.com
+ */
+public class PollThread extends Thread {
+ public static final String SERVER_STATE_MAJOR_TYPE = "org.jboss.ide.eclipse.as.core.runtime.server.polling.MajorType";
+
+
+ public static final String SERVER_STARTING = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.server.starting";
+ public static final String SERVER_STOPPING = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.server.stopping";
+ public static final String FAILURE = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.failure";
+ public static final String SUCCESS = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.success";
+ public static final String POLLER_NOT_FOUND = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.pollerNotFound";
+ public static final String POLL_THREAD_ABORTED = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.aborted";
+ public static final String POLL_THREAD_TIMEOUT = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.timeout";
+ public static final String EXPECTED_STATE = "org.jboss.ide.eclipse.as.core.runtime.server.PollThreadEvent.expectedState";
+ public static final String POLL_THREAD_EXCEPTION = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.exception";
+ public static final String POLL_THREAD_EXCEPTION_MESSAGE = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.exception.message";
+
+
+ private boolean expectedState;
+ private IServerStatePoller poller;
+ private boolean abort;
+ private JBossServerBehavior behavior;
+ private EventLogRoot eventRoot;
+
+ private PollThreadEvent activeEvent;
+
+ public PollThread(String name, boolean expectedState, JBossServerBehavior behavior) {
+ super(name);
+ this.expectedState = expectedState;
+ this.abort = false;
+ this.behavior = behavior;
+ eventRoot = EventLogModel.getModel(behavior.getServer()).getRoot();
+
+ poller = discoverPoller(behavior, expectedState);
+ }
+
+ protected IServerStatePoller discoverPoller(JBossServerBehavior behavior, boolean expectedState) {
+ JBossServer s = ServerConverter.getJBossServer(behavior.getServer());
+ ServerAttributeHelper helper = s.getAttributeHelper();
+ String key = expectedState == IServerStatePoller.SERVER_UP ?
+ IServerPollingAttributes.STARTUP_POLLER_KEY :
+ IServerPollingAttributes.SHUTDOWN_POLLER_KEY;
+ String defaultPoller = expectedState == IServerStatePoller.SERVER_UP ?
+ IServerPollingAttributes.DEFAULT_STARTUP_POLLER :
+ IServerPollingAttributes.DEFAULT_SHUTDOWN_POLLER;
+ String pollerId = helper.getAttribute(key, defaultPoller);
+ ServerStatePollerType type = ExtensionManager.getDefault().getPollerType(pollerId);
+ return type == null ? null : type.createPoller();
+ }
+
+ public void cancel() {
+ abort = true;
+ }
+
+
+ // Getting the timeouts. First from plugin.xml as default, or from user settings.
+ public int getTimeout() {
+ int timeout;
+ JBossServer jbs = ((JBossServer)getServer().loadAdapter(JBossServer.class, null));
+ ServerAttributeHelper helper = (ServerAttributeHelper)jbs.getAttributeHelper();
+ if( expectedState == IServerStatePoller.SERVER_UP) {
+ int def = ((ServerType)getServer().getServerType()).getStartTimeout();
+ timeout = helper.getAttribute(IServerPollingAttributes.START_TIMEOUT, def);
+ } else {
+ int def = ((ServerType)getServer().getServerType()).getStopTimeout();
+ timeout = helper.getAttribute(IServerPollingAttributes.STOP_TIMEOUT, def);
+ }
+ return timeout;
+ }
+
+
+ public void run() {
+ // Poller not found
+ if( poller == null ) {
+ alertEventLogStarting();
+ alertPollerNotFound();
+ alertBehavior(getTimeoutBehavior(), false);
+ return;
+ }
+
+ int maxWait = getTimeout();
+ alertEventLogStarting();
+
+ long startTime = new Date().getTime();
+ boolean done = false;
+ poller.beginPolling(getServer(), expectedState, this);
+
+ // begin the loop; ask the poller every so often
+ while( !abort && !done && new Date().getTime() < startTime + maxWait ) {
+ try {
+ Thread.sleep(100);
+ } catch( InterruptedException ie ) { }
+
+ try {
+ done = poller.isComplete();
+ } catch( PollingException e ) {
+ // abort and put the message in event log
+ poller.cancel(IServerStatePoller.CANCEL);
+ poller.cleanup();
+ alertEventLogPollerException(e);
+ alertBehavior(IServerStatePoller.SERVER_DOWN, false);
+ return;
+ }
+ }
+
+ boolean currentState = !expectedState;
+ // we stopped. Did we abort?
+ if( abort ) {
+ poller.cancel(IServerStatePoller.CANCEL);
+ poller.cleanup();
+ alertEventLogAbort();
+ } else {
+ boolean finalAlert = true;
+ if( done ) {
+ // the poller has an answer
+ try {
+ currentState = poller.getState();
+ poller.cleanup();
+ } catch( PollingException pe) {
+ // abort and put the message in event log
+ poller.cancel(IServerStatePoller.CANCEL);
+ poller.cleanup();
+ alertEventLogPollerException(pe);
+ alertBehavior(IServerStatePoller.SERVER_DOWN, false);
+ return;
+ }
+ } else {
+ // we timed out. get response from preferences
+ poller.cancel(IServerStatePoller.TIMEOUT_REACHED);
+ currentState = getTimeoutBehavior();
+ poller.cleanup();
+ alertEventLogTimeout();
+ finalAlert = false;
+ }
+ alertBehavior(currentState, finalAlert);
+ }
+ }
+
+ protected void alertBehavior(boolean currentState, boolean finalAlert) {
+ if( currentState != expectedState ) {
+ // it didnt work... cancel all processes! force stop
+ behavior.forceStop(false);
+ if( finalAlert ) alertEventLogFailure();
+ } else {
+ if( currentState == IServerStatePoller.SERVER_UP )
+ behavior.setServerStarted();
+ else {
+ behavior.forceStop(false);
+ }
+ if( finalAlert ) alertEventLogSuccess(currentState);
+ }
+ }
+
+ protected boolean getTimeoutBehavior() {
+ // timeout has been reached, so let the user's preferences override
+ JBossServer jbs = ((JBossServer)getServer().loadAdapter(JBossServer.class, null));
+ ServerAttributeHelper helper = (ServerAttributeHelper)jbs.getAttributeHelper();
+
+ boolean behavior = helper.getAttribute(IServerPollingAttributes.TIMEOUT_BEHAVIOR, IServerPollingAttributes.TIMEOUT_IGNORE);
+ if( behavior == IServerPollingAttributes.TIMEOUT_ABORT )
+ return !expectedState;
+
+ return expectedState;
+ }
+
+ protected IServer getServer() {
+ return behavior.getServer();
+ }
+
+
+ /*
+ * Event Log Stuff here!
+ */
+ protected void alertEventLogStarting() {
+ if( expectedState == IServerStatePoller.SERVER_UP) {
+ activeEvent = new PollThreadEvent(eventRoot, SERVER_STARTING, expectedState);
+ } else {
+ activeEvent = new PollThreadEvent(eventRoot, SERVER_STOPPING, expectedState);
+ }
+ EventLogModel.markChanged(eventRoot);
+ }
+
+ public PollThreadEvent getActiveEvent() {
+ return activeEvent;
+ }
+
+ protected void alertEventLogPollerException(PollingException e) {
+ PollThreadEvent event = new PollThreadEvent(activeEvent, POLL_THREAD_EXCEPTION, expectedState);
+ event.setProperty(POLL_THREAD_EXCEPTION_MESSAGE, e.getMessage());
+ EventLogModel.markChanged(activeEvent);
+ }
+
+ protected void alertEventLogAbort() {
+ PollThreadEvent event = new PollThreadEvent(activeEvent, POLL_THREAD_ABORTED, expectedState);
+ EventLogModel.markChanged(activeEvent);
+ }
+ protected void alertEventLogTimeout() {
+ PollThreadEvent event = new PollThreadEvent(activeEvent, POLL_THREAD_TIMEOUT, expectedState);
+ EventLogModel.markChanged(activeEvent);
+ }
+ protected void alertEventLogFailure() {
+ PollThreadEvent event = new PollThreadEvent(eventRoot, FAILURE, expectedState);
+ EventLogModel.markChanged(eventRoot);
+ }
+ protected void alertEventLogSuccess(boolean currentState) {
+ PollThreadEvent event = new PollThreadEvent(activeEvent, SUCCESS, expectedState);
+ EventLogModel.markChanged(eventRoot);
+ }
+ protected void alertPollerNotFound() {
+ PollThreadEvent event = new PollThreadEvent(activeEvent, POLLER_NOT_FOUND, expectedState);
+ EventLogModel.markChanged(activeEvent);
+ }
+
+ public class PollThreadEvent extends EventLogTreeItem {
+ public PollThreadEvent(SimpleTreeItem parent, String type, boolean expectedState) {
+ super(parent, SERVER_STATE_MAJOR_TYPE, type);
+ setProperty(EXPECTED_STATE, new Boolean(expectedState));
+ }
+
+ public boolean getExpectedState() {
+ return ((Boolean) getProperty(EXPECTED_STATE)).booleanValue();
+ }
+ }
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerStatePollerType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerStatePollerType.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerStatePollerType.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -0,0 +1,30 @@
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
+
+public class ServerStatePollerType {
+ private IConfigurationElement el;
+ public ServerStatePollerType(IConfigurationElement el) {
+ this.el = el;
+ }
+ public boolean supportsStartup() {
+ return Boolean.parseBoolean(el.getAttribute("supportsStartup"));
+ }
+ public boolean supportsShutdown() {
+ return Boolean.parseBoolean(el.getAttribute("supportsShutdown"));
+ }
+ public String getName() {
+ return el.getAttribute("name");
+ }
+ public String getId() {
+ return el.getAttribute("id");
+ }
+ public IServerStatePoller createPoller() {
+ try {
+ return (IServerStatePoller)el.createExecutableExtension("class");
+ } catch( Exception e ) {
+ }
+ return null;
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -26,7 +26,7 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -40,7 +40,7 @@
import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.ServerType;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -15,7 +15,7 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -11,7 +11,7 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
public class TwiddleLaunchConfiguration extends AbstractJBossLaunchConfigType {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ASLaunchConfigurationConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ASLaunchConfigurationConverter.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ASLaunchConfigurationConverter.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -66,7 +66,7 @@
import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
import org.eclipse.wst.server.core.internal.Server;
import org.eclipse.wst.server.core.internal.ServerType;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
import org.w3c.dom.Element;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2007-09-11 05:42:18 UTC (rev 3545)
@@ -26,7 +26,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 05:31:36 UTC (rev 3544)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 05:42:18 UTC (rev 3545)
@@ -289,19 +289,19 @@
<extension
point="org.jboss.ide.eclipse.as.core.pollers">
<serverPoller
- class="org.jboss.ide.eclipse.as.core.runtime.server.polling.TimeoutPoller"
+ class="org.jboss.ide.eclipse.as.core.extensions.polling.TimeoutPoller"
id="org.jboss.ide.eclipse.as.core.runtime.server.timeoutpoller"
name="Timeout Poller"
supportsStartup="true"
supportsShutdown="true"/>
<serverPoller
- class="org.jboss.ide.eclipse.as.core.runtime.server.polling.JMXPoller"
+ class="org.jboss.ide.eclipse.as.core.extensions.polling.JMXPoller"
id="org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller"
name="JMX Poller"
supportsStartup="true"
supportsShutdown="false"/>
<serverPoller
- class="org.jboss.ide.eclipse.as.core.runtime.server.polling.ProcessTerminatedPoller"
+ class="org.jboss.ide.eclipse.as.core.extensions.polling.ProcessTerminatedPoller"
id="org.jboss.ide.eclipse.as.core.runtime.server.processTerminatedPoller"
name="Process Terminated Poller"
supportsShutdown="true"
16 years, 9 months
JBoss Tools SVN: r3544 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: editor and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:31:36 -0400 (Tue, 11 Sep 2007)
New Revision: 3544
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/JBossPortsEditorPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
Log:
Moved as.core.server to as.core.server.internal, as thats where those classes will reside.
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -70,7 +70,7 @@
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.views.server.providers.descriptors.XPathPropertyLabelProvider;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/JBossPortsEditorPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/JBossPortsEditorPage.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/JBossPortsEditorPage.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -33,7 +33,7 @@
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.model.ServerDelegate;
import org.eclipse.wst.server.ui.editor.ServerEditorPart;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
public class JBossPortsEditorPage extends ServerEditorPart
{
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -16,7 +16,7 @@
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.eclipse.wst.server.ui.editor.ServerEditorSection;
import org.eclipse.wst.server.ui.internal.command.ServerCommand;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.Messages;
public class ServerPasswordSection extends ServerEditorSection {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -25,7 +25,7 @@
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.eclipse.wst.server.ui.editor.ServerEditorSection;
import org.eclipse.wst.server.ui.internal.command.ServerCommand;
-import org.jboss.ide.eclipse.as.core.server.DeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
import org.jboss.ide.eclipse.as.ui.Messages;
public class StrippedServerDeploySection extends ServerEditorSection {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -65,9 +65,9 @@
import org.jboss.ide.eclipse.as.core.ExtensionManager;
import org.jboss.ide.eclipse.as.core.runtime.server.polling.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.runtime.server.polling.ServerStatePollerType;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.Messages;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -27,7 +27,7 @@
import org.eclipse.wst.server.core.IServerLifecycleListener;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.ui.ServerUICore;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -40,7 +40,7 @@
import org.eclipse.wst.server.ui.internal.view.servers.PublishCleanAction;
import org.eclipse.wst.server.ui.internal.view.servers.StartAction;
import org.eclipse.wst.server.ui.internal.view.servers.StopAction;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.dialogs.TwiddleDialog;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView.IServerViewFrame;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -10,8 +10,8 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.preferencepages.ViewProviderPreferenceComposite;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView;
import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer.ContentWrapper;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -56,8 +56,8 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.archives.core.model.ArchivesModelCore;
import org.jboss.ide.eclipse.archives.ui.util.composites.FilesetPreviewComposite;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.SimplePropertiesViewExtension;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -44,8 +44,8 @@
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.eclipse.wst.server.ui.ServerUICore;
import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
-import org.jboss.ide.eclipse.as.core.server.DeployableServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -39,7 +39,7 @@
import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread;
import org.jboss.ide.eclipse.as.core.runtime.server.polling.JMXPoller;
import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread.PollThreadEvent;
-import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.IEventLogLabelProvider;
/**
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -53,8 +53,8 @@
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.AbstractJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2007-09-11 05:31:32 UTC (rev 3543)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2007-09-11 05:31:36 UTC (rev 3544)
@@ -28,7 +28,7 @@
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.core.server.DeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
16 years, 9 months
JBoss Tools SVN: r3543 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core: runtime and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:31:32 -0400 (Tue, 11 Sep 2007)
New Revision: 3543
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
Log:
Moved as.core.server to as.core.server.internal, as thats where those classes will reside.
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2007-09-11 05:31:29 UTC (rev 3542)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2007-09-11 05:31:32 UTC (rev 3543)
@@ -5,7 +5,7 @@
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.wst.server.core.IRuntime;
import org.jboss.ide.eclipse.as.classpath.core.runtime.WebtoolsProjectJBossClasspathContainerInitializer.WebtoolsProjectJBossClasspathContainer;
-import org.jboss.ide.eclipse.as.core.server.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
public class EJB30SupportVerifier {
public static boolean verify(IRuntime rt) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2007-09-11 05:31:29 UTC (rev 3542)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2007-09-11 05:31:32 UTC (rev 3543)
@@ -34,7 +34,7 @@
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
/**
* @author Marshall
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2007-09-11 05:31:29 UTC (rev 3542)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2007-09-11 05:31:32 UTC (rev 3543)
@@ -9,7 +9,7 @@
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jst.server.core.RuntimeClasspathProviderDelegate;
import org.eclipse.wst.server.core.IRuntime;
-import org.jboss.ide.eclipse.as.core.server.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
public class ClientAllRuntimeClasspathProvider extends
RuntimeClasspathProviderDelegate {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2007-09-11 05:31:29 UTC (rev 3542)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2007-09-11 05:31:32 UTC (rev 3543)
@@ -38,7 +38,7 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.ide.eclipse.as.core.server.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
public class WebtoolsProjectJBossClasspathContainerInitializer extends
16 years, 9 months
JBoss Tools SVN: r3542 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:31:29 -0400 (Tue, 11 Sep 2007)
New Revision: 3542
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossSelectionPage.java
Log:
Moved as.core.server to as.core.server.internal, as thats where those classes will reside.
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java 2007-09-11 05:31:24 UTC (rev 3541)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java 2007-09-11 05:31:29 UTC (rev 3542)
@@ -29,7 +29,7 @@
import org.jboss.ide.eclipse.as.classpath.core.ejb3.EJB3ClasspathContainer;
import org.jboss.ide.eclipse.as.classpath.ui.ClasspathUIPlugin;
import org.jboss.ide.eclipse.as.classpath.ui.Messages;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
public class JBossEJB3LibrariesPage extends JBossSelectionPage implements IClasspathContainerPage
{
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossSelectionPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossSelectionPage.java 2007-09-11 05:31:24 UTC (rev 3541)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossSelectionPage.java 2007-09-11 05:31:29 UTC (rev 3542)
@@ -41,7 +41,7 @@
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.ui.ServerUICore;
import org.eclipse.wst.server.ui.internal.actions.NewServerAction;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public class JBossSelectionPage extends WizardPage {
16 years, 9 months
JBoss Tools SVN: r3541 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:31:24 -0400 (Tue, 11 Sep 2007)
New Revision: 3541
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss32ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss40ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss42ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/NestedPublishInfo.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerAttributeHelper.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/AbstractJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss32ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss40ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss42ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossLaunchAdapter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/NestedPublishInfo.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathCategory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IDeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DeployableLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ASLaunchConfigurationConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
Moved as.core.server to as.core.server.internal, as thats where those classes will reside.
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2007-09-11 05:31:24 UTC (rev 3541)
@@ -29,8 +29,8 @@
org.jboss.ide.eclipse.as.core.publishers,
org.jboss.ide.eclipse.as.core.runtime,
org.jboss.ide.eclipse.as.core.runtime.server.polling,
- org.jboss.ide.eclipse.as.core.server,
org.jboss.ide.eclipse.as.core.server.attributes,
+ org.jboss.ide.eclipse.as.core.server.internal,
org.jboss.ide.eclipse.as.core.server.internal.launch,
org.jboss.ide.eclipse.as.core.server.xpl,
org.jboss.ide.eclipse.as.core.util
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathCategory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathCategory.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathCategory.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -3,7 +3,7 @@
import java.util.HashMap;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
public class XPathCategory {
protected String name; // cannot include delimiter from the model, comma
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -14,8 +14,8 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.server.AbstractJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
public class XPathModel {
public static final String EMPTY_STRING = "org.jboss.ide.eclipse.as.core.model.descriptor.EmptyString";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -41,8 +41,8 @@
import org.jboss.ide.eclipse.archives.core.model.other.IArchiveModelListener;
import org.jboss.ide.eclipse.archives.core.util.ModelUtil;
import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory.PackagedModuleDelegate;
-import org.jboss.ide.eclipse.as.core.server.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
/**
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -47,8 +47,8 @@
import org.eclipse.wst.server.core.util.PublishUtil;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.server.NestedPublishInfo;
import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.NestedPublishInfo;
import org.jboss.ide.eclipse.as.core.server.xpl.ModulePackager;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -30,10 +30,10 @@
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogRoot;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
import org.jboss.ide.eclipse.as.core.runtime.server.polling.IServerStatePoller.PollingException;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -2,7 +2,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
/**
* Essentially does nothing because the process already has a listener
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -25,9 +25,9 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.internal.ServerType;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
// Wait 15 seconds, then say it's at it's expected state
public class TimeoutPoller implements IServerStatePoller {
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/AbstractJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/AbstractJBossServerRuntime.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/AbstractJBossServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,91 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.server;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMInstallType;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.internal.Messages;
-import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-
-public abstract class AbstractJBossServerRuntime extends RuntimeDelegate implements IJBossServerRuntime {
-
- public void setDefaults(IProgressMonitor monitor) {
- getRuntimeWorkingCopy().setLocation(new Path(""));
- }
-
- public IStatus validate() {
- IStatus s = super.validate();
- if( !s.isOK()) return s;
-
- if( getJBossConfiguration().equals(""))
- return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, 0, "Runtime Configuration Not Set", null);
-
- return Status.OK_STATUS;
- }
-
- public void setVMInstall(IVMInstall selectedVM) {
- IRuntimeWorkingCopy copy = getRuntimeWorkingCopy();
- if( copy instanceof RuntimeWorkingCopy ) {
- ((RuntimeWorkingCopy)copy).setAttribute(PROPERTY_VM_ID, selectedVM.getId());
- ((RuntimeWorkingCopy)copy).setAttribute(PROPERTY_VM_TYPE_ID, selectedVM.getVMInstallType().getId());
- try {
- copy.save(true, new NullProgressMonitor());
- } catch( CoreException ce ) {
-
- }
- }
- }
-
- public IVMInstall getVM() {
- String id = getAttribute(PROPERTY_VM_ID, (String)null);
- String type = getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
-
- IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(type);
- IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
-
- for (int i = 0; i < vmInstalls.length; i++) {
- if (id.equals(vmInstalls[i].getId()))
- return vmInstalls[i];
- }
-
- // not found, return default vm
- return JavaRuntime.getDefaultVMInstall();
- }
-
- public String getJBossConfiguration() {
- return getAttribute(PROPERTY_CONFIGURATION_NAME, (String)"");
- }
-
- public abstract String getId();
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServer.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServer.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,77 +0,0 @@
-package org.jboss.ide.eclipse.as.core.server;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
-
-public class DeployableServer extends ServerDelegate implements IDeployableServer {
-
- public static final String DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.stripped.deploy_directory";
-
- public DeployableServer() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerDelegate#canModifyModules(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule[])
- */
- public IStatus canModifyModules(IModule[] add, IModule[] remove) {
- return new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID,0, "OK", null);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerDelegate#getChildModules(org.eclipse.wst.server.core.IModule[])
- */
- public IModule[] getChildModules(IModule[] module) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerDelegate#getRootModules(org.eclipse.wst.server.core.IModule)
- */
- public IModule[] getRootModules(IModule module) throws CoreException {
- return new IModule[] { module };
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.wst.server.core.model.ServerDelegate#modifyModules(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule[], org.eclipse.core.runtime.IProgressMonitor)
- */
- public void modifyModules(IModule[] add, IModule[] remove,
- IProgressMonitor monitor) throws CoreException {
- // TODO Auto-generated method stub
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer#getDeployDirectory()
- */
- public String getDeployDirectory() {
- return getAttribute(DEPLOY_DIRECTORY, "");
- }
-
- /*
- * (non-Javadoc)
- * @see org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer#getAttributeHelper()
- */
- public ServerAttributeHelper getAttributeHelper() {
- IServerWorkingCopy copy = getServerWorkingCopy();
- if( copy == null ) {
- copy = getServer().createWorkingCopy();
- }
- return new ServerAttributeHelper(getServer(), copy);
- }
-
- // only used for xpaths and is a complete crap hack ;) misleading, too
- public String getConfigDirectory() {
- return getDeployDirectory();
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerBehavior.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerBehavior.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,192 +0,0 @@
-package org.jboss.ide.eclipse.as.core.server;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.internal.IModuleVisitor;
-import org.eclipse.wst.server.core.internal.ProgressUtil;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-import org.eclipse.wst.server.core.model.PublishOperation;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory;
-import org.jboss.ide.eclipse.as.core.publishers.IJBossServerPublisher;
-import org.jboss.ide.eclipse.as.core.publishers.JstPublisher;
-import org.jboss.ide.eclipse.as.core.publishers.NullPublisher;
-import org.jboss.ide.eclipse.as.core.publishers.PackagesPublisher;
-import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger;
-import org.jboss.ide.eclipse.as.core.publishers.SingleFilePublisher;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.DeployableLaunchConfiguration;
-
-public class DeployableServerBehavior extends ServerBehaviourDelegate {
-
- public DeployableServerBehavior() {
- }
-
- public void stop(boolean force) {
- setServerStopped(); // simple enough
- }
-
- public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy, IProgressMonitor monitor) throws CoreException {
- workingCopy.setAttribute(DeployableLaunchConfiguration.ACTION_KEY, DeployableLaunchConfiguration.START);
- }
-
-
-
-// public IModuleResourceDelta[] getPublishedResourceDelta(IModule[] module) {
-// return ((Server)getServer()).getPublishedResourceDelta(module);
-// }
-
- private void print(int kind, int deltaKind, String name) {
- System.out.print("publishing module (" + name + "): ");
- switch( kind ) {
- case IServer.PUBLISH_INCREMENTAL: System.out.print("incremental, "); break;
- case IServer.PUBLISH_FULL: System.out.print("full, "); break;
- case IServer.PUBLISH_AUTO: System.out.print("auto, "); break;
- case IServer.PUBLISH_CLEAN: System.out.print("clean, "); break;
- }
- switch( deltaKind ) {
- case ServerBehaviourDelegate.NO_CHANGE: System.out.print("no change"); break;
- case ServerBehaviourDelegate.ADDED: System.out.print("added"); break;
- case ServerBehaviourDelegate.CHANGED: System.out.print("changed"); break;
- case ServerBehaviourDelegate.REMOVED: System.out.print("removed"); break;
- }
- System.out.println(" to server " + getServer().getName() + "(" + getServer().getId() + ")");
- }
- protected void publishModule(int kind, int deltaKind, IModule[] module, IProgressMonitor monitor) throws CoreException {
- // kind = [incremental, full, auto, clean] = [1,2,3,4]
- // delta = [no_change, added, changed, removed] = [0,1,2,3]
- if( module.length == 0 ) return;
- IJBossServerPublisher publisher;
- print(kind, deltaKind, module[0].getName());
- int modulePublishState = getServer().getModulePublishState(module) + 0;
-
- EventLogTreeItem root = EventLogModel.getModel(getServer()).getRoot();
- if( module.length > 1 ) {
- root = PublisherEventLogger.createMultipleModuleTopLevelEvent(root, module.length);
- }
-
- for( int i = 0; i < module.length; i++ ) {
- try {
- if( isJstModule(module[i]) ) {
- publisher = new JstPublisher(getServer(), root);
- } else if( isPackagesTypeModule(module[i]) ) {
- publisher = new PackagesPublisher(getServer(), root);
- } else if( module[i].getModuleType().getId().equals("jboss.singlefile")){
- publisher = new SingleFilePublisher(getServer());
- } else {
- publisher = new NullPublisher();
- }
- publisher.setDelta(getPublishedResourceDelta(module));
- publisher.publishModule(kind, deltaKind, modulePublishState, module[0], monitor);
- setModulePublishState(module, publisher.getPublishState());
- }
- catch( Throwable e ) {e.printStackTrace();}
- }
- }
-
-
-
- /* Temporary and will need to be fixed */
- // TODO: Change to if it is a flex project. Don't know how to do that yet.
- protected boolean isJstModule(IModule mod) {
- String type = mod.getModuleType().getId();
- if( type.equals("jst.ejb") || type.equals("jst.client")
- || type.equals("jst.web") || type.equals("jst.ear"))
- return true;
- return false;
- }
-
- protected boolean isPackagesTypeModule(IModule module) {
- return module.getModuleType().getId().equals(PackageModuleFactory.MODULE_TYPE);
- }
-
- /*
- * Change the state of the server
- */
- public void setServerStarted() {
- setServerState(IServer.STATE_STARTED);
- }
-
- public void setServerStarting() {
- setServerState(IServer.STATE_STARTING);
- }
-
- public void setServerStopped() {
- setServerState(IServer.STATE_STOPPED);
- }
-
- public void setServerStopping() {
- setServerState(IServer.STATE_STOPPING);
- }
-
-
- // Basically stolen from RunOnServerActionDelegate
- public IStatus publishOneModule(int kind, IModule[] module, int deltaKind, IProgressMonitor monitor) {
- ArrayList moduleList = new ArrayList();
- ArrayList deltaKindList = new ArrayList();
- moduleList.add(module);
- deltaKindList.add(new Integer(deltaKind));
-
-
- try {
- ((Server)getServer()).getServerPublishInfo().startCaching();
-
-
- PublishOperation[] tasks = getTasks(kind, moduleList, deltaKindList);
- MultiStatus tempMulti = new MultiStatus(ServerPlugin.PLUGIN_ID, 0, "", null);
- publishStart(ProgressUtil.getSubMonitorFor(monitor, 1000));
- performTasks(tasks, monitor);
- publishServer(kind, ProgressUtil.getSubMonitorFor(monitor, 1000));
- publishModules(kind, moduleList, deltaKindList, tempMulti, monitor);
- publishFinish(ProgressUtil.getSubMonitorFor(monitor, 500));
-
- final List modules2 = new ArrayList();
- ((Server)getServer()).visit(new IModuleVisitor() {
- public boolean visit(IModule[] module) {
- if (((Server)getServer()).getModulePublishState(module) == IServer.PUBLISH_STATE_NONE)
- ((Server)getServer()).getServerPublishInfo().fill(module);
-
- modules2.add(module);
- return true;
- }
- }, monitor);
-
- ((Server)getServer()).getServerPublishInfo().removeDeletedModulePublishInfo(((Server)getServer()), modules2);
- ((Server)getServer()).getServerPublishInfo().clearCache();
- ((Server)getServer()).getServerPublishInfo().save();
-
- return Status.OK_STATUS;
-
- } catch( Exception e ) {
-
- }
- return Status.CANCEL_STATUS;
- }
-
-// protected void addAndRemoveModules(IModule[] module, int deltaKind) {
-// if( getServer() == null ) return;
-// boolean contains = ServerUtil.containsModule(getServer(), module[0], new NullProgressMonitor());
-// try {
-// if( !contains && (deltaKind == ServerBehaviourDelegate.ADDED) || (deltaKind == ServerBehaviourDelegate.CHANGED)) {
-// IServerWorkingCopy wc = getServer().createWorkingCopy();
-// ServerUtil.modifyModules(wc, module, new IModule[0], new NullProgressMonitor());
-// wc.save(false, new NullProgressMonitor());
-// } else if( contains && deltaKind == ServerBehaviourDelegate.REMOVED) {
-// IServerWorkingCopy wc = getServer().createWorkingCopy();
-// ServerUtil.modifyModules(wc, new IModule[0], module, new NullProgressMonitor());
-// wc.save(false, new NullProgressMonitor());
-// }
-// } catch( Exception e ) {} // swallowed
-// }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerRuntime.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,11 +0,0 @@
-package org.jboss.ide.eclipse.as.core.server;
-
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-
-public class DeployableServerRuntime extends RuntimeDelegate {
-
- public DeployableServerRuntime() {
- // TODO Auto-generated constructor stub
- }
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss32ServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss32ServerRuntime.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss32ServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,34 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.server;
-
-
-public class JBoss32ServerRuntime extends AbstractJBossServerRuntime {
-
- public JBoss32ServerRuntime() {
- // TODO Auto-generated constructor stub
- }
-
- public String getId() {
- return "3.2";
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss40ServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss40ServerRuntime.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss40ServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,32 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.server;
-
-
-public class JBoss40ServerRuntime extends AbstractJBossServerRuntime {
-
- public JBoss40ServerRuntime() {
- }
- public String getId() {
- return "4.0";
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss42ServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss42ServerRuntime.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss42ServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,9 +0,0 @@
-package org.jboss.ide.eclipse.as.core.server;
-
-public class JBoss42ServerRuntime extends AbstractJBossServerRuntime {
- public JBoss42ServerRuntime() {
- }
- public String getId() {
- return "4.2";
- }
-}
\ No newline at end of file
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossLaunchAdapter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossLaunchAdapter.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossLaunchAdapter.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,100 +0,0 @@
-package org.jboss.ide.eclipse.as.core.server;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.server.core.EJBBean;
-import org.eclipse.jst.server.core.JndiLaunchable;
-import org.eclipse.jst.server.core.JndiObject;
-import org.eclipse.jst.server.core.Servlet;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.IURLProvider;
-import org.eclipse.wst.server.core.model.LaunchableAdapterDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.core.util.HttpLaunchable;
-import org.eclipse.wst.server.core.util.WebResource;
-
-public class JBossLaunchAdapter extends LaunchableAdapterDelegate {
-
- private static final String JAVA_NAMING_PROVIDER_URL_PROPKEY = "java.naming.provider.url"; //$NON-NLS-1$
- private static final String JAVA_NAMING_FACTORY_INITIAL_PROPKEY = "java.naming.factory.initial"; //$NON-NLS-1$
- public JBossLaunchAdapter() {
- // TODO Auto-generated constructor stub
- }
-
- /*
- * @see ILaunchableAdapterDelegate#getLaunchable(IServer, IModuleObject)
- */
- public Object getLaunchable(IServer server, IModuleArtifact moduleObject) {
- ServerDelegate delegate = (ServerDelegate)server.loadAdapter(ServerDelegate.class,null);
- if (!(delegate instanceof JBossServer ))
- return null;
- if ((moduleObject instanceof Servlet) ||(moduleObject instanceof WebResource))
- return prepareHttpLaunchable(moduleObject, delegate);
-
- if((moduleObject instanceof EJBBean) || (moduleObject instanceof JndiObject))
- return prepareJndiLaunchable(moduleObject,delegate);
- return null;
- }
-
- private Object prepareJndiLaunchable(IModuleArtifact moduleObject, ServerDelegate delegate) {
- JndiLaunchable launchable = null;
- JBossServer server = (JBossServer)delegate;
- IPath p = new Path(server.getConfigDirectory()).append("jndi.properties");
- Properties props = new Properties();
- try {
- props.load(new FileInputStream(p.toFile()));
- } catch( IOException ioe ) {
- props.put(JAVA_NAMING_FACTORY_INITIAL_PROPKEY, "org.jnp.interfaces.NamingContextFactory");
- props.put(JAVA_NAMING_PROVIDER_URL_PROPKEY,"org.jboss.naming:org.jnp.interfaces");
- }
-
- if(moduleObject instanceof EJBBean) {
- EJBBean bean = (EJBBean)moduleObject;
- launchable = new JndiLaunchable(props,bean.getJndiName());
- }
- if(moduleObject instanceof JndiObject) {
- JndiObject jndi = (JndiObject)moduleObject;
- launchable = new JndiLaunchable(props,jndi.getJndiName());
- }
- return launchable;
- }
-
- /**
- * @param moduleObject
- * @param delegate
- * @return object
- */
- private Object prepareHttpLaunchable(IModuleArtifact moduleObject, ServerDelegate delegate) {
- try {
- URL url = ((IURLProvider) delegate).getModuleRootURL(moduleObject.getModule());
-
- if (moduleObject instanceof Servlet) {
- Servlet servlet = (Servlet) moduleObject;
- if (servlet.getAlias() != null) {
- String path = servlet.getAlias();
- if (path.startsWith("/")) //$NON-NLS-1$
- path = path.substring(1);
- url = new URL(url, path);
- } else
- url = new URL(url, servlet.getName()); //$NON-NLS-1$
- } else if (moduleObject instanceof WebResource) {
- WebResource resource = (WebResource) moduleObject;
- String path = resource.getPath().toString();
- if (path != null && path.startsWith("/") && path.length() > 0) //$NON-NLS-1$
- path = path.substring(1);
- if (path != null && path.length() > 0)
- url = new URL(url, path);
- }
- return new HttpLaunchable(url);
- } catch (Exception e) {
- return null;
- }
- }
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,240 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.server;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jst.server.core.IWebModule;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ServerPort;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.model.IURLProvider;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
-import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
-import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
-import org.jboss.ide.eclipse.as.core.server.attributes.IServerStartupParameters;
-import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
-
-public class JBossServer extends ServerDelegate
- implements IServerStartupParameters, IDeployableServer, IURLProvider {
-
- public static final String SERVER_USERNAME = "org.jboss.ide.eclipse.as.core.server.userName";
- public static final String SERVER_PASSWORD = "org.jboss.ide.eclipse.as.core.server.password";
-
- public JBossServer() {
- }
-
- protected void initialize() {
- }
-
- public void setDefaults(IProgressMonitor monitor) {
- }
-
- public void importRuntimeConfiguration(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
- }
-
- public void saveConfiguration(IProgressMonitor monitor) throws CoreException {
- }
-
- public void configurationChanged() {
- }
-
- /*
- * Abstracts to implement
- */
- public IStatus canModifyModules(IModule[] add, IModule[] remove) {
- return new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID,0, "OK", null);
- }
-
- public IModule[] getChildModules(IModule[] module) {
- return null;
- }
-
- // As of now none of my modules are implementing the parent / child nonesense
- public IModule[] getRootModules(IModule module) throws CoreException {
- return new IModule[] { module };
- }
-
- public ServerPort[] getServerPorts() {
- return new ServerPort[0];
- }
-
- public void modifyModules(IModule[] add, IModule[] remove,
- IProgressMonitor monitor) throws CoreException {
- }
-
- public boolean equals(Object o2) {
- if( !(o2 instanceof JBossServer))
- return false;
- JBossServer o2Server = (JBossServer)o2;
- return o2Server.getServer().getId().equals(getServer().getId());
- }
-
-
-
- public ServerAttributeHelper getAttributeHelper() {
- IServerWorkingCopy copy = getServerWorkingCopy();
- if( copy == null ) {
- copy = getServer().createWorkingCopy();
- }
- return new ServerAttributeHelper(getServer(), copy);
- }
-
- public String getConfigDirectory() {
- return getConfigDirectory(true);
- }
- public String getDeployDirectory() {
- return getDeployDirectory(true);
- }
-
- public String getConfigDirectory(boolean checkLaunchConfig) {
- if( !checkLaunchConfig )
- return getRuntimeConfigDirectory();
-
- String configDir = getLaunchConfigConfigurationDirectory();
- if( configDir == null )
- return getRuntimeConfigDirectory();
-
- File f = new File(configDir);
- if( !f.exists() || !f.canRead() || !f.isDirectory())
- return getRuntimeConfigDirectory();
-
- return new Path(configDir).toOSString();
- }
-
- public String getDeployDirectory(boolean checkLaunchConfig) {
- return new Path(getConfigDirectory(checkLaunchConfig) + Path.SEPARATOR + DEPLOY).toOSString();
- }
-
- protected String getLaunchConfigConfigurationDirectory() {
- try {
- Server s = (Server)getServer();
- ILaunchConfiguration lc = s.getLaunchConfiguration(true, new NullProgressMonitor());
- String startArgs = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
- Map map = ArgsUtil.getSystemProperties(startArgs);
-
- if( map.get(JBOSS_SERVER_HOME_DIR) != null )
- return (String)map.get(JBOSS_SERVER_HOME_DIR);
-
- if( map.get(JBOSS_SERVER_BASE_DIR) != null ) {
- String name = map.get(JBOSS_SERVER_NAME) != null ?
- (String)map.get(JBOSS_SERVER_NAME) : DEFAULT_SERVER_NAME;
- return (String)map.get(JBOSS_SERVER_BASE_DIR) + Path.SEPARATOR + name;
- }
-
- if( map.get(JBOSS_HOME_DIR) != null ) {
- return (String)map.get(JBOSS_HOME_DIR) + Path.SEPARATOR + SERVER
- + Path.SEPARATOR + DEFAULT_SERVER_NAME;
- }
- } catch( CoreException ce ) {
- }
- return null;
- }
-
- protected String getRuntimeConfigDirectory() {
- IJBossServerRuntime runtime = (IJBossServerRuntime)
- getServer().getRuntime().loadAdapter(IJBossServerRuntime.class, null);
- String p = getServer().getRuntime().getLocation().toOSString() + Path.SEPARATOR + "server" +
- Path.SEPARATOR + runtime.getJBossConfiguration();
- return new Path(p).toOSString();
- }
-
- private static final IPath JNDI_KEY = new Path("Ports").append("JNDI");
- private static final int JNDI_DEFAULT_PORT = 1099;
- public int getJNDIPort() {
- int port = findPort(JNDI_KEY);
- return port == -1 ? JNDI_DEFAULT_PORT : port;
- }
-
- private static final IPath JBOSS_WEB_KEY = new Path("Ports").append("JBoss Web");
- public static final int JBOSS_WEB_DEFAULT_PORT = 8080;
- public int getJBossWebPort() {
- int port = findPort(JBOSS_WEB_KEY);
- return port == -1 ? JBOSS_WEB_DEFAULT_PORT : port;
- }
-
- protected int findPort(IPath path) {
-
- XPathQuery query = XPathModel.getDefault().getQuery(getServer(), path);
- if(query!=null) {
- String result = query.getFirstResult();
- if( result != null ) {
- try {
- return Integer.parseInt(result);
- } catch(NumberFormatException nfe) {
- return -1;
- }
- }
- }
- return -1;
- }
-
-
-
- public URL getModuleRootURL(IModule module) {
-
- if (module == null || module.loadAdapter(IWebModule.class,null)==null )
- return null;
-
- IWebModule webModule =(IWebModule)module.loadAdapter(IWebModule.class,null);
- String host = getServer().getHost();
- String url = "http://"+host; //$NON-NLS-1$
- int port = getJBossWebPort();
- if (port != 80)
- url += ":" + port; //$NON-NLS-1$
-
- url += "/"+webModule.getContextRoot(); //$NON-NLS-1$
-
- if (!url.endsWith("/")) //$NON-NLS-1$
- url += "/"; //$NON-NLS-1$
-
- try {
- return new URL(url);
- } catch( MalformedURLException murle) { return null; }
- }
-
-
- public String getUsername() {
- return getAttributeHelper().getAttribute(SERVER_USERNAME, "");
- }
-
- public String getPassword() {
- return getAttributeHelper().getAttribute(SERVER_PASSWORD, "");
- }
-}
\ No newline at end of file
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,152 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.server;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.IServerStatePoller;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
-
-public class JBossServerBehavior extends DeployableServerBehavior {
- private PollThread pollThread = null;
- protected transient IProcess process;
- public JBossServerBehavior() {
- super();
- }
-
- public void stop(boolean force) {
- int state = getServer().getServerState();
- if( force || process == null || process.isTerminated() || state == IServer.STATE_STOPPED) {
- forceStop();
- return;
- }
-
- // if we're starting up or shutting down and they've tried again,
- // then force it to stop.
- if( state == IServer.STATE_STARTING || state == IServer.STATE_STOPPING ) {
- pollThread.cancel();
- forceStop();
- return;
- }
-
- new Thread() {public void run() {
- serverStopping();
- StopLaunchConfiguration.stop(getServer());
- }}.start();
- }
-
- public void forceStop() {
- forceStop(true);
- }
-
- public void forceStop(boolean addEvent) {
- // just terminate the process.
- try {
- if( process != null )
- try {
- process.terminate();
- } catch( Exception e ) {}
- process = null;
- setServerStopped();
- if( addEvent ) {
- EventLogTreeItem tpe = new ForceShutdownEvent();
- EventLogModel.markChanged(tpe.getEventRoot());
- }
- } catch( Throwable t ) {
- t.printStackTrace();
- }
- }
-
- public static final String FORCE_SHUTDOWN_EVENT_KEY = "org.jboss.ide.eclipse.as.core.server.JBossServerBehavior.forceShutdown";
- public class ForceShutdownEvent extends EventLogTreeItem {
- public ForceShutdownEvent() {
- super(EventLogModel.getModel(getServer()).getRoot(), PollThread.SERVER_STATE_MAJOR_TYPE, FORCE_SHUTDOWN_EVENT_KEY);
- }
- }
-
- public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy, IProgressMonitor monitor) throws CoreException {
- JBossServerStartupLaunchConfiguration.setupLaunchConfiguration(workingCopy, getServer());
- }
-
-
- protected transient IDebugEventSetListener processListener;
- public void setProcess(final IProcess newProcess) {
- if (process != null)
- return;
-
- process = newProcess;
- if (processListener != null)
- DebugPlugin.getDefault().removeDebugEventListener(processListener);
- if (newProcess == null)
- return;
-
- processListener = new IDebugEventSetListener() {
- public void handleDebugEvents(DebugEvent[] events) {
- if (events != null) {
- int size = events.length;
- for (int i = 0; i < size; i++) {
- if (process != null && process.equals(events[i].getSource()) && events[i].getKind() == DebugEvent.TERMINATE) {
- DebugPlugin.getDefault().removeDebugEventListener(this);
- forceStop(false);
- }
- }
- }
- }
- };
- DebugPlugin.getDefault().addDebugEventListener(processListener);
- }
-
-
-
- public void serverStarting() {
- setServerStarting();
- pollServer(IServerStatePoller.SERVER_UP);
- }
-
- public void serverStopping() {
- setServerStopping();
- pollServer(IServerStatePoller.SERVER_DOWN);
- }
-
- public IProcess getProcess() {
- return process;
- }
-
- protected void pollServer(final boolean expectedState) {
- if( this.pollThread != null ) {
- pollThread.cancel();
- }
- this.pollThread = new PollThread("Server Poller", expectedState, this);
- pollThread.start();
- }
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/NestedPublishInfo.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/NestedPublishInfo.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/NestedPublishInfo.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,99 +0,0 @@
-package org.jboss.ide.eclipse.as.core.server;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.internal.ModulePublishInfo;
-import org.eclipse.wst.server.core.model.IModuleResourceDelta;
-
-
-
-public class NestedPublishInfo {
- public static final String PUBLISH_INFO = "publishInfo";
- public static final String INDEX = "index.properties";
- private static NestedPublishInfo instance;
-
-
- public static NestedPublishInfo getDefault() {
- if( instance == null ) {
- instance = new NestedPublishInfo();
- }
- return instance;
- }
-
- HashMap idToSPI;
- protected NestedPublishInfo() {
- idToSPI = new HashMap();
- }
-
- public NestedServerPublishInfo getServerPublishInfo(IServer server) {
- if( idToSPI.get(server.getId()) == null ) {
- idToSPI.put(server.getId(), new NestedServerPublishInfo());
- }
- return (NestedServerPublishInfo)idToSPI.get(server.getId());
- }
-
- public static class NestedServerPublishInfo {
-
- private HashMap<String, OpenedModulePublishInfo> idToModulePublishInfo;
- public NestedServerPublishInfo() {
- idToModulePublishInfo = new HashMap<String, OpenedModulePublishInfo>();
- }
-
- public ModulePublishInfo getPublishInfo(ArrayList ids, IModule module) {
- String id = getId(ids);
- ModulePublishInfo ret = idToModulePublishInfo.get(id);
- if( ret == null ) {
- ret = new OpenedModulePublishInfo(id, module.getName(), module.getModuleType());
- idToModulePublishInfo.put(id, (OpenedModulePublishInfo) ret);
- }
- return ret;
- }
-
- // Takes a list of the nesting pattern for the modules
- // followed by the desired module (which can share its current resources)
- public IModuleResourceDelta[] getDelta(ArrayList ids, IModule module) {
- return ((OpenedModulePublishInfo)getPublishInfo(ids, module)).getDelta(new IModule[]{module});
- }
-
- protected String getId(ArrayList ids) {
- String result = "";
- Iterator i = ids.iterator();
- while(i.hasNext()) {
- result += i.next().hashCode() + "" + Path.SEPARATOR;
- }
- return result;
- }
- }
-
- public static class OpenedModulePublishInfo extends ModulePublishInfo {
-
- public OpenedModulePublishInfo(DataInput in) throws IOException {
- super(in);
- }
-
- public OpenedModulePublishInfo(String moduleId, String name, IModuleType moduleType) {
- super(moduleId, name, moduleType);
- }
-
- public IModuleResourceDelta[] getDelta(IModule[] module) {
- return super.getDelta(module);
- }
-
- public void load(DataInput in) throws IOException {
- super.load(in);
- }
-
- public void save(DataOutput out) {
- super.save(out);
- }
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -1,119 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.as.core.server;
-
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-
-/**
- * This class just opens up the get and set attributes for a server,
- * and provides saving mechanisms.
- * @author rstryker(a)redhat.com
- *
- */
-public class ServerAttributeHelper {
-
- public static ServerAttributeHelper createHelper(IServer iserver) {
- if( iserver instanceof Server ) {
- IServerWorkingCopy copy = ((Server)iserver).createWorkingCopy();
- if( copy != null ) {
- return new ServerAttributeHelper(iserver, copy);
- }
- }
- return null;
- }
-
- private ServerWorkingCopy wch;
- private IServer server;
- public ServerAttributeHelper(IServer server, IServerWorkingCopy copy) {
- this.wch = (ServerWorkingCopy)copy;
- this.server = server;
- }
-
-
- public IServer getServer() {
- return server;
- }
-
- public void setAttribute(String attributeName, int value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, boolean value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, String value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, List value) {
- wch.setAttribute(attributeName, value);
- }
-
- public void setAttribute(String attributeName, Map value) {
- wch.setAttribute(attributeName, value);
- }
-
- public String getAttribute(String attributeName, String defaultValue) {
- return wch.getAttribute(attributeName, defaultValue);
- }
-
- public int getAttribute(String attributeName, int defaultValue) {
- return wch.getAttribute(attributeName, defaultValue);
- }
-
- public boolean getAttribute(String attributeName, boolean defaultValue) {
- return wch.getAttribute(attributeName, defaultValue);
- }
-
- public List getAttribute(String attributeName, List defaultValue) {
- return wch.getAttribute(attributeName, defaultValue);
- }
-
- public Map getAttribute(String attributeName, Map defaultValue) {
- return wch.getAttribute(attributeName, defaultValue);
- }
-
- public boolean isDirty() {
- return wch.isDirty();
- }
-
- public IServer save(boolean force, IProgressMonitor monitor) throws CoreException {
- return wch.save(force, monitor);
- }
-
- public IServer save() {
- try {
- return save(false, new NullProgressMonitor());
- } catch( Exception e ) {}
- return null;
- }
-}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IDeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IDeployableServer.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IDeployableServer.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -22,7 +22,7 @@
package org.jboss.ide.eclipse.as.core.server.attributes;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
/**
*
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/AbstractJBossServerRuntime.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,91 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server.internal;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstallType;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
+import org.eclipse.wst.server.core.internal.Messages;
+import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
+import org.eclipse.wst.server.core.model.RuntimeDelegate;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+
+public abstract class AbstractJBossServerRuntime extends RuntimeDelegate implements IJBossServerRuntime {
+
+ public void setDefaults(IProgressMonitor monitor) {
+ getRuntimeWorkingCopy().setLocation(new Path(""));
+ }
+
+ public IStatus validate() {
+ IStatus s = super.validate();
+ if( !s.isOK()) return s;
+
+ if( getJBossConfiguration().equals(""))
+ return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, 0, "Runtime Configuration Not Set", null);
+
+ return Status.OK_STATUS;
+ }
+
+ public void setVMInstall(IVMInstall selectedVM) {
+ IRuntimeWorkingCopy copy = getRuntimeWorkingCopy();
+ if( copy instanceof RuntimeWorkingCopy ) {
+ ((RuntimeWorkingCopy)copy).setAttribute(PROPERTY_VM_ID, selectedVM.getId());
+ ((RuntimeWorkingCopy)copy).setAttribute(PROPERTY_VM_TYPE_ID, selectedVM.getVMInstallType().getId());
+ try {
+ copy.save(true, new NullProgressMonitor());
+ } catch( CoreException ce ) {
+
+ }
+ }
+ }
+
+ public IVMInstall getVM() {
+ String id = getAttribute(PROPERTY_VM_ID, (String)null);
+ String type = getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
+
+ IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(type);
+ IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
+
+ for (int i = 0; i < vmInstalls.length; i++) {
+ if (id.equals(vmInstalls[i].getId()))
+ return vmInstalls[i];
+ }
+
+ // not found, return default vm
+ return JavaRuntime.getDefaultVMInstall();
+ }
+
+ public String getJBossConfiguration() {
+ return getAttribute(PROPERTY_CONFIGURATION_NAME, (String)"");
+ }
+
+ public abstract String getId();
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServer.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,77 @@
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.model.ServerDelegate;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+
+public class DeployableServer extends ServerDelegate implements IDeployableServer {
+
+ public static final String DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.stripped.deploy_directory";
+
+ public DeployableServer() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.server.core.model.ServerDelegate#canModifyModules(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule[])
+ */
+ public IStatus canModifyModules(IModule[] add, IModule[] remove) {
+ return new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID,0, "OK", null);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.server.core.model.ServerDelegate#getChildModules(org.eclipse.wst.server.core.IModule[])
+ */
+ public IModule[] getChildModules(IModule[] module) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.server.core.model.ServerDelegate#getRootModules(org.eclipse.wst.server.core.IModule)
+ */
+ public IModule[] getRootModules(IModule module) throws CoreException {
+ return new IModule[] { module };
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.server.core.model.ServerDelegate#modifyModules(org.eclipse.wst.server.core.IModule[], org.eclipse.wst.server.core.IModule[], org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void modifyModules(IModule[] add, IModule[] remove,
+ IProgressMonitor monitor) throws CoreException {
+ // TODO Auto-generated method stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer#getDeployDirectory()
+ */
+ public String getDeployDirectory() {
+ return getAttribute(DEPLOY_DIRECTORY, "");
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer#getAttributeHelper()
+ */
+ public ServerAttributeHelper getAttributeHelper() {
+ IServerWorkingCopy copy = getServerWorkingCopy();
+ if( copy == null ) {
+ copy = getServer().createWorkingCopy();
+ }
+ return new ServerAttributeHelper(getServer(), copy);
+ }
+
+ // only used for xpaths and is a complete crap hack ;) misleading, too
+ public String getConfigDirectory() {
+ return getDeployDirectory();
+ }
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java (from rev 3537, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerBehavior.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,192 @@
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.IModuleVisitor;
+import org.eclipse.wst.server.core.internal.ProgressUtil;
+import org.eclipse.wst.server.core.internal.Server;
+import org.eclipse.wst.server.core.internal.ServerPlugin;
+import org.eclipse.wst.server.core.model.PublishOperation;
+import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
+import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory;
+import org.jboss.ide.eclipse.as.core.publishers.IJBossServerPublisher;
+import org.jboss.ide.eclipse.as.core.publishers.JstPublisher;
+import org.jboss.ide.eclipse.as.core.publishers.NullPublisher;
+import org.jboss.ide.eclipse.as.core.publishers.PackagesPublisher;
+import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger;
+import org.jboss.ide.eclipse.as.core.publishers.SingleFilePublisher;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.DeployableLaunchConfiguration;
+
+public class DeployableServerBehavior extends ServerBehaviourDelegate {
+
+ public DeployableServerBehavior() {
+ }
+
+ public void stop(boolean force) {
+ setServerStopped(); // simple enough
+ }
+
+ public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy, IProgressMonitor monitor) throws CoreException {
+ workingCopy.setAttribute(DeployableLaunchConfiguration.ACTION_KEY, DeployableLaunchConfiguration.START);
+ }
+
+
+
+// public IModuleResourceDelta[] getPublishedResourceDelta(IModule[] module) {
+// return ((Server)getServer()).getPublishedResourceDelta(module);
+// }
+
+ private void print(int kind, int deltaKind, String name) {
+ System.out.print("publishing module (" + name + "): ");
+ switch( kind ) {
+ case IServer.PUBLISH_INCREMENTAL: System.out.print("incremental, "); break;
+ case IServer.PUBLISH_FULL: System.out.print("full, "); break;
+ case IServer.PUBLISH_AUTO: System.out.print("auto, "); break;
+ case IServer.PUBLISH_CLEAN: System.out.print("clean, "); break;
+ }
+ switch( deltaKind ) {
+ case ServerBehaviourDelegate.NO_CHANGE: System.out.print("no change"); break;
+ case ServerBehaviourDelegate.ADDED: System.out.print("added"); break;
+ case ServerBehaviourDelegate.CHANGED: System.out.print("changed"); break;
+ case ServerBehaviourDelegate.REMOVED: System.out.print("removed"); break;
+ }
+ System.out.println(" to server " + getServer().getName() + "(" + getServer().getId() + ")");
+ }
+ protected void publishModule(int kind, int deltaKind, IModule[] module, IProgressMonitor monitor) throws CoreException {
+ // kind = [incremental, full, auto, clean] = [1,2,3,4]
+ // delta = [no_change, added, changed, removed] = [0,1,2,3]
+ if( module.length == 0 ) return;
+ IJBossServerPublisher publisher;
+ print(kind, deltaKind, module[0].getName());
+ int modulePublishState = getServer().getModulePublishState(module) + 0;
+
+ EventLogTreeItem root = EventLogModel.getModel(getServer()).getRoot();
+ if( module.length > 1 ) {
+ root = PublisherEventLogger.createMultipleModuleTopLevelEvent(root, module.length);
+ }
+
+ for( int i = 0; i < module.length; i++ ) {
+ try {
+ if( isJstModule(module[i]) ) {
+ publisher = new JstPublisher(getServer(), root);
+ } else if( isPackagesTypeModule(module[i]) ) {
+ publisher = new PackagesPublisher(getServer(), root);
+ } else if( module[i].getModuleType().getId().equals("jboss.singlefile")){
+ publisher = new SingleFilePublisher(getServer());
+ } else {
+ publisher = new NullPublisher();
+ }
+ publisher.setDelta(getPublishedResourceDelta(module));
+ publisher.publishModule(kind, deltaKind, modulePublishState, module[0], monitor);
+ setModulePublishState(module, publisher.getPublishState());
+ }
+ catch( Throwable e ) {e.printStackTrace();}
+ }
+ }
+
+
+
+ /* Temporary and will need to be fixed */
+ // TODO: Change to if it is a flex project. Don't know how to do that yet.
+ protected boolean isJstModule(IModule mod) {
+ String type = mod.getModuleType().getId();
+ if( type.equals("jst.ejb") || type.equals("jst.client")
+ || type.equals("jst.web") || type.equals("jst.ear"))
+ return true;
+ return false;
+ }
+
+ protected boolean isPackagesTypeModule(IModule module) {
+ return module.getModuleType().getId().equals(PackageModuleFactory.MODULE_TYPE);
+ }
+
+ /*
+ * Change the state of the server
+ */
+ public void setServerStarted() {
+ setServerState(IServer.STATE_STARTED);
+ }
+
+ public void setServerStarting() {
+ setServerState(IServer.STATE_STARTING);
+ }
+
+ public void setServerStopped() {
+ setServerState(IServer.STATE_STOPPED);
+ }
+
+ public void setServerStopping() {
+ setServerState(IServer.STATE_STOPPING);
+ }
+
+
+ // Basically stolen from RunOnServerActionDelegate
+ public IStatus publishOneModule(int kind, IModule[] module, int deltaKind, IProgressMonitor monitor) {
+ ArrayList moduleList = new ArrayList();
+ ArrayList deltaKindList = new ArrayList();
+ moduleList.add(module);
+ deltaKindList.add(new Integer(deltaKind));
+
+
+ try {
+ ((Server)getServer()).getServerPublishInfo().startCaching();
+
+
+ PublishOperation[] tasks = getTasks(kind, moduleList, deltaKindList);
+ MultiStatus tempMulti = new MultiStatus(ServerPlugin.PLUGIN_ID, 0, "", null);
+ publishStart(ProgressUtil.getSubMonitorFor(monitor, 1000));
+ performTasks(tasks, monitor);
+ publishServer(kind, ProgressUtil.getSubMonitorFor(monitor, 1000));
+ publishModules(kind, moduleList, deltaKindList, tempMulti, monitor);
+ publishFinish(ProgressUtil.getSubMonitorFor(monitor, 500));
+
+ final List modules2 = new ArrayList();
+ ((Server)getServer()).visit(new IModuleVisitor() {
+ public boolean visit(IModule[] module) {
+ if (((Server)getServer()).getModulePublishState(module) == IServer.PUBLISH_STATE_NONE)
+ ((Server)getServer()).getServerPublishInfo().fill(module);
+
+ modules2.add(module);
+ return true;
+ }
+ }, monitor);
+
+ ((Server)getServer()).getServerPublishInfo().removeDeletedModulePublishInfo(((Server)getServer()), modules2);
+ ((Server)getServer()).getServerPublishInfo().clearCache();
+ ((Server)getServer()).getServerPublishInfo().save();
+
+ return Status.OK_STATUS;
+
+ } catch( Exception e ) {
+
+ }
+ return Status.CANCEL_STATUS;
+ }
+
+// protected void addAndRemoveModules(IModule[] module, int deltaKind) {
+// if( getServer() == null ) return;
+// boolean contains = ServerUtil.containsModule(getServer(), module[0], new NullProgressMonitor());
+// try {
+// if( !contains && (deltaKind == ServerBehaviourDelegate.ADDED) || (deltaKind == ServerBehaviourDelegate.CHANGED)) {
+// IServerWorkingCopy wc = getServer().createWorkingCopy();
+// ServerUtil.modifyModules(wc, module, new IModule[0], new NullProgressMonitor());
+// wc.save(false, new NullProgressMonitor());
+// } else if( contains && deltaKind == ServerBehaviourDelegate.REMOVED) {
+// IServerWorkingCopy wc = getServer().createWorkingCopy();
+// ServerUtil.modifyModules(wc, new IModule[0], module, new NullProgressMonitor());
+// wc.save(false, new NullProgressMonitor());
+// }
+// } catch( Exception e ) {} // swallowed
+// }
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerRuntime.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/DeployableServerRuntime.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerRuntime.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,11 @@
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import org.eclipse.wst.server.core.model.RuntimeDelegate;
+
+public class DeployableServerRuntime extends RuntimeDelegate {
+
+ public DeployableServerRuntime() {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss32ServerRuntime.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss32ServerRuntime.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss32ServerRuntime.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss32ServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,34 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server.internal;
+
+
+public class JBoss32ServerRuntime extends AbstractJBossServerRuntime {
+
+ public JBoss32ServerRuntime() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public String getId() {
+ return "3.2";
+ }
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss40ServerRuntime.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss40ServerRuntime.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss40ServerRuntime.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss40ServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,32 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server.internal;
+
+
+public class JBoss40ServerRuntime extends AbstractJBossServerRuntime {
+
+ public JBoss40ServerRuntime() {
+ }
+ public String getId() {
+ return "4.0";
+ }
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss42ServerRuntime.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBoss42ServerRuntime.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss42ServerRuntime.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss42ServerRuntime.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,9 @@
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+public class JBoss42ServerRuntime extends AbstractJBossServerRuntime {
+ public JBoss42ServerRuntime() {
+ }
+ public String getId() {
+ return "4.2";
+ }
+}
\ No newline at end of file
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossLaunchAdapter.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,100 @@
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.server.core.EJBBean;
+import org.eclipse.jst.server.core.JndiLaunchable;
+import org.eclipse.jst.server.core.JndiObject;
+import org.eclipse.jst.server.core.Servlet;
+import org.eclipse.wst.server.core.IModuleArtifact;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.model.IURLProvider;
+import org.eclipse.wst.server.core.model.LaunchableAdapterDelegate;
+import org.eclipse.wst.server.core.model.ServerDelegate;
+import org.eclipse.wst.server.core.util.HttpLaunchable;
+import org.eclipse.wst.server.core.util.WebResource;
+
+public class JBossLaunchAdapter extends LaunchableAdapterDelegate {
+
+ private static final String JAVA_NAMING_PROVIDER_URL_PROPKEY = "java.naming.provider.url"; //$NON-NLS-1$
+ private static final String JAVA_NAMING_FACTORY_INITIAL_PROPKEY = "java.naming.factory.initial"; //$NON-NLS-1$
+ public JBossLaunchAdapter() {
+ // TODO Auto-generated constructor stub
+ }
+
+ /*
+ * @see ILaunchableAdapterDelegate#getLaunchable(IServer, IModuleObject)
+ */
+ public Object getLaunchable(IServer server, IModuleArtifact moduleObject) {
+ ServerDelegate delegate = (ServerDelegate)server.loadAdapter(ServerDelegate.class,null);
+ if (!(delegate instanceof JBossServer ))
+ return null;
+ if ((moduleObject instanceof Servlet) ||(moduleObject instanceof WebResource))
+ return prepareHttpLaunchable(moduleObject, delegate);
+
+ if((moduleObject instanceof EJBBean) || (moduleObject instanceof JndiObject))
+ return prepareJndiLaunchable(moduleObject,delegate);
+ return null;
+ }
+
+ private Object prepareJndiLaunchable(IModuleArtifact moduleObject, ServerDelegate delegate) {
+ JndiLaunchable launchable = null;
+ JBossServer server = (JBossServer)delegate;
+ IPath p = new Path(server.getConfigDirectory()).append("jndi.properties");
+ Properties props = new Properties();
+ try {
+ props.load(new FileInputStream(p.toFile()));
+ } catch( IOException ioe ) {
+ props.put(JAVA_NAMING_FACTORY_INITIAL_PROPKEY, "org.jnp.interfaces.NamingContextFactory");
+ props.put(JAVA_NAMING_PROVIDER_URL_PROPKEY,"org.jboss.naming:org.jnp.interfaces");
+ }
+
+ if(moduleObject instanceof EJBBean) {
+ EJBBean bean = (EJBBean)moduleObject;
+ launchable = new JndiLaunchable(props,bean.getJndiName());
+ }
+ if(moduleObject instanceof JndiObject) {
+ JndiObject jndi = (JndiObject)moduleObject;
+ launchable = new JndiLaunchable(props,jndi.getJndiName());
+ }
+ return launchable;
+ }
+
+ /**
+ * @param moduleObject
+ * @param delegate
+ * @return object
+ */
+ private Object prepareHttpLaunchable(IModuleArtifact moduleObject, ServerDelegate delegate) {
+ try {
+ URL url = ((IURLProvider) delegate).getModuleRootURL(moduleObject.getModule());
+
+ if (moduleObject instanceof Servlet) {
+ Servlet servlet = (Servlet) moduleObject;
+ if (servlet.getAlias() != null) {
+ String path = servlet.getAlias();
+ if (path.startsWith("/")) //$NON-NLS-1$
+ path = path.substring(1);
+ url = new URL(url, path);
+ } else
+ url = new URL(url, servlet.getName()); //$NON-NLS-1$
+ } else if (moduleObject instanceof WebResource) {
+ WebResource resource = (WebResource) moduleObject;
+ String path = resource.getPath().toString();
+ if (path != null && path.startsWith("/") && path.length() > 0) //$NON-NLS-1$
+ path = path.substring(1);
+ if (path != null && path.length() > 0)
+ url = new URL(url, path);
+ }
+ return new HttpLaunchable(url);
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServer.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,240 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server.internal;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jst.server.core.IWebModule;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerPort;
+import org.eclipse.wst.server.core.internal.Server;
+import org.eclipse.wst.server.core.model.IURLProvider;
+import org.eclipse.wst.server.core.model.ServerDelegate;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
+import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.attributes.IServerStartupParameters;
+import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
+
+public class JBossServer extends ServerDelegate
+ implements IServerStartupParameters, IDeployableServer, IURLProvider {
+
+ public static final String SERVER_USERNAME = "org.jboss.ide.eclipse.as.core.server.userName";
+ public static final String SERVER_PASSWORD = "org.jboss.ide.eclipse.as.core.server.password";
+
+ public JBossServer() {
+ }
+
+ protected void initialize() {
+ }
+
+ public void setDefaults(IProgressMonitor monitor) {
+ }
+
+ public void importRuntimeConfiguration(IRuntime runtime, IProgressMonitor monitor) throws CoreException {
+ }
+
+ public void saveConfiguration(IProgressMonitor monitor) throws CoreException {
+ }
+
+ public void configurationChanged() {
+ }
+
+ /*
+ * Abstracts to implement
+ */
+ public IStatus canModifyModules(IModule[] add, IModule[] remove) {
+ return new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID,0, "OK", null);
+ }
+
+ public IModule[] getChildModules(IModule[] module) {
+ return null;
+ }
+
+ // As of now none of my modules are implementing the parent / child nonesense
+ public IModule[] getRootModules(IModule module) throws CoreException {
+ return new IModule[] { module };
+ }
+
+ public ServerPort[] getServerPorts() {
+ return new ServerPort[0];
+ }
+
+ public void modifyModules(IModule[] add, IModule[] remove,
+ IProgressMonitor monitor) throws CoreException {
+ }
+
+ public boolean equals(Object o2) {
+ if( !(o2 instanceof JBossServer))
+ return false;
+ JBossServer o2Server = (JBossServer)o2;
+ return o2Server.getServer().getId().equals(getServer().getId());
+ }
+
+
+
+ public ServerAttributeHelper getAttributeHelper() {
+ IServerWorkingCopy copy = getServerWorkingCopy();
+ if( copy == null ) {
+ copy = getServer().createWorkingCopy();
+ }
+ return new ServerAttributeHelper(getServer(), copy);
+ }
+
+ public String getConfigDirectory() {
+ return getConfigDirectory(true);
+ }
+ public String getDeployDirectory() {
+ return getDeployDirectory(true);
+ }
+
+ public String getConfigDirectory(boolean checkLaunchConfig) {
+ if( !checkLaunchConfig )
+ return getRuntimeConfigDirectory();
+
+ String configDir = getLaunchConfigConfigurationDirectory();
+ if( configDir == null )
+ return getRuntimeConfigDirectory();
+
+ File f = new File(configDir);
+ if( !f.exists() || !f.canRead() || !f.isDirectory())
+ return getRuntimeConfigDirectory();
+
+ return new Path(configDir).toOSString();
+ }
+
+ public String getDeployDirectory(boolean checkLaunchConfig) {
+ return new Path(getConfigDirectory(checkLaunchConfig) + Path.SEPARATOR + DEPLOY).toOSString();
+ }
+
+ protected String getLaunchConfigConfigurationDirectory() {
+ try {
+ Server s = (Server)getServer();
+ ILaunchConfiguration lc = s.getLaunchConfiguration(true, new NullProgressMonitor());
+ String startArgs = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
+ Map map = ArgsUtil.getSystemProperties(startArgs);
+
+ if( map.get(JBOSS_SERVER_HOME_DIR) != null )
+ return (String)map.get(JBOSS_SERVER_HOME_DIR);
+
+ if( map.get(JBOSS_SERVER_BASE_DIR) != null ) {
+ String name = map.get(JBOSS_SERVER_NAME) != null ?
+ (String)map.get(JBOSS_SERVER_NAME) : DEFAULT_SERVER_NAME;
+ return (String)map.get(JBOSS_SERVER_BASE_DIR) + Path.SEPARATOR + name;
+ }
+
+ if( map.get(JBOSS_HOME_DIR) != null ) {
+ return (String)map.get(JBOSS_HOME_DIR) + Path.SEPARATOR + SERVER
+ + Path.SEPARATOR + DEFAULT_SERVER_NAME;
+ }
+ } catch( CoreException ce ) {
+ }
+ return null;
+ }
+
+ protected String getRuntimeConfigDirectory() {
+ IJBossServerRuntime runtime = (IJBossServerRuntime)
+ getServer().getRuntime().loadAdapter(IJBossServerRuntime.class, null);
+ String p = getServer().getRuntime().getLocation().toOSString() + Path.SEPARATOR + "server" +
+ Path.SEPARATOR + runtime.getJBossConfiguration();
+ return new Path(p).toOSString();
+ }
+
+ private static final IPath JNDI_KEY = new Path("Ports").append("JNDI");
+ private static final int JNDI_DEFAULT_PORT = 1099;
+ public int getJNDIPort() {
+ int port = findPort(JNDI_KEY);
+ return port == -1 ? JNDI_DEFAULT_PORT : port;
+ }
+
+ private static final IPath JBOSS_WEB_KEY = new Path("Ports").append("JBoss Web");
+ public static final int JBOSS_WEB_DEFAULT_PORT = 8080;
+ public int getJBossWebPort() {
+ int port = findPort(JBOSS_WEB_KEY);
+ return port == -1 ? JBOSS_WEB_DEFAULT_PORT : port;
+ }
+
+ protected int findPort(IPath path) {
+
+ XPathQuery query = XPathModel.getDefault().getQuery(getServer(), path);
+ if(query!=null) {
+ String result = query.getFirstResult();
+ if( result != null ) {
+ try {
+ return Integer.parseInt(result);
+ } catch(NumberFormatException nfe) {
+ return -1;
+ }
+ }
+ }
+ return -1;
+ }
+
+
+
+ public URL getModuleRootURL(IModule module) {
+
+ if (module == null || module.loadAdapter(IWebModule.class,null)==null )
+ return null;
+
+ IWebModule webModule =(IWebModule)module.loadAdapter(IWebModule.class,null);
+ String host = getServer().getHost();
+ String url = "http://"+host; //$NON-NLS-1$
+ int port = getJBossWebPort();
+ if (port != 80)
+ url += ":" + port; //$NON-NLS-1$
+
+ url += "/"+webModule.getContextRoot(); //$NON-NLS-1$
+
+ if (!url.endsWith("/")) //$NON-NLS-1$
+ url += "/"; //$NON-NLS-1$
+
+ try {
+ return new URL(url);
+ } catch( MalformedURLException murle) { return null; }
+ }
+
+
+ public String getUsername() {
+ return getAttributeHelper().getAttribute(SERVER_USERNAME, "");
+ }
+
+ public String getPassword() {
+ return getAttributeHelper().getAttribute(SERVER_PASSWORD, "");
+ }
+}
\ No newline at end of file
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java (from rev 3531, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,152 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server.internal;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
+import org.jboss.ide.eclipse.as.core.runtime.server.polling.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
+
+public class JBossServerBehavior extends DeployableServerBehavior {
+ private PollThread pollThread = null;
+ protected transient IProcess process;
+ public JBossServerBehavior() {
+ super();
+ }
+
+ public void stop(boolean force) {
+ int state = getServer().getServerState();
+ if( force || process == null || process.isTerminated() || state == IServer.STATE_STOPPED) {
+ forceStop();
+ return;
+ }
+
+ // if we're starting up or shutting down and they've tried again,
+ // then force it to stop.
+ if( state == IServer.STATE_STARTING || state == IServer.STATE_STOPPING ) {
+ pollThread.cancel();
+ forceStop();
+ return;
+ }
+
+ new Thread() {public void run() {
+ serverStopping();
+ StopLaunchConfiguration.stop(getServer());
+ }}.start();
+ }
+
+ public void forceStop() {
+ forceStop(true);
+ }
+
+ public void forceStop(boolean addEvent) {
+ // just terminate the process.
+ try {
+ if( process != null )
+ try {
+ process.terminate();
+ } catch( Exception e ) {}
+ process = null;
+ setServerStopped();
+ if( addEvent ) {
+ EventLogTreeItem tpe = new ForceShutdownEvent();
+ EventLogModel.markChanged(tpe.getEventRoot());
+ }
+ } catch( Throwable t ) {
+ t.printStackTrace();
+ }
+ }
+
+ public static final String FORCE_SHUTDOWN_EVENT_KEY = "org.jboss.ide.eclipse.as.core.server.JBossServerBehavior.forceShutdown";
+ public class ForceShutdownEvent extends EventLogTreeItem {
+ public ForceShutdownEvent() {
+ super(EventLogModel.getModel(getServer()).getRoot(), PollThread.SERVER_STATE_MAJOR_TYPE, FORCE_SHUTDOWN_EVENT_KEY);
+ }
+ }
+
+ public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy, IProgressMonitor monitor) throws CoreException {
+ JBossServerStartupLaunchConfiguration.setupLaunchConfiguration(workingCopy, getServer());
+ }
+
+
+ protected transient IDebugEventSetListener processListener;
+ public void setProcess(final IProcess newProcess) {
+ if (process != null)
+ return;
+
+ process = newProcess;
+ if (processListener != null)
+ DebugPlugin.getDefault().removeDebugEventListener(processListener);
+ if (newProcess == null)
+ return;
+
+ processListener = new IDebugEventSetListener() {
+ public void handleDebugEvents(DebugEvent[] events) {
+ if (events != null) {
+ int size = events.length;
+ for (int i = 0; i < size; i++) {
+ if (process != null && process.equals(events[i].getSource()) && events[i].getKind() == DebugEvent.TERMINATE) {
+ DebugPlugin.getDefault().removeDebugEventListener(this);
+ forceStop(false);
+ }
+ }
+ }
+ }
+ };
+ DebugPlugin.getDefault().addDebugEventListener(processListener);
+ }
+
+
+
+ public void serverStarting() {
+ setServerStarting();
+ pollServer(IServerStatePoller.SERVER_UP);
+ }
+
+ public void serverStopping() {
+ setServerStopping();
+ pollServer(IServerStatePoller.SERVER_DOWN);
+ }
+
+ public IProcess getProcess() {
+ return process;
+ }
+
+ protected void pollServer(final boolean expectedState) {
+ if( this.pollThread != null ) {
+ pollThread.cancel();
+ }
+ this.pollThread = new PollThread("Server Poller", expectedState, this);
+ pollThread.start();
+ }
+
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/NestedPublishInfo.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/NestedPublishInfo.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/NestedPublishInfo.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/NestedPublishInfo.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,99 @@
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleType;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.ModulePublishInfo;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+
+
+
+public class NestedPublishInfo {
+ public static final String PUBLISH_INFO = "publishInfo";
+ public static final String INDEX = "index.properties";
+ private static NestedPublishInfo instance;
+
+
+ public static NestedPublishInfo getDefault() {
+ if( instance == null ) {
+ instance = new NestedPublishInfo();
+ }
+ return instance;
+ }
+
+ HashMap idToSPI;
+ protected NestedPublishInfo() {
+ idToSPI = new HashMap();
+ }
+
+ public NestedServerPublishInfo getServerPublishInfo(IServer server) {
+ if( idToSPI.get(server.getId()) == null ) {
+ idToSPI.put(server.getId(), new NestedServerPublishInfo());
+ }
+ return (NestedServerPublishInfo)idToSPI.get(server.getId());
+ }
+
+ public static class NestedServerPublishInfo {
+
+ private HashMap<String, OpenedModulePublishInfo> idToModulePublishInfo;
+ public NestedServerPublishInfo() {
+ idToModulePublishInfo = new HashMap<String, OpenedModulePublishInfo>();
+ }
+
+ public ModulePublishInfo getPublishInfo(ArrayList ids, IModule module) {
+ String id = getId(ids);
+ ModulePublishInfo ret = idToModulePublishInfo.get(id);
+ if( ret == null ) {
+ ret = new OpenedModulePublishInfo(id, module.getName(), module.getModuleType());
+ idToModulePublishInfo.put(id, (OpenedModulePublishInfo) ret);
+ }
+ return ret;
+ }
+
+ // Takes a list of the nesting pattern for the modules
+ // followed by the desired module (which can share its current resources)
+ public IModuleResourceDelta[] getDelta(ArrayList ids, IModule module) {
+ return ((OpenedModulePublishInfo)getPublishInfo(ids, module)).getDelta(new IModule[]{module});
+ }
+
+ protected String getId(ArrayList ids) {
+ String result = "";
+ Iterator i = ids.iterator();
+ while(i.hasNext()) {
+ result += i.next().hashCode() + "" + Path.SEPARATOR;
+ }
+ return result;
+ }
+ }
+
+ public static class OpenedModulePublishInfo extends ModulePublishInfo {
+
+ public OpenedModulePublishInfo(DataInput in) throws IOException {
+ super(in);
+ }
+
+ public OpenedModulePublishInfo(String moduleId, String name, IModuleType moduleType) {
+ super(moduleId, name, moduleType);
+ }
+
+ public IModuleResourceDelta[] getDelta(IModule[] module) {
+ return super.getDelta(module);
+ }
+
+ public void load(DataInput in) throws IOException {
+ super.load(in);
+ }
+
+ public void save(DataOutput out) {
+ super.save(out);
+ }
+ }
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerAttributeHelper.java (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/ServerAttributeHelper.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerAttributeHelper.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerAttributeHelper.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -0,0 +1,119 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.as.core.server.internal;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.internal.Server;
+import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
+
+/**
+ * This class just opens up the get and set attributes for a server,
+ * and provides saving mechanisms.
+ * @author rstryker(a)redhat.com
+ *
+ */
+public class ServerAttributeHelper {
+
+ public static ServerAttributeHelper createHelper(IServer iserver) {
+ if( iserver instanceof Server ) {
+ IServerWorkingCopy copy = ((Server)iserver).createWorkingCopy();
+ if( copy != null ) {
+ return new ServerAttributeHelper(iserver, copy);
+ }
+ }
+ return null;
+ }
+
+ private ServerWorkingCopy wch;
+ private IServer server;
+ public ServerAttributeHelper(IServer server, IServerWorkingCopy copy) {
+ this.wch = (ServerWorkingCopy)copy;
+ this.server = server;
+ }
+
+
+ public IServer getServer() {
+ return server;
+ }
+
+ public void setAttribute(String attributeName, int value) {
+ wch.setAttribute(attributeName, value);
+ }
+
+ public void setAttribute(String attributeName, boolean value) {
+ wch.setAttribute(attributeName, value);
+ }
+
+ public void setAttribute(String attributeName, String value) {
+ wch.setAttribute(attributeName, value);
+ }
+
+ public void setAttribute(String attributeName, List value) {
+ wch.setAttribute(attributeName, value);
+ }
+
+ public void setAttribute(String attributeName, Map value) {
+ wch.setAttribute(attributeName, value);
+ }
+
+ public String getAttribute(String attributeName, String defaultValue) {
+ return wch.getAttribute(attributeName, defaultValue);
+ }
+
+ public int getAttribute(String attributeName, int defaultValue) {
+ return wch.getAttribute(attributeName, defaultValue);
+ }
+
+ public boolean getAttribute(String attributeName, boolean defaultValue) {
+ return wch.getAttribute(attributeName, defaultValue);
+ }
+
+ public List getAttribute(String attributeName, List defaultValue) {
+ return wch.getAttribute(attributeName, defaultValue);
+ }
+
+ public Map getAttribute(String attributeName, Map defaultValue) {
+ return wch.getAttribute(attributeName, defaultValue);
+ }
+
+ public boolean isDirty() {
+ return wch.isDirty();
+ }
+
+ public IServer save(boolean force, IProgressMonitor monitor) throws CoreException {
+ return wch.save(force, monitor);
+ }
+
+ public IServer save() {
+ try {
+ return save(false, new NullProgressMonitor());
+ } catch( Exception e ) {}
+ return null;
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossLaunchConfigType.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -27,7 +27,7 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public abstract class AbstractJBossLaunchConfigType extends AbstractJavaLaunchConfigurationDelegate {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DeployableLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DeployableLaunchConfiguration.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DeployableLaunchConfiguration.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -7,7 +7,7 @@
import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerUtil;
-import org.jboss.ide.eclipse.as.core.server.DeployableServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
public class DeployableLaunchConfiguration implements
ILaunchConfigurationDelegate {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -41,8 +41,8 @@
import org.eclipse.wst.server.core.internal.ServerType;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
-import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
public class JBossServerStartupLaunchConfiguration extends AbstractJBossLaunchConfigType {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -16,7 +16,7 @@
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
public class StopLaunchConfiguration extends AbstractJBossLaunchConfigType {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -12,7 +12,7 @@
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
public class TwiddleLaunchConfiguration extends AbstractJBossLaunchConfigType {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ASLaunchConfigurationConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ASLaunchConfigurationConverter.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ASLaunchConfigurationConverter.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -67,7 +67,7 @@
import org.eclipse.wst.server.core.internal.Server;
import org.eclipse.wst.server.core.internal.ServerType;
import org.jboss.ide.eclipse.as.core.runtime.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerConverter.java 2007-09-11 05:31:24 UTC (rev 3541)
@@ -26,9 +26,9 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.ide.eclipse.as.core.server.DeployableServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.JBossServer;
import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
/**
*
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 05:28:54 UTC (rev 3540)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 05:31:24 UTC (rev 3541)
@@ -7,8 +7,8 @@
<extension
point="org.eclipse.wst.server.core.serverTypes">
<serverType
- behaviourClass="org.jboss.ide.eclipse.as.core.server.JBossServerBehavior"
- class="org.jboss.ide.eclipse.as.core.server.JBossServer"
+ behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer"
description="%jboss.version.32.description"
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.32"
@@ -24,8 +24,8 @@
supportsRemoteHosts="false"/>
<serverType
- behaviourClass="org.jboss.ide.eclipse.as.core.server.JBossServerBehavior"
- class="org.jboss.ide.eclipse.as.core.server.JBossServer"
+ behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer"
description="%jboss.version.40.description"
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.40"
@@ -41,8 +41,8 @@
supportsRemoteHosts="false"/>
<serverType
- behaviourClass="org.jboss.ide.eclipse.as.core.server.JBossServerBehavior"
- class="org.jboss.ide.eclipse.as.core.server.JBossServer"
+ behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer"
description="%jboss.version.42.description"
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.42"
@@ -58,8 +58,8 @@
supportsRemoteHosts="false"/>
<serverType
- behaviourClass="org.jboss.ide.eclipse.as.core.server.DeployableServerBehavior"
- class="org.jboss.ide.eclipse.as.core.server.DeployableServer"
+ behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior"
+ class="org.jboss.ide.eclipse.as.core.server.internal.DeployableServer"
description="A server which cannot be started, stopped, or debugged\nbut provides a deploy folder for publishing."
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.systemCopyServer"
@@ -79,7 +79,7 @@
point="org.eclipse.wst.server.core.runtimeTypes">
<runtimeType
vendor="%providerName"
- class="org.jboss.ide.eclipse.as.core.server.JBoss32ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBoss32ServerRuntime"
description="%jboss.version.32.description"
name="JBoss 3.2 Runtime"
id="org.jboss.ide.eclipse.as.runtime.32"
@@ -102,7 +102,7 @@
</runtimeType>
<runtimeType
vendor="%providerName"
- class="org.jboss.ide.eclipse.as.core.server.JBoss40ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBoss40ServerRuntime"
description="%jboss.version.40.description"
name="JBoss 4.0 Runtime"
id="org.jboss.ide.eclipse.as.runtime.40"
@@ -131,7 +131,7 @@
</runtimeType>
<runtimeType
vendor="%providerName"
- class="org.jboss.ide.eclipse.as.core.server.JBoss42ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBoss42ServerRuntime"
description="%jboss.version.42.description"
name="JBoss 4.2 Runtime"
id="org.jboss.ide.eclipse.as.runtime.42"
@@ -162,7 +162,7 @@
<runtimeType
- class="org.jboss.ide.eclipse.as.core.server.DeployableServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.DeployableServerRuntime"
description="A runtime provided to allow a deploy-only server the ability to deploy certain project types."
id="org.jboss.ide.eclipse.as.runtime.stripped"
name="JBoss Deploy-only"
@@ -281,7 +281,7 @@
<extension
point="org.eclipse.wst.server.core.launchableAdapters">
<launchableAdapter
- class="org.jboss.ide.eclipse.as.core.server.JBossLaunchAdapter"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBossLaunchAdapter"
id="org.jboss.ide.eclipse.as.core.launchableAdapter1"/>
</extension>
16 years, 9 months
JBoss Tools SVN: r3540 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:28:54 -0400 (Tue, 11 Sep 2007)
New Revision: 3540
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java
Log:
Renamed package from as.core.packages.types to as.core.extensions.archives
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java 2007-09-11 05:28:52 UTC (rev 3539)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java 2007-09-11 05:28:54 UTC (rev 3540)
@@ -14,7 +14,7 @@
import org.jboss.ide.eclipse.archives.ui.actions.ActionWithDelegate;
import org.jboss.ide.eclipse.archives.ui.views.ProjectArchivesView;
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
-import org.jboss.ide.eclipse.as.core.packages.types.EarArchiveType;
+import org.jboss.ide.eclipse.as.core.extensions.archives.EarArchiveType;
public class NewEARAction extends ActionWithDelegate {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java 2007-09-11 05:28:52 UTC (rev 3539)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java 2007-09-11 05:28:54 UTC (rev 3540)
@@ -15,7 +15,7 @@
import org.jboss.ide.eclipse.archives.ui.actions.ActionWithDelegate;
import org.jboss.ide.eclipse.archives.ui.views.ProjectArchivesView;
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
-import org.jboss.ide.eclipse.as.core.packages.types.EjbArchiveType;
+import org.jboss.ide.eclipse.as.core.extensions.archives.EjbArchiveType;
public class NewEJBJARAction extends ActionWithDelegate implements IViewActionDelegate {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java 2007-09-11 05:28:52 UTC (rev 3539)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java 2007-09-11 05:28:54 UTC (rev 3540)
@@ -15,7 +15,7 @@
import org.jboss.ide.eclipse.archives.ui.actions.ActionWithDelegate;
import org.jboss.ide.eclipse.archives.ui.views.ProjectArchivesView;
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
-import org.jboss.ide.eclipse.as.core.packages.types.WarArchiveType;
+import org.jboss.ide.eclipse.as.core.extensions.archives.WarArchiveType;
public class NewWARAction extends ActionWithDelegate implements IViewActionDelegate {
16 years, 9 months
JBoss Tools SVN: r3539 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:28:52 -0400 (Tue, 11 Sep 2007)
New Revision: 3539
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EjbArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/J2EEArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/WarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ModulePackageTypeConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
Renamed package from as.core.packages.types to as.core.extensions.archives
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2007-09-11 05:27:00 UTC (rev 3538)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2007-09-11 05:28:52 UTC (rev 3539)
@@ -22,10 +22,10 @@
org.apache.ant
Eclipse-LazyStart: true
Export-Package: org.jboss.ide.eclipse.as.core,
+ org.jboss.ide.eclipse.as.core.extensions.archives,
org.jboss.ide.eclipse.as.core.extensions.descriptors,
org.jboss.ide.eclipse.as.core.extensions.events,
org.jboss.ide.eclipse.as.core.modules,
- org.jboss.ide.eclipse.as.core.packages.types,
org.jboss.ide.eclipse.as.core.publishers,
org.jboss.ide.eclipse.as.core.runtime,
org.jboss.ide.eclipse.as.core.runtime.server.polling,
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives (from rev 3530, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types)
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java 2007-09-11 05:28:52 UTC (rev 3539)
@@ -1,92 +0,0 @@
-package org.jboss.ide.eclipse.as.core.packages.types;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.wst.server.core.IModule;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
-import org.jboss.ide.eclipse.as.core.packages.ModulePackageTypeConverter;
-
-public class EarArchiveType extends J2EEArchiveType {
- public final static String ID = "org.jboss.ide.eclipse.as.core.packages.earPackageType";
- public String getAssociatedModuleType() {
- return "jst.ear";
- }
-
- public String getId() {
- return ID;
- }
-
- public String getLabel() {
- return "EAR";
- }
-
-
- public IArchive createDefaultConfiguration(String project, IProgressMonitor monitor) {
- IModule mod = getModule(project);
- if( mod != null )
- return createDefaultConfigFromModule(mod, monitor);
- else
- return createDefaultConfiguration2(project, monitor);
- }
-
- public IArchive createDefaultConfiguration2(String projectName,
- IProgressMonitor monitor) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".ear");
- topLevel.setDestinationPath(new Path(project.getName()));
- topLevel.setInWorkspace(true);
-
- fillDefaultConfiguration(projectName, topLevel, monitor);
- return topLevel;
- }
-
- public IArchive createDefaultConfigFromModule(IModule module,
- IProgressMonitor monitor) {
- IProject project = module.getProject();
- IContainer sourceContainer = project.getFolder(EARCONTENT);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".ear", sourceContainer);
- topLevel.setDestinationPath(new Path(project.getName()));
- topLevel.setInWorkspace(true);
-
- fillDefaultConfiguration(project.getName(), topLevel, monitor);
- return topLevel;
- }
-
- public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel, IProgressMonitor monitor) {
- IModule mod = getModule(projectName);
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
-
- if( mod == null ) {
- // add fileset
- IArchiveFolder metainf = addFolder(project, topLevel, METAINF);
- addFileset(project, metainf, new Path(projectName).append(METAINF).toOSString(), null);
-
- } else {
- // now add children
- addFileset(project, topLevel, new Path(project.getName()).append(EARCONTENT).toOSString(), "**/*.*");
- IEnterpriseApplication earModule = (IEnterpriseApplication)mod.loadAdapter(IEnterpriseApplication.class, monitor);
- IModule[] childModules = earModule.getModules();
- for( int i = 0; i < childModules.length; i++ ) {
- IModule child = childModules[i];
- IArchiveType type = ModulePackageTypeConverter.getPackageTypeFor(child);
- IArchive childPack;
- if( type == null ) {
- childPack = createGenericIArchive(child.getProject(), null, child.getProject().getName() + ".jar");
- } else {
- childPack = type.createDefaultConfiguration(child.getProject().getName(), new NullProgressMonitor());
- }
- topLevel.addChild(childPack);
- }
- }
-
- return topLevel;
- }
-
-}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java (from rev 3537, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java 2007-09-11 05:28:52 UTC (rev 3539)
@@ -0,0 +1,92 @@
+package org.jboss.ide.eclipse.as.core.extensions.archives;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.server.core.IEnterpriseApplication;
+import org.eclipse.wst.server.core.IModule;
+import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
+import org.jboss.ide.eclipse.as.core.modules.ModulePackageTypeConverter;
+
+public class EarArchiveType extends J2EEArchiveType {
+ public final static String ID = "org.jboss.ide.eclipse.as.core.packages.earPackageType";
+ public String getAssociatedModuleType() {
+ return "jst.ear";
+ }
+
+ public String getId() {
+ return ID;
+ }
+
+ public String getLabel() {
+ return "EAR";
+ }
+
+
+ public IArchive createDefaultConfiguration(String project, IProgressMonitor monitor) {
+ IModule mod = getModule(project);
+ if( mod != null )
+ return createDefaultConfigFromModule(mod, monitor);
+ else
+ return createDefaultConfiguration2(project, monitor);
+ }
+
+ public IArchive createDefaultConfiguration2(String projectName,
+ IProgressMonitor monitor) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".ear");
+ topLevel.setDestinationPath(new Path(project.getName()));
+ topLevel.setInWorkspace(true);
+
+ fillDefaultConfiguration(projectName, topLevel, monitor);
+ return topLevel;
+ }
+
+ public IArchive createDefaultConfigFromModule(IModule module,
+ IProgressMonitor monitor) {
+ IProject project = module.getProject();
+ IContainer sourceContainer = project.getFolder(EARCONTENT);
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".ear", sourceContainer);
+ topLevel.setDestinationPath(new Path(project.getName()));
+ topLevel.setInWorkspace(true);
+
+ fillDefaultConfiguration(project.getName(), topLevel, monitor);
+ return topLevel;
+ }
+
+ public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel, IProgressMonitor monitor) {
+ IModule mod = getModule(projectName);
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+
+ if( mod == null ) {
+ // add fileset
+ IArchiveFolder metainf = addFolder(project, topLevel, METAINF);
+ addFileset(project, metainf, new Path(projectName).append(METAINF).toOSString(), null);
+
+ } else {
+ // now add children
+ addFileset(project, topLevel, new Path(project.getName()).append(EARCONTENT).toOSString(), "**/*.*");
+ IEnterpriseApplication earModule = (IEnterpriseApplication)mod.loadAdapter(IEnterpriseApplication.class, monitor);
+ IModule[] childModules = earModule.getModules();
+ for( int i = 0; i < childModules.length; i++ ) {
+ IModule child = childModules[i];
+ IArchiveType type = ModulePackageTypeConverter.getPackageTypeFor(child);
+ IArchive childPack;
+ if( type == null ) {
+ childPack = createGenericIArchive(child.getProject(), null, child.getProject().getName() + ".jar");
+ } else {
+ childPack = type.createDefaultConfiguration(child.getProject().getName(), new NullProgressMonitor());
+ }
+ topLevel.addChild(childPack);
+ }
+ }
+
+ return topLevel;
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EjbArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EjbArchiveType.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EjbArchiveType.java 2007-09-11 05:28:52 UTC (rev 3539)
@@ -1,4 +1,4 @@
-package org.jboss.ide.eclipse.as.core.packages.types;
+package org.jboss.ide.eclipse.as.core.extensions.archives;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/J2EEArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/J2EEArchiveType.java 2007-09-11 05:28:52 UTC (rev 3539)
@@ -19,7 +19,7 @@
* 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.as.core.packages.types;
+package org.jboss.ide.eclipse.as.core.extensions.archives;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/WarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-09-11 05:09:17 UTC (rev 3530)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/WarArchiveType.java 2007-09-11 05:28:52 UTC (rev 3539)
@@ -19,7 +19,7 @@
* 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.as.core.packages.types;
+package org.jboss.ide.eclipse.as.core.extensions.archives;
import org.apache.tools.ant.DirectoryScanner;
import org.eclipse.core.resources.IContainer;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ModulePackageTypeConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ModulePackageTypeConverter.java 2007-09-11 05:27:00 UTC (rev 3538)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ModulePackageTypeConverter.java 2007-09-11 05:28:52 UTC (rev 3539)
@@ -24,9 +24,9 @@
import org.eclipse.wst.server.core.IModule;
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
-import org.jboss.ide.eclipse.as.core.packages.types.EarArchiveType;
-import org.jboss.ide.eclipse.as.core.packages.types.EjbArchiveType;
-import org.jboss.ide.eclipse.as.core.packages.types.WarArchiveType;
+import org.jboss.ide.eclipse.as.core.extensions.archives.EarArchiveType;
+import org.jboss.ide.eclipse.as.core.extensions.archives.EjbArchiveType;
+import org.jboss.ide.eclipse.as.core.extensions.archives.WarArchiveType;
/**
*
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 05:27:00 UTC (rev 3538)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 05:28:52 UTC (rev 3539)
@@ -397,15 +397,15 @@
<extension
point="org.jboss.ide.eclipse.archives.core.archiveTypes">
<packageType
- class="org.jboss.ide.eclipse.as.core.packages.types.WarArchiveType"
+ class="org.jboss.ide.eclipse.as.core.extensions.archives.WarArchiveType"
id="org.jboss.ide.eclipse.as.core.packages.warArchive"
label="WAR"/>
<packageType
- class="org.jboss.ide.eclipse.as.core.packages.types.EjbArchiveType"
+ class="org.jboss.ide.eclipse.as.core.extensions.archives.EjbArchiveType"
id="org.jboss.ide.eclipse.as.core.packages.ejbPackageType"
label="EJB JAR"/>
<packageType
- class="org.jboss.ide.eclipse.as.core.packages.types.EarArchiveType"
+ class="org.jboss.ide.eclipse.as.core.extensions.archives.EarArchiveType"
id="org.jboss.ide.eclipse.as.core.packages.earPackageType"
label="EAR"/>
</extension>
16 years, 9 months
JBoss Tools SVN: r3538 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-11 01:27:00 -0400 (Tue, 11 Sep 2007)
New Revision: 3538
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java
Log:
Renamed package from as.core.packages to as.core.modules
Moving to a cleaner API which can be opened up logically and more easily extended.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java 2007-09-11 05:26:57 UTC (rev 3537)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java 2007-09-11 05:27:00 UTC (rev 3538)
@@ -26,7 +26,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.ui.actions.INodeActionDelegate;
-import org.jboss.ide.eclipse.as.core.packages.ArchivesBuildListener;
+import org.jboss.ide.eclipse.as.core.modules.ArchivesBuildListener;
import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
16 years, 9 months