Solved Random errors while using IntelliJ?

Discussion in 'Plugin Development' started by Mindlessmink, Aug 12, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    Mindlessmink

    Okay. Here's the deal. I switched to IntelliJ IDEA and created a new test project to see if I liked it. I really liked it and so I was planning on switching to it. However, I kept getting these random errors when I knew the code was correct, I've used all of these statements in Eclipse so was wondering why I was getting the error. Here's an image: https://gyazo.com/7c836b09fb479c92a2ba88709559ccbb Go full screen to see it easily. Please leave why this is happening below! I really would like to switch to IntelliJ but can't because of these errors :(
     
  2. Offline

    timtower Moderator Moderator

  3. Offline

    Mindlessmink

    @timtower Well, When I try to export the file it's coming up with:
    ==================================
    Error:(16, 30) java: cannot find symbol
    symbol: class CommandSender
    location: class CorePlugin.Core
    ==================================
    Error:(16, 52) java: cannot find symbol
    symbol: class Command
    location: class CorePlugin.Core
    ==================================
    Error:(13, 66) java: cannot find symbol
    symbol: class chatHandler
    location: class CorePlugin.Core
    ==================================
    Error:(29, 29) java: cannot find symbol
    symbol: variable p
    location: class CorePlugin.Core
    ==================================
    Error:(32, 25) java: cannot find symbol
    symbol: variable p
    location: class CorePlugin.Core
    ==================================

    Using = to separate errors.
     
  4. Offline

    AlvinB

    @Mindlessmink
    You haven't imported the CommandSender and Command classes. If you put your cursor where you use these classes and press Alt + Enter, you get a list of imports to pick from.
     
  5. Offline

    Mindlessmink

    Ohh, I never knew how to import. I assumed it was ctrl + shift + o (same as Eclipse)
     
  6. Offline

    I Al Istannen

    @Mindlessmink
    CTRL + ALT + O it is in intellij

    and you can activate
    File -> Settings -> Editor -> General -> Auto import and tick "Optimize imports on the fly"
    to let intellij handle that automatically.
     
Thread Status:
Not open for further replies.

Share This Page