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(); } } }
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(); } } }
PackageChooser createPackageChooser(String title, Project project);