krysalis-version/src/java/org/krysalis/version/eclipse/plugin VersionPlugin.java,1.1,1.2

[email protected]
Newsgroups gmane.comp.krysalis.sandbox
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/eclipse/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv16967/src/java/org/krysalis/version/eclipse/plugin

Modified Files:
	VersionPlugin.java 
Log Message:


Index: VersionPlugin.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-version/src/java/org/krysalis/version/eclipse/plugin/VersionPlugin.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** VersionPlugin.java	11 Feb 2003 23:45:30 -0000	1.1
--- VersionPlugin.java	18 Feb 2003 18:24:44 -0000	1.2
***************
*** 11,18 ****
  import org.eclipse.core.resources.ResourcesPlugin;
  import org.eclipse.core.runtime.IPluginDescriptor;
  import org.eclipse.ui.plugin.AbstractUIPlugin;
  
  /**
!  * The main plugin class to be used in the desktop.
   */
  public class VersionPlugin extends AbstractUIPlugin {
--- 11,22 ----
  import org.eclipse.core.resources.ResourcesPlugin;
  import org.eclipse.core.runtime.IPluginDescriptor;
+ import org.eclipse.ui.IWorkbenchPage;
+ import org.eclipse.ui.IWorkbenchWindow;
  import org.eclipse.ui.plugin.AbstractUIPlugin;
  
+ 
  /**
!  * @author Anou Manavalan
!  *  main  plugin class to be used in the desktop.
   */
  public class VersionPlugin extends AbstractUIPlugin {
***************
*** 41,44 ****
--- 45,62 ----
  		return ResourcesPlugin.getWorkspace();
  	}
+ 	
+ 	/** Call this method to retrieve the currently active Workbench page.
+ 	  *
+ 	  * @return the active workbench page.
+ 	  */
+ 	public static IWorkbenchPage getActivePage() {
+ 		IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
+ 		if (window == null) {
+ 			return null;
+ 		} else {
+ 			return window.getActivePage();
+ 		}
+ 	}
+ 	
  }
  /*




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.