public class DummyCompileContext extends java.lang.Object implements CompileContext
Modifier | Constructor and Description |
---|---|
|
DummyCompileContext()
Deprecated.
use
create(Project) instead |
protected |
DummyCompileContext(Project project) |
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.
|
static DummyCompileContext |
create(Project project) |
CompileScope |
getCompileScope()
Returns the current compile scope.
|
static DummyCompileContext |
getInstance()
Deprecated.
use
create(Project) instead |
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() |
<T> T |
getUserData(Key<T> key) |
boolean |
isAnnotationProcessorsEnabled() |
boolean |
isAutomake() |
boolean |
isMake()
Checks if the compilation is incremental, i.e.
|
boolean |
isRebuild() |
boolean |
isRebuildRequested() |
<T> void |
putUserData(Key<T> key,
T value)
Add a new user data value to this object.
|
void |
requestRebuildNextTime(java.lang.String message)
A compiler may call this method in order to request complete project rebuild.
|
@Deprecated public DummyCompileContext()
create(Project)
insteadprotected DummyCompileContext(Project project)
@Deprecated public static DummyCompileContext getInstance()
create(Project)
insteadpublic static DummyCompileContext create(Project project)
public Project getProject()
getProject
in interface CompileContext
public void addMessage(CompilerMessageCategory category, java.lang.String message, java.lang.String url, int lineNum, int columnNum)
CompileContext
addMessage
in interface CompileContext
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.public void addMessage(CompilerMessageCategory category, java.lang.String message, java.lang.String url, int lineNum, int columnNum, Navigatable navigatable)
CompileContext
addMessage
in interface CompileContext
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.public CompilerMessage [] getMessages(CompilerMessageCategory category)
CompileContext
getMessages
in interface CompileContext
category
- the category for which messages are requested.public int getMessageCount(CompilerMessageCategory category)
CompileContext
getMessageCount
in interface CompileContext
category
- the category for which messages are requested.public ProgressIndicator getProgressIndicator()
CompileContext
getProgressIndicator
in interface CompileContext
public CompileScope getCompileScope()
CompileContext
getCompileScope
in interface CompileContext
public CompileScope getProjectCompileScope()
CompileContext
CompileContext.getCompileScope()
may return the scope, that is more narrow than ProjectCompileScope.getProjectCompileScope
in interface CompileContext
public void requestRebuildNextTime(java.lang.String message)
CompileContext
requestRebuildNextTime
in interface CompileContext
public boolean isRebuildRequested()
isRebuildRequested
in interface CompileContext
public java.lang.String getRebuildReason()
getRebuildReason
in interface CompileContext
public Module getModuleByFile(VirtualFile file)
CompileContext
getModuleByFile
in interface CompileContext
file
- the file to check.public boolean isAnnotationProcessorsEnabled()
isAnnotationProcessorsEnabled
in interface CompileContext
public VirtualFile getModuleOutputDirectory(Module module)
CompileContext
getModuleOutputDirectory
in interface CompileContext
module
- the module to check.public VirtualFile getModuleOutputDirectoryForTests(Module module)
CompileContext
getModuleOutputDirectoryForTests
in interface CompileContext
module
- the module to check.public <T> T getUserData(Key<T> key)
getUserData
in interface UserDataHolder
public <T> void putUserData(Key<T> key, T value)
UserDataHolder
putUserData
in interface UserDataHolder
public boolean isMake()
CompileContext
isMake
in interface CompileContext
public boolean isAutomake()
isAutomake
in interface CompileContext
public boolean isRebuild()
isRebuild
in interface CompileContext