package org.csstudio.alarm.table.preferences;

import org.csstudio.alarm.table.JmsLogsPlugin;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;


/**
 * Class used to initialize default preference values.
 */
public class JmsLogPreferenceInitializer extends AbstractPreferenceInitializer {

	/*
	 * (non-Javadoc)
	 *
	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
	 */
	public void initializeDefaultPreferences() {
		IPreferenceStore store = JmsLogsPlugin.getDefault().getPreferenceStore();
		store.setDefault(JmsLogPreferenceConstants.KEY0,"0");
		store.setDefault(JmsLogPreferenceConstants.KEY1,"1");
		store.setDefault(JmsLogPreferenceConstants.KEY2,"2");
		store.setDefault(JmsLogPreferenceConstants.KEY3,"3");
		store.setDefault(JmsLogPreferenceConstants.KEY4,"4");
		store.setDefault(JmsLogPreferenceConstants.KEY5,"5");
		store.setDefault(JmsLogPreferenceConstants.KEY6,"6");
		store.setDefault(JmsLogPreferenceConstants.KEY7,"7");
		store.setDefault(JmsLogPreferenceConstants.KEY8,"8");
		store.setDefault(JmsLogPreferenceConstants.KEY9,"9");
		store.setDefault(JmsLogPreferenceConstants.COLOR0,"96,251,123");
		store.setDefault(JmsLogPreferenceConstants.COLOR1,"251,215,11");
		store.setDefault(JmsLogPreferenceConstants.COLOR2,"252,7,14");
		store.setDefault(JmsLogPreferenceConstants.COLOR3,"191,191,191");
		store.setDefault(JmsLogPreferenceConstants.COLOR4,"201,201,201");
		store.setDefault(JmsLogPreferenceConstants.COLOR5,"201,201,201");
		store.setDefault(JmsLogPreferenceConstants.COLOR6,"201,201,201");
		store.setDefault(JmsLogPreferenceConstants.COLOR7,"201,201,201");
		store.setDefault(JmsLogPreferenceConstants.COLOR8,"201,201,201");
		store.setDefault(JmsLogPreferenceConstants.COLOR9,"201,201,201");
		store.setDefault(JmsLogPreferenceConstants.VALUE0,"NO_ALARM");
		store.setDefault(JmsLogPreferenceConstants.VALUE1,"MINOR");
		store.setDefault(JmsLogPreferenceConstants.VALUE2,"MAJOR");
		store.setDefault(JmsLogPreferenceConstants.VALUE3,"INVALID");
		store.setDefault(JmsLogPreferenceConstants.VALUE4,"NOT DEFINED");
		store.setDefault(JmsLogPreferenceConstants.VALUE5,"NOT DEFINED");
		store.setDefault(JmsLogPreferenceConstants.VALUE6,"NOT DEFINED");
		store.setDefault(JmsLogPreferenceConstants.VALUE7,"NOT DEFINED");
		store.setDefault(JmsLogPreferenceConstants.VALUE8,"NOT DEFINED");
		store.setDefault(JmsLogPreferenceConstants.VALUE9,"NOT DEFINED");
		store.setDefault(JmsLogPreferenceConstants.INITIAL_CONTEXT_FACTORY, "org.exolab.jms.jndi.InitialContextFactory"); //$NON-NLS-1$
		store.setDefault(JmsLogPreferenceConstants.URL, "rmi://krykelog.desy.de:1099/"); //$NON-NLS-1$
		store.setDefault(JmsLogPreferenceConstants.QUEUE, "LOG"); //$NON-NLS-1$


	}

}

@@ -87,16 +87,87 @@
 Plugin;%0A
+import org.csstudio.platform.libs.jms.preferences.PreferenceConstants;%0A
 import o
@@ -745,17 +745,24 @@
 s.KEY0,%22
-0
+NO_ALARM
 %22);%0A%09%09st
@@ -808,17 +808,21 @@
 s.KEY1,%22
-1
+MINOR
 %22);%0A%09%09st
@@ -868,17 +868,21 @@
 s.KEY2,%22
-2
+MAJOR
 %22);%0A%09%09st
@@ -928,17 +928,23 @@
 s.KEY3,%22
-3
+INVALID
 %22);%0A%09%09st

Change KEYs from number to name