Author: jleroux
Date: Wed Sep 7 09:50:54 2016
New Revision: 1759573
URL:
http://svn.apache.org/viewvc?rev=1759573&view=revLog:
After an exchange with Jacopo on dev ML, removes the need for the webtools.properties file
Removed:
ofbiz/trunk/framework/webtools/config/webtools.properties
Modified:
ofbiz/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelReferences.java
Modified: ofbiz/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelReferences.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelReferences.java?rev=1759573&r1=1759572&r2=1759573&view=diff==============================================================================
--- ofbiz/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelReferences.java (original)
+++ ofbiz/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelReferences.java Wed Sep 7 09:50:54 2016
@@ -36,7 +36,6 @@ import org.apache.ofbiz.base.component.C
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.FileUtil;
import org.apache.ofbiz.base.util.UtilFormatOut;
-import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.base.util.UtilXml;
import org.apache.ofbiz.entity.Delegator;
@@ -60,7 +59,7 @@ public class LabelReferences {
private static final String uiLabelMap = "uiLabelMap.";
private static final String formFieldTitle = "FormFieldTitle_";
private static final String getMessage = "UtilProperties.getMessage(";
- private static final String getResourceRegex = UtilProperties.getPropertyValue("webtools", "getResourceRegex");
+ private static final String getResourceRegex = "ServiceUtil\\.getResource\\(\\)";
private static final String getResource = "ServiceUtil.getResource ";
protected Map<String, Map<String, Integer>> references = new TreeMap<String, Map<String, Integer>>();
@@ -185,6 +184,8 @@ public class LabelReferences {
for (String rootFolder : this.rootFolders) {
List<File> javaFiles = FileUtil.findFiles("java", rootFolder + "src", null, null);
for (File javaFile : javaFiles) {
+ // do not parse this file, else issue with getResourceRegex
+ if ("LabelReferences.java".equals(javaFile.getName())) continue;
String inFile = FileUtil.readString("UTF-8", javaFile);
inFile = inFile.replaceAll(getResourceRegex, getResource);
int pos = inFile.indexOf(getMessage);