Skip to content

Commit 336ea0d

Browse files
eclipse-pde-botmerks
authored andcommitted
Perform clean code of e4tools/bundles/org.eclipse.e4.tools.compatibility.migration
1 parent fd1ebe3 commit 336ea0d

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

e4tools/bundles/org.eclipse.e4.tools.compatibility.migration/src/org/eclipse/e4/tools/compatibiliy/migration/PerspectiveMigrator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.eclipse.ui.internal.IWorkbenchConstants;
2727

2828
/**
29-
* The PerspectiveMigrator utility allows to convert
29+
* The PerspectiveMigrator utility allows to convert
3030
* and apply 3.x and e4 perspectives.
3131
*
3232
* @since 1.0
@@ -35,7 +35,7 @@
3535
public final class PerspectiveMigrator{
3636

3737
private PerspectiveMigrator() {}
38-
38+
3939
/**
4040
* Apply a 3.x workbench state to the running 4.x application.
4141
*

e4tools/bundles/org.eclipse.e4.tools.compatibility.migration/src/org/eclipse/e4/tools/internal/compatibiliy/migration/E4MigrationTool.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@
128128
import org.eclipse.ui.internal.e4.compatibility.ModeledPageLayoutUtils;
129129

130130
/**
131-
* This utility class allows to migrate existing 3.x perspectives to
131+
* This utility class allows to migrate existing 3.x perspectives to
132132
* an e4 application models.
133-
*
133+
*
134134
*
135135
* @since 1.0
136136
*/
@@ -526,8 +526,7 @@ private void visitPerspectives(final MWindow window, final IMemento memento) {
526526

527527
for (Iterator<EObject> i = ((EObject) perspectivePartSashContainer).eAllContents(); i.hasNext();) {
528528
EObject eObject = i.next();
529-
if (eObject instanceof MPartStack) {
530-
MPartStack partStack = (MPartStack) eObject;
529+
if (eObject instanceof MPartStack partStack) {
531530
boolean toBeRendered = false;
532531
boolean minimized = false;
533532
// If non of the stack's children are rendered, do not render the stack either
@@ -564,8 +563,7 @@ private void visitPerspectives(final MWindow window, final IMemento memento) {
564563

565564
for (Iterator<EObject> i = ((EObject) perspectivePartSashContainer).eAllContents(); i.hasNext();) {
566565
EObject eObject = i.next();
567-
if (eObject instanceof MPartSashContainer) {
568-
MPartSashContainer otherPartSashContainer = (MPartSashContainer) eObject;
566+
if (eObject instanceof MPartSashContainer otherPartSashContainer) {
569567
boolean toBeRendered = false;
570568
boolean visible = false;
571569
for (MPartSashContainerElement sashContainerElement : otherPartSashContainer

e4tools/bundles/org.eclipse.e4.tools.compatibility.migration/src/org/eclipse/e4/tools/internal/compatibiliy/migration/WorkbenchUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
@SuppressWarnings("restriction")
2525
public final class WorkbenchUtil {
26-
26+
2727
private WorkbenchUtil() {}
2828

2929
/**
@@ -43,7 +43,7 @@ private static IEclipseContext getEclipseContext() {
4343
public static EModelService getEModelService() {
4444
return getEclipseContext().get(EModelService.class);
4545
}
46-
46+
4747
/**
4848
* Retrieve the first MWindow from the MApplication from the EclipseContext.
4949
*

0 commit comments

Comments
 (0)