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


Java AsyncCompletionQuery类代码示例

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


AsyncCompletionQuery类属于org.netbeans.spi.editor.completion.support包,在下文中一共展示了AsyncCompletionQuery类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    if(query != null){
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet resultSet, Document doc, int caretOffset) {
            String docText = null;
            try{
                docText = NbBundle.getMessage(PUCompletionManager.class, "NAMED_QUERY_TEXT", getSubstitutionText(), entity, query);//NOI18N
            } catch (Exception ex){
                //just do not have doc by any reason
            }
            if (docText != null) {
                CompletionDocumentation documentation = PersistenceCompletionDocumentation.getAttribValueDoc(docText);
                resultSet.setDocumentation(documentation);
            }
            resultSet.finish();
        }
    });
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:JPACompletionItem.java

示例2: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    if (type != null) {
        return new AsyncCompletionTask(new AsyncCompletionQuery() {

            @Override
            protected void query(CompletionResultSet result, Document doc, int i) {
                if (type == Type.DIRECTIVE) {
                    result.setDocumentation(FTLCompletionItem.getDocForDirective(text));
                } else if (type == Type.BUILTIN) {
                    result.setDocumentation(FTLCompletionItem.getDocForBuiltin(text));
                }
                result.finish();
            }
        });
    }
    return null;
}
 
开发者ID:rostanek,项目名称:freemarker-support-for-netbeans,代码行数:19,代码来源:FTLCompletionItem.java

示例3: createTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createTask(int queryType, JTextComponent component) {
    if (queryType != CompletionProvider.COMPLETION_QUERY_TYPE) {
        return null;
    }
    return new AsyncCompletionTask(new AsyncCompletionQuery() {

        @Override
        protected void query(CompletionResultSet resultSet, Document doc, int caretOffset) {
            //Iterate through the available locales
            //and assign each country display name
            //to a CompletionResultSet:
            String text = DocumentHelper.getWordBeforeCaret(doc, caretOffset);
            CompletionProposals[] words = CompletionProposals.values();
            Arrays.sort(words);
            for (CompletionProposals word : words) {
                final String name = word.name().toLowerCase();
                if (name.startsWith(text)) {
                    resultSet.addItem(new RTCompletionItem(name, caretOffset));
                }
            }
            resultSet.finish();
        }
    }, component);
}
 
开发者ID:iti-luebeck,项目名称:RTeasy2,代码行数:26,代码来源:RTCompletionProvider.java

示例4: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet resultSet, Document doc, int caretOffset) {
            CompletionDocumentation docItem = SpringXMLConfigCompletionDoc.createBeanRefDoc(beanId,
                    beanNames, beanClass, beanLocFile, goToBeanAction);
            resultSet.setDocumentation(docItem);
            resultSet.finish();
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:SpringXMLConfigCompletionItem.java

示例5: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {

        @Override
        protected void query(CompletionResultSet resultSet, Document doc, int caretOffset) {
            if (docText != null) {
                CompletionDocumentation documentation = HibernateCompletionDocumentation.getAttribValueDoc(docText);
                resultSet.setDocumentation(documentation);
            }
            resultSet.finish();
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:HibernateCompletionItem.java

示例6: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
/**
 * Returns a task used to obtain a documentation associated with the item if
 * there is any.
 *
 * @return CompletionTask
 */
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            completionResultSet.setDocumentation(new ThymeleafCompletionDocumentation(ThymeleafCompletionItem.this));
            completionResultSet.finish();
        }
    });
}
 
开发者ID:ArturWisniewski,项目名称:NB-Thymeleaf-Code-Completion,代码行数:17,代码来源:ThymeleafCompletionItem.java

示例7: createToolTipTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
/**
 * Returns a task used to obtain a tooltip hint associated with the item if
 * there is any.
 *
 * @return CompletionTask
 */
@Override
public CompletionTask createToolTipTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            JToolTip toolTip = new JToolTip();
            toolTip.setTipText("Press Enter to insert \"" + text + "\"");
            completionResultSet.setToolTip(toolTip);
            completionResultSet.finish();
        }
    });
}
 
开发者ID:ArturWisniewski,项目名称:NB-Thymeleaf-Code-Completion,代码行数:19,代码来源:ThymeleafCompletionItem.java

示例8: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            completionResultSet
                    .setDocumentation(new CfgPropCompletionDocumentation(CfgPropCompletionItem.this, bootService));
            completionResultSet.finish();
        }
    });
}
 
开发者ID:AlexFalappa,项目名称:nb-springboot,代码行数:12,代码来源:CfgPropCompletionItem.java

示例9: createToolTipTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createToolTipTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            JToolTip toolTip = new JToolTip();
            toolTip.setTipText("Press Enter to insert \"" + getText() + "\"");
            completionResultSet.setToolTip(toolTip);
            completionResultSet.finish();
        }
    });
}
 
开发者ID:AlexFalappa,项目名称:nb-springboot,代码行数:13,代码来源:CfgPropCompletionItem.java

示例10: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            completionResultSet.setDocumentation(new CfgPropValueCompletionDocumentation(CfgPropValueCompletionItem.this));
            completionResultSet.finish();
        }
    });
}
 
开发者ID:AlexFalappa,项目名称:nb-springboot,代码行数:11,代码来源:CfgPropValueCompletionItem.java

示例11: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            completionResultSet.setDocumentation(new ShellScriptCompletionDocumentation(item));
            completionResultSet.finish();
        }
    });
}
 
开发者ID:pedrohidalgo,项目名称:nbshell,代码行数:11,代码来源:ShellScriptCompletionItem.java

示例12: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            completionResultSet.setDocumentation(new RoutesHTTPMethodCompletionDocumentation(RoutesHTTPMethodCompletionItem.this));
            completionResultSet.finish();
        }
    });
}
 
开发者ID:pedrohidalgo,项目名称:pleasure,代码行数:11,代码来源:RoutesHTTPMethodCompletionItem.java

示例13: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            completionResultSet.setDocumentation(new ConfCompletionDocumentation(item));
            completionResultSet.finish();
        }
    });
}
 
开发者ID:pedrohidalgo,项目名称:pleasure,代码行数:11,代码来源:ConfCompletionItem.java

示例14: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            completionResultSet.setDocumentation(new SpringBootConfigurationCompletionDocumentation(SpringBootConfigurationCompletionItem.this));
            completionResultSet.finish();
        }
    });
}
 
开发者ID:keevosh,项目名称:nb-springboot-configuration-support,代码行数:11,代码来源:SpringBootConfigurationCompletionItem.java

示例15: createDocumentationTask

import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery; //导入依赖的package包/类
@Override
public CompletionTask createDocumentationTask() {
    return new AsyncCompletionTask(new AsyncCompletionQuery() {
        @Override
        protected void query(CompletionResultSet completionResultSet, Document document, int i) {
            MethodCompletionDocumentation doc = new MethodCompletionDocumentation(MirahMethodCompletionItem.this);
            // Get the text in this query to cache it so that it doesn't block the UI thread.
            doc.getText();
            completionResultSet.setDocumentation(doc);
            completionResultSet.finish();
        }
    });
}
 
开发者ID:shannah,项目名称:mirah-nbm,代码行数:14,代码来源:MirahMethodCompletionItem.java


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