Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/NRefactory.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMansheng Yang <lightyang0@gmail.com>2012-08-09 13:43:37 +0400
committerMansheng Yang <lightyang0@gmail.com>2012-08-09 13:43:37 +0400
commit7a2d9f878c7caf099d0aa8bfe18ad70d3e4bf1c8 (patch)
tree66f46fa9916cc2325fc6290f93d5ed1ba92837fd /ICSharpCode.NRefactory.Demo
parent86e4d9a18ea378f3fc9df0aa4a02248f56f24fc9 (diff)
parentc3a31c9c81c0fb5db71e194d24c27df16336bb91 (diff)
Merge remote-tracking branch 'upstream/master' into mansheng
Diffstat (limited to 'ICSharpCode.NRefactory.Demo')
-rw-r--r--ICSharpCode.NRefactory.Demo/.gitignore3
-rw-r--r--ICSharpCode.NRefactory.Demo/CSDemo.cs16
-rw-r--r--ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj11
3 files changed, 11 insertions, 19 deletions
diff --git a/ICSharpCode.NRefactory.Demo/.gitignore b/ICSharpCode.NRefactory.Demo/.gitignore
deleted file mode 100644
index 9ce745d9..00000000
--- a/ICSharpCode.NRefactory.Demo/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-
-bin/
-obj/ \ No newline at end of file
diff --git a/ICSharpCode.NRefactory.Demo/CSDemo.cs b/ICSharpCode.NRefactory.Demo/CSDemo.cs
index 025815ac..4380dc96 100644
--- a/ICSharpCode.NRefactory.Demo/CSDemo.cs
+++ b/ICSharpCode.NRefactory.Demo/CSDemo.cs
@@ -204,8 +204,8 @@ namespace ICSharpCode.NRefactory.Demo
void ResolveButtonClick(object sender, EventArgs e)
{
IProjectContent project = new CSharpProjectContent();
- var parsedFile = syntaxTree.ToTypeSystem();
- project = project.UpdateProjectContent(null, parsedFile);
+ var unresolvedFile = syntaxTree.ToTypeSystem();
+ project = project.AddOrUpdateFiles(unresolvedFile);
project = project.AddAssemblyReferences(builtInLibs.Value);
ICompilation compilation = project.CreateCompilation();
@@ -213,12 +213,12 @@ namespace ICSharpCode.NRefactory.Demo
ResolveResult result;
if (csharpTreeView.SelectedNode != null) {
var selectedNode = (AstNode)csharpTreeView.SelectedNode.Tag;
- CSharpAstResolver resolver = new CSharpAstResolver(compilation, syntaxTree, parsedFile);
+ CSharpAstResolver resolver = new CSharpAstResolver(compilation, syntaxTree, unresolvedFile);
result = resolver.Resolve(selectedNode);
// CSharpAstResolver.Resolve() never returns null
} else {
TextLocation location = GetTextLocation(csharpCodeTextBox, csharpCodeTextBox.SelectionStart);
- result = ResolveAtLocation.Resolve(compilation, parsedFile, syntaxTree, location);
+ result = ResolveAtLocation.Resolve(compilation, unresolvedFile, syntaxTree, location);
if (result == null) {
MessageBox.Show("Could not find a resolvable node at the caret location.");
return;
@@ -248,12 +248,12 @@ namespace ICSharpCode.NRefactory.Demo
return;
IProjectContent project = new CSharpProjectContent();
- var parsedFile = syntaxTree.ToTypeSystem();
- project = project.UpdateProjectContent(null, parsedFile);
+ var unresolvedFile = syntaxTree.ToTypeSystem();
+ project = project.AddOrUpdateFiles(unresolvedFile);
project = project.AddAssemblyReferences(builtInLibs.Value);
ICompilation compilation = project.CreateCompilation();
- CSharpAstResolver resolver = new CSharpAstResolver(compilation, syntaxTree, parsedFile);
+ CSharpAstResolver resolver = new CSharpAstResolver(compilation, syntaxTree, unresolvedFile);
AstNode node = (AstNode)csharpTreeView.SelectedNode.Tag;
IEntity entity;
@@ -276,7 +276,7 @@ namespace ICSharpCode.NRefactory.Demo
var searchScopes = fr.GetSearchScopes(entity);
Debug.WriteLine("Find references to " + entity.ReflectionName);
- fr.FindReferencesInFile(searchScopes, parsedFile, syntaxTree, compilation, callback, CancellationToken.None);
+ fr.FindReferencesInFile(searchScopes, unresolvedFile, syntaxTree, compilation, callback, CancellationToken.None);
MessageBox.Show("Found " + referenceCount + " references to " + entity.FullName);
}
diff --git a/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj b/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj
index b54e3d6f..83830391 100644
--- a/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj
+++ b/ICSharpCode.NRefactory.Demo/ICSharpCode.NRefactory.Demo.csproj
@@ -10,12 +10,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
+ <OutputPath>..\bin\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
@@ -23,9 +23,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
+ <DebugType>PdbOnly</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
@@ -46,7 +44,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Debug' ">
- <OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
@@ -61,9 +58,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'net_4_5_Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
+ <DebugType>PdbOnly</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>