Skip to main content

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

> Would it be possible to file a bug about this?

New bug report for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=516396

> I assume that is what you mean: that a content type is declared by the handler and if the artifact is of that content type, we transform the artifact into a type that can be handled by the handler.

That is not really what I mean. I mean that when we try to find the appropriate handler for a given file, then the content type of the file could be an input to the PriorityHandler. The artifact handler that declares the most specific content type that matches the input file would have priority.

> I think the issue is even a bit deeper: ...
> Have you maybe tried this already?

I agree that there might be some tricky problems here, but I don't plan to do anything about it right now. We could plan a work package for this for the future.

I'm spending the week working on getting test results from Mylyn and presenting them in the requirements editor. Hopefully I can demo that on the Friday meeting. :)

Jens Lideström
Software developer
rt-labs

2017-05-10 9:57 GMT+02:00 <ec@xxxxxxxxxxxxxxxx>:
Hey Jens,

thank you for bringing this to my attention. Would it be possible to file a bug about this? I think the issue is even a bit deeper: Depending on where the artifact is dragged from, we have different types. This is counter-intuitive for the user (even though perfectly reasonable from a technical point of view). I am not sure if your solution fixes that problem, though. Won’t we get an IFile if the artifact is dragged from the project explorer anyway? Can we convert that into a resource that can be handled then? I assume that is what you mean: that a content type is declared by the handler and if the artifact is of that content type, we transform the artifact into a type that can be handled by the handler.

Have you maybe tried this already?

Best,
Jan-Philipp

> On 09 May 2017, at 10:10, Jens Lideström <jens.lidestrom@xxxxxxxxxxx> wrote:
>
> 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
>
> _______________________________________________
> capra-dev mailing list
> capra-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/capra-dev

_______________________________________________
capra-dev mailing list
capra-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/capra-dev


Back to the top