Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jaxb
diff options
context:
space:
mode:
authorPaul Fullbright2012-09-05 12:06:10 -0400
committerPaul Fullbright2012-09-05 12:35:34 -0400
commit4c3a402fc4287b06f8941f31d6479d86e0c1ad5b (patch)
tree169cc147afa7f835966cf0e3ca239c7bedc2e77c /jaxb
parentb6fb2315b64773f50695ce74a2426e6c61e8e489 (diff)
downloadwebtools.dali-4c3a402fc4287b06f8941f31d6479d86e0c1ad5b.tar.gz
webtools.dali-4c3a402fc4287b06f8941f31d6479d86e0c1ad5b.tar.xz
webtools.dali-4c3a402fc4287b06f8941f31d6479d86e0c1ad5b.zip
Fixed add moxy property action
Diffstat (limited to 'jaxb')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/commands/AddEclipseLinkJaxbPropertyCommandHandler.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/commands/AddEclipseLinkJaxbPropertyCommandHandler.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/commands/AddEclipseLinkJaxbPropertyCommandHandler.java
index 440ae8faca..e6600498dd 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/commands/AddEclipseLinkJaxbPropertyCommandHandler.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.ui/src/org/eclipse/jpt/jaxb/eclipselink/ui/internal/commands/AddEclipseLinkJaxbPropertyCommandHandler.java
@@ -30,7 +30,6 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.jaxb.core.JptJaxbCorePlugin;
import org.eclipse.jpt.jaxb.core.context.JaxbPackage;
import org.eclipse.jpt.jaxb.core.resource.jaxbprops.JaxbPropertiesResource;
@@ -138,11 +137,12 @@ public class AddEclipseLinkJaxbPropertyCommandHandler
}
protected IFolder getFolder(JaxbPackage jaxbPackage) throws JavaModelException {
- IPackageFragment jdtPackage =
- (IPackageFragment) CollectionTools.get(
- jaxbPackage.getContextRoot().getTypes(jaxbPackage), 0).
- getJavaResourceType().getJavaResourceCompilationUnit().getCompilationUnit().getParent();
- return (IFolder) jdtPackage.getUnderlyingResource();
+ for (IPackageFragment pkgFragment : jaxbPackage.getJaxbProject().getJavaProject().getPackageFragments()) {
+ if (pkgFragment.getElementName().equals(jaxbPackage.getName())) {
+ return (IFolder) pkgFragment.getUnderlyingResource();
+ }
+ }
+ return null;
}
protected Properties createNewProperties() {

Back to the top