本文整理汇总了Java中com.intellij.openapi.roots.ModifiableRootModel.findLibraryOrderEntry方法的典型用法代码示例。如果您正苦于以下问题:Java ModifiableRootModel.findLibraryOrderEntry方法的具体用法?Java ModifiableRootModel.findLibraryOrderEntry怎么用?Java ModifiableRootModel.findLibraryOrderEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.roots.ModifiableRootModel
的用法示例。
在下文中一共展示了ModifiableRootModel.findLibraryOrderEntry方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateProjectStructure
import com.intellij.openapi.roots.ModifiableRootModel; //导入方法依赖的package包/类
@Override
public void updateProjectStructure(
Project project,
BlazeContext context,
WorkspaceRoot workspaceRoot,
ProjectViewSet projectViewSet,
BlazeProjectData blazeProjectData,
@Nullable BlazeProjectData oldBlazeProjectData,
ModuleEditor moduleEditor,
Module workspaceModule,
ModifiableRootModel workspaceModifiableModel) {
if (!blazeProjectData.workspaceLanguageSettings.isLanguageActive(LanguageClass.JAVASCRIPT)
|| BlazeJavascriptLibrarySource.JS_LIBRARY_KIND == null) {
return;
}
for (Library lib : getJavascriptLibraries(project)) {
if (workspaceModifiableModel.findLibraryOrderEntry(lib) == null) {
workspaceModifiableModel.addLibraryEntry(lib);
}
}
}
示例2: updateProjectStructure
import com.intellij.openapi.roots.ModifiableRootModel; //导入方法依赖的package包/类
@Override
public void updateProjectStructure(
Project project,
BlazeContext context,
WorkspaceRoot workspaceRoot,
ProjectViewSet projectViewSet,
BlazeProjectData blazeProjectData,
@Nullable BlazeProjectData oldBlazeProjectData,
ModuleEditor moduleEditor,
Module workspaceModule,
ModifiableRootModel workspaceModifiableModel) {
if (!blazeProjectData.workspaceLanguageSettings.isLanguageActive(LanguageClass.TYPESCRIPT)) {
return;
}
Library tsConfigLibrary =
ProjectLibraryTable.getInstance(project).getLibraryByName(TSCONFIG_LIBRARY_NAME);
if (tsConfigLibrary != null) {
if (workspaceModifiableModel.findLibraryOrderEntry(tsConfigLibrary) == null) {
workspaceModifiableModel.addLibraryEntry(tsConfigLibrary);
}
}
}
示例3: updateProjectStructure
import com.intellij.openapi.roots.ModifiableRootModel; //导入方法依赖的package包/类
@Override
public void updateProjectStructure(
Project project,
BlazeContext context,
WorkspaceRoot workspaceRoot,
ProjectViewSet projectViewSet,
BlazeProjectData blazeProjectData,
@Nullable BlazeProjectData oldBlazeProjectData,
ModuleEditor moduleEditor,
Module workspaceModule,
ModifiableRootModel workspaceModifiableModel) {
if (!blazeProjectData.workspaceLanguageSettings.isLanguageActive(LanguageClass.GO)) {
return;
}
for (Library lib : getGoLibraries(project)) {
if (workspaceModifiableModel.findLibraryOrderEntry(lib) == null) {
workspaceModifiableModel.addLibraryEntry(lib);
}
}
Scope.push(
context,
(childContext) -> {
childContext.push(new TimingScope("BuildGoSymbolicLinks", EventType.Other));
BlazeGoRootsProvider.createGoPathSourceRoot(project);
});
}
示例4: updateProjectStructure
import com.intellij.openapi.roots.ModifiableRootModel; //导入方法依赖的package包/类
@Override
public void updateProjectStructure(
Project project,
BlazeContext context,
WorkspaceRoot workspaceRoot,
ProjectViewSet projectViewSet,
BlazeProjectData blazeProjectData,
@Nullable BlazeProjectData oldBlazeProjectData,
ModuleEditor moduleEditor,
Module workspaceModule,
ModifiableRootModel workspaceModifiableModel) {
if (!blazeProjectData.workspaceLanguageSettings.isLanguageActive(LanguageClass.DART)) {
return;
}
Library dartSdkLibrary = DartSdkUtils.findDartLibrary(project);
if (dartSdkLibrary != null) {
if (workspaceModifiableModel.findLibraryOrderEntry(dartSdkLibrary) == null) {
workspaceModifiableModel.addLibraryEntry(dartSdkLibrary);
}
} else {
IssueOutput.error(
"Dart language support is requested, but the Dart SDK was not found. "
+ "You must manually enable Dart support from "
+ "File > Settings > Languages & Frameworks > Dart.")
.submit(context);
}
}
示例5: updateProjectStructure
import com.intellij.openapi.roots.ModifiableRootModel; //导入方法依赖的package包/类
@Override
public void updateProjectStructure(
Project project,
BlazeContext context,
WorkspaceRoot workspaceRoot,
ProjectViewSet projectViewSet,
BlazeProjectData blazeProjectData,
@Nullable BlazeProjectData oldBlazeProjectData,
ModuleEditor moduleEditor,
Module workspaceModule,
ModifiableRootModel workspaceModifiableModel) {
if (!blazeProjectData.workspaceLanguageSettings.isLanguageActive(LanguageClass.KOTLIN)) {
return;
}
Library kotlinJavaRuntimeLibrary = KotlinSdkUtils.findKotlinJavaRuntime(project);
if (kotlinJavaRuntimeLibrary != null) {
if (workspaceModifiableModel.findLibraryOrderEntry(kotlinJavaRuntimeLibrary) == null) {
workspaceModifiableModel.addLibraryEntry(kotlinJavaRuntimeLibrary);
}
} else {
// since the runtime library was not found remove the kotlin-runtime ijar if present -- it
// prevents the kotlin plugin from kicking in and offering to setup the kotlin std library.
removeKotlinRuntimeIjar(project, workspaceModifiableModel);
IssueOutput.error(
"Kotlin JVM runtime libraries not found in workspace libraries, setup the Kotlin "
+ "plugin.")
.submit(context);
}
}
示例6: removeKotlinRuntimeIjar
import com.intellij.openapi.roots.ModifiableRootModel; //导入方法依赖的package包/类
private static void removeKotlinRuntimeIjar(
Project project, ModifiableRootModel workspaceModifiableModel) {
Library ijar = KotlinSdkUtils.findKotlinJavaRuntimeIjar(project);
if (ijar == null) {
return;
}
LibraryOrderEntry entry = workspaceModifiableModel.findLibraryOrderEntry(ijar);
if (entry != null) {
workspaceModifiableModel.removeOrderEntry(entry);
}
}