Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2007 IBM Corporation 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: IBM Corporation - initial API and implementation /
package org.eclipse.ui.internal.intro.impl.model;
This package maintains the mapping between extension ids in the registry and extension ids as defined in extension files. It also allows a configurer to change the page which will be displayed when the welcome screen is shown.
public class ExtensionMap {
	private static ExtensionMap instance;
	private static String startPage;
	private Map extensions = new HashMap();
	private ExtensionMap() {
	}

Get the one and only instance of this class

Returns:
	static public ExtensionMap getInstance() {
		if ( == null) {
		}
		return ;
	}

Save an association beteen an anchorId and pluginId

Parameters:
anchorId the id of an anchor
pluginId the plugin which contributed that anchor
	public void putPluginId(String anchorIdString pluginId) {
		if (anchorId != null) {
		    .put(anchorIdpluginId);
		}
	}

Lookup in which plugin

Parameters:
anchorId
Returns:
the plugin which contributed that anchor
	public String getPluginId(String anchorId) {
		return (String).get(anchorId);
	}

Clear the map and content page
	public void clear() {
		 = new HashMap();	
		 = null;
	}

called to determine if the configurer has overriden the start page

Returns:
the new start page or null.
	public String getStartPage() {
		return ;
	}

Allows a configurer to override the page which is displayed when the welcome screen is first shown

Parameters:
contentPage
	public void setStartPage(String contentPage) {
		 = contentPage;
	}
New to GrepCode? Check out our FAQ X