當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。