org.knime.core.internal
Class CorePlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.knime.core.internal.CorePlugin
All Implemented Interfaces:
BundleActivator

public class CorePlugin
extends org.eclipse.core.runtime.Plugin

Plugin class that is initialized when the plugin project is started. It will set the workspace path as KNIME home dir in the KNIMEConstants utility class.

Author:
wiswedel, University of Konstanz

Field Summary
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
CorePlugin()
           
 
Method Summary
static CorePlugin getInstance()
          Returns the singleton instance of this plugin.
static File resolveURItoLocalFile(URI uri)
          Fetches a service implementing the URIToFileResolve interface and returns the resolved file.
static File resolveURItoLocalOrTempFile(URI uri)
          Fetches a service implementing the URIToFileResolve interface and returns the resolved file.
 void start(BundleContext context)
          
 void stop(BundleContext context)
          
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CorePlugin

public CorePlugin()
Method Detail

start

public void start(BundleContext context)
           throws Exception

Specified by:
start in interface BundleActivator
Overrides:
start in class org.eclipse.core.runtime.Plugin
Throws:
Exception

stop

public void stop(BundleContext context)
          throws Exception

Specified by:
stop in interface BundleActivator
Overrides:
stop in class org.eclipse.core.runtime.Plugin
Throws:
Exception

getInstance

public static CorePlugin getInstance()
Returns the singleton instance of this plugin.

Returns:
the plugin

resolveURItoLocalFile

public static File resolveURItoLocalFile(URI uri)
                                  throws IOException
Fetches a service implementing the URIToFileResolve interface and returns the resolved file.

Parameters:
uri - The URI to resolve
Returns:
The local file underlying the URI (if any)
Throws:
IOException - If no service is registered or the URI can't be resolved.

resolveURItoLocalOrTempFile

public static File resolveURItoLocalOrTempFile(URI uri)
                                        throws IOException
Fetches a service implementing the URIToFileResolve interface and returns the resolved file.

Parameters:
uri - The URI to resolve
Returns:
The local file or temporary copy of a remote file underlying the URI (if any)
Throws:
IOException - If no service is registered or the URI can't be resolved.


Copyright, 2003 - 2012. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.