You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2015/02/19 23:34:11 UTC
svn commit: r1661021 -
/sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ResourceChangeCommandFactory.java
Author: rombert
Date: Thu Feb 19 22:34:11 2015
New Revision: 1661021
URL: http://svn.apache.org/r1661021
Log:
SLING-3781 - Fix unstable Eclipse-based tests
When transforming a resource delete into an update, consider files as
well as folders.
Modified:
sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ResourceChangeCommandFactory.java
Modified: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ResourceChangeCommandFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ResourceChangeCommandFactory.java?rev=1661021&r1=1661020&r2=1661021&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ResourceChangeCommandFactory.java (original)
+++ sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/ResourceChangeCommandFactory.java Thu Feb 19 22:34:11 2015
@@ -543,23 +543,21 @@ public class ResourceChangeCommandFactor
String resourceLocation = getRepositoryPathForDeletedResource(resource,
ProjectUtil.getSyncDirectoryFile(resource.getProject()));
- // make sure that a 'plain' folder being deleted does not signal that the content structure
+ // verify whether a resource being deleted does not signal that the content structure
// was rearranged under a covering parent aggregate
- if (resource.getType() == IResource.FOLDER) {
- IPath serializationFilePath = Path.fromOSString(serializationManager.getSerializationFilePath(
- resourceLocation, SerializationKind.FOLDER));
+ IPath serializationFilePath = Path.fromOSString(serializationManager.getSerializationFilePath(resourceLocation,
+ SerializationKind.FOLDER));
- ResourceProxy coveringParentData = findSerializationDataFromCoveringParent(resource, syncDirectory,
- resourceLocation, serializationFilePath);
- if (coveringParentData != null) {
- Activator
- .getDefault()
- .getPluginLogger()
- .trace("Found covering resource data for resource at {0}, skipping deletion and performing an update instead",
- resource.getFullPath());
- FileInfo info = createFileInfo(resource);
- return repository.newAddOrUpdateNodeCommand(info, coveringParentData);
- }
+ ResourceProxy coveringParentData = findSerializationDataFromCoveringParent(resource, syncDirectory,
+ resourceLocation, serializationFilePath);
+ if (coveringParentData != null) {
+ Activator
+ .getDefault()
+ .getPluginLogger()
+ .trace("Found covering resource data ( repository path = {0} ) for resource at {1}, skipping deletion and performing an update instead",
+ coveringParentData.getPath(), resource.getFullPath());
+ FileInfo info = createFileInfo(resource);
+ return repository.newAddOrUpdateNodeCommand(info, coveringParentData);
}
return repository.newDeleteNodeCommand(serializationManager.getRepositoryPath(resourceLocation));