Index: src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp
===================================================================
--- src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp	(revision 0b2ce98def2d6ab9548ba5ac25acbb2ab5bc233c)
+++ src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp	(revision 1fd67574a5cc6c07a5638d5d343eae3b6bbdb9bf)
@@ -20,6 +20,4 @@
 #include "Helpers/MemDebug.hpp"
 
-#include "Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.hpp"
-#include "Actions/ActionRegistry.hpp"
 #include "atom.hpp"
 #include "defs.hpp"
@@ -35,75 +33,25 @@
 using namespace std;
 
-#include "UIElements/UIFactory.hpp"
-#include "UIElements/Dialog.hpp"
-#include "Actions/ValueStorage.hpp"
+#include "Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.hpp"
 
+// and construct the stuff
+#include "LinearInterpolationofTrajectoriesAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performCall() {
+  molecule *mol = NULL;
 
-/****** MoleculeLinearInterpolationofTrajectoriesAction *****/
-
-// memento to remember the state when undoing
-
-//class MoleculeLinearInterpolationofTrajectoriesState : public ActionState {
-//public:
-//  MoleculeLinearInterpolationofTrajectoriesState(molecule* _mol,std::string _lastName) :
-//    mol(_mol),
-//    lastName(_lastName)
-//  {}
-//  molecule* mol;
-//  std::string lastName;
-//};
-
-const char MoleculeLinearInterpolationofTrajectoriesAction::NAME[] = "linear-interpolate";
-
-MoleculeLinearInterpolationofTrajectoriesAction::MoleculeLinearInterpolationofTrajectoriesAction() :
-  Action(NAME)
-{}
-
-MoleculeLinearInterpolationofTrajectoriesAction::~MoleculeLinearInterpolationofTrajectoriesAction()
-{}
-
-void MoleculeLinearInterpolationofTrajectories(std::string &filename, int start, int end, bool IdMapping) {
-  ValueStorage::getInstance().setCurrentValue(MoleculeLinearInterpolationofTrajectoriesAction::NAME, filename);
-  ValueStorage::getInstance().setCurrentValue("start-step", start);
-  ValueStorage::getInstance().setCurrentValue("end-step", end);
-  ValueStorage::getInstance().setCurrentValue("id-mapping", IdMapping);
-  ActionRegistry::getInstance().getActionByName(MoleculeLinearInterpolationofTrajectoriesAction::NAME)->call(Action::NonInteractive);
-};
-
-void MoleculeLinearInterpolationofTrajectoriesAction::getParametersfromValueStorage()
-{};
-
-Dialog* MoleculeLinearInterpolationofTrajectoriesAction::fillDialog(Dialog *dialog) {
-  ASSERT(dialog,"No Dialog given when filling action dialog");
-
-  dialog->queryString(NAME, ValueStorage::getInstance().getDescription(NAME));
-  dialog->queryInt("start-step", ValueStorage::getInstance().getDescription("start-step"));
-  dialog->queryInt("end-step", ValueStorage::getInstance().getDescription("end-step"));
-  dialog->queryBoolean("id-mapping", ValueStorage::getInstance().getDescription("id-mapping"));
-
-  return dialog;
-}
-
-Action::state_ptr MoleculeLinearInterpolationofTrajectoriesAction::performCall() {
-  string filename;
-  molecule *mol = NULL;
-  int start = -1;
-  int end = -1;
-  bool IdMapping = true;
-
-  ValueStorage::getInstance().queryCurrentValue(NAME, filename);
-  ValueStorage::getInstance().queryCurrentValue("start-step", start);
-  ValueStorage::getInstance().queryCurrentValue("end-step", end);
-  ValueStorage::getInstance().queryCurrentValue("id-mapping", IdMapping);
+  // obtain information
+  getParametersfromValueStorage();
 
   for (World::MoleculeSelectionIterator iter = World::getInstance().beginMoleculeSelection(); iter != World::getInstance().endMoleculeSelection(); ++iter) {
     mol = iter->second;
-    DoLog(1) && (Log() << Verbose(1) << "Linear interpolation between configuration " << start << " and " << end << "." << endl);
-    if (IdMapping)
+    DoLog(1) && (Log() << Verbose(1) << "Linear interpolation between configuration " << params.start << " and " << params.end << "." << endl);
+    if (params.IdMapping)
       DoLog(1) && (Log() << Verbose(1) << "Using Identity for the permutation map." << endl);
-    if (!mol->LinearInterpolationBetweenConfiguration(start, end, filename, *(World::getInstance().getConfig()), IdMapping))
-      DoLog(2) && (Log() << Verbose(2) << "Could not store " << filename << " files." << endl);
+    if (!mol->LinearInterpolationBetweenConfiguration(params.start, params.end, params.filename, *(World::getInstance().getConfig()), params.IdMapping))
+      DoLog(2) && (Log() << Verbose(2) << "Could not store " << params.filename << " files." << endl);
     else
-      DoLog(2) && (Log() << Verbose(2) << "Steps created and " << filename << " files stored." << endl);
+      DoLog(2) && (Log() << Verbose(2) << "Steps created and " << params.filename << " files stored." << endl);
   }
   return Action::success;
@@ -135,2 +83,3 @@
   return NAME;
 }
+/** =========== end of function ====================== */
