You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The completion engine should recognize that it's an addEventListener() call and add items for each of the events defined with [Event] metadata in the class (and in all superclasses, of course).
Would also make sense for removeEventListener(), hasEventListener(), and willTrigger().
The text was updated successfully, but these errors were encountered:
@eventType gives us the exact constant to use, but developers are not required to define this asdoc tag. Additionally, the extension cannot currently parse asdoc from SWC files, so @eventType will only be available in raw source code. A more general solution is necessary.
Instead, we'll probably need to guess the constant's name based on the name value from the metadata. Generally, camel case should be turned into all uppercase with _ between words. For example, "addedToStage" becomes ADDED_TO_STAGE.
If the guessed constant name doesn't exist, we should probably just skip it so that completion does not include results that don't actually exist. So, we'll need to get the IClassDefinition from the type value of the metadata, and then check that class has a static constant (IConstantDefinition) with the expected name.
When completion is triggered here:
The completion engine should recognize that it's an
addEventListener()
call and add items for each of the events defined with[Event]
metadata in the class (and in all superclasses, of course).Would also make sense for
removeEventListener()
,hasEventListener()
, andwillTrigger()
.The text was updated successfully, but these errors were encountered: