Skip to content
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.

Commit

Permalink
MethodCall Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit "Geaz" Gazic committed Sep 25, 2015
1 parent b7b7290 commit c468a2a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 1.0rc2

- GUI bugfixes
- Method call parser bugfix

Version 1.0rc

- Created two seperate executes (gui and console)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public IEnumerable<CSharpFile> AllFiles

public CSharpFile GetFile(string fileName)
{
return AllFiles.First(f => f.FileName == fileName);
return AllFiles.FirstOrDefault(f => f.FileName == fileName);
}

private static bool FileIsSolution(string pathToSolutionFile)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ internal void ParseMethodCalls()
{
HandleOnItemParseStart(sdMethod.Name);
var file = _solution.GetFile(sdType.Region.Filename);
var methodAstNode = file.SyntaxTree.GetNodeContaining(
if(file != null) // TODO Check why file can be null sometimes!
{
var methodAstNode = file.SyntaxTree.GetNodeContaining(
new TextLocation(sdMethod.Region.BeginLine, sdMethod.Region.BeginColumn),
new TextLocation(sdMethod.Region.EndLine, sdMethod.Region.EndColumn));

methodAstNode.AcceptVisitor(new MethodVisitor(_repository, sdMethod, sdType, file));
methodAstNode.AcceptVisitor(new MethodVisitor(_repository, sdMethod, sdType, file));
}
}
}
}
Expand Down

0 comments on commit c468a2a

Please sign in to comment.