Skip to content

Commit

Permalink
Startlevel&Autostart values are displaying in Run/Debug config #649
Browse files Browse the repository at this point in the history
Disposing the editor in tree viewer.

Fixes #649
  • Loading branch information
Dinesh0723 committed Oct 31, 2023
1 parent d551a60 commit 1b48d0b
Showing 1 changed file with 6 additions and 14 deletions.
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
Expand All @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1b48d0b

Please sign in to comment.