Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCodeMapper Updates #27

Open
Acecool opened this issue Jan 11, 2018 · 4 comments
Open

XCodeMapper Updates #27

Acecool opened this issue Jan 11, 2018 · 4 comments

Comments

@Acecool
Copy link
Contributor

Acecool commented Jan 11, 2018


Note: I'm currently working on formatting the post to provide the most information in an organized way...


XCodeMapper

  • The package modifier to make CodeMap the greatest Code Navigator for SublimeText available by weeding out what you don't need to see and displaying what you do backed by an unlimited nesting category system to organize that output in a way that makes sense, makes you more efficient, and even helps debug your code all while taking up as little space from your coding area as possible.

  • Our goal is to make you more efficient by showing you what's relevant and hiding what isn't and by organizing the relevant data in a way that instantly shows you its place within a file or project and by showing you common or uncommon errors which can otherwise be difficult to track down because of the way our brain processes text. It is to also allow you to decide what's relevant based on the language you're using, or the project your working on in that language by using simple function calls to add things to earmark in your code.

  • The hmuan mnid is albe to raed tihgns wihch may ohwtierse look iopmsibsle wehn alcuatly tnhinkig aobut it. Because of this, it's easy for us screen code and miss things because it makes sense in other languages or because certain characters are used in the current language but won't work in other situations, etc.. Words simply blend together and to us, we look at the first and last characters in place, and the content to determine a word, our minds don't actually care about the order the content is to make a word appear. It's also possible for us to omit special characters, doubles, etc.. while reading because they don't mean anything in terms of communicative language. Having a second pair of eyes which doesn't read the way we do makes us better and more efficient overall while coding.

  • In the future I want to add a more advanced syntax error detection system to make tracking down typos and little errors common with those of us who deal with dozens of programming, scripting and display / stylization languages - This is especially important for code which goes through an evaluator within a language as error-checking is incredibly difficult because you typically end up with incredibly vague descriptions which could match more than half of what's processed.


#Frequently Asked Questions and Answers#

How do we give back?

Where do I go to report a bug?

Where do I submit a feature request?

  • Please see Where do I go to report a bug? for links..
  • Note: You may use the Issue Tracker, Sublime Text Forum post for XCodeMapper ( Dev Name ) or This post in CodeMap Issue Tracker to submit feature requests!

Where can I download XCodeMapper?

Where do I install This Addon?

  • Windows:
    • The root install folder is: "%AppData%\Sublime Text 3\Packages\"
    • Note: Opening the above path in Explorer navigates you to
      • "C:\Users\%UserName%\AppData\Roaming\Sublime Text 3\Packages\" ( Vista upwards )
      • "C:\Documents and Settings\%UserName%\Application Data\" ( XP / 2000 )
    • Note: any of these paths can be used, excluding quotes, with the last 2 being Operating System version specific - the first one will work on all or most versions of Windows )
    • Note: These %Variables% can be used in Explorer Address Bar - They are Windows Variables which can be used anywhere Windows parsed them ( Batch Files, Explorer Path Bar, Command Prompt, and more! )
  • Mac
    • ... Information coming soon ...
  • Linux
    • ... Information coming soon ...
  • Other
    • ... Information coming soon ...

How do I install it?

  • Note: I may alter this so instead of AppData\SublimeText 3\Packages\ existing in the zip, the root will be Packages\ so you only need to place the zip into the "%AppData%\Sublime Text 3\Packages" folder and Extract Here...
  • Note: Right now the zip file is packaged to provide a path to follow to show where files go... AppData/Sublime Text 3/Packges/ should be the first folder where other folders are discovered.
  • The first few steps are to ensure Package Control and CodeMap are installed. If you are going to use GMod Lua then that needs to be installed prior to extracting the files into the folder...
    • To install Package Control:
      • Click on the Tools Menu then Install Package Control ( It should be in tools or another menu ).
    • To install CodeMap:
      • Command / Ctrl + Shift + P ( by default )
      • Type Package Control and scroll down to Install Package and Press [ ENTER ]
      • Type CodeMap and press Enter with CodeMap by oleg-shiro selected - It may take a moment to install...
  • Once the install is done ( clicking Alt + M + Release M + M + Release M + Release Alt should open the Code - Map Panel while viewing a Python or Text File )
  • Extract them to "%AppData%\Sublime Text 3\Packages" - The folders should be CodeMap\ ( for modifications to the default CodeMap package - these are RARE and are deleted when merged with the default CodeMap package ), *\ ( Modifications to syntax-highlighting files ), User\ ( For XCodeMapper files inside of User\CodeMap* and default configuration for CodeMap to ensure XCodeMapper maps Python and other languages over the default system, and XCodeMapper ).

How do I know if I successfully installed it?

  • When successfully installed, the folder-structure should appear as such:
    • Note: All .sublime-syntax / .tmLanguage files included adds function, func , def, and ƒ to function table to allow proper highlighting when using other / shorter keywords to ensure XCodeMapper doesn't take up a lot of room repeating something you already know, or something which can be described using less characters...
    • Note: the custom_languages\ folder in AppData\Packages\CodeMap\ is required until the small issue with single-file replacements triggering Sublime Text UnZipped == True or Packaged == False leading to logic running trying to find md.sublime-syntax when code_map.py exists... This is an issue with how Sublime Text handles their api calls but we can fix it within CodeMap.. This will be resolved soon...
    • "%AppData%" or "C:\Users\%UserName%\AppData\Roaming\"
      • Sublime Text 3\
        • AppData\Packages\
          • AppData\Packages\AutoHotkey\
            • AutoHotkey.tmLanguage
          • AppData\Packages\CodeMap\
            • AppData\Packages\CodeMap\custom_languages\
              • JavaScript.sublime-syntax
              • lua.sublime-syntax
              • md.sublime-syntax
          • code_map.py ( Temporarily here until next version goes live )
          • AppData\Packages\GMod Lua\
            • Lua.tmLanguage
          • AppData\Packages\JavaScript\
            • JavaScript.sublime-syntax
          • AppData\Packages\Lua\
            • Lua.sublime-syntax
          • AppData\Packages\PHP\
            • PHP.sublime-syntax
          • AppData\Packages\Python\
            • Python.sublime-syntax
          • AppData\Packages\User\
            • code_map.sublime-settings ( This is very important - without it, by default Python is parsed by the default universal mapper )
            • More files soon - Either here or in CodeMap nested - sublime-settings configuration for XCodeMappers
            • AppData\Packages\User\CodeMap\
              • AppData\Packages\User\CodeMap\Acecool\
                • init.py ( Required by Python - maybe not by ST3 )
                • AcecoolST3_Library.py
                • XCodeMapper.py
                • XCodeMapper_Definitions.py
              • AppData\Packages\User\CodeMap\custom_languages
                -JavaScript.sublime-syntax ( DEFAULT )
                • lua.sublime-syntax ( DEFAULT )
                • md.sublime-syntax ( DEFAULT )
              • AppData\Packages\User\CodeMap\custom_mappers\
                • ahk.py - AutoHotkey Classes
                • bat.py - Batch File Classes
                • js.py - JavaScript Classes
                • lua.py - Lua Classes
                • md.py - MarkDown Classes
                • php.py - PHP / Hypertext PreProcessor / Personal Home Page Classes
                • py.py - Python Classes
                • sublime-settings.py - Sublime Settings File Classes
                • template.py - XCodeMapper TEMPLATE for creating NEW files... INCOMPLETE!
                • template_extended_info.py - INCOMPLETE!
                • ts.py - TypeScript Classes
              • AppData\Packages\User\CodeMap\examples\ - Contains Syntax Tests for the mappers... Not all have been populated..
                • ASP.asp
                • AutoHotkey.ahk
                • HTML.htm
                • HTML.html
                • JavaScript.js
                • Lua.lua
                • Lua_Acecool.lua
                • Lua_GMod.lua
                • MarkDown.md
                • PHP.php
                • Text.txt
                • Python.py
                • SQL.sql
                • SublimeTextKeyMap.sublime-keymap
                • SublimeTextSettings.sublime-settings
                • SublimeTextSyntax.sublime-syntax
                • SublimeTextTMLanguage.tmLanguage
                • TypeScript.tx
              • code_map.py
              • code_map.sublime_settings
              • default.sublime-keymap
              • Installing Acecool's CodeMap GLua Extension.txt
              • py_xcodemapper_config.sublime-settings
              • snippets.py
              • XCodeMapper.Default.sublime-settings
              • XCodeMapper.User.sublime-settings
              • More files soon - Either here or in one directory up in User\ - sublime-settings configuration for XCodeMappers
  • Note: If files are in the wrong place - simply copy the files from the zip to the appropriate location.

Why can't I simply add the repo to Package Control?

  • I am working on a solution for this to make it easier to install ( I'll include a Batch File soon - run using Admin / Elevated Privileges ). With what I know now, it appears the Repo method will add it to one folder and may not allow breaking out ( for the mods to GMod Lua, Python, AHK, JavaScript and other languages to add the mathematical function char, ƒ, so that functions are highlighted when you use it ). If If / when I find a solution I will make this option available!

What custom mappers does XCodeMapper come with and what do they track in the code?

  • Notes for the _User class in all files: You can use ANY class as the Parent.. It's completely up to you which mappings you inherit under the User class! You can even make up your own from scratch without the default language for the mappings you're expanding by using XCodeMapperBase as the parent! )
  • Note: In the OnSetupSyntax callback, when you Add Syntax to be earmarked, there are various options - for the purpose of slimming down this already extensive list I've omitted the search-type.. self.AddSyntax(
    CATEGORY_USED_, SEARCH_METHOD_REGEX_STARTSWITH_ENDSWIDTH_CONTAINS_case_sensitive_CONTAINSI_as_insensitive, VARARGS ) where VARARGS are 'x', 'y', 'etc' for as many entries as you want which are added to the same category and search-type used to find them... The regex below should be obvious - others are startwith or contains / i for the most part.. The reason Startswith is used for quite a lot is because its inexpensive logic ( it basically grabs length of string we're checking, SubStrings the code we're looking at then checks SubStringedCode == OurLookingString ) - we don't need to use it in any of the mappers but it is also more human readable than most regex...
  • XCodeMapper currently supports 9 different file-extensions in order to support the base-languages which use them and others which use those file extensions too in addition to default mappings. They are:
    • Default / XCodeMapperBase
      • Default Mappings look for keywords in comment lines following by : and a space.
        • Task Keywords: 'TODO: ', 'Fix: ', 'Task: ', 'Work: ', 'Update: ', 'Important: ', 'Debug: '
        • Note Keywords: 'Note: ', 'Info: ', 'Debugging: '
    • ahk - AutoHotkey
      • Base Language
        • Note: For AutoHotkey, function comments are shown above Hotkeys, etc.. in the output. I also expand special chars for Ctrl, Alt, Delete, Win and special modes such as * and ~ which enables Hotkey passthrough for the command ( other apps see the normal combo too ) and allow other modifiers ( ie Hotkey for Ctrl + F1 means Ctrl + Alt + F1 will trigger it too )... This is one of the default languages that has extra info - I'll be adding config values to enable / disable them soon!
        • Comments: ';;' and ';'
        • Block Comments: '/' through '/'
        • Classes: 'class '
        • Functions: '^\s*(\w+)(()(.*)())' - Note: These aren't preceded by a keyword making them harder to find - I used the Syntax Highlighter / Language Definition file for these..
        • Anchors: '^\s*(\w+):'
        • Hotkeys: '::'
        • Directives: 'SetWorkingDir', 'Menu, Tray, Icon,', '#ClipboardTimeout', '#CommentFlag', '#ErrorStdOut', '#EscapeChar', '#HotkeyInterval', '#HotkeyModifierTimeout', '#HotString', '#If', '#IfWinActive', '#IfWinExist', '#IfTimeout', '#Include', '#IncludeAgain', '#InputLevel', '#InstallKeybdHook', '#InstallMouseHook', '#KeyHistory', '#MaxHotkeysPerInterval', '#MaxMem', '#MaxThreads', '#MaxThreadsBuffer', '#MaxThreadsPerHotkey', '#MenuMaskKey', '#NoEnv', '#NoTrayIcon', '#Persistent', '#SingleInstance', '#UseHook', '#Warn', '#WinActivateForce'
        • Deprecated: '#AllowSameLineComments'
      • AcecoolAHK_Framework ( SOON )
        • This will be for my AutoHotkey framework - will be added soon!
      • Custom Mappings ( _User class within the file - soon to be extracted )
        • This is for you do populate!
    • bat - Batch File
      • Base Language
        • Comments: 'rem ', ':: ', ': '
        • Goto: 'goto ', 'call ', 'exit'
        • Anchor: '^:[A-Za-z_-]+$'
        • Config: '@echo ' - ie @echo off.. on...
        • File Command: 'rename ', 'mklink '
        • Registry Command: '`reg query'
        • Iteration: 'FOR /F '
        • Definition: 'set '
        • Optimization: 'echo ', 'echo.', 'cls' - Optimization is typically to find things which slow down programs - print statements are expensive, file operations too.. cls is clear-screen for Command Prompt.
      • Custom Mappings ( _User class within the file - soon to be extracted )
    • js - JavaScript
      • Base Language
        • Comments: '//'
        • Block Comments: '/' through '/'
        • Function: 'function ', '= function', '= async function'
        • Debugging: 'console.log'
        • Definitions ( Disabled ): 'var ', 'return ', 'const '
      • Acecool Web Mod Project Mappings + Base Language ( Available here: https://bitbucket.org/Acecool/acecooldev_userscripts ) which is a system to modify sites by adding functionality - default packages include: a basic eBay AJAX Technology Enabled Shopping Cart ( No reloading to update the cart / delete items / stash for later / etc.. - very basic right now with plans to extend it ), Steam Workshop Downloader ( single vs ALL in collection items - due to browser security I'm working on the ALL mode to actually save the files instead of simply downloading the data ), Bundle Sites auto-linking to REDEEM Steam Key, BitBucket Link Modifier for Project Source Code ( Modifies all links, dynamically to point to src/master/ - disabled in diff / history mode - for shorter links to share which are always relevant ) and more!
        • Function Accessor: 'Acecool.util.AccessorFunc', 'AccessorFunc', 'AddFeature', 'SetupTasks', 'SetupProcesses'
          • Creates 2 function entries: function [ClassName].[GetPrefix]Name, function [ClassName].SetName
          • Creates 2 FUNCTION entries: Acecool.util.AccessorFunc / AccessorFunc
            • function [ClassName].[GetPrefix]Name
            • function [ClassName].SetName
          • Creates 1 FUNCTION entry based on arguments: AddFeature
            • 'function AddFeature( SITE_TAG, TASK, function( _task, _data ) ... end );'
          • Creates 1 COMMENT entry based on arguments for when site mod code should execute during a site loading process: SetupTasks
            • // Tasks: [ OnPreLoad ][ OnReady ][ OnLoad ][ OnLoadFrame ][ OnSetupObserver ]
          • Creates 1 COMMENT entry based on arguments for additional processes to execute inside of tasks: SetupProcesses
            • // Processes: [ Anchor ][ DIV ][ I-Frame ][ Observer ]
      • Custom Mappings ( _User class within the file - soon to be extracted )
        • This is for you do populate!
    • lua - Lua / Moon & Garry's Mod Lua
      • Base Language
        • Comments: '--'
        • Block Comments: '--[[' through ']]'
        • Function: 'function '
        • Function Local: 'local function '
        • Function Other: '= function'
        • Config: '^CFG_\w+\s+='
        • ENUMeration: '^ENUM_\w+\s+='
        • CONSTant: '^CONST_\w+\s+=', '^[A-Z_]+\s+='
        • Debugging: 'print('
      • Garry's Mod Lua ( Lua with C Style Operators + continue ) Language Mappings including base..
        • Comments: '//'
        • Block Comments: '/' through '/'
        • Function Accessor: 'AccessorFunc' - Creates 2 function entries - The Info tag is replaced by whether or not data submitted through _value arg is cast to a certain data type ( based on args when calling AccessorFunc( _class, _data_storage_key, _name, _crude_force_type ) ):
          • function [ClassName].Get[Name]( );
          • function [ClassName].Set[Name]( _value [ForcedTypeInfo] );
        • Hook: 'hook.Add', 'hook.Remove'
        • Function Callback: 'Callback = function'
        • Networking: 'net.Receive', 'BroadcastLua', 'self:SendLua', ':SendLua'
        • Info: 'cam.Start', 'cam.End'
        • Console Command: 'concommand.Add'
        • Realm: '(\s*(SERVER|CLIENT)\s*)'
      • Garry's Mod Lua DarkRP GameMode Mappings
        • Mappings coming soon!
      • Garry's Mod Lua NutScript Framework Mappings
        • Mappings coming soon!
      • AcecoolDev_Framework Mappings including Garry's Mod and Base Lua
        • Function Accessor: 'Acecool:AddClassOverrides', 'Acecool:AccessorFunc', 'Acecool:AccessorSet', 'Acecool:AccessorGet', 'Acecool:AccessorSimple', 'admin:AddTool'
          • Acecool:AccessorFunc - Executes AccessorSet / Get / Helpers / Helpers Set
            • AccessorFuncHelpers ( Internally executed ) - Adds 3 Internal functions added only once per class for the data-store system..
              • function [ClassName]:__GetDataTable( );
              • function [ClassName]:__SetData( _key, _value );
              • function [ClassName]:__GetData( _key, _default );
            • AccessorFuncHelpersSet ( Internally Executed ) - Adds 1 Internal functions for managing which data-store key is used..
              • function [ClassName]:__Get[Name]Key( );
              • function [ClassName]:__Set[Name]Key( _key );
          • Acecool:AccessorSet - Adds 7 functions - 1 standard and 6 internal - Is also executed when Acecool:AccessorFunc is called - for managing data-type and value forcing ( doesn't CAST - prevents data from being set if incorrect type - may add casting attempts later )
            • function [ClassName]:SetName; [Forced Type / Value INFORMATION Appears Here if Applicable]
            • function [ClassName]:__Has[Name]AllowedTypes( ); [Forced DataType INFO Appears Here if Applicable]
            • function [ClassName]:__Get[Name]AllowedTypes( _default );
            • function [ClassName]:__Set[Name]AllowedTypes( _value );
            • function [ClassName]:__Has[Name]AllowedValues( ); [Forced Value INFO Appears Here if Applicable]
            • function [ClassName]:__Get[Name]AllowedValues( _default );
            • function [ClassName]:__Set[Name]AllowedValues( _value );
          • Acecool:AccessorGet - Adds 3 functions - 1 standard and 2 internal - Is also executed when Acecool:AccessorFunc is called
            • function [ClassName]:[GetPrefix]Name;
            • function [ClassName]:__Get[Name]DefaultValue( );
            • function [ClassName]:__Set[Name]DefaultValue( _value );
          • Acecool:AccessorSimple - Adds 1 function entry
            • function [ClassName]:Name;'
          • Acecool:AddClassOverrides - Adds 9 functions 3 Internal and 6 standard.
            • function [ClassName]:OnInit( ); - These 3 are internal functions for the object to execute startup, shutdown and auto-refresh code...
            • function [ClassName]:OnRefresh( );
            • function [ClassName]:OnShutdown( );
            • function [ClassName]:Pre[ClassName]OnInit( ); - The following 6 are used as callbacks which is why the name is required for the GMod hook system so when calling the hook people know what it is for and to avoid collisions...
            • function [ClassName]:Pre[ClassName]OnRefresh( );
            • function [ClassName]:Pre[ClassName]OnShutdown( );
            • function [ClassName]:Post[ClassName]OnInit( );
            • function [ClassName]:Post[ClassName]OnRefresh( );
            • function [ClassName]:Post[ClassName]OnShutdown( );
          • admin:AddTool - Adds Function Other entry
            • Admin Tool: [Name]
        • Networking: 'Acecool.C.networking:Send', 'Acecool.C.networking:Broadcast'
        • Registry: 'Acecool.C.networking:RegisterReceiver', 'Acecool.C.networking:RegisterSyncableFlag'
        • Function Callback: 'Acecool.C.networking:SetHelper', 'Acecool.C.networking:AddReceiver'
        • Console Command: 'dev_example.Add'
        • Function: 'function Acecool.C.'
        • Hook: 'draw.This', 'render.This', 'hook.AddTemp'
        • Definition: 'Acecool.C.'
      • Custom Mappings ( _User class within the file - soon to be extracted - You can use GMod Lua as the parent to expand on Garry's Mod mappings, AcecoolDev_Framework, the base Lua language or even make up your own from scratch by using XCodeMapperBase as the parent )
        • This is for you do populate!
    • md - MarkDown
      • Base Language
        • Comment Block: ''
        • Image: '![(.+)]((.+))'
        • Link: '[(.+)]((.+))'
        • Quote: '> '
        • Code: '```', '~~~'
        • Code Snippet: '`'
        • List Buttoned: '- ', '* ', '+ '
        • List Definition: ': '
        • List Numbered: '^\d+.'
        • Header 6, 5, 4, 3, 2, and 1: '######', '#####', '####', '###', '##', '#'
        • Header ( The end is if the above are commented out so all are seen as header instead of H6 through H1 ): '======', '------', '#'
        • Horizontal Rule: '***', '---', '___'
        • Bold Formatting: '^(**|)(.+)(**|)'
        • Italics Formatting: '^(*|)(.+)(*|)'
        • Strikethrough Formatting: '^()(.+)()'
        • Table: '|(.+)|'
        • Footnote: '/([\d+]: )/ig'
        • Line Block: '|'
        • Tag: '<'
        • Example: 'Lorem ipsum'
      • Custom Mappings ( _User class within the file - soon to be extracted )
        • This is for you do populate!
    • php - Hypertext PreProcessor / Personal Home Page
      • Base Language
        • Comments: '//'
        • Block Comments: '/' through '/'
        • Info: '' ( to enable / disable php parsing - moving this to rules soon )
        • Function: 'function ', 'public function', 'private function', 'static function'
        • Class: 'class '
        • Import: 'require(', 'require_once(', 'include(', 'include_once('
      • Acecool Content Management System
        • Support coming soon!
      • Custom Mappings ( _User class within the file - soon to be extracted )
        • This is for you do populate!
    • py - Python
      • Base Language
        • Note: The base also calculates and keeps track of class scope to improve the ouptut. We use basic syntax checking to make sure functions, classes, and if statements end with : Additionally we look for improper use of ! because != exists in the language but ! can't be used in place of not... For caught errors the line ( if output ) has [ ERROR ] appended to it and a Syntax Error is added to the output ( Category appears at the top of everything in the output by default )
        • Comments: '##', '#'
        • Function: 'def '
        • Class: 'class '
      • XCodeMapper
        • Info: 'self.AddCategoryOrderEntry'
        • Output Entry: 'self.AddEntry', 'self.AddSimpleEntry', 'self.AddWarning', 'self.AddError', 'self.AddFeature', 'self.AddHelp'
        • Syntax Entry: 'self.AddSyntax'
        • Syntax Rule Entry: 'self.AddSyntaxRule'
        • Output Order Entry: 'self.AddCategoryOrderEntry'
        • Function Accessor: 'Acecool.util.AccessorFunc' - Creates 7 function entries:
          • function [ClassName].[GetPrefix][Name]( _default, _skip_defaults )
          • function [ClassName].[GetPrefix][Name]ToString( _default )
          • function [ClassName].[GetPrefix][Name]Len( _default )
          • function [ClassName].[GetPrefix][Name]LenToString( _default )
          • function [ClassName].SetName
          • function [ClassName].ResetName
          • function [ClassName].Is[Name]Set( _true_on_default )
        • If CFG_DISPLAY_CONST_DEFINITIONS set to True then we add:
          • Config: '^CFG_\w+\s+='
          • ENUMeration: '^ENUM_\w+\s+='
          • CONSTants: '^CONST_\w+\s+=', '^[A-Z_]+\s+='
        • Optimization 'self.print('
      • XCodeMapper Developmental Class
        • This class is for functions not yet integrated or for debugging new functions as Python is the language XCodeMapper is developed in...
      • Custom Mappings ( _User class within the file - soon to be extracted )
        • This is for you do populate!
    • sublime-settings - SublimeText Settings File
      • Note: Until I process this format I've only added a BASIC method of detecting data following how SublimeText formats their config files ( each entry on a new line, and those lines start with " )
      • Base Language - Appears similar to JSON or may be JSON...
        • Comments: '//'
        • Block Comments: '/' through '/'
        • Definition: '"'
      • Custom Mappings ( _User class within the file - soon to be extracted )
        • This is for you do populate!
    • ts - TypeScript
      • Base Language
        • Function: 'export function ', 'function '
        • Class: 'export class ', 'class '
        • Interface: 'export interface ', 'interface '
        • Object: 'public '
      • Custom Mappings ( _User class within the file - soon to be extracted )
        • This is for you do populate!

How many languages do you plan on supporting?

  • As many as necessary. The primary ones planned next are: JSON, HTML, SQL, ASP, tmLanguage / sublime-syntax and other sublime- files.

What Major features do you currently have planned?

  • Add a Rule System
    - In short: a rule system will allow us in the classes or configuration to define certain basic things, or even a toggle, to process data. One example is how Python tracks nested classes - we'd be able to do the same thing with a rule-system and a few definitions such as indenting or replacing scope when class keyword is found, unindenting / popping off the stack when code on a different depth is found. For other languages we can use then, end, {, }, etc.. to track these things. This way we don't need to repeat long chunks of logic for different languages which are essentially the same... You could say we're making everything as generic as possible... Other rules will be added too..
  • Add a better code-stripper / tracker..
    - Right now we strip comments from lines so they don't appear if code is found on that line we're interested in. We also strip comment blocks from lines, etc... from the start and end and we return the appropriate code...
  • Add dynamic Syntax Switching system ( so alternate classes can be used regardless of file extension ) and add rules to switch which syntax map is active
    - Certain files support many languages per. One example is PHP which uses HTML when not in php tags. For HTML JavaScript can be found in Script tags, and CSS in Style tags. When a php tag is found, we process PHP but SQL can also be found in certain function calls not to mention Regular Expressions... These are things we need to look for. HTML as said above supports 3 primary languages. PHP supports 6. ASP Supports 6. Without supporting these extra languages, valuable information is slipping through our fingertips and re-adding rulesets or entire languages multiple times defeats the purpose of my coding standard - expect this feature soon!
  • As seen in the Optimizations planning segment - Add Chunk processing system to eliminate large portions of work - this will help in larger files more so than smaller files and will open the road to letting us make a universal mapper for languages using the regex provided by tmLanguage / sublime-syntax files, and others...

What Minor features do you currently have planned?

  • Plenty...

What Code Alterations do you currently have planned ie things we won't notice?

  • Consolidating certain functions into a single functions as they are nearly identical and it doesn't warrant having 3 or even 2 functions when the outcome is the same..

What Optimizations do you currently have planned?

  • Different ways to process files.. Instead of requiring files parsed line by line, add the ability to parse chunk by chunk - ie multiple lines per iteration so the regex from some of the language files can be executed... The primary plan for this, as of now, is to add a new function: AddChunkSyntax - which will run on the entire file, or chunks of the file first - these lines of code which have been found are then removed from the line by line processor ( if other syntax is added to the current mapper ). This also will allow us to completely remove block-comments and process them differently ( for notes, tasks, etc.. ) from everything before the other syntax is processed... This is a major feature AND optimization because chunk processing will eliminate a large number of lines otherwise processed one by one meaning less work for other systems in place. It's no different than combining bubble-sort ( the slowest sorting method ) and QuickSort ( one of the fastest ) together making an even faster search algorithm because bubble sort is faster than QuickSort for SMALL samples.. Or even combining 3 or more search algorithms to make something so much faster than any single method by itself.

What Optimization Features exist?

  • Alternate Classes per language and per project meaning we don't need to look for syntax / other data when we know we won't find it.

What Bug Fixes do you currently have planned / ie What are the known bugs or issues?

  • Fix minor issue where OnFunctionArgs adds an extra space to the output when no arguments are processed ( may occur in PreOnAddEntry or elsewhere ) making the function appear ( ) with between 2 or 3 spaces instead of 1 ( with my coding standard ).

What Other Changes do you currently have planned?

  • Plenty..

What is your story?

  • I have a broken neck, back and severe nerve damage from an automobile accident which occurred on May 7, 2011 where the other party was too busy looking at a going out of business sale in their passenger mirror to notice a stop sign which led to a low-speed but high damage injury because their right wheel was against the curb and my front right frame rail was angled directly at their front-left wheel along the path of the axle meaning there was an immediate drop in speed to complete-stop without any crumple or delay of the force being applied to my body. I would've been better off running through a brick wall - even a head on accident would've been better because instead of instant stopping both vehicles would've crumpled delaying and lessening the force by applying it over time instead of instantly which would've reduced the injuries sustained. I lost out on promising career opportunities, large yearly salaries and the ability to do most things. I've gone through hell for close to 7 years now and it is something I'd wish on no one else. I'm still fighting them and their insurance company has tried some real underhanded crap - there was water damage in my home caused by a home supply store installing a fridge incorrectly and they had no business getting involved but they did to try to get me to sign a $2,500 contract which said the $2,500 frees them from ALL liability, injury claims, etc... I've never felt so low that a person could do that to another person who is going through what I'm going through as I did then. Even pissing myself and all of the other humiliation wasn't as bad as seeing what some of humanity gets away with when they're a legally mandated for-profit company. My medical bills are close to $100,000 and the pain I go through requires severe medication around-the clock via time-released Fentanyl patch 100 mcg/hr and it only relieves my pain down to a 3 / 4 but the more I do the higher it goes. The state I live in is classified, by law, as Living-Death in many countries. If it wasn't for my mom taking care of me, I would've long been dead but as of now nothing has given me permanent relief and I don't want to be on opiates for the rest of my life.. There are risky surgeries which may or may not help so I want the courts approval to be able to end my life when the time comes that I can't continue living like this or when I am out of options or when something else related to this accident causes something serious.

What do you spend your time doing?

  • I try to spend my time as productive as possible. It isn't easy with 40 hour work weeks which can take me 3 to 6 months or longer to get through. But the way I spend my time is to improve the efficiency and which I can create content and to spread my wealth of knowledge on. I have tutored hundreds of students over the last view years in the ways the world works, numerous programming languages, what real companies expect of employees generating code, or in the industry of computing, databasing, application development, and more along with how to properly and efficiently organize code, debug, etc.. My students have all contacted me after they've spent years talking with me and learning from me thanking me for helping them achieve their dreams - it is one of the things which empowers me to continue living through my hell. That and the fact new students still come to me and I still have knowledge to give. One of the main languages I use to teach is Lua because Garry's Mod provides a quick and easy way to get into the world of programming with instant results - no need to restart a server to view the changes with auto-refresh systems in place - it helps new students stick with it because they see their results and improvement instantly. I have over 500 tutorials in GLua I share for questions similar between students, heavily commented as fully-working code. Because efficiency is so important to me, I am able to continue growing this database without repeating myself - chat and voice logs are saved and tutorials are created from them for new content. There are things and ideas I do repeat - but I've been successful not repeating myself as an educator other than the base files I send out giving more time to teach important things. Additionally, by not doing things typical educators do ( create a class and stick to the script ) it means I can easily adapt to new students methods of learning and by explaining things in my own works, differently each time if need be, it reinforces what I know and helps the students reinforce what they know because I don't simply regurgitate a book to them ( which is a huge problem of many schools - the bad teachers simply read the book to them and when a student asks a question they simply regurgitate verbatim what the book says reinforcing the fact that these teachers do NOT know the material they are trying to teach which causes severe issues - I try to be the exact opposite of these bad teachers. There seem to be more and more of them simply getting a position because they need a job and don't act as educators. It means that students aren't getting the education that everyone deserves which is why people like me need to exist ).

Are you accepting new students?

  • As long as I am breathing, I am. Contact me on Steam - it is currently the best platform ( with Steam Chat Logger ) because I have it running at all times, Garry's Mod is on it, and old messages when I'm not on are delivered to me....: http://steamcommunity.com/id/Acecool/ - As I tell everyone - if you're interested in being a student, add me and ask me. I'll send starter material and how to set up Source Dedicated Server to code along with the outline of Lua, and more. As questions come up, ASK ME and I will respond as soon as I am on - I process all messages when I come to the computer or have a device in my hand. What I teach traverses languages - Logic is universal. Stick with it and you'll have no problem moving from one language to the next, debugging, and you'll know what to expect when out in the world.

What does Acecool mean?

  • I created the word Acecool around 1989 meaning A School to serve as my primary objective in life - I aim to soak up as much knowledge as I can, and help spread it to others to improve our collective selves. I've been using Acecool as my online alias since around that time, and as my business name. I registered Acecool.com / net / org in the early 90s however the domain host GoDaddy or something didn't honor the 10 year agreement and resold it. I'm in the process of reacquiring my domains. I own the legal TradeMark to Acecool as TradeMarks work similarly to Copyright - as soon as you create a new work, it is immediately protected under copyright law. Because I created Acecool, a new word and name used for the industries in business and as my business name and alias - it belongs to me. I have proof going back to the creation of the name that I am the first so any that use it are violation of my TradeMark.


https://bitbucket.org/Acecool/acecooldev_sublimetext3


I hope you don't mind I'm posting this in a new thread... Would you mind marking as optional enhancement?

Sales Pitch: XCodeMapper ( developmental name ) is a way to make an already incredibly useful extension, CodeMap by oleg-shilo, even better.. It modifies the way you earmark code in your project to have those instances at your fingertips. It is customizable with many callbacks you can design how you want it to look, behave, and how much or little information you want to show at any given time. You can modify code going to the output on the fly, look for hard to find syntax errors and flag them for review, and much much more...

The latest update added nested category support ( for Python to have a way to display functions nested in classes differently and so the alphabetical sorting method would work on the function names without shuffling everything ( which is what happens if everything is added to 1 category - that old hack is now gone )... The nested categories are sorted alphabetically too now because they are the class-headers...

I've just added a brand new feature to change how functions nested in classes are displayed... There are 2 main options and a modifier...

1 ) Vertical mode where the CLASS_FUNCTION category is populated with alphabetically sorted nested categories and those populated with the functions from those classes.. This is great if you don't have a lot of width to rent out on your monitor while coding...

2 ) Horizontal / Lua style mode where CLASS_FUNCTION category is populated with the function entries - except the function entries show up similar to how Lua handles their objects / meta-tables because everything is in tables.... It can show up as DirectParentClassName.FunctionName( _args ) per line - all alphabetically sorted.... OR you can enable the modifier which ShowsTheShallowestClass.All.The.Way.To.The.DirectParentClassName.FunctionName( _args ) - This is useful to know exactly how to call a function if it is nested deeply... This is rarely the case though..

Images:

sublime.py both modes ( not many nested so the modifier isn't needed to be shown disabled )..

This shows the Vertical mode where CLASS_FUNCTION Category is primary category for them, DirectParentName is a nested category within, and the FunctionName( _args ) is an entry to that category... This shows how it looks on a traditional Python file...
https://www.dropbox.com/s/odm96jm87fhxuck/sublime_text_unregistered__screenshot_20180111124446_2835.png?dl=0

This shows DirectParentClassName.FunctionName( _args ) as entries to CLASS_FUNCTION primary category... This shows how it looks on a traditional python file...
https://www.dropbox.com/s/wum1gil6gg0jplh/sublime_text_unregistered__screenshot_20180111124503_732.png?dl=0

Python.py EXAMPLE where categories are all over the place and functions are above and below other class declarations - this is designed to confuse the system to show it works properly... with both systems and the modifier..

Display in component form... CLASS_FUNCTION Category with DirectParentClassName nested Category and FunctionName within that.... I will add unlimited nesting later on so that will be yet another option - so you will be able to display vertically, or staggered.... look for that soon!!!
https://www.dropbox.com/s/gu8dd4qavt5z1a5/sublime_text_unregistered__screenshot_20180111124517_8960.png?dl=0

Display using FullPathFromShallowest.ToThe.Deepest.Until.DirectParentClassName.FunctionName( _args )
https://www.dropbox.com/s/3qzsc315vx6v7tx/sublime_text_unregistered__screenshot_20180111124528_5402.png?dl=0

Display using DirectParentClassName.FunctionName( _args )
https://www.dropbox.com/s/5su6hr2uqmx0fj3/sublime_text_unregistered__screenshot_20180111124537_2601.png?dl=0

I added the vertical layout to the Lua mapper too ( very few lines of code - shown here and the default method ):

Default method ( string.FuncName( _text ), Acecool.C.timekeeper:Lerp( _args ) ):
https://www.dropbox.com/s/y2epp63smzedk72/sublime_text_unregistered__screenshot_20180111130414_2558.png?dl=0

Display in component parts and organize in nested categories... ( For files with a lot of libraries, classes, this organizes them in a very easy to read manner...
https://www.dropbox.com/s/y3w4iqytelqd1u5/sublime_text_unregistered__screenshot_20180111130239_9770.png?dl=0

Note - I include the updated syntax files for various languages because, by default I replace def / function with the character designed for mathematical functions which is: ƒ - If you do not want to use this char, edit:

CFG_FUNC_NAME_SEARCH = 'def'
to
CFG_FUNC_NAME_SEARCH = ''

When the SEARCH var is empty, it will not replace....

Additional images:

Showing the JavaScript mapper with my Web Framework Project enabled and how it converts function calls into usable information along with auto editing _tag ( I use _tag for the other functions other than the first to allow for easy copy / paste to add new features to other sites )
https://www.dropbox.com/s/8pcqdubas5ycrma/sublime_text_unregistered__screenshot_20180109044803_7634.png?dl=0

Showing the AutoHotkey mapper ( It also converts the modifier key chars from ! as Alt, ^ as Ctrl, + as Shift and # as Win on top of * for Allow with other mod-keys pressed, ie hotkey with Alt F12 will run with Ctrl Alt F12.... and ~ for NoBlock meaning you can intercept hotkeys and still allow other programs to receive the original hotkey... ):
https://www.dropbox.com/s/ko5ejadvbyvgvcw/sublime_text_unregistered__screenshot_20180109044734_8188.png?dl=0

Shows the Lua mapper modifying output data and expanding AccessorFuncs using the AccessorFuncExpansion Callback ( allows you match a search pattern, prevent the original pattern from being added an an entry, and you simply call self.AddEntry or self.AddSimpleEntry with the new function names which the AccessorFunc adds - easy to set up...
https://www.dropbox.com/s/4v1sw803jk65let/sublime_text_unregistered__screenshot_20180109044704_1329.png?dl=0

Same but scrolled down... the __ functions are internal functions generated by the AccessorFuncs - I have a config var to hide them as my AccessorFuncs generate upwards of 10 or more depending on the data-type, and what I need from them...
https://www.dropbox.com/s/tipzrjufbb6b7sy/sublime_text_unregistered__screenshot_20180109044658_5826.png?dl=0

Shows sublime.py with the standard XCodeMapper for python.. Here I didn't modify def so you can see what it looks like with the categorized methods ( note the new version simply has ☼ set as a prefix - I'm going to remove it from the default probably - but I've been finding some highlighters have trouble so I've written code to end open quotes, add comment to the end of the line, or use a block comment hack... And it works for most, but some such as PHP refuse to highlight so I would recommend using Python or JavaScript for PHP... Also the additional prefix chars ( all customizable in CFG_ vars ) can be removed, edited, or whatever... By default the tasks list are now commented.... I was thinking of doing the same to comments but I haven't run into any problems with the end-line chars I'm using...
https://www.dropbox.com/s/f9yj00p2jf9tg02/sublime_text_unregistered__screenshot_20180109044555_7884.png?dl=0

I update XCodeMapper frequently to meet my needs and to integrate new features which are designed to increase efficiency while not only coding, but for setting up new mappers...

All mappers come with multiple mapper classes in the file - _USer is enabled by default and has the vanilla language set as extension so you can edit what you want and when an update comes out simply copy and paste the _User class back in ( I will be exporting them soon to different files to avoid this.. )

Current To Do List:

  • Merge the code which handles outputting categories, category entries, and nested categories with their entries - they all use similar code but I was adding other features so I never got around to merging them.. Recursion support exists but I haven't linked it ( for unlimited nesting support )...
  • Extract all classes from each .py file so User Class can go into user ( and mine can be moved into CodeMap ( which would require the package to be extracted most likely meaning it'd be better to use a repo for both ) - IMPORTANT...
  • Get rid of all circular imports ( Done, except when I extract all of the classes into separate files, Lua.py for example will be the vanilla which is why I'm considering making all extensions act as loaders and use Lua_Vanilla.py or Lua_Default.py or something similar as a naming scheme and add sublime-settings files for each language to get rid of the CFG_ system... This means from Sublime-settings you can define which child to load first, then that child can load the parents all the way back meaning there are no circular imports - VERY IMPORTENT!
  • Alter CFG_ system to sublime config - IMPORTANT
  • Alter all ext.py file into simple but dynamic loader with very simple code - important.
  • Add more extension support - important.
  • Add Cross file support - VERY IMPORTANT - This means that .html files will use HTML by default, JavaScript in Script tags, and CSS in Style tags..... For PHP - PHP by default with SQL support within it, when php tags disabled use HTML / JavaScript and CSS... Same for ASP except ASP instead of PHP... etc... The purpose of the sublime-settings in this case is so they can be dynamically loaded when another language is needed and it'll load the mapper which the user wants to use.... Note: This is where the syntax rule system comes in - activate languages, deactivate, and more... IMPORTANT
  • Set up Syntax Rule System so code such as scope mapping can take place in as few as 1 or so lines of code - so it doesn't need to be done individually per mapper when the logic behind it can be generalized...
  • MORE
    -MORE
  • MORE
  • Create template ( which isn't a _User class which has all or most callbacks along with user-friendly comments... ) - Important
  • Create extended template which is the same as the standard template except more detailed comments ( maybe ) and with examples...
  • Add Help files - high priority after setting up proper comments for all of the callbacks along with a template..
  • Add Language system - low priority at the moment.... because of lack of interest.
  • Other todo: Possibly merge with CodeMap... Right now this is an external add-on and it works great with the default system and oleg-shiro has been greatly accommodating regarding altering the naming schema for files because of decimals causing problems ( Python has odd naming and loading conventions and if you have a file with 2 extensions which is comment, you have to break the standards set in place to load it... ) - thank you :-) - OR keep it separate.. Right now everything can be done without merging, and without modifying the back-end code ( which is important to me because oleg-shiro has been doing an excellent job keeping everything up to date, and by my introducing an alteration means it may not be approved via pull-request and I'd have to modify the file each update and the user would need to extract the addon each time... This causes issues which is why I won't alter the back-end..... Or create my own addon... This hasn't been necessary and with my limited time using CodeMap has been great - I won't do this unless absolutely necessary ( Discontinued event, etc... ) because iit just means reinventing the wheel for something which works good as it is!
  • Come up with a proper name - XCodeMapper is just a developmental code-name....

If you encounter any issues - please let me know! You can post on BitBucket, or here ( if I'm allowed to keep this going - I think XCodeMapper - when I come up with a better name, it'll change - and CodeMap would go great together because of a combined user base... I am piggybacking right now, but hopefully my mod will gain traction and bring more people to CodeMap... I haven't found anything else like it so far...

@oleg-shilo
Copy link
Owner

I hope you don't mind I'm posting this in a new thread...

I don't mind it at all :)

In fact this is exactly what I had in mind with CodeMap as a product. I wanted it to be a lean, simple and reliable platform, which would be used by ST3 devs to create various code mappers and regex mapping algorithms. The mappers for everything, even the most exotic syntaxes. Or even competing mappers for the already covered languages. So we are good...

There is one thing that I found challenging though. I found your post (above) is overwhelming to read because of the size. But... this is really subjective.

Cheers,
Oleg

@Acecool
Copy link
Contributor Author

Acecool commented Jan 21, 2018

I agree with you - I need to take the time to rewrite it to outline the features, pros vs cons, etc.. along with screenshots - similar to what I posted on the sublime forum with more organization and less fluff. I'll do that soon - there are still more things to do with the mapper system such as cleaning out some of the excess code / combining some of the functions, and structuring the callbacks.

I've been experimenting with using sublime-settings too and I think it'll actually be a welcome change. Even if we don't end up merging - I can make each ext.py file identical and have the back end route to the most-child class and import parents upwards to avoid circular inclusion - not a fan of each file being identical, but I'll make them as small as possible and using a slightly different system so circular imports aren't broken by it including the XCM base..

I am also looking into modifying my repo so it can be simply added to package control and still upload the files to the correct location. This may or may not be possible without creating a separate package with a dependency - and packages that use others mean the others are automatically extracted by package control.

With regards to the settings system with sublime text - if the file isn't in a package root directory then it looks in the user/ folder root. There are ways around this... The settings file can become quite large depending what people want to add ( DataType / Arg replacement system with short vs long output for the data-type for the args that are replaced along with func vs class support and linking the keys from args to data-type keys via their values -- AccessorFuncs with the option to link the value to a config key or the actual value assigned ) so I'm also considering splitting them up - a default file with all of the default AccessorFunc / CfgAccessorFunc definitions, etc... and each language can then expand using inheritance so only the key values which are altered from default need to be supplied, but others extend such as the AccessorFunc tables... -- If I use one file per, then the User/ folder can end up with a LOT of configuration files depending the final number of languages supported, but I can manually choose the locations of the config files - ideally in User/CodeMap/ so they're organized with the package which will use them ( I'm considering asking the SublimeText team to add default support for User// when looking for config files because it's odd they ALL need to be grouped together in User/ )..

Just some of the things I'm doing... and I still haven't forgotten about cleaning up the original post above - following posts would be used for changelog and user requests along with the post on sublime text forum... But because it is here people will see it as a way to enhance an already excellent addon.

A nice feature to see with CodeMap would be a way to navigate through the entries using keys - but instead of just up or down - use blank lines as divides so you can jump between them and then continue up / down.

Regarding merging:
you mentioned that you had what I'm doing with X in mind for CodeMap.. I mentioned before in an earlier post that I have no problem with merging - that offer still exists - if you are serious then we both need to agree on a range of things such as:

  • coding standard to use or create ( basically airy( x, y, z ) vs non(x,y,z) - comment style, how many new-lines between / before functions, classes, etc... and a bunch of other things - I wrote one a white back for Lua which I do need to refine and it focuses on efficiency - ie _ prefix for local vars / args, none for global or file-scoped vars, all uppercase for CONST // ENUMs, __ prefix for internal or private which poses a small problem with python, use of Accessors, etc... which we can work off of or design a new one ).. It doesn't matter to me as long as the code is uniform and focuses on efficiency and readability ie it doesn't look like it was thrown together by 10 people but by one person / team on the same page. Folder structure. File naming structure. etc..
  • Design - ie with my system it would call for a decent restructuring of the back-end of CodeMap. I'd suggest we use classes / object oriented programming / libraries, etc.. And reduce repetition - ie if we repeat code we can turn it into a helper function in a library which doesn't need to be reloaded and then everything ends up as building blocks... How would we want to structure user maps and the maps I've been designing. Which ones ( or simply all, it wouldn't be a problem to include all of them ) to include and which ones to act as addons - ie if I need to move my AcecoolDev_Framework mappings to the repo for that then that's fine. As GMod Lua is already an extension it'd be nice to support it by default.. structure of config / settings files.
  • Overall functionality, features, etc... What all do we want to be part of the default design.
  • Name - I do like CodeMap. It's concise.. simple, to the point - and I repeat.. But I have come up with a huge list of names - if we merge all I ask is that you look at them and give an opinion.
  • Versioning design - I'm partial to the Major.Minor,Build_or_tiny style. 0.0.0 / 1.0.0 first release with basically everything / 1.0.1 for a tiny change / 1.1.0 - reset last or increment for each version so it stands as a tally of how many versions have been uploaded
  • and more..

Merging would enable to move a lot of the features to the back-end and prevent the need for ext.py files being identical for nested classes ( I've been working on the settings system so you can use the full-name of a class or just the short-name so User vs Default vs ProjectX, etc.. plus a bunch of other systems ) meaning less code to execute and it'd be more streamlined - but the option to use ext.py would still exist for those which want to use a global mapper per language - the one issue with one mapper per language is because many make projects out of code and those projects add things or change how the language is used which confuses a lot of mapping systems - one of the reasons why I added the project classes with inheritance is because of GMod Lua but also because I have a project within and if I'm looking at Lua without my project I don't need all of the other syntax to be looked for - increasing speed at which the data is processed...

I do like CodeMap but it has a major flaw. The lack of a category system means when one thing is encountered twice with something in between causes the current system to output the same category twice. It also prevents the data from being ordered. Other than this - it is a fantastic base. The ability to use shortcuts to scroll through the output is useful - extending this to jump between categories would make it even better along with the other features makes it an excellent choice for mapping system.

If we don't merge fully - moving the category system, when finished, to the back end would be a major bonus for CodeMap and those that use it. I still have some work to do before it is fully ready.

Sorry for the wall of text - I guess I just have too much to say and so little time to do...

@oleg-shilo
Copy link
Owner

I have to confess, I have missed somewhere among these enormous amount of reading your primary message: "you see your work being merged with the CodeMap plugin".

Sorry but, as I have already expressed, this contradicts with the plugin model. CodeMap is to stay simple and completely decoupled from the mappers. Which are to be deployed on top of the CodeMap either separately. And only in some cases by being included in the plugin package as resources. However there is not going to be any merge of the plugin codebase with anything else. Or any code change for that matter.

Fixes, missing features - yes, but no refactoring for the sake of refactoring, no design changes to accommodate specific mapper unless it brings other benefits.

All mappers need to follow their own development life cycle. Versioning, releases, design challenges , everything should be separate and should have no effect on CodeMap. That's why I don't want you to have the wrong expectations about the merger.

As I see it you need to develop your comprehensive mapper(s) in a separate GitHab project. Own your product, describe it, promote it (it looks like it deserves it) and the only connection to CodeMap it would have is that your product "XCodeMapper" would have another product "CodeMap" as a prerequisite.

BTW this type of relationship between plugins and subplugins is quite common. In VSCode plugin manifest you can even specify another plugin as a dependency and the plugin will be automatically installed for you by the IDE.

@Acecool
Copy link
Contributor Author

Acecool commented Jan 21, 2018

I wasn't aware of your viewpoint - but I did suggest the merging of the category system without needing to merge anything else... Also, I didn't say merge the mappers - I meant a different way to load them which would fit the model in the back-end so instead of needing to load ext.py when one extension uses many different languages, etc... a rule can be set up to decide how they load ( what I am going to do is load it and have dynamic loading - but it'd be more straight-forward in the back-end because of how you'd end up importing...

If you aren't necessarily interested in merging, that's no problem.. I did mention I don't mind if you are interested in no features, or only a few ( such as the category system ). Also, the comprehensive mappers would be separate from "merging" if merging - ie the core features of XCM such as caching, categories, easy adding of syntax to map ( which can be extended to be called from a tmLanguage or sublime-syntax file ) etc... The mappers are the collections of those calls, and the callbacks to modify how the data is processed... I did ask whether or not to include the mappers by default but it isn't important... If you're not interested in the core features ( You did mention it was your vision of how CodeMap should work ) then no problem. I'm just not sure of your standing because you mentioned the backend ( I'm assuming ) is how you envisioned CodeMap then stated you don't want to merge at all because of the mappers ( the collection of AddSyntax calls, and other rules to modify the data found )...

As for refactoring / design - I didn't mean recode from scratch or anything - basically deciding on the coding standard of how the code should look within CodeMap so it doesn't appear as though it comes from a ton of people with their own style... this is to display professionalism in the code.

For design, I meant what specific features you're interested in - ie basic categories vs unlimited nested support - how are the categories added, etc... A basic outline - not a complete rewrite of whatever...

The code change to bring other benefits - for the mappers - as I mentioned above - a different way to load using rules brings many benefits ( easier to process files which use multiple languages - PHP uses 6 [ PHP, HTML, JavaScript, SQL, CSS, Regular Expressions ] or more? same with ASP, etc.. ) that's what I meant by redesigning the loading system so it doesn't need to rely on a single ext.py - it can load multiple and then either process the code in chunks / lines and strip out what isn't needed using a rule system and supply the data to the mapper - similar to how Sublime text supplies function names, etc... to the command palette.

I'm only speaking of benefits as far as I know?

I did notice your VSCode addon ( I have been wanting to give VSCode a shot so if it is similar, and supports python I may port this over too but the output would likely be different )...

I am going to explore modifying the repo so it can easily be added to Package Control - the problem I see is with modifying the sublime-syntax and tmLanguage files to add extra chars to highlight but I need to dig deeper...

Just to be clear - when I spoke of merging I never meant merging the mappers ( collection of Addsyntax, etc ) to the back-end because that takes away from the system by locking the mappers in place and making it harder to edit... The mappers in the front end is best - the question posed was if we did decide to merge the back-end features ( category system, easy adding of things to look for with many search modes, etc.. and more ) whether or not to include the mappers I've come up with as default mappers ( in the custom_mappers folder as you have done with py.py and others? I'm sorry if it seemed any other way...

New Update

New update - Caching system... If developer mode is on ( which reloads the core files if they are modified without needing to restart st3 ) then those file timestamps are added to the mix to determine whether to load the cached file or process the file and create the cached file... Caching can be disabled per mapper ( or globally when I add sublime-text )...

Todo:
Add backup system - delete excess backups based on Time kept and or number of backups ( enable / disable any or all - default will be disabled )

Integrate OnCalcGutterIcon - so when a gutter icon is set ( can be automatically bound to categories, or manually overwritten in this callback ) to show you in your mapped file where everything is ( to work with the caching system I'll allow adding saved-data to another cached file - same file .rules or something which would be a basic text file indicating line, rule to execute, and data ( icon, or otherwise ) )...

Add delete system to cache system so cached files which are N days old are removed - configurable to the second if wanted...

Also, as for name of this system since I am closing in on most of the main features I want in ( backup system may not be added ) - CodePeer or something else... I have a few others I like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants