Opened 10 years ago

Closed 10 years ago

#3012 closed defect (fixed)

Cannot query the builtin environment using interactive API

Reported by: Adrian Pop Owned by: Martin Sjölund
Priority: high Milestone: 1.9.2
Component: Interactive Environment Version: trunk
Keywords: Cc: Adeel Asghar

Description

Unfortunately some things from the environment cannot be queried via the interactive API. For example StateSelect has no Absyn.Program associated with it. Same goes for all the things in ModelicaBuiltin.mo

We should have Absyn.Program available for the entire builtin environment too so it can be queried via the interactive API.
This would help OMEdit build better dialogs, for example a drop down box for StateSelect, etc.

Change History (9)

comment:1 by Adrian Pop, 10 years ago

Owner: changed from somebody to Adrian Pop
Status: newaccepted

comment:2 by Adrian Pop, 10 years ago

Having this fixed would avoid hard-coded workarounds like in r23626.

comment:3 by Martin Sjölund, 10 years ago

Things like list(), etc do load the built-in program.... Which API call cannot query this?

comment:4 by Adeel Asghar, 10 years ago

getClassRestriction(StateSelect)

comment:5 by Martin Sjölund, 10 years ago

Well, that is just because StateSelect is not in ModelicaBuiltin.mo. Everything in ModelicaBuiltin.mo can be queried (and does work).
For example: getClassRestriction(sin)

comment:6 by Martin Sjölund, 10 years ago

r23646 added StateSelect to the built-in environment. Is anything else missing?

comment:7 by Adeel Asghar, 10 years ago

I only know about StateSelect for now. If I need anything else I will create a new ticket. I have reverted r23626. Now fetching the StateSelect via API.

comment:8 by Martin Sjölund, 10 years ago

Owner: changed from Adrian Pop to Martin Sjölund
Status: acceptedassigned

comment:9 by Martin Sjölund, 10 years ago

Milestone: Future1.9.2
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.