use of org.jetbrains.plugins.ruby.ruby.lang.psi.controlStructures.modules.RModule in project intellij-plugins by JetBrains.
the class RubyMotionSymbolProvider method getSpecificSymbol.
@Nullable
@Override
protected Symbol getSpecificSymbol(PsiElement element, RContainer context) {
if (context instanceof RClass || context instanceof RModule) {
final boolean isObject = CoreTypes.Object.equals(context.getFQN().getFullPath());
final RubyMotionSymbol symbol = isObject ? new RubyMotionSymbol((RFile) context.getContainingFile()) : null;
final Symbol nsObject = SymbolUtil.findSymbol(element.getProject(), Type.CLASS, getParentName(context), element);
final List<Symbol> includes = isObject ? Collections.singletonList(symbol) : Collections.emptyList();
return new MotionEnabledClassModuleSymbol(context, includes, Collections.emptyList(), Collections.singletonList(nsObject));
}
return null;
}
Aggregations