public static boolean hasStartBundle ( final Profile profile, final String name ) { for ( final StartBundle sb : profile.getStart () ) { if ( sb.getName ().equals ( name ) ) { return true; } } return false; } }
public static boolean hasStartBundle ( final Profile profile, final String name ) { for ( final StartBundle sb : profile.getStart () ) { if ( sb.getName ().equals ( name ) ) { return true; } } return false; } }
public static Map<String, Integer> makeStartLevelMap ( final Profile profile ) { final Map<String, Integer> result = new HashMap<> (); for ( final StartBundle start : profile.getStart () ) { result.put ( start.getName (), -1 ); } for ( final BundleStartLevel bsl : profile.getSetbsl () ) { result.put ( bsl.getName (), bsl.getLevel () ); } return result; }
public static Map<String, Integer> makeStartLevelMap ( final Profile profile ) { final Map<String, Integer> result = new HashMap<> (); for ( final StartBundle start : profile.getStart () ) { result.put ( start.getName (), -1 ); } for ( final BundleStartLevel bsl : profile.getSetbsl () ) { result.put ( bsl.getName (), bsl.getLevel () ); } return result; }
public static void addStartBundle ( final Profile profile, final String name ) { if ( name == null ) { // no name return; } for ( final StartBundle bundle : profile.getStart () ) { if ( name.equals ( bundle.getName () ) ) { // already added return; } } final StartBundle sb = ProfileFactory.eINSTANCE.createStartBundle (); sb.setName ( name ); profile.getStart ().add ( sb ); }
public static void addStartBundle ( final Profile profile, final String name ) { if ( name == null ) { // no name return; } for ( final StartBundle bundle : profile.getStart () ) { if ( name.equals ( bundle.getName () ) ) { // already added return; } } final StartBundle sb = ProfileFactory.eINSTANCE.createStartBundle (); sb.setName ( name ); profile.getStart ().add ( sb ); }
/** * 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 = ( (StartBundle)object ).getName (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_StartBundle_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_StartBundle_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }