package org.lamport.tla.toolbox.tool.tla2tex.preference;

import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.lamport.tla.toolbox.tool.tla2tex.TLA2TeXActivator;

/**
 * Gives default preferences for TLA2TeX
 * 
 * @author Daniel Ricketts
 * @version $Id$
 */
public class TLA2TeXPreferenceInitializer extends AbstractPreferenceInitializer {

	public void initializeDefaultPreferences() {
		IPreferenceStore store = TLA2TeXActivator.getDefault()
				.getPreferenceStore();
		store.setDefault(ITLA2TeXPreferenceConstants.SHADE_COMMENTS, true);
		store.setDefault(ITLA2TeXPreferenceConstants.NO_PCAL_SHADE, false);
        store.setDefault(ITLA2TeXPreferenceConstants.NUMBER_LINES, false);
		store.setDefault(ITLA2TeXPreferenceConstants.LATEX_COMMAND, "pdflatex");
		store.setDefault(ITLA2TeXPreferenceConstants.GRAY_LEVEL, "0.85");
		store.setDefault(ITLA2TeXPreferenceConstants.EMBEDDED_VIEWER, false);
		if (Platform.getOS().equals(Platform.OS_MACOSX)) {
			// Support for the built-in viewer has ended on MACOSX, thus disable
			// even if user enabled it in an earlier Toolbox release.
			store.setValue(ITLA2TeXPreferenceConstants.EMBEDDED_VIEWER, false);
		}
	}
}

@@ -980,81 +980,8 @@
 );%0D%0A
-%09%09store.setDefault(ITLA2TeXPreferenceConstants.EMBEDDED_VIEWER, false);%0D%0A
 %09%09if
@@ -1237,16 +1237,101 @@
 alse);%0D%0A
+%09%09%7D else %7B%0D%0A%09%09%09store.setDefault(ITLA2TeXPreferenceConstants.EMBEDDED_VIEWER, true);%0D%0A
 %09%09%7D%0D%0A%09%7D%0D

Make built-in PDF viewer the Toolbox default for Windows and Linux.