Package org.rssowl.contrib.podcast.ui.media.action

Source Code of org.rssowl.contrib.podcast.ui.media.action.ID3ViewAction

/*   **********************************************************************  **
**   Copyright notice                                                       **
**                                                                          **
**   (c) 2005-2006 RSSOwl Development Team                                  **
**   http://www.rssowl.org/                                                 **
**                                                                          **
**   All rights reserved                                                    **
**                                                                          **
**   This program and the accompanying materials are made available under   **
**   the terms of the Eclipse Public License v1.0 which accompanies this    **
**   distribution, and is available at:                                     **
**   http://www.rssowl.org/legal/epl-v10.html                               **
**                                                                          **
**   A copy is found in the file epl-v10.html and important notices to the  **
**   license from the team is found in the textfile LICENSE.txt distributed **
**   in this package.                                                       **
**                                                                          **
**   This copyright notice MUST APPEAR in all copies of the file!           **
**                                                                          **
**   Contributors:                                                          **
**     Christophe Bouhier - podcast plugin                         **
**                                                                          **
**  **********************************************************************  */

package org.rssowl.contrib.podcast.ui.media.action;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.rssowl.contrib.i18n.Messages;
import org.rssowl.contrib.podcast.model.IXFile;
import org.rssowl.contrib.podcast.ui.IControllerAction;
import org.rssowl.contrib.podcast.ui.media.MediaController;

public class ID3ViewAction extends Action implements IControllerAction<MediaController>,
    IWorkbenchWindowActionDelegate {

  @SuppressWarnings("unused")
  private Shell fShell;
  private MediaController mController;
  @SuppressWarnings("unused")
  private IStructuredSelection mSelection;
   
  public ID3ViewAction(IStructuredSelection pSelection){
    mSelection = pSelection;
  }
 
 
  public void dispose() {
  }

  public void init(IWorkbenchWindow window) {
    fShell = window.getShell();
  }

  public void run(IAction action) {
    run();
  }
 
  public void run(){

   
    //    if (lFile != null && mID3Controller != null) {
//      mID3Controller.showID3View(lFile);
//    }
  }
 
  public void selectionChanged(IAction action, ISelection selection) {
    if (selection instanceof IStructuredSelection) {
      mSelection = (IStructuredSelection) selection;
    }
  }

  public boolean conditionMet(Object pConditionObject) {
  if (pConditionObject instanceof IXFile) {
    IXFile lFile = (IXFile) pConditionObject;
    // CB Migrate ID3 editing.
    //    return ID3Logic.getInstance().supportsID3(lFile);
  }
  return false;
}

 
  public MediaController getController() {
    return mController;
  }

  public void setController(MediaController controller) {
    mController = controller;
  }

  @Override
  public String getText() {
    return Messages.getString(Messages.getString("id3control.mp3view"));
  }
}
TOP

Related Classes of org.rssowl.contrib.podcast.ui.media.action.ID3ViewAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.