These are chat archives for ceylon/ceylon-ide-eclipse

7th
Oct 2016
Vitaly Banchenko
@qdzo
Oct 07 2016 11:35

I have some problems with making support for "color themes plugin". Cos ceylon plugin has a different approach for storing configuration of editor colors. :worried:
Ceylon stores them in

 [eclipse_home]/plugins/com.redhat.ceylon.eclipse.ui_[ver]/plugin.xml

other editors store them in

 [work_space]/.metadata/.plugins/org.eclipse.core.runtime/.settings/[plugin_id].prefs

"color theme plugin" uses this config for setting colors

is there a light way to enable this config working?
Gavin King
@gavinking
Oct 07 2016 11:48
@qdzo Ceylon uses the Eclipse IThemeManager to store color schemes
public static ITheme getCurrentTheme() {
    return PlatformUI.getWorkbench()
            .getThemeManager()
            .getCurrentTheme();
}
getCurrentTheme().getColorRegistry()
I don’t think that’s wrong
however, it is a relatively newer system, so it would not surprise me if other plugins aren’t using it
Vitaly Banchenko
@qdzo
Oct 07 2016 12:09
Am i right that IThemeManager is that public interface in eclipse platform, that was released in 3.0 version?
if so, it looks vary strange, cos Eclipse Platform 3.0 was released in 2004.
This message was deleted
Gavin King
@gavinking
Oct 07 2016 12:22
@qdzo I don’t know the exact history
And note that we use dark.css to override colors in the dark theme
perhaps you can use a similar approach
Gavin King
@gavinking
Oct 07 2016 12:28
oh, oh, @qdzo I actually have an example of how to define a theme
in plugin.xml at line 2650, I define a theme named “Ceylon Alt”, which overrides all the syntax highlighter colors
this stuff is all an incredible mess in Eclipse, FTR
Vitaly Banchenko
@qdzo
Oct 07 2016 13:20
yep @gavinking , to define new theme in this way not hard, but i think this is not good approach to add common themes aka solarized, monokai to ceylon-plugin itself.
what is your opinion?
Gavin King
@gavinking
Oct 07 2016 13:26
I agree, but I assume that what we do in plugin.xml can also be done outside of it