Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#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 8 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 follow-up: Changed 15 years ago by Jos

  • Resolution set to Wont Fix
  • Status changed from new to closed

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 Changed 15 years ago by TicketCleanup

  • Version set to Other

Automatic ticket cleanup.

comment:3 in reply to: ↑ 1 Changed 15 years ago by anonymous

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 Changed 15 years ago by anonymous

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

comment:5 Changed 15 years ago by anonymous

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 Changed 15 years ago by anonymous

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 Changed 15 years ago by Jos

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 Changed 15 years ago by anonymous

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 Changed 15 years ago by anonymous

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

Thanks
jos

Changed 8 years ago by anonymous

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jos.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.