/** * Returns the '<em><b>Startup Mechanism</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param literal the literal. * @return the matching enumerator or <code>null</code>. * @generated */ public static StartupMechanism get ( String literal ) { for ( int i = 0; i < VALUES_ARRAY.length; ++i ) { StartupMechanism result = VALUES_ARRAY[i]; if ( result.toString ().equals ( literal ) ) { return result; } } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public StartupMechanism createStartupMechanismFromString ( EDataType eDataType, String initialValue ) { StartupMechanism result = StartupMechanism.get ( initialValue ); if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName () + "'" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return result; }
/** * Returns the '<em><b>Startup Mechanism</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param name the name. * @return the matching enumerator or <code>null</code>. * @generated */ public static StartupMechanism getByName ( String name ) { for ( int i = 0; i < VALUES_ARRAY.length; ++i ) { StartupMechanism result = VALUES_ARRAY[i]; if ( result.getName ().equals ( name ) ) { return result; } } return null; }
/** * Get the startup mechanism to use * * @param defaultStartupMechanism * the default if none is set * @return the startup mechanism, or the default */ private StartupMechanism getStartupMechanism ( final StartupMechanism defaultStartupMechanism ) { if ( this.deploy.getStartupMechanism () == null || this.deploy.getStartupMechanism () == StartupMechanism.DEFAULT ) { final String type = OperatingSystemDescriptors.getProperty ( this.deploy.getOperatingSystem (), "startup", defaultStartupMechanism.name () ); return StartupMechanism.valueOf ( type ); } else { return this.deploy.getStartupMechanism (); } }
/** * Get the startup mechanism to use * * @param defaultStartupMechanism * the default if none is set * @return the startup mechanism, or the default */ private StartupMechanism getStartupMechanism ( final StartupMechanism defaultStartupMechanism ) { if ( this.deploy.getStartupMechanism () == null || this.deploy.getStartupMechanism () == StartupMechanism.DEFAULT ) { final String type = OperatingSystemDescriptors.getProperty ( this.deploy.getOperatingSystem (), "startup", defaultStartupMechanism.name () ); return StartupMechanism.valueOf ( type ); } else { return this.deploy.getStartupMechanism (); } }
/** * This returns the label styled text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getStyledText ( Object object ) { StartupMechanism labelValue = ( (CommonDeploymentMechanism)object ).getStartupMechanism (); String label = labelValue == null ? null : labelValue.toString (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_CommonDeploymentMechanism_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_CommonDeploymentMechanism_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }
/** * This returns the label styled text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getStyledText ( Object object ) { StartupMechanism labelValue = ( (DebianDeploymentMechanism)object ).getStartupMechanism (); String label = labelValue == null ? null : labelValue.toString (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_DebianDeploymentMechanism_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_DebianDeploymentMechanism_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }
/** * This returns the label styled text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getStyledText ( Object object ) { StartupMechanism labelValue = ( (RedhatDeploymentMechanism)object ).getStartupMechanism (); String label = labelValue == null ? null : labelValue.toString (); StyledString styledLabel = new StyledString (); if ( label == null || label.length () == 0 ) { styledLabel.append ( getString ( "_UI_RedhatDeploymentMechanism_type" ), StyledString.Style.QUALIFIER_STYLER ); //$NON-NLS-1$ } else { styledLabel.append ( getString ( "_UI_RedhatDeploymentMechanism_type" ), StyledString.Style.QUALIFIER_STYLER ).append ( " " + label ); //$NON-NLS-1$ //$NON-NLS-2$ } return styledLabel; }