Search code examples
dartdart-editor

Themes for Dart Editor


Right now, the white background is killing my eyes, as it's a looong dark night. Is it possible to change the theme (to something darker) from the Dart Editor (v 0.1)? What about picking a background colour and syntax highlighting?


Solution

  • Yes, it is possible and I have just verified this quickfix for a darker background on the Dart Editor Version 0.1.0.201204042313:

    1. Close the Dart Editor
    2. Open with your favorite editor the file: <DART-INSTALL-DIR>\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.editors.prefs
    3. Change the content

    from:

     #Fri Apr 06 20:28:37 EST 2012
     eclipse.preferences.version=1
     overviewRuler_migration=migrated_3.1
    

    to:

    #Fri Apr 06 20:28:38 EST 2012
    AbstractTextEditor.Color.Background.SystemDefault=false
    AbstractTextEditor.Color.Background=208,208,223
    eclipse.preferences.version=1
    overviewRuler_migration=migrated_3.1
    

    Start your Dart Editor and the background should look like: enter image description here

    You may create a "complete theme" simply adding more properties to the org.eclipse.ui.editors.prefs and org.eclipse.jdt.ui.prefs files.

    I strongly suggest you to have a look inside the "Eclipse Preferences (EPF)" sample files of the project http://www.eclipsecolorthemes.org/

    I haven't tried yet but in theory you could manually install the plugin Eclipse Color Theme.


    Update 06-Dec-2012

    The new Dart Editor Build 0.2.7.1_r15699 supports theming for both editor and panels. This "trick" is not needed anymore, please customize your theme using Preferences --> Visual Theme enter image description here