Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365616 - Path warnings in includeDojo.egl for local runtime
Summary: Path warnings in includeDojo.egl for local runtime
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: lu lu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 10:34 EST by Will Smythe CLA
Modified: 2017-02-23 14:20 EST (History)
3 users (show)

See Also:


Attachments
Move includeDojo.html from 'WebContent/config' to 'WebContent' (11.57 KB, patch)
2012-02-21 02:53 EST, lu lu CLA
lulu: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Will Smythe CLA 2011-12-05 10:34:37 EST
It may be confusing for new users that there are warnings in the includDojo.html file. There are warning because the paths to CSS, etc in this file are not correct because the file is processed at runtime as if it were in the root (WebContent).

From Ji Yong on RTC work item 61783:
The warning happens because the relative path of url is different in development and deploy mode. 
For example,
<script src="dojo/dojo.js"></script>
has warning, because the url should be ../dojo/dojo.js in development mode.
But after deployed, the content of  this includeDojo.html file will be pasted to the generation page html, which the correct url should be
dojo/dojo.js
So if we change the url to eliminate the warning, the deployed url will be wrong!!

Proposed changed:
Why can't the file be moved to "WebContent" (from WebContent\config) so the paths in the file resolve properly in the IDE? This would avoid making any changes to the contents of the file. The file is only referenced by DojoBase.egl, so the code changes are small.

Ji Yong's response to this proposal:
The proposal works well.
The changes we have to make:
1. com.ibm.egl.rui.dojo.widgets_1.0.0/EGLSource/dojo/widgets/DojoBase.egl, update the link to includeDojo.html
ExternalType DojoBase extends Widget type JavaScriptObject {
    relativePath = "dojo/widgets",
    javaScriptName = "DojoBase",    
    includeFile = "includeDojo.html"            // The only change
}
2. In all 3 runtimes, move includeDojo.html from WebContent/config to WebContent.

(see IBM internal defect 1783 for additional details)
Comment 1 lu lu CLA 2012-02-20 03:09:14 EST
Hi Will, Check in latest build 0.8.0.v201202190901, includeDojo.html file has been removed under WebContent/config folder, and all related files have been updated, no warning message in this file now. This should have been resolved by other enh or bug. Thanks.
Comment 2 Will Smythe CLA 2012-02-20 08:14:25 EST
Did both remote and local get updated with this fix?
Comment 3 Brian Svihovec CLA 2012-02-20 09:45:17 EST
When was this change made?
Comment 4 lu lu CLA 2012-02-20 21:57:57 EST
So sorry for this, I think I misunderstand this. I reopen this bug and will resolve it in I3. Thanks.
Comment 5 lu lu CLA 2012-02-21 02:53:33 EST
Created attachment 211309 [details]
Move includeDojo.html from 'WebContent/config' to 'WebContent'

Hi Brian, please help to review if the changes are made correctly. Thanks.

What have been done there:
1. Move includeDojo.html file from 'WebContent/config' to 'WebContent' folder in local and remote runtime.

2. Modify 'includeFile' parameter in 'DojoBase.egl' and 'DojoLib.egl'
      includeFile = "config/includeDojo.html"
   To - 
      includeFile = "includeDojo.html"
Comment 6 Brian Svihovec CLA 2012-02-22 16:39:25 EST
I need to review the code in more detail, but it would be best if Ji Yong reviews this patch, since he wrote this code originally (or has modified it since it was written).
Comment 7 Huang Ji Yong CLA 2012-02-23 05:30:48 EST
I'm cool with this change.
Comment 8 lu lu CLA 2012-02-24 08:15:39 EST
Hi Brian, any comment? Thanks.
Comment 9 Brian Svihovec CLA 2012-02-27 09:36:30 EST
The changes look good to me.
Comment 10 Huang Ji Yong CLA 2012-02-28 01:02:58 EST
Committed
Comment 11 lu lu CLA 2012-02-28 01:07:02 EST
Thanks. :)