|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.emf.codegen.util.CodeGenUtil
This class contains convenient static methods for EMF code generation.
This class, like much of the code in this plug-in, is currently undergoing change and should not be considered API.
| Nested Class Summary | |
protected static class |
CodeGenUtil.EclipseUtil
|
static class |
CodeGenUtil.StreamProgressMonitor
This is a progress monitor that prints the progress information to a stream. |
| Field Summary | |
protected static Pattern |
braceLine
|
protected static Pattern |
leadingTabs
|
protected static String |
lineSeparator
|
| Constructor Summary | |
CodeGenUtil()
|
|
| Method Summary | |
static void |
addClasspathEntries(Collection classpathEntries,
String pluginID)
|
static void |
addClasspathEntries(Collection classpathEntries,
String variableName,
String pluginID)
|
static String |
capName(String name)
|
static String |
convertFormat(String tabReplacement,
boolean convertToStandardBraceStyle,
String value)
|
static Monitor |
createMonitor(IProgressMonitor monitor,
int ticks)
|
static Monitor |
createMonitor(Monitor monitor,
int ticks)
|
static IContainer |
findOrCreateContainer(IPath path,
boolean forceRefresh,
IPath localLocation,
IProgressMonitor progressMonitor)
|
static IContainer |
findOrCreateContainer(IPath path,
boolean forceRefresh,
IPath localLocation,
Monitor progressMonitor)
|
static IContainer |
findOrCreateContainer(IPath path,
boolean forceRefresh,
IProjectDescription projectDescription,
IProgressMonitor progressMonitor)
|
static IContainer |
findOrCreateContainer(IPath path,
boolean forceRefresh,
IProjectDescription projectDescription,
Monitor progressMonitor)
|
static String |
format(String name,
char separator,
String prefix,
boolean includePrefix)
Deprecated. In 2.2. Please use {@link #format(String, char, String, boolean, boolean) instead. |
static String |
format(String name,
char separator,
String prefix,
boolean includePrefix,
boolean includeLeadingSeparator)
Formats a name by parsing it into words separated by underscores and/or mixed-casing and then recombining them using the specified separator. |
static List |
getClasspathPaths(String pluginID)
|
static Set |
getJavaDefaultTypes()
Returns the short names of the primitives and types in java.lang (i.e. those that don't need qualification). |
static Set |
getJavaReservedWords()
Returns the set of all Java's keywords and textual literals, as of Java 5.0. |
static String |
getPackageName(String qualifiedClassName)
Returns the package name for a qualified class name, ie, a substring from the first char until the last ". |
static String |
getSimpleClassName(String qualifiedClassName)
Returns the simple class name for a qualified class name, ie, a substring from starting after the last ". |
static FacadeHelper |
instantiateFacadeHelper(String facadeHelperClass)
|
static boolean |
isInJavaOutput(IResource resource)
|
static boolean |
isJavaDefaultType(String s)
Tests whether the given string is the name of a primitive or java.lang type. |
static boolean |
isJavaLangType(String s)
Tests whether the given string is the name of a java.lang type. |
static boolean |
isJavaPrimitiveType(String s)
Tests whether the given string is the name of a primitive type. |
static boolean |
isJavaReservedWord(String s)
Tests whether a given string is a Java reserved word. |
static char |
parseChar(String c)
|
static List |
parseName(String sourceName,
char separator)
This method breaks sourceName into words delimited by separator and/or mixed-case naming. |
static String |
parseString(String s)
|
static String |
safeName(String name)
|
static String |
uncapName(String name)
|
static String |
uncapPrefixedName(String name,
boolean forceDifferent)
|
static String |
validJavaIdentifier(String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static String lineSeparator
protected static Pattern braceLine
protected static Pattern leadingTabs
| Constructor Detail |
public CodeGenUtil()
| Method Detail |
public static Set getJavaReservedWords()
public static Set getJavaDefaultTypes()
public static boolean isJavaReservedWord(String s)
public static boolean isJavaDefaultType(String s)
public static boolean isJavaLangType(String s)
public static boolean isJavaPrimitiveType(String s)
public static String parseString(String s)
public static char parseChar(String c)
public static String validJavaIdentifier(String name)
public static String capName(String name)
public static String uncapName(String name)
public static String uncapPrefixedName(String name,
boolean forceDifferent)
public static String safeName(String name)
public static String format(String name,
char separator,
String prefix,
boolean includePrefix)
public static String format(String name,
char separator,
String prefix,
boolean includePrefix,
boolean includeLeadingSeparator)
public static List parseName(String sourceName,
char separator)
public static boolean isInJavaOutput(IResource resource)
public static IContainer findOrCreateContainer(IPath path,
boolean forceRefresh,
IPath localLocation,
IProgressMonitor progressMonitor)
throws CoreException
CoreException
public static IContainer findOrCreateContainer(IPath path,
boolean forceRefresh,
IPath localLocation,
Monitor progressMonitor)
throws CoreException
CoreException
public static IContainer findOrCreateContainer(IPath path,
boolean forceRefresh,
IProjectDescription projectDescription,
IProgressMonitor progressMonitor)
throws CoreException
CoreException
public static IContainer findOrCreateContainer(IPath path,
boolean forceRefresh,
IProjectDescription projectDescription,
Monitor progressMonitor)
throws CoreException
CoreException
public static List getClasspathPaths(String pluginID)
throws JETException
JETException
public static void addClasspathEntries(Collection classpathEntries,
String variableName,
String pluginID)
throws JETException
JETException
public static void addClasspathEntries(Collection classpathEntries,
String pluginID)
throws Exception
Exceptionpublic static String getPackageName(String qualifiedClassName)
qualifiedClassName -
public static String getSimpleClassName(String qualifiedClassName)
qualifiedClassName -
public static Monitor createMonitor(Monitor monitor,
int ticks)
public static Monitor createMonitor(IProgressMonitor monitor,
int ticks)
public static String convertFormat(String tabReplacement,
boolean convertToStandardBraceStyle,
String value)
public static FacadeHelper instantiateFacadeHelper(String facadeHelperClass)
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||