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


Java Messages.showEditableChooseDialog方法代码示例

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


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

示例1: actionPerformed

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
    final Project project = e.getData(CommonDataKeys.PROJECT);

    List<String> channelsId = SlackStorage.getInstance().getChannelsId();

    if (channelsId.size() > 0) {
        String channelToRemove = Messages.showEditableChooseDialog(
                "Select the channel to remove",
                SlackChannel.getSettingsDescription(),
                SlackStorage.getSlackIcon(),
                channelsId.toArray(new String[channelsId.size()]),
                channelsId.get(0),
                null
        );

        if (channelsId.contains(channelToRemove)) {
            SlackStorage.getInstance().removeChannelByDescription(channelToRemove);
            Messages.showMessageDialog(project, "Channel \"" + channelToRemove + "\" removed.", "Information", Messages.getInformationIcon());
        }
    }
}
 
开发者ID:chakki-works,项目名称:watchMe,代码行数:23,代码来源:SlackSettings.java

示例2: askForAttributeValue

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Nullable
private String askForAttributeValue(@NotNull PsiElement context) {
  final AndroidFacet facet = AndroidFacet.getInstance(context);
  final String message = "Specify value of attribute '" + myAttributeName + "'";
  final String title = "Set Attribute Value";

  if (facet != null) {
    final SystemResourceManager srm = facet.getSystemResourceManager();

    if (srm != null) {
      final AttributeDefinitions attrDefs = srm.getAttributeDefinitions();

      if (attrDefs != null) {
        final AttributeDefinition def = attrDefs.getAttrDefByName(myAttributeName);
        if (def != null) {
          final String[] variants = def.getValues();

          if (variants.length > 0) {
            return Messages.showEditableChooseDialog(message, title, Messages.getQuestionIcon(), variants, variants[0], null);
          }
        }
      }
    }
  }
  return Messages.showInputDialog(context.getProject(), message, title, Messages.getQuestionIcon());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:SetAttributeQuickFix.java

示例3: run

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
public void run() {
  IProperty textProperty = FormInspectionUtil.findProperty(myComponent, SwingProperties.TEXT);
  StringDescriptor descriptor = (StringDescriptor) textProperty.getPropertyValue(myComponent);
  String value = StringDescriptorManager.getInstance(myComponent.getModule()).resolve(myComponent, descriptor);
  String[] variants = fillMnemonicVariants(SupportCode.parseText(value).myText);
  String result = Messages.showEditableChooseDialog(UIDesignerBundle.message("inspection.missing.mnemonics.quickfix.prompt"),
                                                    UIDesignerBundle.message("inspection.missing.mnemonics.quickfix.title"),
                                                    Messages.getQuestionIcon(), variants, variants [0], null);
  if (result != null) {
    if (!myEditor.ensureEditable()) {
      return;
    }
    FormInspectionUtil.updateStringPropertyValue(myEditor, myComponent, (IntroStringProperty)textProperty, descriptor, result);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:AssignMnemonicFix.java

示例4: actionPerformed

import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
public final void actionPerformed(AnActionEvent e) {
  String[] strings = ArrayUtil.toStringArray(myPredefinedSeparators);
  String current = getCurrentSeparator();
  String separator = Messages.showEditableChooseDialog(PropertiesBundle.message("select.property.separator.dialog.text"),
                                                       PropertiesBundle.message("select.property.separator.dialog.title"),
                                                       Messages.getQuestionIcon(),
                                                       strings, current, null);
  if (separator == null) {
    return;
  }
  myPredefinedSeparators.add(separator);
  refillActionGroup();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:PropertiesGroupingStructureViewComponent.java


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