CodeGenUtil.format
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.eclipse.emf.codegen.util.CodeGenUtil.format (Showing top 10 results out of 315)

origin: org.eclipse.emf/org.eclipse.emf.codegen.ecore

/**
 * @since 2.2.
 */
protected String format(String name, char separator, String prefix, boolean includePrefix, boolean includeLeadingSeparator)
{
 return CodeGenUtil.format(name, separator, prefix, includePrefix, includeLeadingSeparator);
}
origin: org.eclipse/org.eclipse.emf.codegen.ecore

/**
 * @since 2.2.
 */
protected String format(String name, char separator, String prefix, boolean includePrefix, boolean includeLeadingSeparator)
{
 return CodeGenUtil.format(name, separator, prefix, includePrefix, includeLeadingSeparator);
}
origin: org.eclipse.emf/org.eclipse.emf.codegen

/**
 * @deprecated In 2.2. Please use {@link #format(String, char, String, boolean, boolean)} instead.
 */
@Deprecated
public static String format(String name, char separator, String prefix, boolean includePrefix)
{
 return format(name, separator, prefix, includePrefix, false);
}
origin: org.eclipse.emf/org.eclipse.emf.codegen.ecore

/**
 * @deprecated in 2.2. Please use {@link #format(String, char, String, boolean, boolean)} instead.
 */
@Deprecated
public String format(String name, char separator, String prefix, boolean includePrefix)
{
 return CodeGenUtil.format(name, separator, prefix, includePrefix);
}
origin: org.eclipse.emf/org.eclipse.emf.codegen

/**
 * @since 2.6
 */
public static String upperName(String name, Locale locale)
{
 return format(name, '_', null, false, true).toUpperCase(locale);
}
origin: org.eclipse/org.eclipse.emf.codegen

/**
 * @deprecated In 2.2. Please use {@link #format(String, char, String, boolean, boolean)} instead.
 */
@Deprecated
public static String format(String name, char separator, String prefix, boolean includePrefix)
{
 return format(name, separator, prefix, includePrefix, false);
}
origin: org.eclipse/org.eclipse.emf.codegen.ecore

/**
 * @deprecated in 2.2. Please use {@link #format(String, char, String, boolean, boolean)} instead.
 */
@Deprecated
public String format(String name, char separator, String prefix, boolean includePrefix)
{
 return CodeGenUtil.format(name, separator, prefix, includePrefix);
}
origin: org.eclipse/xtext

@Check
public void checkGeneratedPackageForNameClashes(GeneratedMetamodel metamodel) {
  EPackage pack = metamodel.getEPackage();
  Multimap<String, ENamedElement> constantNameToElement = HashMultimap.create();
  Multimap<String, ENamedElement> accessorNameToElement = HashMultimap.create();
  if (pack != null) {
    for(EClassifier classifier: pack.getEClassifiers()) {
      String accessorName = classifier.getName();
      if ("Class".equals(accessorName) || "Name".equals(accessorName))
        accessorName += "_";
      accessorNameToElement.put("get" + accessorName, classifier);
      String classifierConstantName = CodeGenUtil.format(classifier.getName(), '_', null, true, true).toUpperCase();
      constantNameToElement.put(classifierConstantName, classifier);
      if (classifier instanceof EClass) {
        for(EStructuralFeature feature: ((EClass) classifier).getEAllStructuralFeatures()) {
          String featureConstantPart = CodeGenUtil.format(feature.getName(), '_', null, false, false).toUpperCase();
          String featureConstantName = classifierConstantName + "__" + featureConstantPart;
          constantNameToElement.put(featureConstantName, feature);
          String featureAccessorName = "get" + classifier.getName() + "_" + Strings.toFirstUpper(feature.getName());
          accessorNameToElement.put(featureAccessorName, feature);
        }
      }
    }
  }
  createMessageForNameClashes(constantNameToElement);
  createMessageForNameClashes(accessorNameToElement);
}

origin: org.eclipse/org.eclipse.emf.codegen.ecore

  for (String constraint : genClassifier.getGenConstraints()) 
{GenClassifier constraintDelegate = genClassifier.getConstraintDelegate(constraint); 
 String constant = genClassifier.getClassifierID() + "__" + CodeGenUtil.format(constraint, '_', null, false, false).toUpperCase();
 String delegate = constraintDelegate == null || constraintDelegate.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(constraintDelegate.getGenPackage()) + "Validator."; 
 String cast = constraintDelegate == null && genClassifier instanceof GenClass && !((GenClass)genClassifier).isEObjectExtension() ? "(" + genModel.getImportedName("org.eclipse.emf.ecore.EObject") + ")" : "";
origin: org.eclipse.emf/org.eclipse.emf.codegen.ecore

  for (String constraint : genClassifier.getGenConstraints())
{GenClassifier constraintDelegate = genClassifier.getConstraintDelegate(constraint);
 String constant = genClassifier.getClassifierID() + "__" + CodeGenUtil.format(constraint, '_', null, false, false).toUpperCase(genClassifier.getGenModel().getLocale());
 String delegate = constraintDelegate == null || constraintDelegate.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(constraintDelegate.getGenPackage()) + "Validator.";
 String cast = constraintDelegate == null && genClassifier instanceof GenClass && !((GenClass)genClassifier).isEObjectExtension() ? "(" + genModel.getImportedName("org.eclipse.emf.ecore.EObject") + ")" : "";
org.eclipse.emf.codegen.utilCodeGenUtilformat

Popular methods of CodeGenUtil

  • capName
  • convertFormat
  • getJavaDefaultTypes
    Returns the short names of the primitives and types in java.lang (i.e. those that don't need qualifi
  • getJavaReservedWords
    Returns the set of all Java's keywords and textual literals, as of Java 5.0.
  • instantiateFacadeHelper
  • isJavaDefaultType
    Tests whether the given string is the name of a primitive or java.lang type.
  • createMonitor
  • safeName
  • uncapName
  • uncapPrefixedName
  • addClasspathEntries
  • findOrCreateContainer
  • addClasspathEntries,
  • findOrCreateContainer,
  • getClasspathPaths,
  • getLeadingSeparators,
  • getPackageName,
  • getSimpleClassName,
  • isJavaPrimitiveType,
  • isJavaReservedWord,
  • parseChar

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)