Refactor Argeo APIs
[gpl/argeo-suite.git] / swt / org.argeo.app.ui / src / org / argeo / app / ui / SuiteUiUtils.java
index 77d98b8e3bb55e7e5c5c752bf53acb7cc7a2f02c..f5cfba5873fc63e124b665bc95f51ad98a1348bc 100644 (file)
@@ -13,13 +13,13 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
 import org.apache.commons.io.IOUtils;
+import org.argeo.api.app.EntityNames;
+import org.argeo.api.app.EntityType;
 import org.argeo.api.cms.ux.CmsEditable;
 import org.argeo.api.cms.ux.CmsStyle;
-import org.argeo.app.api.EntityNames;
-import org.argeo.app.api.EntityType;
 import org.argeo.app.swt.ux.SuiteSwtUtils;
-import org.argeo.app.swt.ux.SwtArgeoApp;
 import org.argeo.app.ux.SuiteUxEvent;
+import org.argeo.cms.acr.ContentUtils;
 import org.argeo.cms.jcr.acr.JcrContent;
 import org.argeo.cms.swt.CmsSwtUtils;
 import org.argeo.cms.swt.dialogs.LightweightDialog;
@@ -221,8 +221,7 @@ public class SuiteUiUtils {
        }
 
        public static String toLink(Node node) {
-               return node != null ? "#" + CmsSwtUtils.cleanPathForUrl(SwtArgeoApp.nodeToState(JcrContent.nodeToContent(node)))
-                               : null;
+               return node != null ? "#" + ContentUtils.cleanPathForUrl(JcrContent.nodeToContent(node).getPath()) : null;
        }
 
        public static Control addLink(Composite parent, String label, Node node, CmsStyle style)