protected void makeStartCommandControlsVisible(StartCommandType typeToMakeVisible) { StartCommandPart part = startCommandAreas.get(typeToMakeVisible); Control areaToMakeVisible = part != null ? part.getComposite() : null; if (areaToMakeVisible != null && !areaToMakeVisible.isDisposed()) { GridData data = (GridData) areaToMakeVisible.getLayoutData(); GridDataFactory.createFrom(data).exclude(false).applyTo(areaToMakeVisible); areaToMakeVisible.setVisible(true); // Hide the other sections // If hiding, exclude from layout as to not take up space when it is // made invisible for (StartCommandType otherTypes : startCommandAreas.keySet()) { if (!otherTypes.equals(typeToMakeVisible)) { StartCommandPart otherArea = startCommandAreas.get(otherTypes); if (otherArea != null) { Control otherAreaComposite = otherArea.getComposite(); if (!otherAreaComposite.isDisposed()) { data = (GridData) otherAreaComposite.getLayoutData(); GridDataFactory.createFrom(data).exclude(true).applyTo(otherAreaComposite); otherAreaComposite.setVisible(false); } } } } // Recalculate layout areaToMakeVisible.getParent().layout(true, true); } }