minor fixes

This commit is contained in:
Eugene Zhuravlev
2015-10-06 16:42:39 +02:00
parent 8084a15636
commit 2f00162511
@@ -78,7 +78,7 @@ public class JavaScratchConfigurable extends SettingsEditor<JavaScratchConfigura
toSelect = LocalFileSystem.getInstance().findFileByPath(scratchesRoot);
}
final VirtualFile file =
FileChooser.chooseFile(FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor(), myScratchPathField, project, toSelect);
FileChooser.chooseFile(FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor(), myScratchPathField.getComponent(), project, toSelect);
if (file != null) {
setVFileToEditor(file);
}
@@ -138,12 +138,7 @@ public class JavaScratchConfigurable extends SettingsEditor<JavaScratchConfigura
}
private void setVFileToEditor(VirtualFile file) {
if (file != null) {
myScratchPathField.getComponent().setText(FileUtil.toSystemDependentName(file.getPath()));
}
else {
myScratchPathField.setText("");
}
myScratchPathField.getComponent().setText(file != null? FileUtil.toSystemDependentName(file.getPath()): "");
}
@NotNull