private static IFsFeatStruc GetFeatureStructureFromOwner(ICmObject obj, int flid)
		{
			IFsFeatStruc fs = obj.GetObjectInAtomicField(flid) as IFsFeatStruc;
			return fs;
		}
        private static IFsFeatStruc GetFeatureStructureFromOwner(ICmObject obj, int flid)
        {
            IFsFeatStruc fs = obj.GetObjectInAtomicField(flid) as IFsFeatStruc;

            return(fs);
        }
Exemplo n.º 3
0
		private NodeTestResult AddAtomicNode(ArrayList path, XmlNode node, ObjSeqHashMap reuseMap, string editor,
			int flid, ICmObject obj, int indent, ref int insertPosition, bool fTestOnly,
			string layoutName, bool fVisIfData, XmlNode caller)
		{
			// Facilitate insertion of an expandable tree node representing an owned or ref'd object.
			if (flid == 0)
				throw new ApplicationException("field attribute required for atomic properties " + node.OuterXml);
			ICmObject innerObj = obj.GetObjectInAtomicField(flid);
			m_monitoredProps.Add(new KeyValuePair<int, int>(obj.Hvo, flid));
			if (fVisIfData && innerObj == null)
				return NodeTestResult.kntrNothing;
			if (fTestOnly)
			{
				if (innerObj != null || XmlUtils.GetOptionalAttributeValue(node, "ghost") != null)
					return NodeTestResult.kntrSomething;
				else
					return NodeTestResult.kntrPossible;
			}
			path.Add(node);
			if(innerObj != null)
			{
				string layoutOverride = XmlUtils.GetOptionalAttributeValue(node, "layout", layoutName);
				path.Add(innerObj.Hvo);
				insertPosition = CreateSlicesFor(CmObject.CreateFromDBObject(m_cache, innerObj.Hvo),
					layoutOverride, indent, insertPosition, path, reuseMap, caller);
				path.RemoveAt(path.Count - 1);
			}
			else
			{
				// No inner object...do we want a ghost slice?
				if (XmlUtils.GetOptionalAttributeValue(node, "ghost") != null)
				{
					MakeGhostSlice(path, node, reuseMap, obj, flid, caller, indent, ref insertPosition);
				}
			}
			path.RemoveAt(path.Count - 1);
			return NodeTestResult.kntrNothing;
		}