| Summary: | codeEdit: Reusing the codeEdit.create() API on the same DOM introduces the javascript validation issue. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Editor | Assignee: | libing wang <libingw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | Michael_Rennie |
| Version: | 16.0 | ||
| Target Milestone: | 17.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
libing wang
There are a few bugs at play here:
1. the code edit widget does not return the correct project for a file - regardless of the path of the file, the call to getProject for the embedded file impl always returns /in_memory_fs/project. So when the tools gets a new file and see it is not part of the same project path, it asks for the project again (via the getProject call). But then detects that it is indeed in the same project context, and does not resolve a project change promise it uses (which cause the tools to 'wait')
2. all files in the widget should simply be created in the same virtual project: in_memory_fs/project since there is no support for more than one project in the widget
3. I can add a check in to the tools to catch this edge case:
if(file.location.indexOf(project.Location) === -1) {
this.projectPromise.resolve(project);
}
which basically will ask "is the file not actually part of the project we resolved? Ok, then resolve the project promise".
|