Sublime Forum

Acecool Code Mapping System - previously XCodeMapper - Developmental Name - Nearing Version 1 - addition to [ CodeMap by oleg-shiro ]

#1

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?

  • Any and all support is appreciated whether words of thanks, hate, constructive criticism, negative comments all the way to financial assistance! Thank you, in advance!

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
    • bat - Batch File
    • js - JavaScript
    • lua - Lua / Moon & Garry’s Mod Lua
    • md - MarkDown
    • php - Hypertext PreProcessor / Personal Home Page
    • py - Python
    • sublime-settings - SublimeText Settings File
    • ts - TypeScript

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.
1 Like

Class view for C++
CodeMap - interactive code tree plugin
Is there a way to numbering the lines?
CodeMap - interactive code tree plugin
Can someone better versed Sublime and/or Python explain this line
How to achieve sublime Ctrl + left mouse button function jump function, like IntelliJ IDEA that function
#2

Requirements: Install CodeMap - Then extract XCodeMapper into the appropriate directories - right now the bitbucket uses the full-paths from AppData to Sublime Text 3 to packages to user to CodeMap… I’ll modify it soon so it can be added directly, hopefully…

Where is XCodeMapper available?

0 Likes

#3

For some reason I thought I posted the link in the first post… I’ll add it to the top:

The repo is currently designed for manual install - however I’ll look into making it so all you need to do is add the repo to Sublime text and have it do the rest ( need to solve the issue of why config files aren’t being loaded using sublime.load_settings … )


#Frequently Asked Questions and Extended Answers#

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: ‘<?php', '<?', '?>’ ( 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!



0 Likes

#4

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…

This shows DirectParentClassName.FunctionName( _args ) as entries to CLASS_FUNCTION primary category…. This shows how it looks on a traditional python file…

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!!!

Display using FullPathFromShallowest.ToThe.Deepest.Until.DirectParentClassName.FunctionName( _args )

Display using DirectParentClassName.FunctionName( _args )

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 ) ):

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…

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 )

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… ):

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…

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…

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…

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 :slight_smile: - 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…

0 Likes

#5

Changelog Post

Update just a moment ago:

Changelog:

Packages/CodeMap/code_map.py ( Note: I do not make it a habit of modifying CORE files unless absolutely necessary - these changes have been submitted to oleg-shiro to be added to the default system )

  • Prevent rubberbanding of view being refocused by CodeMap under certain circumstances: by preventing Code - Map Panel from reclaiming focus for the view / file if we’re no longer looking at the file / view mapped at the time the go function is called.
  • Prevent rubberbanding of view being refocused by CodeMap under certain circumstances: by ensuring the same window is still being used - ie if the user switches window in the short delta-time it takes between the sync_map function as synch_map to be called and the go function to be called - prevent the old window from being re-focused when it no longer interested the user…
  • Fix: Corrected issue where v == None: return wasn’t included in go function - as T time has passed, and since we can’t trust user input ( and users have control over views ) we need to make sure it wasn’t closed to prevent a logical error: v ie None Type doesn’t contain sub * function / variable…
  • Prevent 2 different timeouts from being created when only 1 is needed - we don’t need 2 and we don’t need a lambda function here.
  • Note: Because Sublime Text allows you to replace files of unextracted packages by creating a new folder in Packages/ I have simply included code_map.py and nothing else to that folder which isn’t needed… I did have to include the custom_languages/ folder because there is another bug where when Packages/CodeMap/ folder exists, it assumes the custom_languages/ folder does too and doesn’t determine whether or not files exist before trying to load them causing full-stop logic errors… These files are included for the time being… I will remove code_map.py when these changes are put into the default package…

Packages/User/CodeMap/Acecool/XCodeMapper.py

  • Added additional examples for the OnSetupCodeMapPanel callback - most of these are commented out - the one that isn’t prevents the Code - Map Panel from scrolling past end ( but doesn’t affect your other panels if it is enabled )

Packages/User/CodeMap/custom_mappers/py.py

  • Misc

Packages/User/CodeMap/custom_mappers/md.py

  • Corrected typo causing issue where it wouldn’t work…

Packages/User/code_map.sublime_settings

  • Added my configuration for CodeMap to ensure that my code mappers are used instead of the universal mapper for Python…
0 Likes

#6

Changelog Future

0 Likes

#7

Changelog or other / Future

I will be adding a more detailed changelog after a few more versions are completed. This is so I can focus on code - I’ll stiil submit posts / replies to this post to let you know what’s going on but a full-changelog will only be available later…

Below is a rough-pseudo-draft of a changelog of what it could look like along with some information on some of the updates and approximate position along the developmental tree before initial release…

  • Future Versions

    • Version 1.0.0
      • Initial Release - This will be what will be announced soon… This may or may not be the stand-alone version…
    • Version 0.9.0
      • Added Sublime-Settings Support for all languages…
      • Added Automatic Folder Creation Support
      • Converted all configuration data to sublime-settings files.
      • Extracted all mapper classes into their own file and folder.
      • Created new Acecool_Mapping_Classes/ folder for the classes…
      • Created new AutoLoader class to handle automatically loading the appropriate class - used for ext.py files so all of them can be identical but still point to the appropriate file…
      • and more…
      • x
      • y
      • z
  • CURRENT STATUS:

    • Version 0.8.1 - Current version on Bitbucket!!!
      • Fix Issue with Caching system
        • Packages/User/CodeMap/Cache/ didn’t exist - Added empty file to the repo so the folder will now be downloaded in the zip… Will look into creating the folders required within Python…
    • Version 0.8.0
      • Added Caching System
      • Added updates to some mappers…
    • Version 0.7.0
      • Added new layout options for Python, and Lua for ways on displaying class-scope - nested categories vs full-name vs partial-naming to save space vertically or horizontally, or both depending on the screensize and configuration you choose…
    • Version 0.6.0
      • Continuing onward…
    • Version 0.5.0
      • Added many more and more languages, plus more streamlining…
    • Version 0.4.0
      • More callbacks galore added… Streamlined further. Added basic configuration system and AccessorFuncs with methods to load configuration data into the mapper base from each class / ext file…
    • Version 0.3.0
      • Added much easier methods of adding syntax, entries, and streamlined it all into a single class-base with callbacks starting to be added…
    • Version 0.2.0
      • Added easier methods of adding Syntax entries and mapping…
    • Version 0.1.0
      • Here’s where I added basic category support, runtime class, and more…
    • Log Version 0.0.0
      • Inception, basic design, started coding…
0 Likes

#8

Latest update includes file caching! with more coming soon!

Integrate OnCalcGutterIcon callback - allows you to control which gutter icon is used when one is set so you can override the one set or keep the one used…

Gutter icons will be available soon… To work with the caching system I’ll create a basic text cache .rules for the file which will need to be processed - format would be similar to line - rule - data so 123 >:>:> GutterIcon >:>:> path/to/icon added for each saved-rule - things which needs to be reprocessed ( not much at this time )…

If Developer Mode is enabled, then the file timestamps of all core files are included in the decision of whether or not to process the file we’re mapping VS loading the cached file - Cached file timestamp has to be GREATER THAN all of the files… Other files checked: The mapper, of course, and the cached file… When I add the sublime-settings files, those will be checked too!!!

To review - here is the current set of tasks I added, and have been working on…

  • Task: Create Backup System

    • Task-: Creates backup every N Saves ( 1, 5, 10, 25 or how ever many you want. 0 and -1 disables )…
    • Task-: Delete oldest backups after N files ( of the same file - 10 backups, 25, 100, 1000, or how ever many… -1 disables ).
    • Task-: Delete oldest backups after they are N days old ( 1 day, multiple… Note: This will apply to cache output too although it’ll be a different variable )
  • Task-MostlyDone: Create Cache System - then it was latered to Update Cache System

    • Task-: Add Delete old caches if they are older than N Days ( 7 by default - can be anything you want - Time in seconds so it can be in seconds, minutes, hours, days, months, years, millenia, etc… or disable deleting by using -1 )…
    • Task-DONE: Add logic to check the Mapper file Timestamp - If it has changed, then reparse a file even if it hasn’t changed because the mapper can change the output…
    • Task-DONE: Add logic to check if DEVELOPER_MODE is True - if so then check timestamps for XCodeMapper.py, XCodeMapper_Definitions.py, and AcecoolST3_Library.py because reloading without restarting SublimeText is enabled therefore we need to be able to reparse the file…

There are good things coming! The backup system will likely save the files to dropbox or other cloud service ( config enabled when I add it ) along with the delete features ( based on number of backups a file has vs age OR BOTH - caching will have a similar feature for AGE but not number of files because there will only be 1 )

Why should a code navigator have a backup system built in?

  • The library I’m adding code to is growing - some code in XCodeMapper needs to be moved so it isn’t necessary for the mapper to contain all of these features - however, because the mapper now caches the output panel for multiple files to improve your experience… adding backups of files you’re working on is a SIMPLE extension. If I were to create a new plugin just to do this, then the overhead would be enormous for such a small system… And, I figured since this system monitors saves anyway ( and I was thinking of naming my system CodePeer or similar ) it should help with other tasks which need to be done, but which are tedious - the nice thing is it falls under the goal of improving efficiency too because it’ll manage your backups if you want it to too!

Will I be able to disable the backup system

  • Yes… By default it’ll likely come disabled because a viable directory will need to be selected anyway ( Documents, Documents and Settings, etc… won’t work for everyone because of different operating systems and not everyone has their dropbox / other cloud service folder in the same location )…

What is the default state of the caching system?

  • By default, the caching system is enabled.

Can I disable the Caching System?

  • Yes. For each mapper you don’t want to use it, simply set CFG_CACHING_SYSTEM_ENABLED = False - I’ll add a universal disable switch when I convert to sublime-settings files so the default / user XCodeMapper ( CodePeer? ) will have an option to disable globally even if the mappers specifically have it set to enabled…

What benefits does the Caching System bring?

  • On my 10 year old machine Running a Q6600 Quad Core Intel 2.4 GHz running OC on air for the last 10 years at 3.0 GHz, Asus P5k Motherboard and 8GB DDR2 - Parsing a 5000 line Python file with a lot of mappings takes 0.50 seconds… Loading the cached file takes 0.01 to 0.05 seconds. A huge difference for me. In short - even with outdated machines, caching can be much quicker than processing files
  • The speed of processing files will go up as new optimizations are added into the code ( and now you can track the time to see when updates improve or decrease performance! )
    • Note: I may even add a timekeeper to cache your times for various files along with the statistics for those files and mapper to compare which remain on YOUR MACHINE as debugging logs, if an issue arises you may submit them on the Issues board – Adding a timekeeper system of this nature creates a lot more overhead and it isn’t necessarily needed for day to day use except when tracking issues so it would be a low priority…

What Negatives does the Caching System bring?

  • There is slightly more overhead, but it is negligible - but it still counts. File I/O can be quite expensive on machines using mechanical drives - Even with a Solid-State Drive, File I/O can still be costly but not nearly as much as with a mechanical drive. If you have a mechanical drive, Open the SublimeText console and take a look at the debugging output for the Caching System and Execution Timer ( I’ve added the timer and the timer for the caching system to track the time-savings )…
  • If your PC can parse a file faster than it can load a cached file, then disable the caching system.
  • If your PC can load the cached file much quicker, then I’d recommend Enabling it.
  • It creates up to many files in a Cache/ folder ( and I currently don’t have a method in place to remove them - the files created are typically small in size so unless you’re down to under 100MB on your C:\ drive or drive with Sublime Text 3 and AppData, then you should have no problem with it )
  • Because it creates more files it uses your hard-drive. Because it uses your hard-drive, it creates wear and tear - despite being negligible it is still there and still counts…
  • If you’re running an OLD hard-drive ( over 25,000 to 50,000 hours of use or Approx 3 to 6 years of CONTINUOUS C:\ drive or non-stop backup / restore, etc… USE or run-time [ motors for mechanical drives also wear out ] ) then using the hard-drive other than an external low-risk file backup ( extra copies of music, etc… but nothing important ) isn’t recommended…
    • After the average / mean time before failure time is exceeded, you should really stop using the drive… It’s best to stop prior to reaching that - the drives can still be used somewhat reliably for unimportant data-storage / backup in the pc or externally…
    • If you’re running it as your C:\ drive, I’d recommend swapping NOW - and make sure you backup all of your important files off of the drive immediately!!! For these drives I don’t recommend running any unnecessary tasks on the drive, including this type of caching - even though it is negligible, it is still wearing the drive down and in the final stages of life it can easily break…
0 Likes

#9

I just noticed I didn’t include a blank file in the Packages/User/CodeMap/Cache/ folder so it wasn’t included in the update / downloads… Because of this an error occurred… For now I’ve included a blank file… I’ll look into creating folders via code within Sublime Text in order to prevent this type of issue from happening in the future…

But Caching works nicely… I’m nearing completion on setting up the sublime-settings files too ( meaning all of the custom_mapper/ files can be IDENTICAL with the Classes being separated and put into a different directory ( or the same ) for ease of finding, and editing the mapper of your choice and ease of maintaining the _User class, and to create new ones for other projects… )…

More syntax error checking is coming too and a few other things - but the sublime-settings file system is the primary along with separating the files from the cusom_mapper/ ext.py file format ( unfortunately oleg-shiro doesn’t seem open to the idea of taking some of the features on such as categories or different ways to load ext.py files ( such as including more than 1 for extensions which support more than one… PHP and ASP both support 6 at last count but I may have missed some [ PHP / ASP, RegEx, SQL, HTML, CSS, JavaScript ],… so I wanted to add a way in the backend to decide which file to load first instead of ext.py always to improve efficiency … It’s odd he isn’t open to merging some features especially since oleg-shiro claimed XCM was what he envisioned for CodeMap… so I’ll likely be moving towards a standalone app which will give me more control and reduce the required repetitive code… and it’ll give me freedom to ensure active bugs are fixed immediately when found instead of left because “It works” most of the time… )…

“Just because it works, doesn’t make it right.” - Josh ‘Acecool’ Moser…

I’m considering a few names: CodePeer, CodeBrowser, CodeNav, CodePilot, CodeNavigator, CodeFilter, CodeNode, CodeGuide, CodeTerm, and some others…

Source being another word to interchange Code with or to add… and a bunch of other words too… I’d like to portray efficiency, ease of use and setting up new project mappings, organized concise information. Live Wiki of sorts with Error detection and a combination of algorithms used ( similar to how BubbleSort is faster than QuickSort for SMALL samples so using QuickSort and BubbleSort together creates a much faster sort algorithm and using a 3rd for middle or other creates an even faster sort algorithm ) so I’ll process chunks of the file first and what’s detected is removed from being processed by other checks ( comments are scanned for tasks / notes, etc… but removed from code-lines ) etc… this way I can integrate default tmLanguage / sublime-syntax files meaning an automated code mapper will likely be a reality very soon… I also have new callbacks to use Sublime Symbols and more so that’ll be coming soon too…

If anyone is interested in helping me come up with a new name - I am willing to offer a small reward / incentive… or help by providing opinions on some of the previously shown names would be a huge help…

0 Likes

#10

Upcoming version - here are some of the changes…

Added helper functions for the OnMappingFileSymbols callback - which uses SublimeText @ command palette view to pull data from the file right away - one step closer to a universal mapper for languages Sublime Text supports… I need to increase resolution on this…

Added OnMappingFileSymbols callback to the default language classes because it can now be used due to the helper functions to provide useful information, line info and more…

Added menu and context menu options for sublime-settings ( still working on a system to integrate sublime-settings throughout )

Moved almost everything into a single package folder + hotfixes for CodeMap ( They have been submitted to CodeMap but haven’t been included in their release yet ) and our User folder for cache, backup, settings, custom mapping classes, etc…

All syntax files I edited have been moved to my folder too - it didn’t make sense to have them in many folders because they’re used for the mapping panel - not for the language so there’s no need to replace the originals…

Added edit_settings_plus command - an option which allows us to open an unlimited number of left / right paned settings files for default / user settings… This is so all of the mapping files can be opened at once, or just the main settings, key bindings, or main settings + key-bindings, etc… As there are so many configuration files ( all with user / default ---- Key bindings, Plugin Definitions, Plugin Settings, Default Mapper Settings, Mapper Settings for all available extensions ) this makes it easier to open and edit them… edit_settings_plus will be available for other addons as I’m working on a Sublime Text Framework to put all of my helper-code…

The next version is BIG - A ton of changes are present… Look for it soon!

0 Likes

#11

Developmental Update - Pre-Release Notes ( Release soon )

The name so far Is Acecool Code Mapping System - not entirely original but it defines the purpose quite well…

I’ve moved everything into a single folder plus the user folder… I’ve moved syntax files over to the folder because they don’t need to replace the originals as they are only in the mapping panel…

I’ve added JavaScript additional output methods so String.prototype.XXX can appear in nested categories - I’ve also changed it so all of the functions are displayed the same way… ie instead of xxx = function or xxx = async function ( the = through function are deleted and function added to the start ) so it reads function xxx( args ) so everything looks more uniform…

still working on a few things - have been busy with physical therapy but I haven’t stopped developing…

Still working on the settings system but the edit settings plus is almost finished for loading all of the files easily… I’ll be adding an on the fly editor / loader for the context menu and regular menu system so category hiding can be done from there… Order is another thing… dynamic so the category system can be set up from within a config file too…

I’m cleaning up my Python / Sublime Text imports…

And I’m working on making my addon stand-alone to avoid conflict, provide better features with less code, and more…

Expect the release soon… Hopefully on Package Control as an addon which can be searched for!

Additionally adding more features - I’m changing the callback system so an object is returned which contains all of the data so the number of args don’t need to change anymore… I’m adding support for sublime text regioning so the data output will be collapsible… And so bookmark icons can be output in the code-view to show what was discovered, etc…

I’ve extended the Sublime Symbol support system even further… It loads the lines of code it finds from the data sublime text supports so more operations can be handled and so the arguments can be displayed along with more info… I’m working on a way to see what else can be received through Sublime Text Data and the Command Palette data for variables, etc…This is a step in the right direction for making a universal mapper as most languages do have symbols set up - unfortunately since they don’t always provide all of the info, this is where I need to improve it because it’d mean I can skip those lines for parsing if all of the relevant data is discovered immediately…

Expect more soon!

0 Likes

#12

Here’s another update for those of you following… I understand it is a wall of text, but it is also incredibly detailed with my thoughts, design, questions for you, and more… I do read all your responses and messages for feature requests, criticisms and more…

Stand Alone Progress

I’ve made some great strides turning it into a stand-alone plugin. The bug is fixed ( when closing the panel manually it would close the next file to take focus which was related to Scratch being set to True - CodeMap has the same issue but it also causes the issue when you close it using the command [ which means also when you use the key-bindings ] and I sent oleg-shiro what I found so he can hopefully fix it on his end ), the configuration hierarchy is almost hammered down, the designs on how I want everything to work may also be hammered down for the most part… and I did my first test with adding data to the panel and having it output properly - and also with adding regions for icons in the gutter and testing out some folding.

Note:

When I have released this plugin on Package Control, I will make a new thread - referencing this one - with a much shorter description of what it does - more advanced descriptions, wiki, help, etc… will be available in the documentation folder… the plugin will likely be extracted using the .no-sublime-package file… - some screenshots, and the changelog and a few posts ( 5 to 10 ) for future changelog or information - which I’ll try to keep short and to the point…

Some of the latest updates ( So I can keep track of them in the changelog when I write it )

  • Created system to ensure the default folder structure for the plugin is created ( for the User folder ) - Will extend it if Package Control doesn’t support some features such as: allow copying files to the folder for updates, file changes, etc… if the user hasn’t change the file, and more… this runs on plugin_loaded… It also ensures the Package structure exists too…
  • Fixed bug where closing the panel / group MANUALLY ( using tab X or middle mouse ) would close the next file which took focus in the default group / column-1 ) by ensuring Sketch flag is set to False when the panel is closed ( oddly this didn’t happen when I closed the group using code )…
  • Changed the names of the configuration files - they are in settings/ folder in the Package directory so no need to prefix it with settings, and the extension is sublime-settings so… ext_* for extension settings, lang_ for language definitions, plugin_* for plugin related settings such as main, definitions and mapping / mappers…
  • Performed first successful test of outputting data to the panel
  • Performed first successful test of folding outputted Regions
  • Performed first successful test of Region icons output to the panel ( May mean I can manually use the syntax highlighter by defining scope so I can have a tree output without messing up the coloring of everything else - also means the user can define custom colors for other aspects in different scopes in the panel highlighter function ) - lots of possibilities with this…
  • x
  • x
  • x
  • x Will fill in more as they come to mind…
  • x
  • x
  • x
  • Much- Much- More- but- these- are- the- main- ones

Some references in this post may use these replacers to describe something simply

  • [E] as an Element which can be interacted with in the panel - instead of it being limited to a full line to be double-clicked to take you to a line in code - it can be a REGION so a single line, single char, or whatever… so multiple links can be on a single line useful for if output mode is Full…Path.To.Class.FuncName so each element can link to that class header and the function making browsing much more intuitive and easy… also the ability to change what happens on click based on how it is added ( additionally, because regions are used there will be a region mapper so when you AddClickableRegion( Region, TypeOfInteraction[ insert snippet, jump to line, more ], ReferenceOfLineOrSnippetEtc [, repeat args ] - we won’t need :123 to jump to line 123 suffixed to a line meaning the line is what it is and isn’t weighed down by information not needed to be seen by the user - but the line number can easily be added if the mapper design calls for it but it won’t be what designates the functionality )

Icons, folding and more

This means I’ll add icons to the file being mapped in its gutter to show what was found, to mark potential errors / warnings, etc… mark notes, and so on with it all being configured via configuration files. The output view will also be configured with many different configuration files ( via hierarchy and with rules so projects can have their own output style, or everything can be made to look the same in a lower segment of the hierarchy, or higher depending where you look at it from and how you enter it - I view from entering at the top )…

For folding support, the output panel will let you fold categories and their contents - the category folded will, or should, fold the nested categories too ( or they can be folded independently ). This is because a lot of information can be made available and I still prefer to use as little space as possible, but in some cases this isn’t possible with the current method ( which is why I am also changing it - more below ) which is how CodeMap did it ( 1 line per entry ) which is intuitive but also highly restrictive especially with how Sublime Text handles text - Regions and all…

Displaying the data

Additionally, because of how much information can be made available - I am going to allow multiple panels to be opened ( and of course using Python and multi-platform gui libraries I can make an advanced panel outside of Sublime Text and have them communicate and have it display the output in a much more intuitive way - ie dropdowns to select classes, or level of data so code vs including errors, tasks, notes, etc… and tree views, and much more - maybe even a flowchart generator to help find logical errors - some of this would be way down the road. )… as for the multiple panels, the idea is up to 3 stacked on top of one another… One of which contains the main mappings / output, the other containing tasks and notes - also errors and warnings if applicable, and the third for snippets ( right now using snippets it somewhat meh in my opinion - it may be great when using nothing but keyboard and all but I prefer to have an organized list… ),…

Naturally, the 3 panels don’t all need to be open at the same time, they can be resized independently of one another aside from width - and you can choose what goes where so if you decide you don’t want notes / tasks in a separate one, and you want one for errors to open only if errors are present, etc… then this will all be possible - however changing layout dynamically can destroy immersion which is something I want to avoid but the option may end up existing…

Personal design choice inspiration

I end up with a ton of notes / tasks so, even with 2000 pixels vertically - the font has to be of a readable size - they can take up a lot of space and I usually have them at the top… now I can keep the code mappings at the top, the tasks / notes / errors / warnings below that, and snippets below ( although I may also add support to do multiple columns so someone with a lot of snippets can use the full height - the issue being those with less wide screens will have less room to show info - which, again, is why I have different viewing options available to make the most out of the room available to each user… )… The gui panel is another play to help those with multiple monitors - I, when I used Notepad++, kept function list and snippets panels in my bottom right monitor hugging the left of the monitor so the full-screen would be of coding, or most of it, and a portion to the left was used for files but now with the top monitor I have a full-screen dedicated to Directory Opus ( look it up, it’s fantastic, and avoid XYPlorer which was made using AutoHotkey, laggy and tons of issues along with a non-responsive support team once they have your money ) which lets you define rules for icons, color tabs, and tons else ( check it out - example of some of my rules showing the icons to show the realm the files will be loaded in - I could put them on ALL files, but I usually keep them on the deviants so it’s less busy: https://www.dropbox.com/s/0akj3ayver4znwo/c_acecoolservers_srcds_acecooldev_framework_garrysmod_gamemodes_acecooldev_framework_framework_extensions_screenshot_20180307215731_8868.png?dl=0 )

Configuration Hierarchy

The current hierarchy looks like this:

  • User Preferences File - default is ignored - This will be the first place I look for all entries - this will override everything, but it’s best not to use this for settings for this plugin as the system has a lot of flexibility based on language used, ( even which syntax highlighter is used, soon ), the file extension, the mapper used and more… This is to offer a quick way to test settings out - although my edit_settings_plug command will allow you to open all configuration files ( yes, all with 1 command - or the related onces, etc… ) - This may not be at the top forever…Also - I may require the commands to be prefixed by ACMS. so DebuggingMode would become ACMS.DebuggingMode, etc… so one of my commands wouldn’t change something in Sublime text - or make it part of ACMS: { … }

      ## Order is: -- Note: ext may be used to get language and class, etc... or I may use syntax file... for now I'm using the ext file for the language, then the language, then the rest...
      ## 
      ##	User File Extension		---		DEFAULT File Extension settings, if existing - note these likely will load before hand... actually languages will probably load before hand and I could easiy define the rules in the language definition then get rid of all extension configs unless the user wants to separate them?
      ## -- Maybe add Syntax setting detection here? --
      ##	User Language			---		DEFAULT Language - this is for the active programming language
      ##	User plugin_mapping		---		DEFAULT plugin_mapping - This is the global mapping configuration such as how the output is displayed, by default with language, file extension, project file paths, etc.. all able to influence changes...
      ##	User plugin_main		---		DEFAULT plugin_main - this in main plugin config such as type of panels to use, internal / external, how many, etc..
    

Design choices left to make - And me taking the time to listen to you

I’m still deciding on a few things on how best to approach them and I’d like some input… This involves the configuration hierarchy, the paneling system, and more… I’ll listen to any and all suggestions, criticism, etc… The addon is for for me to help improve my efficiency for what little time I do have, but that doesn’t mean I can’t help others improve their efficiency, debugging, error finding, and more… either… Anything you want, let me know… Pet peeves about anything, let me know… etc… let me know… I’ll see what I can do…

The configuration hierarchy - is it too much? I listen to the default configuration files and allow others - should I combine some of them - the problem with combining some such as the extension mapping iis some of the rules can become long and string a lot of them together in a single file and it just looks daunting when I want to make it look easy… I am going to write a mapper for sublime-settings ( which looks like json ) to help with processing / reading the data - but give me your input… An example of one is with .php files, it supports 6 languages ( PHP, HTML, CSS, RegEx, JavaScript, SQL ), 1 with 2 implementations ( RegEx )…

  • Certain choices still not fixed
    • How some of the rules for configuration load in - ie Language settings may simply be read into memory so it knows which languages are used for each extension ( then for each mapper they all get a chance to look but to reduce this high level of processing the rule system would be in place so each text is only processed once, or maybe by more but for the most part text is parsed once ) - I may simply need to do to see which is the best choice and which feels most intuitive…

    • Configuration Hierarchy - the order, whether or not some should be consolidated ( ext files, etc… )

      • Note: Because of one of the methods - ie for language and extension configuration… I will likely have those load in AUTOMATICALLY and load to memory ( sublime text auto updates the settings objects when a change is made ) which are then associated with a special set of configuration getters / setters…
    • Whether or not I should have a RunTime configuration file or not… - LIKELY YES -

      • If I do what CodeMap did, a single file to track the last source-code file mapped and use that to process the file or something… Although I’m not a fan of that especially since Sublime Text can SAVE settings and I could simply make a User Runtime configuration file track some of the information needed such as was the panel open, which was the last file mapped, was it cached - load the cached file should happen automatically even if the file isn’t saved but it can serve other purposes… the runtime config would allow much more freedom in what is saved …
    • Whether or not I should copy all of the default mappers to the User folder - LIKELY NO - (This would simplify the imports at the top and to give the user easy access to everything they can use )… Right now the plugin will need to look in the user folder for the active language / class to use and then if it doesn’t exist look in the plugin folder - it would be easier having them in one location only… we’ll see… for now they’ll be separate…

      • The benefits are the user can simply edit the user file, and see an example without flipping through folders - the bad is for updates I’d need to track what was changed and update that part only, if not changed, so I’d need to make a system to edit the files ( I could port my php system over which is really old, but is logically sound )… Because of the bad, and the additional processing, and because of chance of an update not happening if I keep them in the default folder then the updates wouldn’t have an issue… As for the User file, I’d copy it to the custom mappers folder and that’ll replace the one in the default folder - the user is free to edit it… updates would be made to the one in the defaults folder and the change-log would specify what was changed, if anything and the user can make those changes unless the file is untouched ( crc ) in which case I can simply replace it )… I may stick with that then…
    • Method of editing the menus dynamically - :Likeley a series of prefixes with an added option to edit the settings files for syntax, language, extension, and others, using the menu for selection - for starters maybe only a simple prefix system or the runtime config file

      • Also, prefixes of choices used so if the user wants to hide certain categories, or show them, or change the order - I’d like to make all of this possible in the menus ( dragging is detected so dragging up / down, etc… should be possible for order, selection would toggle - checkbox, etc… )… then all the data is saved to their preset file… Maybe that’s the best way - instead of saving the order to the ext file, the syntax config file, or the language config file - save it to a prefix file… interesting then a name can be set too…

Some Design elements - basic outline of what will be expected

  • Custom multi-platform GUI elements

    • Search box - search the output only in default mode, code or files using sublime api without having to define project, etc… makes it easier and quicker to search and project when searching between 2 or more places so one is always set to the project and the file filter can be made, saved and used instead of only recents - locations too - and sublime text can be used for other less common elements… Being able to store unlimited number of locations or settings means being able to very easy and quickly search what you need when switching back and forth - much easier and better than a recently used list limited to a small number…
    • Buttons or button / dropdown to switch between output modes - so tree view vs simple categorized output, etc…
    • Quick select dropdown so you can choose which category to view - or which aspect of code such as an object, etc…
    • Settings / Configuration - method to change colors of background, text, which font to use and more… this is very important because you wouldn’t want a white background for this and dark for sublime text or vice versa - ideally read from current theme with the option to make changes for this panel only…
    • more…
  • Default Sublime Text Panel Layout

    • 1 to 3 vertically divided panels with a possibility of one to be a new column for snippets
    • The ability to configure what is displayed where / which panel so if you only want errors / notes / warnings and tasks in one panel, you can do that - and you can individually control which panels are active at any time so if a panel isn’t active you can define the data is hidden, or inside of the main panel instead…
    • Method to double-click, or maybe single-click an [E]
  • Extra Todo

    • During testing I stumbled across a way which closed the minimap for a single panel and left it for the other view - this is something I need to reproduce because it means the minimap can be enabled for the code being mapped, but hidden for the output panel ( one of the reasons for going with a gui panel is to fully control this and more, but it may be possible on a reproducible level to be used in Sublime Text for the default panel which means less wasted space )…
    • Reproduce method for using less space, ie if you create a new column with no cell info, or was it the other way around - a blank / void area is created and it may be possible to render something else there…-- ie see about not displaying tab data in the new group / panel… It may be possible to use a null / void area ( typically in these areas anything shown is replicated each frame so you see trails - with a null area in Sublime this isn’t the case but it may be possible to render something else there such as the panel / view without the tab, bar, info, etc… meaning less wasted space ) … Or maybe display the gui there - it may be possible but I need to look further into it…
    • If the minimap glitch above isn’t reliable then I may be able to simply scale the cell up to over 100% to stretch it off the render-area in Sublime Text meaning the window wouldn’t increase in size but the group would be stretched beyond the border and be hidden from view - this may be a more viable hack to the previously mentioned example…
    • Create system to edit the context menu on the fly - this is to have dynamic settings edits taking place when choices are selected changed, and so the file which is edited is also changed depending on which the user wants to save to ( Default will be either the Language currently used, the file extension, or the syntax file used on the source file - but the user can select which to use and with 3 options when they select it should also load the settings - so depending on some presets you can hide / show categories straight from the context menu ) - this is still someone unfixed as to how the multiple selection will work - I may have prefixes, named prefixes, etc…
    • Create a way for the ACMS object to be auto-refreshed… right now I have 1 object with some changes visible in other areas but if I edit the object, I don’t update it - although I need to write a way to safely destroy the old, preserving the data, loading it into the new - probably by editing my AccessorFuncSupport Installer Class for a simple way to transfer all of that data ( started ), and some other data… maybe Python already has a way…

The main idea behind a complex back-end for an easier front-end and middle-ground to define the mappings, and more…

The idea behind the new, more complex back-end is so you can map a language once and then use it in as many files / extensions, etc… as you want… Then there are rules so you can use custom mappers for languages to map certain things in projects - things to look out for… but multiple languages in a single extension doesn’t mean rewriting or re-creating a mapper for each extension - simply define which languages a file extension uses, and then define when the mapper should be used - for php, again, php is active in <? ?> tags, sql in function calls, RegEx too, HTML is active when PHP isn;t… JavaScript is active if HTML is active if a script tag is found ( or in certain HTML Tag parameters such as onclick where it can be active ), CSS when HTML is active in Style tags… etc…

The system is to repeat the least amount of code, definitions, etc…, but you still need to map extensions - I am planning on making this easier by allowing some of these to be extended… For instance - Language configuration files define the name, the package folder, the default syntax highlighter ( non modded variant although I’ll probably add the mapping output definition in the same file ), etc… Then, for instance with Garry’s Mod Lua which is Lua with C Style operators - instead of redefining Lua, I can simply put in the GMod Lua language definition that it extends Lua - the name, package folder, and highlighter changes, but the rest is essentially the same… For now language definitions also link to the file extensions it uses ( I will work on making all of this more seamless, dynamic so less is repeated soon )

the extension files repeat this by stating the languages which use the file extension - I will remove this repetition by defining it in the language definitions because it can then define the extensions once instead of the extensions files all stating the same thing over and over ( aside from the rules, if any ) - this should make the extension definitions almost meaningless aside from when they have rules…

I simply want to make a tool which can be used by whoever wants to in order to create solutions, find problems, etc… faster. Also being able to locate everything in your code at a quick glance saves a ton of time scrolling through thousands of lines to find one function or one line of code such as a print statement, and more… Note - the GUI system when ready will have a search box to make it quicker to find and since you’re not searching the entire file, only the output then a print statement with xyz will likely be the first and only thing you find instead of every comment with that, or whatever will not be in the output…

Big ideas

Yes and no… Breaking down the logic into building blocks simplifies the problems greatly making it easier to create and less time doing so… My new Sublime Library includes a ton of Sublime and sublime plugin calls in much more user-friendly and easy ways of calling them…

Why the update on the board?

Talking about something is one way to let the facts be known, and to work through a problem… It’s why successful developers take the time to write up a design before coding because then it’s a simple plan to follow and makes it much quicker to create. It also helps find logic bugs, design flaws, and receive feedback…

This helps me keep on track and helps me process ideas by posting here…

0 Likes

#13

Finally got back to it today - and I ran my first successful test loading the file previously associated with CodeMap…

now I need to get rid of all of the CFG_ values in my files, split them up into individual files and change it from ext.py files to LangName_Default/User/Project.py with languages mapping to extensions, with the rules, etc…

But, everything looks great… Next up is adding the double-click value to jump to locations in code… - Once that is done I will probably go ahead and release it under first release candidate on Package Control.

Then I can add the snippet output, the other panels, and much more…

I can always modify the ext.py files later…

So I’ll either set up the release for this week or next sometime with either the settings system in or not ( I’d prefer it in ) and I am going to shoot for splitting up the files to make things easier…

As for config, I’ll probably have the mapping-settings / language to ext loaded first and then based on how it’s all defined, it’ll run the relevant mappers on the file and I’ll extend that behavior after the first release candidate is live…

I also need to see about using the viewport / map scroller glitch to remove it for the output panel…

As for the regions system for folding, icons, etc… since my previous mappers conformed to the old method of output, they aren’t going to be in the first release but they are high on the list… now that I have control over the back-end of my addon I’ll be able to add a lot of features and ensure it is as bug free as possible…

I would love it if a few people would volunteer to test as soon as it’s ready - then I can use the repo system before package control… I hope Package Control updates work straight forward enough…

0 Likes

#14

Just got back from physical therapy…

Before I left I spent a few minutes and updated all of the ext.py files… new naming scheme for the classes is: ACMS_LANGUAGE_ID( Parent ):

I am still considering whether or not to force the names to be 100% lowercase - although I could always set up a mapping service to track changes or issues…

Lua and GMod Lua are now regarded as separate languages - technically they are where GMod Lua extends Lua so the name will come in that order instead of Lua_GMod it’ll be Lua_ and GMod_Lua_…

Added code so double-clicks on code lines ending with :NUMBER will now jump to the line - Task: If line doesn’t have :NUM then add a failsafe / check so there is no error…

Added code / logic so opening the panel will automatically call the mapping system to execute the mapper…

Added EventListener logic to update SourceView ( also changed from CodeView and PanelView to SourceView, and OutputView to make it less unknown as to what they do )

Some planned for today and other comments

I believe I am going to go ahead and work on the settings system because that is a huge part of the system and it makes more sense to do that rather than some other things on the list because if I don’t then it’ll mean a ton of overhead for files when separated and that’s no good…

Also - I’m now 100% free of CodeMap - I moved my custom CodeMap ext.py mappers into AcecoolCodeMappingSystem\maps\ ( dir name may change ) and added it as a check - so there will be 3 basic checks… for files - Lang_ID.py in User, or in Default… or ext.py in Default ( I may add User folder addition later for those wanting to make a mapper based on ext )…

I also added a check so if .generate exists ( which is how CodeMap called the mappers ) as a function then it’ll assume CodeMap style returns ( ie the text / data ) with map_syntax as the syntax highlighter although when the configuration files are set up I’ll likely get rid of that ( although leaving it would mean that CodeMap files would be almost fully compatible - to be 100% I’d have to capture all of the category entries, etc… and instead of the output being cat1, cat2, cat3, cat1, cat2, cat1, cat3, cat1 - repeats because of no category system - integrate it into my category system automatically so if someone spends time making a mapper for CodeMap it’ll still work with mine - although with CodeMap I’ll probably just have it use ProcessLine callback or something… still up in the air whether or not I want to work on supporting it fully ( maybe some other time after I’m fully set up )…

I still need to add logic for snippets, and more…

Basic folding is automatically added with Sublime Text ( but I still need to change the way the output is done - ie using Regions to output the data and mapping the data to what it is so I can get rid of the :LINE number - unless the mapper adds it, but it won’t be required to functionally teleport to the line in question because on entry added the data would be a region and a mapped entry would be added so the chars x to n would be for that line so double-clicking it would mean linking to type line-jump, line number = x…

0 Likes

#15

Wasn’t able to get a huge amount done - physical therapy takes a lot out of me…

Anyways… today while my medication is working I am going to be working on the settings systems…

I’ll add the RunTime setting system first to make sure the last source-view is known so on launch the id can be set immediately so double-clicking for a line will know which view to look at if I don’t switch views to start with…

Then I’ll start working in the overall settings system…

Or, before I do that I’ll modify all of the languages currently written and change the callbacks so a single arg or so is used - making it easier to update / change data so I don’t need 2 callbacks just to change the category of a line and the code, etc…

The changes can be made in the object, then that can be returned and everything else can work with it…

Important aspects of the object:

  • These need to be added…
    • ORIGINAL line of code
    • Stripped whitespace line
    • Original line number
    • Whether or not additional lines are added
    • Length of what the output will be ( for Region mapping - I’ll use a LocalToWorld / WorldToLocal style mapping which is basically LocalToWorld( Vector( 123, 0, 0 ) ) converts to :PlayerPos + that Vector, and vice versa - in short basic offsets with functions to easily map based on those offsets - this is so Region mapping will be much much easier and quicker…
    • Catetgory - Original category is absolutely important, but final category will be there - so SetCategory will keep the original somewhere which can be referenced - the CategoryType for original and current is important, and more…
    • etc…

Designing the object will be simple and straight-forward because each entry is the same so I can just add to it… And editing / adding data, or changing certain aspects will be easy because not every single class / function will need to be edited… hopefully ever… I may use one or 2 objects depending… ie a File object for the actual file in question being scanned, and the entry object… we’ll see…

If I get these 3 things done, then I’ll probably run a few tests of a region mapping for output ( also for folding, icons and more - right now basic folding is supported through Python tabs??? or something else - through sublime text…

Oh… The rules system is a high priority…

Additionally - Because the Sublime Symbols return everything I map from the start - I’m going to allow Symbol mappers which don’t chunk or go line by line through the file at all - they use Sublime Text Symbols and nothing else for mapping ( it’ll be a configuration option ) meaning the mapping will be done exponentially faster…

On a side note to that above - as symbol mapping is in, and I haven’t noticed anything different for Python, all of the function / classes I return otherwise are actually in the symbols list with nothing missing - I’m going to change the system so class ACMS_Python_Symbols will be an option which can be used ( and I may change it so it becomes the default mapper combined with symbols and chunking or going through line by line ) - I simply need to add the class tracking based on depth to the symbol data so the nested output is as it is with the current system - but this opens the door to universal, incredibly FAST ( even without caching ) method to map all files by default…

And yes I did add a default.py mapper in the maps folder… I’ll set it up slightly differently with the naming so you can choose default, user ( although as one file right now it will choose the file in the user\ACMS folder first )

And a small fix to my Plugin Installer… Right now the base file is installed in a function but I made a list which creates all of the folders necessary - I started adding file support to it - I just need to finish that up so the User files can be in the main plugin folder and simply moved into the user folder… or created…

0 Likes

#16

So I can get this out sooner rather than later - I’m going to start by putting all of the mapping settings in the plugin_mapping.sublime-settings…

so language configuration ( by extension the extension config too - although I’m going to omit those to start with meaning the language config will be loaded - then all of the relevant extensions for the languages will be loaded into memory… when an extension is encountered which a mapped language, the language will be set as active and used… )

I’ll add multiple language support soon… I’ll also split up the configuration files as soon as I know 100% for a fact I have an excellent grasp on how it all works…

This way the mapping file will be large to start, but it’ll be split later when I decide whether or not to add config files for file extensions, and for syntax… this way I can focus on the core elements, and getting everything working before expanding it - and I am writing it so expanding will be easy…

Taking numerous breaks between each update…

  • The caching system is repaired - I changed it to use res:// a while back for testing and now I’ve changed it back and updated the path to use the User\ACMS\ folder…

A lot still todo - here are some additional things I’ve discovered and will want to finish:

  • edit_settings_plug

    • Add variable expansion for various tables used, or route it all through the same…
    • Add developer arg so the set read-only will work for settings files on the left ( ie copy only but no save )
    • Add res:\ look up
    • Make sure the default / contents is correct when null is used in a table using the standard base/user_file, data / contents, etc… file_list should be working fully except variable expansion
    • Add additional vars to expand ( Syntax selected, language used, and more )
  • XCM

    • Convert naming over to ACMS
    • Convert system to use ACMS( ) or GetPluginObject( ) and simplify XCodeMapper so only the processes, rules, etc… are in there and all of the configuration, etc… comes from the Plugin object ( even if it is routed through XCM for simplicity for inclusions… )…
  • Config

    • Add config option so the user can choose the cache folder
    • Add caching of regions ( when region system is functional )
    • Backup folder / interval
  • AccessorFunc Support Class

    • Add / log all accessor funcs created so I can automatically build a str function out of them by grabbing all of the data based on name and output in a meaningful way such as <Get or PREFIX / Set( … ) value is … for each…
    • try to get everything into a data var so copying the data to a new class is simple - or create a new class for data node…

And plenty more - but this is helping me keep on track :slight_smile:

0 Likes

#17

A Quick update - I haven’t forgotten about the project and I’ve been cranking out a lot of progress… as much as I can in my state and with other things going on.

I had an idea the other day and wanted your opinion - because all other IDEs with code mapping elements have a toolbar for searching for elements within the output, and filtering / masking results ( inclusive or exclusive search ) based on search text - why shouldn’t I add that feature in mine? Especially because of the new Region based mapping system which would allow me to add multiple clickable elements per line…

This means I can have 2 clickables to change the mode of searches - ie filter / mask, and a box for searching which would open up the search panel at the bottom - and because it has on change callbacks I can filter or mask the results in real time… On top of this, I can add a dynamic element to the toolbox so all Python, Java, C++ classes / objects and Lua meta-tables can be added ( all based on the map class discretion ) to this dynamic toolbox area so when you click - depending on the mode filter or mask it’ll then filter the results in real time acting like the dropdown would in most IDEs for these code maps…

The question I’m asking is: Would you prefer this toolbox to be in its own panel ( so scrolling the main panel means it’d still be at your fingertips ) sized to its contents ( small / tiny ) at the top / bottom ( again, this would be selectable ) or would you prefer it to be in the main output panel?

I haven’t implemented the multiple panel output system yet - but I will and when I do it will be something I will add so the toolbox can have its own panel and it will all be configurable… But, for the default system when you open the panel - what do you prefer?

Once I add in the region based mapping and the output system to make it easy to output all of the data across multiple panels, all of this will be straight-forward and easily configurable - I’m asking now to prepare for what the default look should be pre-configuration ( similar to how games use the WASD format to conform to the popular choice )…

As far as changelogs go - mine is pages long and the todo list is just as long with more things being discovered and ticked off as time goes by. The majority things left are:

  • Finish the settings system implementation ( ie get rid of the OnSetupConfig callback with it creating the accessor funcs and each map class needing the pass CFG_ vars into those accessor funcs )… This alone would get rid of a huge chunk of all mapping classes and make it easier to split.
  • Split all of the classes from ext.py to Language_Project.py ( so JSON_Default.py, or JavaScript_User.py, Python_ACMS.py, etc… ) withthe configuration linking language to extension maps…
  • Add all Language definitions to the definitions configuration file - ie Python: uses_extensions: py = True ( or table of rules ) and load those into memory…
  • Load all language maps into memory - or reconfigure it in the RunTime configuration file so that extensions: py = lang=Python, mapper = User… lua = lang=GMod Lua, mapper = User, etc… so when a file is found I can still pull up the data using the extension ( one of the simplest ways - if I were to use the Syntax [ which gets messed on my end a lot ] it would work but could lead to other issues but I do plan on making this an option later…
  • Convert all arguments from all mapping classes from all callbacks into a single arg, after self, representing an object with all of the functionality of the args, and more… plus much more organization and cull leftover callbacks which are made obsolete by this change…
  • Finish the edit_settings_plus system - last thing to do is implement a file linker so if you click on ACMS_RunTime sublime settings file in the base or user group, it’ll open the same file in the other group - if it exists… ie focusing both which will increase my productivity for finishing the settings setup and everything which is why this is the thing I’m working on now…
  • Decide whether or not to implement the region system into first release…
  • a few fixes or other things not mentioned…

Once released I’ll add the panels system and more… I may or may not do the region system prior to version 1…

0 Likes