Raised This Month: $32 Target: $400
 8% 

[TOOLS] Notepad++ auto-completion dynamic generator for your sourcemod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lobnico
Member
Join Date: Sep 2012
Old 05-22-2014 , 06:05   [TOOLS] Notepad++ auto-completion dynamic generator for your sourcemod
Reply With Quote #1

So in addition to the nice decas_npp_tools

Here s an automatic parser for .inc classes written in PHP

You edit the class to edit your working .inc directories,
in top of it (will be recursive with each sub folders)
then u just launch the file with your local apache ( or any php server)

will generate natives, stocks, forwards, defines, enum

and u ll have to put the new sourcemod.xml file in ur userapp/roaming/notepad++

I also attach a generated file (contains defs from sourcemod 1.5+
and smlib in case you just want that)

That was made in a haste but permits to get autocompletion on your own classes
when autolaunchin the script with compile

libs_smlib_npsm_xml.zip

auto_doc.zip


Edit 5/23: Updated to handle copy to notepad dir / fixin order
__________________

Last edited by lobnico; 05-23-2014 at 12:14.
lobnico is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 05-23-2014 , 09:00   Re: [TOOLS] Notepad++ auto-completion dynamic generator for your sourcemod
Reply With Quote #2

Ciao guys,

I made my (Python - tooo lazy for something else... :-D ) script couple weeks ago. It's kinda messy and created in one morning, so no awesome script...

everything you need to do, is open that script and modify these lines:

PHP Code:
includesPath 'D:\Dropbox\SourcePawn\moje\include' // line 210 - path to root directory of your includes
nppPath 'D:\Program Files (x86)\Notepad++\plugins\APIs' // line 211 - path to APIs directory of your npp 
and then run that script. Script is made for Notepad++ Python script so I suggest you to instal this plugin and use with that (my script has some commands from this plugin - only in __main__), but with few changes it would work without this plugin.

This plugin process:
  1. only native, stock and forward functions (maby in future I will add some other features...)
  2. notes, params, return and error fields
  3. every *.inc files in includesPath directory and subdirectories.
If you use Notepad++ Python script, script should open your console and write something like this
Code:
*** START ***
includesPath = "D:\Dropbox\SourcePawn\moje\include"
nppPath = "D:\Program Files (x86)\Notepad++\plugins\APIs"
*** END ***
Run this script on my PC takes less then 1/3 second and my sourcemod.xml has 28 079 lines, so don't worry about speed...

P.S.: Make a backup of your sourcemod.xml, I don't expect something goes wrong, but have a backup is always a good idea ;-)
Attached Files
File Type: zip GenerateSourcePawnAutoComplete.zip (1.9 KB, 359 views)
KissLick is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 10-16-2015 , 20:51   Re: [TOOLS] Notepad++ auto-completion dynamic generator for your sourcemod
Reply With Quote #3

Quote:
Originally Posted by KissLick View Post
Ciao guys,

I made my (Python - tooo lazy for something else... :-D ) script couple weeks ago. It's kinda messy and created in one morning, so no awesome script...

everything you need to do, is open that script and modify these lines:

PHP Code:
includesPath 'D:\Dropbox\SourcePawn\moje\include' // line 210 - path to root directory of your includes
nppPath 'D:\Program Files (x86)\Notepad++\plugins\APIs' // line 211 - path to APIs directory of your npp 
and then run that script. Script is made for Notepad++ Python script so I suggest you to instal this plugin and use with that (my script has some commands from this plugin - only in __main__), but with few changes it would work without this plugin.

This plugin process:
  1. only native, stock and forward functions (maby in future I will add some other features...)
  2. notes, params, return and error fields
  3. every *.inc files in includesPath directory and subdirectories.
If you use Notepad++ Python script, script should open your console and write something like this
Code:
*** START ***
includesPath = "D:\Dropbox\SourcePawn\moje\include"
nppPath = "D:\Program Files (x86)\Notepad++\plugins\APIs"
*** END ***
Run this script on my PC takes less then 1/3 second and my sourcemod.xml has 28 079 lines, so don't worry about speed...

P.S.: Make a backup of your sourcemod.xml, I don't expect something goes wrong, but have a backup is always a good idea ;-)

This is great, however, it's generating a malformed XML file which is blocking it loading in notepad++
__________________
Neuro Toxin is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 10-17-2015 , 00:44   Re: [TOOLS] Notepad++ auto-completion dynamic generator for your sourcemod
Reply With Quote #4

KissLick why the fuck would you generate the XML string yourself instead of using the XML API that is provided to you?
Potato Uno is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 10-17-2015 , 04:27   Re: [TOOLS] Notepad++ auto-completion dynamic generator for your sourcemod
Reply With Quote #5

I was total newbie when I was writing that script and it wasn't so complicated to look for a proper way...
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.

Last edited by KissLick; 10-17-2015 at 04:49.
KissLick is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 10-17-2015 , 04:47   Re: [TOOLS] Notepad++ auto-completion dynamic generator for your sourcemod
Reply With Quote #6

I added this and it works fine now

Code:
def cleanXmlForInput( str ):
    return str.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', 'quot;').replace("'", '&apos;')
Attached Files
File Type: zip GenerateSourcePawnAutoComplete.zip (2.0 KB, 307 views)
__________________
Neuro Toxin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode