[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-ui-dev] Should Platform define more content types?
|
----- Original Message -----
> From: "Mickael Istria" <mistria@xxxxxxxxxx>
> To: "Eclipse Platform UI component developers list." <platform-ui-dev@xxxxxxxxxxx>
> Sent: Wednesday, 1 June, 2016 11:31:25 AM
> Subject: [platform-ui-dev] Should Platform define more content types?
>
> Hi all,
>
> As I'm working on some completion/hover that would give some Image preview,
> I'm wondering whether Platform UI should actually define a root content type
> for Images, just like it does for text, and also defined most usual
> children: jpeg, jpg, png, gif, bmp. This would make it pretty easy to test
> uniformly in the IDE whether a given resource is an image:
>
> IContentType imageContentType =
> Platform.getContentTypeManager().getContentType("org.eclipse.core.runtime.image");
> Platform.getContentTypeManager().getContentType(proposalResource.getName()).isKindOf(imageContentType);
>
> and it would make those content-types available by default in the
> content-type page, making it more accessible for users to tweak the editor
> association. Also, adding new images format would be "only" a matter of
> adding a content-type rather than changing multiple pieces of code checking
> for extensions.
> Note that the idea is simply to define the content-type, not to associate it
> with any viewer/editor at the moment.
>
> Do you think it's worth opening a bug and trying to add it in future
> releases?
I think this is reasonable thing to do. Please open the bug.
>
> Cheers,
> --
> Mickael Istria
> Eclipse developer at JBoss, by Red Hat
> My blog - My Tweets
>
> _______________________________________________
> platform-ui-dev mailing list
> platform-ui-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
--
Alexander Kurtakov
Red Hat Eclipse team