1 /******************************************************************************* 2 * Copyright (c) 2006, 2007 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.debug.internal.ui.viewers.model.provisional; 15 16 17 /** 18 * A model selection policy factory creates a model selection policy for an element based on 19 * a specific presentation context. A model selection policy factory is provided for 20 * a model element by registering a model selection policy factory adapter for 21 * an element. 22 * <p> 23 * Clients may implement this interface. 24 * </p> 25 * @see IModelSelectionPolicy 26 * @since 3.2 27 */ 28 public interface IModelSelectionPolicyFactory { 29 /** 30 * Creates and returns a model selection policy for the given element in the specified 31 * context or <code>null</code> if none. 32 * 33 * @param element model element to create a selection policy for 34 * @param context presentation context 35 * @return model selection policy or <code>null</code> 36 */ createModelSelectionPolicyAdapter(Object element, IPresentationContext context)37 IModelSelectionPolicy createModelSelectionPolicyAdapter(Object element, IPresentationContext context); 38 } 39