Ticket #36 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Newly created aspectBinding is not considered by the compiler

Reported by: stephan Owned by: stephan
Priority: critical Milestone: OTDT_1.2.8
Component: otequinox Version: 1.2.7
Keywords: Cc:

Description

When creating a new aspectBinding in the plugin.xml of an OT/Equinox project and creating the corresponding team, any base imports in that team will be flagged as:

Illegal base import: no aspect binding declared for team MyTeam (OT/Equinox).

Obviously, the compiler caches information from plugin.xml without receiving notification when that file is saved.

Workarounds:

  • temporarily disable this kind of error message using the compiler preferences:
    Java Compiler (OT/J): Violation of binding conventions
    -> select Warning or Ignore
  • after restarting Eclipse the aspectBinding is correctly interpreted.

Change History

Changed 4 years ago by stephan

  • status changed from new to closed
  • resolution set to fixed

Updating is implemented in r17794, tests in OTEquinoxBuilderTests have been extended accordingly.

Workarounds are no longer needed.

Changed 3 years ago by stephan

  • status changed from closed to reopened
  • version changed from 1.1.5 to 1.2.7
  • resolution fixed deleted
  • milestone changed from OTDT_1.1.6 to OTDT_1.2.8

During work on #213 and when running against 1.2.7 I found scenarios where updating of aspect binding information is still broken, resulting again in bogus errors on base imports. See upcoming test

org.objectteams.otdt.test.builder.OTEquinoxBuilderTests.testBaseImportTwoAspectBindings()

Diagnosis: upon modification of plugin.xml if aspect bindings have been changed this must be reflected as if MANIFEST.MF was modified, because that's what triggeres recomputing the RequiredPlugins container.

Reopening. Old data was: version:1.1.5, milestone:OTDT_1.1.6

Changed 3 years ago by stephan

  • status changed from reopened to closed
  • resolution set to fixed

Fixed in r19727:

Updating is actually simpler than previously attempted: simply call JavaCore.setClasspathContainer(..) an let it take care of re-computing the classpath.

I also made experiments with an IResourceChangeListener, but our existing hook into WorkspaceExtensionModel load is much simplier and perfectly does the job.

Got rid of

  • manually nullifying resolved classpath (-entries) from PerProjectInfo and RequiredPluginsClasspathContainer
  • backlinking from AspectBindingReader to RequiredPluginsClasspathContainer
Note: See TracTickets for help on using tickets.