Search code examples
eclipseauthorizationxtextxacmlalfa

ALFA not recognising Attributes term


I downloaded the ALFA plugin for eclipse and followed the instructions in the alfa-install-plugin.pdf that was included in the zip archive. It seemed to install OK.

However, when I pasted the example snippet of ALFA into an example file (test.alfa), as per the instructions, it failed to "compile" successfully. The Attributes.subjectId == “alice” term was underlined in red. This occurs even though the provided standard-attributes.alfa and system.alfa files are both present in the same src directory as test.alfa.

I think the plugin should have found the definition of Attributes.subjectId in standard-attributes.alfa but clearly this did not happen.

Details of my setup:

  • ubuntu 15.10 64-bit
  • Eclipse version: eclipse-dsl-kepler-SR2 (64-bit)
  • ALFA-1.0-update-site.zip (current)
  • Oracle java version: 1.8.0_66

Note that alfa was tested on eclipse Kepler (64-bit) on Ubuntu 12.10, which is now at end of life.

I tried several possibilities, but all had the same problem: using the Java developer (not the DSL-specific) version, using different alfa snippets, using a Java eclipse project but not a basic eclipse project, renaming standard-attributes.alfa to Attributes.alfa (to match its namespace), ...

I wonder whether other users have encountered this problem, and if so, how they fixed it!

Thank you.


Solution

  • Unfortunately ALFA Eclipse plugin v 1.0 does not work with the Kepler release of Eclipse. Things changed a lot internally in the plugin architecture of Kepler and hence you will need to use v 1.0.2 of the plugin.