Skip to content

PVector's setHeading() isn't highlighted, or in the reference. #472

Description

@processing-bot

Created by: ExpandingS

Description

The method setHeading isn't highlighted like other methods in PVector. It also isn't in the reference (But this may be an issue for processing-docs?).

Expected Behavior

setHeading appears with that same blue colour.

Current Behavior

Image

Steps to Reproduce

  1. Paste the following code:
void setup() {
  PVector p = new PVector(5, 5);
  
  p.setMag(2);
  p.setHeading(3);
}
  1. Observe the highlighting

Your Environment

  • Processing version: 4.0b7, latest from git
  • Operating System and OS version: Windows 10
  • Other information:

Possible Causes / Solutions

I've tried adding annotations as there aren't currently any, like:

  /**
   *
   * Set the heading of this vector to the value used for the <b>len</b> parameter.
   *
   *
   * @webref pvector:method
   * @usage web_application
   * @param angle the new heading for this vector
   * @webBrief  Set the heading of the vector
   */
  public PVector setHeading(float angle) {
    float m = mag();
    x = (float) (m * Math.cos(angle));
    y = (float) (m * Math.sin(angle));
    return this;
  }

However it didn't seem to change anything.

Other

Added in this issue

Activity

  1. processing-bot commented on Apr 22, 2022

    @processing-bot
    CollaboratorAuthor

    Created by: ExpandingS

    I've had some more time to look at it, I see that the highlighting comes from keywords.txt, which gets updated periodically. So just adding this doclet be sufficient?

  2. babaissarkar commented on Mar 21, 2025

    @babaissarkar

    From the notice on top of keywords.txt, it seems it recommends to modifiy this file, which however does not have any entry for functions. So the question comes back to this:

    I've had some more time to look at it, I see that the highlighting comes from keywords.txt, which gets updated periodically. So just adding this doclet be sufficient?

    Also, is there a way to manually run the updater for keywords.txt, for testing?

    @Stefterv any idea?

  3. babaissarkar commented on Mar 21, 2025

    @babaissarkar

    Adding it manually to keywords.txt does make it work:

    Image

  4. SushantBansal-tech commented on Mar 24, 2025

    @SushantBansal-tech

    @SableRaf I have raise the PR for this #472
    And now I am working on the previous issue as well that has assigned to me .

  5. SushantBansal-tech commented on Mar 24, 2025

    @SushantBansal-tech

    @SableRaf Can you please review my PR

  6. SableRaf commented on Mar 24, 2025

    @SableRaf
    Collaborator

    Hey @SushantBansal-tech. Thanks so much for your enthusiasm! Just a quick note: this issue was already assigned, and another contributor had shown clear interest too. To keep things fair (and organized) please only work on issues you've officially been assigned.

    Also, as mentioned in our GSoC Guidelines:

    We typically aim to respond to incoming issues and pull requests within 1-2 weeks, though we might not always catch them all! If there hasn't been any engagement with your submission, feel free to add a comment if the 2 week timeframe has passed.

    We get notified of new PRs by GitHub and there’s no need to ask for a review right away. Thanks for your understanding and patience! 💙

  7. babaissarkar commented on Mar 25, 2025

    @babaissarkar

    @SableRaf @Stefterv seems like this is more an issue for processing-website: it's missing the json file for setHeading. The keywords.txt here is actually generated there, so makes more sense to open a PR there to add the missing entry. Perhaps this issue should be migrated there?
    Also, would be nice to know if keywords.txt is manually copied over here per-release, or some automation is going on. I can adjust accordingly.

  8. Stefterv commented on Mar 25, 2025

    @Stefterv
    Member

    @babaissarkar Great spelunking, could you start with creating a writeup on how this actually works? As @SableRaf and I are also a bit fuzzy on the details

  9. babaissarkar commented on Mar 25, 2025

    @babaissarkar

    @babaissarkar Great spelunking, could you start with creating a writeup on how this actually works? As @SableRaf and I are also a bit fuzzy on the details

    Sure, where should I write it? (Haven't got all details yet, still investigating.)

  10. Stefterv commented on Mar 25, 2025

    @Stefterv
    Member

    At the bottom of the website repo there is a little bit of documentation, if you could append your finding there
    https://github.com/processing/processing-website?tab=readme-ov-file#keywordstxt

  11. babaissarkar commented on Mar 25, 2025

    @babaissarkar

    Opened a sister issue at https://github.com/processing/processing-website/issues. Since I'm already assigned to this, would be nice if I could be assigned there as well.

  12. babaissarkar commented on Mar 26, 2025

    @babaissarkar

    After running the keywords.txt update routine, seems like there are more missing keywords than just setHeading() (Diff attached)

    @Stefterv @SableRaf what to do? should I just pick the entry for setHeading() or add all of them? (Note: I might have to add more jsons than the one for setHeading() based on whether they exist already in the website repo or not.)

    keywords-diff.txt

  13. SableRaf commented on Mar 26, 2025

    @SableRaf
    Collaborator

    @babaissarkar Thanks for doing the research! Yes, in that case I think it makes sense to fix the overarching issue even though it goes beyond the scope of the initial bug report.

  14. moved this from Backlog to Completed in Processing Roadmapon Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoregood first issueGood for newcomershas attachmentAttachment was not transfered from GitLabhelp wantedExtra attention is needed

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions