当前位置: 首页>>代码示例>>Java>>正文


Java SVNRevision.equals方法代码示例

本文整理汇总了Java中org.tigris.subversion.svnclientadapter.SVNRevision.equals方法的典型用法代码示例。如果您正苦于以下问题:Java SVNRevision.equals方法的具体用法?Java SVNRevision.equals怎么用?Java SVNRevision.equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.tigris.subversion.svnclientadapter.SVNRevision的用法示例。


在下文中一共展示了SVNRevision.equals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getResortedRevisionInterval

import org.tigris.subversion.svnclientadapter.SVNRevision; //导入方法依赖的package包/类
private RevisionInterval getResortedRevisionInterval(SVNRevision revision1, SVNRevision revision2) {
    RevisionInterval ret; 
    if(revision1.equals(SVNRevision.HEAD) && revision1.equals(SVNRevision.HEAD)) {
        ret = new RevisionInterval (revision1, revision2);
    } else if (revision1.equals(SVNRevision.HEAD)) {
        ret = new RevisionInterval (revision2, revision1);
    } else if (revision2.equals(SVNRevision.HEAD)) {
        ret = new RevisionInterval (revision1, revision2);                
    } else {
        Long r1 = Long.parseLong(revision1.toString());
        Long r2 = Long.parseLong(revision2.toString());
        if(r1.compareTo(r2) < 0) {
            ret = new RevisionInterval (revision1, revision2);
        } else {
            ret = new RevisionInterval (revision2, revision1);
        }
    }
    return ret;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:RevertModifications.java

示例2: recountStartRevision

import org.tigris.subversion.svnclientadapter.SVNRevision; //导入方法依赖的package包/类
private static RevertModifications.RevisionInterval recountStartRevision(SvnClient client, SVNUrl repository, RevertModifications.RevisionInterval ret) throws SVNClientException {
    SVNRevision currStartRevision = ret.startRevision;
    SVNRevision currEndRevision = ret.endRevision;

    if(currStartRevision.equals(SVNRevision.HEAD)) {
        ISVNInfo info = client.getInfo(repository);
        currStartRevision = info.getRevision();
    }

    long currStartRevNum = Long.parseLong(currStartRevision.toString());
    long newStartRevNum = (currStartRevNum > 0) ? currStartRevNum - 1
                                                : currStartRevNum;

    return new RevertModifications.RevisionInterval(
                                     new SVNRevision.Number(newStartRevNum),
                                     currEndRevision);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:RevertModificationsAction.java

示例3: selectItem

import org.tigris.subversion.svnclientadapter.SVNRevision; //导入方法依赖的package包/类
private void selectItem (JComboBox cmbDiffTree, SVNRevision revision) {
    Object toSelect = null;
    if (fileUrl != null) {
        DefaultComboBoxModel model = (DefaultComboBoxModel) cmbDiffTree.getModel();
        for (int i = 0; i < model.getSize(); ++i) {
            Object o = model.getElementAt(i);
            if (o instanceof RepositoryFile) {
                RepositoryFile inModel = (RepositoryFile) o;
                if (inModel.getFileUrl().equals(fileUrl) && revision.equals(inModel.getRevision())) {
                    toSelect = o;
                    break;
                }
            }
        }
    }
    if (toSelect != null) {
        cmbDiffTree.setSelectedItem(toSelect);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:MultiDiffPanel.java

示例4: validateRevision

import org.tigris.subversion.svnclientadapter.SVNRevision; //导入方法依赖的package包/类
protected boolean validateRevision(SVNRevision revision) {
    boolean valid = revision == null || revision.equals(SVNRevision.HEAD) || revision.getKind() == SVNRevision.Kind.number;
    RevertModifications.this.okButton.setEnabled(valid);
    return valid;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:RevertModifications.java

示例5: searchRepository

import org.tigris.subversion.svnclientadapter.SVNRevision; //导入方法依赖的package包/类
private void searchRepository() {
    SVNRevision revision = getRevision();     
    
    final SvnSearch svnSearch;
    try {
        RepositoryFile[] repositoryFiles = getRepositoryFiles();
        if(repositoryFiles.length > 0) {
            svnSearch = new SvnSearch(repositoryFiles); 
        } else {
            svnSearch = new SvnSearch(new RepositoryFile[] { repositoryFile }); 
        }                            
    } catch (MalformedURLException ex) {
        Subversion.LOG.log(Level.SEVERE, null, ex);
        return;
    }
                           
    final DialogDescriptor dialogDescriptor = 
            new DialogDescriptor(svnSearch.getSearchPanel(), java.util.ResourceBundle.getBundle("org/netbeans/modules/subversion/ui/browser/Bundle").getString("CTL_RepositoryPath_SearchRevisions")); 
    dialogDescriptor.setModal(true);
    dialogDescriptor.setHelpCtx(new HelpCtx(searchHelpID));
    dialogDescriptor.setValid(false);
    
    svnSearch.addListSelectionListener(new ListSelectionListener() {
        @Override
        public void valueChanged(ListSelectionEvent e) {
            //if( ExplorerManager.PROP_SELECTED_NODES.equals(evt.getPropertyName()) ) {
                dialogDescriptor.setValid(svnSearch.getSelectedRevision() != null);
           // }
        }
    });
    
    Dialog dialog = DialogDisplayer.getDefault().createDialog(dialogDescriptor);        
    dialog.setVisible(true);

    // handle results
    if (DialogDescriptor.OK_OPTION.equals(dialogDescriptor.getValue())) {       
        revision = svnSearch.getSelectedRevision();
        if(revision != null) {
            if(revision.equals(SVNRevision.HEAD) ) {
                setRevisionTextField(""); // NOI18N
            } else {
                setRevisionTextField(revision.toString());                       
            }
        }
    } else {
        svnSearch.cancel(); 
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:49,代码来源:RepositoryPaths.java


注:本文中的org.tigris.subversion.svnclientadapter.SVNRevision.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。