Skip to content

Commit 87a9d52

Browse files
feilimblaeubi
authored andcommitted
Attempt to fix some weird code formatting which was visible in the PR.
1 parent d7a2834 commit 87a9d52

File tree

1 file changed

+12
-15
lines changed
  • examples/org.eclipse.e4.ui.examples.dummyeditor/src/org/eclipse/e4/ui/examples/dummyeditor

1 file changed

+12
-15
lines changed

examples/org.eclipse.e4.ui.examples.dummyeditor/src/org/eclipse/e4/ui/examples/dummyeditor/OpenEditorHandler.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,31 @@
2828
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
2929

3030
public class OpenEditorHandler {
31-
31+
3232
public static final String DUMMY_EDITOR_DESCRIPTOR_ID = "org.eclipse.e4.ui.examples.dummyeditor.partdescriptor.dummyeditor";
33-
33+
3434
@Execute
3535
public void execute(EModelService modelService, MApplication application, EPartService partService) {
3636
Predicate<MPart> isEditorAlreadyOpenFilter = part -> DUMMY_EDITOR_DESCRIPTOR_ID.equals(part.getElementId());
37-
Optional<MPart> alreadyOpenMatchingPart = partService.getParts().stream().filter(isEditorAlreadyOpenFilter).findFirst();
37+
Optional<MPart> alreadyOpenMatchingPart = partService.getParts().stream().filter(isEditorAlreadyOpenFilter)
38+
.findFirst();
3839

3940
MPart dummyPart = alreadyOpenMatchingPart.orElse(partService.createPart(DUMMY_EDITOR_DESCRIPTOR_ID));
40-
if (alreadyOpenMatchingPart.isEmpty())
41-
{
41+
if (alreadyOpenMatchingPart.isEmpty()) {
4242
dummyPart = partService.createPart(DUMMY_EDITOR_DESCRIPTOR_ID);
43-
44-
// not entirely necessary: but for consistency let's place our dummy editor
43+
44+
// not entirely necessary: but for consistency let's place our dummy editor
4545
// where editor instances appear
4646
Optional<MPartStack> primaryDataStack = findPrimaryConfiguationAreaPartStack(application, modelService);
47-
if (primaryDataStack.isPresent())
48-
{
49-
primaryDataStack.get().getChildren().add(dummyPart);
50-
}
51-
}
52-
else
53-
{
47+
if (primaryDataStack.isPresent()) {
48+
primaryDataStack.get().getChildren().add(dummyPart);
49+
}
50+
} else {
5451
dummyPart = alreadyOpenMatchingPart.get();
5552
}
5653

5754
partService.showPart(DUMMY_EDITOR_DESCRIPTOR_ID, PartState.ACTIVATE);
58-
partService.bringToTop(dummyPart);
55+
partService.bringToTop(dummyPart);
5956
}
6057

6158
private Optional<MPartStack> findPrimaryConfiguationAreaPartStack(MApplication application,

0 commit comments

Comments
 (0)