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:
Tom Copeland
2002-11-19 13:44:36 +00:00
parent 603c679450
commit a8af2e9a40

View File

@ -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;
}