Search in sources :

Example 1 with SvnPropertiesView

use of org.tigris.subversion.subclipse.ui.svnproperties.SvnPropertiesView in project subclipse by subclipse.

the class ShowPropertiesSynchronizeOperation method run.

protected void run(SVNTeamProvider provider, SyncInfoSet set, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
    run(new IRunnableWithProgress() {

        public void run(IProgressMonitor monitor) {
            getShell().getDisplay().syncExec(new Runnable() {

                public void run() {
                    try {
                        SvnPropertiesView view = (SvnPropertiesView) showView(SvnPropertiesView.VIEW_ID);
                        if (view != null) {
                            ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
                            view.showSvnProperties(svnResource);
                        }
                    } catch (SVNException e) {
                        SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
                    }
                }
            });
        }
    }, false, /* cancelable */
    PROGRESS_BUSYCURSOR);
}
Also used : IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) SvnPropertiesView(org.tigris.subversion.subclipse.ui.svnproperties.SvnPropertiesView) SVNException(org.tigris.subversion.subclipse.core.SVNException) ISVNLocalResource(org.tigris.subversion.subclipse.core.ISVNLocalResource) IRunnableWithProgress(org.eclipse.jface.operation.IRunnableWithProgress)

Example 2 with SvnPropertiesView

use of org.tigris.subversion.subclipse.ui.svnproperties.SvnPropertiesView in project subclipse by subclipse.

the class ShowSvnPropertiesAction method execute.

protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
    if (action != null && !action.isEnabled()) {
        action.setEnabled(true);
    } else {
        if (getSelectedResources() != null && getSelectedResources().length > 0) {
            IResource resource = (IResource) getSelectedResources()[0];
            final ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
            try {
                SvnPropertiesView view = (SvnPropertiesView) showView(SvnPropertiesView.VIEW_ID);
                if (view != null)
                    view.showSvnProperties(svnResource);
            } catch (SVNException e) {
                throw new InvocationTargetException(e);
            }
        }
    }
}
Also used : SvnPropertiesView(org.tigris.subversion.subclipse.ui.svnproperties.SvnPropertiesView) SVNException(org.tigris.subversion.subclipse.core.SVNException) ISVNLocalResource(org.tigris.subversion.subclipse.core.ISVNLocalResource) IResource(org.eclipse.core.resources.IResource) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

ISVNLocalResource (org.tigris.subversion.subclipse.core.ISVNLocalResource)2 SVNException (org.tigris.subversion.subclipse.core.SVNException)2 SvnPropertiesView (org.tigris.subversion.subclipse.ui.svnproperties.SvnPropertiesView)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 IResource (org.eclipse.core.resources.IResource)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)1