|
From: <caw...@us...> - 2007-07-09 14:17:17
|
Revision: 2730
http://svn.sourceforge.net/rubyeclipse/?rev=2730&view=rev
Author: cawilliams
Date: 2007-07-09 07:17:15 -0700 (Mon, 09 Jul 2007)
Log Message:
-----------
fix #5057 - Hide local types doesn't seem to work
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.properties
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/viewsupport/MemberFilter.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/actions/ActionMessages.properties
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.properties 2007-07-09 13:54:27 UTC (rev 2729)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/actions/ActionMessages.properties 2007-07-09 14:17:15 UTC (rev 2730)
@@ -33,17 +33,17 @@
MemberFilterActionGroup_hide_fields_tooltip=Hide Fields
MemberFilterActionGroup_hide_fields_description=Toggles the visibility of fields
-MemberFilterActionGroup_hide_static_label=Hide &Static Fields and Methods
-MemberFilterActionGroup_hide_static_tooltip=Hide Static Fields and Methods
-MemberFilterActionGroup_hide_static_description=Toggles the visibility of static fields and methods
+MemberFilterActionGroup_hide_static_label=Hide Class-level Fields and Methods
+MemberFilterActionGroup_hide_static_tooltip=Hide Class-level Fields and Methods
+MemberFilterActionGroup_hide_static_description=Toggles the visibility of class-level fields and methods
MemberFilterActionGroup_hide_nonpublic_label=Hide Non-&Public Members
MemberFilterActionGroup_hide_nonpublic_tooltip=Hide Non-Public Members
MemberFilterActionGroup_hide_nonpublic_description=Toggles the visibility of non-public members
-MemberFilterActionGroup_hide_localtypes_label=Hide Local &Types
-MemberFilterActionGroup_hide_localtypes_tooltip=Hide Local Types
-MemberFilterActionGroup_hide_localtypes_description=Toggles the visibility of local types
+MemberFilterActionGroup_hide_localtypes_label=Hide Local Variables
+MemberFilterActionGroup_hide_localtypes_tooltip=Hide Local Variables
+MemberFilterActionGroup_hide_localtypes_description=Toggles the visibility of local and dynamic variables
ToggleLinkingAction_label=Lin&k With Editor
ToggleLinkingAction_tooltip=Link with Editor
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/viewsupport/MemberFilter.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/viewsupport/MemberFilter.java 2007-07-09 13:54:27 UTC (rev 2729)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/viewsupport/MemberFilter.java 2007-07-09 14:17:15 UTC (rev 2730)
@@ -16,7 +16,6 @@
import org.rubypeople.rdt.core.IMember;
import org.rubypeople.rdt.core.IMethod;
import org.rubypeople.rdt.core.IRubyElement;
-import org.rubypeople.rdt.core.IType;
import org.rubypeople.rdt.core.RubyModelException;
/**
@@ -84,25 +83,9 @@
}
if (hasFilter(FILTER_STATIC) && method.isSingleton()) { return false; }
}
- if (hasFilter(FILTER_LOCALTYPES) && memberType == IRubyElement.TYPE
- && isLocalType((IType) member)) { return false; }
-
- if (member.getElementName().startsWith("<")) { // filter out
- // <clinit>
- // //$NON-NLS-1$
- return false;
- }
+ if (hasFilter(FILTER_LOCALTYPES) &&
+ (memberType == IRubyElement.LOCAL_VARIABLE || memberType == IRubyElement.DYNAMIC_VAR)) { return false; }
}
return true;
}
-
- private boolean isLocalType(IType type) {
- IRubyElement parent = type.getParent();
- return parent instanceof IMember && !(parent instanceof IType);
- }
-
- private boolean isTopLevelType(IMember member) {
- IType parent = member.getDeclaringType();
- return parent == null;
- }
}
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-07-09 13:54:27 UTC (rev 2729)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/PreferenceConstants.java 2007-07-09 14:17:15 UTC (rev 2730)
@@ -818,6 +818,8 @@
store.setDefault(PreferenceConstants.APPEARANCE_MEMBER_SORT_ORDER, "T,SF,SM,F,C,M"); //$NON-NLS-1$
store.setDefault(PreferenceConstants.APPEARANCE_VISIBILITY_SORT_ORDER, "B,V,R"); //$NON-NLS-1$
store.setDefault(PreferenceConstants.APPEARANCE_ENABLE_VISIBILITY_SORT_ORDER, false);
+
+ store.setDefault("MemberFilterActionGroup.org.rubypeople.rdt.ui.RubyOutlinePage.4", true);
// AppearancePreferencePage
store.setDefault(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES, false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|