public class CompileContextImpl extends UserDataHolderBase implements CompileContextEx
| Constructor and Description |
|---|
CompileContextImpl(Project project,
CompilerTask compilerSession,
CompileScope compileScope,
boolean isMake,
boolean isRebuild) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(CompilerMessage msg) |
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.
|
void |
addScope(CompileScope additionalScope) |
CompilerTask |
getBuildSession() |
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() |
java.util.UUID |
getSessionId() |
long |
getStartCompilationStamp() |
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.
|
boolean |
shouldUpdateProblemsView() |
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMapequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUserData, putUserDatapublic CompileContextImpl(Project project, CompilerTask compilerSession, CompileScope compileScope, boolean isMake, boolean isRebuild)
public CompilerTask getBuildSession()
public boolean shouldUpdateProblemsView()
public long getStartCompilationStamp()
public Project getProject()
getProject in interface CompileContextpublic CompilerMessage [] getMessages(CompilerMessageCategory category)
CompileContextgetMessages in interface CompileContextcategory - the category for which messages are requested.public void addMessage(CompilerMessageCategory category, java.lang.String message, java.lang.String url, int lineNum, int columnNum)
CompileContextaddMessage in interface CompileContextcategory - 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.public void addMessage(CompilerMessageCategory category, java.lang.String message, java.lang.String url, int lineNum, int columnNum, Navigatable navigatable)
CompileContextaddMessage in interface CompileContextcategory - 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.public void addMessage(CompilerMessage msg)
addMessage in interface CompileContextExpublic int getMessageCount(CompilerMessageCategory category)
CompileContextgetMessageCount in interface CompileContextcategory - the category for which messages are requested.public CompileScope getCompileScope()
CompileContextgetCompileScope in interface CompileContextpublic CompileScope getProjectCompileScope()
CompileContextCompileContext.getCompileScope() may return the scope, that is more narrow than ProjectCompileScope.getProjectCompileScope in interface CompileContextpublic void requestRebuildNextTime(java.lang.String message)
CompileContextrequestRebuildNextTime in interface CompileContextpublic boolean isRebuildRequested()
isRebuildRequested in interface CompileContextpublic java.lang.String getRebuildReason()
getRebuildReason in interface CompileContextpublic ProgressIndicator getProgressIndicator()
CompileContextgetProgressIndicator in interface CompileContextpublic Module getModuleByFile(VirtualFile file)
CompileContextgetModuleByFile in interface CompileContextfile - the file to check.public VirtualFile getModuleOutputDirectory(Module module)
CompileContextgetModuleOutputDirectory in interface CompileContextmodule - the module to check.public VirtualFile getModuleOutputDirectoryForTests(Module module)
CompileContextgetModuleOutputDirectoryForTests in interface CompileContextmodule - the module to check.public boolean isMake()
CompileContextisMake in interface CompileContextpublic boolean isAutomake()
isAutomake in interface CompileContextpublic boolean isRebuild()
isRebuild in interface CompileContextpublic boolean isAnnotationProcessorsEnabled()
isAnnotationProcessorsEnabled in interface CompileContextpublic void addScope(CompileScope additionalScope)
addScope in interface CompileContextExpublic java.util.UUID getSessionId()