blob: f591a893683023c676320a44cc0eeb4d8155c0ea [file] [log] [blame]
/*
* Copyright (c) 2014, 2015 Eike Stepper (Berlin, Germany) 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Eike Stepper - initial API and implementation
* Marc-Andre Laperle (Ericsson) - Fix for bug 457505
*/
package org.eclipse.oomph.resources;
import org.eclipse.oomph.resources.backend.BackendContainer;
import org.eclipse.core.resources.IProject;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* @author Eike Stepper
*/
public interface ProjectHandler
{
public void handleProject(IProject project, BackendContainer backendContainer);
/**
* @author Eike Stepper
*/
public static class Collector implements ProjectHandler
{
private final Map<IProject, BackendContainer> projectMap = Collections.synchronizedMap(new HashMap<IProject, BackendContainer>());
public Collector()
{
}
public void handleProject(IProject project, BackendContainer backendContainer)
{
projectMap.put(project, backendContainer);
}
public Map<IProject, BackendContainer> getProjectMap()
{
return projectMap;
}
}
}