Case Study: Adding "-> Logbook..." to CSS Data Browser
Deciding on the level of integration
I decided to use the "very low level" of integration, because that seems like the easiest way to work with CSS.
http://css.desy.de/content/e760/e761/index_eng.html
Checking out CSS source code
Installation of Mercurial
- Download Mercurial source code from http://mercurial.selenic.com/release/mercurial-1.6.4.tar.gz
- Type "make local" in the top directory
- Install MercurialEclipse, too, but don't use it as such need clarification from Kay & Co.
Clone the CSS repository
- http://sourceforge.net/apps/trac/cs-studio/wiki/SourceRepository
- Use 'read-only' => http://cs-studio.hg.sourceforge.net:8000/hgroot/cs-studio/cs-studio
(no account/password)
Increase memory for Eclipse
- Use 'read-only' => http://cs-studio.hg.sourceforge.net:8000/hgroot/cs-studio/cs-studio
- Edit eclipse.ini in $ECLIPSE_HOME (1024 MB is what I ended up with)
Import the necessary CSS plugins as Eclipse projects
- The minimum list of plugins to develop with DataBrowser need clarification from Kay & Co.
Checkout HLA projects from CVS
Create the edu.stanford.slac.save2logbook plugin for HLA code
- Copy the Save2Logbook source to this plugin and configure it for use by DataBrowser
Add the dependency to edu.stanford.slac.save2logbook to the DataBrowser plugin
- Eclipse bug: If plugins panel is empty, start typing the plugin name
Modify DataBrowser and Save2Logbook plugins
- Add JFace Button, called '-> Logbook...'
- Add JFace ActionListener to generate an Eclipse (Graphics) image
- Add a method in Save2Logbook that saves an Eclipse image as a JPEG file
Test by running DataBrowser as an Eclipse application
Create a SLAC DataBrowser product
- Select CSS Data Browser as the application
- Modify CSS splash
Export SLAC DataBrowser to some directory
When launching SLAC DataBrowser for the first time, configure EPICS and DataBrowser EPICS preferences
Major To-Dos
- Headless build
- "Workspace in use" issues
Resources
How to develop with CSS
- Overview https://ics-web.sns.ornl.gov/css/EPICS2010Intro/EclipseCSSDevIntro1.pdf
- Demos http://css.desy.de/content/e70/e10/index_eng.html
- JavaDoc http://css-javadoc.desy.de/
- Plugins http://css.desy.de/epicsgroup/css/content/e428/e396/e402/e491/CSSPluginOverview.htm
- DAL
- Preferences
- Messages
- Authentication and Authorization http://sourceforge.net/apps/trac/cs-studio/wiki/AuthAndAuth
- Mailing list http://sourceforge.net/mailarchive/forum.php?forum_name=cs-studio-core
- Development environment
- Tools
- Localization editor http://css.desy.de/content/e428/e1446/e1448/index_eng.html
- IDE
- Version Control
- Hg http://sourceforge.net/apps/trac/cs-studio/wiki/SourceRepository
- Eclipse plugin: http://www.javaforge.com/project/HGE
- Commit, then push
- Pull, then update
- Hg http://sourceforge.net/apps/trac/cs-studio/wiki/SourceRepository
- Localization editor http://css.desy.de/content/e428/e1446/e1448/index_eng.html
- API
- Documentation
- Eclipse Architecture
- CSS Architecture
- Tools
- Build and release procedures
- Eclipse-based build http://ics-web.sns.ornl.gov/css/devel.html
- Headless
- Creating a product
- Automated?
- Eclipse-based build http://ics-web.sns.ornl.gov/css/devel.html
- Production environment
How to contribute to CSS
- Level of integration http://css.desy.de/content/e760/e761/index_eng.html
- Standards
- Test-driven (JUnit) http://sourceforge.net/apps/trac/cs-studio/wiki/UnitTests
- Test-driven (JUnit) http://sourceforge.net/apps/trac/cs-studio/wiki/UnitTests
- Procedure http://css.desy.de/content/e760/e761/index_eng.html
- Select the level of integration for your plugin from the list above
- Use existing interfaces and extension points
- Add new extension points whenever useful
- Use Eclipse contributions to integrate your plugin seamlessly with other plugins
- Use common data types (IData) to exchange data (not only strings) with other plugins
- Localize strings in your code
- Decouple local requirements from CSS implementations. Use interfaces to decouple.
- Test CSS core versions and plugins on several platforms (at least Windows, Linux Mac-OS)
- Code style
Links