String (JTextField component) { final String text = component.getText(); final VirtualFile baseDir = project.getBaseDir(); return text.length() > 0 ? text : (baseDir != null ? baseDir.getPresentableUrl() : ""); }