本文整理汇总了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());
}
示例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();
}
示例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;
}