@Override public Documentation createDocumentation(CCDocHtmlFormatter locationHeader) { assert locationHeader != null; return Documentation.create(String.format("%s%s", locationHeader.getText(), description), url); //NOI18N }
@Override public Documentation createDocumentation(CCDocHtmlFormatter locationHeader) { return Documentation.create(String.format("%s%s", locationHeader.getText(), Bundle.PHPDocNotFound())); //NOI18N } };
public static Collection<JsObject> readModel(BufferedReader reader, JsObject parent, @NullAllowed String sourceLabel, URL defaultDocUrl) throws IOException { String line = null; StringBuilder pushback = new StringBuilder(); List<JsObject> ret = new ArrayList<JsObject>(); while (pushback.length() > 0 || (line = reader.readLine()) != null) { if (pushback.length() > 0) { line = pushback.toString(); pushback.setLength(0); } if (line.trim().isEmpty()) { continue; } ret.add(readObject(parent, line, 0, reader, pushback, false, sourceLabel, defaultDocUrl == null ? null : Documentation.create(Bundle.LBL_DefaultDocContentForURL(), defaultDocUrl))); } return ret; }
res.put( cmd, Documentation.create( section, new URL(String.format("%s#%s", //NOI18N
case DOCUMETATION_URL: ((JsObjectImpl) object).setDocumentation( Documentation.create(Bundle.LBL_DefaultDocContentForURL(), new URL(line.trim()))); break; case RETURN:
/** * Gets documentation for given Node. * @param node of the javaScript code * @return documentation text if any {@code null} otherwise */ public Documentation getDocumentation(Node node) { JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks()); if (comment != null) { String content = JsDocumentationPrinter.printDocumentation(comment); if (!content.isEmpty()) { return Documentation.create(content); } } return null; }
return Documentation.create(result[0]);
static Documentation document(ParserResult info, ElementHandle element) { if (element instanceof PHPDOCTagElement) { PHPDOCTagElement pHPDOCTagElement = (PHPDOCTagElement) element; String doc = pHPDOCTagElement.getDoc(); return Documentation.create(doc == null ? Bundle.PHPDocNotFound() : doc); } if (element instanceof PredefinedSymbolElement) { PredefinedSymbolElement predefinedSymbolElement = (PredefinedSymbolElement) element; String doc = predefinedSymbolElement.getDoc(); return Documentation.create(doc == null ? Bundle.PHPDocNotFound() : doc); } if (element instanceof PhpElement) { return documentIndexedElement((PhpElement) element); } if (element instanceof TypeMemberElement) { TypeMemberElement indexedClassMember = (TypeMemberElement) element; return documentIndexedElement(indexedClassMember); } return null; }
private JsObject createProperty(final ModelElementFactory factory, final JsObject parent, final JSONObject jsonObject) { String propertyName = getJSONStringProperty(jsonObject, NAME); if (propertyName != null) { JsObject object = factory.newObject(parent, propertyName, OffsetRange.NONE, true, NodeJsUtils.NODEJS_NAME); parent.addProperty(object.getName(), object); String doc = getJSONStringProperty(jsonObject, DESCRIPTION); object.setDocumentation(Documentation.create(doc, getDocumentationURL(propertyName))); return object; } return null; }
@Override public Documentation documentElement(ParserResult info, ElementHandle element, Callable<Boolean> cancel) { Documentation result; if (element instanceof ModelElement) { ModelElement mElem = (ModelElement) element; ModelElement parentElem = mElem.getInScope(); FileObject fileObject = mElem.getFileObject(); String fName = fileObject == null ? "?" : fileObject.getNameExt(); //NOI18N String tooltip; if (parentElem instanceof TypeScope) { tooltip = mElem.getPhpElementKind() + ": " + parentElem.getName() + "<b> " + mElem.getName() + " </b>" + "(" + fName + ")"; //NOI18N } else { tooltip = mElem.getPhpElementKind() + ":<b> " + mElem.getName() + " </b>" + "(" + fName + ")"; //NOI18N } result = Documentation.create(String.format("<div align=\"right\"><font size=-1>%s</font></div>", tooltip)); //NOI18N } else { result = ((element instanceof MethodElement) && ((MethodElement) element).isMagic()) ? null : DocRenderer.document(info, element); } return result; }
object.setDocumentation(Documentation.create(doc, getDocumentationURL(methodName, paramNames))); toObject.addProperty(object.getName(), object); addProperties(factory, object, (DeclarationScope) object, method);
object.addProperty(jsProperty.getName(), jsProperty); types = docProperty.getParamTypes(); jsProperty.setDocumentation(Documentation.create(docProperty.getParamDescription())); assignOffset = docProperty.getParamName().getOffsetRange().getEnd(); for (Type type : types) { JsTokenId.JAVASCRIPT_MIME_TYPE, null); parentObject.addProperty(callBackFunction.getName(), callBackFunction); callBackFunction.setDocumentation(Documentation.create(comment.getDocumentation())); callBackFunction.setJsKind(JsElement.Kind.CALLBACK); List<DocParameter> docParameters = comment.getParameters();