Community
Participate
Working Groups
Created attachment 175534 [details] Patch to add resource dependency checking I have a custom widget that uses the excanvas resource in the incubator repository. Sometimes my bundle gets loaded first and throws a javascript error because the canvas is not loaded. I have created a patch which allows a resource to specify other resources as dependencies and the registerResources then creates the list order of resources based on when the dependencies are satisfied.
Slight error in the definition of the dependency in the schema. It should be minimum 0 occurrences.
(In reply to comment #0) Pretty slick. I like it.
(In reply to comment #1) In my assessment, the schema for the class attribute of the dependency element should be a java type, not a string type.
(In reply to comment #3) > (In reply to comment #1) > > In my assessment, the schema for the class attribute of the dependency element > should be a java type, not a string type. It is isn't it? + <appInfo> + <meta.attribute kind="java" basedOn=":org.eclipse.rwt.resources.IResource"/> + </appInfo> If that's wrong, then yes, it should be a java type.
(In reply to comment #4) Sorry, I misread that part of the patch.
Created attachment 194340 [details] Updated and refactored patch Thanks for the patch Paul. In the attached patch I did some changes, refactorings and improvements. resource.exsd: 1. Renamed the new element to "dependsOn" 2. Changed the minOccurs to 0. 3. Make the class attribute of the "dependsOn" element required. 4. Added a documentation. EngineConfigWrapper.java 1. Renamed some variables 2. Replaces iterator loop with array loop. For me, under some circumstances, removing the element from the iterator while iterating leaded to strange results. 3. Added additional while loop to recheck the differed resources if new resource has been registered. Without it, it's possible to leave unregistered differed resources if we have a dependencies between differed resources - see EngineConfigWrapperTest. Added a RAP UI EngineConfigWrapperTest to test the functionality (with all need changes for it).
Awesome, thanks Ivan, these changes certainly make it better. Do you think that it will make it in for 1.4?
Created attachment 194422 [details] New version of the patch After discussion with Ralf, we decided to add additional optional "id" attribute to the resource element. The "dependsOn" element now have a required "resourceId" attribute to make a reference to the resource on which it depends.
Applied patch to CVS HEAD. Yes, Paul... it will be included in the upcoming 1.4M7 milestone.