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


Java IAggregateWorkingSet类代码示例

本文整理汇总了Java中org.eclipse.ui.IAggregateWorkingSet的典型用法代码示例。如果您正苦于以下问题:Java IAggregateWorkingSet类的具体用法?Java IAggregateWorkingSet怎么用?Java IAggregateWorkingSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IAggregateWorkingSet类属于org.eclipse.ui包,在下文中一共展示了IAggregateWorkingSet类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateTitle

import org.eclipse.ui.IAggregateWorkingSet; //导入依赖的package包/类
/**
 * The superclass does not deal with the content description, handle it
 * here.
 * 
 * @noreference
 */
public void updateTitle() {
	super.updateTitle();
	Object input = getCommonViewer().getInput();

	if (input == null || input instanceof IAggregateWorkingSet) {
		setContentDescription(""); //$NON-NLS-1$
		return;
	}

	if (!(input instanceof IResource)) {
		if (input instanceof IAdaptable) {
			IWorkbenchAdapter wbadapter = (IWorkbenchAdapter) ((IAdaptable) input)
					.getAdapter(IWorkbenchAdapter.class);
			if (wbadapter != null) {
				setContentDescription(wbadapter.getLabel(input));
				return;
			}
		}
		setContentDescription(input.toString());
		return;
	}

	IResource res = (IResource) input;
	setContentDescription(res.getName());
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:32,代码来源:ProjectExplorer.java

示例2: propertyChange

import org.eclipse.ui.IAggregateWorkingSet; //导入依赖的package包/类
public void propertyChange(PropertyChangeEvent event) {
	
	if (ignoreFilterChangeEvents)
		return;
	
	IWorkingSet newWorkingSet = (IWorkingSet) event.getNewValue();

	setWorkingSet(newWorkingSet);
	if (newWorkingSet != null) {
		if (!contentService.isActive(WorkingSetsContentProvider.EXTENSION_ID)) {
			contentService.getActivationService().activateExtensions(
					new String[] { WorkingSetsContentProvider.EXTENSION_ID }, false);
			contentService.getActivationService().persistExtensionActivations();
		}
		if (newWorkingSet.isAggregateWorkingSet()) {
			IAggregateWorkingSet agWs = (IAggregateWorkingSet) newWorkingSet;
			IWorkingSet[] comps = agWs.getComponents();
			if (comps.length > 1) {
				viewer.getCommonNavigator().setWorkingSetLabel(
						WorkbenchNavigatorMessages.actions_WorkingSetActionProvider_multipleWorkingSets);
			} else if (comps.length > 0) {
				viewer.getCommonNavigator().setWorkingSetLabel(comps[0].getLabel());
			} else {
				viewer.getCommonNavigator().setWorkingSetLabel(null);
			}
		} else
			viewer.getCommonNavigator().setWorkingSetLabel(workingSet.getLabel());
	} else {
		viewer.getCommonNavigator().setWorkingSetLabel(null);
	}

	viewer.getFrameList().reset();
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:34,代码来源:WorkingSetActionProvider.java

示例3: getChildren

import org.eclipse.ui.IAggregateWorkingSet; //导入依赖的package包/类
public Object[] getChildren(Object parentElement) {
	if (parentElement instanceof IWorkingSet) {
		IWorkingSet workingSet = (IWorkingSet) parentElement;
		if (workingSet.isAggregateWorkingSet() && projectExplorer != null) {
			switch (projectExplorer.getRootMode()) {
				case ProjectExplorer.WORKING_SETS :
					return ((IAggregateWorkingSet) workingSet).getComponents();
				case ProjectExplorer.PROJECTS :
					return getWorkingSetElements(workingSet);
			}
		}
		return getWorkingSetElements(workingSet);
	}
	return NO_CHILDREN;
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:16,代码来源:WorkingSetsContentProvider.java


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