All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bndtools.editor.model.BndProject Maven / Gradle / Ivy

The newest version!
package bndtools.editor.model;

import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;

import org.bndtools.api.BndProjectResource;
import org.bndtools.api.IBndProject;
import org.eclipse.core.resources.IProject;

public class BndProject implements IBndProject {

	private final IProject					project;

	private Map	resources;

	public BndProject(IProject project) {
		this.project = project;
	}

	@Override
	public String getProjectName() {
		return project.getName();
	}

	@Override
	public void addResource(String fullPath, BndProjectResource bndProjectResource) {
		if (resources == null) {
			resources = new LinkedHashMap<>();
		}
		resources.put(fullPath, bndProjectResource);
	}

	public Map getResources() {
		if (resources == null) {
			return Collections.emptyMap();
		}
		return resources;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy