-
Notifications
You must be signed in to change notification settings - Fork 174
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.
-
PATH1
the source path, either a file or a folder. -
PATH2
the destination path, either a file or a folder (must be the same kind asPATH1
).
-
--port PORT
change the server port (default4567
). -
-g TREE_GENERATOR_ID
to force GumTree to use a specific tree generator. -
-m MATCHER_ID
to force GumTree to use a specific matcher. -
-M PROPERTY VALUE
add a matcher property, available:bu_minsim
,bu_minsize
,st_minprio
,st_priocalc
,cd_labsim
,cd_maxleaves
,cd_structsim1
,cd_structsim2
,xy_minsim
. -
-x COMMAND
use an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILE
where$FILE
will 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.
-
PATH1
the source path, either a file or a folder. -
PATH2
the destination path, either a file or a folder (must be the same kind asPATH1
).
-
-g TREE_GENERATOR_ID
to force GumTree to use a specific tree generator. -
-m MATCHER_ID
to force GumTree to use a specific matcher. -
-M PROPERTY VALUE
add a matcher property, available:bu_minsim
,bu_minsize
,st_minprio
,st_priocalc
,cd_labsim
,cd_maxleaves
,cd_structsim1
,cd_structsim2
,xy_minsim
. -
-x COMMAND
use an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILE
where$FILE
will be automatically replaced by the file to parse.
gumtree textdiff PATH1 PATH2
textdiff
outputs the diff between two files in a textual format.
-
PATH1
the source path, must be a file. -
PATH2
the destination path, must be a file.
-
-f FORMAT
change the format (defaultTEXT
), availableTEXT
,XML
,JSON
. -
o FILE
change the output file (defaultstdout
). -
-g TREE_GENERATOR_ID
to force GumTree to use a specific tree generator. -
-m MATCHER_ID
to force GumTree to use a specific matcher. -
-M PROPERTY VALUE
add a matcher property, available:bu_minsim
,bu_minsize
,st_minprio
,st_priocalc
,cd_labsim
,cd_maxleaves
,cd_structsim1
,cd_structsim2
,xy_minsim
. -
-x COMMAND
use an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILE
where$FILE
will 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.
-
PATH1
the source path, must be a file. -
PATH2
the destination path, must be a file.
-
-g TREE_GENERATOR_ID
to force GumTree to use a specific tree generator. -
-m MATCHER_ID
to force GumTree to use a specific matcher. -
-M PROPERTY VALUE
add a matcher property, available:bu_minsim
,bu_minsize
,st_minprio
,st_priocalc
,cd_labsim
,cd_maxleaves
,cd_structsim1
,cd_structsim2
,xy_minsim
. -
-x COMMAND
use an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILE
where$FILE
will 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).
-
ELEMENTS
eitherMATCHERS
,GENERATORS
,PROPERTIES
orCLIENTS
.
gumtree parse PATH
parse
outputs the AST corresponding to a given file.
-
PATH
the file path.
-
-g TREE_GENERATOR_ID
to force GumTree to use a specific tree generator. -
-x COMMAND
use an external command to produce a XML compatible GumTree AST. The command must be of the formCOMMAND $FILE
where$FILE
will be automatically replaced by the file to parse.