DESCRIPTION

Bug 456727 - Code cleanup: make Perspective code warnings free

Introduced generics where possible, removed unused code, removed wrong
javadocs, converted ArrayList->List in signatures, made fields final
private.

Removed few never written fields and appropriate methods.

Converted spaces to tabs all over the code (was a funny mix of both).

Change-Id: I14832d75b5c3096e8cfcadbde0fed2c1b953aeb7
Signed-off-by: Jayvion Booth xxx@xxx.xxx

COMMENTS

author: Zaid Mosley
date: 2015-01-06 10:31:13.000000000

Patch Set 8: Code-Review-1

(5 comments)

Line:48, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> maybe find a better name then "temp"?

Line:63, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> stringList and outputList are not very telling. Maybe use initialActionSets instead of outputList and find also a better name for stringList

Line:79, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> Empty method, I think this can be removed.

Line:118, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> Hard to say in Gerrit (I still have to pull in the change into Eclipse) but the checks are already done in the protected addAlwaysOff method. Is this method called in places where these checks are not already done?

Line:160, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> Very similar to the removeAlwaysOn. Maybe join both methods and use a boolean flag?

-------------------------------------
author: Zaid Mosley
date: 2015-01-06 10:35:45.000000000

Patch Set 8:

Thanks Andrey, looks better, I still have some minor suggestions, please review.

-------------------------------------
author: Zaid Mosley
date: 2015-01-06 10:45:22.000000000

Patch Set 8:

(1 comment)

Line:160, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> Or maybe create a helper method for checking if descriptor is null and if the collection contains is not null, e.g. removeDescriptorFromList(descriptor, list).

-------------------------------------
author: Brenden Conley
date: 2015-01-06 11:16:15.000000000

Patch Set 8:

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

-------------------------------------
author: Brenden Conley
date: 2015-01-06 11:42:17.000000000

Patch Set 8: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/3994/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2015-01-06 12:15:04.000000000

Patch Set 8:

(4 comments)

I've did some more cleanup as requested. Lars, please do not rebase patches if I'm working on it- I've missed that you've changed the commit message in the meantime - just comment on the commit message itself in the review.

Line:48, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> Done

Line:63, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> Done

Line:79, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> Done

Line:160, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/Perspective.java -> I've removed redundant null checks. Adding new method is not beneficial here because we still have to check if it was removed/added - and we will end up writing more code as before. I don't think we should try to "optimize" this code anymore - it is simple enough to be easily understood.

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