Exemple #1
0
 static ResourceRef TryCreate(CodeReference @ref)
 {
     if (@ref == null)
         return null;
     return ResourceRef.TryCreate(@ref.Reference);
 }
 FileTabReferenceResult CreateLocalRefResult(IFileTabContent sourceContent, CodeReference codeRef)
 {
     Debug.Assert(IsSupportedReference(codeRef));
     if (sourceContent == null)
         return null;
     var content = sourceContent.Clone();
     return new FileTabReferenceResult(content, null, a => {
         if (a.Success && !a.HasMovedCaret) {
             GoToReference(content, codeRef);
             a.HasMovedCaret = true;
         }
     });
 }
		public bool Equals(CodeReference codeRef) {
			return codeRef != null &&
				Reference == codeRef.Reference &&
				IsLocal == codeRef.IsLocal &&
				IsLocalTarget == codeRef.IsLocalTarget;
		}
		void ITextEditorHelper.FollowReference(CodeReference codeRef, bool newTab) {
			Debug.Assert(FileTab != null);
			if (FileTab == null)
				return;
			FileTab.FollowReference(codeRef, newTab);
		}