// Path: src/edu/stanford/ejalbert/exception/BrowserLaunchingInitializingException.java
// public class BrowserLaunchingInitializingException
//         extends Exception {
// 
//     public BrowserLaunchingInitializingException(Exception cause) {
//         super(cause);
//     }
// 
//     public BrowserLaunchingInitializingException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/edu/stanford/ejalbert/exception/UnsupportedOperatingSystemException.java
// public class UnsupportedOperatingSystemException
//         extends Exception {
// 
//     public UnsupportedOperatingSystemException(String message) {
//         super(message);
//     }
// 
//     public UnsupportedOperatingSystemException(Throwable cause) {
//         super(cause);
//     }
// }


import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.commands.ActionHandler;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.CloseWindowListener;
import org.eclipse.swt.browser.LocationAdapter;
import org.eclipse.swt.browser.LocationEvent;
import org.eclipse.swt.browser.OpenWindowListener;
import org.eclipse.swt.browser.ProgressAdapter;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.StatusTextEvent;
import org.eclipse.swt.browser.StatusTextListener;
import org.eclipse.swt.browser.TitleEvent;
import org.eclipse.swt.browser.TitleListener;
import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.part.ViewPart;
import edu.stanford.ejalbert.exception.BrowserLaunchingInitializingException;
import edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException;
		}
	};

	private Action stopAction = new Action("Stop") {
		public void run() {
			browser.stop();
			// cancel any partial progress.
			getViewSite().getActionBars().getStatusLineManager().getProgressMonitor().done();
		}
	};

	private Action refreshAction = new Action("Refresh") {
		public void run() {
			browser.refresh();
		}
	};
	
	private Action openInBrowserAction = new Action("OpenInBrwoser") {
		public void run() {
			String urlString = browser.getUrl();
			openInBrowser(urlString);
		}
	};
	
	protected void openInBrowser(String urlString){
		edu.stanford.ejalbert.BrowserLauncher launcher;
		try {
			launcher = new edu.stanford.ejalbert.BrowserLauncher();
			//launcher.openURLinBrowser("FireFox", "http://localhost:8080/workspace/content/");
			launcher.openURLinBrowser(urlString);
// Path: src/edu/stanford/ejalbert/exception/BrowserLaunchingInitializingException.java
// public class BrowserLaunchingInitializingException
//         extends Exception {
// 
//     public BrowserLaunchingInitializingException(Exception cause) {
//         super(cause);
//     }
// 
//     public BrowserLaunchingInitializingException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/edu/stanford/ejalbert/exception/UnsupportedOperatingSystemException.java
// public class UnsupportedOperatingSystemException
//         extends Exception {
// 
//     public UnsupportedOperatingSystemException(String message) {
//         super(message);
//     }
// 
//     public UnsupportedOperatingSystemException(Throwable cause) {
//         super(cause);
//     }
// }


// Path: src/com/idega/app/eplatform/BrowserView.java
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.commands.ActionHandler;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.CloseWindowListener;
import org.eclipse.swt.browser.LocationAdapter;
import org.eclipse.swt.browser.LocationEvent;
import org.eclipse.swt.browser.OpenWindowListener;
import org.eclipse.swt.browser.ProgressAdapter;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.StatusTextEvent;
import org.eclipse.swt.browser.StatusTextListener;
import org.eclipse.swt.browser.TitleEvent;
import org.eclipse.swt.browser.TitleListener;
import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.part.ViewPart;
import edu.stanford.ejalbert.exception.BrowserLaunchingInitializingException;
import edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException;

		}
	};

	private Action stopAction = new Action("Stop") {
		public void run() {
			browser.stop();
			// cancel any partial progress.
			getViewSite().getActionBars().getStatusLineManager().getProgressMonitor().done();
		}
	};

	private Action refreshAction = new Action("Refresh") {
		public void run() {
			browser.refresh();
		}
	};
	
	private Action openInBrowserAction = new Action("OpenInBrwoser") {
		public void run() {
			String urlString = browser.getUrl();
			openInBrowser(urlString);
		}
	};
	
	protected void openInBrowser(String urlString){
		edu.stanford.ejalbert.BrowserLauncher launcher;
		try {
			launcher = new edu.stanford.ejalbert.BrowserLauncher();
			//launcher.openURLinBrowser("FireFox", "http://localhost:8080/workspace/content/");
			launcher.openURLinBrowser(urlString);
		} catch (BrowserLaunchingInitializingException e) {