Skip to content

Commit

Permalink
refactor: remove old unmaintained/broken code
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus authored and tdurieux committed Nov 7, 2016
1 parent 3b88ba8 commit eab80ae
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 748 deletions.
3 changes: 0 additions & 3 deletions doc/command_line.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ Options :
[(-o|--output) <output>]
Specify where to place generated java files. (default: spooned)

[--properties <properties>]
Directory to search for spoon properties files.

[--source-classpath <source-classpath>]
An optional classpath to be passed to the internal Java compiler when
building or compiling the input sources.
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/spoon/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,6 @@ protected static JSAP defineArgs() {
opt2.setRequired(false);
jsap.registerParameter(opt2);

// Location of properties files
opt2 = new FlaggedOption("properties");
opt2.setLongFlag("properties");
opt2.setStringParser(FileStringParser.getParser());
opt2.setRequired(false);
opt2.setHelp("Directory to search for spoon properties files.");
jsap.registerParameter(opt2);

// Source classpath
opt2 = new FlaggedOption("source-classpath");
opt2.setLongFlag("source-classpath");
Expand Down Expand Up @@ -435,18 +427,13 @@ protected void processArguments() {
// environment initialization
environment.setComplianceLevel(jsapActualArgs.getInt("compliance"));
environment.setLevel(jsapActualArgs.getString("level"));
LOGGER.setLevel(environment.getLevel());
environment.setXmlRootFolder(jsapActualArgs.getFile("properties"));

environment.setAutoImports(jsapActualArgs.getBoolean("imports"));
environment.setNoClasspath(jsapActualArgs.getBoolean("noclasspath"));
environment.setPreserveLineNumbers(jsapActualArgs.getBoolean("lines"));

environment.setTabulationSize(jsapActualArgs.getInt("tabsize"));
environment.useTabulations(jsapActualArgs.getBoolean("tabs"));
environment.setCopyResources(!jsapActualArgs.getBoolean("no-copy-resources"));
environment.setCommentEnabled(jsapActualArgs.getBoolean("enable-comments"));

environment.setShouldCompile(jsapActualArgs.getBoolean("compile"));
environment.setSelfChecks(jsapActualArgs.getBoolean("disable-model-self-checks"));

Expand Down
21 changes: 0 additions & 21 deletions src/main/java/spoon/SpoonTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ public void setType(String type) {

List<ProcessorType> processorTypes = new ArrayList<>();

File properties;

Vector<FileSet> sourcefilesets = new Vector<>();

boolean stats = false;
Expand Down Expand Up @@ -258,17 +256,6 @@ public void execute() throws BuildException {
createArg().setValue(f);
}

// properties directory
if (properties != null) {
createArg().setValue("--properties");
if (!properties.exists()) {
throw new BuildException(
"properties directory does not exist ("
+ properties.getAbsolutePath() + ")");
}
createArg().setValue(properties.getAbsolutePath());
}

// processors
if ((processorTypes != null) && (processorTypes.size() > 0)) {
createArg().setValue("-p");
Expand Down Expand Up @@ -355,14 +342,6 @@ public void setDestination(File destination) {
this.destination = destination;
}

/**
* Sets the root directory where the processors' properties XML
* configuration files are located.
*/
public void setProperties(File properties) {
this.properties = properties;
}

/**
* Enables/disable printing out statistics on Spoon execution time.
*/
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/spoon/compiler/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package spoon.compiler;

import org.apache.log4j.Level;

import spoon.processing.FileGenerator;
import spoon.processing.ProblemFixer;
import spoon.processing.ProcessingManager;
Expand All @@ -27,8 +26,6 @@
import spoon.reflect.declaration.CtMethod;
import spoon.reflect.factory.Factory;

import java.io.File;

/**
* This interface represents the environment in which Spoon is launched -
* accessible through {@link spoon.reflect.factory.Factory#getEnvironment()}. Its
Expand Down Expand Up @@ -191,12 +188,6 @@ void report(Processor<?> processor, Level level,
*/
void setAutoImports(boolean autoImports);

/**
* Sets the root folder where the processors' XML configuration files are
* located.
*/
void setXmlRootFolder(File xmlRootFolder);

/**
* Gets the error count from building, processing, and compiling within this
* environment.
Expand Down
245 changes: 0 additions & 245 deletions src/main/java/spoon/processing/XMLAnnotationProcessor.java

This file was deleted.

Loading

0 comments on commit eab80ae

Please sign in to comment.