Sunday, May 11, 2008

Eclipse Tutorial Video: Starting a PHP Project from Subversion

This video will show you how to use a subversion repository to create a PHP project in Eclipse. I'll be using the subversive plugin, but the process is essentially the same if you are using subclipse.



Before you complete the steps in the lesson on your own, you will need to install the eclipse plugins for PHP Development and a Subversion Team Provider, either Subversive or Subclipse.

The first step is to define the repository. We'll configure eclipse for the groux project at https://groux.svn.sourceforge.net/svnroot/groux. We'll switch our perspective to "SVN Repository Exploring" so we'll have the necessary panels open to start. We could also show the required views from another perspective with "Window -> Show View."

To start, we define the repository by selecting the icon with the green plus sign in the top right of the "SVN Repositories" panel. In the resulting dialog, enter the repository URL. If we had write access to the repository, we'd probably need to provide our user name and password as well, but for this demonstration we'll skip that.

When you click finish, Eclipse will validate your connection. In this case, anonymous access is OK. The first time I set this up, I needed to accept the sourceforge SSL certificate, but since I elected to trust it always, we don't see that dialog this time. You'll want "trust always" or you'll be continually interrupted by questions about the certificate.

Once we have defined the repository, we have the option to browse through it to understand its layout. To create the project, we'll switch to the "Resource" perspective. You can do this from "Open Perspective" in the "Window" menu, but we'll just take the little shortcut in the top right of the Eclipse window.

In the "Project Explorer" panel, get a context menu (right-click or control-click) and select "New -> other..." Pick "Projects from SVN from the "SVN" folder. Use the repository we just configured, and select the resource you are interested in--in this case groux. Click "Finish" to end the repository selection and begin defining the project.

We'll use the "New Project Wizard" to create the project. Under the "PHP" folder, select "PHP Project," click "Next," enter a project name, and "Finish". Eclipse will offer to take you into a PHP perspective and start building the workspace. In another lesson, we'll take a look at some of the things that are available to you in the PHP project.

And that's all there is to it.

Saturday, May 10, 2008

Using Redmine with the Mylyn Eclipse Plugin

This video will show you how to use the Mylyn plugin to connect your Eclipse IDE to a set of open issues on Redmine.



I'll assume you've already installed Mylyn in Eclipse. Start by selecting the "Window" menu and then "Show View." Click "Other..." at the bottom of the sub-menu and scroll down the dialog. Open the Mylyn folder, and select "Task Repositories."

In the new panel this creates, a context menu (right-click or control-click on most systems) will give you the option to "Add [a] Task Repository"--choose "Generic web-based access."

At this point, refer to the Redmine wiki for more details. Enter your server name in the first field--here I'll use Redmine, but your should enter your own server. Give the server a label, and provide a username and password.

Then, under "Additional Settings," open the "Advanced Configuration" dialog. The "Task URL" will be used to look up specific issues by adding the issue number. We can also define a URL to create new issues. The "Query Request URL" will return a list of open issues, and we'll use the "Query Pattern" to filter out the issue numbers and descriptions. And, of course, we need to provide a login URL, which is submitted as a POST request for Redmine.

Click "Finish" and we're done creating the repository.

Often, it's easiest to create a task query at this point, and Eclipse gives you that option. We could scroll further down on the Redmine wiki and copy the parameters that will filter the tickets down to just our own. But in this case I have no active tickets on redmine, so I won't do that.

Finish the query definition, and Mylyn will fetch a list of tasks from Redmine. To see those tasks in Eclipse, go back to "Show View" in the "Window" menu, select "other..." and choose "Task List." The task list has a nice hover state to get basic information on the tasks, and you can double-click to get more details. You can enter personal planning information, add comments and manipulate the ticket via the internal web browser, and you can establish a Mylyn context for the task. We'll cover Mylyn contexts in a separate lesson.

And that's all there is to it.

Related:
  • Redmine is a project management web application written in Ruby on Rails
  • Eclipse is an Integrated Development Environment written in Java that runs on Windows, Mac, and Unix
  • Mylyn is a plugin for Eclipse that allows developers to associate a small set of files with each of their tasks, hiding those files that are not related to the work.