- session.asyncRequest(new WriteRequest() {
-
- @Override
- public void perform(WriteGraph graph) throws DatabaseException {
- if (DEBUG) System.out.println("Commit " + commitMessage);
- if (commitMessage != null) {
- Layer0Utils.addCommentMetadata(graph, commitMessage);
- graph.markUndoPoint();
- commitMessage = null;
+ IProgressService service = PlatformUI.getWorkbench().getProgressService();
+ try {
+ service.busyCursorWhile(monitor -> {
+ try {
+ session.syncRequest(new WriteRequest() {
+ @Override
+ public void perform(WriteGraph graph) throws DatabaseException {
+ if (DEBUG) System.out.println("Commit " + commitMessage);
+ if (commitMessage != null) {
+ Layer0Utils.addCommentMetadata(graph, commitMessage);
+ graph.markUndoPoint();
+ commitMessage = null;
+ }
+ commit(graph);
+ }
+ });
+ } catch (DatabaseException e) {
+ ExceptionUtils.logAndShowError("Cannot commit editor changes", e);