/*
 * Copyright 2013-2018 consulo.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.openapi.module.impl;

import com.intellij.openapi.module.LoadedModuleDescription;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.roots.ModuleRootManager;
import org.jetbrains.annotations.NotNull;

import java.util.Arrays;
import java.util.List;

/**
 * from kotlin
 */
public class LoadedModuleDescriptionImpl implements LoadedModuleDescription {
  private final Module myModule;

  public LoadedModuleDescriptionImpl(Module module) {
    myModule = module;
  }

  @NotNull
  @Override
  public Module getModule() {
    return myModule;
  }

  @NotNull
  @Override
  public String getName() {
    return myModule.getName();
  }

  @NotNull
  @Override
  public List<String> getDependencyModuleNames() {
    return Arrays.asList(ModuleRootManager.getInstance(myModule).getDependencyModuleNames());
  }
}

@@ -1051,16 +1051,25 @@
 ionImpl(
+@NotNull 
 Module m
@@ -1442,11 +1442,597 @@
 ());%0A  %7D
+%0A%0A  @Override%0A  public boolean equals(Object o) %7B%0A    if (this == o) return true;%0A    if (o == null %7C%7C getClass() != o.getClass()) return false;%0A%0A    LoadedModuleDescriptionImpl that = (LoadedModuleDescriptionImpl)o;%0A%0A    if (!myModule.equals(that.myModule)) return false;%0A%0A    return true;%0A  %7D%0A%0A  @Override%0A  public int hashCode() %7B%0A    return myModule.hashCode();%0A  %7D%0A%0A  @Override%0A  public String toString() %7B%0A    final StringBuilder sb = new StringBuilder(%22LoadedModuleDescriptionImpl%7B%22);%0A    sb.append(%22myModule=%22).append(myModule);%0A    sb.append('%7D');%0A    return sb.toString();%0A  %7D
 %0A%7D%0A

add equals + hashCode methods for correct work selecting in comboboxes