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

Bug 355904

Summary: The deployment descriptors are not added to the html file.
Product: z_Archived Reporter: Joseph Vincens <jvincens>
Component: EDTAssignee: Yun Feng Ma <mayunf>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: hjiyong, jqian, jspadea, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch
none
Test project
none
Patch
none
Patch 1
none
Patch 2
none
Patch none

Description Joseph Vincens CLA 2011-08-25 20:12:07 EDT
All egldd files in the project path must be added to the the HTML file.

For each dd there should be an entry like.
RUI_RUNTIME_JAVASCRIPT_FILES.push("dedicatedservicetest-bnd.js");
Comment 1 Yun Feng Ma CLA 2011-08-30 03:00:44 EDT
Created attachment 202382 [details]
Patch

Here is a patch. Thanks.
Comment 2 Yun Feng Ma CLA 2011-08-30 21:15:04 EDT
Resolved.
Comment 3 Joseph Vincens CLA 2011-09-08 15:19:55 EDT
If there are multiple egldd's in the EGL path all need to be included in the html file.
Comment 4 Yun Feng Ma CLA 2011-09-08 23:29:32 EDT
Hi Joe,

Could you attache a sample project that need multiple egldd files? Thanks a lot.
Comment 5 Joseph Vincens CLA 2011-09-13 08:10:31 EDT
Created attachment 203241 [details]
Test project

any RUI project that includes the widgets in the EGL path has multiple egldd files.
Comment 6 Yun Feng Ma CLA 2011-09-27 05:26:44 EDT
Created attachment 204058 [details]
Patch

here is a new patch for the issue: not all dependent egldd files are deployed.

With this patch, the dependent project's default egldd file will be deployed.
Comment 7 Justin Spadea CLA 2011-09-27 10:16:56 EDT
Does this patch also include imported DD files?

For example file1.egldd is in the egl path and gets included. This file has an import for /path/to/file2.egldd, and file2.egldd is NOT in the egl path. file2.egldd should still be included since it is required by file1.egldd.

Joe - what should happen if the imported file cannot be resolved (either it was deleted, renamed, or its project is closed)? Should the import just be ignored or should there be an error message? Maybe skip it but provide a warning in the deployment results view?
Comment 8 Yun Feng Ma CLA 2011-09-29 22:23:29 EDT
Created attachment 204336 [details]
Patch 1

Justin,

Thanks for your review. No separated bind file is generated for included egldd, the content of included egldd is combined into the includer egldd. Now only the REST Binding and SQL Binding are count in, other settings in the included egldd don't take any effect. 

Warning message is shown if the included egldd is not found.
Comment 9 Yun Feng Ma CLA 2011-09-30 00:48:57 EDT
Hi Joe and Justin,

The new patch is in, let me know if you see any other issue. Thanks a lot.
Comment 10 Justin Spadea CLA 2011-09-30 11:04:56 EDT
I'm reopening this so that this doesn't get forgotten about. I'd like Joe to review your comment that the includes are inlined into the -bnd.xml file. I was under the impression that this should not be happening - that the -bnd.xml file would instead have an include to the other -bnd.xml files. The runtime *does* support this. This way if you change the included file and redeploy it you don't have to redeploy the files that are including it - they automatically see the changes.
Comment 11 Joseph Vincens CLA 2011-10-03 10:15:34 EDT
Justin is correct. For EDT there is no need to resolve the imports during deployment. Imports are resolved at runtime. The imports node of the egldd should be included in the -bnd.js file.
Comment 12 Joseph Vincens CLA 2011-10-03 10:17:37 EDT
(In reply to comment #6)
> Created attachment 204058 [details]
> Patch
> 
> here is a new patch for the issue: not all dependent egldd files are deployed.
> 
> With this patch, the dependent project's default egldd file will be deployed.

"the dependent project's default egldd file" is not correct. All egldd files in the project path must be added to the the HTML file.
Comment 13 Yun Feng Ma CLA 2011-10-08 04:05:18 EDT
Created attachment 204792 [details]
Patch 2

Here is a patch for including all egldd files in the project egl path.

Joe and Justin, for the included egldd file, the EDT behavior is same with RBD, that means RBD also inlines the bindings in included egldd files into the including egldd file. Let me know if EDT has different design about this. Thanks.
Comment 14 Jing Qian CLA 2011-10-10 09:32:17 EDT
I just changed this to blocking issue.

As rest service testing are depending on this to be fixed.
Comment 15 Justin Spadea CLA 2011-10-10 10:18:06 EDT
Yes, EDT is different and it should remain as includes and not be inlined. Note that the include value will be different (the *.egldd file is the workspace-relative path, the -bnd.xml file's include value should be a source directory relative path).

Joe - do you agree that if an imported DD is outside the EGL path, that it should still be added to the HTML file since there are references to it?
Comment 16 Yun Feng Ma CLA 2011-10-11 05:25:14 EDT
Created attachment 204934 [details]
Patch

Here is a patch.

Now the included egldd file names are just included in the -bnd.js and -bnd.xml for including egldd.

I also updated the ServiceBinder.js to locate the service binding in included egldd, just like Java Runtime.

Now Jing's test scenario should work fine. Thanks.
Comment 17 Brian Svihovec CLA 2011-10-11 16:49:10 EDT
This appears to break applications that depend on the RUIWidgets project in EDT .7, due to the fact that the EGLDD file in the RUIWidgets project contains '.' characters in the name.  

To test this, create a new RUI Project with Client/Server code.  Create a Service in the Server project using the default Service template.  In the client package, create the following handler:

handler H1 type RUIhandler{initialUI =[button
            ], onConstructionFunction = start, cssFile = "css/P1.css", title = "H1"}

    button Button{text = "Hi"};
    function start()
    	svc MyService?{@DedicatedService {"server.MyService"}};
    	
    end
end


When this handler is run in Firebug, the following error is issued:

missing ; before statement
egl.eze$$BindFile_org.eclipse.edt.rui.widgets_0.7.0 = function() { 

As mentioned in bug 357093, we will be changing EGLDD files so that they are created with '_' characters instead of '.' characters, but we still need to deal with DD files that have an invalid name.  

Ji Yong - please rename the EGLDD files so that the'.' characters are replaced with '_' characters in the widget projects, using RBD as a guide.  We also need to update any preferences or properties that reference these file names.
Comment 18 Yun Feng Ma CLA 2011-10-11 20:27:03 EDT
Resolve this bug, and Ji Yong will update the RUI Widget and Dojo Widget egldd file name issue. Thanks.
Comment 19 Yun Feng Ma CLA 2011-10-11 20:33:59 EDT
Change the status.
Comment 20 Huang Ji Yong CLA 2011-10-11 21:20:13 EDT
(In reply to comment #18)
> Resolve this bug, and Ji Yong will update the RUI Widget and Dojo Widget egldd
> file name issue. Thanks.

Finish changing the egldd names.
Comment 21 Joseph Vincens CLA 2011-10-24 16:15:23 EDT
verified