diff options
author | pfullbright | 2012-05-10 15:45:49 +0000 |
---|---|---|
committer | pfullbright | 2012-05-10 15:45:49 +0000 |
commit | 8b8ca2f4840414d8021453572704953a18aa5386 (patch) | |
tree | f73e44b290ce1646262bcc5842f300417d9b9832 /jaxb/plugins/org.eclipse.jpt.jaxb.core/src | |
parent | a126499873f1bf00a98de8c963654965f082eb61 (diff) | |
download | webtools.dali-8b8ca2f4840414d8021453572704953a18aa5386.tar.gz webtools.dali-8b8ca2f4840414d8021453572704953a18aa5386.tar.xz webtools.dali-8b8ca2f4840414d8021453572704953a18aa5386.zip |
bug 369684 - added library install delegate disposals
Diffstat (limited to 'jaxb/plugins/org.eclipse.jpt.jaxb.core/src')
2 files changed, 18 insertions, 14 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java index 686bbb11b3..35af48af0d 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java @@ -1168,26 +1168,29 @@ public abstract class AbstractJaxbProject } protected void validateLibraryProvider(List<IMessage> messages) { + IFacetedProject facetedProject = null; try { - IFacetedProject facetedProject = ProjectFacetsManager.create(getProject()); - IProjectFacetVersion facetVersion = facetedProject.getInstalledVersion(JaxbFacet.FACET); - LibraryInstallDelegate lid = new LibraryInstallDelegate(facetedProject, facetVersion); - ILibraryProvider lp = lid.getLibraryProvider(); - if (lid.getLibraryProviderOperationConfig() instanceof JaxbLibraryProviderInstallOperationConfig) { - ((JaxbLibraryProviderInstallOperationConfig) lid.getLibraryProviderOperationConfig()).setJaxbPlatform(getPlatform().getDescription()); - } - if (! lp.isEnabledFor(facetedProject, facetVersion) || ! lid.validate().isOK()) { - messages.add( - DefaultValidationMessages.buildMessage( - IMessage.HIGH_SEVERITY, - JaxbValidationMessages.PROJECT_INVALID_LIBRARY_PROVIDER, - this)); - } + facetedProject = ProjectFacetsManager.create(getProject()); } catch (CoreException ce) { // fall through JptJaxbCorePlugin.log(ce); + } + + IProjectFacetVersion facetVersion = facetedProject.getInstalledVersion(JaxbFacet.FACET); + LibraryInstallDelegate lid = new LibraryInstallDelegate(facetedProject, facetVersion); + ILibraryProvider lp = lid.getLibraryProvider(); + if (lid.getLibraryProviderOperationConfig() instanceof JaxbLibraryProviderInstallOperationConfig) { + ((JaxbLibraryProviderInstallOperationConfig) lid.getLibraryProviderOperationConfig()).setJaxbPlatform(getPlatform().getDescription()); + } + if (! lp.isEnabledFor(facetedProject, facetVersion) || ! lid.validate().isOK()) { + messages.add( + DefaultValidationMessages.buildMessage( + IMessage.HIGH_SEVERITY, + JaxbValidationMessages.PROJECT_INVALID_LIBRARY_PROVIDER, + this)); } + lid.dispose(); } protected void validateSchemaLibrary(List<IMessage> messages) { diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/facet/JaxbFacetDataModelProvider.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/facet/JaxbFacetDataModelProvider.java index c1a2b6b5bd..638e6ea8c5 100644 --- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/facet/JaxbFacetDataModelProvider.java +++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/facet/JaxbFacetDataModelProvider.java @@ -273,5 +273,6 @@ public abstract class JaxbFacetDataModelProvider public void dispose() { super.dispose(); getFacetedProjectWorkingCopy().removeListener(this.fprojListener); + this.defaultLibraryInstallDelegate.dispose(); } } |