当前位置: 首页>>代码示例>>Java>>正文


Java SVNUIPlugin.getActivePage方法代码示例

本文整理汇总了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();
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:9,代码来源:TeamAction.java

示例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);
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:54,代码来源:AnnotateView.java


注:本文中的org.tigris.subversion.subclipse.ui.SVNUIPlugin.getActivePage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。