mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
new method setInput() to reset the Viewer.
This commit is contained in:
parent
b23dbe60fc
commit
9204c94847
1 changed files with 14 additions and 1 deletions
|
@ -9,6 +9,7 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.internal.core.model.IWorkingCopy;
|
||||
import org.eclipse.cdt.internal.core.model.WorkingCopy;
|
||||
import org.eclipse.cdt.internal.ui.CFileElementWorkingCopy;
|
||||
import org.eclipse.cdt.internal.ui.StandardCElementLabelProvider;
|
||||
|
@ -48,7 +49,8 @@ import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
|
|||
|
||||
public class CContentOutlinePage extends Page implements IContentOutlinePage, ISelectionChangedListener {
|
||||
private CEditor fEditor;
|
||||
private WorkingCopy fInput;
|
||||
//private WorkingCopy fInput;
|
||||
private IWorkingCopy fInput;
|
||||
private ProblemTreeViewer treeViewer;
|
||||
private ListenerList selectionChangedListeners = new ListenerList();
|
||||
private TogglePresentationAction fTogglePresentation;
|
||||
|
@ -285,4 +287,15 @@ public class CContentOutlinePage extends Page implements IContentOutlinePage, IS
|
|||
if (treeViewer != null)
|
||||
treeViewer.setSelection(selection);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param unit
|
||||
*/
|
||||
public void setInput(IWorkingCopy unit) {
|
||||
fInput = unit;
|
||||
if (treeViewer != null) {
|
||||
treeViewer.setInput (fInput);
|
||||
}
|
||||
contentUpdated();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue