public class LSContextManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LSContextManager.NullSourceDirectory
Null source directory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllContexts()
Clear all compiler contexts.
|
static CompilerContext |
createTempCompilerContext()
Returns an unique temporary compiler context.
|
CompilerContext |
getBuiltInPackagesCompilerContext()
Returns a global singleton compiler context for the static builtin packages.
|
CompilerContext |
getCompilerContext(PackageID packageID,
String projectDir)
Returns a unique compiler context for the provided project directory path.
|
CompilerContext |
getCompilerContext(PackageID packageID,
String projectDir,
boolean createIfNotExists)
Returns a unique compiler context for the project directory path.
|
CompilerContext |
getCompilerContext(String projectDir)
Returns a unique compiler context for the provided project directory path.
|
static LSContextManager |
getInstance() |
void |
removeCompilerContext(String projectDir,
CompilerContext compilerContext)
Remove a compiler context by project directory.
|
void |
setCompilerContext(String projectDir,
CompilerContext compilerContext)
Set compiler context for a given project directory
|
public static LSContextManager getInstance()
public CompilerContext getCompilerContext(PackageID packageID, String projectDir)
packageID - package IDprojectDir - project directory pathpublic CompilerContext getCompilerContext(String projectDir)
projectDir - project directory pathpublic CompilerContext getCompilerContext(@Nullable PackageID packageID, String projectDir, boolean createIfNotExists)
packageID - package ID or nullprojectDir - project directory pathcreateIfNotExists - if true creates a new compiler context if not existspublic void setCompilerContext(String projectDir, CompilerContext compilerContext)
projectDir - project directorycompilerContext - compiler context.public void removeCompilerContext(String projectDir, CompilerContext compilerContext)
projectDir - project directorycompilerContext - compiler contextpublic void clearAllContexts()
public static CompilerContext createTempCompilerContext()
public CompilerContext getBuiltInPackagesCompilerContext()
Copyright © 2018 WSO2. All rights reserved.