Difference between revisions of "Basic Developer Setup"
Connor Petty (talk | contribs) |
Connor Petty (talk | contribs) (→Setting up with Netbeans (without the maven plugin)) |
||
Line 35: | Line 35: | ||
# Checkout the Trunk/pcgen branch and if it asks to scan for projects select No. | # Checkout the Trunk/pcgen branch and if it asks to scan for projects select No. | ||
# Go to menu and create a new java free form project. For the locations select the directory you just checked out and netbeans should fill the rest of the information for you. | # Go to menu and create a new java free form project. For the locations select the directory you just checked out and netbeans should fill the rest of the information for you. | ||
− | # | + | # Compile the project |
− | # | + | # Close netbeans and replace the project.xml file in the nbproject dir with this file: |
− | + | # Reopen netbeans and you are ready to go. | |
− | |||
− | |||
− | |||
=Tools and IDE Plugins= | =Tools and IDE Plugins= |
Revision as of 00:44, 26 February 2011
Introduction
- Get a JAVA IDE of your choice (most people use Eclipse; some prefer IDEA). There are already project files in Subversion for several IDEs. (Although /bin/vi works just fine for some of us crusty old-timers, and Emacs for those sorts who are the GNU elite.)
- Get a Subversion client and set it up (most people use Eclipse integration; ditto for IDEA - see below for instructions for these though), see the Subversion Setup for details (you can view this via the web access to SVN).
- James Dempsey is the official Help New Code Monkeys guy, feel free to bug him lots! (But try the lists first, please.)
Participating in PCGen
- Play nice. Use common sense. We're all here because we enjoy it and want to participate in this project. Challenging ideas is ok (all of us will not always agree on a specific point), but don't attack people (no flames!)
- Make sure to run the unit tests (given that I can't get PCGen to build in ant without running them, this probably won't be hard!) and only check in when they all pass. Having said that, I suspect we've all broken the code at least once, so *don't stress* about it if it happens. Just participate in fixing it or get help from someone who can (if you really have no idea what's broken).
- If you're changing LST Token syntax (from our data files) then you need to get permission from the Data monkeys. You will find them on the PCGen_experimental Yahoo! group and you can also read their LST Syntax FREQ Usually, items in the issue tracking system as feature requests are already vetted by the _experimental folks, but if it's pretty old or very complicated, a double check doesn't hurt.
- Try to change as little of the formatting in the code as possible. Others may look at your check-in (to ensure it isn't interacting with other items we are working on that aren't checked in yet), and if the check-in is mostly formatting change, one loses the content. If there are formatting changes to be made, they should be done in a separate check-in. It is preferable to ask permission on significant formatting changes, since they make merging very difficult, and if one of us has a large project we are working on, it can become really hard to keep up and make sure we are actually doing useful work rather than formatting changes.
- Given the formatting comment above as more important, there are Coding Standards (for braces and the like).
- No major feature changes in a beta cycle - that's what the Alphas are for. Betas fix bugs for releases.
- You won't always know everything that is happening... but knowing where not to be is useful. Generally, in cases where someone is the major owner of an in-process change, it is best to check with that individual if you intend to propose/make major changes in code they are actively changing. When large check-ins are involved as components develop, parallel changes can be hard to deal with.
Setting up with Eclipse
- Install the subclipse extension found here or follow the instructions here
- Switch to the SVN Exploring Perspective (e.g. via the menu item Window > Open Perspective > Other... )
- Create a new Repository Location for https://pcgen.svn.sourceforge.net/svnroot/pcgen
- Drill down to Trunk/pcgen and right click and select Checkout...
- Fill in the project details and wait while it downloads all of the source.
- Build the application using ant as this will create the code/build/src folder. (See Eclipse section in Building PCGen)
- Refresh the project (right click on the project and select Refresh)
- Now your project should have no red ink and you can create a Run entry for the class pcgen.gui.pcGenGUI (Again see Eclipse Running section in Building PCGen)
Any questions, don't hesitate to ask!
Setting up with Netbeans (without the maven plugin)
- Install the netbeans subversion plugin
- Checkout the Trunk/pcgen branch and if it asks to scan for projects select No.
- Go to menu and create a new java free form project. For the locations select the directory you just checked out and netbeans should fill the rest of the information for you.
- Compile the project
- Close netbeans and replace the project.xml file in the nbproject dir with this file:
- Reopen netbeans and you are ready to go.
Tools and IDE Plugins
Outside of Eclipse if you want to do independent testing and code coverage, Emma: http://emma.sourceforge.net/
Eclipse
- PMD
- FindBugs
- Checkstyle
- Metrics
- Eclipse TPTP (note: gets memory hungry)