DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦1fa350517⟧ Ada Source

    Length: 9216 (0x2400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Object_Editor, pragma Module_Name 4 2223, pragma Subsystem Object_Editor, seg_006447

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Default;
with Directory;
with Machine;

package Object_Editor is

    pragma Subsystem (Object_Editor, Closed);
    pragma Module_Name (4, 2223);

    -- Detached jobs and jobs initiated via the program package have
    -- no associated image.

    type Focus is (Selection, Cursor, Image, Region);

    -- If not named specifically, an object (or collection of objects) can
    -- be designated by a highlighted selection on an image or by the
    -- location of the cursor within an image.  Different algorithms
    -- for determining such designated objects are implemented by this
    -- package to satisfy the differing requirements of environment
    -- commands (taking one argument denoted in this way)

    -- Selection

    --     An object is selected in this mode only if its declaration is
    --     highlighted and the cursor is within or immediately adjacent to
    --     that highlighted region.

    --     This is the most restrictive selection mode and would be used
    --     by commands, such as delete and demote, that must have a
    --     strong indication from the user of the intended object.


    -- Cursor

    --     An object is selected in this mode if its declaration is
    --     selected as described in the preceding case or, if there is no
    --     highlighted selection on the image of the cursor, the cursor
    --     is on a portion of the object's declaration.

    --     This is less restrictive than the preceding case in that it
    --     accepts any placement of the cursor within an image.  Commands
    --     such as definition or help would use this mode because it
    --     reduces the number of key strokes required by the user.


    -- Image

    --     An object is selected in this mode if its declaration is
    --     selected as described in the Selection mode or, if there is no
    --     highlighted selection on the image of the cursor, the cursor is   --     on the image associated with the object.

    --     This mode accepts the same configurations of cursor and
    --     selection as in the Cursor mode, but treats the cursor less
    --     specifically by selecting the object that is represented by the
    --     entire image rather than the object that is represented by the
    --     portion of the image that the cursor is on.


    -- Region

    --     An object is selected in this mode if its declaration is
    --     highlighted. The cursor does NOT have to be in the region.

    --     This is less restrictive than Selection focus and would be
    --     used by commands such as copy to obtain their source object.


    -- Some object editors will behave the same in the Cursor and
    -- Image modes because they do not support the notion of designations
    -- nested within an image. For such editors, the Selection mode will
    -- always fail unless the selection constitutes the entire image.

    procedure Get_Declaration
                 (Decl      : out Directory.Declaration;
                  Status    : out Directory.Naming.Name_Status;
                  Precision : Object_Editor.Focus := Object_Editor.Selection;
                  Job       : Default.Process_Id := Default.Process);

    -- Returns the declaration for the object designated by the current
    -- selection according to the specified algorithm.

    procedure Get_Object (Object    : out Directory.Object;
                          Status    : out Directory.Naming.Name_Status;
                          Class     : Directory.Class := Directory.Nil;
                          Precision : Object_Editor.Focus :=
                             Object_Editor.Selection;
                          Job       : Default.Process_Id := Default.Process);

    -- Returns the Directory object designated by the current selection
    -- according to the specified algorithm.


    function Get_Text               (Precision : Object_Editor.Focus := Object_Editor.Region;
                 Job : Default.Process_Id := Default.Process) return String;
    -- Returns the text contained in the current focus.  Region selections
    -- are allowed.  Text may include Ascii.LF's to indicate end of line.

    function Get_Name
                (Precision : Object_Editor.Focus := Object_Editor.Image;
                 Job : Default.Process_Id := Default.Process) return String;
    -- Return the name of the image, which may not be a valid directory name,
    -- or the name of the declaration/object associated with the
    -- current cursor/selection/region/window.


    -- IMAGE MANIPULATION OPERATIONS

    procedure Release_Access (The_Object : Directory.Object);
    -- acquire rights to the designated object if they are held by the current
    -- session; allows tools to guard against being locked out by other windows

--  procedure Display_Declaration (For_Object : Directory.Object;
--                                 In_Library : Boolean := False;
--                                 In_Place : Boolean := False);
--  procedure Display_Declaration (For_Version : Directory.Version;
--                                 In_Library : Boolean := False;
--                                 In_Place : Boolean := False);
--
--  procedure Display (The_Object : Directory.Object;
--                     In_Place : Boolean := False);
--  procedure Display (The_Version : Directory.Version;
--                     In_Place : Boolean := False);
--
--  -- In_Library will cause ada subunits to have their enclosing
--  -- library displayed instead of their stub declaration in their
--  -- parent ada unit.
    pragma Consume_Offset (4);

    procedure Update_Changed_Image (The_Object : Directory.Object);
    -- notify the editor that changes have been made to the object that it
    -- doesn't know about yet

    procedure Update_Changed_Images;
    -- non-specific (and slower) version of the above


    subtype Editor_Name is String;

    function Name return Editor_Name;
    -- Returns the name of the object editor associated with the current image.

    function Supports_Declarations
                (Editor : Editor_Name := Name) return Boolean;
    function Supports_Subobjects (Class  : Directory.Class := Directory.Nil;
                                  Editor : Editor_Name := Name) return Boolean;
    -- Indicates whether the named editor can ever associate
    -- objects/declarations with the cursor or selection (other than the
    -- object/declaration associated with the containing image).

    -- Iterate over all object editors.  Primarily for completeness, but
    -- allows tool writers to determine the set of applicable OE's.

    type Iterator is private;
    procedure Init  (Iter : out Iterator);
    function  Done  (Iter : Iterator) return Boolean;
    function  Value (Iter : Iterator) return Editor_Name;
    procedure Next  (Iter : in out Iterator);


    -- Returns the job that the editor regards as current
    function Current_Job return Machine.Job_Id;

    procedure Display_Declaration (For_Object : Directory.Object;
                                   In_Library : Boolean := False;
                                   In_Place   : Boolean := False);
    procedure Display_Declaration (For_Version : Directory.Version;
                                   In_Library  : Boolean := False;
                                   In_Place    : Boolean := False);

    procedure Display (The_Object : Directory.Object;
                       In_Place   : Boolean := False);
    procedure Display (The_Version : Directory.Version;
                       In_Place    : Boolean := False);
end Object_Editor;

E3 Meta Data

    nblk1=8
    nid=0
    hdr6=10
        [0x00] rec0=1d rec1=00 rec2=01 rec3=050
        [0x01] rec0=17 rec1=00 rec2=02 rec3=002
        [0x02] rec0=15 rec1=00 rec2=03 rec3=088
        [0x03] rec0=17 rec1=00 rec2=04 rec3=002
        [0x04] rec0=13 rec1=00 rec2=05 rec3=06e
        [0x05] rec0=16 rec1=00 rec2=06 rec3=012
        [0x06] rec0=16 rec1=00 rec2=07 rec3=05e
        [0x07] rec0=13 rec1=00 rec2=08 rec3=000
    tail 0x21501456681bf8260369d 0x42a00088462065003