use of com.android.tools.idea.gradle.parser.Dependency in project android by JetBrains.
the class ModuleDependenciesTableModel method getFilter.
public RowFilter<ModuleDependenciesTableModel, Integer> getFilter() {
return new RowFilter<ModuleDependenciesTableModel, Integer>() {
@Override
public boolean include(Entry<? extends ModuleDependenciesTableModel, ? extends Integer> entry) {
ModuleDependenciesTableItem item = myItems.get(entry.getIdentifier());
BuildFileStatement e = item.getEntry();
return e instanceof Dependency || (e instanceof UnparseableStatement && !((UnparseableStatement) e).isComment());
}
};
}
use of com.android.tools.idea.gradle.parser.Dependency in project android by JetBrains.
the class ModuleDependenciesTableModel method getRow.
public int getRow(@NotNull GradleCoordinate dependency) {
int rowCount = getRowCount();
for (int i = 0; i < rowCount; i++) {
Object value = getValueAt(i, ITEM_COLUMN);
if (value instanceof ModuleDependenciesTableItem) {
BuildFileStatement entry = ((ModuleDependenciesTableItem) value).getEntry();
if (entry instanceof Dependency) {
String current = ((Dependency) entry).getValueAsString();
GradleCoordinate currentCoordinate = GradleCoordinate.parseCoordinateString(current);
if (currentCoordinate != null && dependency.equals(currentCoordinate)) {
return i;
}
}
}
}
return -1;
}
Aggregations