Hello Everyone!
For fun and educational purposes I've been trying to add a
key-binding to the commit command.
I've been successful, for the most part. If you have selected a
resource in the Navigator view, then it will open the commit dialog for
the selected resource.
However: if you have not selected a resource, it won't automatically
select the current document as the resource, and NPE is thrown. I
notice that if you do a right-click>team>commit, it does select the
current document, so I was wondering if some kind soul could explain to
me as to how I'd get my key-binding to behave the same way?
I've added 10 or so lines to the plugin.xml, copied/renamed/modified
CommitAction to CommitCommandAction (10 or so lines modded as well) and
that's gotten me to the current state.
I feel that I could make the new class (CommitCommandAction) much
smaller by doing a "extends" vs. copying all the source of CommitAction
and modifying where needed, but I am still having to look at examples
and such vs. innately knowing what to do with Java, so I suck. Probably
could just do a "CommitCommandAction = new CommitAction" or some such. Bah.
At any rate, I'm perfectly happy knowing I got it working enough for my
purposes, but I'd like to contribute this to the project, as CVS has it,
and I'm sure more people than myself commit stuff often enough to make
it helpful.
Since this is the place to post patches and such, I figured I'd the put
idea on the table and see what y'all thought about it. If it's viable,
I'll post a patch (as soon as I can figure out how to do something
besides create a patch from an SVN Diff, as since
CommitCommandAction.java is not in the repository there is nothing to
diff against but plugin.xml ;-), as someone who is actually adept at
coding in Java could probably clean it up to like 5 lines of code or
some such.
I know everyone is busy with real issues/features, so I won't be hurt by
non-responses. Even thousands of 'em. ;-)
I _am_ curious as to how to submit a patch that contains files that are
not currently in the repository. After a googling for a while I fail to
see anything built into eclipse, which is a pity. Will I have to
download a windows diff utility and do it that way? Eclipse's "compare"
looks like it captures the relevant info, yet there is no way to save it
as a patch. Hrm. Oh well. I've put the source at:
http://www.unm.edu/~valliant/subclipse/
In case anyone is interested. Sorry for the long post. I just LOVE to type.
:Denny
Received on Mon Sep 19 11:19:51 2005