import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
import org.eclipse.ui.texteditor.AnnotationPreference;
import org.eclipse.ui.texteditor.ChainedPreferenceStore;
import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
+
/**
* The page for setting the editor options.
*/
private final String[][] fAppearanceColorListModel = new String[][] {
{
PreferencesMessages
- .getString("JavaEditorPreferencePage.lineNumberForegroundColor"),
- AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR },
- //$NON-NLS-1$
- {
- PreferencesMessages
.getString("JavaEditorPreferencePage.matchingBracketsHighlightColor2"),
PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR },
//$NON-NLS-1$
.add(new OverlayPreferenceStore.OverlayKey(
OverlayPreferenceStore.BOOLEAN,
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER));
- overlayKeys
- .add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.STRING,
- AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR));
- overlayKeys
- .add(new OverlayPreferenceStore.OverlayKey(
- OverlayPreferenceStore.BOOLEAN,
- AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(
OverlayPreferenceStore.BOOLEAN,
PreferenceConstants.EDITOR_SPACES_FOR_TABS));
GridLayout layout = new GridLayout();
layout.numColumns = 2;
appearanceComposite.setLayout(layout);
+
+ // Inserts a hyper-link to the General Editor preferences page
+ // TODO Can probably be removed post 1.5.0?
String label = PreferencesMessages
+ .getString("JavaEditorPreferencePage.appearanceTabLink");
+ Link link = new Link(appearanceComposite, SWT.NONE);
+ GridData gridPosition = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gridPosition.horizontalSpan = 2;
+ link.setLayoutData(gridPosition);
+
+ link.setText(label);
+ link.addListener(SWT.Selection, new Listener () {
+ public void handleEvent(Event event) {
+ String u = event.text;
+ PreferencesUtil.createPreferenceDialogOn(getShell(), u, null, null);
+ }
+ });
+ String tooltip = PreferencesMessages
+ .getString("JavaEditorPreferencePage.appearanceTabTooltip");
+ link.setToolTipText(tooltip);
+
+ label = PreferencesMessages
.getString("JavaEditorPreferencePage.displayedTabWidth"); //$NON-NLS-1$
addTextField(appearanceComposite, label,
PreferenceConstants.EDITOR_TAB_WIDTH, 3, 0, true);
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER,
0);
label = PreferencesMessages
- .getString("JavaEditorPreferencePage.showLineNumbers"); //$NON-NLS-1$
- addCheckBox(
- appearanceComposite,
- label,
- AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER,
- 0);
- label = PreferencesMessages
.getString("JavaEditorPreferencePage.highlightMatchingBrackets"); //$NON-NLS-1$
addCheckBox(appearanceComposite, label,
PreferenceConstants.EDITOR_MATCHING_BRACKETS, 0);
NewJavaProjectPreferencePage.folders.error.invalidbinname=Invalid output folder name: {0}
NewJavaProjectPreferencePage.folders.error.invalidcp=Settings will result in an invalid build path. Check for nested folders.
+JavaEditorPreferencePage.appearanceTabLink=Some general preferences now live on the Eclipse <a href="org.eclipse.ui.preferencePages.GeneralTextEditor">Text Editors</a> pages.
+JavaEditorPreferencePage.appearanceTabTooltip=Jump to the Text Editors page
+
JavaEditorPreferencePage.annotationsTab.title= Annotation&s
JavaEditorPreferencePage.showQuickFixables= Indicate annotations solvable with &Quick Fix in vertical ruler
JavaEditorPreferencePage.analyseAnnotationsWhileTyping= Analyze annotations &while typing
JavaEditorPreferencePage.codeAssist= &Code Assist
JavaEditorPreferencePage.empty_input=Empty input
JavaEditorPreferencePage.invalid_input=''{0}'' is not a valid input.
-JavaEditorPreferencePage.showLineNumbers=Show lin&e numbers
-JavaEditorPreferencePage.lineNumberForegroundColor=Line number foreground
JavaEditorPreferencePage.matchingBracketsHighlightColor2=Matching brackets highlight
JavaEditorPreferencePage.currentLineHighlighColor=Current line highlight
JavaEditorPreferencePage.printMarginColor2=Print margin
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 holds the color used to render linked positions
* inside code templates.
* <p>
store.setDefault(PreferenceConstants.EDITOR_OVERVIEW_RULER, true);
- store.setDefault(PreferenceConstants.EDITOR_LINE_NUMBER_RULER, false);
- PreferenceConverter.setDefault(store,
- PreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR, new RGB(0,
- 0, 0));
-
// WorkbenchChainedTextFontFieldEditor.startPropagate(store,
// JFaceResources.TEXT_FONT);