1 11 package org.eclipse.core.internal.registry; 12 13 import org.eclipse.core.runtime.*; 14 15 public class ExtensionDelta implements IExtensionDelta { 16 private int kind; 17 private int extension; 18 private int extensionPoint; 19 private RegistryDelta containingDelta; 20 21 void setContainingDelta(RegistryDelta containingDelta) { 22 this.containingDelta = containingDelta; 23 } 24 25 int getExtensionId() { 26 return extension; 27 } 28 29 int getExtensionPointId() { 30 return extensionPoint; 31 } 32 33 public IExtensionPoint getExtensionPoint() { 34 return new ExtensionPointHandle(containingDelta.getObjectManager(), extensionPoint); 35 } 36 37 public void setExtensionPoint(int extensionPoint) { 38 this.extensionPoint = extensionPoint; 39 } 40 41 public int getKind() { 42 return kind; 43 } 44 45 public IExtension getExtension() { 46 return new ExtensionHandle(containingDelta.getObjectManager(), extension); 47 } 48 49 public void setExtension(int extension) { 50 this.extension = extension; 51 } 52 53 public void setKind(int kind) { 54 this.kind = kind; 55 } 56 57 public String toString() { 58 return "\n\t\t" + getExtensionPoint().getUniqueIdentifier() + " - " + getExtension().getNamespaceIdentifier() + '.' + getExtension().getSimpleIdentifier() + " (" + getKindString(this.getKind()) + ")"; } 60 61 public static String getKindString(int kind) { 62 switch (kind) { 63 case ADDED : 64 return "ADDED"; case REMOVED : 66 return "REMOVED"; } 68 return "UNKNOWN"; } 70 } 71 | Popular Tags |