public @Nullable String getResourceLocation() {
    if (mySchemasTree.hasFocus()) {
      TreePath path = mySchemasTree.getSelectionPath();
      if (path == null) return null;
      Object object = ((DefaultMutableTreeNode)path.getLastPathComponent()).getUserObject();
      if (!(object instanceof PsiFile)) return null;
      return FileUtil.toSystemIndependentName(((PsiFile)object).getVirtualFile().getPath());
    }
    else {
      return myFileTextField.getText();
    }
  }
public @Nullable String getResourceLocation()