2 Replies Latest reply on Jun 22, 2007 12:44 PM by i_need_a_nickname

    String Substitution in Preferences

    i_need_a_nickname
      Hi,
      Can anyone please tell me what is the String Substitution in Run/Debug in Preferences menu? After I added a string substitution entry, how do I invoke it? Any examples of how to use it?
      I'm hoping it's something like shortcut keys that maps something like "pubf" to "public function". But seems like that's not it. I also tried to do mapping like that in the Keys setting in Preferences too, but couldn't get that to work either..

      thanks for any help,
      john
        • 1. Re: String Substitution in Preferences
          mike_morearty Level 1
          String Substitution in Run/Debug in Preferences will not do what you want. String Substitution in that preference page is used to allow ${myvar} to be replaced with a different value in certain other dialog pages. It is documented here (but again, this is not what you want):

          http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/prefere nces/run-debug/ref-string_substitution.htm

          As for shortcut keys like "pubf" mapping to "public function", I don't know of a way to do that. One thing that does work, though, is that Alt+/ can be used as general-purpose word completion. What it does is it searches the current file for words that match what you have typed. So for example, if the current file already contains the word "public" somewhere else, then "pub" followed by Alt+/ will complete the word "public".

          But of course if the current file doesn't already contain the word "public" then that won't work. Alt+/ is really more useful for cases like this -- I have added a click handler, click="myNewClickHandler()", and then I want to implement that function, so I type

          public function myNew

          And then I type Alt+/ and it fills in the function name.
          • 2. Re: String Substitution in Preferences
            i_need_a_nickname Level 1
            Thank you for the help!

            Anyway you guys can push macros/key mappings into flex 3 builder?
            Many free open source editors have it. I don't think it's an unreasonable request to ask for it in a few hundred dollars product..

            thanks again,
            john