Releases: CodesAway/BEXCodeCompare
v0.13.0
Added
-
BEX Parsing now indicates if a state occurs within a parent state (such as a String literal within a JSP tag) (fixes #104 and fixes #105)
- Interface Indexed
- Class IndexedValue (implementation of Indexed interface)
- Class ParsingStateValue - implementation of ParsingState with a current state and the parent state
- BEXUtilities.index - static method to create IndexedValue
- Add unwrap parsing state utility method (fixes #108)
-
BEXParsingLanguage.TEXT - language which gives no special meaning to any characters
-
ParsingState default methods (fixes #95)
- isComment
- isStringLiteral
- isWhitespace
- hasParent
- getParent
-
IntRange default methods
- getInclusiveStart
- getInclusiveEnd
- getCanonicalEnd
- isSingleValue
-
Overriden method DiffHelper.combineToDiffBlocks which takes a BiPredicate to give control whether two blocks are combined
-
BEXPair.hasEqualValues (fixes #97)
-
Method BEXPattern.pattern which returns the pattern used to create the BEXPattern
-
BEXChangeInfo constructor taking boolean and int change number (in BEX plugin)
Changed
-
Moved parsing functionality from package info.codesaway.bex.matching to info.codesaway.bex.parsing
-
Renamed BEXMatchingLanguage to BEXParsingLanguage
-
Renamed MatchingLanguage to ParsingLanguage
-
Renamed BEXMatchingStateOption to BEXParsingState
-
Renamed MatchingStateOption to ParsingState
-
Renamed MatchingDelimiterState to ParsingDelimiterState
-
Renamed MatchingDelimiterResult to ParsingDelimiterResult
-
Renamed BEXMatchingUtilities to BEXParsingUtilities
-
-
ParsingLanguage has been annotated as a
@FunctionalInterface
(fixes #94) -
DiffWithIndex now implements Indexed
Fixed
-
BEXParsingLanguage.JSP
-
BEX Eclipse Plugin
- Regression bug where final keyword only change should be seen as non-important change (fixes #107)
- Recognition of commented out lines (now uses BEXString to perform the parsing) (fixes #100)
- When combining changes, keep important and non-important changes separately (so UI shows fewer changes when important and non-important changes are on consecutive lines) (fixes #103)
-
Combine changes if have same type and are not important (fixes #91)
-
Click top level should go to first change (fixes #92)
-
Ignoring comments didn't show range in BEX view if lines are on right side (fixes #99)
-
In compare window, if selecting inserted / deleted line in BEX View, remove selection from side where there is no line (fixes #10)
-
MethodSignature.getSignatureWithClass doesn't return short classname if getting short signature (fixes #101)
0.12.0
Added
- Method IntBEXRange.singleton
- DiffHelper methods
- determineEnclosedRange(DiffUnit)
- determineEnclosedRange(Collection)
Changed
-
Changed Javadoc to allow compiling against Java 14 (minimum version remains Java 8)
-
BEXMatchingLanguage.SQL handling of word characters when next to '#' and '$'
-
BEX Eclipse plugin (beta version 0.4.0)
- RangeComparatorBEX refactored to use BEXPair to reduce code
- Better handling of ignoring commented out code (when option is enabled)
- Group together consecutive unimportant changes
- Fix wonky scrolling in compare window
-
Upgraded backend libraries
- RegExPlus from version 1.2.0 to 2.0.0
- maven-javadoc-plugin from version 2.9.1 to 3.2.0
v0.11.0
Added
-
Support for parsing SQL
- Includes support for ensuring BEGIN / END delimiters are balanced in a match
- Added support for matching custom delimiters in a language (like BEGIN / END for SQL)
- Method BEXMatchingUtilities.parseSQLTextStates
-
MatchingLanguage interface
- Allows users to define custom language, if a sutable one isn't implemented
- For example, this would be used to allow writing a parser to match language specific keywords (no plans / need to implement in BEX Matching, but user could implement for their own needs)
-
Part of custom delimiters
-
MatchingLanguage methods
- findStartDelimiter
- findEndDelimiter
-
BEXMatcher now internally tracks the MatchingLanguage, so that custom delimiters can be matched as part of a search
-
Internal BEXMatchingState changed to accept collection of delimiters versus a String of brackets
-
Enum MatchingDelimiterResult
-
Class MatchingDelimiterState
-
Interface MatchingLanguageSetting
- No methods to implement
- Used just to indicate a setting, so can write custom settings (trying to be flexible in design)
-
MatchingLanguageOption (implements MatchingLanguageSetting)
-
-
MatchingStateOption interface (implemented by BEXMatchingStateOption)
-
BEXMatchingUtilities
- Method hasText which takes parameter to indicate if text search should be case-insensitive
- Method hasCaseInsensitiveText
-
hashCode / equals method in BEXListPair and BEXMapPair (per SpotBugs warning)
Changed
-
BEXMatchingLanguage renamed extract method to parse
-
BEXMatchingUtilities renamed various extract methods to parse
-
BEXMatchingStateOption renamed MISMATCHED_BRACKETS to MISMATCHED_DELIMITERS
-
Changed to use MatchingStateOption interface instead of BEXMatchingStateOption enum
- BEXMatcher
- BEXMatchingUtilities
- BEXString
-
BEXString keeps track of MatchingLanguage used when parser (helps BEXMatcher handle custom delimiters)
-
Minor tweaks to how BEXPattern caches patterns (ran into corner case with tests that checked for cached patterns)
v0.10.1
v0.10.0
Added
-
BEXPattern syntax
:[group\n]
to match rest of line, including line terminator:[group\n$]
to match rest of line, including line terminator (will also match if last line in text with no line terminator)
-
BEXPair interface extends Comparable interface (so elements are comparable, left then right, if the type is comparable
-
BEXString substring method overridden to take IntPair (including IntRange)
-
BEXPairs.bexPair helper method to create a BEXPair (can use static import)
-
IntRange.length method
Changed
- Renamed methods which reference start/end now refer to as range
- BEXMatcher
- BEXMatchResult
- ASTNodeUtilities
Fixed
- In BEXMatcher / BEXMatchResult, throw IllegalStateException if try to get match info if a successful match hasn't occurred yet
- IntBEXRange will throw exception if range is invalid (start and end match and exclusive on both ends, such as
(1, 1)
)
v0.9.1
v0.9.0
Added
- Added support for Comby style of regex
:[groupName~regex]
- Added some unit tests from Comby (found and fixed several bugs as a result)
- BEXMatcher / BEXMatchResult method entrySet()
- ImmutableIntRangeMap.asMapOfRanges
- Made AbstractImmutableSet public (used by ImmutableIntRangeMap and BEXMatcher)
- BEXUtilities.entry method
- Creates an immutable entry (used lots in tests)
- Similar to Java 9 Map.entry method
Changed
- In regex, added multiline flag by default, so
^
and$
match for each separate line- This should be more common
- Can always disable using the (?-m) remove multiline flag option in regex
v0.8.0
Added
-
ImmutableIntRangeMap
-
IntRange / IntBEXRange methods
-
BEXPattern
- Basic caching of BEXPattern (done behind the scenes)
- Method getThreadLocalMatcher
- matcher method which takes no arguments (can then call reset to set text)
-
BEXMatcher methods
- toMatchResult
Changed
- Refactored matching code to use ImmutableIntRangeMap
Removed
-
Code no longer needed after change to use ImmutableIntRangeMap
- Class BEXMatchingTextState
- BEXUtilities methods
- getEntryInRanges
- hasEntryInRanges
-
In BECR, ASTNodeUtilities, removed methods which aren't used (may be added back if a need arises)
- getCommentRanges
- findNode
0.7.0
Added
-
Initial support for matching JSP
- Added BEXMatchingLanguage enum
- Passes function to extract the necessary information (used in BEXString)
- BEXMatchingUtilities has the methods
-
BEXPatternFlag to REQUIRE_SPACE
- When this flag is passed, spaces in the pattern are always required
- By default, spaces are usually optional (except in certain circumstancances - to allow matching without regard to exact formatting in the code)
-
Improvements to IntBEXRange (can created closed range)
-
Method IntRange.canonical to "normalize" the int range
Changed
- Simplified BEXMatcher code and removed repeated code
- BEXMatchingTextState now implements IntRange
Fixed
- 0.6.0 didn't have all the code checked in (such as supporting star group to indicate the entire match)
- Whitespace before and after group in match is optional if not next to word character
- For example, the pattern
method(:[1] , :[2])
now allows the space before and after the comma to be optional - If want to always require space, can use the new flag REQUIRE_SPACE
- If want just this specific space to be required, can put two spaces in the pattern
- For example, the pattern
0.6.0
Added
-
BEXPattern
- Syntax
- :[@] to escape @ symbol (rarely needed, mainly useful for BEXPattern.literal
- :[group:d] to to have group consisting of only digits (similar to :[group:w] which is group consisting of only word characters)
- In group / get method, can specify group name as "*" to get the entire match (similar to group 0 for regex)
- Methods
- literal (use to specify literal text in pattern)
- compile (method that just takes String pattern, makes easier to use in IDE)
- Syntax
-
BEXMatcher
- Replacement functionality (similar to what's provided in regex's Matcher class
- Can specify :[group] for a specific group's value or :[*] for the entire match's value
- Methods
- replaceAll (including method which takes Function<BEXMatchResult, String>
- replaceFirst
- getReplacement
- appendReplacement / appendTail
- quoteReplacement (use to specify literal text in replacement)
- reset
-
IntBEXPair / IntBEXRange equals and hashCode method
Changed
-
BEX will contain all code that doesn't require the Eclipse JDT dependency (such as the new structured matching functionality)
-
Moved info.codesaway.becr.matching package to info.codesaway.bex.matching
- Moved from BECR to BEX project
- Renamed classes to mention BEX instead of BECR
- Renamed classes to clarify that they were used for matching
-
Moved IntRange from BECR to BEX project
-
Moved functions in BECRUtilities to BEXUtilities