From fa3ef281f77b9006aec8825e4a56840d78cff64f Mon Sep 17 00:00:00 2001 From: Bruno Sinou Date: Fri, 16 Nov 2012 08:59:29 +0000 Subject: [PATCH 1/1] + git-svn-id: https://svn.argeo.org/slc/trunk@5848 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../org/argeo/slc/client/ui/views/JcrResultTreeView.java | 9 +++++---- .../slc/client/ui/wizards/ConfirmOverwriteWizard.java | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultTreeView.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultTreeView.java index a830c9b96..152e15c6e 100644 --- a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultTreeView.java +++ b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/views/JcrResultTreeView.java @@ -32,8 +32,6 @@ import javax.jcr.observation.Event; import javax.jcr.observation.EventListener; import javax.jcr.observation.ObservationManager; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.argeo.ArgeoException; import org.argeo.eclipse.ui.jcr.AsyncUiEventListener; import org.argeo.eclipse.ui.utils.CommandUtils; @@ -103,7 +101,8 @@ import org.eclipse.ui.part.ViewPart; public class JcrResultTreeView extends ViewPart { public final static String ID = ClientUiPlugin.ID + ".jcrResultTreeView"; - private final static Log log = LogFactory.getLog(JcrResultTreeView.class); + // private final static Log log = + // LogFactory.getLog(JcrResultTreeView.class); /* DEPENDENCY INJECTION */ private Session session; @@ -619,7 +618,9 @@ public class JcrResultTreeView extends ViewPart { if (isResultFolder) { source = ((ParentNodeFolder) lastSelectedSourceElement) .getNode(); - if (tpNode.getPath().startsWith(source.getPath())) + if (tpNode.getPath().startsWith(source.getPath()) + || source.getParent().getPath() + .equals(tpNode.getPath())) doit = false; } else if (lastSelectedSourceElement instanceof SingleResultNode) { source = ((SingleResultNode) lastSelectedSourceElement) diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/wizards/ConfirmOverwriteWizard.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/wizards/ConfirmOverwriteWizard.java index f83b77b17..3fa15f9bf 100644 --- a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/wizards/ConfirmOverwriteWizard.java +++ b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/wizards/ConfirmOverwriteWizard.java @@ -91,8 +91,8 @@ public class ConfirmOverwriteWizard extends Wizard { if (overwriteBtn.getSelection()) doFinish = MessageDialog.openConfirm(Display.getDefault() .getActiveShell(), "CAUTION", "All data contained in [" - + (parentRelPath !=null?parentRelPath:"") - + sourceNodeName + + (parentRelPath != null ? parentRelPath : "") + + "/"+ sourceNodeName + "] are about to be definitively destroyed. \n " + "Are you sure you want to proceed ?"); else @@ -124,7 +124,7 @@ public class ConfirmOverwriteWizard extends Wizard { if (relPath.startsWith(basePath)) relPath = relPath.substring(basePath.length()); // FIXME currently add the default base label - parentRelPath = SlcUiConstants.DEFAULT_MY_RESULTS_FOLDER_LABEL + "/" + parentRelPath = SlcUiConstants.DEFAULT_MY_RESULTS_FOLDER_LABEL + relPath; } catch (RepositoryException e) { throw new SlcException("Unexpected error while defining " @@ -223,4 +223,4 @@ public class ConfirmOverwriteWizard extends Wizard { } } } -} +} \ No newline at end of file -- 2.39.2