Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 9c573fb3afc2318a218d84c4cae10969f8ab1c9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*******************************************************************************
 * Copyright (c) 2009, 2017 Tasktop Technologies 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:
 *     Tasktop Technologies - initial API and implementation
 *******************************************************************************/
package org.eclipse.equinox.internal.p2.discovery;

import java.util.Dictionary;
import java.util.Hashtable;
import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;

/**
 * @author David Green
 */
public abstract class DiscoveryCore {

	public static final String ID_PLUGIN = "org.eclipse.equinox.p2.discovery"; //$NON-NLS-1$

	private DiscoveryCore() {
	}

	public static Dictionary<Object, Object> createEnvironment() {
		Dictionary<Object, Object> environment = new Hashtable<>(System.getProperties());
		// add the installed Mylyn version to the environment so that we can
		// have
		// connectors that are filtered based on version of Mylyn
		IProduct product = Platform.getProduct();
		if (product != null) {
			environment.put("org.eclipse.product.id", product.getId()); //$NON-NLS-1$
		}
		return environment;
	}

}

Back to the top