- try {
- IWorkbenchPart activePart = DistPlugin.getDefault().getWorkbench()
- .getActiveWorkbenchWindow().getActivePage().getActivePart();
-
- if (activePart instanceof IEditorPart) {
- ISelection selector = ((IEditorPart) activePart)
- .getEditorSite().getSelectionProvider().getSelection();
- if (selector != null
- && selector instanceof IStructuredSelection) {
- Iterator<?> it = ((IStructuredSelection) selector)
- .iterator();
-
- Node node = (Node) it.next();
- if (node.isNodeType(SlcTypes.SLC_CATEGORY)) {
- String msg = "Your are about to unlist this category from the relevant category list for current workspace"
- + ".\n" + "Are you sure you want to proceed?";
- if (MessageDialog.openConfirm(DistPlugin.getDefault()
- .getWorkbench().getDisplay().getActiveShell(),
- "Confirm", msg)) {
- node.removeMixin(SlcTypes.SLC_CATEGORY);
- node.getSession().save();
- }
- } else {
- String msg = "Your are about to mark this group as category base in the current workspace"
- + ".\n" + "Are you sure you want to proceed?";
-
- if (MessageDialog.openConfirm(DistPlugin.getDefault()
- .getWorkbench().getDisplay().getActiveShell(),
- "Confirm", msg)) {
- node.addMixin(SlcTypes.SLC_CATEGORY);
- node.getSession().save();
- }
- }
- }
- }
- } catch (RepositoryException re) {
- throw new ArgeoException(
- "Unexpected error while deleting artifacts.", re);
- }
+ // try {
+ // IWorkbenchPart activePart = DistPlugin.getDefault().getWorkbench()
+ // .getActiveWorkbenchWindow().getActivePage().getActivePart();
+ //
+ // if (activePart instanceof IEditorPart) {
+ // ISelection selector = ((IEditorPart) activePart)
+ // .getEditorSite().getSelectionProvider().getSelection();
+ // if (selector != null
+ // && selector instanceof IStructuredSelection) {
+ // Iterator<?> it = ((IStructuredSelection) selector)
+ // .iterator();
+ //
+ // Node node = (Node) it.next();
+ // if (node.isNodeType(SlcTypes.SLC_CATEGORY)) {
+ // String msg =
+ // "Your are about to unlist this category from the relevant category list for current workspace"
+ // + ".\n" + "Are you sure you want to proceed?";
+ // if (MessageDialog.openConfirm(DistPlugin.getDefault()
+ // .getWorkbench().getDisplay().getActiveShell(),
+ // "Confirm", msg)) {
+ // node.removeMixin(SlcTypes.SLC_CATEGORY);
+ // node.getSession().save();
+ // }
+ // } else {
+ // String msg =
+ // "Your are about to mark this group as category base in the current workspace"
+ // + ".\n" + "Are you sure you want to proceed?";
+ //
+ // if (MessageDialog.openConfirm(DistPlugin.getDefault()
+ // .getWorkbench().getDisplay().getActiveShell(),
+ // "Confirm", msg)) {
+ // node.addMixin(SlcTypes.SLC_CATEGORY);
+ // node.getSession().save();
+ // }
+ // }
+ // }
+ // }
+ // } catch (RepositoryException re) {
+ // throw new ArgeoException(
+ // "Unexpected error while deleting artifacts.", re);
+ // }