public static Job getImportFileJob(final FileImporter importer){
final Job job=new Job(importer.getJobQueue(),"importFile",Messages.getString("LocalFileImporter.Importing"),true); //$NON-NLS-1$ //$NON-NLS-2$
job.addRunnable(new JobRunnable("Import",1.0f){ //$NON-NLS-1$
public Object run() throws Exception{
DataUtil serializer=new DataUtil();
System.out.println("Loading "+importer.getFileName()+"..."); //$NON-NLS-1$ //$NON-NLS-2$
long t1=System.currentTimeMillis();
ObjectInputStream in=new ObjectInputStream(new FileInputStream(importer.getFileName()));
Object obj=in.readObject();
if (obj instanceof String) obj=in.readObject(); //check version in the future
DocumentData projectData=(DocumentData)obj;
projectData.setMaster(true);
projectData.setLocal(true);
long t2=System.currentTimeMillis();
System.out.println("Loading...Done in "+(t2-t1)+" ms"); //$NON-NLS-1$ //$NON-NLS-2$
System.out.println("Deserializing..."); //$NON-NLS-1$
t1=System.currentTimeMillis();
// project=serializer.deserializeProject(projectData,false,true,resourceMap);
importer.setProject(serializer.deserializeLocalDocument(projectData));
t2=System.currentTimeMillis();
System.out.println("Deserializing...Done in "+(t2-t1)+" ms"); //$NON-NLS-1$ //$NON-NLS-2$
setProgress(1.0f);
return null;
}