Skip to content

feat: added parameters named in parameters function#1086

Closed
Gmin2 wants to merge 2 commits into
processing:mainfrom
Gmin2:parameters-name
Closed

feat: added parameters named in parameters function#1086
Gmin2 wants to merge 2 commits into
processing:mainfrom
Gmin2:parameters-name

Conversation

@Gmin2

@Gmin2 Gmin2 commented May 9, 2025

Copy link
Copy Markdown

Added parameters names in function signatures

Part of #1041

Some examples

{
      "label": "fill",
      "kind": 3,
      "detail": "fill(r, g, b, a)",
      "insertText": "fill($1)",
      "insertTextFormat": 2
}
{
      "label": "background",
      "kind": 3,
      "detail": "background(x, y, width, height)",
      "insertText": "background($1)",
      "insertTextFormat": 2
}
    {
      "label": "copy",
      "kind": 3,
      "detail": "copy(sx, sy, sw, sh, dx, dy, dw, dh)",
      "insertText": "copy($1)",
      "insertTextFormat": 2
    }

@Stefterv Stefterv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Gmin2 Thank you for your efforts on this!

We will need something that will figure out the parameters from core instead of a pre-defined list. In this case we would have to maintain the parameter definitions in the future and those might get out of sync over time.

private static final Map<String, String[]> methodKnownParameterNames = new HashMap<>();
static {
// PApplet drawing methods
methodKnownParameterNames.put("rect", new String[]{"x", "y", "width", "height"});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This information should be gathered dynamically, not with a pre-defined list

@Gmin2 Gmin2 closed this by deleting the head repository Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants