Differences between revisions 2 and 27 (spanning 25 versions)
Revision 2 as of 2010-12-22 10:42:06
Size: 1265
Editor: KaiJaeger
Comment:
Revision 27 as of 2012-01-24 20:47:36
Size: 3501
Editor: KaiJaeger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

 || /!\ Page is under construction ||
Line 8: Line 6:
`Compare` is part of the CategoryAplApl project. `Compare` is part of the CategoryAplTree project.
Line 11: Line 9:
...
Line 13: Line 10:
== Details ==
...
`Compare` offers a couple of methods designed to compare functions, operators, scripts and files. It is also able to deal with SALTed files as well as `acre` component files. Since version 3.0 `Compare` inherits from the then created class `CompareSimple`. It therefore offers the same methods as `CompareSimple`. Additionally it offers a Merge feature.
Line 16: Line 12:
== Methods ==
Line 17: Line 14:
== Examples ==
...
There are three main functions:
Line 20: Line 16:
== History ==
For a full version history: [[Compare/History|History]]
=== Match (inherited from CompareSimple) ===

`Match` takes names of functions or operators or scripts and compares the source code. Note that taking the source code with `⎕CR` or `⎕SRC` and then `≡` them is not always going to work: white spaces as well as formatting problems might result in a 0 when the source code is in fact identicall. `Match` deals with these problems properly.

=== These (inherited from CompareSimple) ===

`These` accepts a varity of arguments listed underneath. According to its arguments it tries to figure out what your intention is and carries out the appropriate action.

==== Script / Script ====
Compare the two scripts. Note that you can specify name(s) as well as reference(s).

==== Script / name of a *.dyalog file ====
Compare the workspace script with the file.

==== Script ====
This syntax requeires "Script" to be a SALTed script. In that case the workspace script is compared with its SALTed source file.

==== Name of a native file / name of a native file ====
Compare the two files.

==== Function name / function name ====
Compare two functions in the workspace.

==== Function name / name of a native file ====
Compare the function in the workspace with the file.

==== Function name / name of an `acre` component file ====
Compare the function in the workspace with the `acre` component file.

==== Function name ====
 If there is an `acre` component file holding that function the workspace version is compared with any of the components.

==== Namespace / namespace ====
Note that this works only with named namespaces, although the argument might be either references or names pointing to the two namespaces.

This is essentially the same as the `Merge` method but in read-only-mode.

=== Merge ===

Although this method works "only" on (named!) namespaces one can effectively use it to compare and merge workspaces by copying the two workspaces into two separate namespaces.

The `Merge` method presents a GUI with all the information one needs to know in order to perform the merge. Note that all functions, operators and scripts that do equal are on the `=` tab while all the others are on the `≠` tab. Normally one is interested only in the `≠` tab:

{{attachment:Merger.png}}

There are methods available that makes it easy to compare, modify, delete (either from the GUI or the workspace) and move functions, operators and scripts from one namepsace to the other:

{{attachment:ContextMenu.png}}

== Project Page ==

For bug reports, future enhancements and a full version history see [[Compare/ProjectPage]]
Line 27: Line 73:
||Current state: ||1.0.0 ||
Line 29: Line 74:
== Download ==
You have two options: you can either download the script for usage:
<<Include(APLTreeDownloads)>>
Line 32: Line 76:
[[http://aplwiki.com/Compare?action=AttachFile&do=get&target=Compare.ZIP|Download Compare script right now]]

or get the whole thing from the AplWikiRepository, including the development workspace and the script and maybe more for any development or for running the test cases:

/* You might want to exchange "dyalog" here: */
{{{
svn list svn://aplteam.com/os/dyalog/Compare/tags
}}}
If you plan to contribute please note that all stuff published as part of the APLAPL project must follow certain [[AplAplStandards|APLAPL-specific standards]].
Line 42: Line 77:
CategoryAplApl CategoryAplTree

Compare

(Hide table-of-contents)

Compare is part of the CategoryAplTree project.

Overview

Compare offers a couple of methods designed to compare functions, operators, scripts and files. It is also able to deal with SALTed files as well as acre component files. Since version 3.0 Compare inherits from the then created class CompareSimple. It therefore offers the same methods as CompareSimple. Additionally it offers a Merge feature.

Methods

There are three main functions:

Match (inherited from CompareSimple)

Match takes names of functions or operators or scripts and compares the source code. Note that taking the source code with ⎕CR or ⎕SRC and then them is not always going to work: white spaces as well as formatting problems might result in a 0 when the source code is in fact identicall. Match deals with these problems properly.

These (inherited from CompareSimple)

These accepts a varity of arguments listed underneath. According to its arguments it tries to figure out what your intention is and carries out the appropriate action.

Script / Script

Compare the two scripts. Note that you can specify name(s) as well as reference(s).

Script / name of a *.dyalog file

Compare the workspace script with the file.

Script

This syntax requeires "Script" to be a SALTed script. In that case the workspace script is compared with its SALTed source file.

Name of a native file / name of a native file

Compare the two files.

Function name / function name

Compare two functions in the workspace.

Function name / name of a native file

Compare the function in the workspace with the file.

Function name / name of an `acre` component file

Compare the function in the workspace with the acre component file.

Function name

  • If there is an acre component file holding that function the workspace version is compared with any of the components.

Namespace / namespace

Note that this works only with named namespaces, although the argument might be either references or names pointing to the two namespaces.

This is essentially the same as the Merge method but in read-only-mode.

Merge

Although this method works "only" on (named!) namespaces one can effectively use it to compare and merge workspaces by copying the two workspaces into two separate namespaces.

The Merge method presents a GUI with all the information one needs to know in order to perform the merge. Note that all functions, operators and scripts that do equal are on the = tab while all the others are on the tab. Normally one is interested only in the tab:

Merger.png

There are methods available that makes it easy to compare, modify, delete (either from the GUI or the workspace) and move functions, operators and scripts from one namepsace to the other:

ContextMenu.png

Project Page

For bug reports, future enhancements and a full version history see Compare/ProjectPage

Version Information

Original author:

KaiJaeger

Responsible:

KaiJaeger

Email:

kai@aplteam.com


CategoryAplTree

Compare (last edited 2018-03-03 11:50:34 by KaiJaeger)