use of net.sourceforge.pmd.eclipse.ui.views.actions.ReviewAction in project pmd-eclipse-plugin by pmd.
the class ViolationOutline method buildMenu.
private void buildMenu(IMenuManager manager, TableViewer viewer) {
// show the Rule Dialog
Action showRuleAction = new ShowRuleAction(viewer, getSite().getShell());
manager.add(showRuleAction);
// add Review Comment
ReviewAction reviewAction = new ReviewAction(viewer);
manager.add(reviewAction);
// Remove Violation
RemoveViolationAction removeAction = new RemoveViolationAction(viewer);
manager.add(removeAction);
// Disable rule
DisableRuleAction disableAction = new DisableRuleAction(viewer);
disableAction.setEnabled(disableAction.hasActiveRules());
manager.add(disableAction);
// Quick Fix (where possible)
QuickFixAction quickFixAction = new QuickFixAction(viewer);
quickFixAction.setEnabled(quickFixAction.hasQuickFix());
manager.add(quickFixAction);
// additions Action: Clear reviews
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS + "-end"));
}
Aggregations