diff --git a/de.bmotionstudio.rodin/src/de/bmotionstudio/rodin/StartEventBVisualizationHandler.java b/de.bmotionstudio.rodin/src/de/bmotionstudio/rodin/StartEventBVisualizationHandler.java index 7d0799c38ad624891800d6b6cf41c0e6b64877d7..73fdccadfa2dac75a95554de9becd38b45f02744 100644 --- a/de.bmotionstudio.rodin/src/de/bmotionstudio/rodin/StartEventBVisualizationHandler.java +++ b/de.bmotionstudio.rodin/src/de/bmotionstudio/rodin/StartEventBVisualizationHandler.java @@ -1,40 +1,40 @@ -/** - * (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.rodin; - -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.viewers.IStructuredSelection; - -import de.bmotionstudio.gef.editor.handler.StartVisualizationFileHandler; - -/** - * @author Lukas Ladenberger - * - */ -public class StartEventBVisualizationHandler extends - StartVisualizationFileHandler implements IHandler { - - @Override - protected IFile getBmsFileFromSelection(IStructuredSelection ssel) { - if (ssel.getFirstElement() instanceof BMotionStudioRodinFile) { - IResource resource = ((BMotionStudioRodinFile) ssel - .getFirstElement()).getResource(); - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - IPath location = Path.fromOSString(resource.getFullPath() - .toOSString()); - return workspace.getRoot().getFileForLocation(location); - } - return null; - } - -} +/** + * (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.rodin; + +import org.eclipse.core.commands.IHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.jface.viewers.IStructuredSelection; + +import de.bmotionstudio.gef.editor.handler.StartVisualizationFileHandler; + +/** + * @author Lukas Ladenberger + * + */ +public class StartEventBVisualizationHandler extends + StartVisualizationFileHandler implements IHandler { + + @Override + protected IFile getBmsFileFromSelection(IStructuredSelection ssel) { + if (ssel.getFirstElement() instanceof BMotionStudioRodinFile) { + IResource resource = ((BMotionStudioRodinFile) ssel + .getFirstElement()).getResource(); + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + IPath location = Path.fromOSString(resource.getFullPath() + .toOSString()); + return workspace.getRoot().getFile(location); + } + return null; + } + +}