• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PackageChooserDialog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.ide.util.PackageChooserDialog的典型用法代码示例。如果您正苦于以下问题:Java PackageChooserDialog类的具体用法?Java PackageChooserDialog怎么用?Java PackageChooserDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PackageChooserDialog类属于com.intellij.ide.util包,在下文中一共展示了PackageChooserDialog类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: PackageNameReferenceEditorCombo

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
public PackageNameReferenceEditorCombo(final String text, @NotNull final Project project,
                                       final String recentsKey, final String chooserTitle) {
  super(null, text, project, false, recentsKey);
  addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      final PackageChooserDialog chooser = new PackageChooserDialog(chooserTitle, project);
      chooser.selectPackage(getText());
      if (chooser.showAndGet()) {
        final PsiPackage aPackage = chooser.getSelectedPackage();
        if (aPackage != null) {
          setText(aPackage.getQualifiedName());
        }
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:PackageNameReferenceEditorCombo.java


示例2: actionPerformed

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
@Override
public void actionPerformed(final AnActionEvent e) {
  final Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());

  PackageChooserDialog chooser = new PackageChooserDialog("Choose packages", project);
  chooser.show();

  final List<PsiPackage> packages = chooser.getSelectedPackages();

  for (PsiPackage aPackage : packages) {
    final String qualifiedName = aPackage.getQualifiedName();

    if (qualifiedName.isEmpty()){
      myDataModel.addElement(GroovyDocConfiguration.ALL_PACKAGES);
    }
    myDataModel.addElement(qualifiedName);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:GroovyDocAddPackageAction.java


示例3: addPatternFilter

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
protected void addPatternFilter() {
  PackageChooser chooser =
    new PackageChooserDialog(CodeInsightBundle.message("coverage.pattern.filter.editor.choose.package.title"), myProject);
  if (chooser.showAndGet()) {
    List<PsiPackage> packages = chooser.getSelectedPackages();
    if (!packages.isEmpty()) {
      for (final PsiPackage aPackage : packages) {
        final String fqName = aPackage.getQualifiedName();
        final String pattern = fqName.length() > 0 ? fqName + ".*" : "*";
        myTableModel.addRow(createFilter(pattern));
      }
      int row = myTableModel.getRowCount() - 1;
      myTable.getSelectionModel().setSelectionInterval(row, row);
      myTable.scrollRectToVisible(myTable.getCellRect(row, 0, true));
      myTable.requestFocus();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:CoverageConfigurable.java


示例4: PackageNameReferenceEditorCombo

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
public PackageNameReferenceEditorCombo(final String text, @NotNull final Project project,
                                       final String recentsKey, final String chooserTitle) {
  super(null, text, project, false, recentsKey);
  addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      final PackageChooserDialog chooser = new PackageChooserDialog(chooserTitle, project);
      chooser.selectPackage(getText());
      chooser.show();
      if (chooser.isOK()) {
        final PsiPackage aPackage = chooser.getSelectedPackage();
        if (aPackage != null) {
          setText(aPackage.getQualifiedName());
        }
      }
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:PackageNameReferenceEditorCombo.java


示例5: actionPerformed

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
public void actionPerformed(final AnActionEvent e) {
  final Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext());

  PackageChooserDialog chooser = new PackageChooserDialog("Choose packages", project);
  chooser.show();

  final List<PsiPackage> packages = chooser.getSelectedPackages();

  for (PsiPackage aPackage : packages) {
    final String qualifiedName = aPackage.getQualifiedName();

    if (qualifiedName.isEmpty()){
      myDataModel.addElement(GroovyDocConfiguration.ALL_PACKAGES);
    }
    myDataModel.addElement(qualifiedName);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:GroovyDocAddPackageAction.java


示例6: addPatternFilter

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
protected void addPatternFilter() {
  PackageChooser chooser = new PackageChooserDialog(CodeInsightBundle.message("coverage.pattern.filter.editor.choose.package.title"), myProject);
  chooser.show();
  if (chooser.isOK()) {
    List<PsiJavaPackage> packages = chooser.getSelectedPackages();
    if (!packages.isEmpty()) {
      for (final PsiJavaPackage aPackage : packages) {
        final String fqName = aPackage.getQualifiedName();
        final String pattern = fqName.length() > 0 ? fqName + ".*" : "*";
        myTableModel.addRow(createFilter(pattern));
      }
      int row = myTableModel.getRowCount() - 1;
      myTable.getSelectionModel().setSelectionInterval(row, row);
      myTable.scrollRectToVisible(myTable.getCellRect(row, 0, true));
      myTable.requestFocus();
    }
  }
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:19,代码来源:CoverageConfigurable.java


示例7: PackageNameReferenceEditorCombo

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
public PackageNameReferenceEditorCombo(final String text, @NotNull final Project project,
                                       final String recentsKey, final String chooserTitle) {
  super(null, text, project, false, recentsKey);
  addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      final PackageChooserDialog chooser = new PackageChooserDialog(chooserTitle, project);
      chooser.selectPackage(getText());
      chooser.show();
      if (chooser.isOK()) {
        final PsiJavaPackage aPackage = chooser.getSelectedPackage();
        if (aPackage != null) {
          setText(aPackage.getQualifiedName());
        }
      }
    }
  });
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:PackageNameReferenceEditorCombo.java


示例8: showDialog

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
@Override
protected String showDialog() {
  Module module = myModuleSelector.getModule();
  if (module == null) {
    Messages.showErrorDialog(myPanel, ExecutionBundle.message("module.not.specified.error.text"));
    return null;
  }
  final PackageChooserDialog dialog = new PackageChooserDialog(ExecutionBundle.message("choose.package.dialog.title"), module);
  dialog.selectPackage(myPackageComponent.getComponent().getText());
  dialog.show();
  final PsiPackage aPackage = dialog.getSelectedPackage();
  return aPackage != null ? aPackage.getQualifiedName() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:TestRunParameters.java


示例9: showDialog

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
@Override
protected String showDialog() {
    PackageChooserDialog chooser = new PackageChooserDialog("Choose Package", getProject());
    chooser.show();
    PsiPackage psiPackage = chooser.getSelectedPackage();
    String packageName = psiPackage == null ? null : psiPackage.getQualifiedName();
    return packageName;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PackageBrowser.java


示例10: GroovyCreateClassDialog

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
public GroovyCreateClassDialog(Project project,
                               String title,
                               String targetClassName,
                               String targetPackageName,
                               Module module) {
  super(project, true);
  myClassName = targetClassName;
  myProject = project;
  myModule = module;
  setModal(true);
  setTitle(title);

  myInformationLabel.setText(title);
  myPackageTextField.setText(targetPackageName != null ? targetPackageName : "");

  init();

  myPackageChooseButton.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent event) {
      PackageChooserDialog chooser = new PackageChooserDialog(GroovyInspectionBundle.message("dialog.create.class.package.chooser.title"), myProject);
      chooser.selectPackage(myPackageTextField.getText());
      chooser.show();
      PsiPackage aPackage = chooser.getSelectedPackage();
      if (aPackage != null) {
        myPackageTextField.setText(aPackage.getQualifiedName());
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:GroovyCreateClassDialog.java


示例11: GroovyCreateClassDialog

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
public GroovyCreateClassDialog(Project project,
                               String title,
                               String targetClassName,
                               String targetPackageName,
                               Module module) {
  super(project, true);
  myClassName = targetClassName;
  myProject = project;
  myModule = module;
  setModal(true);
  setTitle(title);

  myInformationLabel.setText(title);
  myPackageTextField.setText(targetPackageName != null ? targetPackageName : "");

  init();

  myPackageChooseButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent event) {
      PackageChooserDialog chooser = new PackageChooserDialog(GroovyInspectionBundle.message("dialog.create.class.package.chooser.title"), myProject);
      chooser.selectPackage(myPackageTextField.getText());
      chooser.show();
      PsiPackage aPackage = chooser.getSelectedPackage();
      if (aPackage != null) {
        myPackageTextField.setText(aPackage.getQualifiedName());
      }
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:GroovyCreateClassDialog.java


示例12: choosePackage

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
public static String choosePackage(Project project, String initialValue)
{
   PackageChooserDialog dialog = new PackageChooserDialog("Select a Java package", project);
   dialog.selectPackage(initialValue);
   dialog.show();

   PsiPackage psiPackage = dialog.getSelectedPackage();

   return psiPackage != null ? psiPackage.getQualifiedName() : (initialValue.isEmpty() ? null : initialValue);
}
 
开发者ID:forge,项目名称:intellij-idea-plugin,代码行数:11,代码来源:IDEUtil.java


示例13: showDialog

import com.intellij.ide.util.PackageChooserDialog; //导入依赖的package包/类
protected String showDialog() {
  final PackageChooserDialog dialog = new PackageChooserDialog(ExecutionBundle.message("choose.package.dialog.title"), getProject());
  dialog.show();
  final PsiPackage aPackage = dialog.getSelectedPackage();
  return aPackage != null ? aPackage.getQualifiedName() : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:JUnitConfigurable.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PropertyGet类代码示例发布时间:2022-05-23
下一篇:
Java GenericRefreshProtocol类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap