-
Notifications
You must be signed in to change notification settings - Fork 184
Commands
In this page you will find the list and documentation of all GumTree commands.
GumTree use some system properties. Their values can be overridden by using an option flag directly on the top-level gumtree command, as such:
gumtree -C PROPERTY VALUE
Here are the commands related to diffing source code files.
gumtree webdiff PATH1 PATH2
webdiff starts a web server that displaying a diff between two files or two folders.
-
PATH1the source path, either a file or a folder. -
PATH2the destination path, either a file or a folder (must be the same kind asPATH1).
-
--port PORTchange the server port (default4567). -
-g TREE_GENERATOR_IDto force GumTree to use a specific tree generator. -
-m MATCHER_IDto force GumTree to use a specific matcher. -
-M PROPERTY VALUEadd a matcher property, available:bu_minsim,bu_minsize,st_minprio,st_priocalc,cd_labsim,cd_maxleaves,cd_structsim1,cd_structsim2,xy_minsim. -
-x COMMANDuse an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILEwhere$FILEwill be automatically replaced by the file to parse.
gumtree swingdiff PATH1 PATH2
swingdiff displays the diff between two files using the Swing java UI toolkit.
-
PATH1the source path, either a file or a folder. -
PATH2the destination path, either a file or a folder (must be the same kind asPATH1).
-
-g TREE_GENERATOR_IDto force GumTree to use a specific tree generator. -
-m MATCHER_IDto force GumTree to use a specific matcher. -
-M PROPERTY VALUEadd a matcher property, available:bu_minsim,bu_minsize,st_minprio,st_priocalc,cd_labsim,cd_maxleaves,cd_structsim1,cd_structsim2,xy_minsim. -
-x COMMANDuse an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILEwhere$FILEwill be automatically replaced by the file to parse.
gumtree textdiff PATH1 PATH2
textdiff outputs the diff between two files in a textual format.
-
PATH1the source path, must be a file. -
PATH2the destination path, must be a file.
-
-f FORMATchange the format (defaultTEXT), availableTEXT,XML,JSON. -
-o FILEchange the output file (defaultstdout). -
-g TREE_GENERATOR_IDto force GumTree to use a specific tree generator. -
-m MATCHER_IDto force GumTree to use a specific matcher. -
-M PROPERTY VALUEadd a matcher property, available:bu_minsim,bu_minsize,st_minprio,st_priocalc,cd_labsim,cd_maxleaves,cd_structsim1,cd_structsim2,xy_minsim. -
-x COMMANDuse an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILEwhere$FILEwill be automatically replaced by the file to parse.
gumtree dotdiff PATH1 PATH2
dotdiff outputs the diff between two files in GraphViz's dot format, that can then be transformed using the dot command to SVG, PDF, ... See graphviz.
-
PATH1the source path, must be a file. -
PATH2the destination path, must be a file.
-
-g TREE_GENERATOR_IDto force GumTree to use a specific tree generator. -
-m MATCHER_IDto force GumTree to use a specific matcher. -
-M PROPERTY VALUEadd a matcher property, available:bu_minsim,bu_minsize,st_minprio,st_priocalc,cd_labsim,cd_maxleaves,cd_structsim1,cd_structsim2,xy_minsim. -
-x COMMANDuse an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILEwhere$FILEwill be automatically replaced by the file to parse.
gumtree list ELEMENTS
list displays a list of GumTree's matchers, tree generators, properties and clients (commands).
-
ELEMENTSeitherMATCHERS,GENERATORS,PROPERTIESorCLIENTS.
gumtree parse PATH
parse outputs the AST corresponding to a given file.
-
PATHthe file path.
-
-g TREE_GENERATOR_IDto force GumTree to use a specific tree generator. -
-x COMMANDuse an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILEwhere$FILEwill be automatically replaced by the file to parse.