Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329311 - EGL servlet needs model file in servlet directory
Summary: EGL servlet needs model file in servlet directory
Status: CLOSED FIXED
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Dimitris Kolovos CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 20:04 EDT by Ivo(sh) Musil CLA
Modified: 2012-02-06 10:59 EST (History)
2 users (show)

See Also:


Attachments
Proposed patch to org.eclipse.epsilon.egl.servlet.ModelManager (2.38 KB, patch)
2010-11-02 20:08 EDT, Ivo(sh) Musil CLA
no flags Details | Diff
Correction of patch (2.73 KB, patch)
2010-11-02 21:23 EDT, Ivo(sh) Musil CLA
no flags Details | Diff
Patch to ModelManager after bug#241481 (837 bytes, patch)
2011-04-15 06:54 EDT, Ivo(sh) Musil CLA
no flags Details | Diff
Patch to ModelManager after bug#241481 (Eclipse format) (713 bytes, patch)
2011-04-29 04:46 EDT, Ivo(sh) Musil CLA
dkolovos: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivo(sh) Musil CLA 2010-11-02 20:04:38 EDT
Method loadModel in class org.eclipse.epsilon.egl.servlet.ModelManager used to loading model into EGL-based servlet can't get absolute path (at least on Linux platform). 

If you try loadModel("file:///absolute_path_to_model/abc.xyz",....) you get exception to unable load the model.

Proposed solution follow ...
Comment 1 Ivo(sh) Musil CLA 2010-11-02 20:08:21 EDT
Created attachment 182266 [details]
Proposed patch to org.eclipse.epsilon.egl.servlet.ModelManager

Added another method signature for loadModel() expanded with boolean parameter (filesAreServletRelative, default value true).
Comment 2 Ivo(sh) Musil CLA 2010-11-02 21:23:17 EDT
Created attachment 182267 [details]
Correction of patch
Comment 3 Louis Rose CLA 2011-04-07 09:51:25 EDT
CC-ed myself in case bug#341481 has fixed this.
Comment 4 Ivo(sh) Musil CLA 2011-04-15 06:54:53 EDT
Created attachment 193351 [details]
Patch to ModelManager after bug#241481
Comment 5 Ivo(sh) Musil CLA 2011-04-15 06:55:34 EDT
Hi Louis

your change of EmfModel#load(StringProperties, String) in bug#341481 really solved my problem in EGL.

I have only small enhancement to your code (method convertVirtualPathToAbsoluteFileURI in org.eclipse.epsilon.egl.servlet.ModelManager), which is able to load model or metamodel not only thru relative path (to web application root) but to absolute path too. Patch attached above.

Thanks.
Comment 6 Louis Rose CLA 2011-04-28 10:37:38 EDT
Hi Ivo,

Great -- I'm glad the other bug fix helped. I'll speak with Dimitris about what we need to do to integrate your patch.

Cheers,
Louis.
Comment 7 Dimitris Kolovos CLA 2011-04-29 04:39:23 EDT
Eclipse doesn't seem to be able to parse this patch (looks incomplete). Could you please attach a complete version so that I can have a look at it?
Comment 8 Ivo(sh) Musil CLA 2011-04-29 04:46:45 EDT
Created attachment 194338 [details]
Patch to ModelManager after bug#241481 (Eclipse format)

Sorry Dimitros ... in previsous version I used unix commandline patch, new attachment is generated directly from Eclipse.
Comment 9 Dimitris Kolovos CLA 2011-05-01 18:19:29 EDT
Many thanks for the patch! I've merged it into the main branch and committed the changes to the SVN.