## org.eclipse.emf.codegen.ecore
Class Generator

    java.lang.Object
      org.eclipse.emf.codegen.CodeGen
          org.eclipse.emf.codegen.ecore.Generator

Direct Known Subclasses:
  Generator.PlatformRunnable

    public class Generator

extends CodeGen

This implements the method `run(java.lang.Object)`, which is called just like main during headless workbench invocation.

Nested Class Summary
`static class` `Generator.PlatformRunnable`

Nested classes/interfaces inherited from class org.eclipse.emf.codegen.CodeGen
`CodeGen.StreamProgressMonitor`

Field Summary
`protected java.lang.String` `basePackage`
`static int` `EMF_EDIT_PROJECT_STYLE`
`static int` `EMF_EDITOR_PROJECT_STYLE`
`static int` `EMF_EMPTY_PROJECT_STYLE`
`static int` `EMF_MODEL_PROJECT_STYLE`
`static int` `EMF_PLUGIN_PROJECT_STYLE`
`static int` `EMF_TESTS_PROJECT_STYLE`
`static int` `EMF_XML_PROJECT_STYLE`

Constructor Summary
`Generator()`

Method Summary
`static IProject` `createEMFProject(IPath javaSource, IPath projectLocationPath, java.util.List<IProject> referencedProjects, IProgressMonitor progressMonitor, int style)`
`static IProject` `createEMFProject(IPath javaSource, IPath projectLocationPath, java.util.List<IProject> referencedProjects, IProgressMonitor progressMonitor, int style, java.util.List<?> pluginVariables)`
`static IProject` `createEMFProject(IPath javaSource, IPath projectLocationPath, java.util.List<IProject> referencedProjects, Monitor progressMonitor, int style)`
`static IProject` `createEMFProject(IPath javaSource, IPath projectLocationPath, java.util.List<IProject> referencedProjects, Monitor progressMonitor, int style, java.util.List<?> pluginVariables)`
`static IProject` `createEMFProject(IPath javaSource, URI projectLocationURI, java.util.List<IProject> referencedProjects, Monitor progressMonitor, int style, java.util.List<?> pluginVariables)`
`protected java.lang.String` `findOrCreateContainerHelper(java.lang.String rootLocation, java.lang.String encodedPath, Monitor progressMonitor)`
`static void` `main(java.lang.String[] args)` Deprecated. It is not possible to generate code without using Eclipse. If you are invoking this method, you should instantiate a Generator and call `run(Object)`. This method will be removed in a future release.
`void` `printGenerateUsage()`
`void` `printStatus(java.lang.String prefix, IStatus status)`
`java.lang.Object` `run(java.lang.Object object)` This is called with the command line arguments of a headless workbench invocation.
`static void` `setSDODefaults(GenModel genModel)`

Methods inherited from class org.eclipse.emf.codegen.CodeGen
`addClasspathEntries, addClasspathEntries, findOrCreateContainer, findOrCreateContainer, getClasspathPaths`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### basePackage

    protected java.lang.String basePackage

### EMF_MODEL_PROJECT_STYLE

    public static int EMF_MODEL_PROJECT_STYLE

### EMF_EDIT_PROJECT_STYLE

    public static int EMF_EDIT_PROJECT_STYLE

### EMF_EDITOR_PROJECT_STYLE

    public static int EMF_EDITOR_PROJECT_STYLE

### EMF_XML_PROJECT_STYLE

    public static int EMF_XML_PROJECT_STYLE

### EMF_PLUGIN_PROJECT_STYLE

    public static int EMF_PLUGIN_PROJECT_STYLE

### EMF_EMPTY_PROJECT_STYLE

    public static int EMF_EMPTY_PROJECT_STYLE

### EMF_TESTS_PROJECT_STYLE

    public static int EMF_TESTS_PROJECT_STYLE

Constructor Detail

### Generator

    public Generator()

Method Detail

### main

    @Deprecated
    public static void main(java.lang.String[] args)

  Deprecated. It is not possible to generate code without using Eclipse. If you are invoking this method, you should instantiate a Generator and call `run(Object)`. This method will be removed in a future release.

  This supports a non-headless invocation. The variable VABASE or ECLIPSE.

### printGenerateUsage

    public void printGenerateUsage()

### run

    public java.lang.Object run(java.lang.Object object)

  This is called with the command line arguments of a headless workbench invocation.

  Overrides:
    `run` in class `CodeGen`

### findOrCreateContainerHelper

    protected java.lang.String findOrCreateContainerHelper(java.lang.String rootLocation,
                                                           java.lang.String encodedPath,
                                                           Monitor progressMonitor)
                                                    throws CoreException

  Throws:
    `CoreException`

### createEMFProject

    public static IProject createEMFProject(IPath javaSource,
                                            IPath projectLocationPath,
                                            java.util.List<IProject> referencedProjects,
                                            IProgressMonitor progressMonitor,
                                            int style)

### createEMFProject

    public static IProject createEMFProject(IPath javaSource,
                                            IPath projectLocationPath,
                                            java.util.List<IProject> referencedProjects,
                                            IProgressMonitor progressMonitor,
                                            int style,
                                            java.util.List<?> pluginVariables)

### createEMFProject

    public static IProject createEMFProject(IPath javaSource,
                                            IPath projectLocationPath,
                                            java.util.List<IProject> referencedProjects,
                                            Monitor progressMonitor,
                                            int style)

### createEMFProject

    public static IProject createEMFProject(IPath javaSource,
                                            IPath projectLocationPath,
                                            java.util.List<IProject> referencedProjects,
                                            Monitor progressMonitor,
                                            int style,
                                            java.util.List<?> pluginVariables)

### createEMFProject

    public static IProject createEMFProject(IPath javaSource,
                                            URI projectLocationURI,
                                            java.util.List<IProject> referencedProjects,
                                            Monitor progressMonitor,
                                            int style,
                                            java.util.List<?> pluginVariables)

### printStatus

    public void printStatus(java.lang.String prefix,
                            IStatus status)

### setSDODefaults

    public static void setSDODefaults(GenModel genModel)

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.