if (domain instanceof ResourceAllocation) {
lastSelection = selection;
ResourceAllocation ra = (ResourceAllocation)domain;
ResourceAllocationPerspective perspective = mainWindow.getRAPerspective();
String textSolution = ra.getSolution().get(ra.getName());
String log = ra.getLog();
mainWindow.changePerspective(perspective);
perspective.setSummaryText(ra.getSummary());
perspective.setSourceTables(ra);
perspective.setSolutionTables(ra);
if (perspective.getContent().getSelection() == null)
perspective.getContent().setSelection(0);
if (textSolution != null)
perspective.setSolutionText(textSolution);
else
perspective.clearText();
if (log != null)
perspective.setServerOutputText(log);
else
perspective.clearText();
if ((ra.isSolved() || ra.isFailed()) && !ra.isAcknowledged()) {
ra.setState(Model.ACKNOWLEDGED);
mainWindow.getProblemBrowserTree().getTreeViewer().refresh();
}
if (ra.isStarted() && !ra.isFailed()) {
perspective.getAlgSelector().setEnabled(false);
perspective.getOptionsGroup().setEnabled(false);
}
else {
perspective.getAlgSelector().setEnabled(true);
perspective.getOptionsGroup().setEnabled(true);
}
Combo selector = perspective.getAlgSelector();
Text mText =
(Text)perspective.getOptionsGroup().getChildren()[ResourceAllocationPerspective.M_TEXT];
Text l1Text =
(Text)perspective.getOptionsGroup().getChildren()[ResourceAllocationPerspective.L1_TEXT];
Text l2Text =
(Text)perspective.getOptionsGroup().getChildren()[ResourceAllocationPerspective.L2_TEXT];
Text KText =
(Text)perspective.getOptionsGroup().getChildren()[ResourceAllocationPerspective.K_TEXT];
Text rText =
(Text)perspective.getOptionsGroup().getChildren()[ResourceAllocationPerspective.R_TEXT];
selector.select(ra.getAlgorithmIndex(ra.getAlgorithm()));
if (ra.getAlgorithm().equals("greedy4")) {
String m = ra.getAlgParams().get("m");