Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2010-06-24 18:50:38 +0000
committerkmoore2010-06-24 18:50:38 +0000
commit98730ccf696eb9462ab0cd48a9aafe8b28db1451 (patch)
tree06470bd8887bce7cb5548cfa79f3b3d9e717d0c4
parent4ef4a0ea37129af348f77a6764ef88f87a0adeac (diff)
downloadwebtools.dali-98730ccf696eb9462ab0cd48a9aafe8b28db1451.tar.gz
webtools.dali-98730ccf696eb9462ab0cd48a9aafe8b28db1451.tar.xz
webtools.dali-98730ccf696eb9462ab0cd48a9aafe8b28db1451.zip
Bug 315827 - JpaDetailsView JpaProject leak
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF2
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java39
2 files changed, 22 insertions, 19 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF
index 9678830154..04a84a5161 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF
+++ b/jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.jpt.ui;singleton:=true
-Bundle-Version: 2.3.0.qualifier
+Bundle-Version: 2.3.1.qualifier
Bundle-Activator: org.eclipse.jpt.ui.JptUiPlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java
index 17164a3c89..d04e3cbb00 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/views/JpaDetailsView.java
@@ -127,25 +127,28 @@ public class JpaDetailsView extends AbstractJpaView
}
this.currentSelection = jpaSelection;
- JpaDetailsPage<JpaStructureNode> newPage = null;
- if (jpaSelection != JpaSelection.NULL_SELECTION) {
- JpaStructureNode newNode = jpaSelection.getSelectedNode();
- newPage = (JpaDetailsPage<JpaStructureNode>) getDetailsPage(newNode);
- if (this.currentPage != null && this.currentPage != newPage){
- try {
- this.currentPage.setSubject(null);
- } catch (Exception e) {
- JptUiPlugin.log(e);
- }
+ if (jpaSelection == JpaSelection.NULL_SELECTION) {
+ if (this.currentPage != null) {
+ this.currentPage.setSubject(null);
+ this.setCurrentPage(null);
}
- if (newPage != null) {
- try {
- newPage.setSubject(newNode);
- } catch (Exception e) {
- // Show error page
- newPage = null;
- JptUiPlugin.log(e);
- }
+ return;
+ }
+ JpaStructureNode newNode = jpaSelection.getSelectedNode();
+ JpaDetailsPage<JpaStructureNode> newPage = (JpaDetailsPage<JpaStructureNode>) getDetailsPage(newNode);
+ if (this.currentPage != null && this.currentPage != newPage){
+ try {
+ this.currentPage.setSubject(null);
+ } catch (Exception e) {
+ JptUiPlugin.log(e);
+ }
+ }
+ if (newPage != null) {
+ try {
+ newPage.setSubject(newNode);
+ } catch (Exception e) {
+ newPage = null;// Show error page
+ JptUiPlugin.log(e);
}
}
setCurrentPage(newPage);

Back to the top