| Summary: | [editor] org.eclipse.wst.sse.ui.StructuredTextEditor incorrectly says that file content type is not set. | ||
|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Jacek Jaroczynski <jacek.jaroczynski> |
| Component: | wst.sse | Assignee: | wst.sse <wst.sse-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Nitin Dahyabhai <thatnitind> |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, nsand.dev |
| Version: | unspecified | Keywords: | needinfo |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Jacek Jaroczynski
Feel free to move the ticket if this is not the right place for org.eclipse.wst.sse bug. The message actually says "Unsupported content type in editor." It should have worked without implementing ILocationProvider. What were you returning for the editor input's name? Was the input implementing IStorageEditorInput? I returned file name with php extention e.g. file.php but I believe it should not rely on the file extention but editorID which I pass to the openEditor method. Yes, the editor input is implementing IStorageEditorInput. It's not based solely on the filename. We're calling into the platform's content type manager and IContentTypeMatcher#findContentTypeFor(InputStream, String) with the first 8k of input to determine what the content type is. You might want to step through org.eclipse.wst.sse.ui.internal.StorageModelProvider#loadModel(IStorageEditorInput, boolean) or org.eclipse.core.internal.content.ContentTypeMatcher#findContentTypeFor(InputStream, String) to find out what's going on. I suspect the content type being detected is defaulting to plain text. (In reply to comment #4) >I suspect the content type being detected is defaulting to plain text. Is it? pinging to see if this is still an issue. |