Skip to content

Commit

Permalink
Merge branch 'pakdel-master'
Browse files Browse the repository at this point in the history
Conflicts:
	com.github.eclipsecolortheme/src/com/github/eclipsecolortheme/preferences/ColorThemePreferencePage.java
  • Loading branch information
fhd committed Aug 4, 2013
2 parents 30ae816 + 4e00ef4 commit 71d03d0
Show file tree
Hide file tree
Showing 16 changed files with 391 additions and 178 deletions.
20 changes: 20 additions & 0 deletions com.github.eclipsecolortheme/mappings/com.spket.js.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<eclipseColorThemeMapping plugin="com.spket.js" created="2013-01-16 18:00:00">
<mappings>
<mapping pluginKey="java_doc_default" themeKey="javadoc" />
<mapping pluginKey="java_doc_keyword" themeKey="javadocKeyword" />
<mapping pluginKey="java_doc_link" themeKey="javadocLink" />
<mapping pluginKey="java_doc_tag" themeKey="javadocTag" />
<mapping pluginKey="js_default" themeKey="foreground" />
<mapping pluginKey="js_keyword" themeKey="keyword" />
<mapping pluginKey="js_keyword_return" themeKey="keyword" />
<mapping pluginKey="js_reserved" themeKey="keyword" />
<mapping pluginKey="js_ml_comment" themeKey="multiLineComment" />
<mapping pluginKey="js_sl_comment" themeKey="singleLineComment" />
<mapping pluginKey="js_operator" themeKey="operator" />
<mapping pluginKey="js_regexp" themeKey="string" />
<mapping pluginKey="js_string" themeKey="string" />
<mapping pluginKey="js_task_tag" themeKey="javadocTag" />
<mapping pluginKey="js_ssi" themeKey="staticMethod" />
</mappings>
</eclipseColorThemeMapping>
13 changes: 13 additions & 0 deletions com.github.eclipsecolortheme/mappings/com.spket.xml.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<eclipseColorThemeMapping plugin="com.spket.xml" created="2013-01-16 18:00:00">
<mappings>
<mapping pluginKey="xml_default" themeKey="foreground" />
<mapping pluginKey="xml_attr_value" themeKey="string" />
<mapping pluginKey="xml_cdata" themeKey="foreground" />
<mapping pluginKey="xml_comments" themeKey="multiLineComment" />
<mapping pluginKey="xml_task_tag" themeKey="commentTaskTag" />
<mapping pluginKey="xml_proc_instr" themeKey="foreground" />
<mapping pluginKey="xml_doctype" themeKey="method" />
<mapping pluginKey="xml_tags" themeKey="localVariableDeclaration" />
</mappings>
</eclipseColorThemeMapping>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<eclipseColorThemeMapping plugin="org.eclipse.debug.ui" created="2013-01-16 18:00:00">
<mappings>
<mapping pluginKey="org.eclipse.debug.ui.inColor" themeKey="foreground" />
<mapping pluginKey="org.eclipse.debug.ui.outColor" themeKey="foreground" />
<mapping pluginKey="org.eclipse.debug.ui.consoleBackground" themeKey="background" />
<mapping pluginKey="org.eclipse.debug.ui.errorColor" themeKey="commentTaskTag" />
</mappings>
</eclipseColorThemeMapping>
15 changes: 15 additions & 0 deletions com.github.eclipsecolortheme/mappings/org.eclipse.e4.CSS.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<eclipseColorThemeMapping plugin="org.eclipse.wst.css.ui" created="2013-01-18 18:00:00">
<mappings>
<mapping pluginKey="ClassID" themeKey="method" />
<mapping pluginKey="Declaration" themeKey="methodDeclaration" />
<mapping pluginKey="Element" themeKey="class" />
<mapping pluginKey="comment" themeKey="multiLineComment" />
<mapping pluginKey="default" themeKey="foreground" />
<mapping pluginKey="error" themeKey="commentTaskTag" />
<mapping pluginKey="keyword" themeKey="keyword" />
<mapping pluginKey="punctuation" themeKey="bracket" />
<mapping pluginKey="string" themeKey="string" />
<mapping pluginKey="number" themeKey="number" />
</mappings>
</eclipseColorThemeMapping>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<eclipseColorThemeMapping plugin="org.eclipse.team.cvs.ui" created="2013-01-16 18:00:00">
<mappings>
<mapping pluginKey="pref_console_command_color" themeKey="singleLineComment" />
<mapping pluginKey="pref_console_message_color" themeKey="foreground" />
<mapping pluginKey="pref_console_error_color" themeKey="class" />
</mappings>
</eclipseColorThemeMapping>
13 changes: 13 additions & 0 deletions com.github.eclipsecolortheme/mappings/org.eclipse.wst.dtd.ui.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<eclipseColorThemeMapping plugin="org.eclipse.wst.dtd.ui" created="2013-01-16 18:00:00">
<mappings>
<mapping pluginKey="dtdDefault" themeKey="foreground" />
<mapping pluginKey="dtdKeyword" themeKey="keyword" />
<mapping pluginKey="dtdData" themeKey="foreground" />
<mapping pluginKey="dtdString" themeKey="string" />
<mapping pluginKey="dtdSymbol" themeKey="field" />
<mapping pluginKey="dtdTag" themeKey="localVariableDeclaration" />
<mapping pluginKey="dtdTagName" themeKey="localVariableDeclaration" />
<mapping pluginKey="dtdComment" themeKey="multiLineComment" />
</mappings>
</eclipseColorThemeMapping>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<mapping pluginKey="doctypeExternalPubref" themeKey="method" />
<mapping pluginKey="doctypeExtrenalSysref" themeKey="method" />
<mapping pluginKey="doctypeExternalId" themeKey="method" />
<mapping pluginKey="declBoder" themeKey="method" />
<mapping pluginKey="declBorder" themeKey="method" />
<mapping pluginKey="cdataBorder" themeKey="method" />
<mapping pluginKey="cdataText" themeKey="foreground" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<eclipseColorThemeMapping plugin="org.eclipse.wst.xsl.ui" created="2013-01-16 18:00:00">
<mappings>
<mapping pluginKey="xsltagAttributeName" themeKey="field" />
<mapping pluginKey="xsltagAttributeValue" themeKey="string" />
<mapping pluginKey="xsltagBorder" themeKey="localVariable" />
<mapping pluginKey="xsltagName" themeKey="localVariableDeclaration" />
</mappings>
</eclipseColorThemeMapping>
8 changes: 8 additions & 0 deletions com.github.eclipsecolortheme/mappings/winterwell.markdown.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<eclipseColorThemeMapping plugin="winterwell.markdown" created="2013-01-16 18:00:00">
<mappings>
<mapping pluginKey="Pref_Default" themeKey="foreground"/>
<mapping pluginKey="Pref_Header" themeKey="commentTaskTag"/>
<mapping pluginKey="Pref_Comment" themeKey="multiLineComment"/>
<mapping pluginKey="Pref_Link" themeKey="javadocLink"/>
</mappings>
</eclipseColorThemeMapping>
49 changes: 49 additions & 0 deletions com.github.eclipsecolortheme/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,55 @@
pluginId="com.adobe.flexide.css.core"
xml="mappings/com.adobe.flexide.css.core.xml">
</mapper>
<mapper
class="com.github.eclipsecolortheme.mapper.GenericMapper"
name="Markdown"
pluginId="winterwell.markdown"
xml="mappings/winterwell.markdown.xml">
</mapper>
<mapper
class="com.github.eclipsecolortheme.mapper.GenericMapper"
name="Console"
pluginId="org.eclipse.debug.ui"
xml="mappings/org.eclipse.debug.ui.xml">
</mapper>
<mapper
class="com.github.eclipsecolortheme.mapper.GenericMapper"
name="CVS"
pluginId="org.eclipse.team.cvs.ui"
xml="mappings/org.eclipse.team.cvs.ui.xml">
</mapper>
<mapper
class="com.github.eclipsecolortheme.mapper.GenericMapper"
name="Spket JavaScript"
pluginId="com.spket.js"
xml="mappings/com.spket.js.xml">
</mapper>
<mapper
class="com.github.eclipsecolortheme.mapper.GenericMapper"
name="Spket XML"
pluginId="com.spket.xml"
xml="mappings/com.spket.xml.xml">
</mapper>

<mapper
class="com.github.eclipsecolortheme.mapper.WebEditorMapper"
name="XSL"
pluginId="org.eclipse.wst.xsl.ui"
xml="mappings/org.eclipse.wst.xsl.ui.xml">
</mapper>
<mapper
class="com.github.eclipsecolortheme.mapper.WebEditorMapper"
name="DTD"
pluginId="org.eclipse.wst.dtd.ui"
xml="mappings/org.eclipse.wst.dtd.ui.xml">
</mapper>
<mapper
class="com.github.eclipsecolortheme.mapper.E4CSSMapper"
name="e4 CSS"
pluginId="org.eclipse.e4.CSS"
xml="mappings/org.eclipse.e4.CSS.xml">
</mapper>

<mapper
class="com.github.eclipsecolortheme.mapper.GenericMapper"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,67 @@

public class ColorThemeSetting {

private Color color;
private Boolean boldEnabled;
private Boolean italicEnabled;
private Boolean underlineEnabled;
private Boolean strikethroughEnabled;

public ColorThemeSetting(String color) {
this.color = new Color(color);
}

public void setBoldEnabled(Boolean boldEnabled) {
this.boldEnabled = boldEnabled;
}

public void setItalicEnabled(Boolean italicEnabled) {
this.italicEnabled = italicEnabled;
}

public void setStrikethroughEnabled(Boolean strikethroughEnabled) {
this.strikethroughEnabled = strikethroughEnabled;
}

public void setUnderlineEnabled(Boolean underlineEnabled) {
this.underlineEnabled = underlineEnabled;
}

public Color getColor() {
return color;
}

public Boolean isBoldEnabled() {
return boldEnabled;
}

public Boolean isItalicEnabled() {
return italicEnabled;
}

public Boolean isUnderlineEnabled() {
return underlineEnabled;
}

public Boolean isStrikethroughEnabled() {
return strikethroughEnabled;
}
private Color color;
private Boolean boldEnabled;
private Boolean italicEnabled;
private Boolean underlineEnabled;
private Boolean strikethroughEnabled;

public ColorThemeSetting(String color) {
this.color = new Color(color);
}

public ColorThemeSetting() {
}

public void setBoldEnabled(Boolean boldEnabled) {
this.boldEnabled = boldEnabled;
}

public void setItalicEnabled(Boolean italicEnabled) {
this.italicEnabled = italicEnabled;
}

public void setStrikethroughEnabled(Boolean strikethroughEnabled) {
this.strikethroughEnabled = strikethroughEnabled;
}

public void setUnderlineEnabled(Boolean underlineEnabled) {
this.underlineEnabled = underlineEnabled;
}

public Color getColor() {
return color;
}

public String getHexColorOrNull() {
if (color == null) {
return "null";
}
return color.asHex();
}

public String getHexColorOrEmpty() {
if (color == null) {
return "";
}
return color.asHex();
}

public Boolean isBoldEnabled() {
return boldEnabled;
}

public Boolean isItalicEnabled() {
return italicEnabled;
}

public Boolean isUnderlineEnabled() {
return underlineEnabled;
}

public Boolean isStrikethroughEnabled() {
return strikethroughEnabled;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.github.eclipsecolortheme.mapper;

import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import com.github.eclipsecolortheme.ColorThemeMapping;
import com.github.eclipsecolortheme.ColorThemeSetting;

public class E4CSSMapper extends GenericMapper {

private class Mapping extends ColorThemeMapping {
private static final String KEY_PREFIX = "org.eclipse.e4.CSS.syntaxColorer.tokenStyles";
public Mapping(String pluginKey, String themeKey) {
super(pluginKey, themeKey);
}

@Override
public void putPreferences(IEclipsePreferences preferences, ColorThemeSetting setting) {
preferences.put(KEY_PREFIX + '.' + pluginKey + ".color", setting.getColor().asRGB());
preferences.put(KEY_PREFIX + '.' + pluginKey + ".bgColor", defaultBackground.getHexColorOrEmpty());
}
}

@Override
protected ColorThemeMapping createMapping(String pluginKey, String themeKey) {
return new Mapping(pluginKey, themeKey);
}

}
Loading

0 comments on commit 71d03d0

Please sign in to comment.