org.eclipse.cdt.internal.ui.util
Class CoreUtility

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.util.CoreUtility

public class CoreUtility
extends java.lang.Object


Constructor Summary
CoreUtility()
           
 
Method Summary
static int compare(int lhs, int rhs)
          Comparse two integers.
static java.lang.Object createExtension(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String classAttribute)
          Creates an extension.
static void createFolder(org.eclipse.core.resources.IFolder folder, boolean force, boolean local, org.eclipse.core.runtime.IProgressMonitor monitor)
          Creates a folder and all parent folders if not existing.
static boolean safeEquals(java.lang.Object lhs, java.lang.Object rhs)
          Calls equals after checking for nulls
static int safeHashcode(java.lang.Object o)
          Calls hashCode after checking for null
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreUtility

public CoreUtility()
Method Detail

createFolder

public static void createFolder(org.eclipse.core.resources.IFolder folder,
                                boolean force,
                                boolean local,
                                org.eclipse.core.runtime.IProgressMonitor monitor)
                         throws org.eclipse.core.runtime.CoreException
Creates a folder and all parent folders if not existing. Project must exist. org.eclipse.ui.dialogs.ContainerGenerator is too heavy (creates a runnable)

Throws:
org.eclipse.core.runtime.CoreException

createExtension

public static java.lang.Object createExtension(org.eclipse.core.runtime.IConfigurationElement element,
                                               java.lang.String classAttribute)
                                        throws org.eclipse.core.runtime.CoreException
Creates an extension. If the extension plugin has not been loaded a busy cursor will be activated during the duration of the load.

Parameters:
element - the config element defining the extension
classAttribute - the name of the attribute carrying the class
Returns:
the extension object
Throws:
org.eclipse.core.runtime.CoreException

safeEquals

public static boolean safeEquals(java.lang.Object lhs,
                                 java.lang.Object rhs)
Calls equals after checking for nulls


safeHashcode

public static int safeHashcode(java.lang.Object o)
Calls hashCode after checking for null


compare

public static int compare(int lhs,
                          int rhs)
Comparse two integers.