本文整理汇总了Java中com.intellij.openapi.roots.ui.configuration.ModulesProvider.getModule方法的典型用法代码示例。如果您正苦于以下问题:Java ModulesProvider.getModule方法的具体用法?Java ModulesProvider.getModule怎么用?Java ModulesProvider.getModule使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.roots.ui.configuration.ModulesProvider
的用法示例。
在下文中一共展示了ModulesProvider.getModule方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findModule
import com.intellij.openapi.roots.ui.configuration.ModulesProvider; //导入方法依赖的package包/类
@Override
@Nullable
public Module findModule(PackagingElementResolvingContext context) {
if (myModulePointer != null) {
final Module module = myModulePointer.getModule();
final ModulesProvider modulesProvider = context.getModulesProvider();
if (module != null) {
if (modulesProvider instanceof DefaultModulesProvider//optimization
|| ArrayUtil.contains(module, modulesProvider.getModules())) {
return module;
}
}
return modulesProvider.getModule(myModulePointer.getModuleName());
}
return null;
}
示例2: findLibrary
import com.intellij.openapi.roots.ui.configuration.ModulesProvider; //导入方法依赖的package包/类
@Nullable
public Library findLibrary(@NotNull PackagingElementResolvingContext context) {
if (myModuleName == null) {
return context.findLibrary(myLevel, myLibraryName);
}
final ModulesProvider modulesProvider = context.getModulesProvider();
final Module module = modulesProvider.getModule(myModuleName);
if (module != null) {
for (OrderEntry entry : modulesProvider.getRootModel(module).getOrderEntries()) {
if (entry instanceof LibraryOrderEntry) {
final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)entry;
if (libraryEntry.isModuleLevel()) {
final String libraryName = libraryEntry.getLibraryName();
if (libraryName != null && libraryName.equals(myLibraryName)) {
return libraryEntry.getLibrary();
}
}
}
}
}
return null;
}
示例3: findLibrary
import com.intellij.openapi.roots.ui.configuration.ModulesProvider; //导入方法依赖的package包/类
@Nullable
public Library findLibrary(@Nonnull PackagingElementResolvingContext context) {
if (myModuleName == null) {
return context.findLibrary(myLevel, myLibraryName);
}
final ModulesProvider modulesProvider = context.getModulesProvider();
final Module module = modulesProvider.getModule(myModuleName);
if (module != null) {
for (OrderEntry entry : modulesProvider.getRootModel(module).getOrderEntries()) {
if (entry instanceof LibraryOrderEntry) {
final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)entry;
if (libraryEntry.isModuleLevel()) {
final String libraryName = libraryEntry.getLibraryName();
if (libraryName != null && libraryName.equals(myLibraryName)) {
return libraryEntry.getLibrary();
}
}
}
}
}
return null;
}
示例4: findFacet
import com.intellij.openapi.roots.ui.configuration.ModulesProvider; //导入方法依赖的package包/类
@Override
@Nullable
public F findFacet(@NotNull ModulesProvider modulesProvider, @NotNull FacetsProvider facetsProvider) {
final Module module = modulesProvider.getModule(myModuleName);
if (module == null) return null;
final FacetType<F, ?> type = getFacetType();
if (type == null) return null;
return facetsProvider.findFacet(module, type.getId(), myFacetName);
}
示例5: findModule
import com.intellij.openapi.roots.ui.configuration.ModulesProvider; //导入方法依赖的package包/类
@Override
@Nullable
public Module findModule(PackagingElementResolvingContext context) {
final Module module = NamedPointerUtil.get(myModulePointer);
final ModulesProvider modulesProvider = context.getModulesProvider();
if (module != null) {
if (modulesProvider instanceof DefaultModulesProvider//optimization
|| ArrayUtil.contains(module, modulesProvider.getModules())) {
return module;
}
}
return modulesProvider.getModule(myModulePointer.getName());
}
示例6: setupFramework
import com.intellij.openapi.roots.ui.configuration.ModulesProvider; //导入方法依赖的package包/类
@Override
public void setupFramework(@NotNull ModifiableModelsProvider modifiableModelsProvider, @NotNull ModulesProvider modulesProvider) {
Module module = modulesProvider.getModule(getModuleName());
LOG.assertTrue(module != null, getModuleName());
doSetup(modifiableModelsProvider, module);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:FacetBasedDetectedFrameworkDescriptionInWizard.java