Commit a59e5315 authored by cdelbe's avatar cdelbe
Browse files

PICKED FROM TRUNK 15037

SCHEDULING-525 Fixed authentication dialog popup.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/proactive/scheduling/branches/Scheduling_2.0.x@15115 28e8926c-6b08-0410-baaa-805c5e19b8d6
parent d0a5a4ca
......@@ -52,6 +52,7 @@ import org.eclipse.ui.part.ViewPart;
import org.ow2.proactive.resourcemanager.gui.actions.CollapseAllAction;
import org.ow2.proactive.resourcemanager.gui.actions.ExpandAllAction;
import org.ow2.proactive.resourcemanager.gui.data.RMStore;
import org.ow2.proactive.resourcemanager.gui.handlers.ConnectHandler;
import org.ow2.proactive.resourcemanager.gui.tree.RMTreeViewer;
import org.ow2.proactive.resourcemanager.gui.tree.TreeLabelProvider;
import org.ow2.proactive.resourcemanager.gui.tree.TreeSelectionListener;
......@@ -108,6 +109,12 @@ public class ResourceExplorerView extends ViewPart {
if (RMStore.isConnected()) {
init();
treeViewer.expandAll();
} else {
Display.getCurrent().asyncExec(new Runnable() {
public void run() {
ConnectHandler.getHandler().execute(Display.getDefault().getActiveShell());
}
});
}
if (rmShell == null) {
......
......@@ -38,12 +38,16 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.ViewPart;
import org.ow2.proactive.resourcemanager.gui.Activator;
import org.ow2.proactive.resourcemanager.gui.compact.CompactViewer;
import org.ow2.proactive.resourcemanager.gui.compact.Filter;
import org.ow2.proactive.resourcemanager.gui.data.RMStore;
import org.ow2.proactive.resourcemanager.gui.data.model.RMModel;
import org.ow2.proactive.resourcemanager.gui.handlers.ConnectHandler;
/**
......@@ -63,6 +67,14 @@ public class ResourcesCompactView extends ViewPart {
public void createPartControl(Composite parent) {
compactView = new CompactViewer(parent);
if (!RMStore.isConnected()) {
Display.getCurrent().asyncExec(new Runnable() {
public void run() {
ConnectHandler.getHandler().execute(Display.getDefault().getActiveShell());
}
});
}
compactView.init();
hookContextMenu();
}
......
......@@ -104,15 +104,16 @@ public class ResourcesTabView extends ViewPart {
table.setSortColumn(table.getColumn(1));
hookContextMenu();
tabViewer.addSelectionChangedListener(new TableSelectionListener());
if (RMStore.isConnected()) {
tabViewer.init();
} else {
Display.getCurrent().asyncExec(new Runnable() {
public void run() {
ConnectHandler.getHandler().execute(Display.getDefault().getActiveShell());
}
});
}
Display.getCurrent().asyncExec(new Runnable() {
public void run() {
ConnectHandler.getHandler().execute(Display.getDefault().getActiveShell());
}
});
}
private void hookContextMenu() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment