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