String[] sNames = (String[]) pluginViews.keySet().toArray(new String[0]);
for (int i = 0; i < sNames.length; i++) {
UISWTViewEventListener l = (UISWTViewEventListener) pluginViews.get(sNames[i]);
if (l != null) {
try {
UISWTViewImpl view = new UISWTViewImpl(
UISWTInstance.VIEW_MYTORRENTS, sNames[i], l);
addSection(view);
} catch (Exception e) {
// skip
}
}
}
}
}
// Initialize view when user selects it
folder.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
folder.getShell().setCursor(e.display.getSystemCursor(SWT.CURSOR_WAIT));
try {
// Send one last refresh to previous tab, just in case it
// wants to do something when view goes invisible
refresh();
CTabItem item = (CTabItem)e.item;
if (item != null) {
IView view = (IView)item.getData("IView");
activeView = view;
if (item.getControl() == null) {
view.initialize(folder);
item.setControl(view.getComposite());
}
item.getControl().setFocus();
UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT();