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


Java PopupStep.FINAL_CHOICE属性代码示例

本文整理汇总了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;
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:TreePopupImpl.java

示例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);
		}
	};
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:31,代码来源:AddImportAction.java

示例3: getNextStep

public PopupStep getNextStep(Project project, ChooseRunConfigurationPopup action) {
  return PopupStep.FINAL_CHOICE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:ChooseRunConfigurationPopup.java

示例4: onChosen

@Override
public PopupStep onChosen(String selectedTarget, boolean finalChoice) {
  this.selectedTarget = selectedTarget;
  return PopupStep.FINAL_CHOICE;
}
 
开发者ID:facebook,项目名称:buck,代码行数:5,代码来源:MoveResourceFiles.java

示例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;
      }
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:45,代码来源:TreePopupImpl.java


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