Mercurial > projects > dwt-addons
diff dwtx/core/commands/operations/ObjectUndoContext.d @ 104:04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 07 Aug 2008 15:01:33 +0200 |
parents | ea8ff534f622 |
children |
line wrap: on
line diff
--- a/dwtx/core/commands/operations/ObjectUndoContext.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/core/commands/operations/ObjectUndoContext.d Thu Aug 07 15:01:33 2008 +0200 @@ -12,13 +12,11 @@ *******************************************************************************/ module dwtx.core.commands.operations.ObjectUndoContext; -import tango.util.collection.ArraySeq; -import tango.util.collection.model.Seq; - import dwtx.core.commands.operations.UndoContext; import dwtx.core.commands.operations.IUndoContext; import dwt.dwthelper.utils; +import dwtx.dwtxhelper.Collection; /** * <p> @@ -35,7 +33,7 @@ private String label; - private Seq!(IUndoContext) children; + private List children; /** * Construct an operation context that represents the given object. @@ -59,7 +57,7 @@ public this(Object object, String label) { this.object = object; this.label = label; - children = new ArraySeq!(IUndoContext); + children = new ArrayList(); } /* @@ -98,7 +96,7 @@ * the context to be added as a match of this context */ public void addMatch(IUndoContext context) { - children.append(context); + children.add(cast(Object)context); } /** @@ -112,7 +110,7 @@ * context */ public void removeMatch(IUndoContext context) { - children.remove(context); + children.remove(cast(Object)context); } /* @@ -123,7 +121,7 @@ */ public override bool matches(IUndoContext context) { // Check first for explicit matches that have been assigned. - if (children.contains(context)) { + if (children.contains(cast(Object)context)) { return true; } // Contexts for equal objects are considered matching