This shows you the differences between two versions of the page.
padl_creator_javafile_eclipse [2018/03/04 02:53] |
padl_creator_javafile_eclipse [2019/10/06 20:37] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== PADL Creator JavaFile (Eclipse) ====== | ||
+ | Two third-party projects provide means to create a PADL model from Java source code (instead of [[PADL Creator ClassFile|Java class files]]). Fetch the projects ''PADL Creator JavaFile (JavaC)'' or ''PADL Creator JavaFile (Eclipse)'' from the SVN and use the usual idiom: | ||
+ | |||
+ | <code> | ||
+ | final ICodeLevelModel padlModelFromJavaFiles = | ||
+ | Factory.getInstance().createCodeLevelModel("My name"); | ||
+ | try { | ||
+ | padlModelFromJavaFiles.create(new CompleteJavaFileCreator( | ||
+ | sourcePathEntry, | ||
+ | classPathEntry)); | ||
+ | } | ||
+ | catch (final CreationException e) { | ||
+ | e.printStackTrace(ProxyConsole.getInstance().errorOutput()); | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | :!: The project ''PADL Creator JavaFile (Eclipse)'' is preferred over ''PADL Creator JavaFile (JavaC)'', which is no longer maintained. | ||
+ | |||
+ | :!: The ''padl.generator.helper.ModelGenerator'' interface in project ''[[PADL Generator]]'' hides the implementation details of creating a PADL model and should be used in most of the cases. |