Hi Mohammed ..
On 20/01/2012 15:30, Khalfan, Mohammed wrote:
I do have some java experience, and I'd be happy to give this a go.
I'll wait to hear from you.
Ok! You have no idea how much happier this has made me this afternoon :)
If you'd care to register on issues.jalview.org, then I'll set you up
with commit rights to the git repository at
https://source.jalview.org/git/jalview.git
For the rest of the email, I'm going to assume you are familiar with
git. If not - let me know and I'll send you some introductory info.
Also, take a look at the archives of the jalview dev list about setting
up your build environment - if you use eclipse, things will mostly just
work (I hope!).
Generally, I structure Jalview's development roughly according to the
'git-flow' model
(http://nvie.com/posts/a-successful-git-branching-model/), where each
feature is developed as a local branch on your machine off a public
branch (either 'develop' for the next Jalview version, or
'Release_M_V_Branch' for a patch to an existing release). You then merge
your new code into the base branch by switching back to that branch and
doing 'git merge --no-squash <your feature branch>'.
For this feature, I suggest you branch from the current release
codebase, so from the command line do:
git checkout Release_2_7_Branch
git checkout -b JAL-1047_shading
Then, what you need to do is:
1. Add a new boolean controlling whether conserved residues are coloured
to jalview.gui.AlignmentViewport and jalview.appletgui.AlignmentViewport
2. Modify the jalview.gui.SequenceRenderer and
jalview.appletgui.SequenceRenderer so that if the flag is enabled, they
only request a colour from the current group or background colourscheme
if the flag is not enabled (you'll see that there is a similar
conditional for the show unconserved rendering style already). Test this.
Next, start extending the applet's GUI:
3. add in a new menu item into the 'layout' menu that allows the feature
to be enabled and disabled. Do this in the jalview.appletgui.AlignFrame
class first with an AWT menu item, since the desktop's GUI is built
differently.
4. Look at the constructor for the alignment viewport classes in
jalview.appletgui and jalview.gui - in appletgui, you should insert code
to set the default value of the flag according to a parameter specified
on the applet or a user property in the application.
(at this point you have something you can test in your site ..).
5. .. to be continued - the remaining steps are:
i.extending the jalview alignment annotation file to allow this option
to be specified for a group defined in that file
ii. implement the gui in the application,
iii. add in a default setting in the jalview desktop preferences dialog box
iv. document the new option in the built in help (under the help
directory in the source package).
v. add a demo to the 'examples' directory (optional)
vi. write a brief explanation and exercise in the Jalview manual
(probably someone else's problem :) ).
Hear from you soon :)
Jim.
_______________________________________________
Jalview-dev mailing list
[email protected]
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev