forked from phoedos/pmd
more suggestions fm jiger
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1252 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -58,7 +58,10 @@ public class PMDJEditPlugin extends EditPlugin {
|
||||
public void instanceCheckDirectory(View view) {
|
||||
if (jEdit.getBooleanProperty(PMDJEditPlugin.OPTION_UI_DIRECTORY_POPUP)) {
|
||||
final String dir = JOptionPane.showInputDialog(jEdit.getFirstView(), "Please type in a directory to scan", NAME, JOptionPane.QUESTION_MESSAGE);
|
||||
if (dir == null || !(new File(dir)).exists() || !(new File(dir)).isDirectory() ) {
|
||||
if (dir == null) {
|
||||
return;
|
||||
}
|
||||
if (!(new File(dir)).exists() || !(new File(dir)).isDirectory() ) {
|
||||
JOptionPane.showMessageDialog(jEdit.getFirstView(), dir + " is not a valid directory name", NAME, JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
@ -81,7 +84,10 @@ public class PMDJEditPlugin extends EditPlugin {
|
||||
public void instanceCheckDirectoryRecursively(View view) {
|
||||
if (jEdit.getBooleanProperty(PMDJEditPlugin.OPTION_UI_DIRECTORY_POPUP)) {
|
||||
final String dir = JOptionPane.showInputDialog(jEdit.getFirstView(), "Please type in a directory to scan recursively", NAME, JOptionPane.QUESTION_MESSAGE);
|
||||
if (dir == null || !(new File(dir)).exists() || !(new File(dir)).isDirectory() ) {
|
||||
if (dir == null) {
|
||||
return;
|
||||
}
|
||||
if (!(new File(dir)).exists() || !(new File(dir)).isDirectory() ) {
|
||||
JOptionPane.showMessageDialog(jEdit.getFirstView(), dir + " is not a valid directory name", NAME, JOptionPane.ERROR_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user