Distinguish building and parsing
The SugarJ plugin should distinguish “building” and “parsing” a file as follows:
Building should be an operation explicitly requested by the user. It generates output visible to other parts of the Eclipse build system, for example, files in the
bin
folder. During a SugarJ build, Eclipse and the user should essentially wait for the build to complete.Parsing should be an operation implicitly triggered by the user interface. The results of parsing should be reflected in the editor but nowhere else. During parsing, Eclipse and the user can do other stuff.
Benefits: Parsing could be faster because, for example, there would be no need to call
javac
. SugarJ could be more easily integrated with the Eclipse build system. Bug #12 would be mostly fixed, because parsing would no longer produce persistent data in the output folder.Implementation: Internally, we still need to compile, of course. But maybe we can have two output folders, one for parsing, and one for building?
Submitted by Tillmann Rendel on 10 May 2011 at 11:55
Issue Log
Implemented an Eclipse builder for SugarJ. The builder is triggered by an explicit Project->Build invocation, a resource refresh or a save file operation.
The parser expects all dependencies to be built beforehand. Hence, the parser does not trigger any compilation.
The project configuration needs to name the SugarJ builder explicitly at the moment. For example:
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>org.sugarj.case-studies</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.sugarj.editor.SugarJBuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
Log in to post comments