| Summary: | Need a way to construct the content type service without knowing service registry. | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> |
| Component: | Client | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 5.0 | ||
| Target Milestone: | 5.0 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 424866 | ||
|
Description
libing wang
I will refactor the ContentTypeRegistry so it can be powered by a flat data structure of hard-coded content type info, if no service registry is provided. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7d0ea3e http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=de56e8a You can now construct a ContentTypeRegistry without a service registry like this: > new mContentTypes.ContentTypeRegistry([ > { id: "text/plain", > name: "Text", > extension: ["txt"], > imageClass: "file-sprite-text modelDecorationSprite" > }, > { id: "text/html", > "extends": "text/plain", > name: "HTML", > extension: ["html", "htm"], > imageClass: "file-sprite-html modelDecorationSprite" > }, > ... > ]); The parameter is an array of ContentType [1] objects. [1] http://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_navigator#The_ContentType_object |