use of org.erlide.cover.ui.launch.helpers.ProjectElement in project erlide_eclipse by erlang.
the class CoverMainTab method createProjectArray.
private Object[] createProjectArray() {
Object[] array;
try {
final List<ProjectElement> res = new LinkedList<>();
final Collection<IErlProject> projects = ErlangEngine.getInstance().getModel().getErlangProjects();
for (final IErlProject p : projects) {
final ProjectElement elem = new ProjectElement(p.getName(), PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJ_PROJECT).createImage());
res.add(elem);
}
array = res.toArray();
} catch (final ErlModelException e) {
array = new Object[0];
ErlLogger.error(e);
}
return array;
}
use of org.erlide.cover.ui.launch.helpers.ProjectElement in project erlide_eclipse by erlang.
the class CoverMainTab method createModuleArray.
private Object[] createModuleArray(final IErlProject p) {
Object[] array;
try {
final List<ProjectElement> res = new LinkedList<>();
final Collection<IErlModule> modules = p.getModules();
for (final IErlModule m : modules) {
final ProjectElement elem = new ProjectElement(m.getName(), ErlangElementImageProvider.getErlImageDescriptor(m, ErlangElementImageProvider.SMALL_ICONS).createImage());
res.add(elem);
}
array = res.toArray();
} catch (final ErlModelException e) {
array = new Object[0];
ErlLogger.error(e);
}
return array;
}
Aggregations