Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When you click on the Developer Mode banner, you will see: 

Image Added

To close the Developer Panel, unselect "Enable Developer Mode" in the upper left hand corner, and press "Save Settings" in the lower left hand corner.

Developer Panel Settings

You can change settings on The on The Developer Panel interactivelyPanel interactively, while VIVO is running, or you can use a developer.properties file in your VIVO home directory.

Code Block
titleA typical developer.properties file
developer.enabled=true
developer.permitAnonymousControl=true
developer.defeatFreemarkerCache=true

When any feature of The Developer Panel is active, you will see this indicator in the header of your VIVO pages:

 

This is to remind you that developer options may slow down your VIVO, and should not be used in production.

Iterate your code more quickly

...

A full rebuild of VIVO may be necessary if you are changing the Java source code, or the contents of RDF files. However, if you are only making changes to the Freemarker templates, you can run the build script like this:

Code Block
ant deploy -Dskiptests=true

By choosing ant deploy instead of ant all or ant clean deploy, you are selecting an incremental build which will not re-compile all of the Java classes, or copy all of the unchanged files. By setting the option -skiptests=true, you are choosing not to run the unit tests. This is reasonable because the unit tests to not apply to the Freemarker templates.

After making your changes to the templates, you should perform a full build with unit tests.

Code Block
ant all

Don't restart VIVO until you need to

...

As mentioned above, VIVO will detect changes to Freemarker templates. By default, however, VIVO will not detect the changes immediately. The Freemarker framework caches the templates that it uses, and won't even look to see if a template has changed until 1 minute after it was last read from disk. In a production system, of course, that makes the accessing much more efficient. When you are making frequent changes, it's an annoyance.

Use The Developer Panel to defeat the Freemarker cache.

...

Also, you can skip the unit tests when building VIVO, as shown in Reduce the VIVO build time. Unit . Unit tests do not apply to listViewConfigs.

...

It's not always clear which template has created a particular piece of your HTML page. Templates include other templates, templates are invoked in custom list views, short views, etc. You can use The Developer Panel to insert comments in the HTML that tell you where each template begins and ends.

...