Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Delaigue2015-05-07 13:06:43 +0000
committerLaurent Delaigue2015-05-13 15:11:02 +0000
commit9e02ec37c07b9c9701ba362b30f70d04f725e5da (patch)
treecbe28fb0af017def2549bcafa93d40f93cf123be /plugins
parent0cf8ab7ba583c0f95f07ce476f4b1255e52f28b9 (diff)
downloadorg.eclipse.emf.compare-9e02ec37c07b9c9701ba362b30f70d04f725e5da.tar.gz
org.eclipse.emf.compare-9e02ec37c07b9c9701ba362b30f70d04f725e5da.tar.xz
org.eclipse.emf.compare-9e02ec37c07b9c9701ba362b30f70d04f725e5da.zip
Added logs.
Change-Id: I30c2e196a8418b5b063cc87f12d7577bade03600 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java12
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java8
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyRemoteResolver.java7
3 files changed, 21 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java
index 770fff707..bcde040fd 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFModelProvider.java
@@ -104,8 +104,8 @@ public class EMFModelProvider extends ModelProvider {
@Override
public ResourceMapping[] getMappings(IResource resource, ResourceMappingContext context,
IProgressMonitor monitor) throws CoreException {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("getMappings() - START"); //$NON-NLS-1$
+ if (LOGGER.isInfoEnabled()) {
+ LOGGER.info("getMappings() - START for " + resource); //$NON-NLS-1$
}
if (resource instanceof IFile) {
try {
@@ -114,8 +114,8 @@ public class EMFModelProvider extends ModelProvider {
if (syncModel != null) {
final ResourceMapping mapping = new EMFResourceMapping(resource, context, syncModel,
PROVIDER_ID);
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("getMappings() - FINISH NORMALLY"); //$NON-NLS-1$
+ if (LOGGER.isInfoEnabled()) {
+ LOGGER.info("getMappings() - FINISH NORMALLY"); //$NON-NLS-1$
}
return new ResourceMapping[] {mapping, };
} else {
@@ -126,8 +126,8 @@ public class EMFModelProvider extends ModelProvider {
// fall back to super
}
}
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("getMappings() - FINISH ABNORMALLY"); //$NON-NLS-1$
+ if (LOGGER.isInfoEnabled()) {
+ LOGGER.info("getMappings() - fallback to super."); //$NON-NLS-1$
}
return super.getMappings(resource, context, monitor);
}
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java
index d6a716d26..4e4e9f122 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java
@@ -26,6 +26,7 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
+import org.apache.log4j.Logger;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -44,6 +45,9 @@ import org.eclipse.emf.ecore.resource.Resource;
* @author <a href="mailto:laurent.delaigue@obeo.fr">Laurent Delaigue</a>
*/
public class ResourceDependencyLocalResolver implements IResourceDependencyLocalResolver {
+ /** The logger. */
+ private static final Logger LOGGER = Logger.getLogger(ResourceDependencyLocalResolver.class);
+
/** The scheduler. */
private final ResourceComputationScheduler<URI> scheduler;
@@ -235,6 +239,10 @@ public class ResourceDependencyLocalResolver implements IResourceDependencyLocal
public void updateDependencies(IProgressMonitor monitor, final DiagnosticSupport diagnostic,
IFile... files) throws InterruptedException {
final ThreadSafeProgressMonitor tspm = new ThreadSafeProgressMonitor(monitor);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("INSTANTIATING SynchronizedResourceSet to update dependencies with " //$NON-NLS-1$
+ + files.length + " files"); //$NON-NLS-1$
+ }
final SynchronizedResourceSet resourceSet = new SynchronizedResourceSet(
new LocalMonitoredProxyCreationListener(tspm, eventBus, this, diagnostic));
Iterable<IFile> filesToResolve = Iterables.filter(Arrays.asList(files), new Predicate<IFile>() {
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyRemoteResolver.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyRemoteResolver.java
index 8ae455993..60dabd8f1 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyRemoteResolver.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyRemoteResolver.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.compare.ide.ui.internal.logical.resolver;
import com.google.common.util.concurrent.FutureCallback;
+import org.apache.log4j.Logger;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.compare.ide.ui.internal.util.ThreadSafeProgressMonitor;
@@ -23,6 +24,9 @@ import org.eclipse.emf.compare.ide.ui.internal.util.ThreadSafeProgressMonitor;
* @author <a href="mailto:laurent.delaigue@obeo.fr">Laurent Delaigue</a>
*/
public class ResourceDependencyRemoteResolver implements IResourceDependencyRemoteResolver {
+ /** The logger. */
+ private static final Logger LOGGER = Logger.getLogger(ResourceDependencyLocalResolver.class);
+
/** The scheduler. */
protected final ResourceComputationScheduler<URI> scheduler;
@@ -77,6 +81,9 @@ public class ResourceDependencyRemoteResolver implements IResourceDependencyRemo
public SynchronizedResourceSet getResourceSetForRemoteResolution(DiagnosticSupport diagnostic,
ThreadSafeProgressMonitor tspm) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("INSTANTIATING SynchronizedResourceSet for remote resolution."); //$NON-NLS-1$
+ }
final SynchronizedResourceSet resourceSet = new SynchronizedResourceSet(
new RemoteMonitoredProxyCreationListener(tspm, this, diagnostic));
return resourceSet;

Back to the top