Author: rob.stryker(a)jboss.com
Date: 2007-05-01 14:36:58 -0400 (Tue, 01 May 2007)
New Revision: 1976
Removed:
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/packages/types/Ejb30PackageType.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ModulePackageTypeConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java
Log:
remaking ejb and ear package types and wizards bc they don't work
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ModulePackageTypeConverter.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ModulePackageTypeConverter.java 2007-05-01
18:36:56 UTC (rev 1975)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ModulePackageTypeConverter.java 2007-05-01
18:36:58 UTC (rev 1976)
@@ -24,7 +24,6 @@
import org.eclipse.wst.server.core.IModule;
import org.jboss.ide.eclipse.archives.core.model.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.WarArchiveType;
/**
@@ -36,10 +35,10 @@
String modType = module.getModuleType().getId();
if("jst.web".equals(modType)) {
return ArchivesCore.getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE);
- } else if("jst.ear".equals(modType)) {
- return ArchivesCore.getArchiveType(EarArchiveType.EAR_PACKAGE_TYPE);
- } else if("jbide.ejb30".equals(modType)) {
- return
ArchivesCore.getArchiveType("org.jboss.ide.eclipse.ejb3.wizards.core.ejbPackageType");
+// } else if("jst.ear".equals(modType)) {
+// return ArchivesCore.getArchiveType(EarArchiveType.EAR_PACKAGE_TYPE);
+// } else if("jbide.ejb30".equals(modType)) {
+// return
ArchivesCore.getArchiveType("org.jboss.ide.eclipse.ejb3.wizards.core.ejbPackageType");
}
return null;
Deleted:
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/packages/types/EarArchiveType.java 2007-05-01
18:36:56 UTC (rev 1975)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java 2007-05-01
18:36:58 UTC (rev 1976)
@@ -1,99 +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.packages.types;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-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;
-
-/**
- *
- * @author rob.stryker(a)jboss.com
- */
-public class EarArchiveType extends J2EEArchiveType {
- public static final String EAR_PACKAGE_TYPE =
"org.jboss.ide.eclipse.as.core.packages.earPackage";
-
- public String getAssociatedModuleType() {
- return "jst.ear";
- }
-
- public IArchive createDefaultConfiguration(IProject project, IProgressMonitor monitor)
{
- IModule mod = getModule(project);
- if( mod != null )
- return createDefaultConfigFromModule(mod, monitor);
- else
- return createDefaultConfiguration2(project, monitor);
- }
-
- public IArchive createDefaultConfiguration2(IProject project,
- IProgressMonitor monitor) {
- IArchive topLevel = createGenericIArchive(project, null, project.getName() +
".war");
- topLevel.setDestinationPath(project.getLocation());
- topLevel.setInWorkspace(true);
- IArchiveFolder metainf = addFolder(project, topLevel, METAINF);
- IArchiveFolder lib = addFolder(project, metainf, LIB);
- addFileset(project, metainf, new Path(project.getName()).append(METAINF).toOSString(),
null);
- 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);
- addFileset(project, topLevel, new
Path(project.getName()).append(EARCONTENT).toOSString(), "**/*.*");
-
- // now add children
- IEnterpriseApplication earModule =
(IEnterpriseApplication)module.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(), new
NullProgressMonitor());
- }
- topLevel.addChild(childPack);
- }
-
- return topLevel;
- }
-
- public String getId() {
- return EAR_PACKAGE_TYPE;
- }
-
- public String getLabel() {
- return "EAR";
- }
-}
Deleted:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/Ejb30PackageType.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/Ejb30PackageType.java 2007-05-01
18:36:56 UTC (rev 1975)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/Ejb30PackageType.java 2007-05-01
18:36:58 UTC (rev 1976)
@@ -1,41 +0,0 @@
-package org.jboss.ide.eclipse.as.core.packages.types;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.jboss.ide.eclipse.archives.core.model.IArchive;
-import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
-import org.jboss.ide.eclipse.as.core.packages.types.J2EEArchiveType;
-
-public class Ejb30PackageType extends J2EEArchiveType {
-
- public static final String ID =
"org.jboss.ide.eclipse.ejb3.wizards.core.ejbPackageType";
- public String getAssociatedModuleType() {
- return "jbide.ejb30";
- }
-
- public String getId() {
- return ID;
- }
-
- public String getLabel() {
- return "EJB 3.0 JAR";
- }
-
- public IArchive createDefaultConfiguration(IProject project, IProgressMonitor monitor)
{
- boolean facetFound = J2EEProjectUtilities.isProjectOfType(project,
getAssociatedModuleType());
- return createDefaultConfiguration(project, facetFound, monitor);
- }
-
- public IArchive createDefaultConfiguration(IProject project, boolean facetFound,
IProgressMonitor monitor) {
- String metaInfDir = (facetFound ? EJBMODULE + Path.SEPARATOR : "") +
METAINF;
-
- IArchive topLevel = createGenericIArchive(project, null, project.getName() +
".jar");
- topLevel.setDestinationPath(project.getLocation());
- IArchiveFolder metainf = addFolder(project, topLevel, METAINF);
- IArchiveFolder lib = addFolder(project, metainf, LIB);
- addFileset(project, metainf, metaInfDir, null);
- return topLevel;
- }
-}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-05-01
18:36:56 UTC (rev 1975)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-05-01
18:36:58 UTC (rev 1976)
@@ -66,8 +66,8 @@
public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel,
IProgressMonitor monitor) {
IModule mod = getModule(project);
- topLevel.setDestinationPath(new Path(project.getName()));
- topLevel.setInWorkspace(true);
+// topLevel.setDestinationPath(new Path(project.getName()));
+// topLevel.setInWorkspace(true);
IArchiveFolder webinf = addFolder(project, topLevel, WEBINF);
IArchiveFolder lib = addFolder(project, webinf, LIB);
IArchiveFolder classes = addFolder(project, webinf, CLASSES);