Пример #1
0
		CompletionContext ParseElement (CompletionContext parentContext)
		{
			do {
				if (reader.NodeType == XmlNodeType.Element) {
					bool isEmpty = reader.IsEmptyElement;
					ItemData data = parentContext.GetElementData (reader.LocalName);
					if (data != null) {
						CompletionContext childCtx = (CompletionContext) Activator.CreateInstance (data.ChildContextType);
						childCtx.Init (parentContext, reader);
						reader.Read ();
						if (PositionFound ())
							return FillContext (childCtx);
						if (!isEmpty) {
							CompletionContext ctx = ParseElement (childCtx);
							if (ctx != null)
								return ctx;
						}
					}
					else {
						reader.Skip ();
						if (PositionFound ())
							return null;
					}
				}
				else if (PositionFound ()) {
					if (OpeningElement)
						return ModuleExtensionContext (module);
					else
						return null;
				}
			}
			while (reader.Read ());
		}
Пример #2
0
		public CompletionContext ParseElementContent (CompletionContext parentContext)
		{
			PositionCheckpoint ();
			
			do {
				if (!reader.Read ())
					return null;
				if (PositionFound ()) {
					if (OpeningElement)
						return new TopLevelCompletionContext ();
					else
						return null;
				}
			}
			while (reader.NodeType != XmlNodeType.Element);
				
			if (reader.Name == "Addin") {
				bool isEmpty = reader.IsEmptyElement;
				reader.Read ();
				if (PositionFound () && OpeningElement)
					return new InsideHeaderCompletionContext ();
				else if (!isEmpty)
					return ParseModule (adesc.MainModule);
			}
			return null;
		}
Пример #3
0
 public CompletionContext ParseElement(CompletionContext parentContext)
 {
 }
Пример #4
0
		public CompletionContext ParseElement (CompletionContext parentContext)
		{
		}
		public void Init (AddinRegistry registry, AddinDescription adesc, CompletionContext parentContext, XElement elem)
		{
			this.registry = registry;
			this.adesc = adesc;
			this.parentContext = parentContext;
			Initialize (elem);
		}