1 11 package org.eclipse.ltk.internal.ui.refactoring; 12 13 import org.eclipse.core.runtime.CoreException; 14 15 import org.eclipse.ltk.core.refactoring.Change; 16 import org.eclipse.ltk.ui.refactoring.IChangePreviewViewer; 17 18 22 public abstract class ChangeElement { 23 24 25 public final static int INACTIVE= 0; 26 27 public final static int PARTLY_ACTIVE= 1; 28 29 public final static int ACTIVE= 2; 30 31 protected final static int[][] ACTIVATION_TABLE= new int[][] { 32 33 { INACTIVE, PARTLY_ACTIVE, PARTLY_ACTIVE }, 34 { PARTLY_ACTIVE, PARTLY_ACTIVE, PARTLY_ACTIVE }, 35 { PARTLY_ACTIVE, PARTLY_ACTIVE, ACTIVE} 36 }; 37 38 protected static final ChangeElement[] EMPTY_CHILDREN= new ChangeElement[0]; 39 40 private ChangeElement fParent; 41 42 49 public ChangeElement(ChangeElement parent) { 50 fParent= parent; 51 } 52 53 58 public ChangeElement getParent() { 59 return fParent; 60 } 61 62 70 public abstract ChangePreviewViewerDescriptor getChangePreviewViewerDescriptor() throws CoreException; 71 72 public abstract void feedInput(IChangePreviewViewer viewer) throws CoreException; 73 74 80 public abstract Change getChange(); 81 82 88 public abstract void setEnabled(boolean enabled); 89 90 96 public abstract void setEnabledShallow(boolean enabled); 97 98 107 public abstract int getActive(); 108 109 115 public abstract Object getModifiedElement(); 116 117 122 public abstract ChangeElement[] getChildren(); 123 } | Popular Tags |