本文整理汇总了Java中org.netbeans.spi.editor.completion.support.AsyncCompletionTask类的典型用法代码示例。如果您正苦于以下问题:Java AsyncCompletionTask类的具体用法?Java AsyncCompletionTask怎么用?Java AsyncCompletionTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AsyncCompletionTask类属于org.netbeans.spi.editor.completion.support包,在下文中一共展示了AsyncCompletionTask类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createDocumentationTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的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: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask(int queryType, JTextComponent component) {
int a = isFirstJavaLine(component);
if ((queryType != COMPLETION_ALL_QUERY_TYPE && queryType != COMPLETION_QUERY_TYPE) ||
isFirstJavaLine(component) == -1) {
return null;
}
// check that the caret is at the first line of the editable area:
ShellSession session = checkInputSection(component);
if (session == null) {
return null;
}
return new AsyncCompletionTask(new T(
session,
session.getModel(),
session.getModel().getInputSection()
), component);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:CommandCompletionProvider.java
示例3: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask(int queryType, final JTextComponent component) {
int a = isFirstJavaLine(component);
if (queryType != COMPLETION_ALL_QUERY_TYPE) {
if (queryType != COMPLETION_QUERY_TYPE || a != 0) {
return null;
}
}
// check that the caret is at the first line of the editable area:
ShellSession session = checkInputSection(component);
if (session == null) {
return null;
}
return new AsyncCompletionTask(new T(
session,
session.getModel(),
session.getModel().getInputSection()
), component);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:HistoryCompletionProvider.java
示例4: createDocumentationTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的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
示例5: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的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
示例6: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask( int queryType, JTextComponent component )
{
if (VaadinConfiguration.getInstance().isAddonCodeCompletionEnabled()) {
VaadinSupport support = getSupport(component.getDocument());
if (support == null || !support.isEnabled()) {
return null;
}
if (queryType == CompletionProvider.COMPLETION_ALL_QUERY_TYPE) {
return new AsyncCompletionTask(new AddonCompletionQuery(
component.getSelectionStart()), component);
}
}
return null;
}
开发者ID:vaadin,项目名称:netbeans-plugin,代码行数:17,代码来源:AddOnCompletionProvider.java
示例7: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask(int queryType, JTextComponent component) {
if (queryType != CompletionProvider.COMPLETION_QUERY_TYPE && queryType != CompletionProvider.COMPLETION_ALL_QUERY_TYPE) {
return null;
}
return new AsyncCompletionTask(new JPACodeCompletionQuery(queryType, component, component.getSelectionStart(), true), component);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:JPQLEditorCodeCompletionProvider.java
示例8: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask(int queryType, JTextComponent component) {
if (queryType != CompletionProvider.COMPLETION_QUERY_TYPE && queryType !=CompletionProvider.COMPLETION_ALL_QUERY_TYPE) {
return null;
}
return new AsyncCompletionTask(new PUCompletionQuery(queryType, component, component.getSelectionStart(), true), component);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:PUCompletionProvider.java
示例9: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
public CompletionTask createTask(int queryType, JTextComponent component) {
if (queryType == COMPLETION_QUERY_TYPE || queryType == COMPLETION_ALL_QUERY_TYPE) {
return new AsyncCompletionTask(new CompletionQuery(CompletionUtil.getPrimaryFile(component.getDocument())), component);
}
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:SchemaBasedCompletionProvider.java
示例10: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
public CompletionTask createTask(int queryType, JTextComponent component) {
if (queryType == COMPLETION_QUERY_TYPE) {
return new AsyncCompletionTask(new Query(), component);
}
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:WordCompletion.java
示例11: createDocumentationTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的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
示例12: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask(int queryType, JTextComponent component) {
if ((queryType & COMPLETION_QUERY_TYPE) == COMPLETION_QUERY_TYPE) {
return new AsyncCompletionTask(new SpringXMLConfigCompletionQuery(queryType), component);
}
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:SpringXMLConfigCompletionProvider.java
示例13: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask(int queryType, JTextComponent component) {
if (queryType == COMPLETION_QUERY_TYPE) {
return new AsyncCompletionTask(new Query(), component);
}
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:SearchCompletion.java
示例14: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
public CompletionTask createTask(int type, JTextComponent component) {
if (((type & COMPLETION_QUERY_TYPE) != 0) || (type == TOOLTIP_QUERY_TYPE) ||
(type == DOCUMENTATION_QUERY_TYPE)) {
return new AsyncCompletionTask(new JavaCompletionQuery(type,
component.getSelectionStart()), component);
}
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:GsfCompletionProvider.java
示例15: createDocTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
static CompletionTask createDocTask(ElementHandle element, ParserResult info) { // TODO - use ComObjectHandle ??
JavaCompletionQuery query = new JavaCompletionQuery(DOCUMENTATION_QUERY_TYPE, -1);
query.element = element;
//return new AsyncCompletionTask(query, Registry.getMostActiveComponent());
return new AsyncCompletionTask(query, EditorRegistry.lastFocusedComponent());
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:GsfCompletionProvider.java
示例16: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask(int queryType, JTextComponent component) {
if (component == null) {
return null;
}
return new AsyncCompletionTask(new Q(component, queryType), component);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:FXMLCompletion2.java
示例17: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
@Override
public CompletionTask createTask(int type, JTextComponent component) {
if ((type & COMPLETION_QUERY_TYPE) != 0 || type == TOOLTIP_QUERY_TYPE || type == DOCUMENTATION_QUERY_TYPE) {
return new AsyncCompletionTask(new JavaCompletionQuery(type, component.getSelectionStart()), component);
}
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:JavaCompletionProvider.java
示例18: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
public CompletionTask createTask(int queryType, JTextComponent component) {
if( queryType != CompletionProvider.COMPLETION_QUERY_TYPE )
return null;
return new AsyncCompletionTask(new HibernateCfgCompletionQuery(queryType,
component.getSelectionStart()), component);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:HibernateCfgCompletionProvider.java
示例19: createTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的package包/类
public CompletionTask createTask(int queryType, JTextComponent component) {
if( queryType != CompletionProvider.COMPLETION_QUERY_TYPE )
return null;
return new AsyncCompletionTask(new HibernateRevengCompletionQuery(queryType,
component.getSelectionStart()), component);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:HibernateRevengCompletionProvider.java
示例20: createDocumentationTask
import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; //导入依赖的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
注:本文中的org.netbeans.spi.editor.completion.support.AsyncCompletionTask类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论