IntentArchitect / Support

A repository dedicated to handling issues and support queries
3 stars 0 forks source link

Static method #81

Closed leonAtRain closed 8 months ago

leonAtRain commented 8 months ago

What happened?

I've created a new method with Generic Parameter:

@class.AddMethod(ImportType("org.springframework.http.HttpHeaders"), "generatePaginationHttpHeaders", m =>
  {
      m.Static();
      m.AddParameter(ImportType("org.springframework.web.util.UriComponentsBuilder"), "uriBuilder");
      JavaGenericParameter genParam = null;
      m.AddGenericParameter("T", out genParam);
      m.AddParameter("Page<T>", "page");
  }

Problem is that it generates the code like this:

image

The static needs to be in a different place, ie : public static <T>
instead of:

public <T> static

What version of Intent Architect are you using?

4

Additional information

No response

dandrejvv commented 8 months ago

Hi @leonAtRain , thanks for raising this. Will fix it soon and will let you know when you can update.

dandrejvv commented 8 months ago

Hi @leonAtRain , There is a pre-release of the Intent.Common.Java module and Intent.Modules.Common.Java nuget package of the same version 3.4.6-pre.0 available for you to try. Please check the Include Prerelease to find it in the Manage Modules screen.

leonAtRain commented 8 months ago

Hi @dandrejvv , this is really great, works like a charm: image

I've been training the new guys on the tool, and picked up this issue - also showed them your efficiency in fixing the problem... and I must again congratulate you on your swift response, and resolution.