AddMark() public method

public AddMark ( Bookmark mark ) : void
mark Bookmark
return void
Ejemplo n.º 1
0
 void AddClassMemberBookmarks(ICSharpCode.TextEditor.Document.BookmarkManager bm, IClass c)
 {
     if (c.IsSynthetic)
     {
         return;
     }
     if (!c.Region.IsEmpty)
     {
         bm.AddMark(new ICSharpCode.SharpDevelop.Bookmarks.ClassBookmark(textEditorControl.Document, c));
     }
     foreach (IClass innerClass in c.InnerClasses)
     {
         AddClassMemberBookmarks(bm, innerClass);
     }
     foreach (IMethod m in c.Methods)
     {
         if (m.Region.IsEmpty || m.IsSynthetic)
         {
             continue;
         }
         bm.AddMark(new ICSharpCode.SharpDevelop.Bookmarks.MethodBookmark(textEditorControl.Document, m));
     }
     foreach (IProperty m in c.Properties)
     {
         if (m.Region.IsEmpty || m.IsSynthetic)
         {
             continue;
         }
         bm.AddMark(new ICSharpCode.SharpDevelop.Bookmarks.PropertyBookmark(textEditorControl.Document, m));
     }
     foreach (IField f in c.Fields)
     {
         if (f.Region.IsEmpty || f.IsSynthetic)
         {
             continue;
         }
         bm.AddMark(new ICSharpCode.SharpDevelop.Bookmarks.FieldBookmark(textEditorControl.Document, f));
     }
     foreach (IEvent e in c.Events)
     {
         if (e.Region.IsEmpty || e.IsSynthetic)
         {
             continue;
         }
         bm.AddMark(new ICSharpCode.SharpDevelop.Bookmarks.EventBookmark(textEditorControl.Document, e));
     }
 }
		void AddClassMemberBookmarks(BookmarkManager bm, IClass c)
		{
			if (c.IsSynthetic) return;
			if (!c.Region.IsEmpty) {
				bm.AddMark(new Bookmarks.ClassBookmark(textEditorControl.Document, c));
			}
			foreach (IClass innerClass in c.InnerClasses) {
				AddClassMemberBookmarks(bm, innerClass);
			}
			foreach (IMethod m in c.Methods) {
				if (m.Region.IsEmpty || m.IsSynthetic) continue;
				bm.AddMark(new Bookmarks.MethodBookmark(textEditorControl.Document, m));
			}
			foreach (IProperty m in c.Properties) {
				if (m.Region.IsEmpty || m.IsSynthetic) continue;
				bm.AddMark(new Bookmarks.PropertyBookmark(textEditorControl.Document, m));
			}
			foreach (IField f in c.Fields) {
				if (f.Region.IsEmpty || f.IsSynthetic) continue;
				bm.AddMark(new Bookmarks.FieldBookmark(textEditorControl.Document, f));
			}
			foreach (IEvent e in c.Events) {
				if (e.Region.IsEmpty || e.IsSynthetic) continue;
				bm.AddMark(new Bookmarks.EventBookmark(textEditorControl.Document, e));
			}
		}