Using eclipse As A WAR Development Environment

From TheWarWiki

Jump to: navigation, search

Contents

About

eclipse is one of the more popular J2EE IDEs. For those who like it, it can be used for WAR addon development, as it can do all the things we need:

These instructions will cover luaeclipse 1.3 and subclipse 1.4, as they're the tools that I use.


Installation

Download

There are many packages for eclipse, depending on the sort of development that you are doing.

The Java or JavaEE packages suit the needs of WAR development. Download one of those.


Unzip And Run

eclipse is multiplatform and doesn't have a fancy installer; simply unzip the file you downloaded and place it somewhere convenient, such as c:\program files\eclipse or /Applications/eclipse.

Run eclipse.exe (or create a shortcut to it) and pick a workspace at <warhammer directory>/interface

Close the welcome screen - it offers nothing for us.


Install Eclipse Plugins

Rather than downloading plugins and installing them, eclipse does this internally.

Select Help -> Software Updates, then select the Available Software tab.


subclipse

Select Add Site then paste http://subclipse.tigris.org/update_1.4.x

Expand the newly added site and select:

  • JavaHL Adapter
  • Revision Graph
  • Subclipse
  • SVNkit Adapter

Press Install... and let it do its thing. Restart when prompted.


luaeclipse

Select Add Site then paste http://luaeclipse.luaforge.net/preview/update-site

Expand the newly added site and select:

  • LuaEclipse 1.3

Press Install... and let it do its thing. Restart when prompted.


Options

Open Window -> Preferences


General -> Startup and Shutdown -> Check Refresh workspace on startup


General -> Editors -> File Associations -> Add (top right)

Enter *.mod

Click Add (bottom right)

Select XML Editor

Click Default


General -> Editors -> Text Editors -> Check Show Line Numbers


General -> Editors -> Text Editors -> Spelling -> Uncheck Enable Spell Checking


Workspace Setup

Installed Addons

Right click on the Java EE perspective (top right) and click Close

Click Open Perspective and click Other...

Select Resource

Close Tasks, Outline and Task List tabs

Right click in Project Explorer -> New -> Other

Lua -> New Lua Project

Click Next

Enter addons in the project name

Click Finish


Default UI

Download EasyMYP and use it to extract from interface.myp into a temporary directory.

Move the following into <warhammer directory>/interface:

  • default
  • interfacecore
  • internal

For each of the above, create an LUA project as you did for the installed addons above.


SVN Project Setup

Repository Connection

Click Open Perspective and click Other...

Select SVN Repository Exploring

Right click in SVN Repositories and select Repository Location

Enter the location of your repository without the trunk part, e.g. svn://nemes@svn.curseforge.net/war/nrarity/mainline

Select Finish


Getting The Project

Expand your project and right click on trunk -> checkout

Select Check out as a project configured using the New Project Wizard

Select Finish

Lua -> New Lua Project

Uncheck Use Default Location

Enter the Addon's name in Project Name e.g. NRarity

Enter the location of the project under addons e.g. <warhammer directory>/interface/addons/NRarity

Click Finish

Allow overwriting of anything that is already there.

Swap back to the Resource perspective and your project will appear there, with SVN decoration and actions enabled on the project.


Adding A New Project To SVN

todo

Personal tools