All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xtext.gradle.idea.tasks.IdeaPluginDependencies Maven / Gradle / Ivy

There is a newer version: 2.0.9-alpha.3
Show newest version
package org.xtext.gradle.idea.tasks;

import java.util.Comparator;
import java.util.HashSet;
import java.util.TreeSet;
import org.eclipse.xtend.lib.annotations.AccessorType;
import org.eclipse.xtend.lib.annotations.Accessors;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Pure;
import org.xtext.gradle.idea.tasks.ExternalIdeaPluginDependency;

@SuppressWarnings("all")
public class IdeaPluginDependencies {
  @Accessors(AccessorType.PUBLIC_GETTER)
  private final TreeSet externalDependencies = CollectionLiterals.newTreeSet(new Comparator() {
    @Override
    public int compare(final ExternalIdeaPluginDependency $0, final ExternalIdeaPluginDependency $1) {
      String _id = $0.getId();
      String _id_1 = $1.getId();
      return _id.compareTo(_id_1);
    }
  });
  
  @Accessors(AccessorType.PUBLIC_GETTER)
  private final HashSet projectDependencies = CollectionLiterals.newHashSet();
  
  private ExternalIdeaPluginDependency last;
  
  public void id(final String id) {
    ExternalIdeaPluginDependency _externalIdeaPluginDependency = new ExternalIdeaPluginDependency(id);
    this.last = _externalIdeaPluginDependency;
    this.externalDependencies.add(this.last);
  }
  
  public IdeaPluginDependencies version(final String version) {
    IdeaPluginDependencies _xblockexpression = null;
    {
      this.last.setVersion(version);
      _xblockexpression = this;
    }
    return _xblockexpression;
  }
  
  public boolean project(final String path) {
    return this.projectDependencies.add(path);
  }
  
  @Pure
  public TreeSet getExternalDependencies() {
    return this.externalDependencies;
  }
  
  @Pure
  public HashSet getProjectDependencies() {
    return this.projectDependencies;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy