org.eclipse.wst.jsdt.chromium.debug.ui

## Class PluginUtil

- java.lang.Object
- - org.eclipse.wst.jsdt.chromium.debug.ui.PluginUtil

    public class PluginUtil
    extends java.lang.Object

This class provides generic plugin-wide services.

### Method Summary

All Methods Static Methods Concrete Methods
`static FontMetrics` `getFontMetrics(Drawable drawable, Font font)`
`static boolean` `isChromiumDebugFile(IFile file)` Determines whether `file` is a .chromium file in a JavaScript debug project.
`static void` `openProjectExplorerView()` Brings up the "Project Explorer" view in the active workbench window.
`static java.lang.String` `stripChromiumExtension(java.lang.String fileName, boolean check)` Removes the ".chromium" extension from the fileName.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### openProjectExplorerView

    public static void openProjectExplorerView()

Brings up the "Project Explorer" view in the active workbench window.

#### isChromiumDebugFile

    public static boolean isChromiumDebugFile(IFile file)

Determines whether `file` is a .chromium file in a JavaScript debug project.

Parameters:
  `file` - to test
Returns:
  whether the file extension is ".chromium" and its project has the ChromiumDebugPluginUtil#JS_DEBUG_PROJECT_NATURE nature

#### stripChromiumExtension

    public static java.lang.String stripChromiumExtension(java.lang.String fileName,
                                                          boolean check)

Removes the ".chromium" extension from the fileName.

Parameters:
  `fileName` - to remove the extension from
  `check` - if true additionally check that fileName actually has ".chromium" extension
Returns:
  a file name without the ".chromium" extension

#### getFontMetrics

    public static FontMetrics getFontMetrics(Drawable drawable,
                                             Font font)

Parameters:
  `font` - or null to use default font