use of org.tigris.subversion.subclipse.ui.wizards.dialogs.SvnWizardSetPropertyPage in project subclipse by subclipse.
the class SvnPropertiesView method getAddPropertyAction.
private Action getAddPropertyAction() {
if (addPropertyAction == null) {
SVNUIPlugin plugin = SVNUIPlugin.getPlugin();
addPropertyAction = new Action(Policy.bind("SvnPropertiesView.addPropertyLabel"), // $NON-NLS-1$
plugin.getImageDescriptor(ISVNUIConstants.IMG_MENU_PROPSET)) {
public void run() {
SvnWizardSetPropertyPage setPropertyPage = new SvnWizardSetPropertyPage(resource);
SvnWizard wizard = new SvnWizard(setPropertyPage);
SvnWizardDialog dialog = new SvnWizardDialog(getSite().getShell(), wizard);
wizard.setParentDialog(dialog);
if (dialog.open() != SvnWizardDialog.OK)
return;
try {
if (setPropertyPage.getPropertyValue() != null) {
resource.setSvnProperty(setPropertyPage.getPropertyName(), setPropertyPage.getPropertyValue(), setPropertyPage.getRecurse());
} else {
resource.setSvnProperty(setPropertyPage.getPropertyName(), setPropertyPage.getPropertyFile(), setPropertyPage.getRecurse());
}
refresh();
} catch (SVNException e) {
if (!e.operationInterrupted()) {
SVNUIPlugin.openError(getSite().getShell(), // $NON-NLS-1$
Policy.bind("SvnPropertiesView.errorAddTitle"), // $NON-NLS-1$
Policy.bind("SvnPropertiesView.errorAddMessage"), e);
}
}
}
};
addPropertyAction.setToolTipText(// $NON-NLS-1$
Policy.bind("SvnPropertiesView.addPropertyTooltip"));
}
return addPropertyAction;
}
Aggregations