Ejemplo n.º 1
0
		protected override void RunImpl(ITextEditor editor, int offset, ResolveResult symbol)
		{
			if (symbol == null)
				return;
			
			FilePosition pos = symbol.GetDefinitionPosition();
			if (pos.IsEmpty) {
				IEntity entity;
				if (symbol is MemberResolveResult) {
					entity = ((MemberResolveResult)symbol).ResolvedMember;
				} else if (symbol is TypeResolveResult) {
					entity = ((TypeResolveResult)symbol).ResolvedClass;
				} else {
					entity = null;
				}
				if (entity != null) {
					NavigationService.NavigateTo(entity);
				}
			} else {
				try {
					if (pos.Position.IsEmpty)
						FileService.OpenFile(pos.FileName);
					else
						FileService.JumpToFilePosition(pos.FileName, pos.Line, pos.Column);
				} catch (Exception ex) {
					MessageService.ShowException(ex, "Error jumping to '" + pos.FileName + "'.");
				}
			}
		}
Ejemplo n.º 2
0
		protected override void RunImpl(ITextEditor editor, int offset, ResolveResult symbol)
		{
			if (symbol == null)
				return;
			FilePosition pos = symbol.GetDefinitionPosition();
			if (pos.IsEmpty)
				return;
			try {
				if (pos.Position.IsEmpty)
					FileService.OpenFile(pos.FileName);
				else
					FileService.JumpToFilePosition(pos.FileName, pos.Line, pos.Column);
			} catch (Exception ex) {
				MessageService.ShowException(ex, "Error jumping to '" + pos.FileName + "'.");
			}
		}
Ejemplo n.º 3
0
 public override FilePosition GetDefinitionPosition()
 {
     return(primaryResult.GetDefinitionPosition());
 }
Ejemplo n.º 4
0
 public override FilePosition GetDefinitionPosition()
 {
     return(targetRR.GetDefinitionPosition());
 }