Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am a veteran Delphi programmer working on my first real Android app. I am usin

ID: 639585 • Letter: I

Question

I am a veteran Delphi programmer working on my first real Android app. I am using Eclipse and Java as my development environment. The thing I miss the most of course is Delphi's VCL components and the associated IDE tools for design-time editing and code creation. Fortunately I am finding Eclipse to be one hell of an IDE with it's lush context sensitive help, deep auto-complete and code wizard facilities, and other niceties. This is a huge double treat since it is free. However, here is an example of something in the Eclipse/Java environment that will give a Delphi programmer pause. I will use the simple case of adding an "on-click" code stub for an OK button.

DELPHI

Drop button on a form
Double-click button on form and fill in the code that will fire when the button is clicked
ECLIPSE

Drop button on layout in the graphical XML file editor
Add the View.OnClickListener interface to the containing class's "implements" list if not there already. (Command+1 on Macs, Ctrl + 1 on PCs I believe).
Use Eclipse to automatically add the code stub for unimplemented methods needed to support the View.OnClickListener interface, thus creating the event handler function stub.
Find the stub and fill it in. However, if you have more than one possible click event source then you will need to inspect the View parameter to see which View element triggered the OnClick() event, thus requiring a case statement to handle multiple click event sources.
NOTE: I am relatively new to Eclipse/Java so if there is a much easier way of doing this please let me know.

Now that work flow isn't all that terrible, but again, that's just the simplest of use cases. Ratchet up the amount of extra work and thinking for a more complex component (aka widget) and the large number of properties/events it might have. It won't be long before you miss dearly the Delphi intelligent property editor and other designers. Eclipse tries to cover this ground by having an extensive list of properties in the menu that pops up when you right-click over a component/widget in the XML graphical layout editor. That's a huge and welcome assist but it's just not even close to the convenience of the Delphi IDE.

Let me be very clear. I absolutely am not ranting nor do I want to start a Delphi vs. Java ideology discussion. Android/Eclipse/Java is what it is and there is a lot that impresses me. What I want to know is what other Delphi programmers that made the switch to the Eclipse/Java IDE have done to make things more Delphi like, and not just to make component/widget event code creation easier but any programming task. For example:

Clever tips/tricks
Eclipse plugins you found
other ideas?
Any great blog posts or web resources on the topic are appreciated too.

Explanation / Answer

It sounds like you're looking for NetBeans, not eclipse. The Matisse GUI designer in NetBeans is much more like the "RAD" you're used to in Delphi. I found, for example that this goes only so far. In swing toolkit, there is no equivalent of even simple things like TImage. Instead, look for a tutorial on how to take a Label component, and load a picture into it. (You add a resource to your project and get the label to view it).

While swing allows "absolute positioning" (something you probably never thought about because it's just about the only thing most Delphi controls support fully), Swing mainly and primarily supports layout based UI designs.

There is a lot to learn when moving from Delphi or C# winForms, to the world of Java UI development. If you're using Eclipse, and SWT UI toolkit, I am not aware of anything even remotely similar to Delphi.

By the way, I dearly miss Delphi's designtime environment, no matter what else I try. There's really nothing else like it out there. If you're looking for a delphi-like experience for writing Android apps, well, you're going to be waiting even longer. Add Android's odd "activity based" application architecture, and the dual-mode development environment (native versus dalvik) and you have some pretty big hurdles for RAD tools to climb.