- Remove switches like compiler-mode
- Separate Run in 2 phases: analyze and then report
- CPL is no longer supported, reuse part of it for GNATSAS
- Handle path not yet transitioned to GNATSAS
- Create Actions and menu for GNATSAS
- Only show Codepeer when GNATSAS is not available
eng/ide/gnatstudio#54
(cherry picked from commit 36079ee283)
This commit patches GS in order to support gnatsas at minima, through
the actual codepeer menu, before the new gnatsas menu.
(cherry picked from commit aa906c22d0)
Infinite recursion when parsing "--gnat-warnings=" because it's
defined at 2 different places making the expension unable to
stabilize.
/eng/codepeer/codepeer!340
All the changes are under the Is_CPL flag, and should not affect pre-cpl
codepeer integration.
* code_analysis/src/codepeer-bridge-commands.adb
+ Write cpm_file and cpm_directory to all requests.
+ Add CPL_Id to add_audit_record.
+ Add annotation files to inspection request.
* code_analysis/src/codepeer-bridge-inspection_readers-base.adb
+ Clear annotation files set before parsing inspection file.
+ Read reviews (Audit trails) directly from inspection_data.xml.
+ Read review statuses directly from inspection_data.xml.
+ Read annotation files and CPL_Id fields.
* code_analysis/src/codepeer-bridge-inspection_readers.adb
+ Change Identifier_Attribute's type from Natural to String to be able to
deal both old run ids and new run names.
+ Parse "cpm_file".
* code_analysis/src/codepeer-module-actions.adb
+ Do not register compiler mode action with cpl codepeer since it has been
removed.
* code_analysis/src/codepeer-module-bridge.adb
+ Add Just_Load argument to Inspection in order to not call the bridge but
and only set Module's variables.
* code_analysis/src/codepeer-module.adb
+ Add cpm_directory project file attribute and function to retrieve it.
+ Add CPL_Id to codepeer msg.
+ Add --show-annotations switch when spawning CodePeer in case
Import_Annotations is set in the preferences. This is needed since we do
not systematically go through the bridge to load messages.
+ Ignore status file.
+ In case of Load_UI, properly set Just_Load and then directly call
Module.Load. Whith CPL when we launch CodePeer, it will directly produce
inspection_data.xml without a need to launch the bridge (this is in order
to properly initialize cpm_file and the annotation files).
+ Mark all messages' reviews as loaded since we did so when reading
inspection_data.xml
+ Set the Is_CPL flag if we find the correct binary in the parent folder of
CodePeer executable
+ Remove "Show msg Id" and "Import backtraces" menu options. The former
does not make sens anymore, and the latter is now always on.
* code_analysis/src/codepeer-reports.adb
+ Print the inspection label as a name instead of an id.
* code_analysis/src/codepeer.ads
+ Define Is_CPL flag.
+ Define CPM_File. This stores the currently displayed cpm_file (if any)
+ Define Annot_Files, set of annotation files displayed, if any. Read from
inspection_data.xml, and used in inspection_request.
+ Define CPL_Id. This is used to identify a message when making reviews, it
replaces msg_id.
+ Change Inspection type to string, we use Natural'Image at parsing with
pre-cpl CodePeer.
* share/support/core/codepeer.py
+ Move xml code to codepeer_xml.py and codepeer_xml_old.py. Import the
former if we detect a cpl CodePeer, the latter otherwise.
* share/support/core/codepeer_xml.py
Update the attributes, tool and menu description for cpl CodePeer.
* share/support/core/codepeer_xml_old.py
Content from old codepeer.py
Change-Id: I18eec48fbc7c2d07e41fa25cd9febb44f305a136