Difference between revisions of "Finder"

From Liberty Eiffel Wiki
Jump to navigation Jump to search
m (2 revisions: initial import from SamrtEiffel Wiki - The Grand SmartEiffel Book)
m
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
[[Category:Tool]]
= Usage =
 
  +
== Usage ==
 
se find [options] [<ACEfile.ace>] <Class>
 
se find [options] [<ACEfile.ace>] <Class>
The find command tells you which file is loaded when searching for an Eiffel <Class>.
+
The find command tells you which file the compiler loads when searching for an Eiffel <Class>.
   
 
When an Eiffel file is found, find prints the full path name on standard output.
 
When an Eiffel file is found, find prints the full path name on standard output.
   
The exit status is set GENERAL.exit_success_code only when an existing file is found (thus allowing usage of the find command in shell scripts).
+
The exit status is set to GENERAL.exit_success_code only when an existing file is found (thus allowing usage of the find command in shell scripts).
 
As for other commands, when the ACE file mode is used, only the content of the <ACEfile.ace> file is used to search the source file.
 
As for other commands, when the ACE file mode is used, only the content of the <ACEfile.ace> file is used to search the source file.
To see the loading path used by SmartEiffel, you can for example type the find command using a bad (inexistent) class name.
+
To see the loading path used by Liberty Eiffel, you can for example type the find command using a bad (non-existent) class name.
In ACE file mode, the loading path can be updated by modifying the ACE file itself. In traditional mode (i.e. no ACE file), the default loading path may also be tailored (see below).
+
In ACE file mode, the loading path can be updated by modifying the ACE file itself. In traditional mode (i.e. no ACE file), the default loading path may also be tailored (see below).
   
=Options=
+
== Options ==
 
-help:
 
-help:
 
 
Display a brief summary of the command-line syntax and a complete list of find options.
 
Display a brief summary of the command-line syntax and a complete list of find options.
   
 
 
 
-version:
 
-version:
Show the number of the version of SmartEiffel you're using.
+
Show the number of the version of Liberty Eiffel you're using.
  +
   
 
-verbose:
 
-verbose:
Line 24: Line 25:
 
 
 
-loadpath <loadpath_file>:
 
-loadpath <loadpath_file>:
Adds a loadpath file for class lookup. See below for details on the loading path constitution.
+
Adds a loadpath file for class lookup. See below for details on the loading path constitution.
  +
  +
-raw:
  +
Does not display the cluster name. Its only output is usually the path name of the class, so it is useful in scripts.
   
= Where Does find Search? =
+
== Where does Find search? ==
   
 
This is explained in detail in the [[class loading]] section. Note that finder will find all classes with a given name.
 
This is explained in detail in the [[class loading]] section. Note that finder will find all classes with a given name.

Latest revision as of 13:23, 30 July 2024

Usage

 se find [options] [<ACEfile.ace>] <Class> 

The find command tells you which file the compiler loads when searching for an Eiffel <Class>.

When an Eiffel file is found, find prints the full path name on standard output.

The exit status is set to GENERAL.exit_success_code only when an existing file is found (thus allowing usage of the find command in shell scripts). As for other commands, when the ACE file mode is used, only the content of the <ACEfile.ace> file is used to search the source file. To see the loading path used by Liberty Eiffel, you can for example type the find command using a bad (non-existent) class name. In ACE file mode, the loading path can be updated by modifying the ACE file itself. In traditional mode (i.e. no ACE file), the default loading path may also be tailored (see below).

Options

-help:

Display a brief summary of the command-line syntax and a complete list of find options.


-version:

Show the number of the version of Liberty Eiffel you're using.


-verbose:

Print system information during the compilation (full path of loaded files, type inference score, removed files, etc.).


-loadpath <loadpath_file>:

Adds a loadpath file for class lookup. See below for details on the loading path constitution.

-raw: Does not display the cluster name. Its only output is usually the path name of the class, so it is useful in scripts.

Where does Find search?

This is explained in detail in the class loading section. Note that finder will find all classes with a given name.