consulo.module.extension.MutableModuleInheritableNamedPointer Java Examples

The following examples show how to use consulo.module.extension.MutableModuleInheritableNamedPointer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SdkComboBox.java    From consulo with Apache License 2.0 6 votes vote down vote up
@RequiredReadAction
@SuppressWarnings("unchecked")
public <T extends MutableModuleExtension<?>> void insertModuleItems(@Nonnull T moduleExtension,
                                                                    @Nonnull NullableFunction<T, MutableModuleInheritableNamedPointer<Sdk>> sdkPointerFunction) {

  for (Module module : ModuleManager.getInstance(moduleExtension.getModule().getProject()).getModules()) {
    // dont add self module
    if (module == moduleExtension.getModule()) {
      continue;
    }

    ModuleExtension extension = ModuleUtilCore.getExtension(module, moduleExtension.getId());
    if (extension == null) {
      continue;
    }
    MutableModuleInheritableNamedPointer<Sdk> sdkPointer = sdkPointerFunction.fun((T)extension);
    if (sdkPointer != null) {
      // recursive depend
      if (sdkPointer.getModule() == moduleExtension.getModule()) {
        continue;
      }
      addItem(new ModuleExtensionSdkComboBoxItem(extension, sdkPointer));
    }
  }
}
 
Example #2
Source File: BundleBox.java    From consulo with Apache License 2.0 6 votes vote down vote up
@RequiredUIAccess
@SuppressWarnings("unchecked")
public <T extends MutableModuleExtension<?>> void addModuleExtensionItems(@Nonnull T moduleExtension, @Nonnull Function<T, MutableModuleInheritableNamedPointer<Sdk>> sdkPointerFunction) {
  MutableListModel<BundleBoxItem> listModel = (MutableListModel<BundleBoxItem>)myOriginalComboBox.getListModel();

  for (Module module : ModuleManager.getInstance(moduleExtension.getModule().getProject()).getModules()) {
    // dont add self module
    if (module == moduleExtension.getModule()) {
      continue;
    }

    ModuleExtension extension = ModuleUtilCore.getExtension(module, moduleExtension.getId());
    if (extension == null) {
      continue;
    }
    MutableModuleInheritableNamedPointer<Sdk> sdkPointer = sdkPointerFunction.apply((T)extension);
    if (sdkPointer != null) {
      // recursive depend
      if (sdkPointer.getModule() == moduleExtension.getModule()) {
        continue;
      }

      listModel.add(new ModuleExtensionBundleBoxItem(extension, sdkPointer));
    }
  }
}
 
Example #3
Source File: Unity3dRootMutableModuleExtension.java    From consulo-unity3d with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public MutableModuleInheritableNamedPointer<Sdk> getInheritableSdk()
{
	return (MutableModuleInheritableNamedPointer<Sdk>) super.getInheritableSdk();
}
 
Example #4
Source File: Unity3dChildMutableModuleExtension.java    From consulo-unity3d with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public MutableModuleInheritableNamedPointer<Sdk> getInheritableSdk()
{
	return (MutableModuleInheritableNamedPointer<Sdk>) super.getInheritableSdk();
}
 
Example #5
Source File: Unity3dScriptMutableModuleExtension.java    From consulo-unity3d with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public MutableModuleInheritableNamedPointer<Sdk> getInheritableSdk()
{
	return (MutableModuleInheritableNamedPointer<Sdk>) super.getInheritableSdk();
}
 
Example #6
Source File: CSharpMutableModuleExtension.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Override
@Nonnull
MutableModuleInheritableNamedPointer<Sdk> getCustomCompilerSdkPointer();
 
Example #7
Source File: BaseCSharpModuleExtension.java    From consulo-csharp with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public MutableModuleInheritableNamedPointer<Sdk> getCustomCompilerSdkPointer()
{
	return myCustomCompilerSdkPointer;
}
 
Example #8
Source File: ModuleExtensionSdkBoxBuilder.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@UsedInPlugin
public ModuleExtensionSdkBoxBuilder<T> sdkPointerFunc(@Nonnull NullableFunction<T, MutableModuleInheritableNamedPointer<Sdk>> function) {
  mySdkPointerFunction = function;
  return this;
}
 
Example #9
Source File: ModuleExtensionBundleBoxBuilder.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@UsedInPlugin
public ModuleExtensionBundleBoxBuilder<T> sdkPointerFunc(@Nonnull Function<T, MutableModuleInheritableNamedPointer<Sdk>> function) {
  mySdkPointerFunction = function;
  return this;
}
 
Example #10
Source File: SdkComboBox.java    From consulo with Apache License 2.0 4 votes vote down vote up
public ModuleExtensionSdkComboBoxItem(ModuleExtension<?> moduleExtension,
                                      MutableModuleInheritableNamedPointer<Sdk> sdkPointer) {
  super(null);
  myModuleExtension = moduleExtension;
  mySdkPointer = sdkPointer;
}
 
Example #11
Source File: BundleBox.java    From consulo with Apache License 2.0 4 votes vote down vote up
public ModuleExtensionBundleBoxItem(ModuleExtension<?> moduleExtension, MutableModuleInheritableNamedPointer<Sdk> sdkPointer) {
  myModuleExtension = moduleExtension;
  mySdkPointer = sdkPointer;
}
 
Example #12
Source File: SandMutableModuleExtension.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public MutableModuleInheritableNamedPointer<Sdk> getInheritableSdk() {
  return (MutableModuleInheritableNamedPointer<Sdk>)super.getInheritableSdk();
}
 
Example #13
Source File: CSharpSimpleMutableModuleExtension.java    From consulo-csharp with Apache License 2.0 votes vote down vote up
MutableModuleInheritableNamedPointer<CSharpLanguageVersion> getLanguageVersionPointer();