Search in sources :

Example 1 with RemoveViolationAction

use of net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction in project pmd-eclipse-plugin by pmd.

the class ViolationOutlinePage method createActionBars.

/**
 * Creates the ActionBars
 */
private void createActionBars() {
    IToolBarManager manager = getSite().getActionBars().getToolBarManager();
    Action removeViolationAction = new RemoveViolationAction(tableViewer);
    manager.add(removeViolationAction);
    manager.add(new Separator());
}
Also used : Action(org.eclipse.jface.action.Action) RemoveViolationAction(net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction) IToolBarManager(org.eclipse.jface.action.IToolBarManager) RemoveViolationAction(net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction) Separator(org.eclipse.jface.action.Separator)

Example 2 with RemoveViolationAction

use of net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction in project pmd-eclipse-plugin by pmd.

the class ViolationOutlinePageBR method createActionBars.

/**
 * Creates the ActionBars
 */
private void createActionBars() {
    IToolBarManager manager = getSite().getActionBars().getToolBarManager();
    Action removeViolationAction = new RemoveViolationAction(tableViewer);
    manager.add(removeViolationAction);
    manager.add(new Separator());
}
Also used : Action(org.eclipse.jface.action.Action) RemoveViolationAction(net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction) IToolBarManager(org.eclipse.jface.action.IToolBarManager) RemoveViolationAction(net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction) Separator(org.eclipse.jface.action.Separator)

Example 3 with RemoveViolationAction

use of net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction 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"));
}
Also used : ShowRuleAction(net.sourceforge.pmd.eclipse.ui.views.actions.ShowRuleAction) DisableRuleAction(net.sourceforge.pmd.eclipse.ui.views.actions.DisableRuleAction) ReviewAction(net.sourceforge.pmd.eclipse.ui.views.actions.ReviewAction) PriorityFilterAction(net.sourceforge.pmd.eclipse.ui.views.actions.PriorityFilterAction) Action(org.eclipse.jface.action.Action) RemoveViolationAction(net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction) ShowRuleAction(net.sourceforge.pmd.eclipse.ui.views.actions.ShowRuleAction) QuickFixAction(net.sourceforge.pmd.eclipse.ui.views.actions.QuickFixAction) ReviewAction(net.sourceforge.pmd.eclipse.ui.views.actions.ReviewAction) RemoveViolationAction(net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction) DisableRuleAction(net.sourceforge.pmd.eclipse.ui.views.actions.DisableRuleAction) QuickFixAction(net.sourceforge.pmd.eclipse.ui.views.actions.QuickFixAction) Separator(org.eclipse.jface.action.Separator)

Aggregations

RemoveViolationAction (net.sourceforge.pmd.eclipse.ui.views.actions.RemoveViolationAction)3 Action (org.eclipse.jface.action.Action)3 Separator (org.eclipse.jface.action.Separator)3 IToolBarManager (org.eclipse.jface.action.IToolBarManager)2 DisableRuleAction (net.sourceforge.pmd.eclipse.ui.views.actions.DisableRuleAction)1 PriorityFilterAction (net.sourceforge.pmd.eclipse.ui.views.actions.PriorityFilterAction)1 QuickFixAction (net.sourceforge.pmd.eclipse.ui.views.actions.QuickFixAction)1 ReviewAction (net.sourceforge.pmd.eclipse.ui.views.actions.ReviewAction)1 ShowRuleAction (net.sourceforge.pmd.eclipse.ui.views.actions.ShowRuleAction)1