[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [dash-dev] find resource bundle key from JDT variable
|
Scott -- Nice use case. I haven't done this so I can't say for sure
how it would code out but that won't stop me from trying. Here is how
I think it would work:
1. Script listens for selections using "Listen:" metadata tag.
2. Script remembers those that pattern match the form you suggest.
3. When invoked, script uses this saved information to search the
file you suggest.
4. Script then opens the file and positions the selection to the
found line.
I've been told that listening to selections is the only way to find
the current selection. Eclipse is too dynamic to have just one
"current selection". We don't have a good example of using our new
"Listen" support so this might be it. Keep us posted. Best regards.
-- Ward
On Jul 23, 2006, at 6:30 AM, Scott Stirling wrote:
Hi,
I have Eclipse Monkey and Eclipse 3.2. I would like to create a script
that does this for our dev team:
- user selects a final static String variable name in a class in
JDT, such as:
private static final String LOG_MESSAGE_KEY_FOO =
"log.message.key.foo";
- user hits Eclipse Monkey key combo
- user is presented with our project-wide messages.properties, with
the resource bundle key selected and in focus
Limitations:
- The script would only need to search in the current project
- messages.properties would be hard-coded in the script as the file to
search for the selected variable's String value
I have Eclipse Monkey with the 3 sample scripts, 2 of which are the
same except for the String they print out. Would someone please give
me a shove in the right direction?
Thanks for your time,
Scott Stirling
Framingham, MA
_______________________________________________
dash-dev mailing list
dash-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dash-dev