public void SwapWith(IBuildItem iTarget)
        {
            BuildItemProxy target     = (BuildItemProxy)iTarget;
            int            this_index = index;
            BuildItemGroup this_group = buildItemGroup;

            MoveTo(target.buildItemGroup, target.index);
            target.MoveTo(this_group, this_index);
        }
Ejemplo n.º 2
0
 public ShadowFileNode(ItemList items, ItemNode parent, uint itemId, string path)
     : base(items, parent, itemId, Constants.ItemNodeType.PhysicalFile, path)
 {
     //buildItem.Include for linked files OnAddFile is different from the one after save,
     //so it is better to keep canonical names too and associate 'Include' value with unique canonical name
     buildItem = Items.Project.ProjectProxy.GetBuildItem(this);
     //Admit 'Include' values for files with the same name in different folders are different-there will be no override
     Items.Project.ProjectProxy.IncludeToCanonical[buildItem.Include] = path;
 }
        void IBuildItem.SwapWith(IBuildItem iTarget)
        {
            var anchor = instance.ContainingProject.CreateItemElement("Anchor", Guid.NewGuid().ToString());
            instance.Parent.InsertAfterChild(anchor, instance);
            instance.Parent.RemoveChild(instance);

            var target = (BuildItemProxy)iTarget;
            target.instance.Parent.InsertAfterChild(instance, target.instance);
            target.instance.Parent.RemoveChild(target.instance);
            anchor.Parent.InsertAfterChild(target.instance, anchor);
            anchor.Parent.RemoveChild(anchor);
        }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="item"></param>
        public virtual void ItemModified(IBuildItem item)
        {
            BuildExceptions.NotNull(item, "item");

            if (_isInitialized != null && !_isInitialized.Value)
            {
                return;
            }

            _isModified = true;

            this.OnModifiedChanged();
        }
Ejemplo n.º 5
0
            public void SwapWith(IBuildItem target)
            {
                var t = (XmlItem)target;
                var targetLocation = t.node.PreviousSibling;
                var targetParent   = t.node.ParentNode;
                var mylocation     = node.PreviousSibling;
                var myParent       = node.ParentNode;

// ReSharper disable PossibleNullReferenceException
                myParent.InsertAfter(t.node, mylocation);
                targetParent.InsertAfter(node, targetLocation);
// ReSharper restore PossibleNullReferenceException
                parent.needsFixing = true;
            }
        void IBuildItem.SwapWith(IBuildItem iTarget)
        {
            var anchor = instance.ContainingProject.CreateItemElement("Anchor", Guid.NewGuid().ToString());

            instance.Parent.InsertAfterChild(anchor, instance);
            instance.Parent.RemoveChild(instance);

            var target = (BuildItemProxy)iTarget;

            target.instance.Parent.InsertAfterChild(instance, target.instance);
            target.instance.Parent.RemoveChild(target.instance);
            anchor.Parent.InsertAfterChild(target.instance, anchor);
            anchor.Parent.RemoveChild(anchor);
        }
Ejemplo n.º 7
0
 public void SwapWith(IBuildItem target)
 {
     var t = (XmlItem) target;
     var targetLocation = t.node.PreviousSibling;
     var targetParent = t.node.ParentNode;
     var mylocation = node.PreviousSibling;
     var myParent = node.ParentNode;
     // ReSharper disable PossibleNullReferenceException
     myParent.InsertAfter(t.node, mylocation);
     targetParent.InsertAfter(node, targetLocation);
     // ReSharper restore PossibleNullReferenceException
     parent.needsFixing = true;
 }
 public void SwapWith(IBuildItem iTarget)
 {
     BuildItemProxy target = (BuildItemProxy)iTarget;
     int this_index = index;
     BuildItemGroup this_group = buildItemGroup;
     MoveTo(target.buildItemGroup, target.index);
     target.MoveTo(this_group, this_index);
 }
Ejemplo n.º 9
0
 public ShadowFileNode(ItemList items, ItemNode parent, uint itemId, string path)
     : base(items, parent, itemId, Constants.ItemNodeType.PhysicalFile, path)
 {
     buildItem = Items.Project.ProjectProxy.GetBuildItem(this);
 }