Skip to content
Snippets Groups Projects
Commit f203f468 authored by Lukas Ladenberger's avatar Lukas Ladenberger
Browse files

cleanup

parent c56c38e1
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html)
* */ * */
package de.bmotionstudio.gef.editor.service; package de.bmotionstudio.gef.editor.model.service;
import de.bmotionstudio.gef.editor.AbstractBControlService; import de.bmotionstudio.gef.editor.AbstractBControlService;
import de.bmotionstudio.gef.editor.IBControlService; import de.bmotionstudio.gef.editor.IBControlService;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html)
* */ * */
package de.bmotionstudio.gef.editor.service; package de.bmotionstudio.gef.editor.model.service;
import de.bmotionstudio.gef.editor.AbstractBControlService; import de.bmotionstudio.gef.editor.AbstractBControlService;
import de.bmotionstudio.gef.editor.IBControlService; import de.bmotionstudio.gef.editor.IBControlService;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html)
* */ * */
package de.bmotionstudio.gef.editor.service; package de.bmotionstudio.gef.editor.model.service;
import de.bmotionstudio.gef.editor.AbstractBControlService; import de.bmotionstudio.gef.editor.AbstractBControlService;
import de.bmotionstudio.gef.editor.IBControlService; import de.bmotionstudio.gef.editor.IBControlService;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html) * This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html)
* */ * */
package de.bmotionstudio.gef.editor.service; package de.bmotionstudio.gef.editor.model.service;
import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.gef.palette.ConnectionCreationToolEntry; import org.eclipse.gef.palette.ConnectionCreationToolEntry;
......
/**
* (c) 2009 Lehrstuhl fuer Softwaretechnik und Programmiersprachen,
* Heinrich Heine Universitaet Duesseldorf
* This software is licenced under EPL 1.0 (http://www.eclipse.org/org/documents/epl-v10.html)
* */
package de.bmotionstudio.gef.editor.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
public class FileUtil {
/** Fast & simple file copy. */
public static void copyFile(File source, File dest) throws IOException {
FileChannel in = null, out = null;
try {
in = new FileInputStream(source).getChannel();
out = new FileOutputStream(dest).getChannel();
long size = in.size();
MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0,
size);
out.write(buf);
} finally {
if (in != null)
in.close();
if (out != null)
out.close();
}
}
public static void deleteFile(File f) {
// Attempt to delete it
boolean success = f.delete();
if (!success)
throw new IllegalArgumentException("Delete: deletion failed");
}
}
...@@ -10,7 +10,7 @@ import org.eclipse.core.commands.IHandler; ...@@ -10,7 +10,7 @@ import org.eclipse.core.commands.IHandler;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import de.bmotionstudio.gef.editor.internal.StartVisualizationFileHandler; import de.bmotionstudio.gef.editor.handler.StartVisualizationFileHandler;
/** /**
* @author Lukas Ladenberger * @author Lukas Ladenberger
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment