Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[capra-dev] Handler priorities and file extensions

The message is directed primarily at Jan-Philipp, who has been working on handler priorities. (All CC you all this time because I don't know if you have subscribed to the mailing list yet.)

One case in which the current model for handler priority doesn't work is when a handler that wants to handle files with specific extensions.

For example: The CDTHandler probably wants to handle .c, .cpp and .h files, while the IFileHandler can take other kinds of files. Maybe a handler should declare that it handles a certain Content type[1], as well that it handles a certain class.

A related problem is handlers that can handle multiple different kinds of elements. For example, the CDTHandler should probably be able to handle both IFile:s with C content as well as C syntax tree elements.

---

I ran into this problem because the CDT handler for files stopped working. It turn out that in the Package Explorer view, when a file is selected, the selected element will be an IFile. In the Project Explorer view on the other hand the selected element is a CDT Compilation Unit object that represents the file.

Jens Lideström
Software developer
rt-labs

[1]: http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fruntime_content.htm&cp=2_0_3_4


Back to the top