本文整理汇总了Java中com.intellij.openapi.ui.popup.PopupStep.FINAL_CHOICE属性的典型用法代码示例。如果您正苦于以下问题:Java PopupStep.FINAL_CHOICE属性的具体用法?Java PopupStep.FINAL_CHOICE怎么用?Java PopupStep.FINAL_CHOICE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.openapi.ui.popup.PopupStep
的用法示例。
在下文中一共展示了PopupStep.FINAL_CHOICE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleSelect
private void handleSelect(boolean handleFinalChoices, MouseEvent e) {
final boolean pathIsAlreadySelected = myShowingChildPath != null && myShowingChildPath.equals(myWizardTree.getSelectionPath());
if (pathIsAlreadySelected) return;
myPendingChildPath = null;
Object selected = myWizardTree.getLastSelectedPathComponent();
if (selected != null) {
final Object userObject = extractUserObject(selected);
if (getTreeStep().isSelectable(selected, userObject)) {
disposeChildren();
final boolean hasNextStep = myStep.hasSubstep(userObject);
if (!hasNextStep && !handleFinalChoices) {
myShowingChildPath = null;
return;
}
final PopupStep queriedStep = myStep.onChosen(userObject, handleFinalChoices);
if (queriedStep == PopupStep.FINAL_CHOICE || !hasNextStep) {
setFinalRunnable(myStep.getFinalRunnable());
setOk(true);
disposeAllParents(e);
}
else {
myShowingChildPath = myWizardTree.getSelectionPath();
handleNextStep(queriedStep, myShowingChildPath);
myShowingChildPath = null;
}
}
}
}
示例2: getExcludesStep
@Nullable
public static PopupStep getExcludesStep(String qname, final Project project)
{
if(qname == null)
{
return PopupStep.FINAL_CHOICE;
}
List<String> toExclude = getAllExcludableStrings(qname);
return new BaseListPopupStep<String>(null, toExclude)
{
@NotNull
@Override
public String getTextFor(String value)
{
return "Exclude '" + value + "' from auto-import";
}
@Override
public PopupStep onChosen(String selectedValue, boolean finalChoice)
{
if(finalChoice)
{
excludeFromImport(project, selectedValue);
}
return super.onChosen(selectedValue, finalChoice);
}
};
}
示例3: getNextStep
public PopupStep getNextStep(Project project, ChooseRunConfigurationPopup action) {
return PopupStep.FINAL_CHOICE;
}
示例4: onChosen
@Override
public PopupStep onChosen(String selectedTarget, boolean finalChoice) {
this.selectedTarget = selectedTarget;
return PopupStep.FINAL_CHOICE;
}
示例5: handleSelect
private void handleSelect(boolean handleFinalChoices, MouseEvent e) {
final boolean pathIsAlreadySelected = myShowingChildPath != null && myShowingChildPath.equals(myWizardTree.getSelectionPath());
if (pathIsAlreadySelected) return;
myPendingChildPath = null;
Object selected = myWizardTree.getLastSelectedPathComponent();
if (selected != null) {
final Object userObject = extractUserObject(selected);
if (getTreeStep().isSelectable(selected, userObject)) {
disposeChildren();
final boolean hasNextStep = myStep.hasSubstep(userObject);
if (!hasNextStep && !handleFinalChoices) {
myShowingChildPath = null;
return;
}
AtomicBoolean insideOnChosen = new AtomicBoolean(true);
ApplicationManager.getApplication().invokeLater(() -> {
if (insideOnChosen.get()) {
LOG.error("Showing dialogs from popup onChosen can result in focus issues. Please put the handler into BaseStep.doFinalStep or PopupStep.getFinalRunnable.");
}
}, ModalityState.any());
final PopupStep queriedStep;
try {
queriedStep = myStep.onChosen(userObject, handleFinalChoices);
}
finally {
insideOnChosen.set(false);
}
if (queriedStep == PopupStep.FINAL_CHOICE || !hasNextStep) {
setFinalRunnable(myStep.getFinalRunnable());
setOk(true);
disposeAllParents(e);
}
else {
myShowingChildPath = myWizardTree.getSelectionPath();
handleNextStep(queriedStep, myShowingChildPath);
myShowingChildPath = null;
}
}
}
}