osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
39 stars 8 forks source link

Spurious errors in Problems and AADL Navigator views #2603

Open stevevestal opened 3 years ago

stevevestal commented 3 years ago

Summary When a Project>Clean.. is done, several error markers show up in the Problems and the AADL Navigator views. If you open the aadl files, no error markers appear in the test. If you do a simple edit, say enter then delete a space and save, the error markers disappear from the two other views. A Project>Clean.. will cause the error markers to display again. This behavior is somewhat sporadic, but it does occur reasonably often.

Expected behavior Error markers either appear in all views or in none. Error markers only appear for errors.

Actual behavior See above. Most of the errors are of the form

Couldn't resolve reference to ModelUnit 'AT::AirVehicle'. Ref1_AnalysisHarness.aadl /WaterlooExercise1 line: 17 /WaterlooExercise1/Ref1_AnalysisHarness.aadl Xtext Check (fast)

Steps To Reproduce

I can SAFE you a model that will reproduce this error.

Screenshots Attached are screenshots after a clean and then after entering a space, deleting it, and saving any of the files for which Problems errors were reported. AfterClean AfterSpaceBackspaceSave

Desktop (please complete the following information):

Additional context

lwrage commented 3 years ago

@stevevestal I can reproduce the issue, solving it will take a little time. However, I found a quick workaround by splitting the model into three projects:

  1. Create new AADL projects WaterlooRef1 and add a project dependency on WaterlooExercise1.
  2. Create new AADL projects WaterlooRef2 and add project dependencies on WaterlooRef1 and WaterlooExercise1.
  3. Move all files Ref1*.aadl to project WaterlooRef1.
  4. Move all files Ref2*.aadl to project WaterlooRef2.

For me that fixes all name resolution errors even after repeated clean builds.

I suspect that this issue could be a duplicate of #1836.