├── .gitignore ├── HandyPyditor ├── HandyPyditor.sln ├── HandyPyditor │ ├── Control │ │ ├── Browserwrapper.cs │ │ ├── IBrowser.cs │ │ ├── InfoTipCtl.xaml │ │ ├── InfoTipCtl.xaml.cs │ │ ├── MethodInfoCtl.xaml │ │ ├── MethodInfoCtl.xaml.cs │ │ ├── VariableInfoCtl.xaml │ │ └── VariableInfoCtl.xaml.cs │ ├── Data │ │ ├── Config │ │ │ ├── CustomConfig.cs │ │ │ ├── EditorConfig.cs │ │ │ ├── TokenConfig.cs │ │ │ └── VariableConfig.cs │ │ ├── EditorUiInfo.cs │ │ ├── MessageToken.cs │ │ └── Model │ │ │ ├── SaveInfoModel.cs │ │ │ └── TokenClassModel.cs │ ├── HandyPyditor.csproj │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Langs │ │ │ ├── Lang.Designer.cs │ │ │ └── Lang.resx │ ├── Pyditor.xaml │ ├── Pyditor.xaml.cs │ ├── Resources │ │ └── Img │ │ │ ├── Action_16x.png │ │ │ ├── AddFolder_16x.png │ │ │ ├── BreakpointEnable_16x.png │ │ │ ├── ClearWindowContent_16x.png │ │ │ ├── CloseSolution_16x.png │ │ │ ├── CollapseGroup_16x.png │ │ │ ├── CommentCode_16x.png │ │ │ ├── Copy_16x.png │ │ │ ├── CurrentStack_16x.png │ │ │ ├── Cut_16x.png │ │ │ ├── Paste_16x.png │ │ │ ├── QuickFind_16x.png │ │ │ ├── QuickReplace_16x.png │ │ │ ├── Refresh_16x.png │ │ │ ├── Rename_16x.png │ │ │ ├── Run_16x.png │ │ │ ├── Script_16x.png │ │ │ ├── StatusHelp_16x.png │ │ │ ├── StepIn_16x.png │ │ │ ├── StepOut_16x.png │ │ │ ├── StepOver_16x.png │ │ │ ├── UncommentCode_16x.png │ │ │ └── icon-delete.png │ ├── Themes │ │ ├── Basic │ │ │ ├── Basic.xaml │ │ │ └── Geometries.xaml │ │ ├── Styles │ │ │ └── Style.xaml │ │ └── Theme.xaml │ ├── Tools │ │ ├── FileHelper.cs │ │ └── Win32.cs │ ├── Window │ │ ├── AddMethodWindow.xaml │ │ ├── AddMethodWindow.xaml.cs │ │ ├── AddVariableIndexWindow.xaml │ │ ├── AddVariableIndexWindow.xaml.cs │ │ ├── Config │ │ │ ├── ConfigWindow.cs │ │ │ ├── CustomConfigWindow.xaml │ │ │ ├── CustomConfigWindow.xaml.cs │ │ │ ├── SnippetConfigWindow.xaml │ │ │ ├── SnippetConfigWindow.xaml.cs │ │ │ ├── TooltipConfigWindow.xaml │ │ │ ├── TooltipConfigWindow.xaml.cs │ │ │ ├── VariableConfigWindow.xaml │ │ │ └── VariableConfigWindow.xaml.cs │ │ ├── DebugTutorialWindow.xaml │ │ ├── DebugTutorialWindow.xaml.cs │ │ ├── MethodInfoWindow.xaml │ │ ├── MethodInfoWindow.xaml.cs │ │ ├── NewFileWindow.xaml │ │ └── NewFileWindow.xaml.cs │ ├── bin │ │ └── Debug │ │ │ └── components │ │ │ └── python │ │ │ └── Python.Runtime.dll │ └── packages.config └── HandyPyditorDemo │ ├── App.xaml │ ├── App.xaml.cs │ ├── HandyPyditorDemo.csproj │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── bin │ └── Debug │ │ └── components │ │ ├── editor │ │ ├── editor.html │ │ ├── js │ │ │ ├── FileSaver.js │ │ │ ├── ace.js │ │ │ ├── config.js │ │ │ ├── ext-language_tools.js │ │ │ ├── ext-modelist.js │ │ │ ├── ext-searchbox.js │ │ │ ├── file_drop.js │ │ │ ├── init.js │ │ │ ├── mode-python.js │ │ │ ├── mode-snippets.js │ │ │ ├── snippets │ │ │ │ ├── python.js │ │ │ │ └── snippets.js │ │ │ ├── sweetalert2.min.js │ │ │ ├── temp.js │ │ │ ├── theme-kuroir.js │ │ │ ├── theme-xcode.js │ │ │ ├── tippy.js │ │ │ └── token_tooltip.js │ │ ├── resources │ │ │ ├── css │ │ │ │ ├── editor.css │ │ │ │ ├── sweetalert2.min.css │ │ │ │ └── tippy.css │ │ │ └── pdb.pdf │ │ └── snippet.html │ │ └── python │ │ ├── Python.Runtime.dll │ │ ├── _asyncio.pyd │ │ ├── _bz2.pyd │ │ ├── _ctypes.pyd │ │ ├── _decimal.pyd │ │ ├── _distutils_findvs.pyd │ │ ├── _elementtree.pyd │ │ ├── _hashlib.pyd │ │ ├── _lzma.pyd │ │ ├── _msi.pyd │ │ ├── _multiprocessing.pyd │ │ ├── _overlapped.pyd │ │ ├── _socket.pyd │ │ ├── _sqlite3.pyd │ │ ├── _ssl.pyd │ │ ├── pycodestyle.py │ │ ├── pyexpat.pyd │ │ ├── python.exe │ │ ├── python3.dll │ │ ├── python36._pth │ │ ├── python36.dll │ │ ├── python36.zip │ │ ├── pythonw.exe │ │ ├── select.pyd │ │ ├── sqlite3.dll │ │ ├── unicodedata.pyd │ │ ├── vcruntime140.dll │ │ ├── winsound.pyd │ │ └── yapf │ │ ├── __init__.py │ │ ├── __main__.py │ │ └── yapflib │ │ ├── __init__.py │ │ ├── blank_line_calculator.py │ │ ├── comment_splicer.py │ │ ├── continuation_splicer.py │ │ ├── errors.py │ │ ├── file_resources.py │ │ ├── format_decision_state.py │ │ ├── format_token.py │ │ ├── identify_container.py │ │ ├── line_joiner.py │ │ ├── object_state.py │ │ ├── py3compat.py │ │ ├── pytree_unwrapper.py │ │ ├── pytree_utils.py │ │ ├── pytree_visitor.py │ │ ├── reformatter.py │ │ ├── split_penalty.py │ │ ├── style.py │ │ ├── subtype_assigner.py │ │ ├── unwrapped_line.py │ │ ├── verifier.py │ │ └── yapf_api.py │ └── packages.config ├── LICENSE ├── README.md └── Resources └── Overview.png /.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | *.user 3 | **/[Bb]in/Debug/* 4 | !**/[Bb]in/Debug/components 5 | [Oo]bj/ 6 | packages/ -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29009.5 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandyPyditor", "HandyPyditor\HandyPyditor.csproj", "{AD240434-A8F7-40C6-93EA-D548501D7BFD}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandyPyditorDemo", "HandyPyditorDemo\HandyPyditorDemo.csproj", "{B1F29164-0DAC-4255-9388-F7C8E3B23CEA}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {AD240434-A8F7-40C6-93EA-D548501D7BFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {AD240434-A8F7-40C6-93EA-D548501D7BFD}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {AD240434-A8F7-40C6-93EA-D548501D7BFD}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {AD240434-A8F7-40C6-93EA-D548501D7BFD}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {B1F29164-0DAC-4255-9388-F7C8E3B23CEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {B1F29164-0DAC-4255-9388-F7C8E3B23CEA}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {B1F29164-0DAC-4255-9388-F7C8E3B23CEA}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {B1F29164-0DAC-4255-9388-F7C8E3B23CEA}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {194E8721-9A03-402F-BA20-6AE762A5B038} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Control/Browserwrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Toolkit.Wpf.UI.Controls; 3 | 4 | namespace HandyPyditor.Control 5 | { 6 | public class BrowserWrapper : IBrowser 7 | { 8 | private readonly WebView _webView; 9 | 10 | public BrowserWrapper(WebView webView) 11 | { 12 | _webView = webView; 13 | } 14 | 15 | public void ExecuteJavascript(string scriptName, params string[] args) 16 | { 17 | _webView.InvokeScript(scriptName, args); 18 | } 19 | 20 | public void EvaluateJavascript(string scriptName, Action callback, params string[] args) 21 | { 22 | try 23 | { 24 | var value = _webView.InvokeScript(scriptName, args); 25 | callback.Invoke(value, null); 26 | } 27 | catch (Exception e) 28 | { 29 | callback.Invoke(null, e); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Control/IBrowser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace HandyPyditor.Control 4 | { 5 | public interface IBrowser 6 | { 7 | void ExecuteJavascript(string scriptName, params string[] args); 8 | 9 | void EvaluateJavascript(string scriptName, Action callback, params string[] args); 10 | } 11 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Control/InfoTipCtl.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Control/InfoTipCtl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Control 2 | { 3 | public partial class InfoTipCtl 4 | { 5 | public InfoTipCtl() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Control/MethodInfoCtl.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Control/MethodInfoCtl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Control 2 | { 3 | public partial class MethodInfoCtl 4 | { 5 | public MethodInfoCtl() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Control/VariableInfoCtl.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Control/VariableInfoCtl.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Control 2 | { 3 | public partial class VariableInfoCtl 4 | { 5 | public VariableInfoCtl() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Data/Config/CustomConfig.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace HandyPyditor.Data 4 | { 5 | /// 6 | /// 用户自定义配置 7 | /// 8 | public class CustomConfig 9 | { 10 | [JsonProperty(PropertyName = "fontSize")] 11 | public int FontSize { get; set; } = 12; 12 | 13 | [JsonProperty(PropertyName = "fontFamily")] 14 | public string FontFamily { get; set; } = "Consolas"; 15 | 16 | [JsonProperty(PropertyName = "themeName")] 17 | public string ThemeName { get; set; } = "xcode"; 18 | 19 | [JsonProperty(PropertyName = "powerMode")] 20 | public bool PowerMode { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Data/Config/EditorConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | using GalaSoft.MvvmLight.Messaging; 6 | using HandyControl.Controls; 7 | using Newtonsoft.Json; 8 | 9 | namespace HandyPyditor.Data 10 | { 11 | /// 12 | /// 编辑器配置 13 | /// 14 | public class EditorConfig 15 | { 16 | [JsonIgnore] 17 | private readonly string _configPath = $"{AppDomain.CurrentDomain.BaseDirectory}components\\editor\\js\\config.js"; 18 | 19 | [JsonProperty(PropertyName = "variableJson")] 20 | public Dictionary>> VariableJson { get; set; } 21 | 22 | [JsonProperty(PropertyName = "tokenJson")] 23 | public TokenConfig TokenJson { get; set; } 24 | 25 | [JsonProperty(PropertyName = "builtinFunctions")] 26 | public string BuiltinFunctions { get; set; } 27 | 28 | [JsonProperty(PropertyName = "snippetText")] 29 | public string SnippetText { get; set; } 30 | 31 | [JsonProperty(PropertyName = "customJson")] 32 | public CustomConfig CustomJson { get; set; } = new CustomConfig(); 33 | 34 | public string WorkGroundPath { get; set; } 35 | 36 | public bool Save() 37 | { 38 | try 39 | { 40 | var json = new StringBuilder(JsonConvert.SerializeObject(this)); 41 | json.Insert(0, "var editorConfig = "); 42 | var jsonStr = json.ToString(); 43 | return Save(ref jsonStr); 44 | } 45 | catch (Exception e) 46 | { 47 | PopupWindow.ShowDialog(e.Message); 48 | return false; 49 | } 50 | } 51 | 52 | public bool Save(ref string info) 53 | { 54 | try 55 | { 56 | using (var sw = new StreamWriter(_configPath)) 57 | { 58 | sw.Write(info); 59 | } 60 | 61 | return true; 62 | } 63 | catch (Exception e) 64 | { 65 | PopupWindow.ShowDialog(e.Message); 66 | return false; 67 | } 68 | } 69 | 70 | /// 71 | /// 更新 72 | /// 73 | public void Update() 74 | { 75 | if (File.Exists(_configPath)) 76 | { 77 | try 78 | { 79 | var json = File.ReadAllText(_configPath); 80 | var symbolIndex = json.IndexOf('{'); 81 | json = json.Substring(symbolIndex, json.Length - symbolIndex); 82 | var config = JsonConvert.DeserializeObject(json); 83 | 84 | Update(config); 85 | } 86 | catch 87 | { 88 | Update(new EditorConfig()); 89 | } 90 | } 91 | else 92 | { 93 | Update(new EditorConfig()); 94 | } 95 | 96 | Messenger.Default.Send(null, MessageToken.LoadUrl); 97 | } 98 | 99 | private void Update(EditorConfig config) 100 | { 101 | VariableJson = config.VariableJson; 102 | TokenJson = config.TokenJson; 103 | BuiltinFunctions = config.BuiltinFunctions; 104 | SnippetText = config.SnippetText; 105 | CustomJson = config.CustomJson ?? new CustomConfig(); 106 | WorkGroundPath = config.WorkGroundPath; 107 | } 108 | } 109 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Data/Config/TokenConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace HandyPyditor.Data 5 | { 6 | /// 7 | /// 标记配置 8 | /// 9 | public class TokenConfig 10 | { 11 | [JsonProperty(PropertyName = "classTokens")] 12 | public Dictionary ClassTokens { get; set; } 13 | 14 | [JsonProperty(PropertyName = "methodTokens")] 15 | public Dictionary MethodTokens { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Data/Config/VariableConfig.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace HandyPyditor.Data 4 | { 5 | /// 6 | /// 变量配置窗口 7 | /// 8 | public class VariableConfig 9 | { 10 | [JsonProperty(PropertyName = "value")] 11 | public string Value { get; set; } 12 | 13 | [JsonProperty(PropertyName = "caption")] 14 | public string Caption { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Data/EditorUiInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using System.Windows.Controls.Primitives; 3 | using HandyPyditor.Control; 4 | 5 | namespace HandyPyditor.Data 6 | { 7 | public class EditorUiInfo 8 | { 9 | public ColumnDefinition DefinitionWork { get; set; } 10 | 11 | public ColumnDefinition DefinitionScript { get; set; } 12 | 13 | public RowDefinition DefinitionDebug { get; set; } 14 | 15 | public GridSplitter SplitterWork { get; set; } 16 | 17 | public IBrowser Browser { get; set; } 18 | 19 | public TreeView TreeViewWork { get; set; } 20 | 21 | public Popup PopupMenu { get; set; } 22 | 23 | public Grid GridMain { get; set; } 24 | 25 | public TextBox TextBoxDebug { get; set; } 26 | } 27 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Data/MessageToken.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Data 2 | { 3 | internal class MessageToken 4 | { 5 | public const string AppendDebugText = nameof(AppendDebugText); 6 | 7 | public const string SwitchDebuggingStatus = nameof(SwitchDebuggingStatus); 8 | 9 | public const string RefreshAllWorkItems = nameof(RefreshAllWorkItems); 10 | 11 | public const string SelectWorkItem = nameof(SelectWorkItem); 12 | 13 | public const string LoadUrl = nameof(LoadUrl); 14 | 15 | public const string UpdateScriptName = nameof(UpdateScriptName); 16 | } 17 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Data/Model/SaveInfoModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Windows; 4 | using Newtonsoft.Json; 5 | using MessageBox = HandyControl.Controls.MessageBox; 6 | 7 | namespace HandyPyditor.Data 8 | { 9 | public class SaveInfoModel 10 | { 11 | [JsonIgnore] 12 | private static readonly string _saveInfoPath = $"{AppDomain.CurrentDomain.BaseDirectory}components\\editor\\js\\saveInfo.js"; 13 | 14 | [JsonProperty(PropertyName = "code")] 15 | public string Code { get; set; } 16 | 17 | [JsonProperty(PropertyName = "cursorPos")] 18 | public Point CursorPos { get; set; } 19 | 20 | [JsonProperty(PropertyName = "path")] 21 | public string Path { get; set; } 22 | 23 | [JsonProperty(PropertyName = "selected")] 24 | public string Selected { get; set; } 25 | 26 | [JsonProperty(PropertyName = "title")] 27 | public string Title { get; set; } 28 | 29 | public static bool Save(ref string info) 30 | { 31 | try 32 | { 33 | File.WriteAllText(_saveInfoPath, info); 34 | return true; 35 | } 36 | catch (Exception e) 37 | { 38 | MessageBox.Show(e.Message); 39 | return false; 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Data/Model/TokenClassModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace HandyPyditor.Data 4 | { 5 | public class TokenClassModel 6 | { 7 | public string ClassName { get; set; } 8 | 9 | public string ClassCaption { get; set; } 10 | 11 | public Dictionary MethodDic { get; set; } = new Dictionary(); 12 | } 13 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | using System.Windows.Markup; 4 | 5 | [assembly: AssemblyTitle("HandyPyditor")] 6 | [assembly: AssemblyDescription("a simple editor for python")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("HandyPyditor")] 10 | [assembly: AssemblyCopyright("Copyright © HandyOrg 2019")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: ComVisible(false)] 14 | [assembly: AssemblyVersion("1.0.0.0")] 15 | [assembly: AssemblyFileVersion("1.0.0.0")] 16 | 17 | [assembly: XmlnsDefinition("https://handyorg.github.io/handypyditor", "HandyPyditor")] -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Properties/Langs/Lang.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace HandyPyditor.Properties.Langs { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | public class Lang { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Lang() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | public static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HandyPyditor.Properties.Langs.Lang", typeof(Lang).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 重写当前线程的 CurrentUICulture 属性 51 | /// 重写当前线程的 CurrentUICulture 属性。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | public static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// 查找类似 未保存 的本地化字符串。 65 | /// 66 | public static string FileUnsaved { 67 | get { 68 | return ResourceManager.GetString("FileUnsaved", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// 查找类似 脚本已打开 的本地化字符串。 74 | /// 75 | public static string ScriptIsOpen { 76 | get { 77 | return ResourceManager.GetString("ScriptIsOpen", resourceCulture); 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Properties/Langs/Lang.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | text/microsoft-resx 90 | 91 | 92 | 1.3 93 | 94 | 95 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 96 | 97 | 98 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 99 | 100 | 101 | 未保存 102 | 103 | 104 | 脚本已打开 105 | 106 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Pyditor.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Pyditor.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor 2 | { 3 | public partial class Pyditor 4 | { 5 | public Pyditor() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/Action_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/Action_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/AddFolder_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/AddFolder_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/BreakpointEnable_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/BreakpointEnable_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/ClearWindowContent_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/ClearWindowContent_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/CloseSolution_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/CloseSolution_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/CollapseGroup_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/CollapseGroup_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/CommentCode_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/CommentCode_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/Copy_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/Copy_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/CurrentStack_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/CurrentStack_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/Cut_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/Cut_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/Paste_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/Paste_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/QuickFind_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/QuickFind_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/QuickReplace_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/QuickReplace_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/Refresh_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/Refresh_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/Rename_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/Rename_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/Run_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/Run_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/Script_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/Script_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/StatusHelp_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/StatusHelp_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/StepIn_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/StepIn_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/StepOut_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/StepOut_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/StepOver_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/StepOver_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/UncommentCode_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/UncommentCode_16x.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Resources/Img/icon-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/Resources/Img/icon-delete.png -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Themes/Basic/Basic.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Themes/Basic/Geometries.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | M4.0050012,0 L35.539321,0 2.8421709E-13,35.539322 2.8421709E-13,3.9999995 C-8.240421E-07,1.7908621 1.7931001,1.01382E-06 4.0050012,0 z 5 | M169.002 406.318c-57.562 0-104.228 46.646-104.228 104.228 0 57.563 46.666 104.209 104.228 104.209s104.228-46.646 104.228-104.209c0-57.582-46.667-104.228-104.228-104.228zM501.431 406.318c-57.562 0-104.228 46.646-104.228 104.228 0 57.563 46.667 104.209 104.228 104.209s104.228-46.646 104.228-104.209c0-57.582-46.666-104.228-104.228-104.228zM854.638 406.318c-57.563 0-104.23 46.646-104.23 104.228 0 57.563 46.667 104.209 104.23 104.209s104.228-46.646 104.228-104.209c-0.001-57.582-46.666-104.228-104.228-104.228z 6 | M230.976 244.032q0-46.016 28.032-62.976t68.032 6.976l481.984 281.024q40 22.976 40 56t-40 57.024L327.04 863.104q-40 22.976-68.032 6.528t-28.032-63.488V244.16z 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Themes/Styles/Style.xaml: -------------------------------------------------------------------------------- 1 |  3 | 4 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Themes/Theme.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Tools/FileHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Windows; 7 | using GalaSoft.MvvmLight.Messaging; 8 | using HandyPyditor.Data; 9 | using Microsoft.Win32; 10 | using Python.Runtime; 11 | using MessageBox = HandyControl.Controls.MessageBox; 12 | 13 | namespace HandyPyditor.Tools 14 | { 15 | /// 16 | /// 编辑器文件帮助类 17 | /// 18 | internal class FileHelper 19 | { 20 | private const string FormatModuleName = "yapf.yapflib.yapf_api"; 21 | 22 | public FileSystemWatcher FileSystemWatcher { get; } = new FileSystemWatcher { Filter = "*.py" }; 23 | 24 | private readonly EditorUiInfo _editorUiInfo; 25 | 26 | public Dictionary FileNameDic { get; set; } = new Dictionary(); 27 | 28 | public FileHelper(EditorUiInfo editorUiInfo) 29 | { 30 | _editorUiInfo = editorUiInfo; 31 | FileSystemWatcher.Created += FileSystemWatcher_Created; 32 | } 33 | 34 | /// 35 | /// 当在指定的目录发现了新的脚本文件时触发 36 | /// 37 | /// 38 | /// 39 | private void FileSystemWatcher_Created(object sender, FileSystemEventArgs e) 40 | { 41 | Application.Current.Dispatcher.BeginInvoke(new Action(() => 42 | { 43 | FileSystemWatcher.EnableRaisingEvents = false; 44 | Messenger.Default.Send(null, MessageToken.RefreshAllWorkItems); 45 | Messenger.Default.Send(e.FullPath, MessageToken.SelectWorkItem); 46 | })); 47 | } 48 | 49 | /// 50 | /// 格式化代码 51 | /// 52 | /// 53 | public void FormatCode(ref string code) 54 | { 55 | using (Py.GIL()) 56 | { 57 | dynamic api = Py.Import(FormatModuleName); 58 | 59 | try 60 | { 61 | var str = api.FormatCode(code).ToString(); 62 | var s = new StringBuilder(str); 63 | var index = str.LastIndexOf('\''); 64 | s.Remove(index, str.Length - index); 65 | s.Remove(0, 2); 66 | _editorUiInfo.Browser.ExecuteJavascript("setCode", s.ToString()); 67 | } 68 | catch (Exception e) 69 | { 70 | Messenger.Default.Send(e.Message, MessageToken.AppendDebugText); 71 | } 72 | } 73 | } 74 | 75 | /// 76 | /// 保存代码 77 | /// 78 | /// 79 | /// 80 | /// 81 | /// 考虑到一个脚本中一般含有较多的字符,所以使用ref避免字符串作参时的值拷贝 82 | public string SaveCode(string savePath, string activeTabName, ref string code) 83 | { 84 | if (!File.Exists(savePath)) 85 | { 86 | var saveFileDialog = new SaveFileDialog 87 | { 88 | Filter = "Python files|*.py", 89 | FilterIndex = 2, 90 | RestoreDirectory = true, 91 | FileName = "Untitled-1.py" 92 | }; 93 | 94 | if (saveFileDialog.ShowDialog() == true) 95 | { 96 | savePath = saveFileDialog.FileName; 97 | 98 | Messenger.Default.Send(savePath, MessageToken.UpdateScriptName); 99 | FileNameDic[activeTabName] = saveFileDialog.FileName; 100 | var path = saveFileDialog.FileName.Replace('\\', '/'); 101 | _editorUiInfo.Browser.ExecuteJavascript("setFileInfo", activeTabName, path, Path.GetFileName(saveFileDialog.FileName)); 102 | 103 | FileSystemWatcher.Path = Path.GetDirectoryName(saveFileDialog.FileName); 104 | FileSystemWatcher.EnableRaisingEvents = true; 105 | } 106 | else 107 | { 108 | return string.Empty; 109 | } 110 | } 111 | try 112 | { 113 | using (var sw = new StreamWriter(savePath)) 114 | { 115 | sw.Write(code); 116 | } 117 | 118 | return savePath; 119 | } 120 | catch (Exception e) 121 | { 122 | Messenger.Default.Send(e.Message, MessageToken.AppendDebugText); 123 | return string.Empty; 124 | } 125 | } 126 | 127 | /// 128 | /// 打开文件 129 | /// 130 | public void OpenFile() 131 | { 132 | var openFileDialog = new OpenFileDialog 133 | { 134 | Filter = "Python files|*.py", 135 | RestoreDirectory = true 136 | }; 137 | 138 | if (openFileDialog.ShowDialog() == true) 139 | { 140 | OpenFile(openFileDialog.FileName); 141 | } 142 | } 143 | 144 | /// 145 | /// 打开文件 146 | /// 147 | public void OpenFile(string fileName) 148 | { 149 | foreach (var info in FileNameDic) 150 | { 151 | if (info.Value.Equals(fileName)) 152 | { 153 | _editorUiInfo.Browser.ExecuteJavascript("jumpToTab", info.Key); 154 | return; 155 | } 156 | } 157 | var code = File.ReadAllText(fileName); 158 | var path = fileName.Replace('\\', '/'); 159 | _editorUiInfo.Browser.ExecuteJavascript("openFile", Path.GetFileName(fileName), path, code); 160 | } 161 | 162 | /// 163 | /// 代码另存为 164 | /// 165 | public void CodeSaveAs(string activeTabName, ref string code) 166 | { 167 | var saveFileDialog = new SaveFileDialog 168 | { 169 | Filter = "Python files|*.py", 170 | FilterIndex = 2, 171 | RestoreDirectory = true, 172 | FileName = "Untitled-1.py" 173 | }; 174 | 175 | if (saveFileDialog.ShowDialog() == true) 176 | { 177 | FileSystemWatcher.Path = Path.GetDirectoryName(saveFileDialog.FileName); 178 | FileSystemWatcher.EnableRaisingEvents = true; 179 | 180 | if (FileNameDic.Values.Contains(saveFileDialog.FileName)) 181 | { 182 | MessageBox.Show(Properties.Langs.Lang.ScriptIsOpen); 183 | return; 184 | } 185 | 186 | using (var sw = new StreamWriter(saveFileDialog.FileName)) 187 | { 188 | sw.Write(code); 189 | Messenger.Default.Send(saveFileDialog.FileName, MessageToken.UpdateScriptName); 190 | 191 | FileNameDic[activeTabName] = saveFileDialog.FileName; 192 | var path = saveFileDialog.FileName.Replace('\\', '/'); 193 | _editorUiInfo.Browser.ExecuteJavascript("setFileInfo", activeTabName, path, Path.GetFileName(saveFileDialog.FileName)); 194 | } 195 | } 196 | } 197 | 198 | /// 199 | /// 关闭前保存 200 | /// 201 | public void SaveBeforeClose(string savePath) 202 | { 203 | _editorUiInfo.Browser.EvaluateJavascript("getSaveInfo", (value, exception) => 204 | { 205 | if (value == null) return; 206 | SaveInfoModel.Save(ref value); 207 | }); 208 | if (!string.IsNullOrEmpty(savePath) && File.Exists(savePath)) 209 | { 210 | _editorUiInfo.Browser.EvaluateJavascript("getCode", (value, exception) => 211 | { 212 | if (value == null || !File.Exists(savePath)) return; 213 | using (var sw = new StreamWriter(savePath)) 214 | { 215 | sw.Write(value); 216 | } 217 | }); 218 | } 219 | } 220 | } 221 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Tools/Win32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace HandyPyditor.Tools 5 | { 6 | public class Win32 7 | { 8 | public struct Point 9 | { 10 | public int X; 11 | 12 | public int Y; 13 | 14 | public Point(int x, int y) 15 | { 16 | X = x; 17 | Y = y; 18 | } 19 | } 20 | 21 | /// 22 | /// 获取鼠标的坐标 23 | /// 24 | [DllImport("user32.dll", CharSet = CharSet.Auto)] 25 | public static extern bool GetCursorPos(out Point point); 26 | 27 | [DllImport("kernel32.dll")] 28 | public static extern bool GenerateConsoleCtrlEvent(int dwCtrlEvent, int dwProcessGroupId); 29 | 30 | [DllImport("kernel32.dll")] 31 | public static extern bool SetConsoleCtrlHandler(IntPtr handlerRoutine, bool add); 32 | 33 | [DllImport("kernel32.dll")] 34 | public static extern bool AttachConsole(int dwProcessId); 35 | } 36 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/AddMethodWindow.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/AddMethodWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class AddMethodWindow 4 | { 5 | public AddMethodWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/AddVariableIndexWindow.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/AddVariableIndexWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class AddVariableIndexWindow 4 | { 5 | public AddVariableIndexWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/ConfigWindow.cs: -------------------------------------------------------------------------------- 1 | using HandyPyditor.Data; 2 | 3 | namespace HandyPyditor.Window 4 | { 5 | public class ConfigWindow : HandyControl.Controls.Window 6 | { 7 | protected EditorConfig _editorConfig; 8 | 9 | public ConfigWindow(EditorConfig config) 10 | { 11 | _editorConfig = config; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/CustomConfigWindow.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/CustomConfigWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class CustomConfigWindow 4 | { 5 | public CustomConfigWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/SnippetConfigWindow.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/SnippetConfigWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class SnippetConfigWindow 4 | { 5 | public SnippetConfigWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/TooltipConfigWindow.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/TooltipConfigWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class TooltipConfigWindow 4 | { 5 | public TooltipConfigWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/VariableConfigWindow.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/Config/VariableConfigWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class VariableConfigWindow 4 | { 5 | public VariableConfigWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/DebugTutorialWindow.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/DebugTutorialWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class DebugTutorialWindow 4 | { 5 | public DebugTutorialWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/MethodInfoWindow.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/MethodInfoWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class MethodInfoWindow 4 | { 5 | public MethodInfoWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/NewFileWindow.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/Window/NewFileWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditor.Window 2 | { 3 | public partial class NewFileWindow 4 | { 5 | public NewFileWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/bin/Debug/components/python/Python.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditor/bin/Debug/components/python/Python.Runtime.dll -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditor/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/App.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditorDemo 2 | { 3 | public partial class App 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/HandyPyditorDemo.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B1F29164-0DAC-4255-9388-F7C8E3B23CEA} 8 | WinExe 9 | HandyPyditorDemo 10 | HandyPyditorDemo 11 | v4.6.2 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | 17 | 18 | 19 | AnyCPU 20 | true 21 | full 22 | false 23 | bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | 28 | 29 | AnyCPU 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | ..\packages\HandyControl.2.0.0\lib\net462\HandyControl.dll 40 | 41 | 42 | 43 | 4.0 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | MSBuild:Compile 52 | Designer 53 | 54 | 55 | MSBuild:Compile 56 | Designer 57 | 58 | 59 | App.xaml 60 | Code 61 | 62 | 63 | MainWindow.xaml 64 | Code 65 | 66 | 67 | 68 | 69 | Code 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | {ad240434-a8f7-40c6-93ea-d548501d7bfd} 78 | HandyPyditor 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  14 | 15 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace HandyPyditorDemo 2 | { 3 | public partial class MainWindow 4 | { 5 | public MainWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | using System.Windows; 4 | 5 | [assembly: AssemblyTitle("HandyPyditorDemo")] 6 | [assembly: AssemblyDescription("")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("HandyPyditorDemo")] 10 | [assembly: AssemblyCopyright("Copyright © HandyOrg 2019")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | [assembly: ComVisible(false)] 14 | [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] 15 | [assembly: AssemblyVersion("1.0.0.0")] 16 | [assembly: AssemblyFileVersion("1.0.0.0")] 17 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/editor.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
    13 |
  • 14 |
  • 15 | 16 |
  • 17 |
  • 18 |
  • 19 |
  • 20 |
  • 21 |
  • 22 |
  • 23 |
  • 24 | 25 |
  • 26 |
  • 27 |
  • 28 |
  • 29 |
  • 30 |
  • 31 |
  • 32 |
  • 33 |
  • 34 |
  • 35 |
36 |
37 | 38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/js/FileSaver.js: -------------------------------------------------------------------------------- 1 | /* FileSaver.js 2 | * A saveAs() FileSaver implementation. 3 | * 1.3.8 4 | * 2018-03-22 14:03:47 5 | * 6 | * By Eli Grey, https://eligrey.com 7 | * License: MIT 8 | * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md 9 | */ 10 | 11 | /*global self */ 12 | /*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ 13 | 14 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/src/FileSaver.js */ 15 | 16 | var saveAs = saveAs || (function(view) { 17 | "use strict"; 18 | // IE <10 is explicitly unsupported 19 | if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { 20 | return; 21 | } 22 | var 23 | doc = view.document 24 | // only get URL when necessary in case Blob.js hasn't overridden it yet 25 | , get_URL = function() { 26 | return view.URL || view.webkitURL || view; 27 | } 28 | , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") 29 | , can_use_save_link = "download" in save_link 30 | , click = function(node) { 31 | var event = new MouseEvent("click"); 32 | node.dispatchEvent(event); 33 | } 34 | , is_safari = /constructor/i.test(view.HTMLElement) || view.safari 35 | , is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent) 36 | , setImmediate = view.setImmediate || view.setTimeout 37 | , throw_outside = function(ex) { 38 | setImmediate(function() { 39 | throw ex; 40 | }, 0); 41 | } 42 | , force_saveable_type = "application/octet-stream" 43 | // the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to 44 | , arbitrary_revoke_timeout = 1000 * 40 // in ms 45 | , revoke = function(file) { 46 | var revoker = function() { 47 | if (typeof file === "string") { // file is an object URL 48 | get_URL().revokeObjectURL(file); 49 | } else { // file is a File 50 | file.remove(); 51 | } 52 | }; 53 | setTimeout(revoker, arbitrary_revoke_timeout); 54 | } 55 | , dispatch = function(filesaver, event_types, event) { 56 | event_types = [].concat(event_types); 57 | var i = event_types.length; 58 | while (i--) { 59 | var listener = filesaver["on" + event_types[i]]; 60 | if (typeof listener === "function") { 61 | try { 62 | listener.call(filesaver, event || filesaver); 63 | } catch (ex) { 64 | throw_outside(ex); 65 | } 66 | } 67 | } 68 | } 69 | , auto_bom = function(blob) { 70 | // prepend BOM for UTF-8 XML and text/* types (including HTML) 71 | // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF 72 | if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { 73 | return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type}); 74 | } 75 | return blob; 76 | } 77 | , FileSaver = function(blob, name, no_auto_bom) { 78 | if (!no_auto_bom) { 79 | blob = auto_bom(blob); 80 | } 81 | // First try a.download, then web filesystem, then object URLs 82 | var 83 | filesaver = this 84 | , type = blob.type 85 | , force = type === force_saveable_type 86 | , object_url 87 | , dispatch_all = function() { 88 | dispatch(filesaver, "writestart progress write writeend".split(" ")); 89 | } 90 | // on any filesys errors revert to saving with object URLs 91 | , fs_error = function() { 92 | if ((is_chrome_ios || (force && is_safari)) && view.FileReader) { 93 | // Safari doesn't allow downloading of blob urls 94 | var reader = new FileReader(); 95 | reader.onloadend = function() { 96 | var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;'); 97 | var popup = view.open(url, '_blank'); 98 | if(!popup) view.location.href = url; 99 | url=undefined; // release reference before dispatching 100 | filesaver.readyState = filesaver.DONE; 101 | dispatch_all(); 102 | }; 103 | reader.readAsDataURL(blob); 104 | filesaver.readyState = filesaver.INIT; 105 | return; 106 | } 107 | // don't create more object URLs than needed 108 | if (!object_url) { 109 | object_url = get_URL().createObjectURL(blob); 110 | } 111 | if (force) { 112 | view.location.href = object_url; 113 | } else { 114 | var opened = view.open(object_url, "_blank"); 115 | if (!opened) { 116 | // Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html 117 | view.location.href = object_url; 118 | } 119 | } 120 | filesaver.readyState = filesaver.DONE; 121 | dispatch_all(); 122 | revoke(object_url); 123 | } 124 | ; 125 | filesaver.readyState = filesaver.INIT; 126 | 127 | if (can_use_save_link) { 128 | object_url = get_URL().createObjectURL(blob); 129 | setImmediate(function() { 130 | save_link.href = object_url; 131 | save_link.download = name; 132 | click(save_link); 133 | dispatch_all(); 134 | revoke(object_url); 135 | filesaver.readyState = filesaver.DONE; 136 | }, 0); 137 | return; 138 | } 139 | 140 | fs_error(); 141 | } 142 | , FS_proto = FileSaver.prototype 143 | , saveAs = function(blob, name, no_auto_bom) { 144 | return new FileSaver(blob, name || blob.name || "download", no_auto_bom); 145 | } 146 | ; 147 | 148 | // IE 10+ (native saveAs) 149 | if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { 150 | return function(blob, name, no_auto_bom) { 151 | name = name || blob.name || "download"; 152 | 153 | if (!no_auto_bom) { 154 | blob = auto_bom(blob); 155 | } 156 | return navigator.msSaveOrOpenBlob(blob, name); 157 | }; 158 | } 159 | 160 | // todo: detect chrome extensions & packaged apps 161 | //save_link.target = "_blank"; 162 | 163 | FS_proto.abort = function(){}; 164 | FS_proto.readyState = FS_proto.INIT = 0; 165 | FS_proto.WRITING = 1; 166 | FS_proto.DONE = 2; 167 | 168 | FS_proto.error = 169 | FS_proto.onwritestart = 170 | FS_proto.onprogress = 171 | FS_proto.onwrite = 172 | FS_proto.onabort = 173 | FS_proto.onerror = 174 | FS_proto.onwriteend = 175 | null; 176 | 177 | return saveAs; 178 | }( 179 | typeof self !== "undefined" && self 180 | || typeof window !== "undefined" && window 181 | || this 182 | )); 183 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/js/config.js: -------------------------------------------------------------------------------- 1 | var editorConfig = {"variableJson":{"CAI.Carr()":{"v1":[{"value":"p1v1no1()","caption":"说明1"},{"value":"123","caption":"123"}],"v2":[{"value":"p1v2no1()","caption":"说明1"},{"value":"p1v2no2()","caption":"说明2"}]},"CAI.Carr(,)":{"v1":[{"value":"p2v1no1()","caption":"说明1"},{"value":"p2v2no2()","caption":"说明2"},{"value":"p2v2no2()","caption":"说明3"}],"v2":[{"value":"p2v2no1()","caption":"说明1"},{"value":"p2v2no2()","caption":"说明2"},{"value":"p2v2no3()","caption":"说明3"},{"value":"p2v2no4()","caption":"说明4"}],"v3":[{"value":"p2v3no1()","caption":"说明1"},{"value":"p2v3no2()","caption":"说明2"},{"value":"p2v3no3()","caption":"说明3"},{"value":"p2v3no4()","caption":"说明4"},{"value":"p2v3no5()","caption":"说明5"}]}},"tokenJson":{"classTokens":{"CAI":"这是一段对CAI的描述\n这是第二行\n这是第三行","TSI":"这是一段对TSI的描述\n这是第二行\n这是第三行","GP":"这是一段对GP的描述\n这是第二行\n这是第三行"},"methodTokens":{"CAI.Crel":"这是对CAI.Crel的一行说明","CAI.CmvStn":"这是对CAI.CmvStn的一行说明","CAI.Carr":"这是对CAI.Carr的一行说明","CAI.Cstate":"这是对CAI.Cstate的一行说明","TSI.Sfork":"这是对TSI.Sfork的一行说明","GP.123":"123"}},"builtinFunctions":"|CAI|TSI|GP","snippetText":"snippet GP\n\tGP[${1:数字}]\nsnippet CAI.Crel\n\tCAI.Crel()\nsnippet CAI.Carr\n\tCAI.Carr()\nsnippet CAI.CmvStn\n\tCAI.CmvStn(${1:站点},1)\nsnippet TSI.Sfork\n\tTSI.Sfork[${1:数字}]"} -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/js/ext-modelist.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { 2 | "use strict"; 3 | 4 | var modes = []; 5 | function getModeForPath(path) { 6 | var mode = modesByName.text; 7 | var fileName = path.split(/[\/\\]/).pop(); 8 | for (var i = 0; i < modes.length; i++) { 9 | if (modes[i].supportsFile(fileName)) { 10 | mode = modes[i]; 11 | break; 12 | } 13 | } 14 | return mode; 15 | } 16 | 17 | var Mode = function(name, caption, extensions) { 18 | this.name = name; 19 | this.caption = caption; 20 | this.mode = "ace/mode/" + name; 21 | this.extensions = extensions; 22 | var re; 23 | if (/\^/.test(extensions)) { 24 | re = extensions.replace(/\|(\^)?/g, function(a, b){ 25 | return "$|" + (b ? "^" : "^.*\\."); 26 | }) + "$"; 27 | } else { 28 | re = "^.*\\.(" + extensions + ")$"; 29 | } 30 | 31 | this.extRe = new RegExp(re, "gi"); 32 | }; 33 | 34 | Mode.prototype.supportsFile = function(filename) { 35 | return filename.match(this.extRe); 36 | }; 37 | var supportedModes = { 38 | ABAP: ["abap"], 39 | ABC: ["abc"], 40 | ActionScript:["as"], 41 | ADA: ["ada|adb"], 42 | Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], 43 | AsciiDoc: ["asciidoc|adoc"], 44 | ASL: ["dsl|asl"], 45 | Assembly_x86:["asm|a"], 46 | AutoHotKey: ["ahk"], 47 | BatchFile: ["bat|cmd"], 48 | Bro: ["bro"], 49 | C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], 50 | C9Search: ["c9search_results"], 51 | Cirru: ["cirru|cr"], 52 | Clojure: ["clj|cljs"], 53 | Cobol: ["CBL|COB"], 54 | coffee: ["coffee|cf|cson|^Cakefile"], 55 | ColdFusion: ["cfm"], 56 | CSharp: ["cs"], 57 | Csound_Document: ["csd"], 58 | Csound_Orchestra: ["orc"], 59 | Csound_Score: ["sco"], 60 | CSS: ["css"], 61 | Curly: ["curly"], 62 | D: ["d|di"], 63 | Dart: ["dart"], 64 | Diff: ["diff|patch"], 65 | Dockerfile: ["^Dockerfile"], 66 | Dot: ["dot"], 67 | Drools: ["drl"], 68 | Edifact: ["edi"], 69 | Eiffel: ["e|ge"], 70 | EJS: ["ejs"], 71 | Elixir: ["ex|exs"], 72 | Elm: ["elm"], 73 | Erlang: ["erl|hrl"], 74 | Forth: ["frt|fs|ldr|fth|4th"], 75 | Fortran: ["f|f90"], 76 | FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], 77 | FTL: ["ftl"], 78 | Gcode: ["gcode"], 79 | Gherkin: ["feature"], 80 | Gitignore: ["^.gitignore"], 81 | Glsl: ["glsl|frag|vert"], 82 | Gobstones: ["gbs"], 83 | golang: ["go"], 84 | GraphQLSchema: ["gql"], 85 | Groovy: ["groovy"], 86 | HAML: ["haml"], 87 | Handlebars: ["hbs|handlebars|tpl|mustache"], 88 | Haskell: ["hs"], 89 | Haskell_Cabal: ["cabal"], 90 | haXe: ["hx"], 91 | Hjson: ["hjson"], 92 | HTML: ["html|htm|xhtml|vue|we|wpy"], 93 | HTML_Elixir: ["eex|html.eex"], 94 | HTML_Ruby: ["erb|rhtml|html.erb"], 95 | INI: ["ini|conf|cfg|prefs"], 96 | Io: ["io"], 97 | Jack: ["jack"], 98 | Jade: ["jade|pug"], 99 | Java: ["java"], 100 | JavaScript: ["js|jsm|jsx"], 101 | JSON: ["json"], 102 | JSONiq: ["jq"], 103 | JSP: ["jsp"], 104 | JSSM: ["jssm|jssm_state"], 105 | JSX: ["jsx"], 106 | Julia: ["jl"], 107 | Kotlin: ["kt|kts"], 108 | LaTeX: ["tex|latex|ltx|bib"], 109 | LESS: ["less"], 110 | Liquid: ["liquid"], 111 | Lisp: ["lisp"], 112 | LiveScript: ["ls"], 113 | LogiQL: ["logic|lql"], 114 | LSL: ["lsl"], 115 | Lua: ["lua"], 116 | LuaPage: ["lp"], 117 | Lucene: ["lucene"], 118 | Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], 119 | Markdown: ["md|markdown"], 120 | Mask: ["mask"], 121 | MATLAB: ["matlab"], 122 | Maze: ["mz"], 123 | MEL: ["mel"], 124 | MIXAL: ["mixal"], 125 | MUSHCode: ["mc|mush"], 126 | MySQL: ["mysql"], 127 | Nix: ["nix"], 128 | NSIS: ["nsi|nsh"], 129 | ObjectiveC: ["m|mm"], 130 | OCaml: ["ml|mli"], 131 | Pascal: ["pas|p"], 132 | Perl: ["pl|pm"], 133 | pgSQL: ["pgsql"], 134 | PHP_Laravel_blade: ["blade.php"], 135 | PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], 136 | Puppet: ["epp|pp"], 137 | Pig: ["pig"], 138 | Powershell: ["ps1"], 139 | Praat: ["praat|praatscript|psc|proc"], 140 | Prolog: ["plg|prolog"], 141 | Properties: ["properties"], 142 | Protobuf: ["proto"], 143 | Python: ["py"], 144 | R: ["r"], 145 | Razor: ["cshtml|asp"], 146 | RDoc: ["Rd"], 147 | Red: ["red|reds"], 148 | RHTML: ["Rhtml"], 149 | RST: ["rst"], 150 | Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], 151 | Rust: ["rs"], 152 | SASS: ["sass"], 153 | SCAD: ["scad"], 154 | Scala: ["scala"], 155 | Scheme: ["scm|sm|rkt|oak|scheme"], 156 | SCSS: ["scss"], 157 | SH: ["sh|bash|^.bashrc"], 158 | SJS: ["sjs"], 159 | Slim: ["slim|skim"], 160 | Smarty: ["smarty|tpl"], 161 | snippets: ["snippets"], 162 | Soy_Template:["soy"], 163 | Space: ["space"], 164 | SQL: ["sql"], 165 | SQLServer: ["sqlserver"], 166 | Stylus: ["styl|stylus"], 167 | SVG: ["svg"], 168 | Swift: ["swift"], 169 | Tcl: ["tcl"], 170 | Terraform: ["tf", "tfvars", "terragrunt"], 171 | Tex: ["tex"], 172 | Text: ["txt"], 173 | Textile: ["textile"], 174 | Toml: ["toml"], 175 | TSX: ["tsx"], 176 | Twig: ["twig|swig"], 177 | Typescript: ["ts|typescript|str"], 178 | Vala: ["vala"], 179 | VBScript: ["vbs|vb"], 180 | Velocity: ["vm"], 181 | Verilog: ["v|vh|sv|svh"], 182 | VHDL: ["vhd|vhdl"], 183 | Wollok: ["wlk|wpgm|wtest"], 184 | XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], 185 | XQuery: ["xq"], 186 | YAML: ["yaml|yml"], 187 | Django: ["html"] 188 | }; 189 | 190 | var nameOverrides = { 191 | ObjectiveC: "Objective-C", 192 | CSharp: "C#", 193 | golang: "Go", 194 | C_Cpp: "C and C++", 195 | Csound_Document: "Csound Document", 196 | Csound_Orchestra: "Csound", 197 | Csound_Score: "Csound Score", 198 | coffee: "CoffeeScript", 199 | HTML_Ruby: "HTML (Ruby)", 200 | HTML_Elixir: "HTML (Elixir)", 201 | FTL: "FreeMarker", 202 | PHP_Laravel_blade: "PHP (Blade Template)" 203 | }; 204 | var modesByName = {}; 205 | for (var name in supportedModes) { 206 | var data = supportedModes[name]; 207 | var displayName = (nameOverrides[name] || name).replace(/_/g, " "); 208 | var filename = name.toLowerCase(); 209 | var mode = new Mode(filename, displayName, data[0]); 210 | modesByName[filename] = mode; 211 | modes.push(mode); 212 | } 213 | 214 | module.exports = { 215 | getModeForPath: getModeForPath, 216 | modes: modes, 217 | modesByName: modesByName 218 | }; 219 | 220 | }); 221 | (function() { 222 | window.require(["ace/ext/modelist"], function(m) { 223 | if (typeof module == "object" && typeof exports == "object" && module) { 224 | module.exports = m; 225 | } 226 | }); 227 | })(); 228 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/js/file_drop.js: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Distributed under the BSD license: 3 | * 4 | * Copyright (c) 2010, Ajax.org B.V. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * * Neither the name of Ajax.org B.V. nor the 15 | * names of its contributors may be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * ***** END LICENSE BLOCK ***** */ 30 | 31 | define("file_drop",["require","exports","module","ace/config","ace/lib/event","ace/ext/modelist"], function(require, exports, module) { 32 | 33 | var config = require("ace/config"); 34 | var event = require("ace/lib/event"); 35 | var modelist = require("ace/ext/modelist"); 36 | 37 | module.exports = function(editor) { 38 | event.addListener(editor.container, "dragover", function(e) { 39 | var types = e.dataTransfer.types; 40 | if (types && Array.prototype.indexOf.call(types, 'Files') !== -1) 41 | return event.preventDefault(e); 42 | }); 43 | 44 | event.addListener(editor.container, "drop", function(e) { 45 | var file; 46 | try { 47 | file = e.dataTransfer.files[0]; 48 | if (window.FileReader) { 49 | var reader = new FileReader(); 50 | reader.onload = function() { 51 | var mode = modelist.getModeForPath(file.name); 52 | editor.session.doc.setValue(reader.result); 53 | editor.session.setMode(mode.mode); 54 | editor.session.modeName = mode.name; 55 | }; 56 | reader.readAsText(file); 57 | } 58 | return event.preventDefault(e); 59 | } catch(err) { 60 | return event.stopEvent(e); 61 | } 62 | }); 63 | }; 64 | 65 | var Editor = require("ace/editor").Editor; 66 | config.defineOptions(Editor.prototype, "editor", { 67 | loadDroppedFile: { 68 | set: function() { module.exports(this); }, 69 | value: true 70 | } 71 | }); 72 | 73 | }); -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/js/init.js: -------------------------------------------------------------------------------- 1 | require("file_drop"); 2 | var langTools = ace.require("ace/ext/language_tools"); 3 | var editor = ace.edit("editor"); 4 | editor.session.setMode("ace/mode/python"); 5 | editor.session.setUseWrapMode(true); 6 | editor.$blockScrolling = Infinity; 7 | editor.setTheme("ace/theme/xcode"); 8 | editor.setFontSize(16); 9 | editor.setFadeFoldWidgets(true); 10 | editor.setOptions({ 11 | enableBasicAutocompletion: true, 12 | enableSnippets: true, 13 | enableLiveAutocompletion: true 14 | }); 15 | var Editor = require("ace/editor").Editor; 16 | var TokenTooltip = require("token_tooltip").TokenTooltip; 17 | new TokenTooltip(editor); 18 | 19 | var methodCompleter = { 20 | getCompletions: function (editor, session, pos, prefix, callback) { 21 | var row = pos.row; 22 | var tokens = editor.session.getTokens(row); 23 | var index = tokens.length - 2; 24 | var showMethods = []; 25 | if (index > -1 && tokens[index + 1].value === ".") { 26 | var tokenValue = tokens[index].value; 27 | for (var i = row - 1; i > -1; i--) { 28 | var tokensInLine = editor.session.getTokens(i); 29 | var lineStr = editor.session.getLine(i).trim(); 30 | var tokenArr = tokensInLine.filter(function (token) { 31 | return token.value === tokenValue && token.type === "identifier"; 32 | }); 33 | if (lineStr.indexOf(tokenValue) > -1 && tokenArr.length > 0) { 34 | var keyArr = /^([a-zA-Z0-9_\s,]+)=([^\n=]+)$/g.exec(lineStr); 35 | if (keyArr && keyArr.length > 2) { 36 | var vArr = keyArr[1].split(","); 37 | vArr.forEach(function (currentValue, index, arr) { 38 | arr[index] = currentValue.trim(); 39 | }); 40 | var vIndex = vArr.indexOf(tokenValue) + 1; 41 | var methodStr = keyArr[2]; 42 | var lIndex = methodStr.indexOf("("); 43 | var rIndex = methodStr.indexOf(")"); 44 | var count = 1; 45 | for (var j = lIndex + 1; j < rIndex; j++) { 46 | if (methodStr[j] === ",") { 47 | count++; 48 | } 49 | } 50 | var methodName = methodStr.substring(0, lIndex) + "(" + new Array(count).join(",") + ")"; 51 | showMethods = editorConfig.variableJson[methodName.trim()]["v" + vIndex]; 52 | break; 53 | } 54 | } 55 | } 56 | } 57 | if (!showMethods || showMethods.length == 0) { 58 | callback(null, []); 59 | } 60 | else { 61 | callback(null, showMethods.map(function (item) { 62 | return { 63 | meta: item.caption, 64 | value: prefix + item.value 65 | }; 66 | })); 67 | } 68 | } 69 | }; 70 | langTools.addCompleter(methodCompleter); 71 | 72 | document.getElementById("openFile").onclick = function () { 73 | document.getElementById("file-open").click(); 74 | } 75 | 76 | document.getElementById("file-open").onchange = function (e) { 77 | var file = e.target.files[0]; 78 | if (!file) { 79 | return; 80 | } 81 | var reader = new FileReader(); 82 | reader.onload = function (e) { 83 | var contents = e.target.result; 84 | editor.setValue(contents); 85 | editor.clearSelection(); 86 | editor.selection.moveCursorFileStart(); 87 | }; 88 | reader.readAsText(file); 89 | } 90 | 91 | document.getElementById("newFile").onclick = function () { 92 | if (editor.getValue().length > 0) { 93 | swal({ 94 | title: '需要保存吗?', 95 | text: "如果不保存,则无法恢复当前的编辑状态!", 96 | type: 'question', 97 | showCancelButton: true, 98 | confirmButtonColor: '#3085d6', 99 | cancelButtonColor: '#d33', 100 | cancelButtonText: '不保存', 101 | confirmButtonText: '我要保存' 102 | }).then(function (isConfirm) { 103 | if (isConfirm == true) { 104 | saveFile(true); 105 | } 106 | else if (isConfirm == false) { 107 | refresh(); 108 | sendMessage("refresh"); 109 | } 110 | }); 111 | } 112 | else { 113 | sendMessage("refresh"); 114 | } 115 | } 116 | 117 | function refresh() { 118 | editor.setValue(""); 119 | } 120 | 121 | function getCode() { 122 | return editor.getValue(); 123 | } 124 | 125 | function setCode(str) { 126 | editor.setValue(str); 127 | } 128 | 129 | editor.commands.addCommand({ 130 | name: 'saveFile', 131 | bindKey: { 132 | win: 'Ctrl-S', 133 | sender: 'editor|cli' 134 | }, 135 | exec: function (env, args, request) { 136 | saveFile(false); 137 | } 138 | }); 139 | 140 | editor.commands.addCommand({ 141 | name: 'saveAsFile', 142 | bindKey: { 143 | win: 'Shift-Ctrl-S', 144 | sender: 'editor|cli' 145 | }, 146 | exec: function (env, args, request) { 147 | saveAsFile(false); 148 | } 149 | }); 150 | 151 | editor.commands.addCommand({ 152 | name: 'debug', 153 | bindKey: { 154 | win: 'F5', 155 | sender: 'editor|cli' 156 | }, 157 | exec: function (env, args, request) { 158 | debugCode(); 159 | } 160 | }); 161 | 162 | editor.commands.addCommand({ 163 | name: 'stopDebug', 164 | bindKey: { 165 | win: 'Shift-F5', 166 | sender: 'editor|cli' 167 | }, 168 | exec: function (env, args, request) { 169 | stopDebugCode(); 170 | } 171 | }); 172 | 173 | editor.commands.addCommand({ 174 | name: 'setBreakpoints', 175 | bindKey: { 176 | win: 'F9', 177 | sender: 'editor|cli' 178 | }, 179 | exec: function (env, args, request) { 180 | var pos = editor.getCursorPosition(); 181 | var arr = editor.session.getBreakpoints(); 182 | if (arr[pos.row]) { 183 | editor.session.clearBreakpoint(pos.row); 184 | sendMessage("clearBreakpoint", pos.row); 185 | } 186 | else { 187 | editor.session.setBreakpoint(pos.row); 188 | sendMessage("setBreakpoint", pos.row); 189 | } 190 | } 191 | }); 192 | 193 | editor.commands.addCommand({ 194 | name: 'formatCode', 195 | bindKey: { 196 | win: 'Alt-Shift-F', 197 | sender: 'editor|cli' 198 | }, 199 | exec: function (env, args, request) { 200 | sendMessage("format", getCode()); 201 | } 202 | }); 203 | 204 | var handler; 205 | 206 | editor.on("change", function (e) { 207 | clearTimeout(handler); 208 | handler = setTimeout("autoSave()", "2000"); 209 | }) 210 | 211 | function autoSave() { 212 | sendMessage("autoSave"); 213 | } 214 | 215 | editor.on("guttermousedown", function (e) { 216 | if(e.domEvent.buttons != 1) return; 217 | var target = e.domEvent.target; 218 | if (target.className.indexOf("ace_gutter-cell") == -1) 219 | return; 220 | if (!editor.isFocused()) 221 | return; 222 | var t = target.getBoundingClientRect().left; 223 | if (e.clientX > 20 + target.getBoundingClientRect().left) 224 | return; 225 | 226 | var row = e.getDocumentPosition().row 227 | var arr = editor.session.getBreakpoints(); 228 | if (arr[row]) { 229 | editor.session.clearBreakpoint(row); 230 | sendMessage("clearBreakpoint", row); 231 | } 232 | else { 233 | editor.session.setBreakpoint(row); 234 | sendMessage("setBreakpoint", row); 235 | } 236 | e.stop() 237 | }) 238 | 239 | function saveAsFile() { 240 | sendMessage("saveAsFile"); 241 | } 242 | 243 | function saveFile(refresh) { 244 | sendMessage("saveFile", refresh); 245 | } 246 | 247 | document.getElementById("formatCode").onclick = function () { 248 | sendMessage("format", getCode()); 249 | } 250 | 251 | document.getElementById("commentCode").onclick = function () { 252 | editor.commentLines(); 253 | } 254 | 255 | document.getElementById("unCommentCode").onclick = function () { 256 | editor.unCommentLines(); 257 | } 258 | 259 | document.getElementById("undo").onclick = function () { 260 | editor.undo(); 261 | } 262 | 263 | document.getElementById("redo").onclick = function () { 264 | editor.redo(); 265 | } 266 | 267 | document.getElementById("find").onclick = function () { 268 | editor.execCommand("find"); 269 | } 270 | 271 | document.getElementById("saveFile").onclick = function () { 272 | saveFile(false); 273 | } 274 | 275 | document.getElementById("saveAsFile").onclick = function () { 276 | saveAsFile(); 277 | } 278 | 279 | document.getElementById("tooltipConfig").onclick = function () { 280 | sendMessage("tooltipConfig"); 281 | } 282 | 283 | document.getElementById("variableConfig").onclick = function () { 284 | sendMessage("variableConfig"); 285 | } 286 | 287 | document.getElementById("snippetConfig").onclick = function () { 288 | sendMessage("snippetConfig"); 289 | } 290 | 291 | var run = document.getElementById("run"); 292 | var stop = document.getElementById("stop"); 293 | 294 | run.onclick = debugCode; 295 | var isDebug = false; 296 | 297 | function debugCode() { 298 | if (isDebug) return; 299 | sendMessage("run"); 300 | } 301 | 302 | stop.onclick = stopDebugCode; 303 | 304 | function stopDebugCode() { 305 | if (!isDebug) return; 306 | sendMessage("stop"); 307 | } 308 | 309 | function setDebugStatus(status) { 310 | isDebug = status; 311 | 312 | if (status) { 313 | editor.session.setAnnotations([]); 314 | stop.style.display = "inline-block"; 315 | run.style.display = "none"; 316 | } 317 | else { 318 | run.style.display = "inline-block"; 319 | stop.style.display = "none"; 320 | } 321 | } 322 | 323 | function sendMessage(p1, p2) { 324 | if (typeof (message) != "undefined") { 325 | message(p1, p2); 326 | } 327 | } 328 | 329 | new Tippy('#toolBar li', { 330 | animation: "fade", 331 | theme: "light", 332 | duration: 0, 333 | delay: 400 334 | }); 335 | 336 | if (tempData.tempCode && tempData.tempCode.length > 0) { 337 | editor.setValue(tempData.tempCode); 338 | editor.clearSelection(); 339 | editor.selection.moveCursorFileStart(); 340 | } 341 | 342 | function setError(row, column, text) { 343 | editor.session.setAnnotations([{ 344 | row: row, 345 | column: column, 346 | text: text, 347 | type: "error" 348 | }]); 349 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/js/mode-python.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { 2 | "use strict"; 3 | 4 | var oop = require("../lib/oop"); 5 | var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; 6 | 7 | var PythonHighlightRules = function() { 8 | 9 | var keywords = ( 10 | "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + 11 | "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + 12 | "raise|return|try|while|with|yield|async|await" 13 | ); 14 | 15 | var builtinConstants = ( 16 | "True|False|None|NotImplemented|Ellipsis|__debug__" 17 | ); 18 | 19 | var builtinFunctions = ( 20 | "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + 21 | "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + 22 | "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" + 23 | "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + 24 | "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + 25 | "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + 26 | "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + 27 | "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern" + editorConfig.builtinFunctions 28 | ); 29 | var keywordMapper = this.createKeywordMapper({ 30 | "invalid.deprecated": "debugger", 31 | "support.function": builtinFunctions, 32 | "variable.language": "self|cls", 33 | "constant.language": builtinConstants, 34 | "keyword": keywords 35 | }, "identifier"); 36 | 37 | var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; 38 | 39 | var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; 40 | var octInteger = "(?:0[oO]?[0-7]+)"; 41 | var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; 42 | var binInteger = "(?:0[bB][01]+)"; 43 | var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; 44 | 45 | var exponent = "(?:[eE][+-]?\\d+)"; 46 | var fraction = "(?:\\.\\d+)"; 47 | var intPart = "(?:\\d+)"; 48 | var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; 49 | var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; 50 | var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; 51 | 52 | var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; 53 | 54 | this.$rules = { 55 | "start" : [ { 56 | token : "comment", 57 | regex : "#.*$" 58 | }, { 59 | token : "string", // multi line """ string start 60 | regex : strPre + '"{3}', 61 | next : "qqstring3" 62 | }, { 63 | token : "string", // " string 64 | regex : strPre + '"(?=.)', 65 | next : "qqstring" 66 | }, { 67 | token : "string", // multi line ''' string start 68 | regex : strPre + "'{3}", 69 | next : "qstring3" 70 | }, { 71 | token : "string", // ' string 72 | regex : strPre + "'(?=.)", 73 | next : "qstring" 74 | }, { 75 | token : "constant.numeric", // imaginary 76 | regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" 77 | }, { 78 | token : "constant.numeric", // float 79 | regex : floatNumber 80 | }, { 81 | token : "constant.numeric", // long integer 82 | regex : integer + "[lL]\\b" 83 | }, { 84 | token : "constant.numeric", // integer 85 | regex : integer + "\\b" 86 | }, { 87 | token : keywordMapper, 88 | regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" 89 | }, { 90 | token : "keyword.operator", 91 | regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" 92 | }, { 93 | token : "paren.lparen", 94 | regex : "[\\[\\(\\{]" 95 | }, { 96 | token : "paren.rparen", 97 | regex : "[\\]\\)\\}]" 98 | }, { 99 | token : "text", 100 | regex : "\\s+" 101 | } ], 102 | "qqstring3" : [ { 103 | token : "constant.language.escape", 104 | regex : stringEscape 105 | }, { 106 | token : "string", // multi line """ string end 107 | regex : '"{3}', 108 | next : "start" 109 | }, { 110 | defaultToken : "string" 111 | } ], 112 | "qstring3" : [ { 113 | token : "constant.language.escape", 114 | regex : stringEscape 115 | }, { 116 | token : "string", // multi line ''' string end 117 | regex : "'{3}", 118 | next : "start" 119 | }, { 120 | defaultToken : "string" 121 | } ], 122 | "qqstring" : [{ 123 | token : "constant.language.escape", 124 | regex : stringEscape 125 | }, { 126 | token : "string", 127 | regex : "\\\\$", 128 | next : "qqstring" 129 | }, { 130 | token : "string", 131 | regex : '"|$', 132 | next : "start" 133 | }, { 134 | defaultToken: "string" 135 | }], 136 | "qstring" : [{ 137 | token : "constant.language.escape", 138 | regex : stringEscape 139 | }, { 140 | token : "string", 141 | regex : "\\\\$", 142 | next : "qstring" 143 | }, { 144 | token : "string", 145 | regex : "'|$", 146 | next : "start" 147 | }, { 148 | defaultToken: "string" 149 | }] 150 | }; 151 | }; 152 | 153 | oop.inherits(PythonHighlightRules, TextHighlightRules); 154 | 155 | exports.PythonHighlightRules = PythonHighlightRules; 156 | }); 157 | 158 | define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { 159 | "use strict"; 160 | 161 | var oop = require("../../lib/oop"); 162 | var BaseFoldMode = require("./fold_mode").FoldMode; 163 | 164 | var FoldMode = exports.FoldMode = function(markers) { 165 | this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); 166 | }; 167 | oop.inherits(FoldMode, BaseFoldMode); 168 | 169 | (function() { 170 | 171 | this.getFoldWidgetRange = function(session, foldStyle, row) { 172 | var line = session.getLine(row); 173 | var match = line.match(this.foldingStartMarker); 174 | if (match) { 175 | if (match[1]) 176 | return this.openingBracketBlock(session, match[1], row, match.index); 177 | if (match[2]) 178 | return this.indentationBlock(session, row, match.index + match[2].length); 179 | return this.indentationBlock(session, row); 180 | } 181 | }; 182 | 183 | }).call(FoldMode.prototype); 184 | 185 | }); 186 | 187 | define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) { 188 | "use strict"; 189 | 190 | var oop = require("../lib/oop"); 191 | var TextMode = require("./text").Mode; 192 | var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; 193 | var PythonFoldMode = require("./folding/pythonic").FoldMode; 194 | var Range = require("../range").Range; 195 | 196 | var Mode = function() { 197 | this.HighlightRules = PythonHighlightRules; 198 | this.foldingRules = new PythonFoldMode("\\:"); 199 | this.$behaviour = this.$defaultBehaviour; 200 | }; 201 | oop.inherits(Mode, TextMode); 202 | 203 | (function() { 204 | 205 | this.lineCommentStart = "#"; 206 | 207 | this.getNextLineIndent = function(state, line, tab) { 208 | var indent = this.$getIndent(line); 209 | 210 | var tokenizedLine = this.getTokenizer().getLineTokens(line, state); 211 | var tokens = tokenizedLine.tokens; 212 | 213 | if (tokens.length && tokens[tokens.length-1].type == "comment") { 214 | return indent; 215 | } 216 | 217 | if (state == "start") { 218 | var match = line.match(/^.*[\{\(\[:]\s*$/); 219 | if (match) { 220 | indent += tab; 221 | } 222 | } 223 | 224 | return indent; 225 | }; 226 | 227 | var outdents = { 228 | "pass": 1, 229 | "return": 1, 230 | "raise": 1, 231 | "break": 1, 232 | "continue": 1 233 | }; 234 | 235 | this.checkOutdent = function(state, line, input) { 236 | if (input !== "\r\n" && input !== "\r" && input !== "\n") 237 | return false; 238 | 239 | var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; 240 | 241 | if (!tokens) 242 | return false; 243 | do { 244 | var last = tokens.pop(); 245 | } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); 246 | 247 | if (!last) 248 | return false; 249 | 250 | return (last.type == "keyword" && outdents[last.value]); 251 | }; 252 | 253 | this.autoOutdent = function(state, doc, row) { 254 | 255 | row += 1; 256 | var indent = this.$getIndent(doc.getLine(row)); 257 | var tab = doc.getTabString(); 258 | if (indent.slice(-tab.length) == tab) 259 | doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); 260 | }; 261 | 262 | this.$id = "ace/mode/python"; 263 | }).call(Mode.prototype); 264 | 265 | exports.Mode = Mode; 266 | }); 267 | (function() { 268 | window.require(["ace/mode/python"], function(m) { 269 | if (typeof module == "object" && typeof exports == "object" && module) { 270 | module.exports = m; 271 | } 272 | }); 273 | })(); 274 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/js/mode-snippets.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++nl){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u 1000) { 62 | r.rect = null; 63 | r.timeStamp = this.lastT; 64 | this.maxHeight = window.innerHeight; 65 | this.maxWidth = window.innerWidth; 66 | } 67 | 68 | var canvasPos = r.rect || (r.rect = r.scroller.getBoundingClientRect()); 69 | var offset = (this.x + r.scrollLeft - canvasPos.left - r.$padding) / r.characterWidth; 70 | var row = Math.floor((this.y + r.scrollTop - canvasPos.top) / r.lineHeight); 71 | var col = Math.round(offset); 72 | 73 | var screenPos = { row: row, column: col, side: offset - col > 0 ? 1 : -1 }; 74 | var session = this.editor.session; 75 | var docPos = session.screenToDocumentPosition(screenPos.row, screenPos.column); 76 | var token = session.getTokenAt(docPos.row, docPos.column); 77 | if (!token) { 78 | session.removeMarker(this.marker); 79 | this.hide(); 80 | return; 81 | } 82 | var range = session.getWordRange(docPos.row, docPos.column); 83 | var text = session.getTextRange(range); 84 | 85 | var str = editorConfig.tokenJson.classTokens[text]; 86 | if (str && token.start == range.start.column) { 87 | if (this.tokenText != text) { 88 | this.setText(str); 89 | this.width = this.getWidth(); 90 | this.height = this.getHeight(); 91 | this.tokenText = text; 92 | } 93 | this.show(null, this.x, this.y); 94 | session.removeMarker(this.marker); 95 | this.range = new Range(docPos.row, token.start, docPos.row, token.start + token.value.length); 96 | this.marker = session.addMarker(this.range, "ace_bracket", "text"); 97 | } 98 | else { 99 | str = this.editor.getSelectedText(); 100 | text = editorConfig.tokenJson.methodTokens[this.editor.getSelectedText()] 101 | if (text) { 102 | var range = this.editor.selection.getRange(); 103 | if (range.start.row == docPos.row && range.start.column <= docPos.column && range.end.column >= docPos.column) { 104 | this.isShowMethodToken = true; 105 | this.setText(text); 106 | this.width = this.getWidth(); 107 | this.height = this.getHeight(); 108 | this.tokenText = text; 109 | 110 | this.show(null, this.x, this.y); 111 | session.removeMarker(this.marker); 112 | this.range = range; 113 | this.marker = session.addMarker(this.range, "ace_bracket", "text"); 114 | } 115 | else{ 116 | session.removeMarker(this.marker); 117 | this.hide(); 118 | } 119 | } 120 | else { 121 | session.removeMarker(this.marker); 122 | this.hide(); 123 | } 124 | } 125 | }; 126 | 127 | this.onMouseMove = function (e) { 128 | this.x = e.clientX; 129 | this.y = e.clientY; 130 | if (this.isOpen) { 131 | this.lastT = e.timeStamp; 132 | this.setPosition(this.x, this.y); 133 | } 134 | if (!this.$timer) 135 | this.$timer = setTimeout(this.update, 100); 136 | }; 137 | 138 | this.onMouseOut = function (e) { 139 | if (e && e.currentTarget.contains(e.relatedTarget)) 140 | return; 141 | this.hide(); 142 | this.editor.session.removeMarker(this.marker); 143 | this.$timer = clearTimeout(this.$timer); 144 | }; 145 | 146 | this.setPosition = function (x, y) { 147 | if (x + 10 + this.width > this.maxWidth) 148 | x = window.innerWidth - this.width - 10; 149 | if (y > window.innerHeight * 0.75 || y + 20 + this.height > this.maxHeight) 150 | y = y - this.height - 30; 151 | 152 | Tooltip.prototype.setPosition.call(this, x + 10, y + 20); 153 | }; 154 | 155 | this.destroy = function () { 156 | this.onMouseOut(); 157 | event.removeListener(this.editor.renderer.scroller, "mousemove", this.onMouseMove); 158 | event.removeListener(this.editor.renderer.content, "mouseout", this.onMouseOut); 159 | delete this.editor.tokenTooltip; 160 | }; 161 | 162 | }).call(TokenTooltip.prototype); 163 | 164 | exports.TokenTooltip = TokenTooltip; 165 | 166 | }); 167 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/resources/css/editor.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | margin: 0; 4 | } 5 | 6 | body { 7 | overflow: hidden ! important; 8 | } 9 | 10 | ::-webkit-scrollbar { 11 | width: 8px; 12 | height: 8px; 13 | } 14 | 15 | ::-webkit-scrollbar-track { 16 | background-color: #F5F5F5; 17 | } 18 | 19 | ::-webkit-scrollbar-thumb { 20 | border-radius: 4px; 21 | background-color: #B6C0D5; 22 | } 23 | 24 | ::-webkit-scrollbar-thumb:hover { 25 | background-color: #4B596C; 26 | } 27 | 28 | ul, input { 29 | margin: 0; 30 | padding: 0; 31 | } 32 | 33 | .tippy-popper { 34 | font-size: 12px; 35 | } 36 | 37 | .border.bottom { 38 | border-bottom: 1px solid #e0e0e0; 39 | } 40 | 41 | .ace_gutter-cell.ace_breakpoint { 42 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAoElEQVQoU2NkIBIwwtTdEGHgZeBkKWBgYDKGiP07w/D9z0SNNwyfQTywwptSDCL/mdnOMzAyyCBb8P8/wyMuxl8G8o8Y3oMV3pBj62RgYCjD4YpOjUe/KiAKZdk2MTAy+GJT+P8/w3rNx7+CwAqvy7KtY2RkCCSsUIatnZGJoYKg1Q/lGAS//We7wMjIIIfXM2B3QoInn4GByQRn8BAT5gCFgDsL616MtQAAAABJRU5ErkJggg=="); 43 | background-repeat: no-repeat; 44 | background-position: 2px center; 45 | } 46 | 47 | /* .ace_gutter-cell:hover { 48 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAABFUlEQVQoU33PPUvDYBQF4HPy1YoOKtQKzauL2MRFcHVycFHsT9BFnDo76SJuboJTR8Ef4KC4uTgKLqWpQ4tNBocigoPhTcyVBgMdime6cB4u9xJjCWrWFkyuI+NwGvpORfgoao6GdgUzZtm5AWRZBC1K9g7D2ATR9wbJ5cjkMFD2FcHP1VCfEsiKLV3X3BFywwvTc/YrWIyn7Gt/kGyPn1HMgXJuS7E+YqDMBoR1L0ovJkLXOgYl4GvN3M3Itf+gIdJmbwFVXXJaXqgbkzZ2lPNQjvXB3zPWCUWe69HPfYEFMLrKORPIrB8mzRwKwMC1mzSwAvBJMqmSOATYw7fe94b4ymGRtyXMxbD3BJiXTF78KH0sul84YWWsnpQ52gAAAABJRU5ErkJggg=="); 49 | background-repeat: no-repeat; 50 | background-position: 2px center; 51 | } 52 | 53 | .ace_gutter-cell.ace_breakpoint:hover { 54 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAoElEQVQoU2NkIBIwwtTdEGHgZeBkKWBgYDKGiP07w/D9z0SNNwyfQTywwptSDCL/mdnOMzAyyCBb8P8/wyMuxl8G8o8Y3oMV3pBj62RgYCjD4YpOjUe/KiAKZdk2MTAy+GJT+P8/w3rNx7+CwAqvy7KtY2RkCCSsUIatnZGJoYKg1Q/lGAS//We7wMjIIIfXM2B3QoInn4GByQRn8BAT5gCFgDsL616MtQAAAABJRU5ErkJggg=="); 55 | background-repeat: no-repeat; 56 | background-position: 2px center; 57 | } */ 58 | 59 | #editor { 60 | width: 100%; 61 | position: absolute; 62 | top: 37px; 63 | bottom: 0px; 64 | left: 0px; 65 | } 66 | 67 | #toolBar { 68 | list-style: none; 69 | margin-left: 6px; 70 | -webkit-user-select: none; 71 | -moz-user-select: none; 72 | height: 36px; 73 | } 74 | 75 | #toolBar li { 76 | width: 20px; 77 | height: 24px; 78 | margin: 6px 0; 79 | display: inline-block; 80 | background-size: 16px 16px; 81 | background-repeat: no-repeat; 82 | background-position: center; 83 | } 84 | 85 | .separator { 86 | background-color: #e0e0e0; 87 | width: 1px ! important; 88 | margin: 6px 2px ! important; 89 | } 90 | 91 | #toolBar li:hover { 92 | opacity: .8; 93 | } 94 | 95 | #toolBar li:active { 96 | opacity: 1; 97 | } 98 | 99 | #openFile { 100 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABe0lEQVR4XpWSvUvDQBiH32qFxkqrWLGDqOigi6UudhEn0U0R0cmCzg7VoUu7uziYUUWwhf4HQoXiUKKICmItQgQLEtCSitoPQlKs5XzvhtAEockDP943d+S5j8RBCIFWNE0LYslidjiOS0AbOv57OZq69+al8ik+b9oSIKMYryB+wMLeBViROFRV5bFGwEQofg7SpwKZ2DwERvq2DMcxCYgglmCdF6CmNsDMsM8NzwfLgEyjJAdmqMATThJYPSHY68ExluunV1IuinTMHJ5+ACcgdOX4ypRh+wjb/njnC3zlMtBKtz8AvZNLEbwfHlpXuxHfmX37+FLvldo33YEhhXSMzSHABIfpByaIp27pRLsYBOwzLroyIB+twcbcGNgBj0DYHTTrVaAM/BagmD0DK8hX++CfjRp/JFXOg1VcvglakrqgWa/AT0UCq7iHQrQkdIHydgdW6eoZpJE4jstSQZUOaPKjjdVnaOEBcdKmPxjebSglj50dIAlA/gCcjhUbIeIMCAAAAABJRU5ErkJggg=="); 101 | } 102 | 103 | #newFile { 104 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABFUlEQVR4XqWTMW6DMBiFn4EhRXCYUFZuwNJ2gm4ZGglKmzQ5QrqnSUFKh4w+ATdg5jQg5I36l7AaqS4SzSe9yf6tT/Yzw0DXdTaAo0wsM8M4QobLZAYkfd+DhquqWkRRNAvDEGOhPbSXZiz8EBdFgez5Bb7vQ0f8GOFtvQFx/DwgCIKYDDBYzJqm0Q4rSyHEr3VlAMYYxlDr9w93cF0XSZJAwg1MpCxLcM6F1D8DyCxMh2xubNsGYeBKrj9gUMJEVHdgDQ084J9YqoF5nsNxHHom6Fg+Lf88IKbh1esKnnerbd92s8V87uH0dZp2idQ+0zRB1HVNBdIa8DRNF/uPPdq2hY7d++6yfWdcwPTfePwLy3SqSN/N9GaEwUgxoQAAAABJRU5ErkJggg=="); 105 | } 106 | 107 | #file-open { 108 | width: 24px; 109 | height: 24px; 110 | display: none; 111 | } 112 | 113 | #saveFile { 114 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAn0lEQVR4XtWRIQvCUBSF7xtPrYNbt2TTYrGbxSr7A2uLa6vC/sGa/8BuXjcvLi0Pli5sK94HQ8X0rg8RDxw45Tv3HZ4ioggACjaCTC070QbeZlesmk5Er0Mfb/m+8DiLYaOJQf0KdOejFezHl0f2wFG/L9Bv2/51guQreebXJzwvsa0K6vSwcnrB7hRtPi5RJhBRwLlkL4d+hPliBra6A4hGJzoos8/eAAAAAElFTkSuQmCC"); 115 | } 116 | 117 | #saveAsFile { 118 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABUElEQVR4Xq2SP0t6UQCGn3O4gd6lJF0aAgkcAqckwrFoc3BpCV0yJIgWQykzlxCnWlsaguAul6YrQTXUZ6ilD9CgJFkh90b0+90u9AfF60WjBw4cDjwvL7xHmKZp8wv8fr9wQAFQ0xrDYJ4s841CB09HS3gxtqrTDUiG4+8DlJ6KHkQnA+ynZwCwLOvCGWBl4AaxqXFON2apHR+QTCbRdX0ROJSDytpajOpemWAwSD6fxzAMgDk5jBwOh8lkMmiaRjweB7hRAPpN+WK9I/6/Ut4t/cil0uc9m802gfW+DYQQjIg3VzmXyzWllPOqqt5JgImA2vNhGo/PFItFL/kWQALb5zsLXSGbiWmuLs8IhUKeMoAAcPbcAqp0UCgU8Pl81Ot1IpFIt+yFEzbaarX+pVIpu1Kp2M5cdrvdfnDeo7ggXAISgAE0gOuvU3Nq3+PCBw3Dg4EkqDYNAAAAAElFTkSuQmCC"); 119 | } 120 | 121 | #undo { 122 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABYklEQVR4XqWSP0hCURTGj9L0pttSBEF/FnlLBC4tCkHwWhpcw9AWG3LQ1aXJgpYaanlLRBEE0R+aHETIxSWKHKSlEmoIAp+D74HL7ZzLe4eEK1p98MHhwO+75557Q1JK8DxPQq9m0FvoNLDAQV+j84ZhUA3EhgPCWDtTJjmd7kPxqp6e2Ljgvpm/EdRD7tV13Xkf4wBW2+3C8k5ZFC/rqg7U/OoA9TJ2TSBQwRChDbC2y/DUbKk6a0WgVFhSXolOAum0+kImOKcLYNjOLMBuMgoxc4ycOM/Fnbg5DqSD0jMBKQ7QiEblneDSaHnrm1bk5yHTHDCkhK45EhTuyWpf0t/63iGOTpqbGiXkjQNwxNAAuELbv2t88nJRx3yFYWDaPikZmyXT6fsc8AuYXsfBMhH8xvAf4EWEH/kn/gfuN0EKv624vX8fCCtJKXVXOKo1PmTWrkqsW/5UOpYDtCG9sD7gG+rYyDksey9wAAAAAElFTkSuQmCC"); 123 | } 124 | 125 | #redo { 126 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABoElEQVR4Xp2STUgiYRjHn0YxMoqoFexm7RolEQWyp5bAQwtBEfRFSXgJllpKiA4LQZGHLtEuBEVBeq4wo4Ig+lxYCaNdrGklQxC7DJbVLuSAQTw9Do7ICzOHHvjN/2Hg/+Md5gVEBHlEUdQRw8QZkSJeiCtiijARmIvUpYdcNhCBjZMIfhrfQl2PBzVdbqwbXceFHR6TSVEQEv8QOpYlZIE2U+YofDPbfz9Orp1D7lzEHmHIHYB9XjD+cFiBHW0me/3h20a5PNhcBV8/V0NhvhZW/FGYIKnv9Abun1KKAvv8blhaBmxmmO238rQ6iUNnSw18MBZB39wv+BmKKwosf6IP0uJoqkzHCBH8Lz5D+RcvqA2XScyTF5RCo1BQPEGooaLUFEskwXMUAev7sjkqtBcX6EBY6lQ3IGL6L9gPgrHsL3KtniG9uyTMRIkS1M0KOOJ42vublfCEARSGvUjvCJ6KShJ1gXwb1SRqgrdIpC7HWvV6/R2FbazVcunqrpeki3vXQHeiltY2YIc9AXuS75tB5KNxpP2b2ieoSnLLrOAVzGxxKcqRQ6cAAAAASUVORK5CYII="); 127 | } 128 | 129 | #find { 130 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABPElEQVR4XqXTsUvDQBTH8W/Sq0OWZi8u7kJHl6KdXLpUQaE6F3QoWfwXnEPApbMUHKxL3AIFC+rWgoOTQRCXgNAuGURTD3lSSTFp8QOPg8D73b1wZ0ynU/7DQMRxnJc0AmqWZY0BZGMUM9Trdf7SbDYruvp6o4YOeUYoUnqXV6Tt7DbodrtEUVRxHGeoQ2pyIkyWEAQBruvaQB8hAcuFADZCkU/Gmo0j5k/g+z5KFSgWFapYwDAMMqUDBo8R5eMe26cB5aMed09vErJgwJ57g3+yqWvre913BxSUuXjAJH5nfdUGQK+6SphmToDcwgrievgKwMPLWNeEJEnIoqS53+rcA3BwdgtAyVrhwqny+ZETIM32+SDksLpGp7XBb+12mzAMMwLEXLPwPI8sxs8IAPLaRvJfEOhvpMlr5AsR/nXV53AYTQAAAABJRU5ErkJggg=="); 131 | } 132 | 133 | #formatCode { 134 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAqElEQVR4Xr2TsQ3DIBAA35ErKo/iFdzTOOmYglGYgs5JQ4nkEZIRUlOlgpJ8kVcK+/VCjnLSCxqOExJdrRWO0NOmlCKZHjiTUuoFCF5Mgi9aa+Awxow4a855RslzU0Bcl9tGcL7M4L2HlNJorb2jZPoUwQln98AeMUZwzg24XQHhBFTBSpCBBGIBCWkIsUBCLGD4XwG3NhQw68/foBfy2wQhBGjl8Hd+A349TEhWzciyAAAAAElFTkSuQmCC"); 135 | } 136 | 137 | #commentCode { 138 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAeklEQVR4XsWTMQ6AIAxFi2GBQzk4cxSP41GYHTxUGWti8uPwI6Zh4E0/afl82hDMTEZYZJAI0VpzRUkpBRgAKaU8otYKTaAOIhVe7XtCzjlAq6ptxypfnPvFBsJNngTMvASYB2ZB2+htAYeo2ZuAbnUkoIY/pn+mcYMbGNk0WEB3QoMAAAAASUVORK5CYII="); 139 | } 140 | 141 | #unCommentCode { 142 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABLklEQVR4XqVSPWjCQBR+kdLhOpiCCJ0yO1js5tKpi0MGSzdRsItd21ULpUs71rkUhCpO3RoQB3/AWSxd3KQtTnYwize4XN8dCXfliNfiBx/fO/Je3pfvAowx4KCUZpBL+DvE7E44jDJA2lgzkKgTQq5gA2KBDrLXHft1PIeDixcgpbbQ0XRxia4ejDbE1rMnwWK9z7rjD6Hx0jPDZ5EMPuE33r+WcJxKiro1mgl1XVdb7HkeF/kC2iyAiiYOx8mubN6UAQZlcWJ57q/Wfu6uBzyPx0o2dKAxhHRAaR6lkbvvwef3CrrVEzh09o0O1AyGyLfaaTrDB53E3i2eb+Q2LQN5C4oLGzlBloPz/24Bc/BRjpSzxRsNt6BD/RvNGURA22pwENFghsWD2AYx2BI/twPNcoBFSQAAAAAASUVORK5CYII="); 143 | } 144 | 145 | #tooltipConfig { 146 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABPklEQVR4XqWSMUjDQBiFX7WCiSCKW9dCFymOCt0qqVAXtXUUnKxiXZzE1cFNsihRi0LqIIKLpIMologOcdRBhOAgggouCr1Ck+b3liaIsTX2g+M/bvj4ee9ARGCMUaXCTD6jCEhH47K0fxOtO3TJJfF/CfbKJma3riM129G5ZDiAwOPYeEJ2Q+9nNbvMJVIAgcf53QvG1y+ET2aVuGQaLQjDB8N8R3LtrKu0kjzkkj5RFHeJCH64LSBToFj+iELZAt0+vhF/+9NxN0gNRVDMJzC4fILN0weMDrxCURQ0Q9M0uAJ1YQTGlY6cFMP98wfSM2mkpDH8xlRm8luITm9PN2RZxupEHOpiAk7dgUurEAVB6KxWqwSObVkgAnLzc2CM/RAU1YPmLTTC3lZ2AnykNgj7hhNc4NUSlBARoR2+ANeesF1RQ/d6AAAAAElFTkSuQmCC"); 147 | } 148 | 149 | #variableConfig { 150 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABJUlEQVR4XpWTsYqEQAyGfZR7lMNeuNbuCnu3tro3OOyFKy0t7N3aahv7tbfYQtQy5xc2EhYWxoEgCZkv/5/B6N1ZluVrnuf7uq5C7PlfFHq2bfucpknyPJcsyySOY4UEA5jM5TRNZRxHqaoKwCNk8geT6rrWqWVZillwVq7Anvnt1fel73tJkgSAym/bFiXkWsfaO1sAfij6BgvUUAMGlDhs7aRf3wyAHSCRhe7xPQyDAoqi0DpqsayXkY1vADR0XSd7jbxBFU8IwGwwmUUDBkDRNs1kayKQCpA6cCAMOwZGPBNFD/D+bZksj17gBFDUmQIgFuT+yVQycrFiYKwfC/RPx5fcGoKCrSLdWWmiMwepHoC3UwDkctE2fBrAP2C/Ll/yUMA/trTmmRyk+VgAAAAASUVORK5CYII="); 151 | } 152 | 153 | #snippetConfig { 154 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAWklEQVR4Xu3TMQ6AMAgF0F/Cwt26qOesLtyNESODJiy16dq3fAbyJyjujoeZOQaJSGF8UGvFX6oayUjOdqFnP7Z3JsxZBasgcD7PnrxH6RdGMlBqHskQ7zzjBk/8Jlfv785rAAAAAElFTkSuQmCC"); 155 | } 156 | 157 | #run { 158 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAm0lEQVR4XrWTPQqDYBBEPUKOYpHCMoWHsEiRiwRrtcoFzAlCilTiHRIQa4s0Eghs8/2Um1SL3TCCC9M+5u2yyXJCCC/nXJrwYwD9R2KMp9WAY1vo9JnUe38VkR0NyOq95peD9mOnpkQCLE1XmRIJsAAlDABKGACUSED5OBuAVrg/b6ZAL3F4D/QSrfL8nakzgsoYACpv/0z8O/8Au3wolvjnFWsAAAAASUVORK5CYII="); 159 | } 160 | 161 | #stop { 162 | background-image: url("data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAALElEQVR4Xu3MMQ0AAAgDwRrABr4x2RUcNMyFT349mEWyN0ugMtRHgAc2w6sBy6IAdMxZ62wAAAAASUVORK5CYII="); 163 | } 164 | 165 | .ace-xcode .ace_gutter { 166 | background: #fff; 167 | color: #333; 168 | border-right: #e0e0e0 solid 1px; 169 | } 170 | 171 | .ace-xcode .ace_gutter-active-line { 172 | background-color: #fff; 173 | } 174 | 175 | .ace-xcode .ace_marker-layer .ace_active-line { 176 | background: rgba(0, 0, 0, 0.04); 177 | border: #e0e0e0 solid; 178 | border-width: 1px 0; 179 | } -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/resources/css/sweetalert2.min.css: -------------------------------------------------------------------------------- 1 | .swal2-modal,.swal2-overlay{position:fixed;display:none}.swal2-modal button.styled:focus,.swal2-modal:focus{outline:0}.swal2-overlay{background-color:rgba(0,0,0,.4);left:0;right:0;top:0;bottom:0;z-index:1000}.swal2-modal{background-color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;border-radius:5px;box-sizing:border-box;text-align:center;left:50%;top:50%;margin-top:-200px;max-height:90%;overflow-x:hidden;overflow-y:auto;z-index:2000}.swal2-modal.loading{overflow-y:hidden}.swal2-modal h2{color:#575757;font-size:30px;text-align:center;font-weight:600;text-transform:none;position:relative;margin:0;padding:0;line-height:60px;display:block}.swal2-modal hr{height:10px;color:transparent;border:0}.swal2-modal button.styled{color:#fff;border:0;box-shadow:none;font-size:17px;font-weight:500;border-radius:5px;padding:10px 32px;margin:0 5px;cursor:pointer}.swal2-content,.swal2-icon{padding:0;position:relative}.swal2-modal button.styled[disabled]{opacity:.4;cursor:no-drop}.swal2-modal button.styled.loading{box-sizing:border-box;border:4px solid transparent;width:40px;height:40px;padding:0;margin:-2px 30px;vertical-align:top;background-color:transparent!important;color:transparent;cursor:default;border-radius:100%;-webkit-animation:rotate-loading 1.5s linear 0s infinite normal;animation:rotate-loading 1.5s linear 0s infinite normal}.swal2-checkbox input,.swal2-checkbox span,.swal2-radio input,.swal2-radio span{vertical-align:middle}.swal2-modal button.styled::-moz-focus-inner{border:0}.swal2-modal .swal2-image{margin:20px auto;max-width:100%}.swal2-modal .swal2-close{font-size:36px;line-height:36px;font-family:serif;position:absolute;top:5px;right:13px;cursor:pointer;color:#cfcfcf;-webkit-transition:all .1s ease;transition:all .1s ease}.swal2-modal .swal2-close:hover{color:#d55}.swal2-content{font-size:18px;text-align:center;font-weight:300;float:none;margin:0;line-height:normal;color:#555}.swal2-icon.swal2-info,.swal2-icon.swal2-question,.swal2-icon.swal2-warning{font-size:60px;line-height:80px;text-align:center}.swal2-icon{width:80px;height:80px;border:4px solid grey;border-radius:50%;margin:20px auto 30px;box-sizing:content-box;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon.swal2-error{border-color:#f27474}.swal2-icon.swal2-error .x-mark{position:relative;display:block}.swal2-icon.swal2-error .line{position:absolute;height:5px;width:47px;background-color:#f27474;display:block;top:37px;border-radius:2px}.swal2-icon.swal2-error .line.left{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.swal2-icon.swal2-error .line.right{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}.swal2-icon.swal2-warning{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#f8bb86;border-color:#f8bb86}.swal2-icon.swal2-info{font-family:"Open Sans",sans-serif;color:#3fc3ee;border-color:#3fc3ee}.swal2-icon.swal2-question{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#c9dae1;border-color:#c9dae1}.swal2-icon.swal2-success{border-color:#a5dc86}.swal2-icon.swal2-success::after,.swal2-icon.swal2-success::before{content:'';position:absolute;width:60px;height:120px;background:#fff}.swal2-icon.swal2-success::before{border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.swal2-icon.swal2-success::after{border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px}.swal2-icon.swal2-success .placeholder{width:80px;height:80px;border:4px solid rgba(165,220,134,.2);border-radius:50%;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.swal2-icon.swal2-success .fix{width:7px;height:90px;background-color:#fff;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-icon.swal2-success .line{height:5px;background-color:#a5dc86;display:block;border-radius:2px;position:absolute;z-index:2}.swal2-icon.swal2-success .line.tip{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal2-icon.swal2-success .line.long{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal2-input:not([type=file]),.swal2-textarea{width:100%;box-sizing:border-box;border-radius:3px;border:1px solid #d7d7d7;margin:20px auto;font-size:18px;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);-webkit-transition:all .3s;transition:all .3s}.swal2-input:not([type=file]).error,.swal2-textarea.error{border-color:#f06e57!important}.swal2-input:not([type=file]):focus,.swal2-textarea:focus{outline:0;box-shadow:0 0 3px #c4e6f5;border:1px solid #b4dbed}.swal2-input:not([type=file]):focus::-moz-placeholder,.swal2-textarea:focus::-moz-placeholder{-webkit-transition:opacity .3s 30ms ease;transition:opacity .3s 30ms ease;opacity:.8}.swal2-input:not([type=file]):focus:-ms-input-placeholder,.swal2-textarea:focus:-ms-input-placeholder{-webkit-transition:opacity .3s 30ms ease;transition:opacity .3s 30ms ease;opacity:.8}.swal2-input:not([type=file]):focus::-webkit-input-placeholder,.swal2-textarea:focus::-webkit-input-placeholder{-webkit-transition:opacity .3s 30ms ease;transition:opacity .3s 30ms ease;opacity:.8}.swal2-input:not([type=file])::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#bdbdbd}.swal2-input:not([type=file]):-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#bdbdbd}.swal2-input:not([type=file])::-webkit-input-placeholder,.swal2-textarea::-webkit-input-placeholder{color:#bdbdbd}.swal2-input:not([type=file]){height:43px;padding:0 12px}.swal2-input[type=file]{font-size:20px;display:inline-block;margin:20px auto}.swal2-textarea{height:108px;padding:12px}.swal2-select{color:#555;font-size:inherit;margin:20px auto;padding:5px 10px;min-width:40%;max-width:100%}.swal2-radio{border:0;margin:20px auto}.swal2-radio label:not(:first-child){margin-left:20px}.swal2-radio input{margin:0 3px 0 0}.swal2-checkbox{color:#555;margin:20px auto}.swal2-validationerror{background-color:#f1f1f1;margin:0 -20px;overflow:hidden;padding:10px;color:#797979;font-size:16px;font-weight:300;display:none}.swal2-validationerror::before{content:"!";display:inline-block;width:24px;height:24px;border-radius:50%;background-color:#ea7d7d;color:#fff;line-height:24px;text-align:center;margin-right:10px}@-webkit-keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showSweetAlert{0%{-webkit-transform:scale(.7);transform:scale(.7)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}@keyframes hideSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.5);transform:scale(.5);opacity:0}}.show-swal2{-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s}.show-swal2.no-animation{-webkit-animation:none;animation:none}.hide-swal2{-webkit-animation:hideSweetAlert .15s;animation:hideSweetAlert .15s}.hide-swal2.no-animation{-webkit-animation:none;animation:none}@-webkit-keyframes animate-success-tip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@keyframes animate-success-tip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@-webkit-keyframes animate-success-long{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@keyframes animate-success-long{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@-webkit-keyframes rotatePlaceholder{0%,5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}100%,12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%,5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}100%,12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}.animate-success-tip{-webkit-animation:animate-success-tip .75s;animation:animate-success-tip .75s}.animate-success-long{-webkit-animation:animate-success-long .75s;animation:animate-success-long .75s}.swal2-icon.swal2-success.animate::after{-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}@-webkit-keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}@keyframes animate-error-icon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}100%{-webkit-transform:rotateX(0);transform:rotateX(0);opacity:1}}.animate-error-icon{-webkit-animation:animate-error-icon .5s;animation:animate-error-icon .5s}@-webkit-keyframes animate-x-mark{0%,50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}@keyframes animate-x-mark{0%,50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}100%{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}.animate-x-mark{-webkit-animation:animate-x-mark .5s;animation:animate-x-mark .5s}@-webkit-keyframes pulse-warning{0%{border-color:#f8d486}100%{border-color:#f8bb86}}@keyframes pulse-warning{0%{border-color:#f8d486}100%{border-color:#f8bb86}}.pulse-warning{-webkit-animation:pulse-warning .75s infinite alternate;animation:pulse-warning .75s infinite alternate}@-webkit-keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate-loading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/resources/css/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-touch{cursor:pointer!important}.tippy-popper{visibility:hidden;max-width:400px;-webkit-perspective:1000px;perspective:1000px;z-index:9999}.tippy-popper.enter{opacity:1;-webkit-transition-property:all;transition-property:all;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.tippy-popper.leave{opacity:0;-webkit-transition-property:all;transition-property:all;-webkit-transition-timing-function:ease-in;transition-timing-function:ease-in}.tippy-popper.html-template{max-width:95%;max-width:calc(100% - 2rem)}.tippy-popper[x-placement=top] [x-arrow]{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);bottom:-5px}.tippy-popper[x-placement=top] [x-circle]{-webkit-transform-origin:0 33%;transform-origin:0 33%}.tippy-popper[x-placement=top] [x-circle].enter{opacity:1;-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement=top] [x-circle].leave{opacity:0;-webkit-transform:scale(0) translate(-50%,-50%);transform:scale(0) translate(-50%,-50%)}.tippy-popper[x-placement=top] [data-animation=none].enter,.tippy-popper[x-placement=top] [data-animation=none].leave{opacity:1;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement=top] [data-animation=perspective].enter{opacity:1;-webkit-transform:translateY(-10px) rotateX(0);transform:translateY(-10px) rotateX(0)}.tippy-popper[x-placement=top] [data-animation=perspective].leave{opacity:0;-webkit-transform:translateY(0) rotateX(90deg);transform:translateY(0) rotateX(90deg)}.tippy-popper[x-placement=top] [data-animation=fade].enter{opacity:1;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement=top] [data-animation=fade].leave{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement=top] [data-animation=shift].enter{opacity:1;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement=top] [data-animation=shift].leave{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement=top] [data-animation=scale].enter{opacity:1;-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement=top] [data-animation=scale].leave{opacity:0;-webkit-transform:translateY(0) scale(0);transform:translateY(0) scale(0)}.tippy-popper[x-placement=bottom] [x-arrow]{-webkit-transform:rotate(135deg);transform:rotate(135deg);top:-5px}.tippy-popper[x-placement=bottom] [x-circle]{-webkit-transform-origin:0 -33%;transform-origin:0 -33%}.tippy-popper[x-placement=bottom] [x-circle].enter{opacity:1;-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement=bottom] [x-circle].leave{opacity:0;-webkit-transform:scale(0) translate(-50%,-50%);transform:scale(0) translate(-50%,-50%)}.tippy-popper[x-placement=bottom] [data-animation=none].enter,.tippy-popper[x-placement=bottom] [data-animation=none].leave{opacity:1;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement=bottom] [data-animation=perspective].enter{opacity:1;-webkit-transform:translateY(10px) rotateX(0);transform:translateY(10px) rotateX(0)}.tippy-popper[x-placement=bottom] [data-animation=perspective].leave{opacity:0;-webkit-transform:translateY(0) rotateX(-90deg);transform:translateY(0) rotateX(-90deg)}.tippy-popper[x-placement=bottom] [data-animation=fade].enter{opacity:1;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement=bottom] [data-animation=fade].leave{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement=bottom] [data-animation=shift].enter{opacity:1;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement=bottom] [data-animation=shift].leave{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement=bottom] [data-animation=scale].enter{opacity:1;-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement=bottom] [data-animation=scale].leave{opacity:0;-webkit-transform:translateY(0) scale(0);transform:translateY(0) scale(0)}.tippy-popper[x-placement=left] [x-arrow]{-webkit-transform:rotate(135deg);transform:rotate(135deg);right:-5px;top:50%}.tippy-popper[x-placement=left] [x-circle]{-webkit-transform-origin:50% 5%;transform-origin:50% 5%}.tippy-popper[x-placement=left] [x-circle].enter{opacity:1;-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement=left] [x-circle].leave{opacity:0;-webkit-transform:scale(0) translate(-50%,-33%);transform:scale(0) translate(-50%,-33%)}.tippy-popper[x-placement=left] [data-animation=none].enter,.tippy-popper[x-placement=left] [data-animation=none].leave{opacity:1;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement=left] [data-animation=perspective].enter{opacity:1;-webkit-transform:translateX(-10px) rotateY(0);transform:translateX(-10px) rotateY(0)}.tippy-popper[x-placement=left] [data-animation=perspective].leave{opacity:0;-webkit-transform:translateX(0) rotateY(-90deg);transform:translateX(0) rotateY(-90deg)}.tippy-popper[x-placement=left] [data-animation=fade].enter{opacity:1;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement=left] [data-animation=fade].leave{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement=left] [data-animation=shift].enter{opacity:1;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement=left] [data-animation=shift].leave{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement=left] [data-animation=scale].enter{opacity:1;-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement=left] [data-animation=scale].leave{opacity:0;-webkit-transform:translateX(0) scale(0);transform:translateX(0) scale(0)}.tippy-popper[x-placement=right] [x-arrow]{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);left:-5px;top:50%}.tippy-popper[x-placement=right] [x-circle]{-webkit-transform-origin:-50% 5%;transform-origin:-50% 5%}.tippy-popper[x-placement=right] [x-circle].enter{opacity:1;-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement=right] [x-circle].leave{opacity:0;-webkit-transform:scale(0) translate(-50%,-33%);transform:scale(0) translate(-50%,-33%)}.tippy-popper[x-placement=right] [data-animation=none].enter,.tippy-popper[x-placement=right] [data-animation=none].leave{opacity:1;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement=right] [data-animation=perspective].enter{opacity:1;-webkit-transform:translateX(10px) rotateY(0);transform:translateX(10px) rotateY(0)}.tippy-popper[x-placement=right] [data-animation=perspective].leave{opacity:0;-webkit-transform:translateX(0) rotateY(90deg);transform:translateX(0) rotateY(90deg)}.tippy-popper[x-placement=right] [data-animation=fade].enter{opacity:1;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement=right] [data-animation=fade].leave{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement=right] [data-animation=shift].enter{opacity:1;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement=right] [data-animation=shift].leave{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement=right] [data-animation=scale].enter{opacity:1;-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement=right] [data-animation=scale].leave{opacity:0;-webkit-transform:translateX(0) scale(0);transform:translateX(0) scale(0)}.tippy-tooltip{position:relative;color:#fff;border-radius:2px;padding:6px 10px;text-align:center;will-change:transform;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#333}.tippy-tooltip [x-arrow]{z-index:-1;position:absolute;width:10px;height:10px;background-color:#333;border:1px solid;border-color:transparent transparent #333 #333}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip [x-circle]{position:absolute;background-color:#333;border-radius:50%;width:130%;width:calc(125% + 2rem);height:0;padding-bottom:130%;padding-bottom:calc(125% + 2rem);left:50%;-webkit-transition:all ease-out;transition:all ease-out;z-index:-1;opacity:0}.tippy-tooltip.light-theme{color:#1F2732;background-color:white;border:1px solid #e0e0e0}.tippy-tooltip.light-theme [x-circle]{background-color:white}.tippy-tooltip.light-theme [x-arrow]{background-color:#f3f6f9;border-color:transparent transparent #ced2e2 #ced2e2}.tippy-tooltip.light-theme[data-animatefill]{background-color:transparent}@media (max-width:500px){.tippy-popper{max-width:95%;max-width:calc(100% - 2rem)}} -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/resources/pdb.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/resources/pdb.pdf -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/editor/snippet.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/Python.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/Python.Runtime.dll -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_asyncio.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_asyncio.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_bz2.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_bz2.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_ctypes.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_ctypes.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_decimal.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_decimal.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_distutils_findvs.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_distutils_findvs.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_elementtree.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_elementtree.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_hashlib.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_hashlib.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_lzma.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_lzma.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_msi.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_msi.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_multiprocessing.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_multiprocessing.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_overlapped.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_overlapped.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_socket.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_socket.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_sqlite3.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_sqlite3.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_ssl.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/_ssl.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/pyexpat.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/pyexpat.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python.exe -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python3.dll -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python36._pth: -------------------------------------------------------------------------------- 1 | python36.zip 2 | . 3 | 4 | # Uncomment to run site.main() automatically 5 | #import site 6 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python36.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python36.dll -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python36.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/python36.zip -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/pythonw.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/pythonw.exe -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/select.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/select.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/sqlite3.dll -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/unicodedata.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/unicodedata.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/vcruntime140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/vcruntime140.dll -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/winsound.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/winsound.pyd -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/__main__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Main entry point.""" 15 | # pylint: disable=invalid-name 16 | import yapf 17 | 18 | yapf.run_main() 19 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/blank_line_calculator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Calculate the number of blank lines between top-level entities. 15 | 16 | Calculates how many blank lines we need between classes, functions, and other 17 | entities at the same level. 18 | 19 | CalculateBlankLines(): the main function exported by this module. 20 | 21 | Annotations: 22 | newlines: The number of newlines required before the node. 23 | """ 24 | 25 | from yapf.yapflib import py3compat 26 | from yapf.yapflib import pytree_utils 27 | from yapf.yapflib import pytree_visitor 28 | from yapf.yapflib import style 29 | 30 | _NO_BLANK_LINES = 1 31 | _ONE_BLANK_LINE = 2 32 | _TWO_BLANK_LINES = 3 33 | 34 | _PYTHON_STATEMENTS = frozenset({ 35 | 'small_stmt', 'expr_stmt', 'print_stmt', 'del_stmt', 'pass_stmt', 36 | 'break_stmt', 'continue_stmt', 'return_stmt', 'raise_stmt', 'yield_stmt', 37 | 'import_stmt', 'global_stmt', 'exec_stmt', 'assert_stmt', 'if_stmt', 38 | 'while_stmt', 'for_stmt', 'try_stmt', 'with_stmt', 'nonlocal_stmt', 39 | 'async_stmt', 'simple_stmt' 40 | }) 41 | 42 | 43 | def CalculateBlankLines(tree): 44 | """Run the blank line calculator visitor over the tree. 45 | 46 | This modifies the tree in place. 47 | 48 | Arguments: 49 | tree: the top-level pytree node to annotate with subtypes. 50 | """ 51 | blank_line_calculator = _BlankLineCalculator() 52 | blank_line_calculator.Visit(tree) 53 | 54 | 55 | class _BlankLineCalculator(pytree_visitor.PyTreeVisitor): 56 | """_BlankLineCalculator - see file-level docstring for a description.""" 57 | 58 | def __init__(self): 59 | self.class_level = 0 60 | self.function_level = 0 61 | self.last_comment_lineno = 0 62 | self.last_was_decorator = False 63 | self.last_was_class_or_function = False 64 | 65 | def Visit_simple_stmt(self, node): # pylint: disable=invalid-name 66 | self.DefaultNodeVisit(node) 67 | if pytree_utils.NodeName(node.children[0]) == 'COMMENT': 68 | self.last_comment_lineno = node.children[0].lineno 69 | 70 | def Visit_decorator(self, node): # pylint: disable=invalid-name 71 | if (self.last_comment_lineno and 72 | self.last_comment_lineno == node.children[0].lineno - 1): 73 | self._SetNumNewlines(node.children[0], _NO_BLANK_LINES) 74 | else: 75 | self._SetNumNewlines(node.children[0], self._GetNumNewlines(node)) 76 | for child in node.children: 77 | self.Visit(child) 78 | self.last_was_decorator = True 79 | 80 | def Visit_classdef(self, node): # pylint: disable=invalid-name 81 | self.last_was_class_or_function = False 82 | index = self._SetBlankLinesBetweenCommentAndClassFunc(node) 83 | self.last_was_decorator = False 84 | self.class_level += 1 85 | for child in node.children[index:]: 86 | self.Visit(child) 87 | self.class_level -= 1 88 | self.last_was_class_or_function = True 89 | 90 | def Visit_funcdef(self, node): # pylint: disable=invalid-name 91 | self.last_was_class_or_function = False 92 | index = self._SetBlankLinesBetweenCommentAndClassFunc(node) 93 | if _AsyncFunction(node): 94 | index = self._SetBlankLinesBetweenCommentAndClassFunc( 95 | node.prev_sibling.parent) 96 | self._SetNumNewlines(node.children[0], None) 97 | else: 98 | index = self._SetBlankLinesBetweenCommentAndClassFunc(node) 99 | self.last_was_decorator = False 100 | self.function_level += 1 101 | for child in node.children[index:]: 102 | self.Visit(child) 103 | self.function_level -= 1 104 | self.last_was_class_or_function = True 105 | 106 | def DefaultNodeVisit(self, node): 107 | """Override the default visitor for Node. 108 | 109 | This will set the blank lines required if the last entity was a class or 110 | function. 111 | 112 | Arguments: 113 | node: (pytree.Node) The node to visit. 114 | """ 115 | if self.last_was_class_or_function: 116 | if pytree_utils.NodeName(node) in _PYTHON_STATEMENTS: 117 | leaf = pytree_utils.FirstLeafNode(node) 118 | self._SetNumNewlines(leaf, self._GetNumNewlines(leaf)) 119 | self.last_was_class_or_function = False 120 | super(_BlankLineCalculator, self).DefaultNodeVisit(node) 121 | 122 | def _SetBlankLinesBetweenCommentAndClassFunc(self, node): 123 | """Set the number of blanks between a comment and class or func definition. 124 | 125 | Class and function definitions have leading comments as children of the 126 | classdef and functdef nodes. 127 | 128 | Arguments: 129 | node: (pytree.Node) The classdef or funcdef node. 130 | 131 | Returns: 132 | The index of the first child past the comment nodes. 133 | """ 134 | index = 0 135 | while pytree_utils.IsCommentStatement(node.children[index]): 136 | # Standalone comments are wrapped in a simple_stmt node with the comment 137 | # node as its only child. 138 | self.Visit(node.children[index].children[0]) 139 | if not self.last_was_decorator: 140 | self._SetNumNewlines(node.children[index].children[0], _ONE_BLANK_LINE) 141 | index += 1 142 | if (index and node.children[index].lineno - 143 | 1 == node.children[index - 1].children[0].lineno): 144 | self._SetNumNewlines(node.children[index], _NO_BLANK_LINES) 145 | else: 146 | if self.last_comment_lineno + 1 == node.children[index].lineno: 147 | num_newlines = _NO_BLANK_LINES 148 | else: 149 | num_newlines = self._GetNumNewlines(node) 150 | self._SetNumNewlines(node.children[index], num_newlines) 151 | return index 152 | 153 | def _GetNumNewlines(self, node): 154 | if self.last_was_decorator: 155 | return _NO_BLANK_LINES 156 | elif self._IsTopLevel(node): 157 | return 1 + style.Get('BLANK_LINES_AROUND_TOP_LEVEL_DEFINITION') 158 | return _ONE_BLANK_LINE 159 | 160 | def _SetNumNewlines(self, node, num_newlines): 161 | pytree_utils.SetNodeAnnotation(node, pytree_utils.Annotation.NEWLINES, 162 | num_newlines) 163 | 164 | def _IsTopLevel(self, node): 165 | return (not (self.class_level or self.function_level) and 166 | _StartsInZerothColumn(node)) 167 | 168 | 169 | def _StartsInZerothColumn(node): 170 | return (pytree_utils.FirstLeafNode(node).column == 0 or 171 | (_AsyncFunction(node) and node.prev_sibling.column == 0)) 172 | 173 | 174 | def _AsyncFunction(node): 175 | return (py3compat.PY3 and node.prev_sibling and 176 | pytree_utils.NodeName(node.prev_sibling) == 'ASYNC') 177 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/continuation_splicer.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Insert "continuation" nodes into lib2to3 tree. 15 | 16 | The "backslash-newline" continuation marker is shoved into the node's prefix. 17 | Pull them out and make it into nodes of their own. 18 | 19 | SpliceContinuations(): the main function exported by this module. 20 | """ 21 | 22 | from lib2to3 import pytree 23 | 24 | from yapf.yapflib import format_token 25 | 26 | 27 | def SpliceContinuations(tree): 28 | """Given a pytree, splice the continuation marker into nodes. 29 | 30 | Arguments: 31 | tree: (pytree.Node) The tree to work on. The tree is modified by this 32 | function. 33 | """ 34 | 35 | def RecSplicer(node): 36 | """Inserts a continuation marker into the node.""" 37 | if isinstance(node, pytree.Leaf): 38 | if node.prefix.lstrip().startswith('\\\n'): 39 | new_lineno = node.lineno - node.prefix.count('\n') 40 | return pytree.Leaf( 41 | type=format_token.CONTINUATION, 42 | value=node.prefix, 43 | context=('', (new_lineno, 0))) 44 | return None 45 | num_inserted = 0 46 | for index, child in enumerate(node.children[:]): 47 | continuation_node = RecSplicer(child) 48 | if continuation_node: 49 | node.children.insert(index + num_inserted, continuation_node) 50 | num_inserted += 1 51 | 52 | RecSplicer(tree) 53 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/errors.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """YAPF error object.""" 15 | 16 | 17 | class YapfError(Exception): 18 | """Parent class for user errors or input errors. 19 | 20 | Exceptions of this type are handled by the command line tool 21 | and result in clear error messages, as opposed to backtraces. 22 | """ 23 | pass 24 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/file_resources.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Interface to file resources. 15 | 16 | This module provides functions for interfacing with files: opening, writing, and 17 | querying. 18 | """ 19 | 20 | import fnmatch 21 | import os 22 | import re 23 | 24 | from lib2to3.pgen2 import tokenize 25 | 26 | from yapf.yapflib import errors 27 | from yapf.yapflib import py3compat 28 | from yapf.yapflib import style 29 | 30 | CR = '\r' 31 | LF = '\n' 32 | CRLF = '\r\n' 33 | 34 | 35 | def GetDefaultStyleForDir(dirname): 36 | """Return default style name for a given directory. 37 | 38 | Looks for .style.yapf or setup.cfg in the parent directories. 39 | 40 | Arguments: 41 | dirname: (unicode) The name of the directory. 42 | 43 | Returns: 44 | The filename if found, otherwise return the global default (pep8). 45 | """ 46 | dirname = os.path.abspath(dirname) 47 | while True: 48 | # See if we have a .style.yapf file. 49 | style_file = os.path.join(dirname, style.LOCAL_STYLE) 50 | if os.path.exists(style_file): 51 | return style_file 52 | 53 | # See if we have a setup.cfg file with a '[yapf]' section. 54 | config_file = os.path.join(dirname, style.SETUP_CONFIG) 55 | if os.path.exists(config_file): 56 | with open(config_file) as fd: 57 | config = py3compat.ConfigParser() 58 | config.read_file(fd) 59 | if config.has_section('yapf'): 60 | return config_file 61 | 62 | dirname = os.path.dirname(dirname) 63 | if (not dirname or not os.path.basename(dirname) or 64 | dirname == os.path.abspath(os.path.sep)): 65 | break 66 | 67 | global_file = os.path.expanduser(style.GLOBAL_STYLE) 68 | if os.path.exists(global_file): 69 | return global_file 70 | 71 | return style.DEFAULT_STYLE 72 | 73 | 74 | def GetCommandLineFiles(command_line_file_list, recursive, exclude): 75 | """Return the list of files specified on the command line.""" 76 | return _FindPythonFiles(command_line_file_list, recursive, exclude) 77 | 78 | 79 | def WriteReformattedCode(filename, 80 | reformatted_code, 81 | encoding='', 82 | in_place=False): 83 | """Emit the reformatted code. 84 | 85 | Write the reformatted code into the file, if in_place is True. Otherwise, 86 | write to stdout. 87 | 88 | Arguments: 89 | filename: (unicode) The name of the unformatted file. 90 | reformatted_code: (unicode) The reformatted code. 91 | encoding: (unicode) The encoding of the file. 92 | in_place: (bool) If True, then write the reformatted code to the file. 93 | """ 94 | if in_place: 95 | with py3compat.open_with_encoding( 96 | filename, mode='w', encoding=encoding, newline='') as fd: 97 | fd.write(reformatted_code) 98 | else: 99 | py3compat.EncodeAndWriteToStdout(reformatted_code) 100 | 101 | 102 | def LineEnding(lines): 103 | """Retrieve the line ending of the original source.""" 104 | endings = {CRLF: 0, CR: 0, LF: 0} 105 | for line in lines: 106 | if line.endswith(CRLF): 107 | endings[CRLF] += 1 108 | elif line.endswith(CR): 109 | endings[CR] += 1 110 | elif line.endswith(LF): 111 | endings[LF] += 1 112 | return (sorted(endings, key=endings.get, reverse=True) or [LF])[0] 113 | 114 | 115 | def _FindPythonFiles(filenames, recursive, exclude): 116 | """Find all Python files.""" 117 | if exclude and any(e.startswith('./') for e in exclude): 118 | raise errors.YapfError("path in '--exclude' should not start with ./") 119 | 120 | python_files = [] 121 | for filename in filenames: 122 | if filename != '.' and exclude and IsIgnored(filename, exclude): 123 | continue 124 | if os.path.isdir(filename): 125 | if recursive: 126 | # TODO(morbo): Look into a version of os.walk that can handle recursion. 127 | excluded_dirs = [] 128 | for dirpath, _, filelist in os.walk(filename): 129 | if dirpath != '.' and exclude and IsIgnored(dirpath, exclude): 130 | excluded_dirs.append(dirpath) 131 | continue 132 | elif any(dirpath.startswith(e) for e in excluded_dirs): 133 | continue 134 | for f in filelist: 135 | filepath = os.path.join(dirpath, f) 136 | if exclude and IsIgnored(filepath, exclude): 137 | continue 138 | if IsPythonFile(filepath): 139 | python_files.append(filepath) 140 | else: 141 | raise errors.YapfError( 142 | "directory specified without '--recursive' flag: %s" % filename) 143 | elif os.path.isfile(filename): 144 | python_files.append(filename) 145 | 146 | return python_files 147 | 148 | 149 | def IsIgnored(path, exclude): 150 | """Return True if filename matches any patterns in exclude.""" 151 | path = path.lstrip('/') 152 | while path.startswith('./'): 153 | path = path[2:] 154 | return any(fnmatch.fnmatch(path, e.rstrip('/')) for e in exclude) 155 | 156 | 157 | def IsPythonFile(filename): 158 | """Return True if filename is a Python file.""" 159 | if os.path.splitext(filename)[1] == '.py': 160 | return True 161 | 162 | try: 163 | with open(filename, 'rb') as fd: 164 | encoding = tokenize.detect_encoding(fd.readline)[0] 165 | 166 | # Check for correctness of encoding. 167 | with py3compat.open_with_encoding( 168 | filename, mode='r', encoding=encoding) as fd: 169 | fd.read() 170 | except UnicodeDecodeError: 171 | encoding = 'latin-1' 172 | except (IOError, SyntaxError): 173 | # If we fail to detect encoding (or the encoding cookie is incorrect - which 174 | # will make detect_encoding raise SyntaxError), assume it's not a Python 175 | # file. 176 | return False 177 | 178 | try: 179 | with py3compat.open_with_encoding( 180 | filename, mode='r', encoding=encoding) as fd: 181 | first_line = fd.readline(256) 182 | except IOError: 183 | return False 184 | 185 | return re.match(r'^#!.*\bpython[23]?\b', first_line) 186 | 187 | 188 | def FileEncoding(filename): 189 | """Return the file's encoding.""" 190 | with open(filename, 'rb') as fd: 191 | return tokenize.detect_encoding(fd.readline)[0] 192 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/identify_container.py: -------------------------------------------------------------------------------- 1 | # Copyright 2018 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Identify containers for lib2to3 trees. 15 | 16 | This module identifies containers and the elements in them. Each element points 17 | to the opening bracket and vice-versa. 18 | 19 | IdentifyContainers(): the main function exported by this module. 20 | """ 21 | 22 | from yapf.yapflib import pytree_utils 23 | from yapf.yapflib import pytree_visitor 24 | 25 | 26 | def IdentifyContainers(tree): 27 | """Run the identify containers visitor over the tree, modifying it in place. 28 | 29 | Arguments: 30 | tree: the top-level pytree node to annotate with subtypes. 31 | """ 32 | identify_containers = _IdentifyContainers() 33 | identify_containers.Visit(tree) 34 | 35 | 36 | class _IdentifyContainers(pytree_visitor.PyTreeVisitor): 37 | """_IdentifyContainers - see file-level docstring for detailed description.""" 38 | 39 | def Visit_trailer(self, node): # pylint: disable=invalid-name 40 | for child in node.children: 41 | self.Visit(child) 42 | 43 | if len(node.children) != 3: 44 | return 45 | if pytree_utils.NodeName(node.children[0]) != 'LPAR': 46 | return 47 | 48 | if pytree_utils.NodeName(node.children[1]) == 'arglist': 49 | for child in node.children[1].children: 50 | pytree_utils.SetOpeningBracket( 51 | pytree_utils.FirstLeafNode(child), node.children[0]) 52 | else: 53 | pytree_utils.SetOpeningBracket( 54 | pytree_utils.FirstLeafNode(node.children[1]), node.children[0]) 55 | 56 | def Visit_atom(self, node): # pylint: disable=invalid-name 57 | for child in node.children: 58 | self.Visit(child) 59 | 60 | if len(node.children) != 3: 61 | return 62 | if pytree_utils.NodeName(node.children[0]) != 'LPAR': 63 | return 64 | 65 | for child in node.children[1].children: 66 | pytree_utils.SetOpeningBracket( 67 | pytree_utils.FirstLeafNode(child), node.children[0]) 68 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/line_joiner.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Join unwrapped lines together. 15 | 16 | Determine how many lines can be joined into one line. For instance, we could 17 | join these statements into one line: 18 | 19 | if a == 42: 20 | continue 21 | 22 | like this: 23 | 24 | if a == 42: continue 25 | 26 | There are a few restrictions: 27 | 28 | 1. The lines should have been joined in the original source. 29 | 2. The joined lines must not go over the column boundary if placed on the same 30 | line. 31 | 3. They need to be very simple statements. 32 | 33 | Note: Because we don't allow the use of a semicolon to separate statements, it 34 | follows that there can only be at most two lines to join. 35 | """ 36 | 37 | from yapf.yapflib import style 38 | 39 | _CLASS_OR_FUNC = frozenset({'def', 'class'}) 40 | 41 | 42 | def CanMergeMultipleLines(lines, last_was_merged=False): 43 | """Determine if multiple lines can be joined into one. 44 | 45 | Arguments: 46 | lines: (list of UnwrappedLine) This is a splice of UnwrappedLines from the 47 | full code base. 48 | last_was_merged: (bool) The last line was merged. 49 | 50 | Returns: 51 | True if two consecutive lines can be joined together. In reality, this will 52 | only happen if two consecutive lines can be joined, due to the style guide. 53 | """ 54 | # The indentation amount for the starting line (number of spaces). 55 | indent_amt = lines[0].depth * style.Get('INDENT_WIDTH') 56 | if len(lines) == 1 or indent_amt > style.Get('COLUMN_LIMIT'): 57 | return False 58 | 59 | if (len(lines) >= 3 and lines[2].depth >= lines[1].depth and 60 | lines[0].depth != lines[2].depth): 61 | # If lines[2]'s depth is greater than or equal to line[1]'s depth, we're not 62 | # looking at a single statement (e.g., if-then, while, etc.). A following 63 | # line with the same depth as the first line isn't part of the lines we 64 | # would want to combine. 65 | return False # Don't merge more than two lines together. 66 | 67 | if lines[0].first.value in _CLASS_OR_FUNC: 68 | # Don't join lines onto the starting line of a class or function. 69 | return False 70 | 71 | limit = style.Get('COLUMN_LIMIT') - indent_amt 72 | if lines[0].last.total_length < limit: 73 | limit -= lines[0].last.total_length 74 | 75 | if lines[0].first.value == 'if': 76 | return _CanMergeLineIntoIfStatement(lines, limit) 77 | if last_was_merged and lines[0].first.value in {'elif', 'else'}: 78 | return _CanMergeLineIntoIfStatement(lines, limit) 79 | 80 | # TODO(morbo): Other control statements? 81 | 82 | return False 83 | 84 | 85 | def _CanMergeLineIntoIfStatement(lines, limit): 86 | """Determine if we can merge a short if-then statement into one line. 87 | 88 | Two lines of an if-then statement can be merged if they were that way in the 89 | original source, fit on the line without going over the column limit, and are 90 | considered "simple" statements --- typically statements like 'pass', 91 | 'continue', and 'break'. 92 | 93 | Arguments: 94 | lines: (list of UnwrappedLine) The lines we are wanting to merge. 95 | limit: (int) The amount of space remaining on the line. 96 | 97 | Returns: 98 | True if the lines can be merged, False otherwise. 99 | """ 100 | if len(lines[1].tokens) == 1 and lines[1].last.is_multiline_string: 101 | # This might be part of a multiline shebang. 102 | return True 103 | if lines[0].lineno != lines[1].lineno: 104 | # Don't merge lines if the original lines weren't merged. 105 | return False 106 | if lines[1].last.total_length >= limit: 107 | # Don't merge lines if the result goes over the column limit. 108 | return False 109 | return style.Get('JOIN_MULTIPLE_LINES') 110 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/object_state.py: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Represents the state of Python objects being formatted. 15 | 16 | Objects (e.g., list comprehensions, dictionaries, etc.) have specific 17 | requirements on how they're formatted. These state objects keep track of these 18 | requirements. 19 | """ 20 | 21 | from __future__ import absolute_import 22 | from __future__ import division 23 | from __future__ import print_function 24 | 25 | 26 | class ComprehensionState(object): 27 | """Maintains the state of list comprehension formatting decisions. 28 | 29 | A stack of ComprehensionState objects are kept to ensure that list 30 | comprehensions are wrapped with well-defined rules. 31 | 32 | Attributes: 33 | expr_token: The first token in the comprehension. 34 | for_token: The first 'for' token of the comprehension. 35 | has_split_at_for: Whether there is a newline immediately before the 36 | for_token. 37 | has_interior_split: Whether there is a newline within the comprehension. 38 | That is, a split somewhere after expr_token or before closing_bracket. 39 | """ 40 | 41 | def __init__(self, expr_token): 42 | self.expr_token = expr_token 43 | self.for_token = None 44 | self.has_split_at_for = False 45 | self.has_interior_split = False 46 | 47 | def HasTrivialExpr(self): 48 | """Returns whether the comp_expr is "trivial" i.e. is a single token.""" 49 | return self.expr_token.next_token.value == 'for' 50 | 51 | @property 52 | def opening_bracket(self): 53 | return self.expr_token.previous_token 54 | 55 | @property 56 | def closing_bracket(self): 57 | return self.opening_bracket.matching_bracket 58 | 59 | def Clone(self): 60 | clone = ComprehensionState(self.expr_token) 61 | clone.for_token = self.for_token 62 | clone.has_split_at_for = self.has_split_at_for 63 | clone.has_interior_split = self.has_interior_split 64 | return clone 65 | 66 | def __repr__(self): 67 | return ('[opening_bracket::%s, for_token::%s, has_split_at_for::%s,' 68 | ' has_interior_split::%s, has_trivial_expr::%s]' % 69 | (self.opening_bracket, self.for_token, self.has_split_at_for, 70 | self.has_interior_split, self.HasTrivialExpr())) 71 | 72 | def __eq__(self, other): 73 | return hash(self) == hash(other) 74 | 75 | def __ne__(self, other): 76 | return not self == other 77 | 78 | def __hash__(self, *args, **kwargs): 79 | return hash((self.expr_token, self.for_token, self.has_split_at_for, 80 | self.has_interior_split)) 81 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/py3compat.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Utilities for Python2 / Python3 compatibility.""" 15 | 16 | import io 17 | import os 18 | import sys 19 | 20 | PY3 = sys.version_info[0] >= 3 21 | PY36 = sys.version_info[0] >= 3 and sys.version_info[1] >= 6 22 | 23 | if PY3: 24 | StringIO = io.StringIO 25 | BytesIO = io.BytesIO 26 | 27 | import codecs 28 | 29 | def open_with_encoding(filename, mode, encoding, newline=''): # pylint: disable=unused-argument 30 | return codecs.open(filename, mode=mode, encoding=encoding) 31 | 32 | import functools 33 | lru_cache = functools.lru_cache 34 | 35 | range = range 36 | ifilter = filter 37 | 38 | def raw_input(): 39 | wrapper = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8') 40 | return wrapper.buffer.raw.readall().decode('utf-8') 41 | 42 | import configparser 43 | 44 | # Mappings from strings to booleans (such as '1' to True, 'false' to False, 45 | # etc.) 46 | CONFIGPARSER_BOOLEAN_STATES = configparser.ConfigParser.BOOLEAN_STATES 47 | else: 48 | import __builtin__ 49 | import cStringIO 50 | StringIO = BytesIO = cStringIO.StringIO 51 | 52 | open_with_encoding = io.open 53 | 54 | # Python 2.7 doesn't have a native LRU cache, so do nothing. 55 | def lru_cache(maxsize=128, typed=False): 56 | 57 | def fake_wrapper(user_function): 58 | return user_function 59 | 60 | return fake_wrapper 61 | 62 | range = xrange 63 | 64 | from itertools import ifilter 65 | raw_input = raw_input 66 | 67 | import ConfigParser as configparser 68 | CONFIGPARSER_BOOLEAN_STATES = configparser.ConfigParser._boolean_states # pylint: disable=protected-access 69 | 70 | 71 | def EncodeAndWriteToStdout(s, encoding='utf-8'): 72 | """Encode the given string and emit to stdout. 73 | 74 | The string may contain non-ascii characters. This is a problem when stdout is 75 | redirected, because then Python doesn't know the encoding and we may get a 76 | UnicodeEncodeError. 77 | 78 | Arguments: 79 | s: (string) The string to encode. 80 | encoding: (string) The encoding of the string. 81 | """ 82 | if PY3: 83 | sys.stdout.buffer.write(s.encode(encoding)) 84 | elif sys.platform == 'win32': 85 | # On python 2 and Windows universal newline transformation will be in 86 | # effect on stdout. Python 2 will not let us avoid the easily because 87 | # it happens based on whether the file handle is opened in O_BINARY or 88 | # O_TEXT state. However we can tell Windows itself to change the current 89 | # mode, and python 2 will follow suit. However we must take care to change 90 | # the mode on the actual external stdout not just the current sys.stdout 91 | # which may have been monkey-patched inside the python environment. 92 | import msvcrt # pylint: disable=g-import-not-at-top 93 | if sys.__stdout__ is sys.stdout: 94 | msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) 95 | sys.stdout.write(s.encode(encoding)) 96 | else: 97 | sys.stdout.write(s.encode(encoding)) 98 | 99 | 100 | if PY3: 101 | basestring = str 102 | unicode = str # pylint: disable=redefined-builtin,invalid-name 103 | else: 104 | basestring = basestring 105 | 106 | def unicode(s): # pylint: disable=invalid-name 107 | """Force conversion of s to unicode.""" 108 | return __builtin__.unicode(s, 'utf-8') 109 | 110 | 111 | # In Python 3.2+, readfp is deprecated in favor of read_file, which doesn't 112 | # exist in Python 2 yet. To avoid deprecation warnings, subclass ConfigParser to 113 | # fix this - now read_file works across all Python versions we care about. 114 | class ConfigParser(configparser.ConfigParser): 115 | if not PY3: 116 | 117 | def read_file(self, fp, source=None): 118 | self.readfp(fp, filename=source) 119 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/pytree_visitor.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Generic visitor pattern for pytrees. 15 | 16 | The lib2to3 parser produces a "pytree" - syntax tree consisting of Node 17 | and Leaf types. This module implements a visitor pattern for such trees. 18 | 19 | It also exports a basic "dumping" visitor that dumps a textual representation of 20 | a pytree into a stream. 21 | 22 | PyTreeVisitor: a generic visitor pattern fo pytrees. 23 | PyTreeDumper: a configurable "dumper" for displaying pytrees. 24 | DumpPyTree(): a convenience function to dump a pytree. 25 | """ 26 | 27 | import sys 28 | 29 | from lib2to3 import pytree 30 | 31 | from yapf.yapflib import pytree_utils 32 | 33 | 34 | class PyTreeVisitor(object): 35 | """Visitor pattern for pytree trees. 36 | 37 | Methods named Visit_XXX will be invoked when a node with type XXX is 38 | encountered in the tree. The type is either a token type (for Leaf nodes) or 39 | grammar symbols (for Node nodes). The return value of Visit_XXX methods is 40 | ignored by the visitor. 41 | 42 | Visitors can modify node contents but must not change the tree structure 43 | (e.g. add/remove children and move nodes around). 44 | 45 | This is a very common visitor pattern in Python code; it's also used in the 46 | Python standard library ast module for providing AST visitors. 47 | 48 | Note: this makes names that aren't style conformant, so such visitor methods 49 | need to be marked with # pylint: disable=invalid-name We don't have a choice 50 | here, because lib2to3 nodes have under_separated names. 51 | 52 | For more complex behavior, the visit, DefaultNodeVisit and DefaultLeafVisit 53 | methods can be overridden. Don't forget to invoke DefaultNodeVisit for nodes 54 | that may have children - otherwise the children will not be visited. 55 | """ 56 | 57 | def Visit(self, node): 58 | """Visit a node.""" 59 | method = 'Visit_{0}'.format(pytree_utils.NodeName(node)) 60 | if hasattr(self, method): 61 | # Found a specific visitor for this node 62 | getattr(self, method)(node) 63 | else: 64 | if isinstance(node, pytree.Leaf): 65 | self.DefaultLeafVisit(node) 66 | else: 67 | self.DefaultNodeVisit(node) 68 | 69 | def DefaultNodeVisit(self, node): 70 | """Default visitor for Node: visits the node's children depth-first. 71 | 72 | This method is invoked when no specific visitor for the node is defined. 73 | 74 | Arguments: 75 | node: the node to visit 76 | """ 77 | for child in node.children: 78 | self.Visit(child) 79 | 80 | def DefaultLeafVisit(self, leaf): 81 | """Default visitor for Leaf: no-op. 82 | 83 | This method is invoked when no specific visitor for the leaf is defined. 84 | 85 | Arguments: 86 | leaf: the leaf to visit 87 | """ 88 | pass 89 | 90 | 91 | def DumpPyTree(tree, target_stream=sys.stdout): 92 | """Convenience function for dumping a given pytree. 93 | 94 | This function presents a very minimal interface. For more configurability (for 95 | example, controlling how specific node types are displayed), use PyTreeDumper 96 | directly. 97 | 98 | Arguments: 99 | tree: the tree to dump. 100 | target_stream: the stream to dump the tree to. A file-like object. By 101 | default will dump into stdout. 102 | """ 103 | dumper = PyTreeDumper(target_stream) 104 | dumper.Visit(tree) 105 | 106 | 107 | class PyTreeDumper(PyTreeVisitor): 108 | """Visitor that dumps the tree to a stream. 109 | 110 | Implements the PyTreeVisitor interface. 111 | """ 112 | 113 | def __init__(self, target_stream=sys.stdout): 114 | """Create a tree dumper. 115 | 116 | Arguments: 117 | target_stream: the stream to dump the tree to. A file-like object. By 118 | default will dump into stdout. 119 | """ 120 | self._target_stream = target_stream 121 | self._current_indent = 0 122 | 123 | def _DumpString(self, s): 124 | self._target_stream.write('{0}{1}\n'.format(' ' * self._current_indent, s)) 125 | 126 | def DefaultNodeVisit(self, node): 127 | # Dump information about the current node, and then use the generic 128 | # DefaultNodeVisit visitor to dump each of its children. 129 | self._DumpString(pytree_utils.DumpNodeToString(node)) 130 | self._current_indent += 2 131 | super(PyTreeDumper, self).DefaultNodeVisit(node) 132 | self._current_indent -= 2 133 | 134 | def DefaultLeafVisit(self, leaf): 135 | self._DumpString(pytree_utils.DumpNodeToString(leaf)) 136 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/verifier.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Verify that the generated code is valid code. 15 | 16 | This takes a line of code and "normalizes" it. I.e., it transforms the snippet 17 | into something that has the potential to compile. 18 | 19 | VerifyCode(): the main function exported by this module. 20 | """ 21 | 22 | import ast 23 | import re 24 | import sys 25 | import textwrap 26 | 27 | 28 | class InternalError(Exception): 29 | """Internal error in verifying formatted code.""" 30 | pass 31 | 32 | 33 | def VerifyCode(code): 34 | """Verify that the reformatted code is syntactically correct. 35 | 36 | Arguments: 37 | code: (unicode) The reformatted code snippet. 38 | 39 | Raises: 40 | SyntaxError if the code was reformatted incorrectly. 41 | """ 42 | try: 43 | compile(textwrap.dedent(code).encode('UTF-8'), '', 'exec') 44 | except SyntaxError: 45 | try: 46 | ast.parse(textwrap.dedent(code.lstrip('\n')).lstrip(), '', 'exec') 47 | except SyntaxError: 48 | try: 49 | normalized_code = _NormalizeCode(code) 50 | compile(normalized_code.encode('UTF-8'), '', 'exec') 51 | except SyntaxError: 52 | raise InternalError(sys.exc_info()[1]) 53 | 54 | 55 | def _NormalizeCode(code): 56 | """Make sure that the code snippet is compilable.""" 57 | code = textwrap.dedent(code.lstrip('\n')).lstrip() 58 | 59 | # Split the code to lines and get rid of all leading full-comment lines as 60 | # they can mess up the normalization attempt. 61 | lines = code.split('\n') 62 | i = 0 63 | for i, line in enumerate(lines): 64 | line = line.strip() 65 | if line and not line.startswith('#'): 66 | break 67 | code = '\n'.join(lines[i:]) + '\n' 68 | 69 | if re.match(r'(if|while|for|with|def|class|async|await)\b', code): 70 | code += '\n pass' 71 | elif re.match(r'(elif|else)\b', code): 72 | try: 73 | try_code = 'if True:\n pass\n' + code + '\n pass' 74 | ast.parse( 75 | textwrap.dedent(try_code.lstrip('\n')).lstrip(), '', 'exec') 76 | code = try_code 77 | except SyntaxError: 78 | # The assumption here is that the code is on a single line. 79 | code = 'if True: pass\n' + code 80 | elif code.startswith('@'): 81 | code += '\ndef _():\n pass' 82 | elif re.match(r'try\b', code): 83 | code += '\n pass\nexcept:\n pass' 84 | elif re.match(r'(except|finally)\b', code): 85 | code = 'try:\n pass\n' + code + '\n pass' 86 | elif re.match(r'(return|yield)\b', code): 87 | code = 'def _():\n ' + code 88 | elif re.match(r'(continue|break)\b', code): 89 | code = 'while True:\n ' + code 90 | elif re.match(r'print\b', code): 91 | code = 'from __future__ import print_function\n' + code 92 | 93 | return code + '\n' 94 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/bin/Debug/components/python/yapf/yapflib/yapf_api.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Google Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """Entry points for YAPF. 15 | 16 | The main APIs that YAPF exposes to drive the reformatting. 17 | 18 | FormatFile(): reformat a file. 19 | FormatCode(): reformat a string of code. 20 | 21 | These APIs have some common arguments: 22 | 23 | style_config: (string) Either a style name or a path to a file that contains 24 | formatting style settings. If None is specified, use the default style 25 | as set in style.DEFAULT_STYLE_FACTORY 26 | lines: (list of tuples of integers) A list of tuples of lines, [start, end], 27 | that we want to format. The lines are 1-based indexed. It can be used by 28 | third-party code (e.g., IDEs) when reformatting a snippet of code rather 29 | than a whole file. 30 | print_diff: (bool) Instead of returning the reformatted source, return a 31 | diff that turns the formatted source into reformatter source. 32 | verify: (bool) True if reformatted code should be verified for syntax. 33 | """ 34 | 35 | import difflib 36 | import re 37 | import sys 38 | 39 | from lib2to3.pgen2 import parse 40 | 41 | from yapf.yapflib import blank_line_calculator 42 | from yapf.yapflib import comment_splicer 43 | from yapf.yapflib import continuation_splicer 44 | from yapf.yapflib import file_resources 45 | from yapf.yapflib import identify_container 46 | from yapf.yapflib import py3compat 47 | from yapf.yapflib import pytree_unwrapper 48 | from yapf.yapflib import pytree_utils 49 | from yapf.yapflib import reformatter 50 | from yapf.yapflib import split_penalty 51 | from yapf.yapflib import style 52 | from yapf.yapflib import subtype_assigner 53 | 54 | 55 | def FormatFile(filename, 56 | style_config=None, 57 | lines=None, 58 | print_diff=False, 59 | verify=False, 60 | in_place=False, 61 | logger=None): 62 | """Format a single Python file and return the formatted code. 63 | 64 | Arguments: 65 | filename: (unicode) The file to reformat. 66 | in_place: (bool) If True, write the reformatted code back to the file. 67 | logger: (io streamer) A stream to output logging. 68 | remaining arguments: see comment at the top of this module. 69 | 70 | Returns: 71 | Tuple of (reformatted_code, encoding, changed). reformatted_code is None if 72 | the file is successfully written to (having used in_place). reformatted_code 73 | is a diff if print_diff is True. 74 | 75 | Raises: 76 | IOError: raised if there was an error reading the file. 77 | ValueError: raised if in_place and print_diff are both specified. 78 | """ 79 | _CheckPythonVersion() 80 | 81 | if in_place and print_diff: 82 | raise ValueError('Cannot pass both in_place and print_diff.') 83 | 84 | original_source, newline, encoding = ReadFile(filename, logger) 85 | reformatted_source, changed = FormatCode( 86 | original_source, 87 | style_config=style_config, 88 | filename=filename, 89 | lines=lines, 90 | print_diff=print_diff, 91 | verify=verify) 92 | if reformatted_source.rstrip('\n'): 93 | lines = reformatted_source.rstrip('\n').split('\n') 94 | reformatted_source = newline.join(line for line in lines) + newline 95 | if in_place: 96 | if original_source and original_source != reformatted_source: 97 | file_resources.WriteReformattedCode(filename, reformatted_source, 98 | encoding, in_place) 99 | return None, encoding, changed 100 | 101 | return reformatted_source, encoding, changed 102 | 103 | 104 | def FormatCode(unformatted_source, 105 | filename='', 106 | style_config=None, 107 | lines=None, 108 | print_diff=False, 109 | verify=False): 110 | """Format a string of Python code. 111 | 112 | This provides an alternative entry point to YAPF. 113 | 114 | Arguments: 115 | unformatted_source: (unicode) The code to format. 116 | filename: (unicode) The name of the file being reformatted. 117 | remaining arguments: see comment at the top of this module. 118 | 119 | Returns: 120 | Tuple of (reformatted_source, changed). reformatted_source conforms to the 121 | desired formatting style. changed is True if the source changed. 122 | """ 123 | _CheckPythonVersion() 124 | style.SetGlobalStyle(style.CreateStyleFromConfig(style_config)) 125 | if not unformatted_source.endswith('\n'): 126 | unformatted_source += '\n' 127 | 128 | try: 129 | tree = pytree_utils.ParseCodeToTree(unformatted_source) 130 | except parse.ParseError as e: 131 | e.msg = filename + ': ' + e.msg 132 | raise 133 | 134 | # Run passes on the tree, modifying it in place. 135 | comment_splicer.SpliceComments(tree) 136 | continuation_splicer.SpliceContinuations(tree) 137 | subtype_assigner.AssignSubtypes(tree) 138 | identify_container.IdentifyContainers(tree) 139 | split_penalty.ComputeSplitPenalties(tree) 140 | blank_line_calculator.CalculateBlankLines(tree) 141 | 142 | uwlines = pytree_unwrapper.UnwrapPyTree(tree) 143 | for uwl in uwlines: 144 | uwl.CalculateFormattingInformation() 145 | 146 | lines = _LineRangesToSet(lines) 147 | _MarkLinesToFormat(uwlines, lines) 148 | reformatted_source = reformatter.Reformat( 149 | _SplitSemicolons(uwlines), verify, lines) 150 | 151 | if unformatted_source == reformatted_source: 152 | return '' if print_diff else reformatted_source, False 153 | 154 | code_diff = _GetUnifiedDiff( 155 | unformatted_source, reformatted_source, filename=filename) 156 | 157 | if print_diff: 158 | return code_diff, code_diff.strip() != '' # pylint: disable=g-explicit-bool-comparison 159 | 160 | return reformatted_source, True 161 | 162 | 163 | def _CheckPythonVersion(): # pragma: no cover 164 | errmsg = 'yapf is only supported for Python 2.7 or 3.4+' 165 | if sys.version_info[0] == 2: 166 | if sys.version_info[1] < 7: 167 | raise RuntimeError(errmsg) 168 | elif sys.version_info[0] == 3: 169 | if sys.version_info[1] < 4: 170 | raise RuntimeError(errmsg) 171 | 172 | 173 | def ReadFile(filename, logger=None): 174 | """Read the contents of the file. 175 | 176 | An optional logger can be specified to emit messages to your favorite logging 177 | stream. If specified, then no exception is raised. This is external so that it 178 | can be used by third-party applications. 179 | 180 | Arguments: 181 | filename: (unicode) The name of the file. 182 | logger: (function) A function or lambda that takes a string and emits it. 183 | 184 | Returns: 185 | The contents of filename. 186 | 187 | Raises: 188 | IOError: raised if there was an error reading the file. 189 | """ 190 | try: 191 | encoding = file_resources.FileEncoding(filename) 192 | 193 | # Preserves line endings. 194 | with py3compat.open_with_encoding( 195 | filename, mode='r', encoding=encoding, newline='') as fd: 196 | lines = fd.readlines() 197 | 198 | line_ending = file_resources.LineEnding(lines) 199 | source = '\n'.join(line.rstrip('\r\n') for line in lines) + '\n' 200 | return source, line_ending, encoding 201 | except IOError as err: # pragma: no cover 202 | if logger: 203 | logger(err) 204 | raise 205 | 206 | 207 | def _SplitSemicolons(uwlines): 208 | res = [] 209 | for uwline in uwlines: 210 | res.extend(uwline.Split()) 211 | return res 212 | 213 | 214 | DISABLE_PATTERN = r'^#.*\byapf:\s*disable\b' 215 | ENABLE_PATTERN = r'^#.*\byapf:\s*enable\b' 216 | 217 | 218 | def _LineRangesToSet(line_ranges): 219 | """Return a set of lines in the range.""" 220 | 221 | if line_ranges is None: 222 | return None 223 | 224 | line_set = set() 225 | for low, high in sorted(line_ranges): 226 | line_set.update(range(low, high + 1)) 227 | 228 | return line_set 229 | 230 | 231 | def _MarkLinesToFormat(uwlines, lines): 232 | """Skip sections of code that we shouldn't reformat.""" 233 | if lines: 234 | for uwline in uwlines: 235 | uwline.disable = not lines.intersection( 236 | range(uwline.lineno, uwline.last.lineno + 1)) 237 | 238 | # Now go through the lines and disable any lines explicitly marked as 239 | # disabled. 240 | index = 0 241 | while index < len(uwlines): 242 | uwline = uwlines[index] 243 | if uwline.is_comment: 244 | if _DisableYAPF(uwline.first.value.strip()): 245 | index += 1 246 | while index < len(uwlines): 247 | uwline = uwlines[index] 248 | if uwline.is_comment and _EnableYAPF(uwline.first.value.strip()): 249 | break 250 | uwline.disable = True 251 | index += 1 252 | elif re.search(DISABLE_PATTERN, uwline.last.value.strip(), re.IGNORECASE): 253 | uwline.disable = True 254 | index += 1 255 | 256 | 257 | def _DisableYAPF(line): 258 | return (re.search(DISABLE_PATTERN, 259 | line.split('\n')[0].strip(), re.IGNORECASE) or 260 | re.search(DISABLE_PATTERN, 261 | line.split('\n')[-1].strip(), re.IGNORECASE)) 262 | 263 | 264 | def _EnableYAPF(line): 265 | return (re.search(ENABLE_PATTERN, 266 | line.split('\n')[0].strip(), re.IGNORECASE) or 267 | re.search(ENABLE_PATTERN, 268 | line.split('\n')[-1].strip(), re.IGNORECASE)) 269 | 270 | 271 | def _GetUnifiedDiff(before, after, filename='code'): 272 | """Get a unified diff of the changes. 273 | 274 | Arguments: 275 | before: (unicode) The original source code. 276 | after: (unicode) The reformatted source code. 277 | filename: (unicode) The code's filename. 278 | 279 | Returns: 280 | The unified diff text. 281 | """ 282 | before = before.splitlines() 283 | after = after.splitlines() 284 | return '\n'.join( 285 | difflib.unified_diff( 286 | before, 287 | after, 288 | filename, 289 | filename, 290 | '(original)', 291 | '(reformatted)', 292 | lineterm='')) + '\n' 293 | -------------------------------------------------------------------------------- /HandyPyditor/HandyPyditorDemo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 HandyOrg 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![logo](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/icon.png) 2 | 3 | # Welcome to HandyPyditor 4 | 5 | ## We're all here 6 | 7 | ![qq-group](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/qq-group.png) 8 | 9 | ## Special thanks to 10 | 11 | [![JetBrains](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/resharper_logo.png)](https://www.jetbrains.com/?from=HandyControl) 12 | 13 | ## Overview 14 | 15 | ![Overview](https://raw.githubusercontent.com/HandyOrg/HandyPyditor/master/Resources/Overview.png) -------------------------------------------------------------------------------- /Resources/Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HandyOrg/HandyPyditor/06444554e50a9ffb47f10aa2366b0c8b7ccacec1/Resources/Overview.png --------------------------------------------------------------------------------