01: /*******************************************************************************
02: * Copyright (c) 2000, 2004 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM - Initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.build;
11:
12: import java.util.*;
13: import org.eclipse.osgi.service.resolver.BundleDescription;
14:
15: public class SourceFeatureInformation implements IPDEBuildConstants {
16: // Key : a configuration
17: // Value : the list of plugins that needs to get copied into a specific config.
18: // This list will be used to build the content of the fragment that contains
19: // config specific code
20: private Map sourceFeatureInformation = new HashMap(8);
21:
22: public SourceFeatureInformation() {
23: // Initialize the content of the assembly information with the configurations
24: for (Iterator iter = AbstractScriptGenerator.getConfigInfos()
25: .iterator(); iter.hasNext();) {
26: Config config = (Config) iter.next();
27: sourceFeatureInformation.put(config, new HashSet());
28: }
29: sourceFeatureInformation.put(Config.genericConfig(),
30: new HashSet(2));
31: }
32:
33: public void addElementEntry(Config config, BundleDescription plugin) {
34: Set entry = (Set) sourceFeatureInformation.get(config);
35: entry.add(plugin);
36: }
37:
38: public Map getElementEntries() {
39: return sourceFeatureInformation;
40: }
41: }
|