当前位置: 首页>>代码示例>>Java>>正文


Java CompletionResultSet.setHasAdditionalItems方法代码示例

本文整理汇总了Java中org.netbeans.spi.editor.completion.CompletionResultSet.setHasAdditionalItems方法的典型用法代码示例。如果您正苦于以下问题:Java CompletionResultSet.setHasAdditionalItems方法的具体用法?Java CompletionResultSet.setHasAdditionalItems怎么用?Java CompletionResultSet.setHasAdditionalItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.netbeans.spi.editor.completion.CompletionResultSet的用法示例。


在下文中一共展示了CompletionResultSet.setHasAdditionalItems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: query

import org.netbeans.spi.editor.completion.CompletionResultSet; //导入方法依赖的package包/类
@Override
public void query(CompletionResultSet resultSet, Document doc, int caretOffset) {
    try {
        ClasspathInfo cpInfo = ClasspathInfo.create(doc);
        ParserManager.parse(Collections.singleton(Source.create(doc)), 
                createTask(cpInfo, 
                    component, 
                    resultSet, 
                    doc, caretOffset, queryType)
        );
        resultSet.setHasAdditionalItems(additionalItems);
        resultSet.addAllItems(items);
        resultSet.finish();
    } catch (ParseException ex) {
        Exceptions.printStackTrace(ex);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:FXMLCompletion2.java

示例2: queryImpl

import org.netbeans.spi.editor.completion.CompletionResultSet; //导入方法依赖的package包/类
private void queryImpl(CompletionResultSet resultSet, Document doc, int caretOffset) throws InterruptedException, ExecutionException {
    JavadocContext jdctx = new JavadocContext();
    items = new  ArrayList<CompletionItem>();
    this.caretOffset = caretOffset;
    runInJavac(JavaSource.forDocument(doc), jdctx);
    
    if (!ignoreCancel && isTaskCancelled()) {
        return;
    }
    
    if ((queryType & CompletionProvider.COMPLETION_QUERY_TYPE) != 0) {
        if (!items.isEmpty()) {
            resultSet.addAllItems(items);
        }
        resultSet.setHasAdditionalItems(hasAdditionalItems);
    }
    
    if (jdctx.anchorOffset >= 0) {
        resultSet.setAnchorOffset(jdctx.anchorOffset);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:JavadocCompletionQuery.java

示例3: populateResultSet

import org.netbeans.spi.editor.completion.CompletionResultSet; //导入方法依赖的package包/类
private void populateResultSet(CompletionResultSet resultSet, SpringCompletionResult springCompletionResult) {
    if(springCompletionResult == SpringCompletionResult.NONE) {
        return;
    }
    
    resultSet.addAllItems(springCompletionResult.getItems());
    if (completor.getAnchorOffset() != -1) {
        resultSet.setAnchorOffset(completor.getAnchorOffset());
    }
    
    if(springCompletionResult.hasAdditionalItems()) {
        resultSet.setHasAdditionalItems(true);
        resultSet.setHasAdditionalItemsText(springCompletionResult.getAdditionalItemsText());
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:SpringXMLConfigCompletionProvider.java


注:本文中的org.netbeans.spi.editor.completion.CompletionResultSet.setHasAdditionalItems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。