Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-07-25 16:06:05 +0000
committerAlexander Kurtakov2017-07-25 16:06:05 +0000
commita5e1a790fce0ff0a0f9f166694b1e56324b185f4 (patch)
tree48b728800254c949c579df27f3f090bb1c24e8ad /bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java
parent3734ce46345e063654bf3bdc0ff6a3096bc0d501 (diff)
downloadeclipse.platform.team-a5e1a790fce0ff0a0f9f166694b1e56324b185f4.tar.gz
eclipse.platform.team-a5e1a790fce0ff0a0f9f166694b1e56324b185f4.tar.xz
eclipse.platform.team-a5e1a790fce0ff0a0f9f166694b1e56324b185f4.zip
Take 2: * Generify. * Replace non-javadoc with @Override * Convert to lambdas Change-Id: Ia44170d3e752ad6513f007964463692e1cc6288e Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java')
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java
index 3be397a49..c193f3bf6 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/RootResourceSynchronizationScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,6 +29,7 @@ public class RootResourceSynchronizationScope extends AbstractResourceMappingSco
this.roots = roots;
}
+ @Override
public ResourceTraversal[] getTraversals() {
return new ResourceTraversal[] {new ResourceTraversal(roots, IResource.DEPTH_INFINITE, IResource.NONE)};
}
@@ -43,26 +44,30 @@ public class RootResourceSynchronizationScope extends AbstractResourceMappingSco
fireTraversalsChangedEvent(getTraversals(), getMappings());
}
+ @Override
public ResourceMapping[] getInputMappings() {
return getMappings();
}
+ @Override
public ISynchronizationScope asInputScope() {
return this;
}
+ @Override
public ResourceMapping[] getMappings() {
- List result = new ArrayList();
+ List<ResourceMapping> result = new ArrayList<>();
for (int i = 0; i < roots.length; i++) {
IResource resource = roots[i];
Object o = resource.getAdapter(ResourceMapping.class);
if (o instanceof ResourceMapping) {
- result.add(o);
+ result.add((ResourceMapping) o);
}
}
- return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
+ return result.toArray(new ResourceMapping[result.size()]);
}
+ @Override
public ResourceTraversal[] getTraversals(ResourceMapping mapping) {
Object object = mapping.getModelObject();
if (object instanceof IResource) {
@@ -72,22 +77,27 @@ public class RootResourceSynchronizationScope extends AbstractResourceMappingSco
return null;
}
+ @Override
public boolean hasAdditionalMappings() {
return false;
}
+ @Override
public boolean hasAdditonalResources() {
return false;
}
+ @Override
public IProject[] getProjects() {
return ResourcesPlugin.getWorkspace().getRoot().getProjects();
}
+ @Override
public ResourceMappingContext getContext() {
return ResourceMappingContext.LOCAL_CONTEXT;
}
+ @Override
public void refresh(ResourceMapping[] mappings) {
// Not supported
}

Back to the top