Author: scabanovich
Date: 2011-07-29 16:06:57 -0400 (Fri, 29 Jul 2011)
New Revision: 33364
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/impl/LocalizedValue.java
Log:
FileSystemsHelper.getFile(object) method used.
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/impl/LocalizedValue.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/impl/LocalizedValue.java 2011-07-29
19:36:55 UTC (rev 33363)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/impl/LocalizedValue.java 2011-07-29
20:06:57 UTC (rev 33364)
@@ -12,6 +12,7 @@
import org.jboss.tools.cdi.seam.core.international.ILocalizedValue;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
/**
*
@@ -42,8 +43,7 @@
}
public static String getLocale(XModelObject object) {
- XModelObject p = object;
- while(p != null && p.getFileType() < XModelObject.FILE) p = p.getParent();
+ XModelObject p = FileSystemsHelper.getFile(object);
if(p != null) {
String n = p.getAttributeValue("name");
int i = n.indexOf('_');
Show replies by date