public class ChromiumDebugPluginUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Breakpoint.Target.Visitor<java.lang.String> |
BREAKPOINT_TARGET_TO_STRING |
static java.lang.String |
CHROMIUM_EXTENSION_SUFFIX |
static java.lang.String |
JS_DEBUG_PROJECT_NATURE |
static java.util.Set<java.lang.String> |
SUPPORTED_EXTENSIONS |
static java.util.List<java.lang.String> |
SUPPORTED_EXTENSIONS_SUFFIX_LIST |
Modifier and Type | Method and Description |
---|---|
static IProject |
createEmptyProject(java.lang.String projectNameBase)
Creates an empty workspace project with the name starting with the given projectNameBase.
|
static IFile |
createFile(IFolder container,
java.lang.String filename)
Creates an empty file with the given filename in the given project.
|
static IFile |
createFile(IProject container,
java.lang.String filename)
Creates an empty file with the given filename in the given project.
|
static void |
deleteVirtualProjectAsync(IProject debugProject)
Removes virtual project which was created for debug session.
|
static IContainer |
getSourceContainer(IProject project)
The container where the script sources should be put.
|
static boolean |
isInteger(java.lang.String value) |
static void |
openProjectExplorerView()
Brings up the "Project Explorer" view in the active workbench window.
|
static boolean |
projectExists(java.lang.String projectName) |
static byte[] |
readBytes(java.io.InputStream inputStream) |
static byte[] |
readFileContents(IFile file) |
static <T> T |
throwUnsupported() |
static void |
writeFile(IFile file,
java.lang.String data)
Writes data into a resource with the given resourceName residing in the
source folder of the given project.
|
public static final java.util.Set<java.lang.String> SUPPORTED_EXTENSIONS
public static final java.util.List<java.lang.String> SUPPORTED_EXTENSIONS_SUFFIX_LIST
public static final java.lang.String JS_DEBUG_PROJECT_NATURE
public static final java.lang.String CHROMIUM_EXTENSION_SUFFIX
public static final Breakpoint.Target.Visitor<java.lang.String> BREAKPOINT_TARGET_TO_STRING
public static void openProjectExplorerView()
public static IProject createEmptyProject(java.lang.String projectNameBase)
projectNameBase
- project name templatenull
if the creation failedpublic static void deleteVirtualProjectAsync(IProject debugProject)
public static boolean projectExists(java.lang.String projectName)
projectName
- to check for existencepublic static IFile createFile(IProject container, java.lang.String filename)
container
- to create the file infilename
- the base short file name to create (will be sanitized for
illegal chars and, in the case of a name clash, suffixed with "(N)")null
if the creation
has failedpublic static IFile createFile(IFolder container, java.lang.String filename)
container
- to create the file infilename
- the base short file name to create (will be sanitized for
illegal chars and, in the case of a name clash, suffixed with "(N)")null
if the creation
has failedpublic static void writeFile(IFile file, java.lang.String data) throws CoreException
file
- to set contents fordata
- to write into the fileCoreException
public static boolean isInteger(java.lang.String value)
public static IContainer getSourceContainer(IProject project)
project
- where the launch configuration stores the scriptspublic static byte[] readFileContents(IFile file) throws java.io.IOException, CoreException
java.io.IOException
CoreException
public static byte[] readBytes(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException
public static <T> T throwUnsupported()
Copyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.