本文整理汇总了Java中com.intellij.openapi.compiler.CompileContext.getUserData方法的典型用法代码示例。如果您正苦于以下问题:Java CompileContext.getUserData方法的具体用法?Java CompileContext.getUserData怎么用?Java CompileContext.getUserData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.compiler.CompileContext
的用法示例。
在下文中一共展示了CompileContext.getUserData方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createProcessingItem
import com.intellij.openapi.compiler.CompileContext; //导入方法依赖的package包/类
@NotNull
private ProcessingItem createProcessingItem(@NotNull final CompileContext context,
@NotNull final OCamlCompileContext ocamlContext,
@NotNull final OCamlModule mainOCamlModule) {
final File cmoFile = mainOCamlModule.getCompiledImplementationFile();
VirtualFile file = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(cmoFile);
if (file == null) {
context.addMessage(ERROR, "File \"" + FileUtil.toSystemDependentName(cmoFile.getAbsolutePath()) + "\" was not created. Rebuild the project.", null, -1, -1);
return createFakeProcessingItem(mainOCamlModule.getSourcesDir());
}
final File exeFile = mainOCamlModule.getCompiledExecutableFile();
final Boolean thereWasRecompilation = context.getUserData(THERE_WAS_RECOMPILATION);
final boolean forceRecompilation = (thereWasRecompilation != null && thereWasRecompilation) || context.isRebuild();
return createProcessingItem(mainOCamlModule, file, exeFile, ocamlContext.isDebugMode(), forceRecompilation);
}
示例2: addErrorToContext
import com.intellij.openapi.compiler.CompileContext; //导入方法依赖的package包/类
private static void addErrorToContext(String error, CompileContext context,
String errorRoot)
{
// TODO: Add a button to the Haxe module settings to control whether we always open the window or not.
if (context.getUserData(messageWindowAutoOpened) == null) {
openCompilerMessagesWindow(context);
context.putUserData(messageWindowAutoOpened, "yes");
}
final HaxeCompilerError compilerError = HaxeCompilerError.create
(errorRoot,
error,
!ApplicationManager.getApplication().isUnitTestMode());
if (null != compilerError) {
context.addMessage
(compilerError.getCategory(),
compilerError.getErrorMessage(),
VfsUtilCore.pathToUrl(compilerError.getPath()),
compilerError.getLine(),
compilerError.getColumn());
}
}
示例3: addChangedArtifact
import com.intellij.openapi.compiler.CompileContext; //导入方法依赖的package包/类
public static void addChangedArtifact(final CompileContext context, Artifact artifact) {
Set<Artifact> artifacts = context.getUserData(CHANGED_ARTIFACTS);
if (artifacts == null) {
artifacts = new THashSet<Artifact>();
context.putUserData(CHANGED_ARTIFACTS, artifacts);
}
artifacts.add(artifact);
}
示例4: addWrittenPaths
import com.intellij.openapi.compiler.CompileContext; //导入方法依赖的package包/类
public static void addWrittenPaths(final CompileContext context, Set<String> writtenPaths) {
Set<String> paths = context.getUserData(WRITTEN_PATHS_KEY);
if (paths == null) {
paths = new THashSet<String>();
context.putUserData(WRITTEN_PATHS_KEY, paths);
}
paths.addAll(writtenPaths);
}
示例5: getChangedArtifacts
import com.intellij.openapi.compiler.CompileContext; //导入方法依赖的package包/类
@Nullable
public static Set<Artifact> getChangedArtifacts(final CompileContext compileContext) {
return compileContext.getUserData(CHANGED_ARTIFACTS);
}
示例6: getWrittenPaths
import com.intellij.openapi.compiler.CompileContext; //导入方法依赖的package包/类
@Nullable
public static Set<String> getWrittenPaths(@NotNull CompileContext context) {
return context.getUserData(WRITTEN_PATHS_KEY);
}