Incorrect error highligthing in an AS3 Event Metatag?

I'm using this Metatag in an AS3 class (for documentation purposes only, so it is not a critical thing )

[Event(name = 'complete', type = 'flash.events.Event.COMPLETE')]

Although COMPLETE is defined as public constant in the AS3 API, it is reported in IDEA Cardea as being incorrect with this message: Unresolved variable of type COMPLETE

Anything I can do to avoid the squiggles? Am I missing something?

0
1 comment

Sorry for delay.
IntelliJ IDEA expects Event class or its subclass FQN as type value, that's why it highlights COMPLETE field as error. Are you sure this is a correct [Event] metadata usage?

It is possible to configure metadata known to IntelliJ IDEA:

  • navigate to Event declaration (Ctrl+Click), KnownMetaData.dtd file will be open
  • copy this KnownMetaData.dtd file anywhere on your computer
  • edit it: in you case you need to change

type CDATA "flash.events.Event,starling.events.Event"

to

type CDATA #IMPLIED

  • open File | Settings | Schemas and DTDs
  • in 'External Schemas and DTDs' click [+] and specify urn:Flex:Meta as URI and provide path to your modified *.dtd file
0

Please sign in to leave a comment.