oss

Using Eclipse with XBRLAPI

Install Eclipse

Download and install Eclipse version 3.1.2 or later. You can use the normal or the much larger EE version. Extract it to create, say, the ~/programs/eclipse folder. Open Eclipse and and set the workspace to, say, the ~/eclipse directory.

Check out the XBRLAPI project from the Sourceforge Subversion repository.

Create a new project by checking it out from the XBRLAPI Sourceforge Subversion repository. First install Eclipse Subclipse.

Open the Subversion repository exploring perspective in Eclipse via the windows/perspectives menu.

Set up the Subversion repository in Eclipse using URL: https://xbrlapi.svn.sourceforge.net/svnroot/xbrlapi

Open the XBRLAPI subversion repository to show the branches, tags trunk and www.xbrlapi.org folders.

Select the trunk and choose check-out from the context menu to check it out as a project in Eclipse. That should set up the project more or less correctly.

In the "Java build path" project properties, add two libraries, one for the Java runtime library (if it is not there already) and one for the XBRLAPI project. (Use: ALT-ENTER => Java Build Path -> Add Library -> User Library) The one for the XBRLAPI project should contain all of the JAR files in the java/lib directory that is contained in the XBRLAPI project directory. This will ensure that the necessary third party JAR files are also on the class path.

Enable unit testing from Eclipse

Specify the location of the test configuration file. Under Windows->Preferences->Java->Installed JREs, for the JRE that you use for unit testing, edit the configuration and add the following parameter to the set of default virtual machine (VM) arguments:

-Dxbrlapi.test.configuration=/home/geoff/eclipse/xbrlapi/test.configuration.properties

You should now be able to run the full set of tests in the suite provided by org.xbrlapi.tests.AllTests. This can be run by finding that source file in the package explorer, right mouse clicking on it to access the context menu, and then choosing to run the file as a JUnit test.

Set up specific run jobs to test the basics of the XBRLAPI installation.

DOM data store creation, population and usage to build an XML representation of a DTS

Create a run job called "XBRLAPI DOM data store Compose operation"

The job is for the xbrlapi project and the main class is org.xbrlapi.Run

The program arguments (on *NIX) are:

-class org.xbrlapi.data.dom.Compose
-logger /home/username/eclipse/xbrlapi/conf/log4j.xml
-cache /home/username/taxonomy_cache
-output /home/username/dts.xml
URL

Note that this requires you to create a directory for the taxonomy cache at ~/taxonomy_cache

Note also that this requires you to specify the necessary URL to use as a starting point for the discovery process in place of "URL".

The virtual machine arguments are: -Xmx1g to ensure that you have adequate memory allocated.

All other settings for the run job should be set to their default values.

SourceForge Logo