UDL 2.0 in Notepad 7 releasebrowsing

Hi, I have been waiting more than 2 years to this new release wishing a new UDL version… but we have again udl 2.0 :(

2 Years ago inside sourceforge forums I have been trying to fix some problems… to be able to configure it to support ADA syntax during various posts we saw that UDL cannot support languages like ADA… I even tried with special configurations but then we discovered a bug in code folding with CR LR that was breaking code folding…

Is there any plans to release UDL 3.0 or UDL 2.X ?? is UDL totally dead ?

I didn’t check the source code yet - found it by trail and error and
still don’t understand when and how it is working but from the examples
(sourceforge thread) provided I see that this might be a solution.

if you haven’t already installed the python script plugin, then please
install it from here instead of using
the plugin manager.

The script looks like this

WIN_EOL = 45001 # command id edit->eol conversion->windows
UNIX_EOL = 45002 # command id edit->eol conversion->unix
MAC_EOL = 45003 # command id edit->eol conversion->mac
TEXT_INSERT = 1 # editor constants
TEXT_DELETE = 2 # editor constants
IS_ADA_FILE = False # variable to identify ada file
format_dict={FORMATTYPE.WIN:WIN_EOL, FORMATTYPE.UNIX:UNIX_EOL, FORMATTYPE.MAC:MAC_EOL,} # map fromattype to command id
buffer_dict={} # used to save original format or different source files
def this_is_a_ada_file(_filename): # if file ends with either .a or .ada it is
return True if _filename.endswith(('.a', '.ada')) else False # considered to be an ada file
def callback_BUFFERACTIVATED(args): # gets called when new file is opened
global IS_ADA_FILE # or tab has been changed
global ORIGINAL_FROMAT_TYPE #
bufferid = args['bufferID']
filename = notepad.getBufferFilename(bufferid) # get the filename from bufferid and
if this_is_a_ada_file(filename): # check if it is an ada file if
IS_ADA_FILE = True # yes, set file identifier and
if buffer_dict.get(bufferid, None) is None: # if it hasn't already saved
buffer_dict[bufferid] = notepad.getFormatType() # save eol format of current doc
else: # otherwise
IS_ADA_FILE = False # set file identifier to false
def callback_FILEBEFORESAVE(args): # gets called before file gets saved
if IS_ADA_FILE: # if it is a ada file
saved_format = buffer_dict.get(args['bufferID'],None) # try to get a saved format
if saved_format is not None: # if one was found
notepad.menuCommand(format_dict.get(saved_format)) # set the original format
def callback_MODIFIED(args): # gets called whenever something changes (text, style...)
if IS_ADA_FILE and (notepad.getFormatType() != FORMATTYPE.WIN): # if it is an ada file and eol is not windows then
mod_type = args['modificationType'] # get type of modification
if (mod_type & TEXT_INSERT or mod_type & TEXT_DELETE) and args['text'] != '\r': # if it is an insert but not a \r or a delete then
notepad.menuCommand(WIN_EOL) # set the windows eol else ignore it
editor.clearCallbacks() # sanity check - just to be sure no callback have
notepad.clearCallbacks() # registered yet
notepad.callback(callback_FILEBEFORESAVE, [NOTIFICATION.FILEBEFORESAVE]) # register before save callback
notepad.callback(callback_BUFFERACTIVATED, [NOTIFICATION.BUFFERACTIVATED ]) # register buffer activated callback
editor.callback(callback_MODIFIED,[SCINTILLANOTIFICATION.MODIFIED]) # register modify callback

I hope the comments are clear, basically, every time you open a new file or you switch
a tab it get’s checkd if the file is an ada file by checking it extensions (see code).
If it is and you start modifying the code it checks if windows eol is used and if not
script sets it. If you save the file, it gets checked what the original eol was and then it
resets the eol.

If you create a new script with name startup.py and put the content into it
and you change the python script configuration from LAZY to ATSTARTUP, then
the script gets automatically executed every time you start npp.

If you create a new script with a different name, you need to execute it manually once
every time you start npp.

I have added today the python script and seems that is not solving the problem :(

I have upload a video example of the real problem… the bug u can see in the video is totally random… in any sentence suddenly tha open/close folding mark just is in a wrong place… and just creating new lines it auto fix it… and when you remove those new lines again the mark keeps in the correct place… so strange…

There are no code folding / function list support at all in scintilla or notepad++ that’s why I am trying to do it by myself using the “user custom lang definition” and udl but udl is useless with ADA :(.

Would be nice if udl3 fix this kind of problems… But I am not sure after these years if udl3 will be realease any day…