mail[Wesnoth-commits] r43911 - /trunk/utils/java/eclipse_plugin/src/wesnoth_eclipse_plugin/utils/WorkspaceUtils.java


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by timotei_cluj on July 04, 2010 - 22:25:
Author: timotei
Date: Sun Jul  4 22:25:39 2010
New Revision: 43911

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43911&view=rev
Log:
eclipse plugin: the "user addons" project doesn't need to be converted

Modified:
    
trunk/utils/java/eclipse_plugin/src/wesnoth_eclipse_plugin/utils/WorkspaceUtils.java

Modified: 
trunk/utils/java/eclipse_plugin/src/wesnoth_eclipse_plugin/utils/WorkspaceUtils.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/java/eclipse_plugin/src/wesnoth_eclipse_plugin/utils/WorkspaceUtils.java?rev=43911&r1=43910&r2=43911&view=diff
==============================================================================
--- 
trunk/utils/java/eclipse_plugin/src/wesnoth_eclipse_plugin/utils/WorkspaceUtils.java
 (original)
+++ 
trunk/utils/java/eclipse_plugin/src/wesnoth_eclipse_plugin/utils/WorkspaceUtils.java
 Sun Jul  4 22:25:39 2010
@@ -5,6 +5,7 @@
 
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Locale;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
@@ -120,8 +121,11 @@
         */
        public static String getPathRelativeToUserDir(IResource resource)
        {
-               return 
PreferenceInitializer.getString(PreferenceConstants.P_WESNOTH_USER_DIR) + 
Path.SEPARATOR + "data/add-ons/" + resource.getProject().getName()
-                               + Path.SEPARATOR + 
resource.getProjectRelativePath().toOSString();
+               String result = 
PreferenceInitializer.getString(PreferenceConstants.P_WESNOTH_USER_DIR) + 
Path.SEPARATOR + "data/add-ons/";
+               if (!resource.getProject().getName().toLowerCase(new 
Locale("English")).equals("user addons"))
+                       result += (resource.getProject().getName() + 
Path.SEPARATOR);
+               result += resource.getProjectRelativePath().toOSString();
+               return result;
        }
 
        public static void setupWorkspace()




Related Messages


Powered by MHonArc, Updated Sun Jul 04 22:40:06 2010