1 11 package org.eclipse.core.commands; 12 13 import org.eclipse.core.commands.common.AbstractBitSetEvent; 14 15 25 public final class HandlerEvent extends AbstractBitSetEvent { 26 27 31 private static final int CHANGED_ENABLED = 1; 32 33 37 private static final int CHANGED_HANDLED = 1 << 1; 38 39 42 private final IHandler handler; 43 44 55 public HandlerEvent(final IHandler handler, final boolean enabledChanged, 56 final boolean handledChanged) { 57 if (handler == null) { 58 throw new NullPointerException (); 59 } 60 this.handler = handler; 61 62 if (enabledChanged) { 63 changedValues |= CHANGED_ENABLED; 64 } 65 if (handledChanged) { 66 changedValues |= CHANGED_HANDLED; 67 } 68 } 69 70 76 public IHandler getHandler() { 77 return handler; 78 } 79 80 85 public boolean isEnabledChanged() { 86 return ((changedValues & CHANGED_ENABLED) != 0); 87 } 88 89 94 public boolean isHandledChanged() { 95 return ((changedValues & CHANGED_HANDLED) != 0); 96 } 97 } 98 | Popular Tags |