1 /*2 * The contents of this file are subject to the terms of the Common Development3 * and Distribution License (the License). You may not use this file except in4 * compliance with the License.5 * 6 * You can obtain a copy of the License at http://www.netbeans.org/cddl.html7 * or http://www.netbeans.org/cddl.txt.8 * 9 * When distributing Covered Code, include this CDDL Header Notice in each file10 * and include the License file at http://www.netbeans.org/cddl.txt.11 * If applicable, add the following below the CDDL Header, with the fields12 * enclosed by brackets [] replaced by your own identifying information:13 * "Portions Copyrighted [year] [name of copyright owner]"14 * 15 * The Original Software is NetBeans. The Initial Developer of the Original16 * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun17 * Microsystems, Inc. All Rights Reserved.18 */19 20 /*21 * DocumentationQuery.java22 *23 * Created on June 8, 2006, 9:56 PM24 *25 * To change this template, choose Tools | Template Manager26 * and open the template in the editor.27 */28 29 package org.netbeans.modules.xml.schema.completion;30 31 import java.net.URL ;32 import javax.swing.Action ;33 import javax.swing.text.Document ;34 import javax.swing.text.html.HTML ;35 import org.netbeans.modules.xml.axi.AXIComponent;36 import org.netbeans.modules.xml.axi.AbstractAttribute;37 import org.netbeans.modules.xml.axi.AbstractElement;38 import org.netbeans.modules.xml.axi.Attribute;39 import org.netbeans.spi.editor.completion.CompletionDocumentation;40 import org.netbeans.spi.editor.completion.CompletionResultSet;41 import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery;42 import org.openide.util.NbBundle;43 import org.netbeans.modules.xml.axi.Element;44 45 /**46 *47 * @author Samaresh48 */49 public class DocumentationQuery extends AsyncCompletionQuery {50 51 private CompletionResultItem completionItem;52 53 DocumentationQuery(CompletionResultItem item) {54 this.completionItem = item;55 }56 57 protected void query(CompletionResultSet resultSet,58 Document doc, int caretOffset) {59 resultSet.setDocumentation(DocumentationItem.60 createDocumentationItem(completionItem));61 resultSet.finish();62 }63 64 }65