Bug 1155096 - CLI auto-complete doesn't correctly show enums that are defined inside a class
Summary: CLI auto-complete doesn't correctly show enums that are defined inside a class
Keywords:
Status: POST
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.13
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-21 11:24 UTC by Michael Burman
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Michael Burman 2014-10-21 11:24:37 UTC
Description of problem: When using the remote CLI auto-complete with tabulator, it will incorrectly fill the data with only partial enum name, if that enum is declared inside a class.

Example: AlertDampening has two enums, Category and TimeUnits. Trying to use these as autocomplete rules will forget to include the AlertDampening part and fill the CLI with incorrect data, causing an error. 

rhqadmin@localhost:7080$ dampeningRules.category(Category.

Category.CONSECUTIVE_COUNT   Category.DURATION_COUNT      Category.INVERSE_COUNT       Category.NONE                Category.NO_DUPLICATES       Category.ONCE
Category.PARTIAL_COUNT
rhqadmin@localhost:7080$ dampeningRules.category(Category.DURATION_COUNT)
org.mozilla.javascript.EcmaError: ReferenceError: "Category" is not defined. (<Unknown source>#1) in <Unknown source> at line number 1
dampeningRules.category(Category.DURATION_COUNT) 
^

rhqadmin@localhost:7080$ dampeningRules.category(AlertDampening.Category.DURATION_COUNT)
AlertDampeningTemplate:

rhqadmin@localhost:7080$


Version-Release number of selected component (if applicable): 4.13-SNAPSHOT


How reproducible: Always


Steps to Reproduce:
1. Try to auto-complete an enum that's defined inside a class
2.
3.

Actual results: It auto-completes only the enum name, not the class it is defined inside.


Expected results: The class name should be infront of the enum name for this behaviour to work correctly.


Additional info:

Comment 1 Michael Burman 2014-11-07 11:01:41 UTC
Part of PR #143

Comment 2 Mike McCune 2016-03-28 23:05:20 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions


Note You need to log in before you can comment on or make changes to this bug.