本文整理匯總了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);
}
}