Java 类com.intellij.openapi.ui.PackageChooser 实例源码

项目:intellij-ce-playground    文件:CoverageConfigurable.java   
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();
    }
  }
}
项目:consulo-java    文件:CoverageConfigurable.java   
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();
    }
  }
}
项目:tools-idea    文件:UIHelper.java   
PackageChooser createPackageChooser(String title, Project project);