001package org.nasdanika.html.model.app.graph.emf; 002 003import static java.lang.annotation.ElementType.METHOD; 004import static java.lang.annotation.RetentionPolicy.RUNTIME; 005 006import java.lang.annotation.Retention; 007import java.lang.annotation.Target; 008import java.util.Collection; 009import java.util.List; 010import java.util.Map; 011import java.util.Map.Entry; 012 013import org.eclipse.emf.ecore.EOperation; 014import org.eclipse.emf.ecore.EcorePackage; 015import org.nasdanika.common.ProgressMonitor; 016import org.nasdanika.graph.emf.EOperationConnection; 017import org.nasdanika.html.model.app.Label; 018import org.nasdanika.html.model.app.graph.WidgetFactory; 019 020/** 021 * Annotation for an outgoing operation builder method. 022 * The method shall have 4 or 5 parameters compatible with parameters of <p/> 023 * 024 * <code>EObjectNodeProcessor.buildOutgoingOperation( 025 * <br/> {@link EOperation} eOperation, 026 * <br/> {@link List}<{@link Entry}<{{@link EOperationConnection}, {@link WidgetFactory}>> operationOutgoingEndpoints, 027 * <br/> {@link Collection}<{@link Label}> labels, 028 * <br/> {@link Map}<{@link EOperationConnection}, {@link Collection}<{@link Label}>> outgoingLabels, 029 * <br/> {@link ProgressMonitor} progressMonitor)</code> 030 * <p/> 031 * In the case of 4 parameters it is the last 4 parameters because the operation is already bound by the annotation. 032 * @author Pavel 033 * 034 */ 035@Retention(RUNTIME) 036@Target(METHOD) 037public @interface OutgoingOperationBuilder { 038 039 /** 040 * Operation ID, obtained from EPackage constants, e.g. <code>{@link EcorePackage}.EOBJECT___ECONTAINER</code>. 041 * @return 042 */ 043 int value(); 044 045} 046