1 11 12 package org.eclipse.core.commands.common; 13 14 22 public abstract class AbstractNamedHandleEvent extends 23 AbstractHandleObjectEvent { 24 25 29 protected static final int CHANGED_DESCRIPTION = 1 << LAST_BIT_USED_ABSTRACT_HANDLE; 30 31 34 protected static final int CHANGED_NAME = 1 << LAST_BIT_USED_ABSTRACT_HANDLE; 35 36 39 protected static final int LAST_USED_BIT = CHANGED_NAME; 40 41 51 protected AbstractNamedHandleEvent(final boolean definedChanged, 52 final boolean descriptionChanged, final boolean nameChanged) { 53 super(definedChanged); 54 55 if (descriptionChanged) { 56 changedValues |= CHANGED_DESCRIPTION; 57 } 58 if (nameChanged) { 59 changedValues |= CHANGED_NAME; 60 } 61 } 62 63 68 public final boolean isDescriptionChanged() { 69 return ((changedValues & CHANGED_DESCRIPTION) != 0); 70 } 71 72 77 public final boolean isNameChanged() { 78 return ((changedValues & CHANGED_NAME) != 0); 79 } 80 81 } 82 | Popular Tags |