use of org.erlide.ui.dialogs.AddInterpretedModulesSelectionDialog in project erlide_eclipse by erlang.
the class DebugTab method getModulesFromAddModulesDialog.
public static List<IErlModule> getModulesFromAddModulesDialog(final Shell shell) {
final List<IErlModule> result = Lists.newArrayList();
final AddInterpretedModulesSelectionDialog dialog = new AddInterpretedModulesSelectionDialog(shell);
final int resultCode = dialog.open();
if (resultCode != IDialogConstants.OK_ID) {
return result;
}
final Object[] dialogResult = dialog.getResult();
if (dialogResult == null || dialogResult.length == 0) {
return result;
}
final IErlModel model = ErlangEngine.getInstance().getModel();
for (final Object o : dialogResult) {
if (o instanceof IFile) {
final IFile file = (IFile) o;
result.add(model.findModule(file));
}
}
return result;
}
Aggregations