import net.sf.openrocket.rocketcomponent.ComponentChangeListener;
import net.sf.openrocket.rocketcomponent.Configuration;
import net.sf.openrocket.rocketcomponent.Rocket;
+import net.sf.openrocket.simulation.customexpression.CustomExpression;
import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.ArrayList;
private final Configuration configuration;
private final ArrayList<Simulation> simulations = new ArrayList<Simulation>();
-
+ private ArrayList<CustomExpression> customExpressions = new ArrayList<CustomExpression>();
+
/*
* The undo/redo variables and mechanism are documented in doc/undo-redo-flow.*
}
-
+ public void addCustomExpression(CustomExpression expression){
+ if (customExpressions.contains(expression)){
+ log.user("Could not add custom expression "+expression.getName()+" to document as document alerady has a matching expression.");
+ } else {
+ customExpressions.add(expression);
+ }
+ }
+
+ public void removeCustomExpression(CustomExpression expression){
+ customExpressions.remove(expression);
+ }
+
+ public ArrayList<CustomExpression> getCustomExpressions(){
+ return customExpressions;
+ }
+
public Rocket getRocket() {
return rocket;