當前位置: 首頁>>代碼示例>>Java>>正文


Java IWorkingSetEditWizard類代碼示例

本文整理匯總了Java中org.eclipse.ui.dialogs.IWorkingSetEditWizard的典型用法代碼示例。如果您正苦於以下問題:Java IWorkingSetEditWizard類的具體用法?Java IWorkingSetEditWizard怎麽用?Java IWorkingSetEditWizard使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IWorkingSetEditWizard類屬於org.eclipse.ui.dialogs包,在下文中一共展示了IWorkingSetEditWizard類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: run

import org.eclipse.ui.dialogs.IWorkingSetEditWizard; //導入依賴的package包/類
@Override
public void run() {
	Shell shell= getShell();
	IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
	IWorkingSet workingSet= fActionGroup.getWorkingSet();
	if (workingSet == null || workingSet.isAggregateWorkingSet()) {
		setEnabled(false);
		return;
	}
	IWorkingSetEditWizard wizard= manager.createWorkingSetEditWizard(workingSet);
	if (wizard == null) {
		String title= WorkingSetMessages.EditWorkingSetAction_error_nowizard_title;
		String message= WorkingSetMessages.EditWorkingSetAction_error_nowizard_message;
		MessageDialog.openError(shell, title, message);
		return;
	}
	WizardDialog dialog= new WizardDialog(shell, wizard);
 	dialog.create();
	if (dialog.open() == Window.OK)
		fActionGroup.setWorkingSet(wizard.getSelection(), true);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:22,代碼來源:EditWorkingSetAction.java

示例2: editSelectedWorkingSet

import org.eclipse.ui.dialogs.IWorkingSetEditWizard; //導入依賴的package包/類
private void editSelectedWorkingSet() {
	IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
	IWorkingSet editWorkingSet= (IWorkingSet)((IStructuredSelection)fTableViewer.getSelection()).getFirstElement();
	IWorkingSetEditWizard wizard= manager.createWorkingSetEditWizard(editWorkingSet);
	WizardDialog dialog= new WizardDialog(getShell(), wizard);
	IWorkingSet originalWorkingSet= fEditedWorkingSets.get(editWorkingSet);
	boolean firstEdit= originalWorkingSet == null;

	// save the original working set values for restoration when selection
	// dialog is cancelled.
	if (firstEdit) {
		originalWorkingSet=
			PlatformUI.getWorkbench().getWorkingSetManager().
			createWorkingSet(editWorkingSet.getName(), editWorkingSet.getElements());
	} else {
		fEditedWorkingSets.remove(editWorkingSet);
	}
	dialog.create();
	if (dialog.open() == Window.OK) {
		editWorkingSet= wizard.getSelection();
		if (fIsSortingEnabled)
			fTableViewer.refresh();
		else
			fTableViewer.update(editWorkingSet, null);

		// make sure ok button is enabled when the selected working set
		// is edited. Fixes bug 33386.
		updateButtonAvailability();
	}
	fEditedWorkingSets.put(editWorkingSet, originalWorkingSet);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:32,代碼來源:WorkingSetConfigurationDialog.java

示例3: createWorkingSetEditWizard

import org.eclipse.ui.dialogs.IWorkingSetEditWizard; //導入依賴的package包/類
/**
 * Creates a working set edit wizard for the specified working set. The
 * working set will already be set in the wizard. The caller is responsible
 * for creating and opening a wizard dialog.
 * 
 * Example: <code>
 *  IWorkingSetEditWizard wizard = workingSetManager.createWorkingSetEditWizard(workingSet);
 *  if (wizard != null) {
 * 	  WizardDialog dialog = new WizardDialog(shell, wizard);
 * 
 * 	  dialog.create();		
 * 	  if (dialog.open() == Window.OK) {		
 * 		  workingSet = wizard.getSelection();
 *    }
 * 	}
 * </code>
 * 
 * @param workingSet
 *            working set to create a working set edit wizard for.
 * @return a working set edit wizard to edit the specified working set or
 *         <code>null</code> if no edit wizard has been defined for the
 *         working set. If the defined edit wizard for the working set could
 *         not be loaded a default IResource based wizard will be returned.
 *         If the default edit wizard can not be loaded <code>null</code> is
 *         returned.
 * @since 2.1
 */
public IWorkingSetEditWizard createWorkingSetEditWizard(
		IWorkingSet workingSet);
 
開發者ID:ghillairet,項目名稱:gef-gwt,代碼行數:30,代碼來源:IWorkingSetManager.java


注:本文中的org.eclipse.ui.dialogs.IWorkingSetEditWizard類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。