|
From: <jas...@us...> - 2006-07-27 22:40:34
|
Revision: 1549 Author: jasonpmorrison Date: 2006-07-27 15:40:25 -0700 (Thu, 27 Jul 2006) ViewCVS: http://svn.sourceforge.net/rubyeclipse/?rev=1549&view=rev Log Message: ----------- * Cleaning up Mark Occurrences * Ensure it doesn't return dupes * Cut down on getName() cast+calls with reflectivelyGetName() * Culled the prefs page Modified Paths: -------------- branches/type_inferrence/trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/MarkOccurrencesConfigurationBlock.java branches/type_inferrence/trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyAbstractEditor.java Modified: branches/type_inferrence/trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/MarkOccurrencesConfigurationBlock.java =================================================================== --- branches/type_inferrence/trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/MarkOccurrencesConfigurationBlock.java 2006-07-27 22:40:16 UTC (rev 1548) +++ branches/type_inferrence/trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/MarkOccurrencesConfigurationBlock.java 2006-07-27 22:40:25 UTC (rev 1549) @@ -108,25 +108,25 @@ Button slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_TYPE_OCCURRENCES, 0); createDependency(master, PreferenceConstants.EDITOR_STICKY_OCCURRENCES, slave); - label= PreferencesMessages.MarkOccurrencesConfigurationBlock_markMethodOccurrences; - slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_METHOD_OCCURRENCES, 0); - createDependency(master, PreferenceConstants.EDITOR_MARK_METHOD_OCCURRENCES, slave); +// label= PreferencesMessages.MarkOccurrencesConfigurationBlock_markMethodOccurrences; +// slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_METHOD_OCCURRENCES, 0); +// createDependency(master, PreferenceConstants.EDITOR_MARK_METHOD_OCCURRENCES, slave); label= PreferencesMessages.MarkOccurrencesConfigurationBlock_markConstantOccurrences; slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_CONSTANT_OCCURRENCES, 0); createDependency(master, PreferenceConstants.EDITOR_MARK_CONSTANT_OCCURRENCES, slave); - label= PreferencesMessages.MarkOccurrencesConfigurationBlock_markFieldOccurrences; - slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_FIELD_OCCURRENCES, 0); - createDependency(master, PreferenceConstants.EDITOR_MARK_FIELD_OCCURRENCES, slave); +// label= PreferencesMessages.MarkOccurrencesConfigurationBlock_markFieldOccurrences; +// slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_FIELD_OCCURRENCES, 0); +// createDependency(master, PreferenceConstants.EDITOR_MARK_FIELD_OCCURRENCES, slave); label= PreferencesMessages.MarkOccurrencesConfigurationBlock_markLocalVariableOccurrences; slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_LOCAL_VARIABLE_OCCURRENCES, 0); createDependency(master, PreferenceConstants.EDITOR_MARK_LOCAL_VARIABLE_OCCURRENCES, slave); - label= PreferencesMessages.MarkOccurrencesConfigurationBlock_markMethodExitPoints; - slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS, 0); - createDependency(master, PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS, slave); +// label= PreferencesMessages.MarkOccurrencesConfigurationBlock_markMethodExitPoints; +// slave= addCheckBox(composite, label, PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS, 0); +// createDependency(master, PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS, slave); addFiller(composite); Modified: branches/type_inferrence/trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyAbstractEditor.java =================================================================== --- branches/type_inferrence/trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyAbstractEditor.java 2006-07-27 22:40:16 UTC (rev 1548) +++ branches/type_inferrence/trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyAbstractEditor.java 2006-07-27 22:40:25 UTC (rev 1549) @@ -174,7 +174,7 @@ * Only valid if {@link #fMarkOccurrenceAnnotations} is <code>true</code>. * @since 3.0 */ - private boolean fMarkLocalVariableypeOccurrences; + private boolean fMarkLocalVariableOccurrences; /** * Tells whether to mark method exits in this editor. * Only valid if {@link #fMarkOccurrenceAnnotations} is <code>true</code>. @@ -280,13 +280,13 @@ RubyTextTools textTools= RubyPlugin.getDefault().getRubyTextTools(); setSourceViewerConfiguration(new RubySourceViewerConfiguration(textTools.getColorManager(), store, this, IRubyPartitions.RUBY_PARTITIONING)); fMarkOccurrenceAnnotations= store.getBoolean(PreferenceConstants.EDITOR_MARK_OCCURRENCES); - fStickyOccurrenceAnnotations= store.getBoolean(PreferenceConstants.EDITOR_STICKY_OCCURRENCES); - fMarkTypeOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_TYPE_OCCURRENCES); - fMarkMethodOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_METHOD_OCCURRENCES); - fMarkConstantOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_CONSTANT_OCCURRENCES); - fMarkFieldOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_FIELD_OCCURRENCES); - fMarkLocalVariableypeOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_LOCAL_VARIABLE_OCCURRENCES); - fMarkMethodExitPoints= store.getBoolean(PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS); + fStickyOccurrenceAnnotations= store.getBoolean(PreferenceConstants.EDITOR_STICKY_OCCURRENCES); + fMarkTypeOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_TYPE_OCCURRENCES); + fMarkMethodOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_METHOD_OCCURRENCES); + fMarkConstantOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_CONSTANT_OCCURRENCES); + fMarkFieldOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_FIELD_OCCURRENCES); + fMarkLocalVariableOccurrences= store.getBoolean(PreferenceConstants.EDITOR_MARK_LOCAL_VARIABLE_OCCURRENCES); + fMarkMethodExitPoints= store.getBoolean(PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS); } /* @@ -399,7 +399,7 @@ return; } if (PreferenceConstants.EDITOR_MARK_LOCAL_VARIABLE_OCCURRENCES.equals(property)) { - fMarkLocalVariableypeOccurrences= newBooleanValue; + fMarkLocalVariableOccurrences= newBooleanValue; return; } if (PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS.equals(property)) { @@ -1406,7 +1406,15 @@ String source = document.get(); // Search for occurrences - fOccurrencesFinder.initialize(source, selection.getOffset(), selection.getLength()); + fOccurrencesFinder.setFMarkConstantOccurrences(fMarkConstantOccurrences); + fOccurrencesFinder.setFMarkFieldOccurrences(fMarkFieldOccurrences); + fOccurrencesFinder.setFMarkLocalVariableOccurrences(fMarkLocalVariableOccurrences); + fOccurrencesFinder.setFMarkMethodExitPoints(fMarkMethodExitPoints); + fOccurrencesFinder.setFMarkMethodOccurrences(fMarkMethodOccurrences); + fOccurrencesFinder.setFMarkOccurrenceAnnotations(fMarkOccurrenceAnnotations); + fOccurrencesFinder.setFMarkTypeOccurrences(fMarkTypeOccurrences); + fOccurrencesFinder.setFStickyOccurrenceAnnotations(fStickyOccurrenceAnnotations); + fOccurrencesFinder.initialize(source, selection.getOffset(), selection.getLength()); List<Position> matches = fOccurrencesFinder.perform(); if (matches.isEmpty()) { @@ -1431,6 +1439,11 @@ fOccurrencesFinderJob.run(new NullProgressMonitor()); } } + + protected void setMarkOccurrencePreferences(IOccurrencesFinder occurrencesFinder) + { + + } protected void installOccurrencesFinder(boolean forceUpdate) { fMarkOccurrenceAnnotations= true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |