Modify

#1625 closed Bug (Wont Fix)

AutoIt3Wrapper_GUI: Compile, directives block update.

Reported by: anonymous Owned by: Jos
Milestone: Component: SciTE4AutoIt
Version: Other Severity: None
Keywords: directives duplicate Cc:

Description

  • duplicate directive commands.

AutoIt3Wrapper: 2.0.1.24/2.0.1.29. (Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 OS:X86))

Updating the following directives setup,

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4        -w 6 -q
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -q
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

;; note part.
;~ #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
;~ #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1
;~ #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;~ #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1

result in,

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile_type=a3x
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -q
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -q

;; note part.
;~ ;~ #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1
;~ ;~ #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1

issue 1a) instead of the first(not used) dup-directive the second(active) dup-directive is used as source for the (assuming)"move not active duplicate out of the way"
issue 1b) the moved line is not commented out.

note 2a) already commented out directives getting additional comment out part.
note 2b) eats inactive AutoIt3Wrapper_GUI region tokes.

Attachments (1)

Check.au3 (18.2 KB ) - added by anonymous on Dec 7, 2016 at 10:47:02 PM.

Download all attachments as: .zip

Change History (10)

comment:1 by Jos, on May 15, 2010 at 9:11:54 PM

Resolution: Wont Fix
Status: newclosed

I am not really planning to work on issues that are the result of copying statements generated by AutoIt3Wrapper.
Just never copy this line in whatever flavor, shape or form including commented:

#Region ; Directives created by AutoIt3Wrapper_GUI

Jos

comment:2 by TicketCleanup, on May 15, 2010 at 10:00:02 PM

Version: Other

Automatic ticket cleanup.

in reply to:  1 comment:3 by anonymous, on May 15, 2010 at 10:43:59 PM

Replying to Jos:

I am not really planning to work on issues that are the result of copying statements generated by AutoIt3Wrapper.
Just never copy this line in whatever flavor, shape or form including commented:

#Region ; Directives created by AutoIt3Wrapper_GUI

Jos

I see. ... No I don't.
Why is the first dupe-directive changed?
If its just ignored, and thereby pushed downwards by the creation of a new AutoIt3Wrapper_GUI block. It should stay the same.
Its changed. (and the secondary commented-out AutoIt3Wrapper_GUI block has nothing to do with this)

The secondary commented-out AutoIt3Wrapper_GUI was only added to show that not only active directives are changed, but disabled ones to. although in a none destructive way. That this is a side effect of the AutoIt3Wrapper_GUI block region headers, thats fine by me.

comment:4 by anonymous, on May 16, 2010 at 12:33:47 AM

Looked at the source, but ... well we see.

comment:5 by anonymous, on May 16, 2010 at 2:22:37 AM

Suggestion patch.

3559c3559
< 	$source = StringRegExpReplace($source, '(?s)(?i)' & @CRLF & "(\s?)" & $directive & '(.*?)' & @CRLF, @CRLF)
---
> 	$source = StringRegExpReplace($source, '(?si)(?<=\r\n)\s*' & $directive & '.*?\r\n', @CRLF)

I'm out.

comment:6 by anonymous, on May 16, 2010 at 2:43:01 AM

Bug fix on suggestion patch.

3559c3559
< 	$source = StringRegExpReplace($source, '(?s)(?i)' & @CRLF & "(\s?)" & $directive & '(.*?)' & @CRLF, @CRLF)
---
> 	$source = StringRegExpReplace($source, '(?si)(?<=\r\n)\s*' & $directive & '.*?\r\n', '')

comment:7 by Jos, on May 16, 2010 at 11:13:43 AM

I had a look at why the dup directive was changed and not removed and fixed that.
While in there also change the change for the header and footer #region statements to only remove the non commented lines.

Give it a spin to see if that fixes it.

Jos

comment:8 by anonymous, on May 16, 2010 at 2:19:11 PM

I'm not sure why @CRLF & "(\s?)" .. is used in the regexp's. As \s? will only target/capture one blank character. But \s* will probably has it own set of problems.
Anyway: v2.0.1.31 Works for me.

comment:9 by anonymous, on May 16, 2010 at 2:30:01 PM

you are right...my intent was to ignore leading whitespaces so updated it to (\s*)
Updated the Beta version.

Thanks
jos

by anonymous, on Dec 7, 2016 at 10:47:02 PM

Attachment: Check.au3 added

Modify Ticket

Action
as closed The owner will remain Jos.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.