Search in sources :

Example 1 with SvnWizardConfigureTagsPage

use of org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizardConfigureTagsPage in project subclipse by subclipse.

the class ConfigureTagsAction method execute.

protected void execute(IAction action) throws InvocationTargetException, InterruptedException {
    IResource[] resources = getSelectedResources();
    ISVNLocalResource[] svnResources = new ISVNLocalResource[resources.length];
    ISVNProperty lastProperty = null;
    for (int i = 0; i < resources.length; i++) {
        svnResources[i] = SVNWorkspaceRoot.getSVNResourceFor(resources[i]);
        try {
            // $NON-NLS-1$
            ISVNProperty property = svnResources[i].getSvnProperty("subclipse:tags");
            if (i > 0 && !propertiesEqual(property, lastProperty)) {
                MessageDialog.openError(getShell(), Messages.ConfigureTagsAction_1, Messages.ConfigureTagsAction_2);
                return;
            }
            lastProperty = property;
        } catch (SVNException e) {
        }
    }
    SvnWizardConfigureTagsPage configureTagsPage = new SvnWizardConfigureTagsPage(svnResources);
    SvnWizard wizard = new SvnWizard(configureTagsPage);
    SvnWizardDialog dialog = new SvnWizardDialog(getShell(), wizard);
    wizard.setParentDialog(dialog);
    dialog.open();
}
Also used : SvnWizardDialog(org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizardDialog) SvnWizard(org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizard) ISVNProperty(org.tigris.subversion.svnclientadapter.ISVNProperty) SVNException(org.tigris.subversion.subclipse.core.SVNException) SvnWizardConfigureTagsPage(org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizardConfigureTagsPage) ISVNLocalResource(org.tigris.subversion.subclipse.core.ISVNLocalResource) IResource(org.eclipse.core.resources.IResource)

Aggregations

IResource (org.eclipse.core.resources.IResource)1 ISVNLocalResource (org.tigris.subversion.subclipse.core.ISVNLocalResource)1 SVNException (org.tigris.subversion.subclipse.core.SVNException)1 SvnWizard (org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizard)1 SvnWizardConfigureTagsPage (org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizardConfigureTagsPage)1 SvnWizardDialog (org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizardDialog)1 ISVNProperty (org.tigris.subversion.svnclientadapter.ISVNProperty)1