setPageComplete(itemsChecked);
}
});
TableViewer viewer = new TableViewer(_tabLibraries);
List<LibrarySet> librarySets = new ArrayList<LibrarySet>(WGADesignerPlugin.getDefault().getLibrarySets().values());
Iterator<LibrarySet> setIt = librarySets.iterator();
while (setIt.hasNext()) {
String id = setIt.next().getId();
IPath currentSetPath = new Path(WGALibrarySetContainer.ID).append(id);
if (_currentEntries != null) {
// check if id is already in classpathentries
for (IClasspathEntry entry : _currentEntries) {
if (entry.getPath().equals(currentSetPath)) {
setIt.remove();
}
}
}
}
Collections.sort(librarySets, new Comparator<LibrarySet>() {
public int compare(LibrarySet o1, LibrarySet o2) {
return o1.getName().compareTo(o2.getName());
}
});
BeanListTableModel<LibrarySet> model = new BeanListTableModel<LibrarySet>(librarySets) {
@Override
public int getColumnCount() {
return 1;
}
@Override
public String getColumnText(LibrarySet bean, int column) {
return bean.getName();
}
@Override
public Object getColumnValue(LibrarySet bean, int column) {
return bean.getName();
}
@Override
public boolean isColumnEditable(LibrarySet bean, int column) {
return false;
}
@Override
public void setColumnValue(LibrarySet bean, int column, Object value) {
}
};
viewer.setContentProvider(new BeanListTableModelContentProvider());
viewer.setLabelProvider(new BeanListTableModelLabelProvider(model));
viewer.setInput(model);
setControl(container);
}