KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > build > SourceFeatureInformation


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM - Initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.internal.build;
12
13 import java.util.*;
14 import org.eclipse.osgi.service.resolver.BundleDescription;
15
16 public class SourceFeatureInformation implements IPDEBuildConstants {
17     // Key : a configuration
18
// Value : the list of plugins that needs to get copied into a specific config.
19
// This list will be used to build the content of the fragment that contains
20
// config specific code
21
private Map sourceFeatureInformation = new HashMap(8);
22
23     public SourceFeatureInformation() {
24         // Initialize the content of the assembly information with the configurations
25
for (Iterator iter = AbstractScriptGenerator.getConfigInfos().iterator(); iter.hasNext();) {
26             Config config = (Config) iter.next();
27             sourceFeatureInformation.put(config, new HashSet());
28         }
29         sourceFeatureInformation.put(Config.genericConfig(), new HashSet(2));
30     }
31
32     public void addElementEntry(Config config, BundleDescription plugin) {
33         Set entry = (Set) sourceFeatureInformation.get(config);
34         entry.add(plugin);
35     }
36
37     public Map getElementEntries() {
38         return sourceFeatureInformation;
39     }
40 }
41
Popular Tags