Sunday, June 08, 2008

First steps...

It's the end of the semester here and I must work hard on my grades therefore I can't spend much time on my GSOC project (this situation will last until the last week of june). I managed to do some work this weekend though and here are the results:

1. I created a simple toString() generator to see if it will work. And it does :) For now it's only a string concatenationi with hardcoded format. I don't know how to put line breaks in generated code and I have no idea where to look for it. Any clues?

2. I decided to start with something simple - redesign hashcode/equals generation dialog to include toString() features. Here's the effect:

"Up" and "Down" buttons already work - I copied this functionality from "generate constructor using fields" dialog. The rest of the controls don't have any effect yet..
I plan to add a list of class methods to the view (in a separate node of the tree). With all methods on the list, the option to use getters instead of fields accessors is no longer needed (unless we want this option for hashCode and equals, but that's another story).

That's all for now, I know it's not much. But I think I can complete the project without many problems if I focus all of my attention on it next month.

BTW, Mike, should I put my code somewhere for everybody to see? Right now I modify my local copy of org.eclipse.jdt.ui plugin - is that ok?


mhaller said...

Hey Mateusz,

thanks for the status blog post. It already looks nice.

I'm trying to find out where to commit the project sources, and until that's sorted out you'll have to use your local copy.

Markus, what do you think how long it will take for the technology.soc cvs to be set up? Meanwhile, I can provide a dedicated Subversion repository.

For the code generation, if you use AST then you're adding statements instead of plain strings and that will automatically include newlines.

For AST, see "Manipulating Java Code" chapter in the "JDT Plug-In Developer Guide > Programmers Guide > JDT Core" in the Eclipse documentation.


Jacek Pospychala said...

so Mateusz, when will we have chance to offer you something to drink in our happy office? :) said...

Why not post it as a patch to bug We can't immediately release it to technology.soc CVS anyway since the code has to go through IP review.

mhaller said...

@Lemmy: While development, he probably wants to have a version control system repository, too. The patch is the artifact at the end. At least thats my oppinion.