Search in sources :

Example 1 with TypeNames

use of org.eclipse.xtext.common.types.ui.notification.TypeNames in project xtext-eclipse by eclipse.

the class JavaBuilderState method getQualifiedTypeNames.

private TypeNames getQualifiedTypeNames(final String typeLocator, final String packageName, final String simpleName, final IJavaProject project) {
    TypeNames _xblockexpression = null;
    {
        final TypeNames qualifiedTypeNames = new TypeNames(project);
        final String primaryTypeFqn = this.getQualifedTypeName(packageName, simpleName);
        char[][] _definedTypeNamesFor = null;
        if (this.state != null) {
            _definedTypeNamesFor = this.state.getDefinedTypeNamesFor(typeLocator);
        }
        final char[][] typeNames = _definedTypeNamesFor;
        if ((typeNames == null)) {
            TypeNames _typeNames = new TypeNames(project);
            final Procedure1<TypeNames> _function = (TypeNames it) -> {
                it.addTypeName(primaryTypeFqn, primaryTypeFqn);
            };
            return ObjectExtensions.<TypeNames>operator_doubleArrow(_typeNames, _function);
        }
        final Consumer<char[]> _function_1 = (char[] it) -> {
            String _string = new String(it);
            final String typeName = this.getQualifedTypeName(packageName, _string);
            qualifiedTypeNames.addTypeName(typeName, primaryTypeFqn);
        };
        ((List<char[]>) Conversions.doWrapArray(typeNames)).forEach(_function_1);
        _xblockexpression = qualifiedTypeNames;
    }
    return _xblockexpression;
}
Also used : TypeNames(org.eclipse.xtext.common.types.ui.notification.TypeNames) Consumer(java.util.function.Consumer) Procedure1(org.eclipse.xtext.xbase.lib.Procedures.Procedure1)

Aggregations

Consumer (java.util.function.Consumer)1 TypeNames (org.eclipse.xtext.common.types.ui.notification.TypeNames)1 Procedure1 (org.eclipse.xtext.xbase.lib.Procedures.Procedure1)1