org.xtext.gradle.idea.tasks.IdeaPluginDependencies Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xtext-idea-gradle-plugin Show documentation
Show all versions of xtext-idea-gradle-plugin Show documentation
A plugin for for building IntelliJ IDEA Xtext plugins
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;
}
}