private boolean shouldBeEnabled () { // check if current debugger supports this action if (!debugger.canFixClasses()) return false; // check if current project supports this action Project p = getCurrentProject(); if (p == null) return false; ActionProvider actionProvider = (ActionProvider) p.getLookup (). lookup (ActionProvider.class); if (actionProvider == null) return false; String[] sa = actionProvider.getSupportedActions (); int i, k = sa.length; for (i = 0; i < k; i++) if (JavaProjectConstants.COMMAND_DEBUG_FIX.equals (sa [i])) break; if (i == k) return false; // check if this action should be enabled return ((ActionProvider) p.getLookup ().lookup ( ActionProvider.class )).isActionEnabled ( JavaProjectConstants.COMMAND_DEBUG_FIX, getLookup () ); }
throw new MojoFailureException("Current debugger is not JPDA one."); if (!debugger.canFixClasses ()) { throw new MojoFailureException("The debugger does not support Fix action.");
if (debugger == null) { error = NbBundle.getMessage(SourcePathProviderImpl.class, "MSG_NoJPDADebugger"); } else if (!debugger.canFixClasses()) { error = NbBundle.getMessage(SourcePathProviderImpl.class, "MSG_CanNotFix"); } else if (debugger.getState() == JPDADebugger.STATE_DISCONNECTED) {
private boolean shouldBeEnabled () { if (!debugger.canFixClasses()) { return false;
private boolean shouldBeEnabled () { if (!debugger.canFixClasses()) { return false;