@Override public List<Either<SymbolInformation, DocumentSymbol>> getSymbols(final Document document, final XtextResource resource, final DocumentSymbolParams params, final CancelIndicator cancelIndicator) { return CollectionLiterals.<Either<SymbolInformation, DocumentSymbol>>emptyList(); } }
@Override public Iterable<? extends TypeParameterDeclaration> getTypeParameters() { return CollectionLiterals.<TypeParameterDeclaration>emptyList(); } }
@Override public Collection<IHierarchyNode> getRoots() { return CollectionLiterals.<IHierarchyNode>emptyList(); } };
@Override public Iterable<? extends AnnotationReference> getAnnotations() { return CollectionLiterals.<AnnotationReference>emptyList(); }
@Override public Iterable<? extends AnnotationReference> getAnnotations() { return CollectionLiterals.<AnnotationReference>emptyList(); }
@Override public Iterable<? extends AnnotationReference> getAnnotations() { return CollectionLiterals.<AnnotationReference>emptyList(); }
public IncrementalBuilder.Result doInitialBuild(final CancelIndicator cancelIndicator) { final ArrayList<URI> uris = CollectionLiterals.<URI>newArrayList(); final Consumer<ISourceFolder> _function = (ISourceFolder it) -> { final IAcceptor<URI> _function_1 = (URI it_1) -> { uris.add(it_1); }; this.fileSystemScanner.scan(it.getPath(), _function_1); }; this.projectConfig.getSourceFolders().forEach(_function); return this.doBuild(uris, CollectionLiterals.<URI>emptyList(), CollectionLiterals.<IResourceDescription.Delta>emptyList(), cancelIndicator); }
@Override public List<INode> getDocumentationNodes(final EObject o) { List<INode> _xblockexpression = null; { boolean _shouldBeHandled = this.shouldBeHandled(o); boolean _not = (!_shouldBeHandled); if (_not) { return CollectionLiterals.<INode>emptyList(); } _xblockexpression = super.getDocumentationNodes(o); } return _xblockexpression; }
@Override public Collection<IHierarchyNode> buildRoots(final URI rootURI, final IProgressMonitor monitor) { final IEObjectDescription rootDeclaration = this.findDeclaration(rootURI); if ((rootDeclaration == null)) { return CollectionLiterals.<IHierarchyNode>emptyList(); } IHierarchyNode _createRoot = this.createRoot(rootDeclaration); return Collections.<IHierarchyNode>unmodifiableList(CollectionLiterals.<IHierarchyNode>newArrayList(_createRoot)); }
/** * @param typeReference may be {@code null} * @return all public, non-static operations that are annotated with @FixtureMethod, inherited methods included, never {@code null} */ private Iterable<JvmOperation> getFixtureMethods(final JvmParameterizedTypeReference typeReference) { JvmType _type = null; if (typeReference!=null) { _type=typeReference.getType(); } final JvmType type = _type; if ((type instanceof JvmDeclaredType)) { return this.getFixtureMethods(((JvmDeclaredType)type)); } return CollectionLiterals.<JvmOperation>emptyList(); }
public List<? extends TextEdit> format(final Document document, final XtextResource resource, final DocumentFormattingParams params, final CancelIndicator cancelIndicator) { final int offset = 0; final int length = document.getContents().length(); if (((length == 0) || resource.getContents().isEmpty())) { return CollectionLiterals.<TextEdit>emptyList(); } boolean _hasFormatOverride = FormattingService.OverrideChecker.hasFormatOverride(this.getClass()); if (_hasFormatOverride) { return this.format(resource, document, offset, length); } return this.format(resource, document, offset, length, params.getOptions()); }
private Iterable<JvmOperation> superTypeJvmOperations(final JvmGenericType type) { if ((type == null)) { return CollectionLiterals.<JvmOperation>emptyList(); } JvmType _type = IterableExtensions.<JvmTypeReference>head(type.getSuperTypes()).getType(); return Iterables.<JvmOperation>filter(((JvmGenericType) _type).getAllFeatures(), JvmOperation.class); } }
@Override public Iterable<? extends Path> getChildren(final Path path) { boolean _equals = Objects.equal(path, Path.ROOT); if (_equals) { Path _absolutePath = path.getAbsolutePath(this.projectConfigProvider.getProjectConfig(this.context).getName()); return Collections.<Path>unmodifiableList(CollectionLiterals.<Path>newArrayList(_absolutePath)); } final URI uri = this.getURI(path); if ((((uri == null) || (!this.exists(uri))) || (!(this.isFolder(uri)).booleanValue()))) { return CollectionLiterals.<Path>emptyList(); } return this.getChildren(uri, path); }
public Iterable<JvmFeature> getAllFeatures(final Resource resource, final JvmDeclaredType importedType, final boolean static_, final boolean extension, final String memberName) { Iterable<JvmFeature> _xblockexpression = null; { if (((!static_) || (importedType == null))) { return CollectionLiterals.<JvmFeature>emptyList(); } final IVisibilityHelper visibilityHelper = this.getVisibilityHelper(resource); final IResolvedFeatures resolvedFeatures = this._provider.getResolvedFeatures(importedType); final Function1<JvmFeature, Boolean> _function = (JvmFeature feature) -> { return Boolean.valueOf((feature.isStatic() && visibilityHelper.isVisible(feature))); }; _xblockexpression = IterableExtensions.<JvmFeature>filter(resolvedFeatures.getAllFeatures(memberName), _function); } return _xblockexpression; }
public List<? extends Location> getReferences(final Document document, final XtextResource resource, final ReferenceParams params, final IReferenceFinder.IResourceAccess resourceAccess, final IResourceDescriptions indexData, final CancelIndicator cancelIndicator) { final int offset = document.getOffSet(params.getPosition()); List<? extends Location> _xifexpression = null; boolean _isIncludeDeclaration = params.getContext().isIncludeDeclaration(); if (_isIncludeDeclaration) { _xifexpression = this.getDefinitions(resource, offset, resourceAccess, cancelIndicator); } else { _xifexpression = CollectionLiterals.emptyList(); } final List<? extends Location> definitions = _xifexpression; final List<? extends Location> references = this.getReferences(resource, offset, resourceAccess, indexData, cancelIndicator); final Iterable<Location> result = Iterables.<Location>concat(definitions, references); return IterableExtensions.<Location>toList(result); }
public void generateJavaDoc(final EObject it, final ITreeAppendable appendable, final GeneratorConfig config) { final DocumentationAdapter adapter = IterableExtensions.<DocumentationAdapter>head(Iterables.<DocumentationAdapter>filter(it.eAdapters(), DocumentationAdapter.class)); if (((adapter != null) && (!StringExtensions.isNullOrEmpty(adapter.getDocumentation())))) { final Set<EObject> sourceElements = this.getSourceElements(it); if (((sourceElements.size() == 1) && (this.documentationProvider instanceof IEObjectDocumentationProviderExtension))) { final List<INode> documentationNodes = ((IEObjectDocumentationProviderExtension) this.documentationProvider).getDocumentationNodes(IterableExtensions.<EObject>head(sourceElements)); this.addJavaDocImports(it, appendable, documentationNodes); this.generateDocumentation(adapter.getDocumentation(), documentationNodes, appendable, config); } else { this.generateDocumentation(adapter.getDocumentation(), CollectionLiterals.<INode>emptyList(), appendable, config); } } }
public List<String> initialHiddenTokens(final Grammar it) { List<String> _xblockexpression = null; { boolean _isDefinesHiddenTokens = it.isDefinesHiddenTokens(); if (_isDefinesHiddenTokens) { final Function1<AbstractRule, String> _function = (AbstractRule it_1) -> { return this.ruleName(it_1); }; return IterableExtensions.<String>toList(ListExtensions.<AbstractRule, String>map(it.getHiddenTokens(), _function)); } int _size = it.getUsedGrammars().size(); boolean _equals = (_size == 1); if (_equals) { return this.initialHiddenTokens(IterableExtensions.<Grammar>head(it.getUsedGrammars())); } _xblockexpression = CollectionLiterals.<String>emptyList(); } return _xblockexpression; }
public Iterable<JvmFeature> findAllFeatures(final XImportDeclaration it) { Iterable<JvmFeature> _xblockexpression = null; { final JvmDeclaredType importedType = it.getImportedType(); if (((!it.isStatic()) || (importedType == null))) { return CollectionLiterals.<JvmFeature>emptyList(); } final IVisibilityHelper visibilityHelper = this.getVisibilityHelper(it.eResource()); final IResolvedFeatures resolvedFeatures = this._provider.getResolvedFeatures(importedType); final Function1<JvmFeature, Boolean> _function = (JvmFeature feature) -> { return Boolean.valueOf(((feature.isStatic() && visibilityHelper.isVisible(feature)) && ((it.getMemberName() == null) || feature.getSimpleName().startsWith(it.getMemberName())))); }; _xblockexpression = IterableExtensions.<JvmFeature>filter(resolvedFeatures.getAllFeatures(), _function); } return _xblockexpression; }
protected List<? extends Location> definition(final CancelIndicator cancelIndicator, final TextDocumentPositionParams params) { final URI uri = this._uriExtensions.toUri(params.getTextDocument().getUri()); final IResourceServiceProvider resourceServiceProvider = this.languagesRegistry.getResourceServiceProvider(uri); DocumentSymbolService _get = null; if (resourceServiceProvider!=null) { _get=resourceServiceProvider.<DocumentSymbolService>get(DocumentSymbolService.class); } final DocumentSymbolService documentSymbolService = _get; if ((documentSymbolService == null)) { return CollectionLiterals.<Location>emptyList(); } final Function2<Document, XtextResource, List<? extends Location>> _function = (Document document, XtextResource resource) -> { return documentSymbolService.getDefinitions(document, resource, params, this.resourceAccess, cancelIndicator); }; return this.workspaceManager.<List<? extends Location>>doRead(uri, _function); }
@Override public CompletableFuture<List<Either<SymbolInformation, DocumentSymbol>>> documentSymbol(final DocumentSymbolParams params) { final Function1<CancelIndicator, List<Either<SymbolInformation, DocumentSymbol>>> _function = (CancelIndicator cancelIndicator) -> { final URI uri = this._uriExtensions.toUri(params.getTextDocument().getUri()); final IResourceServiceProvider resourceServiceProvider = this.languagesRegistry.getResourceServiceProvider(uri); final IDocumentSymbolService documentSymbolService = this.getIDocumentSymbolService(resourceServiceProvider); if ((documentSymbolService == null)) { return CollectionLiterals.<Either<SymbolInformation, DocumentSymbol>>emptyList(); } final Function2<Document, XtextResource, List<Either<SymbolInformation, DocumentSymbol>>> _function_1 = (Document document, XtextResource resource) -> { return documentSymbolService.getSymbols(document, resource, params, cancelIndicator); }; return this.workspaceManager.<List<Either<SymbolInformation, DocumentSymbol>>>doRead(uri, _function_1); }; return this.requestManager.<List<Either<SymbolInformation, DocumentSymbol>>>runRead(_function); }