Overridden Indicators...


I'm using the 2.0.2 RC.

I have a situation where I have a Ruby class along with five different subclasses. When I click on the overridden indicator next to the class definition of method definition while editing within the superclass, I see 4 out of my 5 subclasses. The only difference I can see in the definition of those subclasses is that all of them have an "include" of another module *except* for the subclass which is the one not showing up when clicking on the overridden indicator. I added an "include" of some module and now that subclass will show up. I then remove that bogus "include" and that subclass no longer shows up in the overridden indicator.

When I'm in that subclass it does show which methods override ones from its superclass even the superclass does not show it as an override.

When I build the model dependency diagram it is draw correctly with all 5 subclasses.


Mark Mayfield


Hi Mark,

As far as I understood all of these classes are models, aren't they?
Could you please describe the location and code of your classes, are they subclassed using < or some more tricky logic is used?
And of course the best way to handle this is to have the sources.
If your project is opensource you can just give us a link to download it, or you can download them packaged at ftp://ftp.intellij.net/.uploads/ and tell us the name of file.
This storage has read access only for JetBrains.



It's a Rails project, and these classes are within a folder that is within the Model folder. The superclass is not subclassed off of anything (so it's by default a subclass of Object I think). The five other classes are subclassed off of it.

So for example lets say the folder in Model is called stuff, the superclass call plan is defined as:

     class Stuff::Plan

The other subclasses are defined this way:

     class Stuff::PlanAlpha < Stuff::Plan

     class Stuff::PlanBravo < Stuff::Plan


Now four of the subclasses have an include statement right after the class statement...

     class Stuff::PlanAlpha < Stuff:Plan
          include Stuff::CommonPlan

The fifth subclass does not have an include statement...

     class Stuff:PlanEcho < Stuff::Plan

And neither does the superclass--no include statement.

Next to the method defined in Stuff::Plan that is overridden in all the subclasses will an indicator that when clicked on will show the four subclasses as overrides, but not the fifth subclass--the one without the include statement. What is interesting, there is an overrides indicator next to the method in that fifth subclass indicating that the method overrides the one in the superclass. Also, when showing the model dependency diagram all five subclasses are shown.

If I have time I'll see if I can build some example source code that does this.



I created an example. Put this folder with the model folder and look at the indicators as described in the previous post.



Also notice the warning in the model definition file. I have to declare that module as Stuff::CommonPlan or it won't execute--so I just ignore the warning.



Thanks for the example, will have a look as soon as possible!


Hi Mark,

I was able to reproduce it and even fix it: http://youtrack.jetbrains.net/issue/RUBY-5883



Please sign in to leave a comment.