Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] GSoC Help Hover Refactorings

Hi Christian,

I pushed a commit regarding "Help hovers for code completion suggestions" to get your feedback. I included the refactoring tasks as well except the last one (awt classes related one). Since it related to the look and feel part I can do it at the end of the project with other look and feel improvements. 

Thank you. 

On Wed, Jul 8, 2015 at 10:21 PM, Vidura Mudalige <vbmudalige@xxxxxxxxx> wrote:
Hi Christian,

Thank you very much for the careful code review. For some reason I have missed some of these refactoring tasks. I will fix these things and will include in my next commit. At this weekend I can start the next iteration of the project. 

Thank you.

On Tue, Jul 7, 2015 at 8:29 PM, Christian Pontesegger <christian.pontesegger@xxxxxx> wrote:
Hi Vidura,

I have also some refactoring tasks for you:

ModuleHelp.java:

* all your static methods take an Object as input parameter, which you cast directly to your required type. You never check if you are allowed to cast at all. In this case best change the method signatures to the required type and cast from the caller (always check that the cast is allowed using instanceof)

* you have some call chains like getChild("h3").getChild("a").getTextData(). What if one of these returns 'null'? I know it is not nice, but you have to null check for each of those calls. One possible solutions to this could be a helper method that does this job for you:
IMemento extractNode(rootNode, "h3", "a", ...). Java supports variable arguments, that might help here



ModuleToolTipDecorator.java:

* we prefix all fields with an 'f', so it should be 'fBrowser' instead of browser

* you are importing some awt classes. I doubt this is necessary. You may extract location data from either the event or the ViewerCell.


Finally please see my other post for Martin, as it contains some suggestions that also affect you. Your next task will be to provide help information for the content proposals that Martin provides for the shell view. You do not need to show help for java classes, but for module methods/constants you should have everything in place. Please align with Martin that the provided content information is sufficient for you to gather the correct help topic.

--
Christian
_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ease-dev



--
Vidura Mudalige
Undergraduate
Computer Science & Engineering
University of Moratuwa.



--
Vidura Mudalige
Undergraduate
Computer Science & Engineering
University of Moratuwa.

Back to the top