com.intellij.openapi.module.Module.getComponent()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中com.intellij.openapi.module.Module.getComponent()方法的一些代码示例,展示了Module.getComponent()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Module.getComponent()方法的具体详情如下:
包路径:com.intellij.openapi.module.Module
类名称:Module
方法名:getComponent

Module.getComponent介绍

暂无

代码示例

代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin

private void assertLibrary(@NotNull Collection<String> libUrls, String... exclusionUrls) {
 UIUtil.dispatchAllInvocationEvents();
 GoModuleLibrariesInitializer initializer = myModule.getComponent(GoModuleLibrariesInitializer.class);
 ModuleRootManager model = ModuleRootManager.getInstance(myModule);
 LibraryOrderEntry libraryOrderEntry = OrderEntryUtil.findLibraryOrderEntry(model, initializer.getLibraryName());
 if (libUrls.isEmpty()) {
  assertNull(libraryOrderEntry);
  return;
 }
 LibraryEx library = (LibraryEx)libraryOrderEntry.getLibrary();
 assertNotNull(library);
 assertSameElements(Arrays.asList(library.getUrls(OrderRootType.CLASSES)), libUrls);
 assertSameElements(library.getExcludedRootUrls(), exclusionUrls);
}

代码示例来源:origin: infinitest/infinitest

private FacetListener getWindow() {
    return module.getComponent(InfinitestToolWindow.class);
  }
}

代码示例来源:origin: sonar-intellij-plugin/sonar-intellij-plugin

public static ModuleSettings getInstance(Module module) {
 return module.getComponent(ModuleSettings.class);
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

public static AppEngineStandardGradleModuleComponent getInstance(@NotNull Module module) {
 return module.getComponent(AppEngineStandardGradleModuleComponent.class);
}

代码示例来源:origin: intellij-dlanguage/intellij-dlanguage

private static void restartDcdServer(@NotNull final AnActionEvent e, @NotNull final Module module) {
  final DCDCompletionServer dcdServer = module.getComponent(DCDCompletionServer.class);
  if (dcdServer == null) displayError(e, "Could not find module component for dcd-server.");
  else dcdServer.restart();
}

代码示例来源:origin: sonar-intellij-plugin/sonar-intellij-plugin

@Override
public void reset() {
 ModuleSettings moduleSettings = myModule.getComponent(ModuleSettings.class);
 if (moduleSettings != null && moduleSettings.getState() != null) {
  Settings persistedSettings = moduleSettings.getState();
  this.setValuesFromSettings(persistedSettings);
 }
}

代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij

@Before
public void setUp() throws Exception {
 webIntegration = new AppEngineStandardUltimateWebIntegration();
 webRoots.add(mockWebRoot);
 when(mockWebRootDir.getFileSystem()).thenReturn(LocalFileSystem.getInstance());
 when(mockWebRootDir.createChildDirectory(
     LocalFileSystem.getInstance(), AppEngineStandardUltimateWebIntegration.WEB_INF))
   .thenReturn(mockNewWebInfDir);
 when(mockWebRootDir.findChild(AppEngineStandardUltimateWebIntegration.WEB_INF))
   .thenReturn(mockExistingWebInfDir);
 when(mockWebRootDir.getName()).thenReturn("someName");
 when(mockWebRoot.getFile()).thenReturn(mockWebRootDir);
 when(mockWebFacet.getWebRoots()).thenReturn(webRoots);
 when(mockFacetManager.getFacetsByType(WebFacet.ID))
   .thenReturn(Collections.singletonList(mockWebFacet));
 when(mockModule.getComponent(FacetManager.class)).thenReturn(mockFacetManager);
}

代码示例来源:origin: intellij-dlanguage/intellij-dlanguage

final String path = lookupPath();
if (path != null) {
  final DCDCompletionServer dcdCompletionServer = module.getComponent(DCDCompletionServer.class);
  try {
    dcdCompletionServer.exec();

相关文章