if(!(file.isDirectory() && (testFile=FileFactory.getFile(fieldText+file.getName()))!=null && testFile.exists() && testFile.isDirectory()))
startPosition = fieldText.length(); if(!(file.isDirectory() && (testFile=FileFactory.getFile(fieldText+file.getName()))!=null && testFile.exists() && testFile.isDirectory())) { endPosition = file.getName().indexOf('.'); if(endPosition > 0) endPosition += startPosition; else endPosition  = startPosition + file.getName().length();
    public MoveDialog(MainFrame mainFrame, FileSet files) {        super(mainFrame, files);		        init(Translator.get("move_dialog.move"),             Translator.get("move_dialog.move_description"),             Translator.get("move_dialog.move"),             Translator.get("move_dialog.error_title"));                String fieldText;        AbstractFile destFolder = mainFrame.getInactiveTable().getCurrentFolder();        fieldText = destFolder.getAbsolutePath(true);        // Append filename to destination path if there is only one file to move        // and if the file is not a directory that already exists in destination        // (otherwise folder would be moved inside the destination folder)        int nbFiles = files.size();        if(nbFiles==1) {            AbstractFile file = ((AbstractFile)files.elementAt(0));            AbstractFile testFile;            // TODO: find a way to remove this AbstractFile.getFile() which can lock the main thread if the file is on a remote filesystem            if(!(file.isDirectory() && (testFile=FileFactory.getFile(fieldText+file.getName()))!=null && testFile.exists() && testFile.isDirectory()))                fieldText += file.getName();        }        setTextField(fieldText);        showDialog();    }