private Profile createProfile ( final Profile profile ) { if ( profile == null ) { return null; } final Profile newProfile = ProfileFactory.eINSTANCE.createProfile (); newProfile.getIncludes ().add ( profile ); newProfile.setName ( "Local customization profile" ); return newProfile; }
public static Profile createOrGetCustomizationProfile ( final EquinoxApplication app ) { Profile profile = app.getCustomizationProfile (); if ( profile == null ) { profile = ProfileFactory.eINSTANCE.createProfile (); app.setCustomizationProfile ( profile ); } return profile; }
public static Profile createOrGetCustomizationProfile ( final EquinoxApplication app ) { Profile profile = app.getCustomizationProfile (); if ( profile == null ) { profile = ProfileFactory.eINSTANCE.createProfile (); app.setCustomizationProfile ( profile ); } return profile; }
public void process () { if ( this.app.getCustomizationProfile () == null ) { this.app.setCustomizationProfile ( ProfileFactory.eINSTANCE.createProfile () ); } final Profile prof = this.app.getCustomizationProfile (); final Map<Class<?>, Exporter> countMap = new HashMap<> (); for ( final Exporter exporter : this.app.getExporter () ) { if ( exporter.getEndpoints ().size () != 1 ) { throw new IllegalStateException ( "At the moment each exporter must not have exactly than one endpoint" ); } if ( countMap.containsKey ( exporter.getClass () ) ) { throw new IllegalStateException ( String.format ( "At the moment there must not me more than one exporter at a time for the type: %s", exporter.getClass () ) ); } countMap.put ( exporter.getClass (), exporter ); final String tag = exporter.getTypeTag (); put ( prof, String.format ( "org.eclipse.scada.%s.server.exporter.ngp.exportUri", tag ), makeUri ( tag, exporter.getEndpoints ().get ( 0 ) ) ); } }
public void process () { if ( this.app.getCustomizationProfile () == null ) { this.app.setCustomizationProfile ( ProfileFactory.eINSTANCE.createProfile () ); } final Profile prof = this.app.getCustomizationProfile (); final Map<Class<?>, Exporter> countMap = new HashMap<> (); for ( final Exporter exporter : this.app.getExporter () ) { if ( exporter.getEndpoints ().size () != 1 ) { throw new IllegalStateException ( "At the moment each exporter must not have exactly than one endpoint" ); } if ( countMap.containsKey ( exporter.getClass () ) ) { throw new IllegalStateException ( String.format ( "At the moment there must not me more than one exporter at a time for the type: %s", exporter.getClass () ) ); } countMap.put ( exporter.getClass (), exporter ); final String tag = exporter.getTypeTag (); put ( prof, String.format ( "org.eclipse.scada.%s.server.exporter.ngp.exportUri", tag ), makeUri ( tag, exporter.getEndpoints ().get ( 0 ) ) ); } }
newChildDescriptors.add ( createChildParameter ( OsgiPackage.Literals.EQUINOX_APPLICATION__CUSTOMIZATION_PROFILE, ProfileFactory.eINSTANCE.createProfile () ) );
newChildDescriptors.add ( createChildParameter ( OsgiPackage.Literals.EQUINOX_APPLICATION__CUSTOMIZATION_PROFILE, ProfileFactory.eINSTANCE.createProfile () ) );
newChildDescriptors.add ( createChildParameter ( OsgiPackage.Literals.EQUINOX_APPLICATION__CUSTOMIZATION_PROFILE, ProfileFactory.eINSTANCE.createProfile () ) );