diff options
author | kchan | 2009-01-14 20:58:30 +0000 |
---|---|---|
committer | kchan | 2009-01-14 20:58:30 +0000 |
commit | 20cdc01717d39552f5823c0b3a5d144f9575d25b (patch) | |
tree | 7430531b5a6c8901f62bf605c32f47aa80de5dc4 | |
parent | 189b1df7cf181f2e238595099ad41401a66fbf3a (diff) | |
download | webtools.webservices-20cdc01717d39552f5823c0b3a5d144f9575d25b.tar.gz webtools.webservices-20cdc01717d39552f5823c0b3a5d144f9575d25b.tar.xz webtools.webservices-20cdc01717d39552f5823c0b3a5d144f9575d25b.zip |
[261087] no way to get meta-inf path for a project
-rw-r--r-- | bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java | 29 |
2 files changed, 28 insertions, 3 deletions
diff --git a/bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF index 3a6ad24ee..46c324f1c 100644 --- a/bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.jst.ws/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %PLUGIN_NAME Bundle-SymbolicName: org.eclipse.jst.ws -Bundle-Version: 1.0.306.qualifier +Bundle-Version: 1.0.307.qualifier Bundle-Activator: org.eclipse.jst.ws.internal.plugin.WebServicePlugin Bundle-Vendor: %PLUGIN_PROVIDER Bundle-Localization: plugin diff --git a/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java b/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java index 8fcf3017e..b5dbfcd62 100644 --- a/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java +++ b/bundles/org.eclipse.jst.ws/src/org/eclipse/jst/ws/internal/common/J2EEUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. + * Copyright (c) 2000, 2008, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -20,6 +20,7 @@ * 20080212 208795 ericdp@ca.ibm.com - Eric Peters, WS wizard framework should support EJB 3.0 * 20080229 218696 ericdp@ca.ibm.com - Eric D. Peters, APIs using EJBArtifactEdit not able to deal with some EJB 3.0 beans properly * 20081001 243869 ericdp@ca.ibm.com - Eric D. Peters, Web Service tools allowing mixed J2EE levels + * 20090114 261087 ericdp@ca.ibm.com - Eric D. Peters, No way to get meta-inf path for a project *******************************************************************************/ package org.eclipse.jst.ws.internal.common; @@ -1275,7 +1276,31 @@ public final class J2EEUtils { } return modulePath; } - + + /** + * @param project + * @return + */ + public static IPath getMetaInfPath(IProject project){ + + IVirtualComponent component = ComponentCore.createComponent(project); + + //should META-INF location be pulled in from the .component file rather than hardcoded here? + IVirtualFolder metaInfDir = component.getRootFolder().getFolder(new Path("/META-INF")); + IPath modulePath = metaInfDir.getWorkspaceRelativePath(); + + if (!metaInfDir.exists()) + { + try + { + metaInfDir.create(0,null); + } + catch (CoreException e) + {} + } + return modulePath; + } + /** * |