Showing posts with label eclipse builder. Show all posts
Showing posts with label eclipse builder. Show all posts

Friday, March 11, 2011

SVN on Eclipse using JavaHL

If you're finding that Subversion is not working with Eclipse due to an error such as:
unable to load default svn client
Visit Collabnet and download the latest Universal Subversion Binaries. I searched for a direct link to get software using the Eclipse software utility, but found nothing as useful as the repository on Collabnet. Unfortunately you have to register first, but it's a quick form.

After you install the binaries, you should be able to verify that JavaHL is working by visiting Eclipse>Preferences>Team>SVN, on the drop-down for SVN interface client.

Friday, February 25, 2011

Integrating MAMP PHP and Eclipse PDT for CakePHP Debugging

There are a few steps necessary to get Eclipse PDT, MAMP, and a CakePHP app synchronized for debugging. Summarily, after adding the Zend Debugger to Eclipse, the php initialization file in MAMP must be modified so it can respond to Eclipse. MAMP is not pre-configured for use with Zend Debugger, so you must edit the php.ini file for MAMP. Find the location of this file in the phpinfo tab of MAMP (near the bottom in the screenshot):

Open this in a text editor such as vim, and you will find this info near the bottom (italicized configuration info added at this step):

[xdebug]
;zend_extension="/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

[Zend]
zend_extension="/Applications/MAMP/Library/modules/zend/ZendDebugger.so"
zend_debugger.allow_hosts=127.0.0.1
; zend_debugger.expose_remotely=always


Now that you have detailed the location of ZendDebugger.so, you need to actually add a copy of the file in that location. Go ahead and put a copy of ZendDebugger.co (which either you have already downloaded into your Eclipse plugin filesystem, or you can download it as part of the Zend Debugger package ) into this directory. Incidentally, ZendDebugger.co can be where ever you like, so long as the path in php.ini resolves to it.

Comment out any references to zend in php.ini, other than the ones in italics above. In addition, comment out xdebug references if they are not already commented out.

Finally, restart MAMP and look for this confirmation in your restarted phpinfo():


If debugging in Eclipse succeeds, the debugger will halt at the first instruction. Be sure to step through a few instructions (F5) to ensure it is working properly. Here is a thoughtful and concise external resource to follow as a further guideline.

Incidentally, CakePHP:


As stated above, this guide will help you get debugging to work with CakePHP. That part of the process entails a further step. Once you are in Eclipse debugging a CakePHP project, you may find the debugger prompts you to resolve the location of core php files as it steps through them. This will happen, for instance, when you debug CakePHP apps you have created by using the cake bake CLI prompt.

To resolve these prompts, simply make sure the following conditions are met:
  1. Your CakePHP app is in a project folder in Eclipse ( it has to be! )
  2. Your CakePHP core library is in a project folder in Eclipse. This way, the files are available to the IDE so Eclipse can step through them in a debug process.
This is a unique requirement of CakePHP. Since you are building from an external core library and debugging involves the core, it has to be in the IDE.

Wednesday, February 23, 2011

CakePHP / Eclipse Project Integration

Creating projects in Eclipse that work with CakeBake is a multi-step process consisting of:
  1. Initiate a new PHP Project in Eclipse, e.g. php_project
    • enable JavaScript code checkbox
  2. Create your initial database so you can input the settings in step 3.
  3. In Terminal, run cake bake /path/to/php_project
    • add database settings if you have them
    • heed this info if you are using MAMP and the database does not resolve
  4. Use eGit or SVN in Eclipse to bring in any plugins you may need
  5. Configure Run > External Tools > External Tools Configurations to run further operation such as
    • cake bake model
    • cake bake view
    • cake bake controller
  6. You can also simply use Terminal to invoke interactive cake commands. Refresh Eclipse to see subsequent filesystem changes.
See this earlier integration post for more background.

Thursday, February 17, 2011

CakePHP Cake Bake is Awesome

After taking CakePHP's Cake Bake CLI for a spin, I find myself exclaiming aloud:
This is good cake.
Following loads of exploration in IDEs and PHP MVC options, I have CakePHP running on Eclipse, served by MAMP Apache and MySQL, and debug enabled by PDT. Incidentally, this how-to on CakePHP/Eclipse integration from power-user rynop is invaulable.

View along with me as I run through a friendly interactive prompt called Cake Bake from within the Eclipse console. This will summarily build out the underpinnings of my entire site structure - model, view and controller - along with push-button validation (!!):


Note: working CakePHP install in Eclipse. Menu is Run > External Tools > Cake bake


Says the interactive shell script:


---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)


I can has cake - so simple!


Select validation options from the list


Look okay? *nods and pops open a beer*

So good! I will detail further on this. Gotta drink my beer now...

Wednesday, February 16, 2011

Zend Debugger for PDT

If you are attempting to debug in PHP, PDT is your answer. Listed in Software Updates as the Zend Debugger Feature, it can be plugged into your Eclipse build via the following address:

http://downloads.zend.com/pdt

It's free and it works seamlessly in conjunction with MAMP. When you run it, debug dialog is displayed in the panels in the Eclipse IDE. Objects can be halted via breakpoints for inspection.

Something else that is not free but I'm evaluating in response to upward trending: JetBrains PHPStorm IDE. On initial inspection, seems to offer the same web tools as Eclipse offers.

As a potential mid-weight candidate between TextMate and Eclipse, it could bust the whole thing wide open. After all, informative and easy's all I'm asking for, doesn't matter who provides it. Open source development is fine, but it tends to force platform specialization on the end user. I don't mind paying to avoid that.

Eclipse IDE with Aptana

I had recently set up Aptana on Eclipse to test out HTML5/JS/CSS/PHP integrated development. Among the options:
  • WTP
  • Aptana Stand-alone
  • Aptana Plug in
  • JSEclipse
I have tested them all, starting with Aptana. At the time, the plug-in server they offer was down, so I moved on. The other options were found lacking in particulars previously detailed. Now the plug-in service is back online, so I revisited it. The verdict: In hindsight, I'm glad it was down so I could see what other options are available. Now that it is working, I can thoroughly endorse this solution. Here's why:

Full AC functionality:


Enable third-party js libraries:


Predictive incorporation of project libraries:

Rails, Python, and PHP Debug support:


I will see about PHP frameworks with unit testing next. Ah the comforts of a comprehensive IDE.

Eclipse IDE Part 2

To summarize the posts before this one, I have been exhaustively demoing IDEs for standards-based Web 2.0 site development. My prerequisites, assuming these items can be met in the vendor community, are the following:
  • Content Assist for multiple languages (JS, PHP, Python)
  • functional debug perspective for PHP and Python
  • ability to add 3rd party and custom libraries to CA
  • integrated repo management
  • integrated file management
  • launch run/debug perspective from IDE
I've tested out the latest Eclipse release, Helios, which I use for AS3, under several configurations, including:
  • Eclipse Helios EE IDE, which includes the WTP and JSDT
  • Aptana plugin for Eclipse
  • JSEclipse
Collectively and individually, the results were less than ideal. At worst, I had a good editor environment with Aptana for CSS and HTML but no luck with JavaScript CA in Aptana. I did not have success with JSEclipse.

At best, Helios EE IDE provides CA only upon demand (ctrl+space), even when the preferences are set to insert CA automatically without delay. JQuery can be integrated, there is a process detailed here. I found the procedure to work though it leaves no provision to include further 3rd party JS.

Tuesday, February 15, 2011

Eclipse updates pt 1

This day has allowed me to explore the capabilities of Eclipse as a standards-based SDK. Perhaps not news to those who already use it for such, but since I use Flash Builder almost exclusively for Flash-based development, this is fresh territory. This further exploration came about as the result of a recent back-end dev project where the IDE options played out as either:
  • TextMate
  • vi on the Terminal CLI
  • Coda
I haven't delved into Coda, though I have a good amount of exposure on the other two. Let me state for the record that I endorse the viability and value of TextMate as an IDE. Now, clarifications duly stated, I would like an IDE that provides:
  • managing repositories such as svn and git
  • code lookup and completion for JavaScript, including 3rd party libraries
  • code lookup and completion for PHP
  • bracket pairing assistance that is broadside-of-a-barn obvious
  • local file, folder and directory management
  • quick access to function and property definitions (cmd-click seeking)
  • optionally, FTP management
I'd be happy to address which of these are addressed to my satisfaction in the above-listed IDEs, but for now I will summarily say none of them hit all the targets. That could be due to my own habits - perhaps blinders on my part - I would love nothing more than to be further educated on this. Beyond that, some of the newer PHP frameworks at large (CodeIgniter, CakePHP, Symfony) boast unit testing, and I would prefer an IDE with debugging breakpoints and object inspection so I can see what fury my code hath wrought in the runtime.

Thus far, I have done the following to spec up Eclipse:
  1. Update to Eclipse Helios 3.6
  2. Install PHP and JavaScript language packs for Eclipse
  3. Install eGit for Helios (tested and working)
  4. Install Aptana (see mild apprehension*)
  5. Install Eclipse Web Tools
*Aptana bills itself as:
a set of application development tools for Web 2.0 and ajax for use with programming languages such as JavaScript, Ruby, PHP and Python.
They had a big buzz out of the gate as a premium solution vendor to the open-source community. By late 2009 their revenue stream was lacking to the point of significant downscaling and they have consequently reduced their support and development staff. Their current 2.x release is bemoaned as unpredictable, buggy and meretricious, resulting in retrograde support for the deprecated 1.5 version package. Furthermore, Aptana was aquired less than a month ago by an outfit called Appcelerator. In short, Aptana has a legacy of step-child treatment.

Thus my concern with installing and testing out Aptana. Since it is one of only two commonly-employed means of third-party javascript code completion, I went ahead with it. Installing Aptana is the first step. Following success with that, its proprietary set of plug-ins allows jQuery to work with it. I succeeded with the first part, but unfortunately their plug-in service has proven to be currently offline. On to the next option: Eclipse Web Tools.

Eclipse Galileo 3.5 to Helios 3.6

I did Windows for a long time. And I'm still ok with it (though I stopped upgrading at XP SP2). Just the same, I'm all in with Mac for the past couple of years. The wherefore comes down to OS X, and more specifically, Unix. Can't beat having an underlying layer of open source OS!

I'm upgrading Eclipse today. I had announced with great fanfare the coming of Eclipse Galileo, but Helios found me focused on other things, so I'm stepping up the SDK to 3.6 now. On the Windows/Mac front, I prefer the small install and configuration footprint of unix apps vs the windows registry. Power Windows users may opine otherwise, but I find the modularity of apps on the mac to be quite painless.

That said, I'm opting not for a clean install of Eclipse 3.6, but rather an upgrade from 3.5 using the software updates dialog. A little background, I use both Flash Builder and Eclipse on my MacBook, the former for AS3 and Eclipse for JS, PHP, Python, basically 'everything else'. I have added Subversive SVN to FB and it works great, and with the possible exception of mylyn in the future, I plan to keep FB in quarantine. (update: broke my own rule there, I added eGit to FB and it is flawless.)

This is just a safety, as I have had issues with other FB installs going off the rails when too many open-source libraries are added to the SDK. It can be a real train wreck when this happens, especially if you're facing a killer deadline. For the record, any deficiencies with Eclipse as a platform are simply the small and acceptable dark side to a robust and maverick developer community. So I keep FB static and use Eclipse as my test lab.

As for the SDK upgrade, it worked great. Here is a simple FAQ from Eclipse to follow. When the dialog presents you with a list of available upgrades, choose only those listed as 3.6. Better not to upgrade too many things all at once.

This is part of a larger operation which I will also post about. Namely, getting a JS/PHP/Git environment up and running within the Eclipse SDK. I've worked with TextMate thus far and will sing its charms, however, I've used Eclipse long enough to love what it does, so developing in a fully Integrated DE is my goal.

Wednesday, December 8, 2010

A Morsel on Flash Professional Projects in Flash Builder

Flash Builder is so very great to use. Such a time saver for the stuff I work on, especially in conjunction with subversion. Having a repository view of a remote SVN server, being able to update and commit, not to mention the ease of 'diffing' in the Eclipse SDK. Best thing ever.

Lock down FB and SVN and you will find varying project types to choose from: Flex Project, Flex Library Project, or Flash Professional Project. Please join me in considering the good and bad of the Flash Professional Project.

Here are the things I like and don't like about managing a Flash Professional Project from FB.

The Likes:
  • The .project configuration file
  • can be saved to SVN, so you can open all your resources quickly at later date
  • allows you to select .as files from within Flash Pro and have them open in FB for a better coding experience ( still better even thoughh Flash Pro now completes code)
The Dislikes:
  • The .project configuration file
  • because collaborators with whom you share the Flash Professional Project, since the .project file is generally only usable in one particular configuration, will find it distracting
  • Two environments (FB and Flash Pro) means 2x the path configuration. Yes, you have to path to libraries and swcs twice. Once in FB, and once in Flash Pro.
  • Frequent quickly appearing and then disappearing phantom publishing panels, due to the need for FB to remain synchronized with Flash Builder. I'm on Mac and this is one of the more disturbing issues.
  • The fact that you must create and save a .FLA as a precursor to starting a new Flash Professional Project, then associate the .FLA with the new Project, and then add the new document class back to the .FLA. Far better to have the .FLA generated through FB and configured according to initial project values.
Seems like the nays have it this time. I find it works better to use subclipse to manage FLAs without converting them into Flash Professional Projects. The only tiny caveat to this approach is that you must open the associated .as files directly from FB rather than via Flash Pro.

It remains to be seen what Flash Builder "Burrito" adds to this mix.

Tuesday, August 25, 2009

Subversive SVN for Eclipse is Troubled

Kind of, yes. What is so terrible, in fact, is the great number of pitfalls waiting to be uncovered.

You can hope for no whammies but you will most likely trip the eclipse-subversive trap along the way to configuring a working setup. Problem is, JavaHL and SVNKit don't tend to work out of the box. You have to hunt them down from at least 2 locations, and doing so often results in installation conflicts.

If you are using SVNKit, it is because your svn over ssh is password-protected. If you go this route and don't mind the confusion of double passwords with very poor contextual info, you may be almost home free. The subversive interface interchanges the exact same control panel for both ssh and svn credentials, mediated by what is a very unreliable drop down for context. The combination is tricky at best.

If you choose JavaHL, it is most likely in order to configure an ssh key to engage your repository. SSH keys require JavaHL be enabled rather than SVNKit. You will be dismayed to discover how difficult it is to properly resolve a file key through the subversive interface. In all likelihood, it will fail silently.

To minimize the difficuly, the following is highly recommended:
Use SVNKit and password authentication for SSH
When the duplicate credentials dialogs mock you, just keep trying combinations based on your notes.

Good luck.

Update:
Subversive is easier to manage if your ssh and svn un/pw are the same.
It would be great if subversive could remember it if the SSH port is not 22. If it is not, you will have to input it every freaking time. Or!:
Visit Eclipse > Preferences > Team > SVN > Properties Configuration > Custom properties and add

SVN_SSH = ssh -p [portnum]

If you fail to synchronize, do over and over again. My subversive setup sometimes fails to synch 3-4 times before finally consenting.

Tuesday, August 11, 2009

Eclipse Galileo with PyDev and Subclipse

Just installing a bunch of stuff so I can begin developing some django projects locally for a remote deployment. Consisting of:
  • Eclipse 3.5 Galileo
  • Subclipse 1.6.x
  • Python 2.6
  • ActiveState ActivePython (currently 2.6)
Getting it up and running.

Update: A WinXP install of Eclipse 3.5 will not be able to svn over ssh (see below instead) until you point out a valid ssh app in its config. A good method for this is on the breakitdownblog.

Get the latest PyDev for Eclipse Galileo at http://pydev.sourceforge.net/updates.

Don't forget, you'll have to manually install the connectors. Galileo will need SVNKit and/or JavaHL to reach your subversion server.

Monday, July 20, 2009

Up and running with Eclipse 3.5

In a previous post, I mentioned the recent release of version 3.5 aka Galileo of the Eclipse Builder. Since that time, I have found several Galileo-compatible plug-ins that make it worthwhile to make the leap to 3.5 now rather than later.

I installed Eclipse 3.5 with the latest Graphical Editing Framework tools, 3.5.0, and the latest Aptana Studio, 1.5.1. All together this makes for an invaluable core development platform. Installing it took some trial and error, so I will share with you the successful install process I used. It took several error-prone attempts to get a clean build. Now it works just super. Here's how:
  • Download Galileo 3.5 to your downloads folder and extract the zip
  • Download GEF 3.5.0 from the downloads page.
  • Extract the GEF 3.5.0 zip locally and add the folder resources from your unzipped GEF 3.5.0 into the corresponding Galileo 3.5 folders. Do not overwrite the folders, as sometimes happens when you unpack an archive into the destination folder. In other words, mixing these together is best done by hand.
  • Run Galileo, which should fire up error free. So far so what. Now plug in some Aptana goodness. This is best done using Help>Install New Software... In the field marked Work with:, don't bother with 'Add...', just plug http://update.aptana.com/install/studio directly into the field and look for the Aptana Studio checkbox to appear below.
If this all works, you are good to go. The time saver of this how-to may not be apparent, so let me add for those who try different methods that automating the installation of GEF in one of the many apparently valid ways of doing this...will not succeed. Or at minimum, they will not succeed under OS X and Galileo Classic in Cocoa 32 bit, which is the version I opted for.

Hang loose, amigos.

Friday, June 26, 2009

Eclipse Galileo Drops!

Version 3.5 of the Eclipse Integrated Development Environment application has officially been released.

What is Eclipse? A free open-source software development platform you can install on mac, win or linux.

What does it run? Eclipse was originally written to support Java, but now it has language packs for over a dozen languages.

What is Galileo? For several years now the Eclipse Foundation, an organization of open source Eclipse developers, have released a new iterative version of Eclipse late June of each year. Galileo, code name for the latest Eclipse version, officially dropped a couple of days ago. It's version 3.5 of the venerable platform.

What do you use Eclipse for? Currently, I code Actionscript in Eclipse using the Flex SDK plug in. It streamlines all the complexities of developing RIAs, and it also incorporates Subversion, an open-source version control app.

What's next? Now that Galileo is officially released, is it worth upgrading to? Turns out, lots of applications are not ready to support it yet. I've found several blogs documenting attempted upgrades in Linux, Windows and OSX that ended in grief, and not just regarding the Flex Builder plug-in. Be sure to research compatibility before getting too deep into a new version of Eclipse.

Monday, May 4, 2009

More Bugs In App Development

Encountered a scenario recently that underscores the difficulty of working in a multi-tier web app architecture. Recent project was SQL to .NET CMS and a Flex client side, spanned by Weborb.

Problem came about when I updated the .NET CMS, suddenly the front end flex app started throwing the application error, ____, stating a method in my weborb-generated code was coming up null. This was strangely the case not only for my code, but for the autogenerated testdrive as well.

I chalked it up to a misnamed package on either the server or client side, later to find that troubleshooting it was not helpful. I replaced the service locator xml files from my base install, which also did nothing to help.

Finally I built a test case and slowly bridged it from working to nonworking case, using varying test cases similar to the nonworking build. After lots of wasted time, I found what is either a memory leak, or an Eclipse bug.

Either way, I had to work around it and ultimately create a new build that is identical - as far as I can tell - to the nonworking version. Only it works.

The tier problem I speak of is the many levels of unknown in the overall architecture. It is difficult and time consuming to isolate layers one at a time to find the culprit. It would suggest that rich media apps require a team of specialized workers. Takes too long.