eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[cg] Fix warnings #2028

Closed eclipse-ocl-bot closed 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 543143 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | Jan 03, 2019 06:43 EDT | | Modified | Jan 14, 2019 13:25 EDT | | Reporter | Ed Willink |

Description

Debugging the new MapType support required the generated _OCLtests to be properly imported into the workspace for debugging. Oops many errora and thousands of\ warnings (unused imports, bad suspicious casts). Unfortunately the CG tests launch does not apply the JDT preferences or external annotations so the tests all pass despite the errprs.

Long term: find a way to use JDT during the launch.

Shorter term: Fix the errors and reduce the warnings.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Jan 03, 2019 07:04

A new ImportNameManager with a derived GenModelImportNameManager avoids the need to use the poor EMF ImportManager for JUnit tests. Bye Bye a few thousand import warnings from JUnit results. Unfortunately we are stuck with the emf-gen bad imports; need ImportManager to understand type annotations.

Adding an isRequired argument throughout the appendClassReference calls eliminates magic. @suppressWarnings can be much more disciplined. appendCast now consistently uses a SubStream as needed for primitives.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Jan 14, 2019 13:25

Many warnings eliminated in M1.