Search in sources :

Example 1 with RTypedSyntheticSymbol

use of org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.RTypedSyntheticSymbol in project intellij-plugins by JetBrains.

the class MotionSymbolUtil method createStructFieldSymbols.

public static Symbol[] createStructFieldSymbols(final Module module, Symbol parent, Struct struct, String name) {
    final String typeName = struct.getFieldType(name);
    final RType type = getTypeByName(module, typeName);
    final RTypedSyntheticSymbol reader = new RTypedSyntheticSymbol(module.getProject(), name, Type.FIELD_READER, parent, type, 0);
    final RTypedSyntheticSymbol writer = new RTypedSyntheticSymbol(module.getProject(), name + "=", Type.FIELD_WRITER, parent, type, 1);
    return new Symbol[] { reader, writer };
}
Also used : Symbol(org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.Symbol) RTypedSyntheticSymbol(org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.RTypedSyntheticSymbol) RType(org.jetbrains.plugins.ruby.ruby.codeInsight.types.RType) RTypedSyntheticSymbol(org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.RTypedSyntheticSymbol)

Aggregations

RTypedSyntheticSymbol (org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.RTypedSyntheticSymbol)1 Symbol (org.jetbrains.plugins.ruby.ruby.codeInsight.symbols.structure.Symbol)1 RType (org.jetbrains.plugins.ruby.ruby.codeInsight.types.RType)1