Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bundles/org.eclipse.e4.ui.css.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-SymbolicName: org.eclipse.e4.ui.css.core;singleton:=true
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-Version: 0.14.600.qualifier
Bundle-Version: 0.14.700.qualifier
Export-Package: org.eclipse.e4.ui.css.core;x-internal:=true,
org.eclipse.e4.ui.css.core.css2;x-friends:="org.eclipse.e4.ui.css.swt.theme,org.eclipse.e4.ui.css.swt,org.eclipse.e4.ui.css.jface",
org.eclipse.e4.ui.css.core.dom;x-friends:="org.eclipse.e4.ui.css.swt,org.eclipse.ui.views.properties.tabbed,org.eclipse.ui.forms",
Expand Down Expand Up @@ -34,7 +34,6 @@ Export-Package: org.eclipse.e4.ui.css.core;x-internal:=true,
org.eclipse.e4.ui.css.core.impl.sac;x-internal:=true,
org.eclipse.e4.ui.css.core.resources;x-friends:="org.eclipse.e4.ui.css.swt,org.eclipse.e4.ui.workbench.renderers.swt",
org.eclipse.e4.ui.css.core.sac;x-internal:=true,
org.eclipse.e4.ui.css.core.serializers;x-friends:="org.eclipse.e4.ui.css.swt",
org.eclipse.e4.ui.css.core.util.impl.resources;x-friends:="org.eclipse.e4.ui.css.swt.theme,org.eclipse.e4.ui.workbench.swt",
org.eclipse.e4.ui.css.core.util.resources;x-friends:="org.eclipse.e4.ui.css.swt,org.eclipse.e4.ui.css.swt.theme,org.eclipse.e4.ui.workbench.swt",
org.eclipse.e4.ui.css.core.utils;x-friends:="org.eclipse.e4.ui.css.swt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterColorConfig;
import org.eclipse.e4.ui.css.core.dom.properties.converters.ICSSValueConverterConfig;
import org.w3c.dom.css.CSSPrimitiveValue;
import org.w3c.dom.css.RGBColor;

Expand Down Expand Up @@ -68,33 +66,12 @@ public static RGBColor getRGBColor(String value) {
}

/**
* Return color string form w3c <code>rgbColor</code> instance. The format
* (Hexa, color name or rgb format) of the color string is managed with
* <code>config</code> {@link ICSSValueConverterConfig}.
* Return the hex string representation of the given w3c {@code rgbColor}.
*
* @param rgbColor the color to get string representation for
* @param config optional config to influence string format
* @return string representation of rgbColor
* @param rgbColor the color to get a string representation for
* @return the hex string representation of {@code rgbColor}
*/
public static String getColorStringValue(RGBColor rgbColor, ICSSValueConverterConfig config) {
if (config instanceof ICSSValueConverterColorConfig colorConfig) {
switch (colorConfig.getFormat()) {
case ICSSValueConverterColorConfig.COLOR_HEXA_FORMAT:
return getHexaColorStringValue(rgbColor);
case ICSSValueConverterColorConfig.COLOR_RGB_FORMAT:
return getRGBColorStringValue(rgbColor);
case ICSSValueConverterColorConfig.COLOR_NAME_FORMAT:
// Get the Hexa color string value
String hexaColor = getHexaColorStringValue(rgbColor);
// Search into hexa map the color name
String colorName = getColorNameFromHexaColor(hexaColor);
if (colorName != null) {
return colorName;
}
// Color name is not found, return the Hexa value
return hexaColor;
}
}
public static String getColorStringValue(RGBColor rgbColor) {
return getHexaColorStringValue(rgbColor);
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion bundles/org.eclipse.e4.ui.css.swt/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Export-Package: org.eclipse.e4.ui.css.swt;x-friends:="org.eclipse.ui.workbench",
org.eclipse.e4.ui.css.swt.properties.definition;x-internal:=true,
org.eclipse.e4.ui.css.swt.properties.preference;x-internal:=true,
org.eclipse.e4.ui.css.swt.resources;x-friends:="org.eclipse.e4.ui.workbench.renderers.swt",
org.eclipse.e4.ui.css.swt.serializers;x-internal:=true,
org.eclipse.e4.ui.internal.css.swt;x-internal:=true,
org.eclipse.e4.ui.internal.css.swt.definition;x-friends:="org.eclipse.ui.workbench"
Require-Bundle: org.eclipse.e4.ui.css.core;bundle-version="0.12.200",
Expand Down
Loading
Loading