Author: timotei
Date: Mon Aug  8 23:24:05 2011
New Revision: 50651

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50651&view=rev
Log:
eclipse plugin: Don't load the cache before setting
the installName so we won't trigger an invalid
paths context

Modified:
    trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectUtils.java

Modified: 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectUtils.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectUtils.java?rev=50651&r1=50650&r2=50651&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectUtils.java 
(original)
+++ trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/projects/ProjectUtils.java 
Mon Aug  8 23:24:05 2011
@@ -1,6 +1,6 @@
 
/*******************************************************************************
  * Copyright (c) 2010 - 2011 by Timotei Dolean <[email protected]>
- *
+ * 
  * This program and the accompanying materials are made available
  * under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,7 +45,7 @@
 
     /**
      * Gets the properties map for this project.
-     *
+     * 
      * @return A map with properties of the project
      */
     public static Map< String, String > getPropertiesForProject(
@@ -56,7 +56,7 @@
 
     /**
      * Gets the cache for the specified project
-     *
+     * 
      * @param project
      * @return
      */
@@ -75,13 +75,13 @@
     /**
      * Creates a new wesnoth project with the specified name
      * and on the specified location on disk
-     *
+     * 
      * @param name
-     *            The name of the new project
+     *        The name of the new project
      * @param location
-     *            The location of the new project
+     *        The location of the new project
      * @param installName
-     *            The name of the install this project belongs to
+     *        The name of the install this project belongs to
      * @return A project handle
      * @throws CoreException
      */
@@ -109,15 +109,15 @@
      * Creates a project that has associated the wesnoth nature using
      * the specified handle. If the project is created there will be
      * no modifications done by this method.
-     *
+     * 
      * @param handle
-     *            the handle to the project
+     *        the handle to the project
      * @param description
-     *            the default description used when the project is created
+     *        the default description used when the project is created
      * @param installName
-     *            The name of the install this project belongs to
+     *        The name of the install this project belongs to
      * @param monitor
-     *            the monitor will do a 30 worked amount in the method
+     *        the monitor will do a 30 worked amount in the method
      * @throws CoreException
      */
     public static int createWesnothProject( IProject handle,
@@ -201,7 +201,10 @@
             monitor.worked( 10 );
 
             // save the install name
-            getCacheForProject( handle ).setInstallName( installName );
+            ProjectCache cache = new ProjectCache( handle );
+            cache.setInstallName( installName );
+            cache.loadCache( );
+            projectCache_.put( handle, cache );
         } catch( CoreException e ) {
             Logger.getInstance( ).logException( e );
             return 1;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to