@Override public void process ( final MasterHandlerPriorities priorities, final ItemFeatureEntry rawFeature, final OscarContext context ) { final Rounding feature = (Rounding)rawFeature; final String configurationId = Features.configurationItem ( feature ); final Map<String, String> data = new HashMap<String, String> (); final RoundingType type = feature.getType () != null ? feature.getType () : RoundingType.NONE; data.put ( "active", "" + ( type != RoundingType.NONE ) ); //$NON-NLS-1$ //$NON-NLS-2$ data.put ( "type", "" + type.name () ); //$NON-NLS-1$ //$NON-NLS-2$ final int priority = priorities.findPriority ( Factories.FACTORY_MASTER_HANDLER_ROUND, configurationId ); Items.fillForMasterHandler ( data, feature.getItem (), priority ); context.addData ( Factories.FACTORY_MASTER_HANDLER_ROUND, configurationId, data ); } }
/** * 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 = ( (Rounding)object ).getName (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_Rounding_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_Rounding_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 Rounding feature = (Rounding)rawFeature; final String configurationId = Features.configurationItem ( feature ); final Map<String, String> data = new HashMap<String, String> (); final RoundingType type = feature.getType () != null ? feature.getType () : RoundingType.NONE; data.put ( "active", "" + ( type != RoundingType.NONE ) ); //$NON-NLS-1$ //$NON-NLS-2$ data.put ( "type", "" + type.name () ); //$NON-NLS-1$ //$NON-NLS-2$ final int priority = priorities.findPriority ( Factories.FACTORY_MASTER_HANDLER_ROUND, configurationId ); Items.fillForMasterHandler ( data, feature.getItem (), priority ); context.addData ( Factories.FACTORY_MASTER_HANDLER_ROUND, configurationId, data ); } }