DESCRIPTION

Bug 459285 - added type check for MTrimmedWindow before casting

Change-Id: Ifce0b0a79a2e4e4f49e57dcfcf031bc0f25a4099
Signed-off-by: Myah Faulkner xxx@xxx.xxx


COMMENTS

author: Myah Faulkner
date: 2015-02-06 22:30:45.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2015-02-06 22:45:35.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/4427/

-------------------------------------
author: Brenden Conley
date: 2015-02-06 23:01:38.000000000

Patch Set 3: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/4427/ : UNSTABLE

-------------------------------------
author: Zaid Mosley
date: 2015-02-13 11:13:44.000000000

Patch Set 3: Code-Review-1

(2 comments)

See comments

Line:7, /COMMIT_MSG -> Please always use the Bug number plus the bug description from bugzilla, in this case

Bug 459285 - CCE in MinMaxAddon when trying to remove a perspective from a non MTrimmedWindow

Line:250, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java -> Why not add this to the check in line 240?

-------------------------------------
author: Myah Faulkner
date: 2015-02-13 11:40:09.000000000

Patch Set 3:

(1 comment)

Line:250, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java -> I'm not sure what semantic impact this would have. The modification simply checks before casting, which should be always be done prior casting. You suggestion would mean to not perform any code in such a case, which not necessarily needs to be correct.

-------------------------------------
author: Zaid Mosley
date: 2015-02-13 12:00:20.000000000

Patch Set 3:

(1 comment)

Line:250, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java -> Ah, I missed that we do this in the for loop. I suggest to change the code to use break with a comment like the following

// Only TrimmedWindows can have minized stacks
if (!...)
  break;
}

-------------------------------------
author: Myah Faulkner
date: 2015-02-13 12:16:04.000000000

Patch Set 3:

(1 comment)

Line:250, bundles/org.eclipse.e4.ui.workLeon Ochoach.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java -> The for loop is misleading. You were right! In the for loop always the top level window for the changed element is retrieved. This can be done earlier and the check can happen in the first if clause as suggested by you at first.

Patch is on its way.

-------------------------------------
