|
From: Zach D. <zd...@us...> - 2005-07-12 00:05:12
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12456/src/org/rubypeople/rdt/ui Modified Files: RubyElementLabelProvider.java Log Message: Changes to fix rdt bug 959808. Index: RubyElementLabelProvider.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/RubyElementLabelProvider.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RubyElementLabelProvider.java 12 Mar 2005 15:32:34 -0000 1.4 --- RubyElementLabelProvider.java 12 Jul 2005 00:05:03 -0000 1.5 *************** *** 30,33 **** --- 30,44 ---- if (rubyElement.isType(IRubyElement.LOCAL_VAR)) return RubyPluginImages.get(RubyPluginImages.IMG_CTOOLS_RUBY_LOCAL_VAR); if (rubyElement.isType(IRubyElement.IMPORT)) return RubyPluginImages.get(RubyPluginImages.IMG_CTOOLS_RUBY_IMPORT); + if (rubyElement.isType(IRubyElement.SINGLETON_METHOD)) { + IMethod method = (IMethod) rubyElement; + try { + if (method.getVisibility() == IMethod.PUBLIC) { return RubyPluginImages.get(RubyPluginImages.IMG_CTOOLS_RUBY_SINGLETONMETHOD_PUB); } + if (method.getVisibility() == IMethod.PROTECTED) { return RubyPluginImages.get(RubyPluginImages.IMG_CTOOLS_RUBY_SINGLETONMETHOD_PRO); } + } catch (RubyModelException e) { + RubyPlugin.log(e); + } + // assume it's private + return RubyPluginImages.get(RubyPluginImages.IMG_CTOOLS_RUBY_SINGLETONMETHOD); + } if (rubyElement.isType(IRubyElement.METHOD)) { IMethod method = (IMethod) rubyElement; |