Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2021-11-07 16:09:25 +0000
committerEike Stepper2021-11-07 16:09:25 +0000
commit4b59aab7dc765abff931aad9be0d9e9af977149b (patch)
treeaaca046f0347072d0a2f225c8c1fe2607d824f78 /plugins/org.eclipse.emf.cdo.ui/src/org
parentc8c9b4e7c59e5adb1eb881340e81588ce19a1fb9 (diff)
downloadcdo-4b59aab7dc765abff931aad9be0d9e9af977149b.tar.gz
cdo-4b59aab7dc765abff931aad9be0d9e9af977149b.tar.xz
cdo-4b59aab7dc765abff931aad9be0d9e9af977149b.zip
[577114] Give clients a facility to let the repository authorize arbitrary operations
https://bugs.eclipse.org/bugs/show_bug.cgi?id=577114
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui/src/org')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/DeleteBranchHandler.java15
2 files changed, 13 insertions, 8 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java
index 65ddb959b0..f9d2646100 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java
@@ -78,6 +78,12 @@ public class CreateBranchHandler extends AbstractBaseHandler<CDOBranchCreationCo
}
}
+ @Override
+ protected String getErrorMessage(Exception ex)
+ {
+ return "Branch " + name + " could not be created.";
+ }
+
public static String getValidChildName(CDOBranch branch)
{
Set<String> names = new HashSet<>();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/DeleteBranchHandler.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/DeleteBranchHandler.java
index 7e74167dda..17d89d89f0 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/DeleteBranchHandler.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/DeleteBranchHandler.java
@@ -46,13 +46,12 @@ public class DeleteBranchHandler extends AbstractBaseHandler<CDOBranch>
@Override
protected void doExecute(IProgressMonitor monitor) throws Exception
{
- try
- {
- branch.delete(new EclipseMonitor(monitor));
- }
- finally
- {
- branch = null;
- }
+ branch.delete(new EclipseMonitor(monitor));
+ }
+
+ @Override
+ protected String getErrorMessage(Exception ex)
+ {
+ return "Branch " + branch.getName() + " could not be deleted.";
}
}

Back to the top