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


Java IWorkingSet.equals方法代码示例

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


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

示例1: removeSelectedWorkingSets

import org.eclipse.ui.IWorkingSet; //导入方法依赖的package包/类
/**
 * Removes the selected working sets from the workbench.
 */
private void removeSelectedWorkingSets() {
	ISelection selection= fTableViewer.getSelection();
	if (selection instanceof IStructuredSelection) {
		IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
		Iterator<?> iter= ((IStructuredSelection)selection).iterator();
		while (iter.hasNext()) {
			IWorkingSet workingSet= (IWorkingSet)iter.next();
			if (fAddedWorkingSets.contains(workingSet)) {
				fAddedWorkingSets.remove(workingSet);
			} else {
				IWorkingSet[] recentWorkingSets= manager.getRecentWorkingSets();
				for (int i= 0; i < recentWorkingSets.length; i++) {
					if (workingSet.equals(recentWorkingSets[i])) {
						fRemovedMRUWorkingSets.add(workingSet);
						break;
					}
				}
				fRemovedWorkingSets.add(workingSet);
			}
			fAllWorkingSets.remove(workingSet);
			manager.removeWorkingSet(workingSet);
		}
		fTableViewer.remove(((IStructuredSelection)selection).toArray());
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:29,代码来源:WorkingSetConfigurationDialog.java

示例2: adjustOrderingOfAllWorkingSets

import org.eclipse.ui.IWorkingSet; //导入方法依赖的package包/类
/**
 * Adjusts the relative ordering of the active working sets in fAllWorkingSets according to
 * fActiveWorkingSets.
 * 
 * @since 3.7
 */
private void adjustOrderingOfAllWorkingSets() {
	int countActive= 0;
	for (Iterator<IWorkingSet> iter= fAllWorkingSets.iterator(); iter.hasNext();) {
		IWorkingSet set= iter.next();
		if (fActiveWorkingSets.contains(set)) {
			IWorkingSet workingSet= fActiveWorkingSets.get(countActive++);
			if (!workingSet.equals(set)) {
				int index= fAllWorkingSets.indexOf(workingSet);
				fAllWorkingSets.set(fAllWorkingSets.indexOf(set), workingSet);
				fAllWorkingSets.set(index, set);
			}
			if (countActive == fActiveWorkingSets.size())
				return;
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:23,代码来源:WorkingSetModel.java

示例3: nameExists

import org.eclipse.ui.IWorkingSet; //导入方法依赖的package包/类
private boolean nameExists( IWorkingSet editedWorkingSet, String name ) {
  IWorkingSet[] workingSets = workingSetsProvider.getWorkingSets();
  for( IWorkingSet workingSet : workingSets ) {
    if( !workingSet.equals( editedWorkingSet ) && name.equals( workingSet.getLabel() ) ) {
      return true;
    }
  }
  return false;
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:10,代码来源:Validator.java

示例4: doPropertyChange

import org.eclipse.ui.IWorkingSet; //导入方法依赖的package包/类
private void doPropertyChange(PropertyChangeEvent event) {
	String property= event.getProperty();
	if (IWorkingSetManager.CHANGE_WORKING_SET_LABEL_CHANGE.equals(property)) {
		fChangeListener.propertyChange(event);
	} else if  (IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE.equals(property)) {
		IWorkingSet newWorkingSet= (IWorkingSet) event.getNewValue();
		if (newWorkingSet.equals(fWorkingSet)) {
			if (fWorkingSetFilter != null) {
				fWorkingSetFilter.notifyWorkingSetContentChange(); // first refresh the filter
			}
			fChangeListener.propertyChange(event);
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:15,代码来源:WorkingSetFilterActionGroup.java


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