I am making a code completion system for a code editor, and i would like to show a tooltip for every parameter containing its reference data. I would like to emulate the code completion from Eclipse, so i was wondering if the API reference is available in code, or if i have to manually import it using the file system or something like that.
Asked
Active
Viewed 73 times
0
-
We're working on an open-source project Moonshine editor to work both in browsers and desktop. Presently we need some help to enable code-completion to the editor. Is it possible for you that you would help to complete that support to the editor, if you already did that previously? – Santanu Karar Mar 22 '16 at 04:44
1 Answers
1
You could reflect the current class in question with flash.utils.describeType
This will return a xml with informations about methods, properties and so on.
This can be very heavy. If you use it all the time, try to use a caching system. The Flex framework has a class for it mx.utils.DescribeTypeCache

Larusso
- 1,121
- 8
- 10
-
Oh, i am allready using describeType do get the parameters (variables, mothods...) for a class or object, but i need the description of each parameter which is marked with /***/ in the source code, u know, the text that is colored blue – M364M4N cro May 28 '13 at 14:07
-
Ah you want the doc comments. For your own code this would be possible with asdoc and the parameter -keepxml. But for the buildin stuff. I guess you have to parse the livedocks pages manually. But I have no quick idea how to do that. – Larusso May 28 '13 at 15:50
-
Well, flex is open source, meaning that many classes are fully viewable including their doc comments which are actually written inside the code using the /**doc comment something*/ notation, maybe it will work? – M364M4N cro May 29 '13 at 21:25
-
flex is, but the core classes MovieClip, Sprite, Array and so on are not. But if you only need the flex framework classes, you could work with the xml output from asdoc. From the asdoc help: "-keep-xml=false|true When true, retain the intermediate XML files created by the ASDoc tool. The default value is false." You could transform the xml into other formats, or patch the asdoc compiler. I did that ones. You can alter the xsd transform with flex 4 – Larusso May 30 '13 at 06:54