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


Java ListDialogField.getSelectedElements方法代码示例

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


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

示例1: doubleClicked

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
public void doubleClicked(ListDialogField<String> field) {
	List<?> selectedElements= field.getSelectedElements();
	if (selectedElements.size() == 1) {
		String selected= (String) selectedElements.get(0);
		fCategoryList.setChecked(selected, !fCategoryList.isChecked(selected));
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:CategoryFilterActionGroup.java

示例2: doubleClicked

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
public void doubleClicked(ListDialogField<CPVariableElement> field) {
	if (fEditOnDoubleclick) {
		List<CPVariableElement> selected= field.getSelectedElements();
		if (canEdit(selected, containsReadOnly(selected))) {
			editEntries(selected.get(0));
		}
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:9,代码来源:VariableBlock.java

示例3: editEntry

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
private void editEntry(ListDialogField<IAccessRule> field) {

		List<IAccessRule> selElements= field.getSelectedElements();
		if (selElements.size() != 1) {
			return;
		}
		IAccessRule rule= selElements.get(0);
		AccessRuleEntryDialog dialog= new AccessRuleEntryDialog(getShell(), rule, fCurrElement);
		if (dialog.open() == Window.OK) {
			field.replaceElement(rule, dialog.getRule());
		}
	}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:AccessRulesDialog.java

示例4: buildPathCustomButtonPressed

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
public void buildPathCustomButtonPressed(ListDialogField<CPListElement> field, int index) {
	List<CPListElement> elems= field.getSelectedElements();
	field.removeElements(elems);
	if (index == IDX_BOTTOM) {
		field.addElements(elems);
	} else if (index == IDX_TOP) {
		field.addElements(elems, 0);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:10,代码来源:BuildPathsBlock.java

示例5: customButtonPressed

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
public void customButtonPressed(ListDialogField<CPVariableElement> field, int index) {
	switch (index) {
	case 0: /* add */
		editEntries(null);
		break;
	case 1: /* edit */
		List<CPVariableElement> selected= field.getSelectedElements();
		editEntries(selected.get(0));
		break;
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:12,代码来源:VariableBlock.java

示例6: openPropertyDialog

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
private void openPropertyDialog(ListDialogField<IJavaProject> field) {
   IJavaProject project= field.getSelectedElements().get(0);
PreferencesUtil.createPropertyDialogOn(fShell, project, CleanUpPreferencePage.PROP_ID, null, null).open();
List<?> selectedElements= field.getSelectedElements();
fProvider.reset();
field.refresh();
field.selectElements(new StructuredSelection(selectedElements));
  }
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:9,代码来源:CleanUpRefactoringWizard.java

示例7: canEdit

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
private boolean canEdit(ListDialogField<ImportOrderEntry> field) {
	List<ImportOrderEntry> selected= field.getSelectedElements();
	return selected.size() == 1;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:5,代码来源:ImportOrganizeConfigurationBlock.java

示例8: selectionChanged

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
public void selectionChanged(ListDialogField<TodoTask> field) {
	List<TodoTask> selectedElements= field.getSelectedElements();
	field.enableButton(IDX_EDIT, canEdit(selectedElements));
	field.enableButton(IDX_DEFAULT, canSetToDefault(selectedElements));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:6,代码来源:TodoTaskConfigurationBlock.java

示例9: canEdit

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
private boolean canEdit(ListDialogField<String> field) {
	List<String> selected= field.getSelectedElements();
	return selected.size() == 1;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:CodeAssistFavoritesConfigurationBlock.java

示例10: doSelectionChanged

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
protected void doSelectionChanged(ListDialogField<IAccessRule> field) {
	List<IAccessRule> selected= field.getSelectedElements();
	field.enableButton(IDX_EDIT, canEdit(selected));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:AccessRulesDialog.java

示例11: doSelectionChanged

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
protected void doSelectionChanged(ListDialogField<String> field) {
	List<String> selected= field.getSelectedElements();
	field.enableButton(IDX_EDIT, canEdit(selected));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:SetFilterWizardPage.java

示例12: canEdit

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
/**
 * Checks if field can be edited.
 *
 * @param field the list dialog field
 * @return <code>true</code> if it can be edited, <code>false</code> otherwise
 */
private boolean canEdit(ListDialogField<String> field) {
	List<String> selected= field.getSelectedElements();
	return selected.size() == 1;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:11,代码来源:ExpandWithConstructorsConfigurationBlock.java

示例13: canRemove

import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField; //导入方法依赖的package包/类
/**
 * Checks if the field can be removed.
 *
 * @param field the list dialog field
 * @return <code>true</code> if it can be removed, <code>false</code> otherwise
 */
private boolean canRemove(ListDialogField<String> field) {
	List<String> selected= field.getSelectedElements();
	return selected.size() != 0;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:11,代码来源:ExpandWithConstructorsConfigurationBlock.java


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