|
From: Christopher W. <caw...@us...> - 2006-02-17 20:38:57
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7988/src/org/rubypeople/rdt/ui/wizards Modified Files: RubyNewClassWizard.java Log Message: don't append "< Object" when superclass is Object. Create indent the "right" way - use set options Index: RubyNewClassWizard.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/RubyNewClassWizard.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RubyNewClassWizard.java 31 Jan 2006 20:29:53 -0000 1.1 --- RubyNewClassWizard.java 17 Feb 2006 20:38:53 -0000 1.2 *************** *** 28,31 **** --- 28,33 ---- import org.eclipse.ui.PlatformUI; import org.eclipse.ui.ide.IDE; + import org.rubypeople.rdt.core.RubyCore; + import org.rubypeople.rdt.core.formatter.Indents; import org.rubypeople.rdt.internal.ui.RubyPlugin; import org.rubypeople.rdt.internal.ui.RubyPluginImages; *************** *** 177,185 **** contents.append("class "); contents.append(className); ! if (superclassName != null && superclassName != "Object") { contents.append(" < "); contents.append(superclassName); } ! contents.append("\n \nend\n"); return new ByteArrayInputStream(contents.toString().getBytes()); } --- 179,189 ---- contents.append("class "); contents.append(className); ! if (superclassName != null && !superclassName.equals("Object")) { contents.append(" < "); contents.append(superclassName); } ! contents.append("\n"); ! contents.append(Indents.createIndentString(1, RubyCore.getOptions())); ! contents.append("\nend\n"); return new ByteArrayInputStream(contents.toString().getBytes()); } |