| /******************************************************************************* |
| * Copyright (c) 2000, 2003 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Common Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/cpl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.ant.internal.ui.preferences; |
| |
| |
| import org.eclipse.jface.preference.IPreferenceStore; |
| import org.eclipse.jface.preference.PreferenceConverter; |
| import org.eclipse.swt.graphics.RGB; |
| import org.eclipse.ui.editors.text.TextEditorPreferenceConstants; |
| |
| /** |
| * Preference constants used in the default text editor preference store. |
| */ |
| public class AntEditorPreferenceConstants { |
| |
| private AntEditorPreferenceConstants() { |
| } |
| |
| /** |
| * A named preference that controls whether the editor shows problem indicators in text (squiggly lines). |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| */ |
| public final static String EDITOR_PROBLEM_INDICATION= "errorIndication"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the color used to render problem indicators. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see #EDITOR_PROBLEM_INDICATION |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| */ |
| public final static String EDITOR_PROBLEM_INDICATION_COLOR= "errorIndicationColor"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the editor shows warning indicators in text (squiggly lines). |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| */ |
| public final static String EDITOR_WARNING_INDICATION= "warningIndication"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the color used to render warning indicators. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see #EDITOR_WARNING_INDICATION |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| */ |
| public final static String EDITOR_WARNING_INDICATION_COLOR= "warningIndicationColor"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the editor shows info indicators in text (squiggly lines). |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| */ |
| public final static String EDITOR_INFO_INDICATION= "infoIndication"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the color used to render info indicators. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see #EDITOR_INFO_INDICATION |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| */ |
| public final static String EDITOR_INFO_INDICATION_COLOR= "infoIndicationColor"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the editor shows task indicators in text (squiggly lines). |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| */ |
| public final static String EDITOR_TASK_INDICATION= "taskIndication"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the color used to render task indicators. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see #EDITOR_TASK_INDICATION |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| */ |
| public final static String EDITOR_TASK_INDICATION_COLOR= "taskIndicationColor"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the editor shows bookmark |
| * indicators in text (squiggly lines). |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_BOOKMARK_INDICATION= "bookmarkIndication"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the color used to render bookmark indicators. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see #EDITOR_BOOKMARK_INDICATION |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| * @since 2.1 |
| */ |
| public final static String EDITOR_BOOKMARK_INDICATION_COLOR= "bookmarkIndicationColor"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the editor shows search |
| * indicators in text (squiggly lines). |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_SEARCH_RESULT_INDICATION= "searchResultIndication"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the color used to render search indicators. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see #EDITOR_SEARCH_RESULT_INDICATION |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| * @since 2.1 |
| */ |
| public final static String EDITOR_SEARCH_RESULT_INDICATION_COLOR= "searchResultIndicationColor"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the editor shows unknown |
| * indicators in text (squiggly lines). |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_UNKNOWN_INDICATION= "othersIndication"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the color used to render unknown |
| * indicators. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see #EDITOR_UNKNOWN_INDICATION |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| * @since 2.1 |
| */ |
| public final static String EDITOR_UNKNOWN_INDICATION_COLOR= "othersIndicationColor"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the overview ruler shows error |
| * indicators. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_ERROR_INDICATION_IN_OVERVIEW_RULER= "errorIndicationInOverviewRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the overview ruler shows warning |
| * indicators. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_WARNING_INDICATION_IN_OVERVIEW_RULER= "warningIndicationInOverviewRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the overview ruler shows info |
| * indicators. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_INFO_INDICATION_IN_OVERVIEW_RULER= "infoIndicationInOverviewRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the overview ruler shows task |
| * indicators. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_TASK_INDICATION_IN_OVERVIEW_RULER= "taskIndicationInOverviewRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the overview ruler shows |
| * bookmark indicators. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_BOOKMARK_INDICATION_IN_OVERVIEW_RULER= "bookmarkIndicationInOverviewRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the overview ruler shows |
| * search result indicators. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_SEARCH_RESULT_INDICATION_IN_OVERVIEW_RULER= "searchResultIndicationInOverviewRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls whether the overview ruler shows |
| * unknown indicators. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String EDITOR_UNKNOWN_INDICATION_IN_OVERVIEW_RULER= "othersIndicationInOverviewRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls if temporary problems are evaluated and shown in the UI. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| */ |
| // public final static String EDITOR_EVALUTE_TEMPORARY_PROBLEMS= "handleTemporaryProblems"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls if the overview ruler is shown in the UI. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| */ |
| public final static String EDITOR_OVERVIEW_RULER= "overviewRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls if the line number ruler is shown in the UI. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| */ |
| public final static String EDITOR_LINE_NUMBER_RULER= "lineNumberRuler"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the color used to render line numbers inside the line number ruler. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| * @see #EDITOR_LINE_NUMBER_RULER |
| */ |
| public final static String EDITOR_LINE_NUMBER_RULER_COLOR= "lineNumberColor"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls if the Ant Editor code assist gets auto activated. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| */ |
| public final static String CODEASSIST_AUTOACTIVATION= "content_assist_autoactivation"; //$NON-NLS-1$ |
| |
| /** |
| * A name preference that holds the auto activation delay time in milli seconds. |
| * <p> |
| * Value is of type <code>Int</code>. |
| * </p> |
| */ |
| public final static String CODEASSIST_AUTOACTIVATION_DELAY= "content_assist_autoactivation_delay"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that controls if the Ant editor code assist inserts a |
| * proposal automatically if only one proposal is available. |
| * <p> |
| * Value is of type <code>Boolean</code>. |
| * </p> |
| * @since 2.1 |
| */ |
| public final static String CODEASSIST_AUTOINSERT= "content_assist_autoinsert"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the characters that auto activate code assist in Java code. |
| * <p> |
| * Value is of type <code>Sring</code>. All characters that trigger auto code assist in Java code. |
| * </p> |
| */ |
| public final static String CODEASSIST_AUTOACTIVATION_TRIGGERS= "content_assist_autoactivation_triggers_java"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the background color used in the code assist selection dialog. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| */ |
| public final static String CODEASSIST_PROPOSALS_BACKGROUND= "content_assist_proposals_background"; //$NON-NLS-1$ |
| |
| /** |
| * A named preference that holds the foreground color used in the code assist selection dialog. |
| * <p> |
| * Value is of type <code>String</code>. A RGB color value encoded as a string |
| * using class <code>PreferenceConverter</code> |
| * </p> |
| * |
| * @see org.eclipse.jface.resource.StringConverter |
| * @see org.eclipse.jface.preference.PreferenceConverter |
| */ |
| public final static String CODEASSIST_PROPOSALS_FOREGROUND= "content_assist_proposals_foreground"; //$NON-NLS-1$ |
| |
| public static void initializeDefaultValues(IPreferenceStore store) { |
| TextEditorPreferenceConstants.initializeDefaultValues(store); |
| |
| store.setDefault(AntEditorPreferenceConstants.CODEASSIST_AUTOINSERT, true); |
| store.setDefault(AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION, true); |
| store.setDefault(AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY, 500); |
| PreferenceConverter.setDefault(store, AntEditorPreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, new RGB(254, 241, 233)); |
| PreferenceConverter.setDefault(store, AntEditorPreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0)); |
| store.setDefault(AntEditorPreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS, "<${"); //$NON-NLS-1$ |
| } |
| } |