Hi. I have been looking through the forums and the source code to learn more about each of these but I'm not sure which one to use: intentions, live templates, or actions. Honestly, I'm not even sure what the proper definitions are. When I am writing Java code, I use the meta-J pop up all the time to generate iterations and so on. It's incredibly great! I also use the generate ctor, toString(), etc. stuff. I also sometimes used the tiny little pop-up/hint thing that suggests I can replace an if-return with a simple return expression etc... I think the itar is called a live template and the pop-up hint thing is an intention. How is that different than an action I created my plug-in with "New Action"?
My goal is simple to start with: for the ANTLR plug-in, I would like to allow programmers to insert predefined rules for common lexical items like identifiers, comments, white space and so on. I envision providing multiple versions of floating-point numbers and identifiers but in general there will the perhaps less than 10 kinds of text blobs I want to inject. In the future there might be more. I would like the user to be able to specify the actual name of the rule as part of the injection just like I specify the iteration variables with itar template. In the future I might also want to select a string reference like 'begin' in the grammar and have it automatically generate an associated lexical rule like BEGIN : 'begin' or something like that. I'm not sure whether that would be done with the same mechanism/concept.
My question: should I be trying to build a live template set? an intention? a set of actions? Are they all really the same thing just invoked in different ways? Sorry if this is obvious. I just want to make sure I don't go down the wrong path only to find out I'm using the wrong mechanism. I can figure out the API for myself from the examples and code if I could just get the proper starting point.