All pastes #957752 Raw Edit

Miscellany

public java v1 · immutable
#957752 ·published 2008-03-26 04:44 UTC
rendered paste body
/** * Warlock, the open-source cross-platform game client *   * Copyright 2008, Warlock LLC, and individual contributors as indicated * by the @authors tag.  * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */package cc.warlock.rcp.views;import org.eclipse.swt.SWT;import org.eclipse.swt.widgets.Composite;import org.eclipse.ui.IWorkbenchPage;import org.eclipse.ui.PartInitException;import org.eclipse.ui.PlatformUI;import org.eclipse.ui.part.PageBook;import org.eclipse.ui.part.ViewPart;import cc.warlock.core.client.IWarlockClient;import cc.warlock.core.client.internal.WarlockClient;public class RunningScriptsView extends ViewPart {    public static final String VIEW_ID = "cc.warlock.rcp.views.rightFolder.runningScriptsView"; //$NON-NLS-1$    protected PageBook pBook;    protected static RunningScriptsView instance;    Composite composite1;        /**     *      */    public RunningScriptsView() {        super();        // TODO Auto-generated constructor stub    }    /* (non-Javadoc)     * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)     */    public void createPartControl(Composite parent) {    	{	    	parent.setSize(578, 142);    	}        composite1 = new Composite(parent, SWT.NULL);        PageBook pBook = new PageBook(composite1,SWT.FILL);    }        public void createPage(WarlockClient client) {    	    }        static public RunningScriptsView getView() {    	IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();				if (instance != null)		{			page.activate(instance);			return instance;		}				// none of the already created views match, create a new one		try {			instance = (RunningScriptsView) page.showView(VIEW_ID);			return instance;		} catch (PartInitException e) {			e.printStackTrace();		}			return null;    }    /* (non-Javadoc)     * @see org.eclipse.ui.IWorkbenchPart#setFocus()     */    public void setFocus() {        // TODO Auto-generated method stub    }        public void setClient(IWarlockClient client) {    	    }        /**     * Cleans up all resources created by this ViewPart.     */    public void dispose() {    	instance = null;        super.dispose();    }    }