Omaha #1255 fixed collaboration colors

config.xml was not in build.properties
provided a fallback default if config is missing

Change-Id: I9e531b210d6bbe48ce5daf8a760b0bbcf2daa3c6

Former-commit-id: da53d9ccc7 [formerly 0d4cd4bab8 [formerly 5ee2e28b8eb94174c7fce660cccc4a77345617a4]]
Former-commit-id: 0d4cd4bab8
Former-commit-id: aeb093ad95
This commit is contained in:
Brian Clements 2014-07-07 12:24:17 -05:00
parent 1dca75e12d
commit c024dd86a1
2 changed files with 12 additions and 5 deletions

View file

@ -2,4 +2,5 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
plugin.xml,\
config.xml

View file

@ -28,6 +28,7 @@ import com.raytheon.uf.viz.collaboration.comm.provider.user.VenueParticipant;
import com.raytheon.uf.viz.collaboration.display.Activator;
import com.raytheon.uf.viz.core.RGBColors;
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
import com.raytheon.viz.core.ColorUtil;
/**
*
@ -44,6 +45,7 @@ import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
* Jan 30, 2014 2698 bclement changed UserId to VenueParticipant
* Mar 06, 2014 2848 bclement synchronized color access
* Jul 02, 2014 1255 bclement collaboration specific RGB presets
* falls back to ColorUtil resource color presets
*
* </pre>
*
@ -63,10 +65,14 @@ public class SessionColorManager {
HierarchicalPreferenceStore prefs = (HierarchicalPreferenceStore) Activator
.getDefault().getPreferenceStore();
String[] names = prefs.getStringArray(SESSION_COLOR_PREFERENCE_KEY);
rgbPresets = new RGB[names.length];
int i = 0;
for (String name : names) {
rgbPresets[i++] = RGBColors.getRGBColor(name);
if (names.length > 0) {
rgbPresets = new RGB[names.length];
int i = 0;
for (String name : names) {
rgbPresets[i++] = RGBColors.getRGBColor(name);
}
} else {
rgbPresets = ColorUtil.getResourceColorPresets();
}
}