PsiParameterStub (final int idx) { PsiParameterListStub list = null; for (StubElement child : getChildrenStubs()) { if (child instanceof PsiParameterListStub) { list = (PsiParameterListStub)child; break; } } if (list != null) { final List<StubElement> params = list.getChildrenStubs(); return (PsiParameterStub)params.get(idx); } throw new RuntimeException("No parameter(s) [yet?]"); }