/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DataMapper getDataMapper () { if ( dataMapper != null && dataMapper.eIsProxy () ) { InternalEObject oldDataMapper = (InternalEObject)dataMapper; dataMapper = (DataMapper)eResolveProxy ( oldDataMapper ); if ( dataMapper != oldDataMapper ) { if ( eNotificationRequired () ) eNotify ( new ENotificationImpl ( this, Notification.RESOLVE, OsgiPackage.VALUE_MAPPER__DATA_MAPPER, oldDataMapper, dataMapper ) ); } } return dataMapper; }
/** * This returns the label styled text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getStyledText ( Object object ) { String label = ( (DataMapper)object ).getName (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_DataMapper_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_DataMapper_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }
@Override public void process ( final MasterHandlerPriorities priorities, final ItemFeatureEntry rawFeature, final OscarContext context ) { final ValueMapper feature = (ValueMapper)rawFeature; final String configurationId = Features.configurationItem ( feature ); final Map<String, String> data = new HashMap<String, String> (); data.put ( "mapper.id", feature.getDataMapper ().getName () ); //$NON-NLS-1$ if ( feature.getSourceAttribute () != null && !feature.getSourceAttribute ().isEmpty () ) { data.put ( "sourceAttributeName", feature.getSourceAttribute () ); //$NON-NLS-1$ } if ( feature.getTargetAttribute () != null && !feature.getTargetAttribute ().isEmpty () ) { data.put ( "targetAttributeName", feature.getTargetAttribute () ); //$NON-NLS-1$ } final int priority = priorities.findPriority ( Factories.FACTORY_MASTER_HANDLER_VALUE_MAPPER, configurationId ); Items.fillForMasterHandler ( data, feature.getItem (), priority, false ); context.addData ( Factories.FACTORY_MASTER_HANDLER_VALUE_MAPPER, configurationId, data ); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DataMapper getDataMapper () { if ( dataMapper != null && dataMapper.eIsProxy () ) { InternalEObject oldDataMapper = (InternalEObject)dataMapper; dataMapper = (DataMapper)eResolveProxy ( oldDataMapper ); if ( dataMapper != oldDataMapper ) { InternalEObject newDataMapper = (InternalEObject)dataMapper; NotificationChain msgs = oldDataMapper.eInverseRemove ( this, EOPPOSITE_FEATURE_BASE - ComponentPackage.DATA_MAPPER_SERVICE__DATA_MAPPER, null, null ); if ( newDataMapper.eInternalContainer () == null ) { msgs = newDataMapper.eInverseAdd ( this, EOPPOSITE_FEATURE_BASE - ComponentPackage.DATA_MAPPER_SERVICE__DATA_MAPPER, null, msgs ); } if ( msgs != null ) msgs.dispatch (); if ( eNotificationRequired () ) eNotify ( new ENotificationImpl ( this, Notification.RESOLVE, ComponentPackage.DATA_MAPPER_SERVICE__DATA_MAPPER, oldDataMapper, dataMapper ) ); } } return dataMapper; }
@Override public void process ( final MasterHandlerPriorities priorities, final ItemFeatureEntry rawFeature, final OscarContext context ) { final ValueMapper feature = (ValueMapper)rawFeature; final String configurationId = Features.configurationItem ( feature ); final Map<String, String> data = new HashMap<String, String> (); data.put ( "mapper.id", feature.getDataMapper ().getName () ); //$NON-NLS-1$ if ( feature.getSourceAttribute () != null && !feature.getSourceAttribute ().isEmpty () ) { data.put ( "sourceAttributeName", feature.getSourceAttribute () ); //$NON-NLS-1$ } if ( feature.getTargetAttribute () != null && !feature.getTargetAttribute ().isEmpty () ) { data.put ( "targetAttributeName", feature.getTargetAttribute () ); //$NON-NLS-1$ } final int priority = priorities.findPriority ( Factories.FACTORY_MASTER_HANDLER_VALUE_MAPPER, configurationId ); Items.fillForMasterHandler ( data, feature.getItem (), priority, false ); context.addData ( Factories.FACTORY_MASTER_HANDLER_VALUE_MAPPER, configurationId, data ); } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DataMapper getDataMapper () { if ( dataMapper != null && dataMapper.eIsProxy () ) { InternalEObject oldDataMapper = (InternalEObject)dataMapper; dataMapper = (DataMapper)eResolveProxy ( oldDataMapper ); if ( dataMapper != oldDataMapper ) { InternalEObject newDataMapper = (InternalEObject)dataMapper; NotificationChain msgs = oldDataMapper.eInverseRemove ( this, EOPPOSITE_FEATURE_BASE - ComponentPackage.DATA_MAPPER_SERVICE__DATA_MAPPER, null, null ); if ( newDataMapper.eInternalContainer () == null ) { msgs = newDataMapper.eInverseAdd ( this, EOPPOSITE_FEATURE_BASE - ComponentPackage.DATA_MAPPER_SERVICE__DATA_MAPPER, null, msgs ); } if ( msgs != null ) msgs.dispatch (); if ( eNotificationRequired () ) eNotify ( new ENotificationImpl ( this, Notification.RESOLVE, ComponentPackage.DATA_MAPPER_SERVICE__DATA_MAPPER, oldDataMapper, dataMapper ) ); } } return dataMapper; }