JBoss Tools SVN: r1985 - 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-05-01 17:58:30 -0400 (Tue, 01 May 2007)
New Revision: 1985
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java
Log:
ensuring wtp projects have package types correct
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-01 21:13:15 UTC (rev 1984)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java 2007-05-01 21:58:30 UTC (rev 1985)
@@ -102,7 +102,7 @@
// if it's already a module type project, hide the meta inf stuff
IModuleArtifact moduleArtifact = ServerPlugin.loadModuleArtifact(wizard.getProject());
- if( moduleArtifact.getModule() != null ) {
+ if( moduleArtifact != null && moduleArtifact.getModule() != null ) {
FormData d = (FormData)previewGroup.getLayoutData();
d.top = new FormAttachment(0,5);
previewGroup.setLayoutData(d);
17 years, 8 months
JBoss Tools SVN: r1984 - trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-01 17:13:15 -0400 (Tue, 01 May 2007)
New Revision: 1984
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesView.java
Log:
view was not updating on creation of first node
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesView.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesView.java 2007-05-01 20:41:50 UTC (rev 1983)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ProjectArchivesView.java 2007-05-01 21:13:15 UTC (rev 1984)
@@ -31,6 +31,7 @@
import org.eclipse.ui.part.ViewPart;
import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
import org.jboss.ide.eclipse.archives.core.model.IArchiveModelListener;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveModelNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNodeDelta;
import org.jboss.ide.eclipse.archives.core.model.ArchivesCore;
@@ -235,6 +236,17 @@
public void modelChanged(IArchiveNodeDelta delta) {
+ boolean update = true;
+ try {
+ if( project == null ) return;
+ if( delta.getPostNode() == null && delta.getPreNode() == null ) return;
+ if( delta.getPreNode() == null ) update = delta.getPostNode().getProject().equals(project);
+ else if( delta.getPostNode() == null ) update = delta.getPreNode().getProject().equals(project);
+ else update = delta.getPreNode().getProject().equals(project) || delta.getPostNode().getProject().equals(project);
+ } catch( Exception e ) {}
+
+ if( !update ) return;
+
final IArchiveNode[] topChanges;
if( delta.getKind() == IArchiveNodeDelta.DESCENDENT_CHANGED)
topChanges = getChanges(delta);
@@ -247,7 +259,11 @@
getSite().getShell().getDisplay().asyncExec(new Runnable () {
public void run () {
for( int i = 0; i < topChanges.length; i++ ) {
- packageViewer.refresh(topChanges[i]);
+ if( topChanges.length == 1 && topChanges[0] instanceof IArchiveModelNode) {
+ packageViewer.setInput(ArchivesModel.instance().getRoot(project));
+ book.showPage(viewerComposite);
+ } else
+ packageViewer.refresh(topChanges[i]);
}
}
});
17 years, 8 months
JBoss Tools SVN: r1983 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages: types and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-01 16:41:50 -0400 (Tue, 01 May 2007)
New Revision: 1983
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/EarArchiveType.java
Log:
impl for ear
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 19:30:21 UTC (rev 1982)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ModulePackageTypeConverter.java 2007-05-01 20:41:50 UTC (rev 1983)
@@ -24,6 +24,8 @@
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.EjbArchiveType;
import org.jboss.ide.eclipse.as.core.packages.types.WarArchiveType;
/**
@@ -35,10 +37,12 @@
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.ID);
+ } else if("jbide.ejb30".equals(modType)) {
+ return ArchivesCore.getArchiveType(EjbArchiveType.ID);
+ } else if("jst.ejb".equals(modType)) {
+ return ArchivesCore.getArchiveType(EjbArchiveType.ID);
}
return null;
Modified: 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 19:30:21 UTC (rev 1982)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java 2007-05-01 20:41:50 UTC (rev 1983)
@@ -1,8 +1,16 @@
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;
public class EarArchiveType extends J2EEArchiveType {
public final static String ID = "org.jboss.ide.eclipse.as.core.packages.earPackageType";
@@ -18,14 +26,64 @@
return "EAR";
}
+
public IArchive createDefaultConfiguration(IProject project, IProgressMonitor monitor) {
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".jar");
- return fillDefaultConfiguration(project, topLevel, 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() + ".ear");
+ topLevel.setDestinationPath(project.getLocation());
+ topLevel.setInWorkspace(true);
+
+ fillDefaultConfiguration(project, topLevel, monitor);
+ return topLevel;
+ }
- public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
+ 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(project.getLocation());
+ topLevel.setInWorkspace(true);
+ fillDefaultConfiguration(project, topLevel, monitor);
return topLevel;
}
+ public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
+ IModule mod = getModule(project);
+
+ if( mod == null ) {
+ // add fileset
+ IArchiveFolder metainf = addFolder(project, topLevel, METAINF);
+ addFileset(project, metainf, new Path(project.getName()).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(), new NullProgressMonitor());
+ }
+ topLevel.addChild(childPack);
+ }
+ }
+
+ return topLevel;
+ }
+
}
17 years, 8 months
JBoss Tools SVN: r1982 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: jbosscore/org/jboss/ide/eclipse/as/core/packages/types and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-01 15:30:21 -0400 (Tue, 01 May 2007)
New Revision: 1982
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
Setting up ui for addition of ear, ejb types
Added: 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 (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EarArchiveType.java 2007-05-01 19:30:21 UTC (rev 1982)
@@ -0,0 +1,31 @@
+package org.jboss.ide.eclipse.as.core.packages.types;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.ide.eclipse.archives.core.model.IArchive;
+
+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(IProject project, IProgressMonitor monitor) {
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".jar");
+ return fillDefaultConfiguration(project, topLevel, monitor);
+ }
+
+ public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
+
+ return topLevel;
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-05-01 19:30:18 UTC (rev 1981)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-05-01 19:30:21 UTC (rev 1982)
@@ -496,5 +496,9 @@
class="org.jboss.ide.eclipse.as.core.packages.types.EjbArchiveType"
id="org.jboss.ide.eclipse.as.core.packages.ejbPackageType"
label="EJB JAR"/>
+ <packageType
+ class="org.jboss.ide.eclipse.as.core.packages.types.EarArchiveType"
+ id="org.jboss.ide.eclipse.as.core.packages.earPackageType"
+ label="EAR"/>
</extension>
</plugin>
17 years, 8 months
JBoss Tools SVN: r1981 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-01 15:30:18 -0400 (Tue, 01 May 2007)
New Revision: 1981
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
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/plugin.xml
Log:
Setting up ui for addition of ear, ejb types
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2007-05-01 18:54:19 UTC (rev 1980)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2007-05-01 19:30:18 UTC (rev 1981)
@@ -54,7 +54,6 @@
org.apache.ant,
org.jboss.ide.eclipse.as.core,
org.jboss.ide.eclipse.firstrun,
- org.jboss.ide.eclipse.ui,
org.jboss.ide.eclipse.archives.core,
org.jboss.ide.eclipse.archives.ui
Eclipse-LazyStart: true
Added: 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 (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java 2007-05-01 19:30:18 UTC (rev 1981)
@@ -0,0 +1,92 @@
+package org.jboss.ide.eclipse.as.ui.packages;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+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.model.IArchive;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
+import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
+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;
+
+public class NewEARAction extends ActionWithDelegate {
+
+ public void run() {
+ AbstractArchiveWizard wizard = new NewEARWizard();
+ wizard.init(PlatformUI.getWorkbench(), ProjectArchivesView.getInstance().getSelection());
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ dialog.open();
+ }
+ public IStructuredSelection getSelection() {
+ return ProjectArchivesView.getInstance().getSelection();
+ }
+
+
+ public ImageDescriptor getImageDescriptor() {
+ return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EJB_JAR);
+ }
+
+ public String getText() {
+ return "EAR";
+ }
+
+ public String getToolTipText() {
+ return "Create a new EAR archive";
+ }
+
+ public void init(IViewPart view) {
+
+ }
+
+ public static class NewEARWizard extends AbstractArchiveWizard {
+
+ private EARPreviewPage earInfoPage;
+
+ public NewEARWizard () {
+ setWindowTitle("New EAR");
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EAR);
+ }
+
+ public WizardPage[] createWizardPages() {
+ earInfoPage = new EARPreviewPage(this);
+
+ return new WizardPage[] { earInfoPage };
+ }
+
+ public boolean performFinish(IArchive pkg) {
+ pkg.setArchiveType(ArchivesCore.getArchiveType(EarArchiveType.ID));
+ return true;
+ }
+
+ public String getArchiveExtension() {
+ return "jar";
+ }
+ }
+
+
+ protected static class EARPreviewPage extends PreviewPage {
+ protected EARPreviewPage(NewEARWizard wiz) {
+ super(wiz, "EAR Preview", "EAR Preview",
+ ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EAR));
+ }
+ protected void addToPackage() {
+ IArchiveType type = ArchivesCore.getArchiveType(EarArchiveType.ID);
+ type.fillDefaultConfiguration(wizard.getProject(), wizard.getArchive(), new NullProgressMonitor());
+ }
+
+ protected String getDescriptionMessage() {
+ return "Preview the EAR\n" +
+ "Later, you can customize this structure further.";
+ }
+ }
+}
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-01 18:54:19 UTC (rev 1980)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java 2007-05-01 19:30:18 UTC (rev 1981)
@@ -1,6 +1,8 @@
package org.jboss.ide.eclipse.as.ui.packages;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.ui.IViewActionDelegate;
@@ -10,20 +12,23 @@
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;
+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.ui.packages.NewWARAction.NewWARWizard;
-import org.jboss.ide.eclipse.ui.util.ActionWithDelegate;
public class NewEJBJARAction extends ActionWithDelegate implements IViewActionDelegate {
public void run() {
- NewWARWizard wizard = new NewWARWizard();
+ AbstractArchiveWizard wizard = new NewEJBWizard();
wizard.init(PlatformUI.getWorkbench(), ProjectArchivesView.getInstance().getSelection());
WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
dialog.open();
}
+ public IStructuredSelection getSelection() {
+ return ProjectArchivesView.getInstance().getSelection();
+ }
+
public ImageDescriptor getImageDescriptor() {
return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EJB_JAR);
@@ -77,7 +82,7 @@
}
protected void addToPackage() {
IArchiveType type = ArchivesCore.getArchiveType(EjbArchiveType.ID);
-
+ type.fillDefaultConfiguration(wizard.getProject(), 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-01 18:54:19 UTC (rev 1980)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java 2007-05-01 19:30:18 UTC (rev 1981)
@@ -1,8 +1,8 @@
package org.jboss.ide.eclipse.as.ui.packages;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.ui.IViewActionDelegate;
@@ -12,10 +12,10 @@
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;
+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.ui.util.ActionWithDelegate;
public class NewWARAction extends ActionWithDelegate implements IViewActionDelegate {
@@ -77,10 +77,8 @@
ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_WAR_WIZARD));
}
protected void addToPackage() {
- IArchiveType type = ArchivesCore.getArchiveType("org.jboss.ide.eclipse.as.core.packages.warPackage");
- if( type instanceof WarArchiveType ) {
- ((WarArchiveType)type).fillDefaultConfiguration(wizard.getProject(), wizard.getArchive(), new NullProgressMonitor());
- }
+ IArchiveType type = ArchivesCore.getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE);
+ type.fillDefaultConfiguration(wizard.getProject(), wizard.getArchive(), new NullProgressMonitor());
}
protected String getDescriptionMessage() {
@@ -89,4 +87,8 @@
}
}
+ public IStructuredSelection getSelection() {
+ return ProjectArchivesView.getInstance().getSelection();
+ }
+
}
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-01 18:54:19 UTC (rev 1980)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java 2007-05-01 19:30:18 UTC (rev 1981)
@@ -57,7 +57,7 @@
protected abstract String getDescriptionMessage();
public void createControl(Composite parent) {
- setMessage(getDescription());
+ setMessage(getDescriptionMessage());
Composite main = new Composite(parent, SWT.NONE);
main.setLayout(new FormLayout());
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-05-01 18:54:19 UTC (rev 1980)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-05-01 19:30:18 UTC (rev 1981)
@@ -295,6 +295,11 @@
icon="icons/packages/EJBJar.gif"
id="org.jboss.ide.eclipse.packages.ui.newEJBJarAction"
label="EJB JAR"/>
+ <newPackageAction
+ class="org.jboss.ide.eclipse.as.ui.packages.NewEARAction"
+ icon="icons/packages/ear.gif"
+ id="org.jboss.ide.eclipse.packages.ui.newEARAction"
+ label="EAR"/>
</extension>
</plugin>
17 years, 8 months
JBoss Tools SVN: r1980 - in trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model: types and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-01 14:54:19 -0400 (Tue, 01 May 2007)
New Revision: 1980
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveType.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/types/JARArchiveType.java
Log:
quick api change to allow filling of already created archive stubs
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveType.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveType.java 2007-05-01 18:54:16 UTC (rev 1979)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveType.java 2007-05-01 18:54:19 UTC (rev 1980)
@@ -54,4 +54,9 @@
*/
public IArchive createDefaultConfiguration(IProject project, IProgressMonitor monitor);
+ /**
+ * Fill an archive type with some filesets and folders that are required
+ */
+ public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor);
+
}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/types/JARArchiveType.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/types/JARArchiveType.java 2007-05-01 18:54:16 UTC (rev 1979)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/types/JARArchiveType.java 2007-05-01 18:54:19 UTC (rev 1980)
@@ -66,4 +66,9 @@
return jar;
}
+
+ // do nothing
+ public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
+ return null;
+ }
}
17 years, 8 months
JBoss Tools SVN: r1979 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: jbosscore/org/jboss/ide/eclipse/as/core/packages/types and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-01 14:54:16 -0400 (Tue, 01 May 2007)
New Revision: 1979
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EjbArchiveType.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
quick api change to allow filling of already created archive stubs
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EjbArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EjbArchiveType.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/EjbArchiveType.java 2007-05-01 18:54:16 UTC (rev 1979)
@@ -0,0 +1,32 @@
+package org.jboss.ide.eclipse.as.core.packages.types;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.ide.eclipse.archives.core.model.IArchive;
+
+public class EjbArchiveType extends J2EEArchiveType {
+
+ public final static String ID = "org.jboss.ide.eclipse.as.core.packages.ejbPackageType";
+ public String getAssociatedModuleType() {
+ return "jst.ejb";
+ }
+
+ public String getId() {
+ return ID;
+ }
+
+ public String getLabel() {
+ return "EJB JAR";
+ }
+
+ public IArchive createDefaultConfiguration(IProject project, IProgressMonitor monitor) {
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".jar");
+ return fillDefaultConfiguration(project, topLevel, monitor);
+ }
+
+ public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
+
+ return topLevel;
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-05-01 18:54:13 UTC (rev 1978)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-05-01 18:54:16 UTC (rev 1979)
@@ -493,12 +493,8 @@
id="org.jboss.ide.eclipse.as.core.packages.warArchive"
label="WAR"/>
<packageType
- class="org.jboss.ide.eclipse.as.core.packages.types.EarArchiveType"
- id="org.jboss.ide.eclipse.as.core.packages.earArchive"
- label="EAR"/>
- <packageType
- class="org.jboss.ide.eclipse.as.core.packages.types.Ejb30PackageType"
- id="org.jboss.ide.eclipse.as.core.packages.types.ejbPackageType"
- label="EJB 3.0 JAR"/>
+ class="org.jboss.ide.eclipse.as.core.packages.types.EjbArchiveType"
+ id="org.jboss.ide.eclipse.as.core.packages.ejbPackageType"
+ label="EJB JAR"/>
</extension>
</plugin>
17 years, 8 months
JBoss Tools SVN: r1978 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui/packages and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-01 14:54:13 -0400 (Tue, 01 May 2007)
New Revision: 1978
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java
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/plugin.xml
Log:
quick api change to allow filling of already created archive stubs
Deleted: 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-05-01 18:39:00 UTC (rev 1977)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java 2007-05-01 18:54:13 UTC (rev 1978)
@@ -1,24 +0,0 @@
-package org.jboss.ide.eclipse.as.ui.packages;
-
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.jboss.ide.eclipse.ui.util.ActionWithDelegate;
-
-public class NewEARAction extends ActionWithDelegate implements IViewActionDelegate {
-
- public NewEARAction() {
- // TODO Auto-generated constructor stub
- }
-
- public void run() {
- // TODO Auto-generated method stub
- System.out.println("test");
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- }
-
-}
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-01 18:39:00 UTC (rev 1977)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java 2007-05-01 18:54:13 UTC (rev 1978)
@@ -12,6 +12,7 @@
import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
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.ui.packages.NewWARAction.NewWARWizard;
import org.jboss.ide.eclipse.ui.util.ActionWithDelegate;
@@ -25,7 +26,7 @@
}
public ImageDescriptor getImageDescriptor() {
- return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_WAR);
+ return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EJB_JAR);
}
public String getText() {
@@ -49,7 +50,7 @@
}
public ImageDescriptor getImageDescriptor() {
- return null;
+ return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EJB_JAR);
}
public WizardPage[] createWizardPages() {
@@ -59,7 +60,7 @@
}
public boolean performFinish(IArchive pkg) {
- pkg.setArchiveType(ArchivesCore.getArchiveType(""));
+ pkg.setArchiveType(ArchivesCore.getArchiveType(EjbArchiveType.ID));
return true;
}
@@ -75,8 +76,8 @@
ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_JAR_WIZARD));
}
protected void addToPackage() {
- IArchiveType type = ArchivesCore.getArchiveType("");
- // fill please
+ IArchiveType type = ArchivesCore.getArchiveType(EjbArchiveType.ID);
+
}
protected String getDescriptionMessage() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-05-01 18:39:00 UTC (rev 1977)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-05-01 18:54:13 UTC (rev 1978)
@@ -290,18 +290,11 @@
icon="icons/packages/war.gif"
id="org.jboss.ide.eclipse.packages.ui.newWARAction"
label="WAR"/>
- <!--
<newPackageAction
class="org.jboss.ide.eclipse.as.ui.packages.NewEJBJARAction"
icon="icons/packages/EJBJar.gif"
- id="org.jboss.ide.eclipse.packages.ui.newEJBJARAction"
+ id="org.jboss.ide.eclipse.packages.ui.newEJBJarAction"
label="EJB JAR"/>
- <newPackageAction
- class="org.jboss.ide.eclipse.as.ui.packages.NewEARAction"
- icon="icons/packages/ear.gif"
- id="org.jboss.ide.eclipse.packages.ui.newEARAction"
- label="EAR"/>
- -->
</extension>
</plugin>
17 years, 8 months
JBoss Tools SVN: r1977 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-05-01 14:39:00 -0400 (Tue, 01 May 2007)
New Revision: 1977
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/EJB30SupportVerifier.java
Log:
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/EJB30SupportVerifier.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/EJB30SupportVerifier.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/EJB30SupportVerifier.java 2007-05-01 18:39:00 UTC (rev 1977)
@@ -0,0 +1,30 @@
+package org.jboss.ide.eclipse.as.core.util;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.wst.server.core.IRuntime;
+import org.jboss.ide.eclipse.as.core.runtime.internal.WebtoolsProjectJBossClasspathContainerInitializer.WebtoolsProjectJBossClasspathContainer;
+import org.jboss.ide.eclipse.as.core.runtime.server.AbstractJBossServerRuntime;
+
+public class EJB30SupportVerifier {
+ public static boolean verify(IRuntime rt) {
+ AbstractJBossServerRuntime ajbsr = (AbstractJBossServerRuntime)rt.loadAdapter(AbstractJBossServerRuntime.class, null);
+ // i refuse to verify. if they say they support, believe them
+ if( ajbsr == null ) return true;
+
+ // one of ours. verify
+ IPath path = new Path("junk").append(rt.getId()).append("jbide.ejb30").append("1.0");
+ WebtoolsProjectJBossClasspathContainer container =
+ new WebtoolsProjectJBossClasspathContainer(path);
+ IClasspathEntry[] entries = container.getClasspathEntries();
+ if( entries.length == 0 ) return false;
+ IPath p;
+ for( int i = 0; i < entries.length; i++ ) {
+ p = entries[i].getPath();
+ if( !p.toFile().exists())
+ return false;
+ }
+ return true;
+ }
+}
17 years, 8 months
JBoss Tools SVN: r1976 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages: types and 1 other directory.
by jbosstools-commits@lists.jboss.org
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);
17 years, 8 months