Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342720

Summary: Executing a model should with dependencies from MANIFEST.MF
Product: [Modeling] AMP Reporter: Jonas Ruttimann <jonas.ruettimann>
Component: EscapeAssignee: Jonas Ruttimann <jonas.ruettimann>
Status: NEW --- QA Contact: Miles Parker <milesparker>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Bugfix. none

Description Jonas Ruttimann CLA 2011-04-13 10:28:20 EDT
When executing a metaabm model, only classes from org.eclipse.amp.escape.runtime are loaded by the class loader. 

Instead dependencies to plugins should be copied from the MANIFEST.MF file. That way, no unexpected class loading exceptions should occur after compiling classes and executing the metaabm model.
Comment 1 Miles Parker CLA 2011-04-13 12:49:43 EDT
I think there is a related bug somewhere. Oliver Mannion looked at this and I think we have a patch for part of it. There are some real complexities here but we should be able to work them out. Also note that XText is now supporting dynamic class loading so we might be able to integrate some of their solution here as well.
Comment 2 Jonas Ruttimann CLA 2011-04-14 05:39:44 EDT
The bug you mentioned must be:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=329645

I'm not quite sure if this is about the same thing. Oliver Mannion goes a lot further. I just intend to copy dependencies, rather than changing anything concearning class loading.

Actually, I discovered that with my latest commit, a line of code referring to an old plugin ID (that's a bug) will lead to a missing class loader. Instead of just replacing the old plugin ID with the new one, I want to improve the behaviour in such a way that no dependency at all has to be added. This should be done automatically since all required information is stored in the MANIFEST.MF.


(In reply to comment #1)
> I think there is a related bug somewhere. Oliver Mannion looked at this and I
> think we have a patch for part of it. There are some real complexities here but
> we should be able to work them out. Also note that XText is now supporting
> dynamic class loading so we might be able to integrate some of their solution
> here as well.
Comment 3 Jonas Ruttimann CLA 2011-04-14 05:45:24 EDT
Created attachment 193235 [details]
Bugfix.

Proposed bug fix. I'm ready to commit! ;-)
Comment 4 Miles Parker CLA 2011-04-14 12:45:05 EDT
Awesome. Doe sthis work with 3D models as well? That was the thing I had a hard time getting to work properly. I think your solution looks great. BTW, there is no need to attach changes anymore. You're a committer, so just commit! :)
Comment 5 Jonas Ruttimann CLA 2011-04-15 04:25:00 EDT
Haven't tested with any 3D models. But since dependencies are copied from the MANIFEST.MF, I don't think we should have a problem. 

The dependencies in the MANIFEST.MF itself are created by the project wizard. The wizard configuration can be extended using subclassing or using the extension point "newProjectWizardConfigurations". I think we might still need to implement that for 3D.

(In reply to comment #4)
> Awesome. Doe sthis work with 3D models as well? That was the thing I had a hard
> time getting to work properly. I think your solution looks great. BTW, there is
> no need to attach changes anymore. You're a committer, so just commit! :)