Examples of ISVNResource


Examples of org.tigris.subversion.subclipse.core.ISVNResource

    protected boolean isEnabled() throws TeamException {
        Object[] selectedObjects = selection.toArray();
        if (selectedObjects.length == 0 || selectedObjects.length > 2){
            return false;
        }
        ISVNResource svnResource1 = null;
        ISVNResource svnResource2 = null;
        if (selectedObjects[0] instanceof ISVNResource){
            svnResource1 = (ISVNResource)selectedObjects[0];
        }
        else {
            if (selectedObjects[0] instanceof ILogEntry)
                svnResource1 = ((ILogEntry)selectedObjects[0]).getResource();
        }
        if (svnResource1 == null){
            return false;
        }
        if (selectedObjects.length > 1) {
            if (selectedObjects[1] instanceof ISVNResource){
                svnResource2 = (ISVNResource)selectedObjects[1];
            }
            else {
                if (selectedObjects[1] instanceof ILogEntry)
                    svnResource2 = ((ILogEntry)selectedObjects[1]).getResource();      
            }
            if (!svnResource1.getRepository().getRepositoryRoot().toString().equals(
                    svnResource2.getRepository().getRepositoryRoot().toString())){
                return false;
            }
            return (svnResource1.isFolder() == svnResource2.isFolder());           
        }
        return true;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.