if (part.isCloseable()) {
if (part.isDirty()) {
if (partService.savePart(part, true)) {
- partService.hidePart(part);
+ partService.hidePart(part, true);
}
} else {
- partService.hidePart(part);
+ partService.hidePart(part, true);
}
}
}
boolean canExecute(EPartService partService) {
boolean atLeastOnePart = false;
for (MPart part : partService.getParts()) {
- if (part.isVisible()) {
+ if (part.isVisible() && part.isCloseable()) {
atLeastOnePart = true;
break;
}