Author: rob.stryker(a)jboss.com
Date: 2007-05-24 17:13:29 -0400 (Thu, 24 May 2007)
New Revision: 2074
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/NewWARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java
Log:
Changes regarding the archives API change
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-05-24
21:11:03 UTC (rev 2073)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java 2007-05-24
21:13:29 UTC (rev 2074)
@@ -8,7 +8,7 @@
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.PlatformUI;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesCore;
+import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
@@ -65,7 +65,7 @@
}
public boolean performFinish(IArchive pkg) {
- pkg.setArchiveType(ArchivesCore.getArchiveType(EjbArchiveType.ID));
+ pkg.setArchiveType(ArchivesCore.getInstance().getExtensionManager().getArchiveType(EjbArchiveType.ID));
return true;
}
@@ -81,8 +81,8 @@
ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_JAR_WIZARD));
}
protected void addToPackage() {
- IArchiveType type = ArchivesCore.getArchiveType(EjbArchiveType.ID);
- type.fillDefaultConfiguration(wizard.getProject(), wizard.getArchive(), new
NullProgressMonitor());
+ IArchiveType type =
ArchivesCore.getInstance().getExtensionManager().getArchiveType(EjbArchiveType.ID);
+ type.fillDefaultConfiguration(wizard.getProject().getName(), wizard.getArchive(),
new NullProgressMonitor());
}
protected String getDescriptionMessage() {
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-05-24
21:11:03 UTC (rev 2073)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java 2007-05-24
21:13:29 UTC (rev 2074)
@@ -8,7 +8,7 @@
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.PlatformUI;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesCore;
+import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
@@ -62,7 +62,7 @@
}
public boolean performFinish(IArchive pkg) {
- pkg.setArchiveType(ArchivesCore.getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE));
+ pkg.setArchiveType(ArchivesCore.getInstance().getExtensionManager().getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE));
return true;
}
@@ -77,8 +77,8 @@
ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_WAR_WIZARD));
}
protected void addToPackage() {
- IArchiveType type = ArchivesCore.getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE);
- type.fillDefaultConfiguration(wizard.getProject(), wizard.getArchive(), new
NullProgressMonitor());
+ IArchiveType type =
ArchivesCore.getInstance().getExtensionManager().getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE);
+ type.fillDefaultConfiguration(wizard.getProject().getName(), wizard.getArchive(),
new NullProgressMonitor());
}
protected String getDescriptionMessage() {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java 2007-05-24
21:11:03 UTC (rev 2073)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java 2007-05-24
21:13:29 UTC (rev 2074)
@@ -11,7 +11,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -32,16 +31,12 @@
import org.eclipse.ui.ide.IDE;
import org.eclipse.wst.server.core.IModuleArtifact;
import org.eclipse.wst.server.core.internal.ServerPlugin;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesCore;
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.archives.ui.ArchivesSharedImages;
import org.jboss.ide.eclipse.archives.ui.providers.ArchivesContentProvider;
import org.jboss.ide.eclipse.archives.ui.providers.ArchivesLabelProvider;
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
import org.jboss.ide.eclipse.archives.ui.wizards.WizardPageWithNotification;
-import org.jboss.ide.eclipse.as.core.packages.types.WarArchiveType;
public abstract class PreviewPage extends WizardPageWithNotification {
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-05-24
21:11:03 UTC (rev 2073)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java 2007-05-24
21:13:29 UTC (rev 2074)
@@ -22,6 +22,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
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;
@@ -41,13 +42,20 @@
IArchive pkg = (IArchive)node;
String servers = node.getProperty(ArchivesBuildListener.DEPLOY_SERVERS);
if( !new
Boolean(pkg.getProperty(ArchivesBuildListener.DEPLOY_AFTER_BUILD)).booleanValue() ||
- servers == null || "".equals(servers)) {
+ servers == null || "".equals(servers) || anyServerDoesntExist(servers)){
servers = showSelectServersDialog(pkg);
}
ArchivesBuildListener.publish(pkg, servers, IServer.PUBLISH_FULL);
}
}
+ protected boolean anyServerDoesntExist(String servers) {
+ String[] asArray = servers.split(",");
+ for( int i = 0; i < asArray.length; i++ )
+ if( ServerCore.findServer(asArray[i]) == null )
+ return true;
+ return false;
+ }
public boolean isEnabledFor(IArchiveNode node) {
if (node.getNodeType() == IArchiveNode.TYPE_ARCHIVE ) {
IArchive pkg = (IArchive) node;
Show replies by date