1976 changed files with 49259 additions and 98446 deletions
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
root = true |
||||
[*] |
||||
indent_style = tab |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
//using System;
|
||||
//
|
||||
//namespace ICSharpCode.AspNet.Mvc.Completion
|
||||
//{
|
||||
// public class RazorCSharpDotCompletionDataProvider : DotCodeCompletionItemProvider
|
||||
// {
|
||||
// }
|
||||
//}
|
@ -1,58 +0,0 @@
@@ -1,58 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
//using System;
|
||||
//using ICSharpCode.SharpDevelop.Dom;
|
||||
//
|
||||
//namespace ICSharpCode.AspNet.Mvc.Completion
|
||||
//{
|
||||
// public class RazorCSharpExpressionFinder : IExpressionFinder
|
||||
// {
|
||||
// public RazorCSharpExpressionFinder()
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public ExpressionResult FindExpression(string text, int offset)
|
||||
// {
|
||||
// int position = offset - 1;
|
||||
// while (position > 0 && IsValidCharacter(text[position])) {
|
||||
// position--;
|
||||
// }
|
||||
// position++;
|
||||
// string expression = text.Substring(position, offset - position);
|
||||
// return new ExpressionResult(expression);
|
||||
// }
|
||||
//
|
||||
// bool IsValidCharacter(char ch)
|
||||
// {
|
||||
// return Char.IsLetterOrDigit(ch) ||
|
||||
// (ch == '.') ||
|
||||
// (ch == '_');
|
||||
// }
|
||||
//
|
||||
// public ExpressionResult FindFullExpression(string text, int offset)
|
||||
// {
|
||||
// return ExpressionResult.Empty;
|
||||
// }
|
||||
//
|
||||
// public string RemoveLastPart(string expression)
|
||||
// {
|
||||
// return expression;
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -1,68 +0,0 @@
@@ -1,68 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
//using System;
|
||||
//using System.IO;
|
||||
//using ICSharpCode.SharpDevelop;
|
||||
//using ICSharpCode.SharpDevelop.Dom;
|
||||
//using ICSharpCode.SharpDevelop.Dom.CSharp;
|
||||
//using ICSharpCode.SharpDevelop.Project;
|
||||
//
|
||||
//namespace ICSharpCode.AspNet.Mvc.Completion
|
||||
//{
|
||||
// public class RazorCSharpParser : IParser
|
||||
// {
|
||||
// public RazorCSharpParser()
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public string[] LexerTags { get; set; }
|
||||
//
|
||||
// public LanguageProperties Language {
|
||||
// get { return LanguageProperties.CSharp; }
|
||||
// }
|
||||
//
|
||||
// public IExpressionFinder CreateExpressionFinder(string fileName)
|
||||
// {
|
||||
// return new RazorCSharpExpressionFinder();
|
||||
// }
|
||||
//
|
||||
// public bool CanParse(string fileName)
|
||||
// {
|
||||
// return Path.GetExtension(fileName).Equals(".cshtml", StringComparison.OrdinalIgnoreCase);
|
||||
// }
|
||||
//
|
||||
// public bool CanParse(IProject project)
|
||||
// {
|
||||
// return project.Language == "C#";
|
||||
// }
|
||||
//
|
||||
// public ICompilationUnit Parse(IProjectContent projectContent, string fileName, ITextBuffer fileContent)
|
||||
// {
|
||||
// var modelTypeLocater = new RazorCSharpModelTypeLocater(fileContent);
|
||||
// return new RazorCompilationUnit(projectContent) {
|
||||
// ModelTypeName = modelTypeLocater.ModelTypeName
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// public IResolver CreateResolver()
|
||||
// {
|
||||
// return new RazorCSharpResolver();
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -1,119 +0,0 @@
@@ -1,119 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using ICSharpCode.NRefactory.TypeSystem;
|
||||
//
|
||||
//namespace ICSharpCode.AspNet.Mvc.Completion
|
||||
//{
|
||||
// public class RazorCSharpResolver : IResolver
|
||||
// {
|
||||
// NRefactoryResolver resolver = new NRefactoryResolver(LanguageProperties.CSharp);
|
||||
//
|
||||
// public ResolveResult Resolve(ExpressionResult expressionResult, ParseInformation parseInfo, string fileContent)
|
||||
// {
|
||||
// ParseInformation parseInfoWithWebViewPageClass = CreateParseInformationWithWebViewPageClass(parseInfo);
|
||||
// expressionResult.Region = GetRegionInMiddleOfWebViewPageClass();
|
||||
// return resolver.Resolve(expressionResult, parseInfoWithWebViewPageClass, fileContent);
|
||||
// }
|
||||
//
|
||||
// ParseInformation CreateParseInformationWithWebViewPageClass(ParseInformation parseInfo)
|
||||
// {
|
||||
// RazorCompilationUnit compilationUnit = RazorCompilationUnit.CreateFromParseInfo(parseInfo);
|
||||
// AddDefaultUsings(compilationUnit);
|
||||
// AddWebViewPageClass(compilationUnit);
|
||||
// return new ParseInformation(compilationUnit);
|
||||
// }
|
||||
//
|
||||
// void AddDefaultUsings(ICompilationUnit compilationUnit)
|
||||
// {
|
||||
// AddUsing("System.Web.Mvc", compilationUnit);
|
||||
// AddUsing("System.Web.Mvc.Ajax", compilationUnit);
|
||||
// AddUsing("System.Web.Mvc.Html", compilationUnit);
|
||||
// AddUsing("System.Web.Routing", compilationUnit);
|
||||
// }
|
||||
//
|
||||
// void AddUsing(string name, ICompilationUnit compilationUnit)
|
||||
// {
|
||||
// DefaultUsing defaultUsing = CreateUsing(name, compilationUnit.ProjectContent);
|
||||
// compilationUnit.UsingScope.Usings.Add(defaultUsing);
|
||||
// }
|
||||
//
|
||||
// DefaultUsing CreateUsing(string namespaceName, IProjectContent projectContent)
|
||||
// {
|
||||
// var defaultUsing = new DefaultUsing(projectContent);
|
||||
// defaultUsing.Usings.Add(namespaceName);
|
||||
// return defaultUsing;
|
||||
// }
|
||||
//
|
||||
// void AddWebViewPageClass(RazorCompilationUnit compilationUnit)
|
||||
// {
|
||||
// DefaultClass webViewPageClass = CreateWebViewPageClass(compilationUnit);
|
||||
// compilationUnit.Classes.Add(webViewPageClass);
|
||||
// }
|
||||
//
|
||||
// DefaultClass CreateWebViewPageClass(RazorCompilationUnit compilationUnit)
|
||||
// {
|
||||
// var webViewPageClass = new DefaultClass(compilationUnit, "RazorWebViewPage") {
|
||||
// Region = new DomRegion(1, 0, 3, 0)
|
||||
// };
|
||||
// IReturnType modelType = GetModelReturnType(compilationUnit);
|
||||
// AddWebViewPageBaseClass(webViewPageClass, modelType);
|
||||
// return webViewPageClass;
|
||||
// }
|
||||
//
|
||||
// IReturnType GetModelReturnType(RazorCompilationUnit compilationUnit)
|
||||
// {
|
||||
// IClass modelType = GetClassIfTypeNameIsNotEmpty(compilationUnit.ProjectContent, compilationUnit.ModelTypeName);
|
||||
// if (modelType != null) {
|
||||
// return modelType.DefaultReturnType;
|
||||
// }
|
||||
// return new DynamicReturnType(compilationUnit.ProjectContent);
|
||||
// }
|
||||
//
|
||||
// IClass GetClassIfTypeNameIsNotEmpty(IProjectContent projectContent, string modelTypeName)
|
||||
// {
|
||||
// if (!String.IsNullOrEmpty(modelTypeName)) {
|
||||
// return projectContent.GetClass(modelTypeName, 0);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// void AddWebViewPageBaseClass(DefaultClass webViewPageClass, IReturnType modelType)
|
||||
// {
|
||||
// IClass webViewPageBaseClass = webViewPageClass.ProjectContent.GetClass("System.Web.Mvc.WebViewPage", 1);
|
||||
// if (webViewPageBaseClass != null) {
|
||||
// IReturnType returnType = GetWebViewPageBaseClassReturnType(webViewPageBaseClass, modelType);
|
||||
// webViewPageClass.BaseTypes.Add(returnType);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// IReturnType GetWebViewPageBaseClassReturnType(IClass webViewPageBaseClass, IReturnType modelType)
|
||||
// {
|
||||
// var typeArguments = new List<IReturnType>();
|
||||
// typeArguments.Add(modelType);
|
||||
// return new ConstructedReturnType(webViewPageBaseClass.DefaultReturnType, typeArguments);
|
||||
// }
|
||||
//
|
||||
// DomRegion GetRegionInMiddleOfWebViewPageClass()
|
||||
// {
|
||||
// return new DomRegion(2, 0, 2, 0);
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -1,50 +0,0 @@
@@ -1,50 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
//using System;
|
||||
//using ICSharpCode.NRefactory.TypeSystem;
|
||||
//using ICSharpCode.SharpDevelop.Parser;
|
||||
//
|
||||
//namespace ICSharpCode.AspNet.Mvc.Completion
|
||||
//{
|
||||
// public class RazorCompilationUnit : DefaultCompilationUnit
|
||||
// {
|
||||
// public RazorCompilationUnit(IProjectContent projectContent)
|
||||
// : base(projectContent)
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public static RazorCompilationUnit CreateFromParseInfo(ParseInformation parseInformation)
|
||||
// {
|
||||
// return new RazorCompilationUnit(parseInformation.CompilationUnit.ProjectContent) {
|
||||
// ModelTypeName = GetModelTypeName(parseInformation.CompilationUnit)
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// static string GetModelTypeName(ICompilationUnit compilationUnit)
|
||||
// {
|
||||
// var originalRazorCompilationUnit = compilationUnit as RazorCompilationUnit;
|
||||
// if (originalRazorCompilationUnit != null) {
|
||||
// return originalRazorCompilationUnit.ModelTypeName;
|
||||
// }
|
||||
// return String.Empty;
|
||||
// }
|
||||
//
|
||||
// public string ModelTypeName { get; set; }
|
||||
// }
|
||||
//}
|
@ -0,0 +1,253 @@
@@ -0,0 +1,253 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.ComponentModel; |
||||
using System.Linq; |
||||
using System.Reflection; |
||||
using ICSharpCode.AvalonEdit; |
||||
using CSharpBinding.FormattingStrategy; |
||||
using CSharpBinding.Refactoring; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Editor; |
||||
using ICSharpCode.SharpDevelop.Refactoring; |
||||
namespace CSharpBinding |
||||
{ |
||||
public class CSharpTextEditorExtension : ITextEditorExtension |
||||
{ |
||||
ITextEditor editor; |
||||
|
||||
IssueManager inspectionManager; |
||||
|
||||
IList<IContextActionProvider> contextActionProviders; |
||||
|
||||
CodeManipulation codeManipulation; |
||||
|
||||
CaretReferenceHighlightRenderer renderer; |
||||
|
||||
CodeEditorFormattingOptionsAdapter options; |
||||
|
||||
TextEditorOptions originalEditorOptions; |
||||
|
||||
public void Attach(ITextEditor editor) |
||||
{ |
||||
this.editor = editor; |
||||
inspectionManager = new IssueManager(editor); |
||||
codeManipulation = new CodeManipulation(editor); |
||||
renderer = new CaretReferenceHighlightRenderer(editor); |
||||
|
||||
// Patch editor options (indentation) to project-specific settings
|
||||
if (!editor.ContextActionProviders.IsReadOnly) { |
||||
contextActionProviders = AddInTree.BuildItems<IContextActionProvider>("/SharpDevelop/ViewContent/TextEditor/C#/ContextActions", null); |
||||
editor.ContextActionProviders.AddRange(contextActionProviders); |
||||
} |
||||
|
||||
// Create instance of options adapter and register it as service
|
||||
var formattingPolicy = CSharpFormattingPolicies.Instance.GetProjectOptions(SD.ProjectService.FindProjectContainingFile(editor.FileName)); |
||||
var textEditor = editor.GetService<TextEditor>(); |
||||
|
||||
if (textEditor != null) { |
||||
options = new CodeEditorFormattingOptionsAdapter(textEditor.Options, editor.Options, formattingPolicy.OptionsContainer); |
||||
var textViewServices = textEditor.TextArea.TextView.Services; |
||||
|
||||
// Unregister any previous ITextEditorOptions instance from editor, if existing, register our impl.
|
||||
textViewServices.RemoveService(typeof(ITextEditorOptions)); |
||||
textViewServices.AddService(typeof(ITextEditorOptions), options); |
||||
|
||||
// Set TextEditor's options to same object
|
||||
originalEditorOptions = textEditor.Options; |
||||
textEditor.Options = options.TextEditorOptions; |
||||
} |
||||
} |
||||
|
||||
public void Detach() |
||||
{ |
||||
var textEditor = editor.GetService<TextEditor>(); |
||||
if (textEditor != null) { |
||||
var textView = textEditor.TextArea.TextView; |
||||
// Unregister our ITextEditorOptions instance from editor
|
||||
var optionsService = textView.GetService<ITextEditorOptions>(); |
||||
if ((optionsService != null) && (optionsService == options)) |
||||
textView.Services.RemoveService(typeof(ITextEditorOptions)); |
||||
// Reset TextEditor options, too?
|
||||
if ((textEditor.Options != null) && (textEditor.Options == options.TextEditorOptions)) |
||||
textEditor.Options = originalEditorOptions; |
||||
} |
||||
|
||||
codeManipulation.Dispose(); |
||||
|
||||
if (inspectionManager != null) { |
||||
inspectionManager.Dispose(); |
||||
inspectionManager = null; |
||||
} |
||||
|
||||
if (contextActionProviders != null) { |
||||
editor.ContextActionProviders.RemoveAll(contextActionProviders.Contains); |
||||
} |
||||
|
||||
renderer.Dispose(); |
||||
options = null; |
||||
this.editor = null; |
||||
} |
||||
} |
||||
|
||||
class CodeEditorFormattingOptionsAdapter : ITextEditorOptions, INotifyPropertyChanged |
||||
{ |
||||
CSharpFormattingOptionsContainer container; |
||||
readonly TextEditorOptions avalonEditOptions; |
||||
readonly TextEditorOptions originalAvalonEditOptions; |
||||
readonly ITextEditorOptions originalSDOptions; |
||||
|
||||
public CodeEditorFormattingOptionsAdapter(TextEditorOptions originalAvalonEditOptions, ITextEditorOptions originalSDOptions, CSharpFormattingOptionsContainer container) |
||||
{ |
||||
if (originalAvalonEditOptions == null) |
||||
throw new ArgumentNullException("originalAvalonEditOptions"); |
||||
if (originalSDOptions == null) |
||||
throw new ArgumentNullException("originalSDOptions"); |
||||
if (container == null) |
||||
throw new ArgumentNullException("container"); |
||||
|
||||
this.originalAvalonEditOptions = originalAvalonEditOptions; |
||||
this.avalonEditOptions = new TextEditorOptions(originalAvalonEditOptions); |
||||
this.originalSDOptions = originalSDOptions; |
||||
this.container = container; |
||||
|
||||
// Update overridden options once
|
||||
UpdateOverriddenProperties(); |
||||
|
||||
CSharpFormattingPolicies.Instance.FormattingPolicyUpdated += OnFormattingPolicyUpdated; |
||||
this.originalAvalonEditOptions.PropertyChanged += OnOrigAvalonOptionsPropertyChanged; |
||||
this.originalSDOptions.PropertyChanged += OnSDOptionsPropertyChanged; |
||||
} |
||||
|
||||
void OnFormattingPolicyUpdated(object sender, CSharpBinding.FormattingStrategy.CSharpFormattingPolicyUpdateEventArgs e) |
||||
{ |
||||
// Update editor options from changed policy
|
||||
UpdateOverriddenProperties(); |
||||
|
||||
OnPropertyChanged("IndentationSize"); |
||||
OnPropertyChanged("IndentationString"); |
||||
OnPropertyChanged("ConvertTabsToSpaces"); |
||||
} |
||||
|
||||
void UpdateOverriddenProperties() |
||||
{ |
||||
avalonEditOptions.IndentationSize = container.GetEffectiveIndentationSize() ?? originalSDOptions.IndentationSize; |
||||
avalonEditOptions.ConvertTabsToSpaces = container.GetEffectiveConvertTabsToSpaces() ?? originalSDOptions.ConvertTabsToSpaces; |
||||
} |
||||
|
||||
void OnOrigAvalonOptionsPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) |
||||
{ |
||||
if ((e.PropertyName != "IndentationSize") && (e.PropertyName != "IndentationString") && (e.PropertyName != "ConvertTabsToSpaces")) { |
||||
// Update values in our own TextEditorOptions instance
|
||||
PropertyInfo propertyInfo = typeof(TextEditorOptions).GetProperty(e.PropertyName); |
||||
if (propertyInfo != null) { |
||||
propertyInfo.SetValue(avalonEditOptions, propertyInfo.GetValue(originalAvalonEditOptions)); |
||||
} |
||||
} else { |
||||
UpdateOverriddenProperties(); |
||||
} |
||||
OnPropertyChanged(e.PropertyName); |
||||
} |
||||
|
||||
void OnSDOptionsPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) |
||||
{ |
||||
OnPropertyChanged(e.PropertyName); |
||||
} |
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged; |
||||
|
||||
void OnPropertyChanged(string propertyName) |
||||
{ |
||||
if (PropertyChanged != null) { |
||||
PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); |
||||
} |
||||
} |
||||
|
||||
public ICSharpCode.AvalonEdit.TextEditorOptions TextEditorOptions |
||||
{ |
||||
get { |
||||
return avalonEditOptions; |
||||
} |
||||
} |
||||
|
||||
#region Overridden properties
|
||||
|
||||
public int IndentationSize { |
||||
get { |
||||
// Get value from own TextEditorOptions instance
|
||||
return avalonEditOptions.IndentationSize; |
||||
} |
||||
} |
||||
|
||||
public string IndentationString { |
||||
get { |
||||
// Get value from own TextEditorOptions instance
|
||||
return avalonEditOptions.IndentationString; |
||||
} |
||||
} |
||||
|
||||
public bool ConvertTabsToSpaces { |
||||
get { |
||||
// Get value from own TextEditorOptions instance
|
||||
return avalonEditOptions.ConvertTabsToSpaces; |
||||
} |
||||
} |
||||
|
||||
#endregion
|
||||
|
||||
#region Rest of ITextEditorOptions implementation
|
||||
|
||||
public bool AutoInsertBlockEnd { |
||||
get { |
||||
return originalSDOptions.AutoInsertBlockEnd; |
||||
} |
||||
} |
||||
|
||||
public int VerticalRulerColumn { |
||||
get { |
||||
return originalSDOptions.VerticalRulerColumn; |
||||
} |
||||
} |
||||
|
||||
public bool UnderlineErrors { |
||||
get { |
||||
return originalSDOptions.UnderlineErrors; |
||||
} |
||||
} |
||||
|
||||
public string FontFamily { |
||||
get { |
||||
return originalSDOptions.FontFamily; |
||||
} |
||||
} |
||||
|
||||
public double FontSize { |
||||
get { |
||||
return originalSDOptions.FontSize; |
||||
} |
||||
} |
||||
|
||||
#endregion
|
||||
|
||||
} |
||||
} |
||||
|
||||
|
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using System.Windows.Controls; |
||||
using ICSharpCode.NRefactory.CSharp.Refactoring; |
||||
using ICSharpCode.NRefactory.TypeSystem; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Editor; |
||||
namespace CSharpBinding.Completion |
||||
{ |
||||
class EnumMemberCompletionData : CompletionData |
||||
{ |
||||
IType enumType; |
||||
|
||||
IEntity member; |
||||
|
||||
public EnumMemberCompletionData(IType enumType, IEntity member, TypeSystemAstBuilder builder) : base(enumType.Name + "." + member.Name) |
||||
{ |
||||
this.enumType = enumType; |
||||
this.member = member; |
||||
this.Image = ClassBrowserIconService.Const; |
||||
this.CompletionText = builder.ConvertType(enumType).ToString() + "." + member.Name; |
||||
} |
||||
|
||||
protected override object CreateFancyDescription() |
||||
{ |
||||
return new FlowDocumentScrollViewer { |
||||
Document = XmlDocFormatter.CreateTooltip(member, false), |
||||
VerticalScrollBarVisibility = ScrollBarVisibility.Auto |
||||
}; |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
@ -1,49 +0,0 @@
@@ -1,49 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#region Using directives
|
||||
|
||||
using System.Reflection; |
||||
using System.Runtime.CompilerServices; |
||||
using System.Runtime.InteropServices; |
||||
|
||||
#endregion
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PyWalker")] |
||||
[assembly: AssemblyDescription("")] |
||||
[assembly: AssemblyConfiguration("")] |
||||
[assembly: AssemblyCompany("")] |
||||
[assembly: AssemblyProduct("PyWalker")] |
||||
[assembly: AssemblyCopyright("")] |
||||
[assembly: AssemblyTrademark("")] |
||||
[assembly: AssemblyCulture("")] |
||||
|
||||
// This sets the default COM visibility of types in the assembly to invisible.
|
||||
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
|
||||
[assembly: ComVisible(false)] |
||||
|
||||
// The assembly version has following format :
|
||||
//
|
||||
// Major.Minor.Build.Revision
|
||||
//
|
||||
// You can specify all the values or you can use the default the Revision and
|
||||
// Build Numbers by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.1")] |
@ -1,441 +0,0 @@
@@ -1,441 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.CodeDom; |
||||
using System.Collections; |
||||
using System.Reflection; |
||||
using System.Text; |
||||
|
||||
namespace PyWalker |
||||
{ |
||||
/// <summary>
|
||||
/// Visits the code dom generated by PythonProvider.
|
||||
/// </summary>
|
||||
public class CodeDomVisitor |
||||
{ |
||||
IOutputWriter writer; |
||||
|
||||
public CodeDomVisitor(IOutputWriter writer) |
||||
{ |
||||
this.writer = writer; |
||||
} |
||||
|
||||
public void Visit(CodeCompileUnit unit) |
||||
{ |
||||
VisitCodeCompileUnit(unit); |
||||
} |
||||
|
||||
void VisitCodeCompileUnit(CodeCompileUnit unit) |
||||
{ |
||||
WriteLine("VisitCodeCompileUnit"); |
||||
|
||||
foreach (CodeNamespace ns in unit.Namespaces) { |
||||
VisitCodeNamespace(ns); |
||||
} |
||||
} |
||||
|
||||
void VisitCodeNamespace(CodeNamespace ns) |
||||
{ |
||||
WriteLine("VisitCodeNamespace: " + ns.Name); |
||||
|
||||
foreach (CodeNamespaceImport import in ns.Imports) { |
||||
VisitCodeNamespaceImport(import); |
||||
} |
||||
|
||||
using (IDisposable indentLevel = Indentation.IncrementLevel()) { |
||||
foreach (CodeTypeDeclaration type in ns.Types) { |
||||
VisitCodeTypeDeclaration(type); |
||||
} |
||||
} |
||||
} |
||||
|
||||
void VisitCodeNamespaceImport(CodeNamespaceImport import) |
||||
{ |
||||
WriteLine("VisitCodeNamespaceImport: " + import.Namespace); |
||||
} |
||||
|
||||
void VisitCodeTypeDeclaration(CodeTypeDeclaration type) |
||||
{ |
||||
WriteLine("VisitCodeTypeDeclaration: " + type.Name); |
||||
WriteLine(MemberAttributesToString(type.Attributes)); |
||||
|
||||
WriteLine("UserData: " + UserDataKeysToString(type.UserData)); |
||||
|
||||
WriteLine("VisitCodeTypeDeclaration: Custom attributes"); |
||||
foreach (CodeAttributeDeclaration attributeDeclaration in type.CustomAttributes) { |
||||
VisitCodeAttributeDeclaration(attributeDeclaration); |
||||
} |
||||
|
||||
WriteLine("TypeAttributes: " + TypeAttributesToString(type.TypeAttributes)); |
||||
|
||||
foreach (CodeTypeParameter parameter in type.TypeParameters) { |
||||
VisitCodeTypeParameter(parameter); |
||||
} |
||||
|
||||
using (IDisposable indentLevel = Indentation.IncrementLevel()) { |
||||
foreach (CodeTypeMember member in type.Members) { |
||||
CodeMemberMethod method = member as CodeMemberMethod; |
||||
CodeMemberField field = member as CodeMemberField; |
||||
if (method != null) { |
||||
VisitCodeMemberMethod(method); |
||||
} else if (field != null) { |
||||
VisitCodeMemberField(field); |
||||
} else { |
||||
WriteLine("Unhandled type member: " + member.GetType().Name); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
void VisitCodeTypeParameter(CodeTypeParameter parameter) |
||||
{ |
||||
WriteLine("VisitCodeTypeParameter: " + parameter.Name); |
||||
} |
||||
|
||||
string TypeAttributesToString(TypeAttributes typeAttributes) |
||||
{ |
||||
return typeAttributes.ToString(); |
||||
} |
||||
|
||||
void VisitCodeAttributeDeclaration(CodeAttributeDeclaration attributeDeclaration) |
||||
{ |
||||
WriteLine("VisitCodeAttributeDeclaration: " + attributeDeclaration.Name); |
||||
} |
||||
|
||||
void VisitCodeMemberMethod(CodeMemberMethod method) |
||||
{ |
||||
WriteLine("VisitCodeMemberMethod: " + method.Name); |
||||
WriteLine(MemberAttributesToString(method.Attributes)); |
||||
|
||||
WriteLine("UserData: " + UserDataKeysToString(method.UserData)); |
||||
foreach (CodeParameterDeclarationExpression param in method.Parameters) { |
||||
VisitCodeParameterDeclarationExpression(param); |
||||
} |
||||
|
||||
using (IDisposable indentLevel = Indentation.IncrementLevel()) { |
||||
WriteLine("Method.Statements.Count: " + method.Statements.Count); |
||||
foreach (CodeStatement statement in method.Statements) { |
||||
VisitCodeStatement(statement); |
||||
} |
||||
} |
||||
} |
||||
|
||||
void VisitCodeStatement(CodeStatement statement) |
||||
{ |
||||
WriteLine("VisitCodeStatement: " + statement.GetType().Name); |
||||
CodeVariableDeclarationStatement codeVariableDeclarationStatement = statement as CodeVariableDeclarationStatement; |
||||
CodeAssignStatement codeAssignStatement = statement as CodeAssignStatement; |
||||
CodeConditionStatement codeConditionStatement = statement as CodeConditionStatement; |
||||
CodeIterationStatement codeIterationStatement = statement as CodeIterationStatement; |
||||
CodeExpressionStatement codeExpressionStatement = statement as CodeExpressionStatement; |
||||
CodeTryCatchFinallyStatement codeTryCatchFinallyStatement = statement as CodeTryCatchFinallyStatement; |
||||
if (codeVariableDeclarationStatement != null) { |
||||
VisitCodeVariableDeclarationStatement(codeVariableDeclarationStatement); |
||||
} else if (codeAssignStatement != null) { |
||||
VisitCodeAssignStatement(codeAssignStatement); |
||||
} else if (codeConditionStatement != null) { |
||||
VisitCodeConditionStatement(codeConditionStatement); |
||||
} else if (codeIterationStatement != null) { |
||||
VisitCodeIterationStatement(codeIterationStatement); |
||||
} else if (codeExpressionStatement != null) { |
||||
VisitCodeExpressionStatement(codeExpressionStatement); |
||||
} else if (codeTryCatchFinallyStatement != null) { |
||||
VisitCodeTryCatchFinallyStatement(codeTryCatchFinallyStatement); |
||||
} else { |
||||
WriteLine("Unhandled statement: " + statement.GetType().Name); |
||||
} |
||||
} |
||||
|
||||
void VisitCodeAssignStatement(CodeAssignStatement assignStatement) |
||||
{ |
||||
WriteLine("VisitCodeAssignmentStatement"); |
||||
WriteLine("Left follows"); |
||||
VisitCodeExpression(assignStatement.Left); |
||||
WriteLine("Right follows"); |
||||
VisitCodeExpression(assignStatement.Right); |
||||
} |
||||
|
||||
void VisitCodeParameterDeclarationExpression(CodeParameterDeclarationExpression expression) |
||||
{ |
||||
WriteLine("VisitCodeParameterDeclarationExpression: " + expression.Name); |
||||
WriteLine("BaseType: " + expression.Type.BaseType); |
||||
} |
||||
|
||||
void VisitCodeVariableDeclarationStatement(CodeVariableDeclarationStatement codeVariableDeclarationStatement) |
||||
{ |
||||
WriteLine("VisitCodeVariableDeclarationStatement: " + codeVariableDeclarationStatement.Name); |
||||
WriteLine("BaseType: " + codeVariableDeclarationStatement.Type.BaseType); |
||||
WriteLine("UserData: " + UserDataKeysToString(codeVariableDeclarationStatement.UserData)); |
||||
WriteLine("InitExpression follows"); |
||||
VisitCodeExpression(codeVariableDeclarationStatement.InitExpression); |
||||
} |
||||
|
||||
void VisitCodeExpression(CodeExpression expression) |
||||
{ |
||||
if (expression != null) { |
||||
WriteLine("VisitCodeExpression: " + expression.GetType().Name); |
||||
CodePrimitiveExpression primitiveExpression = expression as CodePrimitiveExpression; |
||||
CodeFieldReferenceExpression fieldReferenceExpression = expression as CodeFieldReferenceExpression; |
||||
CodeThisReferenceExpression thisReferenceExpression = expression as CodeThisReferenceExpression; |
||||
CodeObjectCreateExpression createExpression = expression as CodeObjectCreateExpression; |
||||
CodeBinaryOperatorExpression binaryExpression = expression as CodeBinaryOperatorExpression; |
||||
CodeMethodReferenceExpression methodReferenceExpression = expression as CodeMethodReferenceExpression; |
||||
CodeMethodInvokeExpression methodInvokeExpression = expression as CodeMethodInvokeExpression; |
||||
CodeVariableReferenceExpression variableReferenceExpression = expression as CodeVariableReferenceExpression; |
||||
if (primitiveExpression != null) { |
||||
VisitCodePrimitiveExpression(primitiveExpression); |
||||
} else if (fieldReferenceExpression != null) { |
||||
VisitCodeFieldReferenceExpression(fieldReferenceExpression); |
||||
} else if (thisReferenceExpression != null) { |
||||
VisitCodeThisReferenceExpression(thisReferenceExpression); |
||||
} else if (createExpression != null) { |
||||
VisitObjectCreateExpression(createExpression); |
||||
} else if (binaryExpression != null) { |
||||
VisitCodeBinaryOperatorExpression(binaryExpression); |
||||
} else if (methodReferenceExpression != null) { |
||||
VisitCodeMethodReferenceExpression(methodReferenceExpression); |
||||
} else if (methodInvokeExpression != null) { |
||||
VisitCodeMethodInvokeExpression(methodInvokeExpression); |
||||
} else if (variableReferenceExpression != null) { |
||||
VisitCodeVariableReferenceExpression(variableReferenceExpression); |
||||
} |
||||
} else { |
||||
WriteLine("VisitCodeExpression: Null"); |
||||
} |
||||
} |
||||
|
||||
void VisitCodePrimitiveExpression(CodePrimitiveExpression expression) |
||||
{ |
||||
WriteLine("VisitCodePrimitiveExpression: " + expression.Value); |
||||
} |
||||
|
||||
void VisitCodeFieldReferenceExpression(CodeFieldReferenceExpression expression) |
||||
{ |
||||
WriteLine("VisitFieldReferenceExpression: " + expression.FieldName); |
||||
WriteLine("Target object follows"); |
||||
VisitCodeExpression(expression.TargetObject); |
||||
} |
||||
|
||||
void VisitCodeThisReferenceExpression(CodeThisReferenceExpression expression) |
||||
{ |
||||
WriteLine("VisitCodeThisReferenceExpression"); |
||||
WriteLine("UserData: " + UserDataKeysToString(expression.UserData)); |
||||
} |
||||
|
||||
void VisitCodeMemberField(CodeMemberField field) |
||||
{ |
||||
WriteLine("VisitCodeMemberField: " + field.Name); |
||||
WriteLine("UserData: " + UserDataKeysToString(field.UserData)); |
||||
WriteLine(MemberAttributesToString(field.Attributes)); |
||||
WriteLine("InitExpression follows"); |
||||
VisitCodeExpression(field.InitExpression); |
||||
} |
||||
|
||||
void VisitObjectCreateExpression(CodeObjectCreateExpression createExpression) |
||||
{ |
||||
WriteLine("VisitObjectCreateExpression: Type: " + createExpression.CreateType.BaseType); |
||||
foreach (CodeExpression expression in createExpression.Parameters) { |
||||
VisitCodeExpression(expression); |
||||
} |
||||
} |
||||
|
||||
void VisitCodeConditionStatement(CodeConditionStatement conditionStatement) |
||||
{ |
||||
WriteLine("VisitCodeConditionStatement"); |
||||
|
||||
WriteLine("Condition follows"); |
||||
using (IDisposable indentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeExpression(conditionStatement.Condition); |
||||
} |
||||
|
||||
WriteLine("TrueStatements follow"); |
||||
using (IDisposable indentLevel = Indentation.IncrementLevel()) { |
||||
foreach (CodeStatement statement in conditionStatement.TrueStatements) { |
||||
VisitCodeStatement(statement); |
||||
} |
||||
} |
||||
|
||||
WriteLine("FalseStatements follow"); |
||||
using (IDisposable indentLevel = Indentation.IncrementLevel()) { |
||||
foreach (CodeStatement statement in conditionStatement.FalseStatements) { |
||||
VisitCodeStatement(statement); |
||||
} |
||||
} |
||||
} |
||||
|
||||
void VisitCodeBinaryOperatorExpression(CodeBinaryOperatorExpression expression) |
||||
{ |
||||
WriteLine("VisitBinaryOperatorExpression: " + expression.Operator); |
||||
|
||||
WriteLine("Left follows"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeExpression(expression.Left); |
||||
} |
||||
|
||||
WriteLine("Right follows"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeExpression(expression.Right); |
||||
} |
||||
} |
||||
|
||||
void VisitCodeIterationStatement(CodeIterationStatement statement) |
||||
{ |
||||
WriteLine("VisitIterationStatement"); |
||||
|
||||
WriteLine("Init statement follows"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeStatement(statement.InitStatement); |
||||
} |
||||
|
||||
WriteLine("Increment statement follows"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeStatement(statement.IncrementStatement); |
||||
} |
||||
|
||||
WriteLine("Test expression follows"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeExpression(statement.TestExpression); |
||||
} |
||||
|
||||
WriteLine("Statements follow"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
foreach (CodeStatement currentStatement in statement.Statements) { |
||||
VisitCodeStatement(currentStatement); |
||||
} |
||||
} |
||||
} |
||||
|
||||
void VisitCodeMethodInvokeExpression(CodeMethodInvokeExpression expression) |
||||
{ |
||||
WriteLine("VisitCodeMethodInvokeExpression"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeExpression(expression.Method); |
||||
} |
||||
} |
||||
|
||||
void VisitCodeMethodReferenceExpression(CodeMethodReferenceExpression expression) |
||||
{ |
||||
WriteLine("VisitCodeMethodReferenceExpression: " + expression.MethodName); |
||||
WriteLine("Target Object follows"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeExpression(expression.TargetObject); |
||||
} |
||||
} |
||||
|
||||
void VisitCodeExpressionStatement(CodeExpressionStatement statement) |
||||
{ |
||||
WriteLine("VisitCodeExpressionStatement"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
VisitCodeExpression(statement.Expression); |
||||
} |
||||
} |
||||
|
||||
void VisitCodeVariableReferenceExpression(CodeVariableReferenceExpression expression) |
||||
{ |
||||
WriteLine("VisitCodeVariableReferenceExpression: " + expression.VariableName); |
||||
} |
||||
|
||||
void VisitCodeTryCatchFinallyStatement(CodeTryCatchFinallyStatement tryStatement) |
||||
{ |
||||
WriteLine("VisitCodeTryCatchFinallyStatement"); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
WriteLine("Try statements follow: Count: " + tryStatement.TryStatements.Count); |
||||
foreach (CodeStatement statement in tryStatement.TryStatements) { |
||||
VisitCodeStatement(statement); |
||||
} |
||||
|
||||
WriteLine("Catch clauses follow: Count: " + tryStatement.CatchClauses.Count); |
||||
foreach (CodeCatchClause catchClause in tryStatement.CatchClauses) { |
||||
VisitCodeCatchClause(catchClause); |
||||
} |
||||
|
||||
WriteLine("Finally statements follow: Count: " + tryStatement.FinallyStatements); |
||||
foreach (CodeStatement statement in tryStatement.FinallyStatements) { |
||||
VisitCodeStatement(statement); |
||||
} |
||||
} |
||||
} |
||||
|
||||
void VisitCodeCatchClause(CodeCatchClause catchClause) |
||||
{ |
||||
WriteLine("VisitCodeCatchClause"); |
||||
WriteLine("Exception caught: " + catchClause.CatchExceptionType.BaseType); |
||||
WriteLine("Exception variable: " + catchClause.LocalName); |
||||
|
||||
WriteLine("Catch statements follow: Count: " + catchClause.Statements.Count); |
||||
using (IDisposable currentLevel = Indentation.IncrementLevel()) { |
||||
foreach (CodeStatement statement in catchClause.Statements) { |
||||
VisitCodeStatement(statement); |
||||
} |
||||
} |
||||
} |
||||
|
||||
string MemberAttributesToString(MemberAttributes attributes) |
||||
{ |
||||
StringBuilder s = new StringBuilder(); |
||||
s.Append("Attributes: "); |
||||
|
||||
if ((attributes & MemberAttributes.Public) == MemberAttributes.Public) { |
||||
s.Append("Public, "); |
||||
} |
||||
if ((attributes & MemberAttributes.Private) == MemberAttributes.Private) { |
||||
s.Append("Private, "); |
||||
} |
||||
if ((attributes & MemberAttributes.Family) == MemberAttributes.Family) { |
||||
s.Append("Family, "); |
||||
} |
||||
if ((attributes & MemberAttributes.Final) == MemberAttributes.Final) { |
||||
s.Append("Final, "); |
||||
} |
||||
|
||||
return s.ToString(); |
||||
} |
||||
|
||||
string UserDataKeysToString(IDictionary userData) |
||||
{ |
||||
StringBuilder s = new StringBuilder(); |
||||
ICollection keys = userData.Keys; |
||||
foreach (object o in keys) { |
||||
string name = o as string; |
||||
if (name != null) { |
||||
s.Append(name); |
||||
s.Append(", "); |
||||
} |
||||
} |
||||
return s.ToString(); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Writes a line and indents it to the current level.
|
||||
/// </summary>
|
||||
void WriteLine(string s) |
||||
{ |
||||
writer.WriteLine(GetIndent() + s); |
||||
} |
||||
|
||||
string GetIndent() |
||||
{ |
||||
StringBuilder indent = new StringBuilder(); |
||||
for (int i = 0; i < Indentation.CurrentLevel; ++i) { |
||||
indent.Append('\t'); |
||||
} |
||||
return indent.ToString(); |
||||
} |
||||
} |
||||
} |
@ -1,46 +0,0 @@
@@ -1,46 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace PyWalker |
||||
{ |
||||
class Indentation : IDisposable |
||||
{ |
||||
static int currentLevel; |
||||
|
||||
public static int CurrentLevel { |
||||
get { return currentLevel; } |
||||
} |
||||
|
||||
Indentation() |
||||
{ |
||||
currentLevel++; |
||||
} |
||||
|
||||
public void Dispose() |
||||
{ |
||||
currentLevel--; |
||||
} |
||||
|
||||
public static IDisposable IncrementLevel() |
||||
{ |
||||
return new Indentation(); |
||||
} |
||||
} |
||||
} |
@ -1,210 +0,0 @@
@@ -1,210 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
namespace PyWalker |
||||
{ |
||||
partial class MainForm |
||||
{ |
||||
/// <summary>
|
||||
/// Designer variable used to keep track of non-visual components.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null; |
||||
|
||||
/// <summary>
|
||||
/// Disposes resources used by the form.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) |
||||
{ |
||||
if (disposing) { |
||||
if (components != null) { |
||||
components.Dispose(); |
||||
} |
||||
} |
||||
base.Dispose(disposing); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// This method is required for Windows Forms designer support.
|
||||
/// Do not change the method contents inside the source code editor. The Forms designer might
|
||||
/// not be able to load this method if it was changed manually.
|
||||
/// </summary>
|
||||
private void InitializeComponent() |
||||
{ |
||||
this.components = new System.ComponentModel.Container(); |
||||
this.splitContainer = new System.Windows.Forms.SplitContainer(); |
||||
this.codeTextBox = new System.Windows.Forms.RichTextBox(); |
||||
this.runCSharpNRefactoryVisitor = new System.Windows.Forms.Button(); |
||||
this.runNRefactoryCSharpCodeDomVisitor = new System.Windows.Forms.Button(); |
||||
this.runCSharpToPythonButton = new System.Windows.Forms.Button(); |
||||
this.runRoundTripButton = new System.Windows.Forms.Button(); |
||||
this.clearButton = new System.Windows.Forms.Button(); |
||||
this.runAstWalkerButton = new System.Windows.Forms.Button(); |
||||
this.walkerOutputTextBox = new System.Windows.Forms.RichTextBox(); |
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components); |
||||
this.splitContainer.Panel1.SuspendLayout(); |
||||
this.splitContainer.Panel2.SuspendLayout(); |
||||
this.splitContainer.SuspendLayout(); |
||||
this.SuspendLayout(); |
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; |
||||
this.splitContainer.Location = new System.Drawing.Point(0, 0); |
||||
this.splitContainer.Name = "splitContainer"; |
||||
this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; |
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
this.splitContainer.Panel1.Controls.Add(this.codeTextBox); |
||||
//
|
||||
// splitContainer.Panel2
|
||||
//
|
||||
this.splitContainer.Panel2.Controls.Add(this.runCSharpNRefactoryVisitor); |
||||
this.splitContainer.Panel2.Controls.Add(this.runNRefactoryCSharpCodeDomVisitor); |
||||
this.splitContainer.Panel2.Controls.Add(this.runCSharpToPythonButton); |
||||
this.splitContainer.Panel2.Controls.Add(this.runRoundTripButton); |
||||
this.splitContainer.Panel2.Controls.Add(this.clearButton); |
||||
this.splitContainer.Panel2.Controls.Add(this.runAstWalkerButton); |
||||
this.splitContainer.Panel2.Controls.Add(this.walkerOutputTextBox); |
||||
this.splitContainer.Size = new System.Drawing.Size(515, 386); |
||||
this.splitContainer.SplitterDistance = 138; |
||||
this.splitContainer.TabIndex = 0; |
||||
//
|
||||
// codeTextBox
|
||||
//
|
||||
this.codeTextBox.AcceptsTab = true; |
||||
this.codeTextBox.Dock = System.Windows.Forms.DockStyle.Fill; |
||||
this.codeTextBox.Location = new System.Drawing.Point(0, 0); |
||||
this.codeTextBox.Name = "codeTextBox"; |
||||
this.codeTextBox.Size = new System.Drawing.Size(515, 138); |
||||
this.codeTextBox.TabIndex = 0; |
||||
this.codeTextBox.Text = ""; |
||||
this.codeTextBox.WordWrap = false; |
||||
//
|
||||
// runCSharpNRefactoryVisitor
|
||||
//
|
||||
this.runCSharpNRefactoryVisitor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
||||
this.runCSharpNRefactoryVisitor.Location = new System.Drawing.Point(261, 218); |
||||
this.runCSharpNRefactoryVisitor.Name = "runCSharpNRefactoryVisitor"; |
||||
this.runCSharpNRefactoryVisitor.Size = new System.Drawing.Size(117, 23); |
||||
this.runCSharpNRefactoryVisitor.TabIndex = 8; |
||||
this.runCSharpNRefactoryVisitor.Text = "Visit C# AST"; |
||||
this.toolTip.SetToolTip(this.runCSharpNRefactoryVisitor, "Walks the NRefactory AST generated from the C# code."); |
||||
this.runCSharpNRefactoryVisitor.UseVisualStyleBackColor = true; |
||||
this.runCSharpNRefactoryVisitor.Click += new System.EventHandler(this.RunCSharpNRefactoryVisitorClick); |
||||
//
|
||||
// runNRefactoryCSharpCodeDomVisitor
|
||||
//
|
||||
this.runNRefactoryCSharpCodeDomVisitor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
||||
this.runNRefactoryCSharpCodeDomVisitor.Location = new System.Drawing.Point(384, 218); |
||||
this.runNRefactoryCSharpCodeDomVisitor.Name = "runNRefactoryCSharpCodeDomVisitor"; |
||||
this.runNRefactoryCSharpCodeDomVisitor.Size = new System.Drawing.Size(127, 23); |
||||
this.runNRefactoryCSharpCodeDomVisitor.TabIndex = 7; |
||||
this.runNRefactoryCSharpCodeDomVisitor.Text = "Visit C# Code DOM"; |
||||
this.toolTip.SetToolTip(this.runNRefactoryCSharpCodeDomVisitor, "Visits the code dom generated from the C# code by the NRefactory code dom visitor" + |
||||
"."); |
||||
this.runNRefactoryCSharpCodeDomVisitor.UseVisualStyleBackColor = true; |
||||
this.runNRefactoryCSharpCodeDomVisitor.Click += new System.EventHandler(this.RunNRefactoryCSharpCodeDomVisitorClick); |
||||
//
|
||||
// runCSharpToPythonButton
|
||||
//
|
||||
this.runCSharpToPythonButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
||||
this.runCSharpToPythonButton.Location = new System.Drawing.Point(261, 192); |
||||
this.runCSharpToPythonButton.Name = "runCSharpToPythonButton"; |
||||
this.runCSharpToPythonButton.Size = new System.Drawing.Size(117, 23); |
||||
this.runCSharpToPythonButton.TabIndex = 6; |
||||
this.runCSharpToPythonButton.Text = "C# to Python"; |
||||
this.toolTip.SetToolTip(this.runCSharpToPythonButton, "Takes the code dom generated from the NRefactory parser and converts it to python" + |
||||
" using the python generator."); |
||||
this.runCSharpToPythonButton.UseVisualStyleBackColor = true; |
||||
this.runCSharpToPythonButton.Click += new System.EventHandler(this.RunCSharpToPythonClick); |
||||
//
|
||||
// runRoundTripButton
|
||||
//
|
||||
this.runRoundTripButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
||||
this.runRoundTripButton.Location = new System.Drawing.Point(138, 191); |
||||
this.runRoundTripButton.Name = "runRoundTripButton"; |
||||
this.runRoundTripButton.Size = new System.Drawing.Size(117, 23); |
||||
this.runRoundTripButton.TabIndex = 4; |
||||
this.runRoundTripButton.Text = "Round Trip"; |
||||
this.toolTip.SetToolTip(this.runRoundTripButton, "Generates a code dom from the python code and then generates python code from the" + |
||||
" code dom."); |
||||
this.runRoundTripButton.UseVisualStyleBackColor = true; |
||||
this.runRoundTripButton.Click += new System.EventHandler(this.RunRoundTripButtonClick); |
||||
//
|
||||
// clearButton
|
||||
//
|
||||
this.clearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
||||
this.clearButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; |
||||
this.clearButton.Location = new System.Drawing.Point(138, 218); |
||||
this.clearButton.Name = "clearButton"; |
||||
this.clearButton.Size = new System.Drawing.Size(117, 23); |
||||
this.clearButton.TabIndex = 2; |
||||
this.clearButton.Text = "Clear"; |
||||
this.clearButton.UseVisualStyleBackColor = true; |
||||
this.clearButton.Click += new System.EventHandler(this.ClearButtonClick); |
||||
//
|
||||
// runAstWalkerButton
|
||||
//
|
||||
this.runAstWalkerButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
||||
this.runAstWalkerButton.Location = new System.Drawing.Point(384, 191); |
||||
this.runAstWalkerButton.Name = "runAstWalkerButton"; |
||||
this.runAstWalkerButton.Size = new System.Drawing.Size(127, 23); |
||||
this.runAstWalkerButton.TabIndex = 1; |
||||
this.runAstWalkerButton.Text = "Visit AST"; |
||||
this.toolTip.SetToolTip(this.runAstWalkerButton, "Walks the python AST generated from the python code."); |
||||
this.runAstWalkerButton.UseVisualStyleBackColor = true; |
||||
this.runAstWalkerButton.Click += new System.EventHandler(this.RunAstWalkerButtonClick); |
||||
//
|
||||
// walkerOutputTextBox
|
||||
//
|
||||
this.walkerOutputTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
||||
| System.Windows.Forms.AnchorStyles.Left) |
||||
| System.Windows.Forms.AnchorStyles.Right))); |
||||
this.walkerOutputTextBox.Location = new System.Drawing.Point(0, 2); |
||||
this.walkerOutputTextBox.Name = "walkerOutputTextBox"; |
||||
this.walkerOutputTextBox.Size = new System.Drawing.Size(515, 184); |
||||
this.walkerOutputTextBox.TabIndex = 0; |
||||
this.walkerOutputTextBox.Text = ""; |
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
||||
this.ClientSize = new System.Drawing.Size(515, 386); |
||||
this.Controls.Add(this.splitContainer); |
||||
this.Name = "MainForm"; |
||||
this.Text = "PyWalker"; |
||||
this.splitContainer.Panel1.ResumeLayout(false); |
||||
this.splitContainer.Panel2.ResumeLayout(false); |
||||
this.splitContainer.ResumeLayout(false); |
||||
this.ResumeLayout(false); |
||||
} |
||||
private System.Windows.Forms.Button runCSharpNRefactoryVisitor; |
||||
private System.Windows.Forms.Button runNRefactoryCSharpCodeDomVisitor; |
||||
private System.Windows.Forms.Button runCSharpToPythonButton; |
||||
private System.Windows.Forms.ToolTip toolTip; |
||||
private System.Windows.Forms.Button runRoundTripButton; |
||||
private System.Windows.Forms.Button clearButton; |
||||
private System.Windows.Forms.Button runAstWalkerButton; |
||||
private System.Windows.Forms.RichTextBox walkerOutputTextBox; |
||||
private System.Windows.Forms.RichTextBox codeTextBox; |
||||
private System.Windows.Forms.SplitContainer splitContainer; |
||||
} |
||||
} |
@ -1,157 +0,0 @@
@@ -1,157 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.CodeDom; |
||||
using System.CodeDom.Compiler; |
||||
using System.Collections.Generic; |
||||
using System.Drawing; |
||||
using System.IO; |
||||
using System.Windows.Forms; |
||||
using ICSharpCode.PythonBinding; |
||||
using IronPython; |
||||
using IronPython.Compiler; |
||||
using IronPython.Compiler.Ast; |
||||
using IronPython.Runtime; |
||||
using Microsoft.CSharp; |
||||
using Microsoft.Scripting; |
||||
using Microsoft.Scripting.Runtime; |
||||
using NRefactory = ICSharpCode.NRefactory; |
||||
|
||||
namespace PyWalker |
||||
{ |
||||
public partial class MainForm : Form, IOutputWriter |
||||
{ |
||||
public MainForm() |
||||
{ |
||||
InitializeComponent(); |
||||
} |
||||
|
||||
public void WriteLine(string s) |
||||
{ |
||||
walkerOutputTextBox.Text += String.Concat(s, "\r\n"); |
||||
} |
||||
|
||||
void RunAstWalkerButtonClick(object sender, EventArgs e) |
||||
{ |
||||
try { |
||||
IronPython.Hosting.Python.CreateEngine(); |
||||
Clear(); |
||||
PythonCompilerSink sink = new PythonCompilerSink(); |
||||
SourceUnit source = DefaultContext.DefaultPythonContext.CreateFileUnit(@"D:\Temp.py", codeTextBox.Text); |
||||
CompilerContext context = new CompilerContext(source, new PythonCompilerOptions(), sink); |
||||
Parser parser = Parser.CreateParser(context, new PythonOptions()); |
||||
PythonAst ast = parser.ParseFile(false); |
||||
if (sink.Errors.Count == 0) { |
||||
ResolveWalker walker = new ResolveWalker(this); |
||||
ast.Walk(walker); |
||||
} else { |
||||
walkerOutputTextBox.Text += "\r\n"; |
||||
foreach (PythonCompilerError error in sink.Errors) { |
||||
walkerOutputTextBox.Text += error.ToString() + "\r\n"; |
||||
} |
||||
} |
||||
} catch (Exception ex) { |
||||
walkerOutputTextBox.Text = ex.ToString(); |
||||
} |
||||
} |
||||
|
||||
void ClearButtonClick(object sender, EventArgs e) |
||||
{ |
||||
Clear(); |
||||
} |
||||
|
||||
void Clear() |
||||
{ |
||||
walkerOutputTextBox.Text = String.Empty; |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Round trips the Python code through the code DOM and back
|
||||
/// to source code.
|
||||
/// </summary>
|
||||
void RunRoundTripButtonClick(object sender, EventArgs e) |
||||
{ |
||||
try { |
||||
Clear(); |
||||
// PythonProvider provider = new PythonProvider();
|
||||
// CodeCompileUnit unit = provider.Parse(new StringReader(codeTextBox.Text));
|
||||
// StringWriter writer = new StringWriter();
|
||||
// CodeGeneratorOptions options = new CodeGeneratorOptions();
|
||||
// options.BlankLinesBetweenMembers = false;
|
||||
// options.IndentString = "\t";
|
||||
// provider.GenerateCodeFromCompileUnit(unit, writer, options);
|
||||
//
|
||||
// walkerOutputTextBox.Text = writer.ToString();
|
||||
} catch (Exception ex) { |
||||
walkerOutputTextBox.Text = ex.ToString(); |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Converts the C# code to a code dom using the NRefactory
|
||||
/// library and then visits the code dom.
|
||||
/// </summary>
|
||||
void RunCSharpToPythonClick(object sender, EventArgs e) |
||||
{ |
||||
try { |
||||
Clear(); |
||||
NRefactoryToPythonConverter converter = new NRefactoryToPythonConverter(NRefactory.SupportedLanguage.CSharp); |
||||
walkerOutputTextBox.Text = converter.Convert(codeTextBox.Text); |
||||
} catch (Exception ex) { |
||||
walkerOutputTextBox.Text = ex.ToString(); |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Converts C# to python using the code dom generated by the
|
||||
/// NRefactory parser.
|
||||
/// </summary>
|
||||
void RunNRefactoryCSharpCodeDomVisitorClick(object sender, EventArgs e) |
||||
{ |
||||
try { |
||||
Clear(); |
||||
using (NRefactory.IParser parser = NRefactory.ParserFactory.CreateParser(NRefactory.SupportedLanguage.CSharp, new StringReader(codeTextBox.Text))) { |
||||
parser.ParseMethodBodies = false; |
||||
parser.Parse(); |
||||
NRefactory.Visitors.CodeDomVisitor visitor = new NRefactory.Visitors.CodeDomVisitor(); |
||||
visitor.VisitCompilationUnit(parser.CompilationUnit, null); |
||||
CodeDomVisitor codeDomVisitor = new CodeDomVisitor(this); |
||||
codeDomVisitor.Visit(visitor.codeCompileUnit); |
||||
} |
||||
} catch (Exception ex) { |
||||
walkerOutputTextBox.Text = ex.ToString(); |
||||
} |
||||
} |
||||
|
||||
void RunCSharpNRefactoryVisitorClick(object sender, EventArgs e) |
||||
{ |
||||
try { |
||||
Clear(); |
||||
using (NRefactory.IParser parser = NRefactory.ParserFactory.CreateParser(NRefactory.SupportedLanguage.CSharp, new StringReader(codeTextBox.Text))) { |
||||
parser.ParseMethodBodies = false; |
||||
parser.Parse(); |
||||
NRefactoryAstVisitor visitor = new NRefactoryAstVisitor(this); |
||||
visitor.VisitCompilationUnit(parser.CompilationUnit, null); |
||||
} |
||||
} catch (Exception ex) { |
||||
walkerOutputTextBox.Text = ex.ToString(); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,123 +0,0 @@
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<root> |
||||
<!-- |
||||
Microsoft ResX Schema |
||||
|
||||
Version 2.0 |
||||
|
||||
The primary goals of this format is to allow a simple XML format |
||||
that is mostly human readable. The generation and parsing of the |
||||
various data types are done through the TypeConverter classes |
||||
associated with the data types. |
||||
|
||||
Example: |
||||
|
||||
... ado.net/XML headers & schema ... |
||||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
<resheader name="version">2.0</resheader> |
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
</data> |
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
<comment>This is a comment</comment> |
||||
</data> |
||||
|
||||
There are any number of "resheader" rows that contain simple |
||||
name/value pairs. |
||||
|
||||
Each data row contains a name, and value. The row also contains a |
||||
type or mimetype. Type corresponds to a .NET class that support |
||||
text/value conversion through the TypeConverter architecture. |
||||
Classes that don't support this are serialized and stored with the |
||||
mimetype set. |
||||
|
||||
The mimetype is used for serialized objects, and tells the |
||||
ResXResourceReader how to depersist the object. This is currently not |
||||
extensible. For a given mimetype the value must be set accordingly: |
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
that the ResXResourceWriter will generate, however the reader can |
||||
read any of the formats listed below. |
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
value : The object must be serialized with |
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
: and then encoded with base64 encoding. |
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
value : The object must be serialized with |
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
: and then encoded with base64 encoding. |
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
value : The object must be serialized into a byte array |
||||
: using a System.ComponentModel.TypeConverter |
||||
: and then encoded with base64 encoding. |
||||
--> |
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
<xsd:complexType> |
||||
<xsd:choice maxOccurs="unbounded"> |
||||
<xsd:element name="metadata"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
<xsd:attribute name="type" type="xsd:string" /> |
||||
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
<xsd:attribute ref="xml:space" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="assembly"> |
||||
<xsd:complexType> |
||||
<xsd:attribute name="alias" type="xsd:string" /> |
||||
<xsd:attribute name="name" type="xsd:string" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="data"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
<xsd:attribute ref="xml:space" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="resheader"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
</xsd:choice> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
</xsd:schema> |
||||
<resheader name="resmimetype"> |
||||
<value>text/microsoft-resx</value> |
||||
</resheader> |
||||
<resheader name="version"> |
||||
<value>2.0</value> |
||||
</resheader> |
||||
<resheader name="reader"> |
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
</resheader> |
||||
<resheader name="writer"> |
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
</resheader> |
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
||||
<value>17, 17</value> |
||||
</metadata> |
||||
</root> |
@ -1,678 +0,0 @@
@@ -1,678 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Diagnostics; |
||||
using System.Text; |
||||
using ICSharpCode.NRefactory.Ast; |
||||
using ICSharpCode.NRefactory.Visitors; |
||||
|
||||
namespace PyWalker |
||||
{ |
||||
public class NRefactoryAstVisitor : AbstractAstVisitor |
||||
{ |
||||
IOutputWriter writer; |
||||
|
||||
public NRefactoryAstVisitor(IOutputWriter writer) |
||||
{ |
||||
this.writer = writer; |
||||
} |
||||
|
||||
public override object VisitAddHandlerStatement(AddHandlerStatement addHandlerStatement, object data) |
||||
{ |
||||
return base.VisitAddHandlerStatement(addHandlerStatement, data); |
||||
} |
||||
|
||||
public override object VisitAddressOfExpression(AddressOfExpression addressOfExpression, object data) |
||||
{ |
||||
return base.VisitAddressOfExpression(addressOfExpression, data); |
||||
} |
||||
|
||||
public override object VisitAnonymousMethodExpression(AnonymousMethodExpression anonymousMethodExpression, object data) |
||||
{ |
||||
return base.VisitAnonymousMethodExpression(anonymousMethodExpression, data); |
||||
} |
||||
|
||||
public override object VisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, object data) |
||||
{ |
||||
return base.VisitArrayCreateExpression(arrayCreateExpression, data); |
||||
} |
||||
|
||||
public override object VisitAssignmentExpression(AssignmentExpression assignmentExpression, object data) |
||||
{ |
||||
WriteLine("VisitAssignmentExpression"); |
||||
return base.VisitAssignmentExpression(assignmentExpression, data); |
||||
} |
||||
|
||||
public override object VisitAttribute(ICSharpCode.NRefactory.Ast.Attribute attribute, object data) |
||||
{ |
||||
return base.VisitAttribute(attribute, data); |
||||
} |
||||
|
||||
public override object VisitAttributeSection(AttributeSection attributeSection, object data) |
||||
{ |
||||
return base.VisitAttributeSection(attributeSection, data); |
||||
} |
||||
|
||||
public override object VisitBaseReferenceExpression(BaseReferenceExpression baseReferenceExpression, object data) |
||||
{ |
||||
return base.VisitBaseReferenceExpression(baseReferenceExpression, data); |
||||
} |
||||
|
||||
public override object VisitBinaryOperatorExpression(BinaryOperatorExpression binaryOperatorExpression, object data) |
||||
{ |
||||
return base.VisitBinaryOperatorExpression(binaryOperatorExpression, data); |
||||
} |
||||
|
||||
public override object VisitBlockStatement(BlockStatement blockStatement, object data) |
||||
{ |
||||
return base.VisitBlockStatement(blockStatement, data); |
||||
} |
||||
|
||||
public override object VisitBreakStatement(BreakStatement breakStatement, object data) |
||||
{ |
||||
return base.VisitBreakStatement(breakStatement, data); |
||||
} |
||||
|
||||
public override object VisitCaseLabel(CaseLabel caseLabel, object data) |
||||
{ |
||||
return base.VisitCaseLabel(caseLabel, data); |
||||
} |
||||
|
||||
public override object VisitCastExpression(CastExpression castExpression, object data) |
||||
{ |
||||
return base.VisitCastExpression(castExpression, data); |
||||
} |
||||
|
||||
public override object VisitCatchClause(CatchClause catchClause, object data) |
||||
{ |
||||
return base.VisitCatchClause(catchClause, data); |
||||
} |
||||
|
||||
public override object VisitCheckedExpression(CheckedExpression checkedExpression, object data) |
||||
{ |
||||
return base.VisitCheckedExpression(checkedExpression, data); |
||||
} |
||||
|
||||
public override object VisitCheckedStatement(CheckedStatement checkedStatement, object data) |
||||
{ |
||||
return base.VisitCheckedStatement(checkedStatement, data); |
||||
} |
||||
|
||||
public override object VisitClassReferenceExpression(ClassReferenceExpression classReferenceExpression, object data) |
||||
{ |
||||
return base.VisitClassReferenceExpression(classReferenceExpression, data); |
||||
} |
||||
|
||||
public override object VisitCollectionInitializerExpression(CollectionInitializerExpression collectionInitializerExpression, object data) |
||||
{ |
||||
WriteLine("VisitCollectionInitializerExpression"); |
||||
return base.VisitCollectionInitializerExpression(collectionInitializerExpression, data); |
||||
} |
||||
|
||||
public override object VisitCompilationUnit(CompilationUnit compilationUnit, object data) |
||||
{ |
||||
WriteLine("VisitCodeCompileUnit"); |
||||
return base.VisitCompilationUnit(compilationUnit, data); |
||||
} |
||||
|
||||
public override object VisitConditionalExpression(ConditionalExpression conditionalExpression, object data) |
||||
{ |
||||
return base.VisitConditionalExpression(conditionalExpression, data); |
||||
} |
||||
|
||||
public override object VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration, object data) |
||||
{ |
||||
WriteLine("VisitConstructorDeclaration"); |
||||
return base.VisitConstructorDeclaration(constructorDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitConstructorInitializer(ConstructorInitializer constructorInitializer, object data) |
||||
{ |
||||
WriteLine("VisitConstructorInitializer"); |
||||
return base.VisitConstructorInitializer(constructorInitializer, data); |
||||
} |
||||
|
||||
public override object VisitContinueStatement(ContinueStatement continueStatement, object data) |
||||
{ |
||||
return base.VisitContinueStatement(continueStatement, data); |
||||
} |
||||
|
||||
public override object VisitDeclareDeclaration(DeclareDeclaration declareDeclaration, object data) |
||||
{ |
||||
return base.VisitDeclareDeclaration(declareDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitDefaultValueExpression(DefaultValueExpression defaultValueExpression, object data) |
||||
{ |
||||
return base.VisitDefaultValueExpression(defaultValueExpression, data); |
||||
} |
||||
|
||||
public override object VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration, object data) |
||||
{ |
||||
return base.VisitDelegateDeclaration(delegateDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration, object data) |
||||
{ |
||||
return base.VisitDestructorDeclaration(destructorDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitDirectionExpression(DirectionExpression directionExpression, object data) |
||||
{ |
||||
return base.VisitDirectionExpression(directionExpression, data); |
||||
} |
||||
|
||||
public override object VisitDoLoopStatement(DoLoopStatement doLoopStatement, object data) |
||||
{ |
||||
return base.VisitDoLoopStatement(doLoopStatement, data); |
||||
} |
||||
|
||||
public override object VisitElseIfSection(ElseIfSection elseIfSection, object data) |
||||
{ |
||||
return base.VisitElseIfSection(elseIfSection, data); |
||||
} |
||||
|
||||
public override object VisitEmptyStatement(EmptyStatement emptyStatement, object data) |
||||
{ |
||||
WriteLine("VisitEmptyStatement"); |
||||
return base.VisitEmptyStatement(emptyStatement, data); |
||||
} |
||||
|
||||
public override object VisitEndStatement(EndStatement endStatement, object data) |
||||
{ |
||||
return base.VisitEndStatement(endStatement, data); |
||||
} |
||||
|
||||
public override object VisitEraseStatement(EraseStatement eraseStatement, object data) |
||||
{ |
||||
return base.VisitEraseStatement(eraseStatement, data); |
||||
} |
||||
|
||||
public override object VisitErrorStatement(ErrorStatement errorStatement, object data) |
||||
{ |
||||
return base.VisitErrorStatement(errorStatement, data); |
||||
} |
||||
|
||||
public override object VisitEventAddRegion(EventAddRegion eventAddRegion, object data) |
||||
{ |
||||
return base.VisitEventAddRegion(eventAddRegion, data); |
||||
} |
||||
|
||||
public override object VisitEventDeclaration(EventDeclaration eventDeclaration, object data) |
||||
{ |
||||
return base.VisitEventDeclaration(eventDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitEventRaiseRegion(EventRaiseRegion eventRaiseRegion, object data) |
||||
{ |
||||
return base.VisitEventRaiseRegion(eventRaiseRegion, data); |
||||
} |
||||
|
||||
public override object VisitEventRemoveRegion(EventRemoveRegion eventRemoveRegion, object data) |
||||
{ |
||||
return base.VisitEventRemoveRegion(eventRemoveRegion, data); |
||||
} |
||||
|
||||
public override object VisitExitStatement(ExitStatement exitStatement, object data) |
||||
{ |
||||
return base.VisitExitStatement(exitStatement, data); |
||||
} |
||||
|
||||
public override object VisitExpressionRangeVariable(ExpressionRangeVariable expressionRangeVariable, object data) |
||||
{ |
||||
return base.VisitExpressionRangeVariable(expressionRangeVariable, data); |
||||
} |
||||
|
||||
public override object VisitExpressionStatement(ExpressionStatement expressionStatement, object data) |
||||
{ |
||||
WriteLine("VisitExpressionStatement"); |
||||
return base.VisitExpressionStatement(expressionStatement, data); |
||||
} |
||||
|
||||
public override object VisitFieldDeclaration(FieldDeclaration fieldDeclaration, object data) |
||||
{ |
||||
WriteLine("VisitFieldDeclaration: " + fieldDeclaration.Fields[0].Name); |
||||
return base.VisitFieldDeclaration(fieldDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitFixedStatement(FixedStatement fixedStatement, object data) |
||||
{ |
||||
return base.VisitFixedStatement(fixedStatement, data); |
||||
} |
||||
|
||||
public override object VisitForeachStatement(ForeachStatement foreachStatement, object data) |
||||
{ |
||||
return base.VisitForeachStatement(foreachStatement, data); |
||||
} |
||||
|
||||
public override object VisitForNextStatement(ForNextStatement forNextStatement, object data) |
||||
{ |
||||
return base.VisitForNextStatement(forNextStatement, data); |
||||
} |
||||
|
||||
public override object VisitForStatement(ForStatement forStatement, object data) |
||||
{ |
||||
return base.VisitForStatement(forStatement, data); |
||||
} |
||||
|
||||
public override object VisitGotoCaseStatement(GotoCaseStatement gotoCaseStatement, object data) |
||||
{ |
||||
return base.VisitGotoCaseStatement(gotoCaseStatement, data); |
||||
} |
||||
|
||||
public override object VisitGotoStatement(GotoStatement gotoStatement, object data) |
||||
{ |
||||
return base.VisitGotoStatement(gotoStatement, data); |
||||
} |
||||
|
||||
public override object VisitIdentifierExpression(IdentifierExpression identifierExpression, object data) |
||||
{ |
||||
WriteLine("VisitIdentifierExpression"); |
||||
return base.VisitIdentifierExpression(identifierExpression, data); |
||||
} |
||||
|
||||
public override object VisitIfElseStatement(IfElseStatement ifElseStatement, object data) |
||||
{ |
||||
return base.VisitIfElseStatement(ifElseStatement, data); |
||||
} |
||||
|
||||
public override object VisitIndexerExpression(IndexerExpression indexerExpression, object data) |
||||
{ |
||||
return base.VisitIndexerExpression(indexerExpression, data); |
||||
} |
||||
|
||||
public override object VisitInnerClassTypeReference(InnerClassTypeReference innerClassTypeReference, object data) |
||||
{ |
||||
return base.VisitInnerClassTypeReference(innerClassTypeReference, data); |
||||
} |
||||
|
||||
public override object VisitInterfaceImplementation(InterfaceImplementation interfaceImplementation, object data) |
||||
{ |
||||
return base.VisitInterfaceImplementation(interfaceImplementation, data); |
||||
} |
||||
|
||||
public override object VisitInvocationExpression(InvocationExpression invocationExpression, object data) |
||||
{ |
||||
return base.VisitInvocationExpression(invocationExpression, data); |
||||
} |
||||
|
||||
public override object VisitLabelStatement(LabelStatement labelStatement, object data) |
||||
{ |
||||
return base.VisitLabelStatement(labelStatement, data); |
||||
} |
||||
|
||||
public override object VisitLambdaExpression(LambdaExpression lambdaExpression, object data) |
||||
{ |
||||
return base.VisitLambdaExpression(lambdaExpression, data); |
||||
} |
||||
|
||||
public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data) |
||||
{ |
||||
WriteLine("VisitLocalVariableDeclaration"); |
||||
return base.VisitLocalVariableDeclaration(localVariableDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitLockStatement(LockStatement lockStatement, object data) |
||||
{ |
||||
return base.VisitLockStatement(lockStatement, data); |
||||
} |
||||
|
||||
public override object VisitMemberReferenceExpression(MemberReferenceExpression memberReferenceExpression, object data) |
||||
{ |
||||
WriteLine("VisitMemberReferenceExpression"); |
||||
return base.VisitMemberReferenceExpression(memberReferenceExpression, data); |
||||
} |
||||
|
||||
public override object VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data) |
||||
{ |
||||
WriteLine("VisitMethodDeclaration"); |
||||
using (IDisposable indentLevel = Indentation.IncrementLevel()) { |
||||
return base.VisitMethodDeclaration(methodDeclaration, data); |
||||
} |
||||
} |
||||
|
||||
public override object VisitNamedArgumentExpression(NamedArgumentExpression namedArgumentExpression, object data) |
||||
{ |
||||
return base.VisitNamedArgumentExpression(namedArgumentExpression, data); |
||||
} |
||||
|
||||
public override object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data) |
||||
{ |
||||
WriteLine("VisitNamespaceDeclaration"); |
||||
return base.VisitNamespaceDeclaration(namespaceDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitObjectCreateExpression(ObjectCreateExpression objectCreateExpression, object data) |
||||
{ |
||||
WriteLine("VisitObjectCreateExpression"); |
||||
return base.VisitObjectCreateExpression(objectCreateExpression, data); |
||||
} |
||||
|
||||
public override object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) |
||||
{ |
||||
return base.VisitOnErrorStatement(onErrorStatement, data); |
||||
} |
||||
|
||||
public override object VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration, object data) |
||||
{ |
||||
return base.VisitOperatorDeclaration(operatorDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitOptionDeclaration(OptionDeclaration optionDeclaration, object data) |
||||
{ |
||||
return base.VisitOptionDeclaration(optionDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitParameterDeclarationExpression(ParameterDeclarationExpression parameterDeclarationExpression, object data) |
||||
{ |
||||
return base.VisitParameterDeclarationExpression(parameterDeclarationExpression, data); |
||||
} |
||||
|
||||
public override object VisitParenthesizedExpression(ParenthesizedExpression parenthesizedExpression, object data) |
||||
{ |
||||
return base.VisitParenthesizedExpression(parenthesizedExpression, data); |
||||
} |
||||
|
||||
public override object VisitPointerReferenceExpression(PointerReferenceExpression pointerReferenceExpression, object data) |
||||
{ |
||||
return base.VisitPointerReferenceExpression(pointerReferenceExpression, data); |
||||
} |
||||
|
||||
public override object VisitPrimitiveExpression(PrimitiveExpression primitiveExpression, object data) |
||||
{ |
||||
return base.VisitPrimitiveExpression(primitiveExpression, data); |
||||
} |
||||
|
||||
public override object VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration, object data) |
||||
{ |
||||
return base.VisitPropertyDeclaration(propertyDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitPropertyGetRegion(PropertyGetRegion propertyGetRegion, object data) |
||||
{ |
||||
return base.VisitPropertyGetRegion(propertyGetRegion, data); |
||||
} |
||||
|
||||
public override object VisitPropertySetRegion(PropertySetRegion propertySetRegion, object data) |
||||
{ |
||||
return base.VisitPropertySetRegion(propertySetRegion, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpression(QueryExpression queryExpression, object data) |
||||
{ |
||||
return base.VisitQueryExpression(queryExpression, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionAggregateClause(QueryExpressionAggregateClause queryExpressionAggregateClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionAggregateClause(queryExpressionAggregateClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionDistinctClause(QueryExpressionDistinctClause queryExpressionDistinctClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionDistinctClause(queryExpressionDistinctClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionFromClause(QueryExpressionFromClause queryExpressionFromClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionFromClause(queryExpressionFromClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionGroupClause(QueryExpressionGroupClause queryExpressionGroupClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionGroupClause(queryExpressionGroupClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionGroupJoinVBClause(QueryExpressionGroupJoinVBClause queryExpressionGroupJoinVBClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionGroupJoinVBClause(queryExpressionGroupJoinVBClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionGroupVBClause(QueryExpressionGroupVBClause queryExpressionGroupVBClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionGroupVBClause(queryExpressionGroupVBClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionJoinClause(QueryExpressionJoinClause queryExpressionJoinClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionJoinClause(queryExpressionJoinClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionJoinConditionVB(QueryExpressionJoinConditionVB queryExpressionJoinConditionVB, object data) |
||||
{ |
||||
return base.VisitQueryExpressionJoinConditionVB(queryExpressionJoinConditionVB, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionJoinVBClause(QueryExpressionJoinVBClause queryExpressionJoinVBClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionJoinVBClause(queryExpressionJoinVBClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionLetClause(QueryExpressionLetClause queryExpressionLetClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionLetClause(queryExpressionLetClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionLetVBClause(QueryExpressionLetVBClause queryExpressionLetVBClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionLetVBClause(queryExpressionLetVBClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionOrderClause(QueryExpressionOrderClause queryExpressionOrderClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionOrderClause(queryExpressionOrderClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionOrdering(QueryExpressionOrdering queryExpressionOrdering, object data) |
||||
{ |
||||
return base.VisitQueryExpressionOrdering(queryExpressionOrdering, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionPartitionVBClause(QueryExpressionPartitionVBClause queryExpressionPartitionVBClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionPartitionVBClause(queryExpressionPartitionVBClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionSelectClause(QueryExpressionSelectClause queryExpressionSelectClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionSelectClause(queryExpressionSelectClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionSelectVBClause(QueryExpressionSelectVBClause queryExpressionSelectVBClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionSelectVBClause(queryExpressionSelectVBClause, data); |
||||
} |
||||
|
||||
public override object VisitQueryExpressionWhereClause(QueryExpressionWhereClause queryExpressionWhereClause, object data) |
||||
{ |
||||
return base.VisitQueryExpressionWhereClause(queryExpressionWhereClause, data); |
||||
} |
||||
|
||||
public override object VisitRaiseEventStatement(RaiseEventStatement raiseEventStatement, object data) |
||||
{ |
||||
return base.VisitRaiseEventStatement(raiseEventStatement, data); |
||||
} |
||||
|
||||
public override object VisitReDimStatement(ReDimStatement reDimStatement, object data) |
||||
{ |
||||
return base.VisitReDimStatement(reDimStatement, data); |
||||
} |
||||
|
||||
public override object VisitRemoveHandlerStatement(RemoveHandlerStatement removeHandlerStatement, object data) |
||||
{ |
||||
return base.VisitRemoveHandlerStatement(removeHandlerStatement, data); |
||||
} |
||||
|
||||
public override object VisitResumeStatement(ResumeStatement resumeStatement, object data) |
||||
{ |
||||
return base.VisitResumeStatement(resumeStatement, data); |
||||
} |
||||
|
||||
public override object VisitReturnStatement(ReturnStatement returnStatement, object data) |
||||
{ |
||||
return base.VisitReturnStatement(returnStatement, data); |
||||
} |
||||
|
||||
public override object VisitSizeOfExpression(SizeOfExpression sizeOfExpression, object data) |
||||
{ |
||||
return base.VisitSizeOfExpression(sizeOfExpression, data); |
||||
} |
||||
|
||||
public override object VisitStackAllocExpression(StackAllocExpression stackAllocExpression, object data) |
||||
{ |
||||
return base.VisitStackAllocExpression(stackAllocExpression, data); |
||||
} |
||||
|
||||
public override object VisitStopStatement(StopStatement stopStatement, object data) |
||||
{ |
||||
return base.VisitStopStatement(stopStatement, data); |
||||
} |
||||
|
||||
public override object VisitSwitchSection(SwitchSection switchSection, object data) |
||||
{ |
||||
return base.VisitSwitchSection(switchSection, data); |
||||
} |
||||
|
||||
public override object VisitSwitchStatement(SwitchStatement switchStatement, object data) |
||||
{ |
||||
return base.VisitSwitchStatement(switchStatement, data); |
||||
} |
||||
|
||||
public override object VisitTemplateDefinition(TemplateDefinition templateDefinition, object data) |
||||
{ |
||||
return base.VisitTemplateDefinition(templateDefinition, data); |
||||
} |
||||
|
||||
public override object VisitThisReferenceExpression(ThisReferenceExpression thisReferenceExpression, object data) |
||||
{ |
||||
WriteLine("VisitThisReferenceExpression"); |
||||
return base.VisitThisReferenceExpression(thisReferenceExpression, data); |
||||
} |
||||
|
||||
public override object VisitThrowStatement(ThrowStatement throwStatement, object data) |
||||
{ |
||||
return base.VisitThrowStatement(throwStatement, data); |
||||
} |
||||
|
||||
public override object VisitTryCatchStatement(TryCatchStatement tryCatchStatement, object data) |
||||
{ |
||||
return base.VisitTryCatchStatement(tryCatchStatement, data); |
||||
} |
||||
|
||||
public override object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data) |
||||
{ |
||||
WriteLine("VisitTypeDeclaration"); |
||||
using (IDisposable indentLevel = Indentation.IncrementLevel()) { |
||||
return base.VisitTypeDeclaration(typeDeclaration, data); |
||||
} |
||||
} |
||||
|
||||
public override object VisitTypeOfExpression(TypeOfExpression typeOfExpression, object data) |
||||
{ |
||||
return base.VisitTypeOfExpression(typeOfExpression, data); |
||||
} |
||||
|
||||
public override object VisitTypeOfIsExpression(TypeOfIsExpression typeOfIsExpression, object data) |
||||
{ |
||||
return base.VisitTypeOfIsExpression(typeOfIsExpression, data); |
||||
} |
||||
|
||||
public override object VisitTypeReference(TypeReference typeReference, object data) |
||||
{ |
||||
return base.VisitTypeReference(typeReference, data); |
||||
} |
||||
|
||||
public override object VisitTypeReferenceExpression(TypeReferenceExpression typeReferenceExpression, object data) |
||||
{ |
||||
return base.VisitTypeReferenceExpression(typeReferenceExpression, data); |
||||
} |
||||
|
||||
public override object VisitUnaryOperatorExpression(UnaryOperatorExpression unaryOperatorExpression, object data) |
||||
{ |
||||
return base.VisitUnaryOperatorExpression(unaryOperatorExpression, data); |
||||
} |
||||
|
||||
public override object VisitUncheckedExpression(UncheckedExpression uncheckedExpression, object data) |
||||
{ |
||||
return base.VisitUncheckedExpression(uncheckedExpression, data); |
||||
} |
||||
|
||||
public override object VisitUncheckedStatement(UncheckedStatement uncheckedStatement, object data) |
||||
{ |
||||
return base.VisitUncheckedStatement(uncheckedStatement, data); |
||||
} |
||||
|
||||
public override object VisitUnsafeStatement(UnsafeStatement unsafeStatement, object data) |
||||
{ |
||||
return base.VisitUnsafeStatement(unsafeStatement, data); |
||||
} |
||||
|
||||
public override object VisitUsing(Using @using, object data) |
||||
{ |
||||
WriteLine("VisitUsing"); |
||||
return base.VisitUsing(@using, data); |
||||
} |
||||
|
||||
public override object VisitUsingDeclaration(UsingDeclaration usingDeclaration, object data) |
||||
{ |
||||
WriteLine("VisitUsingDeclaration"); |
||||
return base.VisitUsingDeclaration(usingDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitUsingStatement(UsingStatement usingStatement, object data) |
||||
{ |
||||
WriteLine("VisitUsingStatement"); |
||||
return base.VisitUsingStatement(usingStatement, data); |
||||
} |
||||
|
||||
public override object VisitVariableDeclaration(VariableDeclaration variableDeclaration, object data) |
||||
{ |
||||
WriteLine("VisitVariableDeclaration"); |
||||
return base.VisitVariableDeclaration(variableDeclaration, data); |
||||
} |
||||
|
||||
public override object VisitWithStatement(WithStatement withStatement, object data) |
||||
{ |
||||
return base.VisitWithStatement(withStatement, data); |
||||
} |
||||
|
||||
public override object VisitYieldStatement(YieldStatement yieldStatement, object data) |
||||
{ |
||||
return base.VisitYieldStatement(yieldStatement, data); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Writes a line and indents it to the current level.
|
||||
/// </summary>
|
||||
void WriteLine(string s) |
||||
{ |
||||
writer.WriteLine(GetIndent() + s); |
||||
} |
||||
|
||||
string GetIndent() |
||||
{ |
||||
StringBuilder indent = new StringBuilder(); |
||||
for (int i = 0; i < Indentation.CurrentLevel; ++i) { |
||||
indent.Append('\t'); |
||||
} |
||||
return indent.ToString(); |
||||
} |
||||
} |
||||
} |
@ -1,41 +0,0 @@
@@ -1,41 +0,0 @@
|
||||
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
using System.Windows.Forms; |
||||
|
||||
namespace PyWalker |
||||
{ |
||||
/// <summary>
|
||||
/// Class with program entry point.
|
||||
/// </summary>
|
||||
internal sealed class Program |
||||
{ |
||||
/// <summary>
|
||||
/// Program entry point.
|
||||
/// </summary>
|
||||
[STAThread] |
||||
private static void Main(string[] args) |
||||
{ |
||||
Application.EnableVisualStyles(); |
||||
Application.SetCompatibleTextRenderingDefault(false); |
||||
Application.Run(new MainForm()); |
||||
} |
||||
|
||||
} |
||||
} |
@ -1,84 +0,0 @@
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> |
||||
<PropertyGroup> |
||||
<ProjectGuid>{55329704-6046-48EC-8A20-5C80B3092A63}</ProjectGuid> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
<OutputType>WinExe</OutputType> |
||||
<RootNamespace>PyWalker</RootNamespace> |
||||
<AssemblyName>PyWalker</AssemblyName> |
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
||||
<NoStdLib>False</NoStdLib> |
||||
<WarningLevel>4</WarningLevel> |
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||
<OutputPath>bin\Debug\</OutputPath> |
||||
<DebugSymbols>true</DebugSymbols> |
||||
<DebugType>Full</DebugType> |
||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> |
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||
<StartAction>Project</StartAction> |
||||
<Optimize>False</Optimize> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||
<OutputPath>bin\Release\</OutputPath> |
||||
<DebugSymbols>False</DebugSymbols> |
||||
<DebugType>None</DebugType> |
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> |
||||
<DefineConstants>TRACE</DefineConstants> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> |
||||
<RegisterForComInterop>False</RegisterForComInterop> |
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> |
||||
<BaseAddress>4194304</BaseAddress> |
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
<FileAlignment>4096</FileAlignment> |
||||
</PropertyGroup> |
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> |
||||
<ItemGroup> |
||||
<Reference Include="IronPython"> |
||||
<HintPath>..\RequiredLibraries\IronPython.dll</HintPath> |
||||
</Reference> |
||||
<Reference Include="IronPython.Modules"> |
||||
<HintPath>..\RequiredLibraries\IronPython.Modules.dll</HintPath> |
||||
</Reference> |
||||
<Reference Include="Microsoft.Dynamic"> |
||||
<HintPath>..\RequiredLibraries\Microsoft.Dynamic.dll</HintPath> |
||||
</Reference> |
||||
<Reference Include="Microsoft.Scripting"> |
||||
<HintPath>..\RequiredLibraries\Microsoft.Scripting.dll</HintPath> |
||||
</Reference> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.Data" /> |
||||
<Reference Include="System.Drawing" /> |
||||
<Reference Include="System.Windows.Forms" /> |
||||
<Reference Include="System.Xml" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Compile Include="AssemblyInfo.cs" /> |
||||
<Compile Include="CodeDomVisitor.cs" /> |
||||
<Compile Include="Indentation.cs" /> |
||||
<Compile Include="MainForm.cs" /> |
||||
<Compile Include="MainForm.Designer.cs"> |
||||
<DependentUpon>MainForm.cs</DependentUpon> |
||||
</Compile> |
||||
<Compile Include="NRefactoryAstVisitor.cs" /> |
||||
<Compile Include="Program.cs" /> |
||||
<Compile Include="ResolveWalker.cs" /> |
||||
<EmbeddedResource Include="MainForm.resx"> |
||||
<DependentUpon>MainForm.cs</DependentUpon> |
||||
</EmbeddedResource> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\Project\NRefactory.csproj"> |
||||
<Project>{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}</Project> |
||||
<Name>NRefactory</Name> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\PythonBinding\Project\PythonBinding.csproj"> |
||||
<Project>{8D732610-8FC6-43BA-94C9-7126FD7FE361}</Project> |
||||
<Name>PythonBinding</Name> |
||||
</ProjectReference> |
||||
</ItemGroup> |
||||
</Project> |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue