本文整理了Java中com.intellij.openapi.module.Module.getComponent()
方法的一些代码示例,展示了Module.getComponent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Module.getComponent()
方法的具体详情如下:
包路径:com.intellij.openapi.module.Module
类名称: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();
内容来源于网络,如有侵权,请联系作者删除!