/** * Searches for an output port within the given plugin with the given name. * * @param mPlugin * The plugin which will be searched through. * @param name * The name of the searched output port. * @return The searched port or null, if it is not available. */ public static final MIOutputPort findOutputPort(final MIPlugin mPlugin, final String name) { for (final MIOutputPort port : mPlugin.getOutputPorts()) { if (port.getName().equals(name)) { return port; } } return null; }
/** * Searches for an input port within the given plugin with the given name. * * @param mPlugin * The plugin which will be searched through. * @param name * The name of the searched input port. * @return The searched port or null, if it is not available. */ public static final MIInputPort findInputPort(final MIFilter mPlugin, final String name) { for (final MIInputPort port : mPlugin.getInputPorts()) { if (port.getName().equals(name)) { return port; } } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public MIRepository getRepository() { if (repository != null && repository.eIsProxy()) { InternalEObject oldRepository = (InternalEObject)repository; repository = (MIRepository)eResolveProxy(oldRepository); if (repository != oldRepository) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MIAnalysisMetaModelPackage.REPOSITORY_CONNECTOR__REPOSITORY, oldRepository, repository)); } } return repository; }
final EList<MIOutputPort> mOutputPorts = mPlugin.getOutputPorts(); final Set<String> outputPorts = new HashSet<String>(); for (final String outputPort : plugin.getAllOutputPortNames()) { if (!outputPorts.contains(mOutputPort.getName())) { throw new AnalysisConfigurationException("The output port '" + mOutputPort.getName() + "' of '" + mPlugin.getName() + "' (" + mPlugin.getClassname() + ") does not exist."); final EList<MIInputPort> mInputPorts = (mPlugin instanceof MIFilter) ? ((MIFilter) mPlugin).getInputPorts() : new BasicEList<MIInputPort>(); // NOCS for (final MIInputPort mInputPort : mInputPorts) { if (!inputPorts.contains(mInputPort.getName())) { throw new AnalysisConfigurationException("The input port '" + mInputPort.getName() + "' of '" + mPlugin.getName() + "' (" + mPlugin.getClassname() + ") does not exist.");
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public MIDisplay getDisplay() { if (display != null && display.eIsProxy()) { InternalEObject oldDisplay = (InternalEObject)display; display = (MIDisplay)eResolveProxy(oldDisplay); if (display != oldDisplay) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MIAnalysisMetaModelPackage.DISPLAY_CONNECTOR__DISPLAY, oldDisplay, display)); } } return display; }
/** * This method can be used to convert a given list of <code>MIProperty</code> to a configuration object. * * @param mProperties * The properties to be converted. * @return A filled configuration object. */ public static final Configuration modelPropertiesToConfiguration(final EList<MIProperty> mProperties) { final Configuration configuration = new Configuration(); // Run through the properties and convert every single of them for (final MIProperty mProperty : mProperties) { configuration.setProperty(mProperty.getName(), mProperty.getValue()); } return configuration; }
private static String[] getAllOutputPortNames(final MIPlugin plugin) { return KaxVizFrame.convertPortsToNameArray(plugin.getOutputPorts()); }
private static String[] getAllInputPortNames(final MIFilter plugin) { return KaxVizFrame.convertPortsToNameArray(plugin.getInputPorts()); }
private static String[] convertPortsToNameArray(final EList<? extends MIPort> eList) { final int len = eList.size(); final String[] result = new String[len]; for (int idx = 0; idx < len; idx++) { result[idx] = eList.get(idx).getName(); } return result; }
private static String getShortClassName(final MIAnalysisComponent analysisComponent) { final String className = analysisComponent.getClassname(); final int lastPointPos = className.lastIndexOf('.'); return className.substring(lastPointPos + 1); }
private final mxCell createReader(final MIReader reader, final int c) { final mxCell vertex = new mxCell("<<Reader>>\n" + reader.getName() + " : " + KaxVizFrame.getShortClassName(reader), new mxGeometry(FILTER_SPACE, FILTER_SPACE + (c * (FILTER_HEIGHT + FILTER_SPACE)), FILTER_WIDTH, FILTER_HEIGHT), STYLE_READER); vertex.setVertex(true); this.graph.addCell(vertex); return vertex; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public MIRepository getRepository() { if (repository != null && repository.eIsProxy()) { InternalEObject oldRepository = (InternalEObject)repository; repository = (MIRepository)eResolveProxy(oldRepository); if (repository != oldRepository) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MIAnalysisMetaModelPackage.REPOSITORY_CONNECTOR__REPOSITORY, oldRepository, repository)); } } return repository; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public MIDisplay getDisplay() { if (display != null && display.eIsProxy()) { InternalEObject oldDisplay = (InternalEObject)display; display = (MIDisplay)eResolveProxy(oldDisplay); if (display != oldDisplay) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MIAnalysisMetaModelPackage.DISPLAY_CONNECTOR__DISPLAY, oldDisplay, display)); } } return display; }
/** * Searches for an output port within the given plugin with the given name. * * @param mPlugin * The plugin which will be searched through. * @param name * The name of the searched output port. * @return The searched port or null, if it is not available. */ public static final MIOutputPort findOutputPort(final MIPlugin mPlugin, final String name) { for (final MIOutputPort port : mPlugin.getOutputPorts()) { if (port.getName().equals(name)) { return port; } } return null; }
/** * Searches for an input port within the given plugin with the given name. * * @param mPlugin * The plugin which will be searched through. * @param name * The name of the searched input port. * @return The searched port or null, if it is not available. */ public static final MIInputPort findInputPort(final MIFilter mPlugin, final String name) { for (final MIInputPort port : mPlugin.getInputPorts()) { if (port.getName().equals(name)) { return port; } } return null; }
/** * This method can be used to convert a given list of <code>MIProperty</code> to a configuration object. * * @param mProperties * The properties to be converted. * @return A filled configuration object. */ public static final Configuration modelPropertiesToConfiguration(final EList<MIProperty> mProperties) { final Configuration configuration = new Configuration(); // Run through the properties and convert every single of them for (final MIProperty mProperty : mProperties) { configuration.setProperty(mProperty.getName(), mProperty.getValue()); } return configuration; }
private static String[] getAllOutputPortNames(final MIPlugin plugin) { return KaxVizFrame.convertPortsToNameArray(plugin.getOutputPorts()); }
private static String[] getAllInputPortNames(final MIFilter plugin) { return KaxVizFrame.convertPortsToNameArray(plugin.getInputPorts()); }
private static String[] convertPortsToNameArray(final EList<? extends MIPort> eList) { final int len = eList.size(); final String[] result = new String[len]; for (int idx = 0; idx < len; idx++) { result[idx] = eList.get(idx).getName(); } return result; }
private static String getShortClassName(final MIAnalysisComponent analysisComponent) { final String className = analysisComponent.getClassname(); final int lastPointPos = className.lastIndexOf('.'); return className.substring(lastPointPos + 1); }