| // ***************************************************************************** |
| // Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| // 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: |
| // Pierre Allard - initial API and implementation |
| // Regent L'Archeveque |
| // Sebastien Gemme |
| // |
| // SPDX-License-Identifier: EPL-1.0 |
| // ***************************************************************************** |
| @GenModel(prefix="ApogyCommonConvertersUI", |
| childCreationExtenders="true", |
| extensibleProviderFactory="true", |
| operationReflection="true", |
| copyrightText="******************************************************************************* |
| Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| 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: |
| Pierre Allard - initial API and implementation |
| Regent L'Archeveque, |
| Sebastien Gemme |
| |
| SPDX-License-Identifier: EPL-1.0 |
| *******************************************************************************", |
| modelName="ApogyCommonConvertersUI") |
| @GenModel(dynamicTemplates="true", templateDirectory="platform:/plugin/org.eclipse.apogy.common.emf.codegen/templates") |
| @GenModel(modelDirectory="/org.eclipse.apogy.common.converters.ui/src-gen") |
| |
| package org.eclipse.apogy.common.converters.ui |
| |
| import org.eclipse.apogy.common.Apogy |
| import org.eclipse.apogy.common.converters.List |
| |
| // Types. |
| |
| type ISelection wraps org.eclipse.jface.viewers.ISelection |
| |
| /** |
| * Facade for Converter UI. |
| */ |
| @Apogy(isSingleton="true", hasCustomClass="true") |
| class ApogyCommonConvertersUIFacade |
| { |
| /** |
| * Converts an ISelection to an object of type targetType |
| * @param selection The ISelection. |
| * @param targetType The class of the targeted type. |
| * @return A list of objects of the targeted type, can be empty. |
| */ |
| op List<Object> ^convert(ISelection selection, Class<?> targetType) |
| } |