• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ModuleExtensionWithSdk类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中consulo.module.extension.ModuleExtensionWithSdk的典型用法代码示例。如果您正苦于以下问题:Java ModuleExtensionWithSdk类的具体用法?Java ModuleExtensionWithSdk怎么用?Java ModuleExtensionWithSdk使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ModuleExtensionWithSdk类属于consulo.module.extension包,在下文中一共展示了ModuleExtensionWithSdk类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: put0

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
private static void put0(Class<?> clazz, int index) {
  Class temp = clazz;

  do {
    if (temp == ModuleExtensionWithSdkImpl.class ||
        temp == ModuleExtensionImpl.class ||
        temp == ModuleExtension.class ||
        temp == ModuleExtensionWithSdk.class) {
      break;
    }

    putImpl(temp, index);

    Class[] interfaces = temp.getInterfaces();
    for (Class intef : interfaces) {
      put0(intef, index);
    }
  }
  while ((temp = temp.getSuperclass()) != null);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:ModuleExtensionIndexCache.java


示例2: putImpl

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
private static void putImpl(Class<?> temp, int index) {
  if (temp == ModuleExtensionWithSdkImpl.class ||
      temp == ModuleExtensionImpl.class ||
      temp == ModuleExtension.class ||
      temp == ModuleExtensionWithSdk.class) {
    return;
  }

  int[] ints = ourClassCache.get(temp);
  if (ints == null) {
    ourClassCache.put(temp, new int[]{index});
  }
  else {
    ourClassCache.put(temp, ArrayUtil.append(ints, index));
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:ModuleExtensionIndexCache.java


示例3: getPresentableName

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Override
@Nonnull
public String getPresentableName() {
  StringBuilder builder = new StringBuilder();

  ModuleExtensionWithSdk<?> moduleExtension = getModuleExtension();
  if (moduleExtension != null) {
    final Sdk sdk = moduleExtension.getSdk();
    if (sdk == null) {
      builder.append(moduleExtension.getSdkName());
    }
    else {
      builder.append(sdk.getName());
    }
  }
  else {
    builder.append(myModuleExtensionId);
  }

  return builder.toString();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:ModuleExtensionWithSdkOrderEntryImpl.java


示例4: isIKVMLibrary

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@RequiredReadAction
private static boolean isIKVMLibrary(@NotNull DotNetTypeDeclaration typeDeclaration)
{
	VirtualFile virtualFile = PsiUtilCore.getVirtualFile(typeDeclaration);
	if(virtualFile == null)
	{
		return false;
	}
	VirtualFile virtualFileForArchive = ArchiveVfsUtil.getVirtualFileForArchive(virtualFile);
	if(virtualFileForArchive == null)
	{
		return false;
	}

	List<OrderEntry> orderEntriesForFile = ProjectFileIndex.SERVICE.getInstance(typeDeclaration.getProject()).getOrderEntriesForFile
			(virtualFile);
	if(orderEntriesForFile.isEmpty())
	{
		return false;
	}
	for(OrderEntry orderEntry : orderEntriesForFile)
	{
		if(orderEntry instanceof ModuleExtensionWithSdkOrderEntry)
		{
			ModuleExtensionWithSdk<?> moduleExtension = ((ModuleExtensionWithSdkOrderEntry) orderEntry).getModuleExtension();
			if(moduleExtension instanceof IkvmModuleExtension)
			{
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:consulo,项目名称:consulo-ikvm,代码行数:34,代码来源:StubBuilder.java


示例5: getItemNameFromModule

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Override
public String getItemNameFromModule(@Nonnull Module module) {
  final ModuleExtensionWithSdk<?> extension = (ModuleExtensionWithSdk) ModuleUtilCore.getExtension(module, myExtensionId);
  if (extension != null) {
    return extension.getInheritableSdk().getName();
  }
  return null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:SdkModuleInheritableNamedPointerImpl.java


示例6: getItemFromModule

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Override
public Sdk getItemFromModule(@Nonnull Module module) {
  final ModuleExtensionWithSdk<?> extension = (ModuleExtensionWithSdk)  ModuleUtilCore.getExtension(module, myExtensionId);
  if (extension != null) {
    return extension.getInheritableSdk().get();
  }
  return null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:SdkModuleInheritableNamedPointerImpl.java


示例7: getSdk

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Override
@Nullable
public Sdk getSdk() {
  final ModuleExtensionWithSdk<?> moduleExtension = getModuleExtension();
  if (moduleExtension == null) {
    return null;
  }
  return myModuleRootLayer.getRootModel().getConfigurationAccessor().getSdk(moduleExtension.getSdk(),
                                                                            moduleExtension.getSdkName());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:ModuleExtensionWithSdkOrderEntryImpl.java


示例8: getSdkName

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Override
@Nullable
public String getSdkName() {
  final ModuleExtensionWithSdk<?> moduleExtension = getModuleExtension();
  if (moduleExtension == null) {
    return null;
  }
  return moduleExtension.getSdkName();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:ModuleExtensionWithSdkOrderEntryImpl.java


示例9: getModuleExtension

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nullable
@Override
public ModuleExtensionWithSdk<?> getModuleExtension() {
  ModuleExtension<?> extensionWithoutCheck = myModuleRootLayer.getExtensionWithoutCheck(myModuleExtensionId);
  if (!(extensionWithoutCheck instanceof ModuleExtensionWithSdk)) {
    return null;
  }
  return (ModuleExtensionWithSdk) extensionWithoutCheck;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:ModuleExtensionWithSdkOrderEntryImpl.java


示例10: getSdk

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nullable
public static Sdk getSdk(@Nonnull Module module, @Nonnull Class<? extends ModuleExtensionWithSdk> extensionClass) {
  ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);

  final ModuleExtensionWithSdk<?> extension = moduleRootManager.getExtension(extensionClass);
  if (extension == null) {
    return null;
  }
  else {
    return extension.getSdk();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:ModuleUtilCore.java


示例11: getEffectiveJDK

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nullable
public Sdk getEffectiveJDK()
{
	if(!XsltRunSettingsEditor.ALLOW_CHOOSING_SDK)
	{
		return getDefaultSdk();
	}
	if(myJdkChoice == JdkChoice.JDK)
	{
		return myJdk != null ? SdkTable.getInstance().findSdk(myJdk) : null;
	}
	Sdk jdk = null;
	final Module module = getEffectiveModule();
	if(module != null)
	{
		ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
		ModuleExtension maybeJavaExtension = moduleRootManager.getExtension("java");
		if(maybeJavaExtension instanceof ModuleExtensionWithSdk)
		{
			jdk = ((ModuleExtensionWithSdk) maybeJavaExtension).getSdk();
		}
	}

	// EA-33419
	if(jdk == null || !(jdk.getSdkType() instanceof JavaSdkType))
	{
		return getDefaultSdk();
	}
	return jdk;
}
 
开发者ID:consulo,项目名称:consulo-xslt,代码行数:31,代码来源:XsltRunConfiguration.java


示例12: LazyValueBySdk

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
public LazyValueBySdk(@NotNull ModuleExtensionWithSdk<?> extension, @NotNull T defaultValue, @NotNull NotNullFunction<Sdk, T> func)
{
	myExtension = extension;
	myFunc = func;
	myDefaultValue = defaultValue;
	myValue = defaultValue;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:8,代码来源:LazyValueBySdk.java


示例13: isModifiedImpl

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
public boolean isModifiedImpl(ModuleExtensionWithSdk<T> originExtension) {
  if (myIsEnabled != originExtension.isEnabled()) {
    return true;
  }
  return !mySdkPointer.equals(originExtension.getInheritableSdk());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:7,代码来源:ModuleExtensionWithSdkImpl.java


示例14: addModuleExtensionSdkEntry

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nonnull
@Override
public ModuleExtensionWithSdkOrderEntry addModuleExtensionSdkEntry(@Nonnull ModuleExtensionWithSdk<?> moduleExtension) {
  assertWritable();
  return getCurrentLayer().addModuleExtensionSdkEntry(moduleExtension);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:7,代码来源:RootModelImpl.java


示例15: addModuleExtensionSdkEntry

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nonnull
ModuleExtensionWithSdkOrderEntry addModuleExtensionSdkEntry(@Nonnull ModuleExtensionWithSdk<?> moduleExtension);
 
开发者ID:consulo,项目名称:consulo,代码行数:3,代码来源:ModifiableModuleRootLayer.java


示例16: getModuleExtension

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nullable
ModuleExtensionWithSdk<?> getModuleExtension();
 
开发者ID:consulo,项目名称:consulo,代码行数:3,代码来源:ModuleExtensionWithSdkOrderEntry.java


示例17: extensionChanged

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@RequiredDispatchThread
public void extensionChanged(MutableModuleExtension extension) {
  final JComponent secondComponent = myConfigurablePanelExtension != extension ? null : mySplitter.getSecondComponent();
  if (secondComponent == null && extension.isEnabled() || secondComponent != null && !extension.isEnabled()) {
    updateSecondComponent(!extension.isEnabled() ? null : extension);
  }

  if (extension instanceof ModuleExtensionWithSdk) {
    // we using module layer, dont use modifiable model - it ill proxy, and methods 'addModuleExtensionSdkEntry' && 'removeOrderEntry'
    // ill call this method again
    ModifiableModuleRootLayer moduleRootLayer = extension.getModuleRootLayer();

    final ModuleExtensionWithSdkOrderEntry sdkOrderEntry = moduleRootLayer.findModuleExtensionSdkEntry(extension);
    if (!extension.isEnabled() && sdkOrderEntry != null) {
      moduleRootLayer.removeOrderEntry(sdkOrderEntry);
    }

    if (extension.isEnabled()) {
      final ModuleExtensionWithSdk sdkExtension = (ModuleExtensionWithSdk)extension;
      if (!sdkExtension.getInheritableSdk().isNull()) {
        if (sdkOrderEntry == null) {
          moduleRootLayer.addModuleExtensionSdkEntry(sdkExtension);
        }
        else {
          final ModuleExtensionWithSdk<?> moduleExtension = sdkOrderEntry.getModuleExtension();
          if (moduleExtension != null && !Comparing.equal(sdkExtension.getInheritableSdk(), moduleExtension.getInheritableSdk())) {
            moduleRootLayer.addModuleExtensionSdkEntry(sdkExtension);
          }
        }
      }
      else if (sdkOrderEntry != null) {
        moduleRootLayer.removeOrderEntry(sdkOrderEntry);
      }
    }
  }

  for (PsiPackageSupportProvider supportProvider : PsiPackageSupportProvider.EP_NAME.getExtensions()) {
    final Module module = extension.getModule();
    if (supportProvider.isSupported(extension)) {
      PsiPackageManager.getInstance(module.getProject()).dropCache(extension.getClass());
    }
  }

  myClasspathEditor.moduleStateChanged();
  myContentEntriesEditor.moduleStateChanged();
  myOutputEditor.moduleStateChanged();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:48,代码来源:ExtensionEditor.java


示例18: getExtensionClass

import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nonnull
public abstract Class<? extends ModuleExtensionWithSdk<?>> getExtensionClass();
 
开发者ID:consulo,项目名称:consulo,代码行数:3,代码来源:ModuleSdkPathMacro.java



注:本文中的consulo.module.extension.ModuleExtensionWithSdk类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DefaultComparisonFactory类代码示例发布时间:2022-05-22
下一篇:
Java NodeFinder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap