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