本文整理汇总了Java中org.tigris.subversion.subclipse.ui.SVNUIPlugin.getActivePage方法的典型用法代码示例。如果您正苦于以下问题:Java SVNUIPlugin.getActivePage方法的具体用法?Java SVNUIPlugin.getActivePage怎么用?Java SVNUIPlugin.getActivePage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.tigris.subversion.subclipse.ui.SVNUIPlugin
的用法示例。
在下文中一共展示了SVNUIPlugin.getActivePage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTargetPage
import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
* Return the path that was active when the menu item was selected.
* @return IWorkbenchPage
*/
protected IWorkbenchPage getTargetPage() {
if (getTargetPart() == null) return SVNUIPlugin.getActivePage();
return getTargetPart().getSite().getPage();
}
示例2: showAnnotations
import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
* Show the annotation view.
* @param svnFile
* @param svnAnnotateBlocks
* @param contents
* @param useHistoryView
* @throws PartInitException
*/
public void showAnnotations(ISVNRemoteFile svnFile, Collection svnAnnotateBlocks, InputStream contents, boolean useHistoryView) throws PartInitException {
// Disconnect from old annotation editor
disconnect();
// Remove old viewer
Control[] oldChildren = top.getChildren();
if (oldChildren != null) {
for (int i = 0; i < oldChildren.length; i++) {
oldChildren[i].dispose();
}
}
viewer = new ListViewer(top, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new ArrayContentProvider());
viewer.setLabelProvider(new LabelProvider());
viewer.addSelectionChangedListener(this);
viewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), IHelpContextIds.ANNOTATIONS_VIEW);
top.layout();
this.svnFile = svnFile;
this.contents = contents;
this.svnAnnotateBlocks = svnAnnotateBlocks;
page = SVNUIPlugin.getActivePage();
viewer.setInput(svnAnnotateBlocks);
editor = (ITextEditor) openEditor();
IDocumentProvider provider = editor.getDocumentProvider();
document = provider.getDocument(editor.getEditorInput());
setPartName(Policy.bind("SVNAnnotateView.showFileAnnotation", new Object[] {svnFile.getName()})); //$NON-NLS-1$
setTitleToolTip(svnFile.getName());
if (!useHistoryView) {
return;
}
// Get hook to the HistoryView
historyView = (IHistoryView)page.showView(ISVNUIConstants.HISTORY_VIEW_ID);
if (historyView != null) {
historyView.showHistoryFor(svnFile);
}
}