Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1217)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1218)
@@ -84,8 +84,8 @@
 	 * If true, the computing will build the main corpus, editions, texts, etc.
 	 */
 	protected boolean needToBuild;
-	
 
+
 	@Parameter(key=TBXPreferences.CLEAN)
 	private boolean pCleanAfterBuild;
 
@@ -186,7 +186,7 @@
 		this.setVisible(false);
 
 		initRCPStuffs();
-		
+
 		// FIXME: SJ: this code doesn't flush the other nodes (EditionsPreferences, Tokenizer, etc. see if it's a problem at this stage or not)
 		this.autoSaveParametersFromAnnotations();
 		this.saveParameters();
@@ -202,7 +202,7 @@
 	public Project(Workspace workspace, String name) throws Exception {
 		this(workspace, name, true);
 	}
-	
+
 	/**
 	 * Instantiates a new existing project from persistence.
 	 * This project will not be builded, main corpus, texts, editions, etc. will be restored from persistence.
@@ -218,7 +218,7 @@
 		this.dirty = false;
 		this.hasBeenComputedOnce = true;
 		this.setVisible(false);
-		
+
 		initRCPStuffs();
 
 		//		
@@ -245,14 +245,14 @@
 			Log.severe("Project.canCompute(): can not compute with missing name.");
 			return false;
 		}
-		
+
 		if(this.needToBuild == true && (pSrcDirectory == null || pImportModuleName == null))	{
 			Log.severe("Project.canCompute(): the project needs to build but source directory or import module name is missing.");
 			return false;
 		}
 		return true;
 	}
-	
+
 	/**
 	 * flag the project to be rebuild with the Import module
 	 */
@@ -266,13 +266,13 @@
 
 		// build the main corpus, texts, editions, etc.
 		if(this.needToBuild)	{
-			
+
 			//		if (pImportXMLParameters != null) {
 			//			pImportXMLParameters.load();
 			//			this._load(pImportXMLParameters.name);
 			//			// convert to new preferences persistence
 			//		}
-	
+
 			if (!rcpProject.getName().equals(userName)) { // project directory and project name must stay in sync
 				IPath destination = new Path(this.getName());
 				if (destination.toFile().exists()) {
@@ -281,9 +281,9 @@
 				}
 				rcpProject.move(destination, true, null);
 			}
-	
+
 			ImportEngines engines = Toolbox.getImportEngines();
-	
+
 			//File scriptfile = new File(Toolbox.getTxmHomePath(), "scripts/groovy/user/org/txm/scripts/importer/"+importName+"/"+importName+"Loader.groovy"); //$NON-NLS-1$
 			ImportEngine engine = engines.getEngine(getImportModuleName());
 			if (engine == null) {
@@ -296,37 +296,37 @@
 				//				}
 				//			};
 				//Log.severe("Project._compute(): Import engine not found.");
-	
+
 				// no import set
 				return true;
 			}
-	
+
 			if (monitor == null || monitor.isCanceled()) {
 				monitor = new LogMonitor("computing "+this);
 			}
-	
+
 			Log.finest("RUNNING IMPORT MODULE WITH NAME = " + getImportModuleName());
-			
+
 			// This step could be done only if the compiler step if done and only if it modifying/deleteing the corpus builds
 			for (CorpusBuild corpus : getCorpusBuilds()) {
 				if (corpus != null) {
 					corpus.deleteChildren(null); // remove all Corpus results
 				}
 			}
-			
+
 			boolean state = engine.build(this, monitor).isOK();
 			if(state == true)	{
 				this.needToBuild = false;
 			}
 			return state;
-		
+
 		}
 		// Nothing to do if the project does not need to build
 		else	{
 			return true;
 		}
 	}
-	
+
 	/**
 	 * Initializes the RCP project and project scope.
 	 * 
@@ -481,6 +481,27 @@
 	public boolean _load(BaseOldParameters params) throws Exception {
 		params.load();
 		userName = params.name;
+		
+		// set the improt module name using the Loader script name
+		this.pImportModuleName = params.scriptFile;
+		if (this.pImportModuleName != null) {
+			int idx = this.pImportModuleName.indexOf("Loader.groovy");
+			if (idx > 0) {
+				this.pImportModuleName = this.pImportModuleName.substring(0, idx);
+				idx = this.pImportModuleName.lastIndexOf("/");
+				if (idx > 0 && this.pImportModuleName.length() > idx) {
+					this.pImportModuleName = this.pImportModuleName.substring(idx+1);
+				}
+			}
+		} else {
+			this.pImportModuleName = "xtz";
+		}
+		
+		this.pSrcDirectory = params.paramFile.getParentFile();
+		if (pSrcDirectory == null) {
+			pSrcDirectory = new File(getProjectDirectory(), "src");
+		}
+		
 		File dir = new File(this.getWorkspace().getLocation(), userName);
 		File paramFile = new File(dir, "import.xml");
 		if (!paramFile.exists()) return false;
@@ -747,7 +768,7 @@
 
 		if (binarydir.exists() && exportzip.getParentFile().exists()) {
 			this.save();
-			
+
 			try {
 				Zip.compress(binarydir, exportzip, monitor);
 			} catch (IOException e) {
@@ -898,7 +919,7 @@
 				e.printStackTrace();
 			}
 		}
-		
+
 		Toolbox.notifyEngines(this, "clean");
 		//DeleteDir.deleteDirectory(getProjectDirectory());
 	}
@@ -1234,10 +1255,10 @@
 		try {
 			ProjectScope scope = this.getPreferencesScope();
 			scope.getNode("").flush();
-			
+
 			autoSaveParametersFromAnnotations();
 			saveParameters();
-			
+
 			List<TXMResult> results = this.getDeepChildren();
 			for (int i = 0; i < results.size(); i++) {
 				TXMResult r = results.get(i);
@@ -1247,7 +1268,7 @@
 					TXMPreferences.flush(r);
 				}
 			}
-			
+
 			Toolbox.notifyEngines(this, "save"); // save things before exporting or else
 		} catch (Exception e) {
 			e.printStackTrace();
@@ -1259,7 +1280,7 @@
 	public IProject getRCPProject() {
 		return rcpProject;
 	}
-	
+
 	public String toString() {
 		return this.userName+" "+this.rcpProject.getLocation();
 	}
