Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Refactoring idea for org.eclipse.core.internal.runtime.InternalPlatform?
Refactoring idea for org.eclipse.core.internal.runtime.InternalPlatform? [message #1413487] Thu, 28 August 2014 16:45 Go to next message
Na Mising name is currently offline Na Mising nameFriend
Messages: 11
Registered: August 2011
Junior Member
Hi

I'm doing some research in automatic refactoring suggestion. By observing the co-change pattern of some similar code, we would like to develop a tool to suggest possible refactorings to apply in order to extract out common code while parameterizing any difference between them.

I have examined the copse snippets in class org.eclipse.core.internal.runtime.InternalPlatform.java. In the class, there are three methods: getPreferencesService(), getContentTypeManager(), and getBundleAdmin(). I see these methods have pretty similar method bodies and also experience similar changes at least one time in the version history. Do you think it will be a good idea or bad idea to extract a method out of the methods while parameterizing any differences among them?

As far as I can see, these methods are only different in terms of types they use: IPreferencesService vs. IContentTypeManager vs. PackageAdmin. If you would like to apply the refactoring, what will be the refactored version like? Otherwise, if you don't like the refactoring idea, would you like to share the factors in your mind which affects your decision, such as complexity of refactoring, poor readability, poor maintainability, code size, etc. For each factor, how do you think it can affects your decision about using refactoring? If possible, any quantative analysis will be great. For example, if the code size after refactoring is greater than that before refactoring, I won't do refactoring. Or
if there are only two lines shared between two code snippets, I won't do refactoring, etc.

Thanks a lot for your help! Your suggestion will be very valuable for our research.
Re: Refactoring idea for org.eclipse.core.internal.runtime.InternalPlatform? [message #1413528 is a reply to message #1413487] Thu, 28 August 2014 19:34 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
This is an interesting topic, but not really suited to the Newcomers group. I suggest you re-post it in the Eclipse Platform forum group.
Re: Refactoring idea for org.eclipse.core.internal.runtime.InternalPlatform? [message #1413543 is a reply to message #1413528] Thu, 28 August 2014 20:17 Go to previous message
Na Mising name is currently offline Na Mising nameFriend
Messages: 11
Registered: August 2011
Junior Member
Hi Eric,

Thank you for your great suggestion! I'll follow your advice.

Best regards,
Na Meng
Previous Topic:Eclipse Luna EE and the new 'Classic theme'
Next Topic:What has hapened to Luna Online Help?
Goto Forum:
  


Current Time: Fri Apr 19 03:34:16 GMT 2024

Powered by FUDForum. Page generated in 0.03795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top