blob: f71fac4b0f316205ad6c61b8505834268435d545 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2017 IBM Corporation and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
*******************************************************************************/
package org.eclipse.dltk.internal.ui.scriptview;
import org.eclipse.ui.views.framelist.TreeFrame;
import org.eclipse.ui.views.framelist.TreeViewerFrameSource;
class ScriptFrameSource extends TreeViewerFrameSource {
private ScriptExplorerPart fPackagesExplorer;
ScriptFrameSource(ScriptExplorerPart explorer) {
super(explorer.getTreeViewer());
fPackagesExplorer= explorer;
}
@Override
protected TreeFrame createFrame(Object input) {
TreeFrame frame = super.createFrame(input);
frame.setName(fPackagesExplorer.getFrameName(input));
frame.setToolTipText(fPackagesExplorer.getToolTipText(input));
return frame;
}
/**
* Also updates the title of the packages explorer
*/
@Override
protected void frameChanged(TreeFrame frame) {
super.frameChanged(frame);
fPackagesExplorer.updateTitle();
}
}