import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
public static final String EDITOR_DISABLE_OVERWRITE_MODE = "disable_overwrite_mode"; //$NON-NLS-1$
/**
+ * A named preference that controls saving of a file on loss of editor focus.
+ * <p>
+ * Value is of type <code>Boolean</code>.
+ * </p>
+ *
+ * @since 3.0
+ */
+ public static final String EDITOR_SAVE_ON_BLUR = "save_on_blur"; //$NON-NLS-1$
+
+ /**
* A named preference that controls the "smart semicolon" smart typing
* handler
* <p>
store.setDefault(PreferenceConstants.EDITOR_CTRL_ALT_SHIFT_HOVER,
PreferenceConstants.EDITOR_DEFAULT_HOVER_CONFIGURED_ID);
- String ctrl = Action.findModifierString(SWT.CTRL);
+ int modifier = SWT.CTRL;
+ if (Platform.getOS().equals(Platform.OS_MACOSX))
+ modifier = SWT.COMMAND;
+ String ctrl = Action.findModifierString(modifier);
store
.setDefault(
PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS,
store
.setDefault(
PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS,
- "net.sourceforge.phpdt.ui.BestMatchHover;0;net.sourceforge.phpdt.ui.JavaSourceHover;" + SWT.CTRL); //$NON-NLS-1$
+ "net.sourceforge.phpdt.ui.BestMatchHover;0;net.sourceforge.phpdt.ui.JavaSourceHover;" + modifier); //$NON-NLS-1$
store.setDefault(PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE,
true);
store
.setDefault(
PreferenceConstants.EDITOR_BROWSER_LIKE_LINKS_KEY_MODIFIER_MASK,
- SWT.CTRL);
+ modifier);
// mark occurrences
store.setDefault(PreferenceConstants.EDITOR_MARK_OCCURRENCES, true);