Author: scabanovich
Date: 2011-08-02 20:25:59 -0400 (Tue, 02 Aug 2011)
New Revision: 33484
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/WebRedirectHandler.java
Log:
FileSystemsHelper.getFile(object) method used.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/WebRedirectHandler.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/WebRedirectHandler.java 2011-08-03
00:16:02 UTC (rev 33483)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/WebRedirectHandler.java 2011-08-03
00:25:59 UTC (rev 33484)
@@ -9,6 +9,7 @@
import org.jboss.tools.common.meta.action.impl.XActionImpl;
import org.jboss.tools.common.meta.action.impl.handlers.DefaultRedirectHandler;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.filesystems.XFileObject;
import org.jboss.tools.jst.web.model.ReferenceObject;
@@ -72,8 +73,7 @@
private boolean checkConfigVersion(XModelObject object) {
String entity = action.getProperty("configEntity"); //$NON-NLS-1$
if(entity == null) return true;
- XModelObject f = object;
- while(f != null && f.getFileType() != XFileObject.FILE) f =
f.getParent();
+ XModelObject f = FileSystemsHelper.getFile(object);
if(f == null) return true;
boolean b = f.getModelEntity().getName().equals(entity);
if(b) return true;
Show replies by date