Giter VIP home page Giter VIP logo

Comments (9)

brittyazel avatar brittyazel commented on May 18, 2024 1

The reason that IsShiftKeyDown() shows mouseover documentation and something like :Show() or :SetPoint() do not is because the first is a standalone function while the other two are class/object functions. I.e. :Show() is a member of the VisibleRegion class and :SetPoint() is a member of the Region class. Unless you declare your object as a class type that inherits such functionality, it's not going to show (see here and here).

For example, if you follow the flow of inheritance of :Show() or :SetPoint() you will find that the objects implementing them all inherit back to class UIObject. Or if you don't want to go that far back, many inherit from class Frame. I.e. if you declare your frames as type Frame, many of these functions should magically start showing mouseover completion:

---@type Frame
local tooltip = CreateFrame("frame", nil, GameTooltip)

Further, in the gif you included, another reason you wouldn't be seeing documentation is that you are declaring an entirely new C_ActionBar.IsHelpfulAction() function. You are effectively overwriting the API function with your own, meaning that the documentation from the API no longer applies. What you've done is create a new function of the same name, in which case 'you' would be responsible for supplying the documentation.

from intellij-idea-lua-ide-wow-api.

brittyazel avatar brittyazel commented on May 18, 2024

You don't install those scripts. The scripts in the root of the repository are meant for generating the documentation itself and are meant for the admins of this repo to use to keep the repository updated.

To make use of the EmmuLua API sources in this repository you simply clone this repo to your filesystem and add it as an API in your addon project structure. You must also have the Emmylua plugin installed in IntelliJ. You can find a guide on how to set this wiki, albeit slightly out of date: https://github.com/Ellypse/IntelliJ-IDEA-Lua-IDE-WoW-API/wiki

None of the scripts in this repo are anything you should be executing. This repo is just meant to be sourced by EmmyLua. This repo provides EmmyLua with the class and function definitions it needs for code completion.

from intellij-idea-lua-ide-wow-api.

Sattva-108 avatar Sattva-108 commented on May 18, 2024

idea64_ee1uot7uvf

I think i did install it right, may be i need to do something else?
It does show documentation for something, i could only find CreateFrame documentation displayed in tooltip.
QQL3tAq6tq

Rest of stuff is missing.
It shows me tooltip like this :
idea64_VHExY71BmB

Or like this:
idea64_spjiBwfEbE

idea64_2bXacoScfh

idea64_pAGX4Bl1Zn

from intellij-idea-lua-ide-wow-api.

Sattva-108 avatar Sattva-108 commented on May 18, 2024

I do not have Lua SDK by default even though i have EmmyLua.
So i tried to add EmmyLua manually via "Add SDK"

idea64_aiI4yckXwJ

And then add the API from this git to the EmmyLua SDK, but that didn't work either.

from intellij-idea-lua-ide-wow-api.

brittyazel avatar brittyazel commented on May 18, 2024

Yeah I don't think you did it quite right. To get the "Lua SDK" to show up you need to create a dummy project by going to file > new > project > Lua. Once you make your "dummy" project, IntelliJ should be able to see the Lua SDK across all of your projects.

Then, under your "project structure", you can modify the "Lua" SDK to point to the classpath(s).
Screenshot 2023-06-26 184516

I'm not sure what you have going on in your screenshots with the .idea showing as an SDK

from intellij-idea-lua-ide-wow-api.

Sattva-108 avatar Sattva-108 commented on May 18, 2024

Thank you for quick response, i was able to auto-create Lua SDK and add the IntelliJ-IDEA-Lua-IDE-WoW-API and wow source code to it.
idea64_SD7qWT4h3Y

There is no Lua in the dropdown.
What i did is i clicked Lua (see screenshot below) in the menu list on left bottom side to create new project, then the dummy SDK Lua was created automatically.

idea64_7KM3mXKYGC

I have though now tried to create new project named Lua, and it didnt seem to help as well.

from intellij-idea-lua-ide-wow-api.

Sattva-108 avatar Sattva-108 commented on May 18, 2024

It's funny, but some i'm able to see, some i don't. Im pretty sure that SetScript must be defined in that documentation, but i cannot see its tooltip.

qnKhLVD

from intellij-idea-lua-ide-wow-api.

Sattva-108 avatar Sattva-108 commented on May 18, 2024

May be it's just not defined, as well for easy functions like SetPoint, SetAllPoints, Hide, Show. And thats why i think that documentation doesn't work?

idea64_ogEmImxBSP

Im able to see the tooltips inside documentation files but not in my addon files.
LDiGbIh

from intellij-idea-lua-ide-wow-api.

Sattva-108 avatar Sattva-108 commented on May 18, 2024

Alright thank you, it's really hard for me to understand some things.
If i understand you correct, i need to make it like shown on screenshot?

idea64_ys66k8LojS

But i guess that ScrollBar type is not right definition or doesn't exist, so i cannot see tooltips for that class/object functions?

from intellij-idea-lua-ide-wow-api.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.