public interface CompileContext extends UserDataHolder
Modifier and Type | Method and Description |
---|---|
void |
addMessage(CompilerMessageCategory category,
java.lang.String message,
java.lang.String url,
int lineNum,
int columnNum)
Allows to add a message to be shown in Compiler message view.
|
void |
addMessage(CompilerMessageCategory category,
java.lang.String message,
java.lang.String url,
int lineNum,
int columnNum,
Navigatable navigatable)
Allows to add a message to be shown in Compiler message view, with a specified Navigatable
that is used to navigate to the error location.
|
CompileScope |
getCompileScope()
Returns the current compile scope.
|
int |
getMessageCount(CompilerMessageCategory category)
Returns the count of messages of the specified category added during the current compile session.
|
CompilerMessage [] |
getMessages(CompilerMessageCategory category)
Returns all messages of the specified category added during the current compile session.
|
Module |
getModuleByFile(VirtualFile file)
Returns the module to which the specified file belongs.
|
VirtualFile |
getModuleOutputDirectory(Module module)
Returns the output directory for the specified module.
|
VirtualFile |
getModuleOutputDirectoryForTests(Module module)
Returns the test output directory for the specified module.
|
ProgressIndicator |
getProgressIndicator()
Returns the progress indicator of the compilation process.
|
Project |
getProject() |
CompileScope |
getProjectCompileScope()
Returns the compile scope which would be used if the entire project was rebuilt.
|
java.lang.String |
getRebuildReason() |
boolean |
isAnnotationProcessorsEnabled() |
boolean |
isAutomake() |
boolean |
isMake()
Checks if the compilation is incremental, i.e.
|
boolean |
isRebuild() |
boolean |
isRebuildRequested() |
void |
requestRebuildNextTime(java.lang.String message)
A compiler may call this method in order to request complete project rebuild.
|
getUserData, putUserData
void addMessage(CompilerMessageCategory category, java.lang.String message, java.lang.String url, int lineNum, int columnNum)
category
- the category of a message (information, error, warning).message
- the text of the message.url
- a url to the file to which the message applies, null if not available.lineNum
- a line number, -1 if not available.columnNum
- a column number, -1 if not available.void addMessage(CompilerMessageCategory category, java.lang.String message, java.lang.String url, int lineNum, int columnNum, Navigatable navigatable)
category
- the category of a message (information, error, warning).message
- the text of the message.url
- a url to the file to which the message applies, null if not available.lineNum
- a line number, -1 if not available.columnNum
- a column number, -1 if not available.navigatable
- the navigatable pointing to the error location.CompilerMessage [] getMessages(CompilerMessageCategory category)
category
- the category for which messages are requested.int getMessageCount(CompilerMessageCategory category)
category
- the category for which messages are requested.ProgressIndicator getProgressIndicator()
CompileScope getCompileScope()
CompileScope getProjectCompileScope()
getCompileScope()
may return the scope, that is more narrow than ProjectCompileScope.void requestRebuildNextTime(java.lang.String message)
boolean isRebuildRequested()
java.lang.String getRebuildReason()
Module getModuleByFile(VirtualFile file)
file
- the file to check.VirtualFile getModuleOutputDirectory(Module module)
module
- the module to check.VirtualFile getModuleOutputDirectoryForTests(Module module)
module
- the module to check.boolean isMake()
boolean isAutomake()
boolean isRebuild()
Project getProject()
boolean isAnnotationProcessorsEnabled()