Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359551 - Uninstantiable FacadeHelper not diagnosed
Summary: Uninstantiable FacadeHelper not diagnosed
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.7.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-30 07:14 EDT by Ed Willink CLA
Modified: 2011-11-22 05:26 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-09-30 07:14:43 EDT
If a FacadeHelper for the JControlModel cannot be instantiated, perhaps because its package has not been exported, the potential diagnosis is suppressed by the

    catch (Exception e)
    {
      // Ignore
    }

in CodeGenUtil.instantiateFacadeHelper. The eventual observable phenomenon is that generated Java files terminate after the imports.
Comment 1 Ed Merks CLA 2011-09-30 09:17:46 EDT
It drops down into the EclipseHelper case so failure at this point isn't necessarily even a problem.  You don't end up with null pointer exceptions downstream?  (Ones obviously caused by there being no facade helper.)
Comment 2 Ed Willink CLA 2011-10-01 05:55:19 EDT
My use case was confused. I was was using my StandaloneASTFacadeHelper, that works around bug 308069, to try to write a Java App to exercise genmodel and OCL2Java. That failed totally since JET needs the Java compiler. Unfortunately I continued to use StandaloneASTFacadeHelper with a missing export in a JUnit plugin test. ASTFacadeHelper of course works fine for plugins.

However specification of the helper is an explicit direction so I feel that it should not be silently ignored, though with many genmodels out there with silent typos, throwing an Exception would cause compatibility problems. I suggest a Console/Error Log message warning of the problem.

[It might also be nice to warn if the template directory does not exist.]
Comment 3 Ed Merks CLA 2011-10-27 05:33:47 EDT
An problem is logged for this case.
Comment 4 Ed Merks CLA 2011-11-22 05:26:31 EST
The changes are available in builds.