eclipse - how to synchronize the java file with dynamically generated file? -


I have created an eclipse plugin that will dynamically generate a text file. When the user clicks on the method from the correct package explorer, it will generate a new file with the square structure and method body. I want to synchronize these two files. When the user makes some changes in the method inside the Java file It should be updated in the generated file

Consider a scenario that has 2 files.

  public class calculator {public ent (int a, int b) {int c = a + b; Return c; } Public at Sub (int a, int b) {int c = a-b; Return c; }}   

Right click on the add method from the user package explorer and generate the file. The file will be as follows:

The name of the file will be generated based on the class name and method name.

Calculator_add.txt:

  public class calculator {public et al. (Int a, int b) {int c = a + b; Return c; }}   

If the user changes the argument in the law then it should be reflected in the generated file. How can I get it in eclipse? Please give some suggestion it would be very useful.

I'm not sure that it should be done this way; What you describe is a similar thing like a buildstep for which you mark the methods that you want to include / process

so I will restructure some of my original problem and for this

  • When the user selects a method;
  • Add a custom builder or a "generated output" menu item, from which the process can be started
    • when it runs, it is repeated < / Li>

      I hope this helps

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -