|
From: <mir...@us...> - 2007-03-14 08:16:09
|
Revision: 2160
http://svn.sourceforge.net/rubyeclipse/?rev=2160&view=rev
Author: mirkostocker
Date: 2007-03-14 01:16:07 -0700 (Wed, 14 Mar 2007)
Log Message:
-----------
enable the smart home/end feature, fixes #173
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.properties
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/RubyEditorAppearanceConfigurationBlock.java
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.java 2007-03-13 20:30:12 UTC (rev 2159)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.java 2007-03-14 08:16:07 UTC (rev 2160)
@@ -123,6 +123,7 @@
public static String RubyEditorPreferencePage_closeBrackets;
public static String RubyEditorPreferencePage_closeBraces;
public static String RubyEditorPreferencePage_endStatements;
+ public static String RubyEditorPreferencePage_smartHomeEnd;
public static String ProblemSeveritiesPreferencePage_title;
public static String ProblemSeveritiesConfigurationBlock_needsbuild_title;
public static String ProblemSeveritiesConfigurationBlock_needsfullbuild_message;
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.properties 2007-03-13 20:30:12 UTC (rev 2159)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/PreferencesMessages.properties 2007-03-14 08:16:07 UTC (rev 2160)
@@ -129,6 +129,7 @@
RubyEditorPreferencePage_closeBrackets= (Parentheses) and [square] brac&kets
RubyEditorPreferencePage_closeBraces= {B&races}
RubyEditorPreferencePage_endStatements='class', 'module', 'def' and blocks ('... do') with 'end'
+RubyEditorPreferencePage_smartHomeEnd= &Smart caret positioning at line start and end
SmartTypingConfigurationBlock_autoclose_title=Automatically close
SmartTypingConfigurationBlock_annotationReporting_link=Also see the <a href="org.eclipse.ui.editors.preferencePages.Spelling">spell checking</a> preferences.
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/RubyEditorAppearanceConfigurationBlock.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/RubyEditorAppearanceConfigurationBlock.java 2007-03-13 20:30:12 UTC (rev 2159)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/RubyEditorAppearanceConfigurationBlock.java 2007-03-14 08:16:07 UTC (rev 2160)
@@ -74,6 +74,7 @@
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_MATCHING_BRACKETS));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS));
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PreferenceConstants.EDITOR_SMART_HOME_END));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND));
@@ -189,6 +190,9 @@
String label;
+ label= PreferencesMessages.RubyEditorPreferencePage_smartHomeEnd;
+ addCheckBox(appearanceComposite, label, PreferenceConstants.EDITOR_SMART_HOME_END, 0);
+
label= PreferencesMessages.RubyEditorPreferencePage_analyseAnnotationsWhileTyping;
addCheckBox(appearanceComposite, label, PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS, 0);
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java 2007-03-13 20:30:12 UTC (rev 2159)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java 2007-03-14 08:16:07 UTC (rev 2160)
@@ -15,6 +15,7 @@
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.rubypeople.rdt.core.ILoadpathEntry;
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.internal.ui.RubyPlugin;
@@ -568,6 +569,16 @@
public final static String EDITOR_END_STATEMENTS = "endStatements"; //$NON-NLS-1$
/**
+ * A named preference that controls whether the 'smart home-end' feature is
+ * enabled.
+ * <p>
+ * Value is of type <code>Boolean</code>.
+ * </p>
+ * @since 2.1
+ */
+ public final static String EDITOR_SMART_HOME_END= AbstractTextEditor.PREFERENCE_NAVIGATION_SMART_HOME_END;
+
+ /**
* A named preference that controls whether occurrences are marked in the
* editor.
* <p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|