From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3dbf2f325f33ce35 X-Google-Attributes: gid103376,public From: "Samuel T. Harris" Subject: Re: Elimination of "use" clauses Date: 1999/07/01 Message-ID: <377BE707.D34E4488@hso.link.com>#1/1 X-Deja-AN: 496186704 Content-Transfer-Encoding: 7bit References: <377B5807.88B875E0@cs.york.ac.uk> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Raytheon Training Inc. Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-07-01T00:00:00+00:00 List-Id: "Dr. Neil C. Audsley" wrote: > > We have a lot of Ada source that "with"s and "use"s a lot of packages -- > to the extent that it is difficult and time-consuming to find out which > package a procedure is actually from. > Ideally, we would like to eliminate "use" clauses, necessitating the > replacement of each procedure call X by PackageName.X instead. > Is there a tool that does this? > Rational Apex has a "complete" facility which fully expands name of things, adds named notation. It can be used on already written constructs (your case) or on a partitial or even ambiguous call. If only partitial, it will fill in any missing parameters using named notation and use a [some_type_expression] as a filler for the missing actual parameters. If ambigous, it open a window with a list of possible candidates. You can "visit" each candidate to determine which one you need. The problem with this facility is that it used to work on a selection of code text but now only works on one statement at a time. Works good while supporting the writing of code but is very clumsy to use to retro-format existing code. As far as your general problem is concerned, if you audience reading the code can do it on-line, then a solution is to use one of the many tools which provide a similar "visit" function. Apex, Emacs with ada-tags, or ada2html from David Wheeler all come to mind. -- Samuel T. Harris, Principal Engineer Raytheon, Scientific and Technical Systems "If you can make it, We can fake it!"