Search in sources :

Example 6 with RepositoryTreeNode

use of org.jetbrains.idea.svn.dialogs.RepositoryTreeNode in project intellij-community by JetBrains.

the class CopyOptionsDialog method update.

private void update() {
    RepositoryTreeNode baseNode = myBrowser.getSelectedNode();
    if (baseNode == null) {
        myTargetURL.setText("");
        getOKAction().setEnabled(false);
        return;
    }
    SVNURL baseURL = baseNode.getURL();
    String name = myNameField.getText();
    if (name == null || "".equals(name)) {
        getOKAction().setEnabled(false);
        return;
    }
    try {
        baseURL = baseURL.appendPath(myNameField.getText(), false);
    } catch (SVNException e) {
        //
        getOKAction().setEnabled(false);
        return;
    }
    myTargetURL.setText(baseURL.toString());
    getOKAction().setEnabled(!myURL.toString().equals(myTargetURL.getText()));
}
Also used : RepositoryTreeNode(org.jetbrains.idea.svn.dialogs.RepositoryTreeNode) SVNURL(org.tmatesoft.svn.core.SVNURL) SVNException(org.tmatesoft.svn.core.SVNException)

Aggregations

RepositoryTreeNode (org.jetbrains.idea.svn.dialogs.RepositoryTreeNode)6 TreeNode (javax.swing.tree.TreeNode)3 Enumeration (java.util.Enumeration)1 SVNException (org.tmatesoft.svn.core.SVNException)1 SVNURL (org.tmatesoft.svn.core.SVNURL)1