-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Startlevel&Autostart values are displaying in Run/Debug config #649
Disposing the editor in tree viewer. Fixes #649
- Loading branch information
1 parent
d551a60
commit 1b48d0b
Showing
1 changed file
with
6 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2005, 2022 IBM Corporation and others. | ||
* Copyright (c) 2005, 2023 IBM Corporation and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
|
@@ -14,6 +14,7 @@ | |
* EclipseSource Corporation - ongoing enhancements | ||
* Lars Vogel <[email protected]> - Bug 487943 | ||
* Karsten Thoms <[email protected]> - Bug 522332 | ||
* Dinesh Palanisamy (ETAS GmbH) - Issue 649 | ||
*******************************************************************************/ | ||
package org.eclipse.pde.internal.ui.launcher; | ||
|
||
|
@@ -48,7 +49,6 @@ | |
import org.eclipse.jface.viewers.CheckboxTreeViewer; | ||
import org.eclipse.jface.viewers.ILabelProvider; | ||
import org.eclipse.jface.viewers.ITreeContentProvider; | ||
import org.eclipse.jface.viewers.StructuredSelection; | ||
import org.eclipse.jface.viewers.Viewer; | ||
import org.eclipse.jface.viewers.ViewerFilter; | ||
import org.eclipse.jface.window.Window; | ||
|
@@ -838,6 +838,7 @@ public void initializeFrom(ILaunchConfiguration config, boolean enableTable) thr | |
fPluginFilteredTree.getPatternFilter().setPattern(null); | ||
if (!enableTable) { | ||
fPluginTreeViewer.setInput(null); | ||
refreshTreeView(fPluginTreeViewer); | ||
} else if (fPluginTreeViewer.getInput() == null) { | ||
fPluginTreeViewer.setUseHashlookup(true); | ||
fPluginTreeViewer.setInput(PDEPlugin.getDefault()); | ||
|
@@ -1069,21 +1070,12 @@ protected void setVisible(boolean visible) { | |
protected abstract LaunchValidationOperation createValidationOperation() throws CoreException; | ||
|
||
/** | ||
* called before the TreeView is refreshed. This allows any subclasses to cache | ||
* any information in the view and redisplay after the refresh. This is used by the | ||
* OSGiBundleBlock to cache the values of the default launch and auto launch columns | ||
* in the table tree. | ||
* disposing the editor in tree viewer | ||
* | ||
* @param treeView The tree view that will be refreshed. | ||
* @param treeView | ||
* The tree view that will be refreshed. | ||
*/ | ||
protected void refreshTreeView(CheckboxTreeViewer treeView) { | ||
// Remove any selection | ||
if (treeView.getTree().getItemCount() > 0) { | ||
treeView.getTree().setSelection(treeView.getTree().getItem(0)); | ||
} else { | ||
treeView.setSelection(new StructuredSelection(StructuredSelection.EMPTY)); | ||
} | ||
|
||
// Reset any editors on the tree viewer | ||
if (levelColumnEditor != null && levelColumnEditor.getEditor() != null && !levelColumnEditor.getEditor().isDisposed()) { | ||
levelColumnEditor.getEditor().dispose(); | ||
|