Package com.iizigo.prop
Class MementoPropCnr
- All Implemented Interfaces:
EventListener,IGProp<GProp<?>[]>,IPropCnr,Cloneable,org.eclipse.ui.IMemento
Memento supporting property container.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizix.prop.PropCnr
EMPTY, EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID, nameTableFields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEFields inherited from interface org.eclipse.ui.IMemento
TAG_IDConstructor Summary
ConstructorsConstructorDescriptionCreates an unnamed memento property container.MementoPropCnr(Atom atom) Creates a new memento with the specified ID.Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.ui.IMementocreateChild(String type) Creates a new child of this memento with the given type.org.eclipse.ui.IMementocreateChild(String type, String id) Creates a new child of this memento with the given type and id.protected ObjectequalsTree(PropCnr pc2, int how) Checks for equality in the whole container structure.String[]Returns an array of all the attribute keys of the memento.getBoolean(String key) Returns the boolean value of the given key.org.eclipse.ui.IMementoReturns the first child with the given type id.org.eclipse.ui.IMemento[]Returns all children of this node.org.eclipse.ui.IMemento[]getChildren(String type) Returns all children with the given type id.Returns the floating point value of the given key.getID()Returns the id for this memento.getInteger(String key) Returns the integer value of the given key.Returns the string value of the given key.Returns the data of the Text node of the memento.getType()Returns the type for this memento.protected booleanMemento's are private.voidputBoolean(String key, boolean value) Sets the value of the given key to the given boolean value.voidSets the value of the given key to the given floating point number.voidputInteger(String key, int value) Sets the value of the given key to the given integer.voidputMemento(org.eclipse.ui.IMemento memento) Copy the attributes and children frommementoto the receiver.voidSets the value of the given key to the given string.voidputTextData(String data) Sets the memento's Text node to contain the given data.voidsetSaveComparison(boolean alwaysTrue) Sets the memento container to always report that it is equal to another memento, thus doesn't cause saving for files.protected booleanshouldCreateProps(Element element) Only the Editor will load children elements.Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, clone, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getPredefinedProps, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getValueClasses, getVSReference, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropDispose, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocus, requestFocusEx, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verify, verifyInternalUseOnly, verifyTree, virtualizeMethods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onRemoteEvent, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.iizix.prop.IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onRemoteEvent, removePropError, removePropListener, renameProp, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from interface com.iizix.prop.IPropCnr
canRequestFocus, canRequestFocus, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized
Constructor Details
MementoPropCnr
public MementoPropCnr()Creates an unnamed memento property container.MementoPropCnr
Creates a new memento with the specified ID.- Parameters:
atom- The atom.
Method Details
isPropPrivateAtCreation
protected boolean isPropPrivateAtCreation()Memento's are private.- Overrides:
isPropPrivateAtCreationin classGProp<GProp<?>[]>- Returns:
- true if the property should be set to private at creation, false for default.
shouldCreateProps
Only the Editor will load children elements.- Overrides:
shouldCreatePropsin classPropCnr- Parameters:
element- The element in question.- Returns:
- true to create properties out of it, false to ignore the element.
setSaveComparison
public void setSaveComparison(boolean alwaysTrue) Sets the memento container to always report that it is equal to another memento, thus doesn't cause saving for files.equalsTree
Checks for equality in the whole container structure.- Overrides:
equalsTreein classPropCnr- Parameters:
pc2- The property value to compare with.how- Flags EQC_* values for equal checking.- Returns:
- Both atom and value are equal on all levels.
createChild
Creates a new child of this memento with the given type.The
getChildandgetChildrenmethods are used to retrieve children of a given type.- Specified by:
createChildin interfaceorg.eclipse.ui.IMemento- Parameters:
type- The type.- Returns:
- A new child memento.
- See Also:
createChild
Creates a new child of this memento with the given type and id. The id is stored in the child memento (using a special reserved key,TAG_ID) and can be retrieved usinggetId.The
getChildandgetChildrenmethods are used to retrieve children of a given type.- Specified by:
createChildin interfaceorg.eclipse.ui.IMemento- Parameters:
type- The type.id- The child id.- Returns:
- A new child memento with the given type and id.
- See Also:
getChild
Returns the first child with the given type id.- Specified by:
getChildin interfaceorg.eclipse.ui.IMemento- Parameters:
type- The type id.- Returns:
- the first child with the given type. May return
null.
getChildren
public org.eclipse.ui.IMemento[] getChildren()Returns all children of this node.- Specified by:
getChildrenin interfaceorg.eclipse.ui.IMemento- Returns:
- An array of children of this node. This will not be
null. If there are no children, an array of length zero will be returned.
getChildren
Returns all children with the given type id.- Specified by:
getChildrenin interfaceorg.eclipse.ui.IMemento- Parameters:
type- The type id.- Returns:
- an array of children with the given type. This will not be
null. If there are no keys, an array of length zero will be returned.
getFloat
Returns the floating point value of the given key.- Specified by:
getFloatin interfaceorg.eclipse.ui.IMemento- Parameters:
key- The key.- Returns:
- the value, or
nullif the key was not found or was found but was not a floating point number.
getType
Returns the type for this memento.- Specified by:
getTypein interfaceorg.eclipse.ui.IMemento- Returns:
- The memento type.
- See Also:
getID
Returns the id for this memento.- Specified by:
getIDin interfaceorg.eclipse.ui.IMemento- Returns:
- The memento id, or
nullif none. - See Also:
getInteger
Returns the integer value of the given key.- Specified by:
getIntegerin interfaceorg.eclipse.ui.IMemento- Parameters:
key- The key.- Returns:
- The value, or
nullif the key was not found or was found but was not an integer.
getString
Returns the string value of the given key.getBoolean
Returns the boolean value of the given key.- Specified by:
getBooleanin interfaceorg.eclipse.ui.IMemento- Parameters:
key- The key.- Returns:
- The value, or
nullif the key was not found.
getTextData
Returns the data of the Text node of the memento. Each memento is allowed only one Text node.- Specified by:
getTextDatain interfaceorg.eclipse.ui.IMemento- Returns:
- The data of the Text node of the memento, or
nullif the memento has no Text node.
getAttributeKeys
Returns an array of all the attribute keys of the memento. This will not benull. If there are no keys, an array of length zero will be returned.- Specified by:
getAttributeKeysin interfaceorg.eclipse.ui.IMemento- Returns:
- An array with all the attribute keys of the memento.
putFloat
Sets the value of the given key to the given floating point number.- Specified by:
putFloatin interfaceorg.eclipse.ui.IMemento- Parameters:
key- The key.value- The value.
putInteger
Sets the value of the given key to the given integer.- Specified by:
putIntegerin interfaceorg.eclipse.ui.IMemento- Parameters:
key- The key.value- The value.
putMemento
public void putMemento(org.eclipse.ui.IMemento memento) Copy the attributes and children frommementoto the receiver.- Specified by:
putMementoin interfaceorg.eclipse.ui.IMemento- Parameters:
memento- The IzMemento to be copied.
putString
Sets the value of the given key to the given string.- Specified by:
putStringin interfaceorg.eclipse.ui.IMemento- Parameters:
key- The key.value- The value.
putBoolean
Sets the value of the given key to the given boolean value.- Specified by:
putBooleanin interfaceorg.eclipse.ui.IMemento- Parameters:
key- The key.value- The value.
putTextData
Sets the memento's Text node to contain the given data. Creates the Text node if none exists. If a Text node does exist, it's current contents are replaced. Each memento is allowed only one text node.- Specified by:
putTextDatain interfaceorg.eclipse.ui.IMemento- Parameters:
data- The data to be placed on the Text node.