Solved IntelliJ Problem

Discussion in 'Plugin Development' started by number1_Master, Jun 15, 2014.

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

    number1_Master

    Edit 2: For all those wanting to solve the issue, you just have to compile all used modules.

    Edit: Post is now moved here: http://stackoverflow.com/questions/24233057/why-will-this-abstract-method-not-compile

    Old Post (open)

    Code:
    So I have an abstract class with the following method:
    Code:java
    1. public abstract String getDescription();


    In classes that extend this abstract class, I have the method as follows:
    Code:java
    1. @Override
    2. public String getDescription()
    3. { ... }
    4.  


    Issue:
    IntelliJ does not see this as an error until compile. Upon compile, I get the error, "method does not override or implement a method from a supertype." What that is telling me is that the @Override annotation is not applicable to getDescription, which also tells me that getDescription is not being inherited correctly.

    What I've tried:
    The abstract class is in a module set as a module dependency. I've tried removing then re-adding it back in again, but that hasn't fixed it for me. I've also tried invalidating the caches and restarting. My final option is to reinstall IntelliJ completely, which is what I would like to avoid.

    All help is appreciated. Thank you!
     
  2. Offline

    jthort

  3. Offline

    thomasb454

    Have you tried restarting your IDE?
     
  4. Offline

    number1_Master

    Of course I have, and not just once. I even state that:
    I will keep that in mind.
     
  5. Offline

    Rocoty

    While I believe this would likely not be your issue, have you triple checked the method signature? Might be that you had a typo in the method name in the abstract class or the extending classes...
     
  6. Offline

    xTrollxDudex

    number1_Master
    Remove override annotation? Try pulling up the members and seeing the result. Also check class hierarchy.
     
  7. Offline

    number1_Master

    Yes I've copied and pasted.

    Removing the override annotation will work, but in general I feel as if that is saying that getDescription() is not being inherited. I have another method (getName()) that is exactly the same as getDescription() (returns the same, same class, etc.) and it will work fine. Its just this method itself.

    I'm moving to stackoverflow for better help now. The main post will be edited with the link.
     
Thread Status:
Not open for further replies.

Share This Page