Creating multiple delegate methods

pbuchheit
2013-03-05
2013-03-08
  • pbuchheit

    pbuchheit - 2013-03-05

    Is there currently any way of creating multiple delegate methods from a class, or do I have to re-run the template for every method I want to delegate?

    Also, how do I deal with classes that extend a class in a separate java library? Currently, if I try to run a template on such a class, it throws an error saying 'Unable to find import for MyClassX'.

     
    Last edit: pbuchheit 2013-03-05
  • Support

    Support - 2013-03-06

    For the 1st issue, as of now there is no other way.

    issue 2.) I assume you are trying to do this... class A extends B. class B is part of a separate java library. You are trying to run the template on class A, and you get the error 'Unable to find import for B'. Please correct if my understanding is wrong. Also please let us know what template you are trying.

     
    • pbuchheit

      pbuchheit - 2013-03-06

      That is correct. A extends B and B is located in a separate library. The error seem to happen in the class based templates. So far I've run into it using INSTANCE_OF_CLASS, INSTANCE_OF_CLASS_AS_METHOD, EXTRACT_FIELDS_FROM_CLASS, and COPY_CLASS_AS_METHOD.

      I've also noticed that inherited fields/methods don't seem to show up in the selection dialog, even if the super class is in the same library as the sub-class.

       
      Last edit: pbuchheit 2013-03-07
      • pbuchheit

        pbuchheit - 2013-03-08

        I think I may have come up with a solution for the missing import issue. The 'findTypeForImport()' method of org.fastcode.util.SourceUtil needs to be modified to look for the superclass in other workspace projects if it is not found in the current project.

        I would be happy to submit a bug report with a patch if you are interested. To do that though I need to find the source code for the latest stable release (1.6 right?). The latest 'tagged' version in the cvs repository you list here is 1.4 and the 'header' version seems to be full of errors.

        I would also need to know where to go to actually submit the bug/feature request. The 'tickets' section here seems to be read-only.

         
        Last edit: pbuchheit 2013-03-08

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks