org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl Java Examples

The following examples show how to use org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NewGenerationWizard.java    From M2Doc with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Initializes the {@link Generation#getDefinitions() variable definition} for the given {@link Generation}.
 * 
 * @param gen
 *            the {@link Generation}
 */
private void initializeVariableDefinition(Generation gen) {
    final IQueryEnvironment queryEnvironment = Query.newEnvironment();
    try {
        final TemplateCustomProperties properties = POIServices.getInstance().getTemplateCustomProperties(
                URIConverter.INSTANCE, URI.createURI(gen.getTemplateFileName()).resolve(gen.eResource().getURI()));
        ((IQueryEnvironment) queryEnvironment).registerEPackage(EcorePackage.eINSTANCE);
        ((IQueryEnvironment) queryEnvironment).registerCustomClassMapping(
                EcorePackage.eINSTANCE.getEStringToStringMapEntry(), EStringToStringMapEntryImpl.class);
        properties.configureQueryEnvironmentWithResult((IQueryEnvironment) queryEnvironment);
        final ResourceSetImpl defaultResourceSet = new ResourceSetImpl();
        defaultResourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*",
                new XMIResourceFactoryImpl());
        final ResourceSet resourceSetForModel = M2DocUtils.createResourceSetForModels(new ArrayList<Exception>(),
                queryEnvironment, defaultResourceSet, GenconfUtils.getOptions(gen));
        final List<Definition> newDefinitions = GenconfUtils.getNewDefinitions(gen, properties);
        gen.getDefinitions().addAll(newDefinitions);
        GenconfUtils.initializeVariableDefinition(gen, queryEnvironment, properties, resourceSetForModel);
        M2DocUtils.cleanResourceSetForModels(queryEnvironment, resourceSetForModel);
        // CHECKSTYLE:OFF
    } catch (Exception e) {
        // CHECKSTYLE:ON
        // no initialization if it fails no big deal
    }
}
 
Example #2
Source File: VariableAndOptionPage.java    From M2Doc with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Initializes {@link Generation#getDefinitions() variable definition} for the given {@link Generation}.
 * 
 * @param gen
 *            the {@link Generation}
 */
private void initializeGenerationVariableDefinition(final Generation gen) {
    final TemplateCustomProperties properties = templateCustomPropertiesProvider.getTemplateCustomProperties();
    ((IQueryEnvironment) queryEnvironment).registerEPackage(EcorePackage.eINSTANCE);
    ((IQueryEnvironment) queryEnvironment).registerCustomClassMapping(
            EcorePackage.eINSTANCE.getEStringToStringMapEntry(), EStringToStringMapEntryImpl.class);
    if (properties != null) {
        properties.configureQueryEnvironmentWithResult((IQueryEnvironment) queryEnvironment);
    }

    final TransactionalEditingDomain generationDomain = TransactionUtil.getEditingDomain(gen);
    generationDomain.getCommandStack().execute(new RecordingCommand(generationDomain) {

        @Override
        protected void doExecute() {
            GenconfUtils.initializeVariableDefinition(gen, queryEnvironment, properties,
                    getEditingDomain(gen).getResourceSet());
        }
    });
}
 
Example #3
Source File: GenconfUtils.java    From M2Doc with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Gets the {@link List} of old {@link Definition} delta between the given {@link Generation} and the given
 * {@link TemplateCustomProperties}. {@link Definition} that can be removed from the {@link Generation}.
 * 
 * @param generation
 *            the {@link Generation}
 * @param templateCustomProperties
 *            the {@link TemplateCustomProperties}
 * @return the {@link List} of new {@link Definition}
 */
public static List<Definition> getOldDefinitions(Generation generation,
        TemplateCustomProperties templateCustomProperties) {
    final List<Definition> oldDefinitions = new ArrayList<Definition>();

    final IQueryEnvironment queryEnvironment = Query.newEnvironment();
    queryEnvironment.registerEPackage(EcorePackage.eINSTANCE);
    queryEnvironment.registerCustomClassMapping(EcorePackage.eINSTANCE.getEStringToStringMapEntry(),
            EStringToStringMapEntryImpl.class);
    templateCustomProperties.configureQueryEnvironmentWithResult(queryEnvironment);
    final AstValidator validator = new AstValidator(new ValidationServices(queryEnvironment));
    final Map<String, Set<IType>> variablesTypes = templateCustomProperties.getVariableTypes(validator,
            queryEnvironment);
    for (Definition definition : generation.getDefinitions()) {
        if (!variablesTypes.containsKey(definition.getKey())
            || !isValidDefinitionForType(queryEnvironment, definition, variablesTypes.get(definition.getKey()))) {
            oldDefinitions.add(definition);
        }
    }

    return oldDefinitions;
}
 
Example #4
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   @Override
   public EMap<String, String> getXSISchemaLocation() {
	if (xSISchemaLocation == null) {
		xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, ConnectorDefinitionPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
	}
	return xSISchemaLocation;
}
 
Example #5
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
public EMap<String, String> getXMLNSPrefixMap() {
       if (xMLNSPrefixMap == null) {
           xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, OrganizationPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
       }
       return xMLNSPrefixMap;
   }
 
Example #6
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
public EMap<String, String> getXSISchemaLocation() {
       if (xSISchemaLocation == null) {
           xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, OrganizationPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
       }
       return xSISchemaLocation;
   }
 
Example #7
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXMLNSPrefixMap() {
	if (xMLNSPrefixMap == null) {
		xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DiPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
	}
	return xMLNSPrefixMap;
}
 
Example #8
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXSISchemaLocation() {
	if (xSISchemaLocation == null) {
		xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DiPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
	}
	return xSISchemaLocation;
}
 
Example #9
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXMLNSPrefixMap() {
	if (xMLNSPrefixMap == null) {
		xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DcPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
	}
	return xMLNSPrefixMap;
}
 
Example #10
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXSISchemaLocation() {
	if (xSISchemaLocation == null) {
		xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DcPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
	}
	return xSISchemaLocation;
}
 
Example #11
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXMLNSPrefixMap() {
	if (xMLNSPrefixMap == null) {
		xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DiPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
	}
	return xMLNSPrefixMap;
}
 
Example #12
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXSISchemaLocation() {
	if (xSISchemaLocation == null) {
		xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DiPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
	}
	return xSISchemaLocation;
}
 
Example #13
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXMLNSPrefixMap() {
	if (xMLNSPrefixMap == null) {
		xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, Xpdl1Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
	}
	return xMLNSPrefixMap;
}
 
Example #14
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXSISchemaLocation() {
	if (xSISchemaLocation == null) {
		xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, Xpdl1Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
	}
	return xSISchemaLocation;
}
 
Example #15
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   @Override
   public EMap<String, String> getXMLNSPrefixMap() {
	if (xMLNSPrefixMap == null) {
		xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, ConnectorDefinitionPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
	}
	return xMLNSPrefixMap;
}
 
Example #16
Source File: DocumentRootImpl.java    From fixflow with Apache License 2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public Map<String, String> getXSISchemaLocation() {
    if (xSISchemaLocation == null) {
        xSISchemaLocation = new EcoreEMap<String, String>(
                EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY,
                EStringToStringMapEntryImpl.class, this,
                DcPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
    }
    return xSISchemaLocation.map();
}
 
Example #17
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   public EMap<String, String> getXMLNSPrefixMap() {
	if (xMLNSPrefixMap == null) {
		xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, ConnectorImplementationPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
	}
	return xMLNSPrefixMap;
}
 
Example #18
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   public EMap<String, String> getXSISchemaLocation() {
	if (xSISchemaLocation == null) {
		xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, ConnectorImplementationPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
	}
	return xSISchemaLocation;
}
 
Example #19
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXMLNSPrefixMap() {
	if (xMLNSPrefixMap == null) {
		xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, jpdl32Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
	}
	return xMLNSPrefixMap;
}
 
Example #20
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EMap<String, String> getXSISchemaLocation() {
	if (xSISchemaLocation == null) {
		xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, jpdl32Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
	}
	return xSISchemaLocation;
}
 
Example #21
Source File: InfoImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getHtmlAttributes() {
       if (htmlAttributes == null) {
           htmlAttributes = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, FormPackage.INFO__HTML_ATTRIBUTES);
       }
       return htmlAttributes;
   }
 
Example #22
Source File: FormImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getStringAttributes() {
       if (stringAttributes == null) {
           stringAttributes = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, FormPackage.FORM__STRING_ATTRIBUTES);
       }
       return stringAttributes;
   }
 
Example #23
Source File: FormFieldImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getHtmlAttributes() {
       if (htmlAttributes == null) {
           htmlAttributes = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, FormPackage.FORM_FIELD__HTML_ATTRIBUTES);
       }
       return htmlAttributes;
   }
 
Example #24
Source File: GroupImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getHtmlAttributes() {
       if (htmlAttributes == null) {
           htmlAttributes = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, FormPackage.GROUP__HTML_ATTRIBUTES);
       }
       return htmlAttributes;
   }
 
Example #25
Source File: CSSCustomizableImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getHtmlAttributes() {
       if (htmlAttributes == null) {
           htmlAttributes = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, FormPackage.CSS_CUSTOMIZABLE__HTML_ATTRIBUTES);
       }
       return htmlAttributes;
   }
 
Example #26
Source File: FormButtonImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getHtmlAttributes() {
       if (htmlAttributes == null) {
           htmlAttributes = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, FormPackage.FORM_BUTTON__HTML_ATTRIBUTES);
       }
       return htmlAttributes;
   }
 
Example #27
Source File: ImageWidgetImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getHtmlAttributes() {
       if (htmlAttributes == null) {
           htmlAttributes = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, FormPackage.IMAGE_WIDGET__HTML_ATTRIBUTES);
       }
       return htmlAttributes;
   }
 
Example #28
Source File: AbstractTableImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getHtmlAttributes() {
       if (htmlAttributes == null) {
           htmlAttributes = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, FormPackage.ABSTRACT_TABLE__HTML_ATTRIBUTES);
       }
       return htmlAttributes;
   }
 
Example #29
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getXMLNSPrefixMap() {
       if (xMLNSPrefixMap == null) {
           xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, ActorMappingPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
       }
       return xMLNSPrefixMap;
   }
 
Example #30
Source File: DocumentRootImpl.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
    * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
    * @generated
    */
@Override
public EMap<String, String> getXSISchemaLocation() {
       if (xSISchemaLocation == null) {
           xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, ActorMappingPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
       }
       return xSISchemaLocation;
   }