Package eu.bandm.tools.applicationStart
Class StartApplicationProject_makeBased
java.lang.Object
eu.bandm.tools.applicationStart.StartApplicationProject_makeBased
Initial fill of the source file tree for a new application project
based on metatools and gnu make.
The PWD must be the top directory of that project, and must be completely empty.
Source tree and top-level additional directories will be created.
Usage:
a/b/grmpf>java -classpath metatools.jar eu.bandm.tools.applicationStart.StartApplicationProject_makeBased e.f.g.grmpf
Usage:
a/b/grmpf>java -classpath metatools.jar eu.bandm.tools.applicationStart.StartApplicationProject_makeBased e.f.g.grmpf
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static enum
-
Field Summary
Modifier and TypeFieldDescriptionprotected final MessageReceiver<SimpleMessage<String>>
protected final MessageCounter
(package private) final String
protected final Options
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
copyFile
(String fileNameSrc, File targetDirectory, @Opt String fileNameTarget, @Opt String firstLine, String... substs) Copy a file into the newly created hierarchy:static void
(package private) void
makeHierarchy
(String[] levels, String name_topDir, File file_topDir, String topName, StartApplicationProject_makeBased.Mode mode) Create a hierarchy of directories and Makefiles.(package private) File
makeSubSource
(String filePrefix, @Opt String packagePrefix, File context, String name, @Opt String sub, StartApplicationProject_makeBased.Mode mode) Create the directory and the Makefile for one level of the initial source tree.(package private) void
makeTextFile
(String fileNameTarget, File targetDirectory, String text) (package private) void
nonStatic_main
(String[] args) Initial fill of the source file tree for a new application project based on metatools and gnu make.
-
Field Details
-
options
-
msg_c
-
msg
-
warranty_warning_text
- See Also:
-
NL
-
-
Constructor Details
-
StartApplicationProject_makeBased
public StartApplicationProject_makeBased()
-
-
Method Details
-
main
-
nonStatic_main
Initial fill of the source file tree for a new application project based on metatools and gnu make. The PWD must be the top directory of that project, and must be completely empty. Source tree and top-level additional directories will be created.- Parameters:
args
- only option is some prefix of the projects hierachical url. For these prefixes src dirs and Makefiles will be generated.
-
makeHierarchy
void makeHierarchy(String[] levels, String name_topDir, File file_topDir, String topName, StartApplicationProject_makeBased.Mode mode) throws FileNotFoundException Create a hierarchy of directories and Makefiles.- Parameters:
levels
- the prefices of the projects hierarchical name. For each component one directory level will be created.name_topDir
- the nema of PWD, assumed to be the name of the projectfile_topDir
- PWD file, in which the hierarchy shall starttopName
- the name of the top of the created hierarchy, like "src" or "test".mode
- whether to create src or test or example tree- Throws:
FileNotFoundException
-
makeSubSource
File makeSubSource(String filePrefix, @Opt @Opt String packagePrefix, File context, String name, @Opt @Opt String sub, StartApplicationProject_makeBased.Mode mode) throws FileNotFoundException Create the directory and the Makefile for one level of the initial source tree.- Parameters:
filePrefix
- the sequence of file names, from $(PRJ) down to containingDir, symbolically.packagePrefix
- the sequence of package names, from the topmost under $(PRJ)/src down to the containing directory "context".context
- containing directory in which this directory is made.name
- of the directory and package to make.sub
- name of the only sub-package, may be null.mode
- whether the purpose is src/examples/test.- Throws:
FileNotFoundException
-
copyFile
void copyFile(String fileNameSrc, File targetDirectory, @Opt @Opt String fileNameTarget, @Opt @Opt String firstLine, String... substs) throws IOException Copy a file into the newly created hierarchy:- Parameters:
fileNameSrc
- name of the file as a resource relative to this classtargetDirectory
- where to create the copyfileNameTarget
- when the copy shall get a different namefirstLine
- addtional first ("warning") line inserted into the copysubsts
- pairs of KEY/VALUE to replace "${KEY}" by "VALUE".- Throws:
IOException
-
makeTextFile
- Throws:
IOException
-