Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java	(revision 3096)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenVLCPlayer.java	(revision 3097)
@@ -1,213 +0,0 @@
-// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-// 
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-// 
-// The TXM platform is distributed in the hope that it will be
-// useful, but WITHOUT ANY WARRANTY; without even the implied
-// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-// PURPOSE. See the GNU General Public License for more
-// details.
-// 
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-// 
-// 
-// 
-// $LastChangedDate:$
-// $LastChangedRevision:$
-// $LastChangedBy:$ 
-//
-package org.txm.backtomedia.commands.function;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URLEncoder;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.txm.backtomedia.editors.input.VLCPlayerEditorInput;
-import org.txm.backtomedia.editors.vlcplayer.VLCPlayerEditor;
-import org.txm.rcp.StatusLine;
-import org.txm.rcp.TXMWindows;
-
-import vlcplayerrcp.MessagesMP;
-
-/**
- * open the VLCPlayer Editor with a selected media file. Path or URL
- * 
- * @author mdecorde.
- */
-public class OpenVLCPlayer extends AbstractHandler {
-	
-	/** The ID. */
-	public static String ID = "org.txm.rcp.commands.BackToMedia"; //$NON-NLS-1$
-	
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
-	@Override
-	public Object execute(ExecutionEvent event) throws ExecutionException {
-		
-		Object o = HandlerUtil.getCurrentSelection(event);
-		IStructuredSelection selection;
-		if (o instanceof IStructuredSelection) {
-			selection = (IStructuredSelection) o;
-			Object s = selection.getFirstElement();
-			if (s instanceof File) {
-				File f = (File) s;
-				
-				try {
-					return openEditor(f.toURI().toURL().toString(), 0);
-				}
-				catch (MalformedURLException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-			}
-		}
-		
-		Shell sh = HandlerUtil.getActiveShell(event);
-		SimpleFileDialog fd = new SimpleFileDialog(sh, "Opening media file...", "Enter file path or URL", "", null);
-		// FileDialog fd = new FileDialog(new Shell(), SWT.SAVE);
-		// fd.setText(MessagesMP.select_file);
-		
-		// String[] filterExt = { "*.*", "*.mp3", "*.ogg", "*.avi", "*.mp4", "*.mov"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		// fd.setFilterExtensions(filterExt);
-		if (fd.open() == fd.OK) {
-			String mrl = fd.getValue();
-			
-			if (mrl != null) {
-				File f = new File(mrl);
-				if (f.exists()) {
-					mrl = new File(mrl).toURI().toString();
-				}
-				else {
-					
-				}
-				return openEditor(mrl, 0);
-			}
-		}
-		
-		return null;
-	}
-	
-	public static VLCPlayerEditor openEditor() {
-		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
-		VLCPlayerEditorInput editorInput = new VLCPlayerEditorInput();
-		StatusLine.setMessage(MessagesMP.opening_media);
-		try {
-			IEditorPart editor = page.openEditor(editorInput, VLCPlayerEditor.ID);
-			if (editor != null && editor instanceof VLCPlayerEditor) {
-				return (VLCPlayerEditor) editor;
-			}
-			else {
-				return null;
-			}
-		}
-		catch (PartInitException e) {
-			e.printStackTrace();
-		}
-		return null;
-	}
-	
-	public static VLCPlayerEditor openEditor(String mrl, int time) {
-		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
-		VLCPlayerEditorInput editorInput = new VLCPlayerEditorInput();
-		StatusLine.setMessage(MessagesMP.opening_media);
-		try {
-			VLCPlayerEditor player = (VLCPlayerEditor) page.openEditor(editorInput, VLCPlayerEditor.ID);
-			if (player != null) {
-				player.getPlayer().play(mrl, time);
-				StatusLine.setMessage("");
-				if (mrl != null) {
-					player.setPartName(new File(mrl).getName());
-				}
-				
-				return player;
-			}
-			else {
-				System.out.println(MessagesMP.error_open_media);
-			}
-		}
-		catch (PartInitException e) {
-			e.printStackTrace();
-		}
-		return null;
-	}
-	
-	public static VLCPlayerEditor openEditor(String mrl, int time, int endtime) {
-		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
-		VLCPlayerEditorInput editorInput = new VLCPlayerEditorInput();
-		StatusLine.setMessage(MessagesMP.opening_media);
-		try {
-			VLCPlayerEditor player = (VLCPlayerEditor) page.openEditor(editorInput, VLCPlayerEditor.ID);
-			
-			// boolean isAudio = mrl.matches(".+\\.(mp3|ogg|wav|wpa)"); //$NON-NLS-1$
-			if (player != null) {
-				player.getPlayer().play(mrl, time, endtime);
-				StatusLine.setMessage("");
-			}
-			else {
-				System.out.println(MessagesMP.error_open_media);
-				return null;
-			}
-			return player;
-		}
-		catch (PartInitException e) {
-			e.printStackTrace();
-		}
-		
-		return null;
-	}
-	
-	public static VLCPlayerEditor openEditor(String path, String sStartTime,
-			String sEndTime) {
-		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
-		VLCPlayerEditorInput editorInput = new VLCPlayerEditorInput();
-		StatusLine.setMessage(MessagesMP.opening_media);
-		try {
-			IEditorPart editor = page.openEditor(editorInput, VLCPlayerEditor.ID);
-			if (editor == null) {
-				return null;
-			}
-			
-			VLCPlayerEditor player = (VLCPlayerEditor) editor;
-			// boolean isAudio = mrl.matches(".+\\.(mp3|ogg|wav|wpa)");
-			if (player != null) {
-				player.getPlayer().play(path, sStartTime, sEndTime);
-				StatusLine.setMessage("");
-			}
-			return player;
-		}
-		catch (PartInitException e) {
-			e.printStackTrace();
-		}
-		
-		return null;
-	}
-}
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenMediaPlayer.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenMediaPlayer.java	(revision 0)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenMediaPlayer.java	(revision 3097)
@@ -0,0 +1,213 @@
+// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.backtomedia.commands.function;
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URLEncoder;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.backtomedia.editors.input.MediaPlayerEditorInput;
+import org.txm.backtomedia.editors.vlcplayer.MediaPlayerEditor;
+import org.txm.rcp.StatusLine;
+import org.txm.rcp.TXMWindows;
+
+import vlcplayerrcp.MessagesMP;
+
+/**
+ * open the Media player Editor with a selected media file. Path or URL
+ * 
+ * @author mdecorde.
+ */
+public class OpenMediaPlayer extends AbstractHandler {
+	
+	/** The ID. */
+	public static String ID = "org.txm.rcp.commands.BackToMedia"; //$NON-NLS-1$
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		Object o = HandlerUtil.getCurrentSelection(event);
+		IStructuredSelection selection;
+		if (o instanceof IStructuredSelection) {
+			selection = (IStructuredSelection) o;
+			Object s = selection.getFirstElement();
+			if (s instanceof File) {
+				File f = (File) s;
+				
+				try {
+					return openEditor(f.toURI().toURL().toString(), 0);
+				}
+				catch (MalformedURLException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		}
+		
+		Shell sh = HandlerUtil.getActiveShell(event);
+		SimpleFileDialog fd = new SimpleFileDialog(sh, "Opening media file...", "Enter file path or URL", "", null);
+		// FileDialog fd = new FileDialog(new Shell(), SWT.SAVE);
+		// fd.setText(MessagesMP.select_file);
+		
+		// String[] filterExt = { "*.*", "*.mp3", "*.ogg", "*.avi", "*.mp4", "*.mov"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		// fd.setFilterExtensions(filterExt);
+		if (fd.open() == fd.OK) {
+			String mrl = fd.getValue();
+			
+			if (mrl != null) {
+				File f = new File(mrl);
+				if (f.exists()) {
+					mrl = new File(mrl).toURI().toString();
+				}
+				else {
+					
+				}
+				return openEditor(mrl, 0);
+			}
+		}
+		
+		return null;
+	}
+	
+	public static MediaPlayerEditor openEditor() {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		MediaPlayerEditorInput editorInput = new MediaPlayerEditorInput();
+		StatusLine.setMessage(MessagesMP.opening_media);
+		try {
+			IEditorPart editor = page.openEditor(editorInput, MediaPlayerEditor.ID);
+			if (editor != null && editor instanceof MediaPlayerEditor) {
+				return (MediaPlayerEditor) editor;
+			}
+			else {
+				return null;
+			}
+		}
+		catch (PartInitException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	public static MediaPlayerEditor openEditor(String mrl, int time) {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		MediaPlayerEditorInput editorInput = new MediaPlayerEditorInput();
+		StatusLine.setMessage(MessagesMP.opening_media);
+		try {
+			MediaPlayerEditor player = (MediaPlayerEditor) page.openEditor(editorInput, MediaPlayerEditor.ID);
+			if (player != null) {
+				player.getPlayer().play(mrl, time);
+				StatusLine.setMessage("");
+				if (mrl != null) {
+					player.setPartName(new File(mrl).getName());
+				}
+				
+				return player;
+			}
+			else {
+				System.out.println(MessagesMP.error_open_media);
+			}
+		}
+		catch (PartInitException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	public static MediaPlayerEditor openEditor(String mrl, int time, int endtime) {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		MediaPlayerEditorInput editorInput = new MediaPlayerEditorInput();
+		StatusLine.setMessage(MessagesMP.opening_media);
+		try {
+			MediaPlayerEditor player = (MediaPlayerEditor) page.openEditor(editorInput, MediaPlayerEditor.ID);
+			
+			// boolean isAudio = mrl.matches(".+\\.(mp3|ogg|wav|wpa)"); //$NON-NLS-1$
+			if (player != null) {
+				player.getPlayer().play(mrl, time, endtime);
+				StatusLine.setMessage("");
+			}
+			else {
+				System.out.println(MessagesMP.error_open_media);
+				return null;
+			}
+			return player;
+		}
+		catch (PartInitException e) {
+			e.printStackTrace();
+		}
+		
+		return null;
+	}
+	
+	public static MediaPlayerEditor openEditor(String path, String sStartTime,
+			String sEndTime) {
+		IWorkbenchPage page = TXMWindows.getActiveWindow().getActivePage();
+		MediaPlayerEditorInput editorInput = new MediaPlayerEditorInput();
+		StatusLine.setMessage(MessagesMP.opening_media);
+		try {
+			IEditorPart editor = page.openEditor(editorInput, MediaPlayerEditor.ID);
+			if (editor == null) {
+				return null;
+			}
+			
+			MediaPlayerEditor player = (MediaPlayerEditor) editor;
+			// boolean isAudio = mrl.matches(".+\\.(mp3|ogg|wav|wpa)");
+			if (player != null) {
+				player.getPlayer().play(path, sStartTime, sEndTime);
+				StatusLine.setMessage("");
+			}
+			return player;
+		}
+		catch (PartInitException e) {
+			e.printStackTrace();
+		}
+		
+		return null;
+	}
+}

Property changes on: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/OpenMediaPlayer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java	(revision 3096)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/commands/function/BackToMedia.java	(revision 3097)
@@ -46,7 +46,7 @@
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.part.EditorPart;
 import org.txm.backtomedia.editors.vlcplayer.VLCPlayer;
-import org.txm.backtomedia.editors.vlcplayer.VLCPlayerEditor;
+import org.txm.backtomedia.editors.vlcplayer.MediaPlayerEditor;
 import org.txm.backtomedia.preferences.BackToMediaPreferences;
 import org.txm.concordance.core.functions.Line;
 import org.txm.concordance.rcp.editors.ConcordanceEditor;
@@ -90,7 +90,7 @@
 	/** The selection. */
 	private IStructuredSelection selection;
 	
-	private static HashMap<IWorkbenchPart, VLCPlayerEditor> associatedEditors = new HashMap<>();
+	private static HashMap<IWorkbenchPart, MediaPlayerEditor> associatedEditors = new HashMap<>();
 	
 	/*
 	 * (non-Javadoc)
@@ -508,14 +508,14 @@
 			Log.fine(MessagesMP.BackToMedia_25 + path);
 			
 			// System.out.println("Linked editors: "+associatedEditors);
-			VLCPlayerEditor vlcEditor = null;
+			MediaPlayerEditor vlcEditor = null;
 			if (editor != null) {
 				vlcEditor = associatedEditors.get(editor);
 			}
 			
 			if (vlcEditor == null || vlcEditor.getPlayer().isDisposed()) {
 				// System.out.println("new editor linked to "+ce);
-				vlcEditor = OpenVLCPlayer.openEditor();
+				vlcEditor = OpenMediaPlayer.openEditor();
 				
 				// editor.getPlayer().setRepeat(true);
 				if (vlcEditor == null) {
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/input/VLCPlayerEditorInput.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/input/VLCPlayerEditorInput.java	(revision 3096)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/input/VLCPlayerEditorInput.java	(revision 3097)
@@ -1,131 +0,0 @@
-// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-// 
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-// 
-// The TXM platform is distributed in the hope that it will be
-// useful, but WITHOUT ANY WARRANTY; without even the implied
-// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-// PURPOSE. See the GNU General Public License for more
-// details.
-// 
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-// 
-// 
-// 
-// $LastChangedDate:$
-// $LastChangedRevision:$
-// $LastChangedBy:$ 
-//
-package org.txm.backtomedia.editors.input;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.txm.rcp.Application;
-import org.txm.rcp.IImageKeys;
-
-// TODO: Auto-generated Javadoc
-/**
- * VLCEditor input
- *
- * @author mdecorde
- */
-public class VLCPlayerEditorInput implements IEditorInput {
-	
-	/**
-	 * Instantiates a new VLC player editor input.
-	 *
-	 * @param src the source
-	 */
-	public VLCPlayerEditorInput() {
-		super();
-	}
-	
-	/**
-	 * Exists.
-	 *
-	 * @return true, if successful
-	 * @see org.eclipse.ui.IEditorInput#exists()
-	 */
-	@Override
-	public boolean exists() {
-		return false;
-	}
-	
-	/**
-	 * Gets the image descriptor.
-	 *
-	 * @return the image descriptor
-	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
-	 */
-	@Override
-	public ImageDescriptor getImageDescriptor() {
-		return AbstractUIPlugin.imageDescriptorFromPlugin(
-				Application.PLUGIN_ID,
-				IImageKeys.ACTION_WORDCLOUD);
-	}
-	
-	/**
-	 * Gets the name.
-	 *
-	 * @return the name
-	 * @see org.eclipse.ui.IEditorInput#getName()
-	 */
-	@Override
-	public String getName() {
-		return "VLCPlayer"; //$NON-NLS-1$
-	}
-	
-	/**
-	 * Gets the persistable.
-	 *
-	 * @return the persistable
-	 * @see org.eclipse.ui.IEditorInput#getPersistable()
-	 */
-	@Override
-	public IPersistableElement getPersistable() {
-		return null;
-	}
-	
-	/**
-	 * Gets the tool tip text.
-	 *
-	 * @return the tool tip text
-	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
-	 */
-	@Override
-	public String getToolTipText() {
-		return getName();
-	}
-	
-	/**
-	 * Gets the adapter.
-	 *
-	 * @param arg0 the arg0
-	 * @return the adapter
-	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-	 */
-	@Override
-	public Object getAdapter(@SuppressWarnings("rawtypes") Class arg0) {
-		return null;
-	}
-	
-	/**
-	 * Gets the source.
-	 *
-	 * @return the Correspondance analysis underlying object
-	 */
-	public Object getSource() {
-		return ""; //$NON-NLS-1$
-	}
-}
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/input/MediaPlayerEditorInput.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/input/MediaPlayerEditorInput.java	(revision 0)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/input/MediaPlayerEditorInput.java	(revision 3097)
@@ -0,0 +1,130 @@
+// Copyright © 2010-2020 ENS de Lyon., University of Franche-Comté
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.backtomedia.editors.input;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.txm.rcp.Application;
+import org.txm.rcp.IImageKeys;
+
+/**
+ * MEdia player editor input
+ *
+ * @author mdecorde
+ */
+public class MediaPlayerEditorInput implements IEditorInput {
+	
+	/**
+	 * Instantiates a new Media player editor input.
+	 *
+	 * @param src the source
+	 */
+	public MediaPlayerEditorInput() {
+		super();
+	}
+	
+	/**
+	 * Exists.
+	 *
+	 * @return true, if successful
+	 * @see org.eclipse.ui.IEditorInput#exists()
+	 */
+	@Override
+	public boolean exists() {
+		return false;
+	}
+	
+	/**
+	 * Gets the image descriptor.
+	 *
+	 * @return the image descriptor
+	 * @see org.eclipse.ui.IEditorInput#getImageDescriptor()
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor() {
+		return AbstractUIPlugin.imageDescriptorFromPlugin(
+				Application.PLUGIN_ID,
+				IImageKeys.ACTION_WORDCLOUD);
+	}
+	
+	/**
+	 * Gets the name.
+	 *
+	 * @return the name
+	 * @see org.eclipse.ui.IEditorInput#getName()
+	 */
+	@Override
+	public String getName() {
+		return "Media Player"; //$NON-NLS-1$
+	}
+	
+	/**
+	 * Gets the persistable.
+	 *
+	 * @return the persistable
+	 * @see org.eclipse.ui.IEditorInput#getPersistable()
+	 */
+	@Override
+	public IPersistableElement getPersistable() {
+		return null;
+	}
+	
+	/**
+	 * Gets the tool tip text.
+	 *
+	 * @return the tool tip text
+	 * @see org.eclipse.ui.IEditorInput#getToolTipText()
+	 */
+	@Override
+	public String getToolTipText() {
+		return getName();
+	}
+	
+	/**
+	 * Gets the adapter.
+	 *
+	 * @param arg0 the arg0
+	 * @return the adapter
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(@SuppressWarnings("rawtypes") Class arg0) {
+		return null;
+	}
+	
+	/**
+	 * Gets the source.
+	 *
+	 * @return the Correspondance analysis underlying object
+	 */
+	public Object getSource() {
+		return ""; //$NON-NLS-1$
+	}
+}

Property changes on: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/input/MediaPlayerEditorInput.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayerEditor.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayerEditor.java	(revision 3096)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/VLCPlayerEditor.java	(revision 3097)
@@ -1,111 +0,0 @@
-package org.txm.backtomedia.editors.vlcplayer;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorPart;
-import org.txm.backtomedia.commands.function.MediaPreferences;
-import org.txm.backtomedia.preferences.BackToMediaPreferences;
-
-public class VLCPlayerEditor extends EditorPart {
-	
-	/** The Constant ID. */
-	public static final String ID = VLCPlayerEditor.class.getCanonicalName(); // $NON-NLS-1$
-	
-	IPlayer player;
-	
-	@Override
-	public void createPartControl(Composite parent) {
-		if ("JFX".equals(BackToMediaPreferences.getInstance().getString(BackToMediaPreferences.PLAYER))) {
-			player = new JFXPlayer(parent, SWT.NONE);
-		}
-		else if ("VLC".equals(BackToMediaPreferences.getInstance().getString(BackToMediaPreferences.PLAYER))) {
-			player = new VLCPlayer(parent, SWT.NONE);
-		}
-		else {
-			player = new JFXPlayer(parent, SWT.NONE);
-		}
-	}
-	
-	public void init() {
-		
-	}
-	
-	@Override
-	public void setFocus() {
-		
-	}
-	
-	@Override
-	public void dispose() {
-		try {
-			if (player != null) player.stop();
-		}
-		catch (Exception e) {
-			e.printStackTrace();
-		}
-		
-		super.dispose();
-	}
-	
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	@Override
-	public void doSave(IProgressMonitor monitor) {}
-	
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
-	 */
-	@Override
-	public void doSaveAs() {}
-	
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
-	 */
-	@Override
-	public void init(IEditorSite site, IEditorInput input)
-			throws PartInitException {
-		setSite(site);
-		setInput(input);
-		// VLCPlayerEditorInput ii = (VLCPlayerEditorInput) input;
-	}
-	
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
-	 */
-	@Override
-	public boolean isSaveAsAllowed() {
-		return false;
-	}
-	
-	public IPlayer getPlayer() {
-		return player;
-	}
-	
-	@Override
-	public void setPartName(String partName) {
-		super.setPartName(partName);
-	}
-	
-	@Override
-	public boolean isDirty() {
-		return false;
-	}
-	
-	/**
-	 * for more test use "player.getEmbeddedMediaPlayer()"
-	 * 
-	 * @return false if the media could not be loaded (file not found, access error...)
-	 */
-	public boolean isMediaLoaded() {
-		return player.isMediaLoaded();
-	}
-}
Index: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/MediaPlayerEditor.java
===================================================================
--- tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/MediaPlayerEditor.java	(revision 0)
+++ tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/MediaPlayerEditor.java	(revision 3097)
@@ -0,0 +1,110 @@
+package org.txm.backtomedia.editors.vlcplayer;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.txm.backtomedia.preferences.BackToMediaPreferences;
+
+public class MediaPlayerEditor extends EditorPart {
+	
+	/** The Constant ID. */
+	public static final String ID = MediaPlayerEditor.class.getCanonicalName(); // $NON-NLS-1$
+	
+	IPlayer player;
+	
+	@Override
+	public void createPartControl(Composite parent) {
+		if ("JFX".equals(BackToMediaPreferences.getInstance().getString(BackToMediaPreferences.PLAYER))) {
+			player = new JFXPlayer(parent, SWT.NONE);
+		}
+		else if ("VLC".equals(BackToMediaPreferences.getInstance().getString(BackToMediaPreferences.PLAYER))) {
+			player = new VLCPlayer(parent, SWT.NONE);
+		}
+		else {
+			player = new JFXPlayer(parent, SWT.NONE);
+		}
+	}
+	
+	public void init() {
+		
+	}
+	
+	@Override
+	public void setFocus() {
+		
+	}
+	
+	@Override
+	public void dispose() {
+		try {
+			if (player != null) player.stop();
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}
+		
+		super.dispose();
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	public void doSave(IProgressMonitor monitor) {}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+	 */
+	@Override
+	public void doSaveAs() {}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+	 */
+	@Override
+	public void init(IEditorSite site, IEditorInput input)
+			throws PartInitException {
+		setSite(site);
+		setInput(input);
+		// VLCPlayerEditorInput ii = (VLCPlayerEditorInput) input;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+	 */
+	@Override
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+	
+	public IPlayer getPlayer() {
+		return player;
+	}
+	
+	@Override
+	public void setPartName(String partName) {
+		super.setPartName(partName);
+	}
+	
+	@Override
+	public boolean isDirty() {
+		return false;
+	}
+	
+	/**
+	 * for more test use "player.getEmbeddedMediaPlayer()"
+	 * 
+	 * @return false if the media could not be loaded (file not found, access error...)
+	 */
+	public boolean isMediaLoaded() {
+		return player.isMediaLoaded();
+	}
+}

Property changes on: tmp/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/vlcplayer/MediaPlayerEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.backtomedia.rcp/plugin.xml
===================================================================
--- tmp/org.txm.backtomedia.rcp/plugin.xml	(revision 3096)
+++ tmp/org.txm.backtomedia.rcp/plugin.xml	(revision 3097)
@@ -76,7 +76,7 @@
    <extension
          point="org.eclipse.ui.commands">
       <command
-            defaultHandler="org.txm.backtomedia.commands.function.OpenVLCPlayer"
+            defaultHandler="org.txm.backtomedia.commands.function.OpenMediaPlayer"
             description="%command.description"
             id="org.txm.backtomedia.commands.function.OpenVLCPlayer"
             name="%command.name">
@@ -125,7 +125,7 @@
    <extension
          point="org.eclipse.ui.editors">
       <editor
-            class="org.txm.backtomedia.editors.vlcplayer.VLCPlayerEditor"
+            class="org.txm.backtomedia.editors.vlcplayer.MediaPlayerEditor"
             default="false"
             id="org.txm.backtomedia.editors.vlcplayer.VLCPlayerEditor"
             name="%editor.name">
