|
From: David C. <dc...@us...> - 2005-09-04 17:39:49
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19333/src/org/rubypeople/rdt/core Modified Files: RubyCore.java Log Message: Improved auto-upgrade of projects to check for newly opened projects. Index: RubyCore.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/RubyCore.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RubyCore.java 3 Sep 2005 19:05:02 -0000 1.10 --- RubyCore.java 4 Sep 2005 17:39:11 -0000 1.11 *************** *** 193,198 **** IProject[] projects = RubyCore.getRubyProjects(); for (int i = 0; i < projects.length; i++) { ! IRubyProject rubyProject = RubyModelManager.getRubyModelManager().getRubyModel().getRubyProject(projects[i]); ! if (rubyProject.upgrade()) { projectUpgraded = true; } --- 193,197 ---- IProject[] projects = RubyCore.getRubyProjects(); for (int i = 0; i < projects.length; i++) { ! if (upgradeOldProject(projects[i])) { projectUpgraded = true; } *************** *** 201,204 **** --- 200,210 ---- } + public static boolean upgradeOldProject(IProject project) throws CoreException { + IRubyProject rubyProject = RubyModelManager.getRubyModelManager().getRubyModel().getRubyProject(project); + if (rubyProject != null) + return rubyProject.upgrade(); + return false; + } + /* * Initializes the default preferences settings for this plug-in. |