本文整理汇总了Java中consulo.module.extension.ModuleExtensionWithSdk类的典型用法代码示例。如果您正苦于以下问题:Java ModuleExtensionWithSdk类的具体用法?Java ModuleExtensionWithSdk怎么用?Java ModuleExtensionWithSdk使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModuleExtensionWithSdk类属于consulo.module.extension包,在下文中一共展示了ModuleExtensionWithSdk类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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));
}
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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());
}
示例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();
}
示例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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例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());
}
示例14: addModuleExtensionSdkEntry
import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nonnull
@Override
public ModuleExtensionWithSdkOrderEntry addModuleExtensionSdkEntry(@Nonnull ModuleExtensionWithSdk<?> moduleExtension) {
assertWritable();
return getCurrentLayer().addModuleExtensionSdkEntry(moduleExtension);
}
示例15: addModuleExtensionSdkEntry
import consulo.module.extension.ModuleExtensionWithSdk; //导入依赖的package包/类
@Nonnull
ModuleExtensionWithSdkOrderEntry addModuleExtensionSdkEntry(@Nonnull ModuleExtensionWithSdk<?> moduleExtension);