Menu

Getting Started Developing

Kenneth MacCallum Bryan Matthews Harry Pigot Vincent Tang

Software Tools (Windows)

This is a suggested list. You can develop however you like.
Eclipse for Java Developers
Maven build system (comes with Eclipse).
Git (Eclipse comes with a git plugin that works pretty well but you can also - or instead - use a standalone git install).
Java JDK

Steps for Windows

  1. Install latest Java JDK. You can get it here
  2. Install Latest Eclipse - https://eclipse.org/downloads/
  3. Open Eclipse
  4. Clone git repository
    1. In the toolbar, select Window->Open Perspective->Other...->Git Repository Exploring
    2. In the Git Repositories plane, select Clone a Git repository or right click and select Import project
    3. In the URI field, past the ssh://... link from the jOcular Code page. e.g. ssh://USERNAME@git.code.sf.net/p/jocular/code
    4. Enter your SourceForge Password, click Next->Next->Finish
    5. Return to the Java Perspective
    6. Right click in the Package Explorer plane and select Git->Projects from Git->Next->local->Next->code - ...->Next->Working Directory - ...-> Finish
    7. The jOcular [code master] project folder should be visible in the Package Explorer
      +Create a project branch
    8. If you wish to create a branch of the project code, right click on the project folder and select Team->Switch To->New Branch
    9. Enter the branch name, and click Finish
    10. The jOcular folder should now be shown with square brackets containing your chosen branch name

Using Git

Using Maven

  • right click on the project in Eclipse's project explorer
  • Select "Run as..." and then choose Maven Install
  • That should cause all dependancies to be downloaded, the project to build and an output jar file to be generated and stuck in your .mv directory.

Adding a new OpticsObject type

  • Code new object. Best to extend AbstractOpticsObject.
    • Don't forget to add get/set Properties and getPropertyKeys
    • You may have to add new element to PropertyKey
    • Make sure you add the accept method. This will mean adding new visit method to interface. This will mean adding that method to all classes implementing the interface too.
  • Add action to OpticsActionList to add that new object type
  • Add action to add menu of ContextPopup
  • Add new OpticsObjectKey element
  • Add details to XML schema (Jocular.xsd)

Adding a new Property type

  • Code new property. Must implement Property<t>.
    • If it will have dimensions (m, cm, deg, etc.) then look at the abstract DimensionedProperty
    • Make sure you add the accept method. This will mean adding new visit method to interface. This will mean adding that method to all classes implementing the interface too.
    </t>

Preparing and Uploading API Docs

  • From eclipse, choose Export/Javadocs
  • from terminal sftp username@web.sourceforge.net
  • lcd [the directory of index.html that you generated]
  • cd /home/project-web/jocular/htdocs/apidocs
  • put -r *

Related

Wiki: Git Branching Tips
Wiki: Home
Wiki: jOcular Help

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.