Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public void setShorthandCompletionCache(
}

/**
* load the comment completions from the shorthand cache
* load the comment completions from the shorthand cache.
*
* @param shorthandCache
*/
private void setCommentCompletions(ShorthandCompletionCache shorthandCache){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public void warning(String message, String sourceName, int line,

/**
* @param node AstNode to look for function
* @param provider The provider to look it up in.
* @return function lookup name from it's AstNode. i.e. concat function name
* and parameters. If no function is found, then return null
*/
Expand Down Expand Up @@ -233,6 +234,7 @@ public static TypeDeclaration tokenToNativeTypeDeclaration(
* e.g
* var a = [1, 2, 3];
* var b = a[1]; //b resolves to Number
*
* @param node
* @param provider
* @return
Expand All @@ -255,6 +257,7 @@ private static TypeDeclaration findGetElementType(AstNode node, SourceCompletion

/**
* Create array type from AstNode and try to determine the array type
*
* @param typeNode
* @param provider
* @return
Expand All @@ -276,6 +279,7 @@ private static TypeDeclaration createArrayType(AstNode typeNode, SourceCompletio

/**
* Find the array type from ArrayLiteral. Iterates through elements and checks all the types are the same
*
* @param arrayLit
* @param provider
* @return TypeDeclaration if all elements are of the same type else TypeDeclarationFactory.getDefaultTypeDeclaration();
Expand Down Expand Up @@ -495,8 +499,9 @@ private static String findNewExpressionString(AstNode node) {
* Convenience method to lookup TypeDeclaration through the
* TypeDeclarationFactory.
*
* @param name
* @return
* @param name The type declaration to look up.
* @param provider The provider to look it up in.
* @return The type declaration.
*/
public static TypeDeclaration getTypeDeclaration(String name, SourceCompletionProvider provider) {
return provider.getTypesFactory().getTypeDeclaration(name);
Expand Down Expand Up @@ -538,8 +543,8 @@ public static String removeLastDotFromText(String text) {
*
* String should be trimmed at the 1, not the 2,
*
* @param text
* @return
* @param text The text to trim.
* @return The trimmed text.
*/
public static String trimFromLastParam(String text) {
int trim = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public void addPropertyChangeListener(String prop, PropertyChangeListener l) {
* Creates options for Rhino based off of the user's preferences.
*
* @param errorHandler The container for errors found while parsing.
* @param langSupport The language support to configure, which may be {@code null}.
* @return The properties for the JS compiler to use.
*/
public static CompilerEnvirons createCompilerEnvironment(ErrorReporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ private List<Completion> resolveCompletions(String text, Set<Completion> set) {
}

/**
* Load ECMA JavaScript class completions
* Load ECMA JavaScript class completions.
*
* @param set completion set
* @param text
*/
Expand All @@ -337,7 +338,8 @@ private void loadECMAClasses(Set<Completion> set, String text) {

/**
* returns the Base class for the source completion provider. This is represented by a class name or ECMA lookup name
* e.g. set to 'Global' for server side or 'Window' for client JavaScript support
* e.g. set to 'Global' for server side or 'Window' for client JavaScript support.
*
* @return base class for the completion provider
*/
public String getSelf() {
Expand Down Expand Up @@ -436,7 +438,8 @@ public JavaScriptVariableDeclaration findDeclaration(String name) {

/**
* Convenience method to call variable resolver for non-local variables
* i.e. does NOT try to resolve name to any local variables (just pre-processed or system)
* i.e. does NOT try to resolve name to any local variables (just pre-processed or system).
*
* @param name
* @return JavaScript variable declaration
*/
Expand Down Expand Up @@ -607,7 +610,8 @@ public TypeDeclarationFactory getTypesFactory() {
}

/**
* Set type declaration options for parser
* Set type declaration options for parser.
*
* @param typeDeclarationOptions
*/
public void setTypeDeclationOptions(TypeDeclarationOptions typeDeclarationOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public void setEndOffset(int end) {

/**
* Sets the start offset of this code block.
*
* @param start the start offset
* @see #getStartOffset()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public void setEndOffset(int end) {

/**
* Sets the start offset of this declaration.
*
* @param start the start offset
* @see #getStartOffSet()
*/
Expand Down Expand Up @@ -82,6 +83,7 @@ public CodeBlock getCodeBlock() {
/**
* Set the JavaScript options associated with this declaration.
* These are used to defined whether options are available to
*
* @param options
*/
public void setTypeDeclarationOptions(TypeDeclarationOptions options) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class JavaScriptVariableDeclaration extends JavaScriptDeclaration {
* @param name of the variable
* @param offset position within script
* @param provider JavaScript source provider
* @param block The code block.
*/
public JavaScriptVariableDeclaration(String name, int offset,
SourceCompletionProvider provider, CodeBlock block) {
Expand All @@ -51,7 +52,8 @@ public void setTypeDeclaration(AstNode typeNode) {
}

/**
* Set the TypeDeclaration for the AstNode. Stores the original value so it can be reset
* Set the TypeDeclaration for the AstNode. Stores the original value so it can be reset.
*
* @param typeNode
* @param overrideOriginal
* @see #resetVariableToOriginalType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public String getOwnerScriptName() {

/**
* set the owner script name.
*
* @param ownerScriptName The name of the script that owns this type declaration.
*/
public void setOwnerScriptName(String ownerScriptName) {
this.ownerScriptName = ownerScriptName;
Expand All @@ -42,6 +44,8 @@ public boolean isSupportsLinks() {

/**
* set whether the type declaration supports hyperlinks.
*
* @param supportsLinks Whether the type declaration supports hyperlinks.
*/
public void setSupportsLinks(boolean supportsLinks) {
this.supportsLinks = supportsLinks;
Expand All @@ -55,7 +59,9 @@ public boolean isPreProcessing() {
}

/**
* set whether the type declaration has been created from a pre-processed script.
* Set whether the type declaration has been created from a pre-processed script.
*
* @param preProcessing Whether the script was pre-processed.
*/
public void setPreProcessing(boolean preProcessing) {
this.preProcessing = preProcessing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public TypeDeclaration getArgument(int index) {
/**
* Compare this JavaScriptFunctionType with another and return a weight integer based on the parameters matching or
* whether the parameters are compatible.
*
* @param compareType method to compare with this
* @param provider SourceCompletionProvider
* @param isJavaScriptType TODO
Expand Down Expand Up @@ -135,6 +136,7 @@ public int compare(JavaScriptFunctionType compareType, SourceCompletionProvider

/**
* Convert parameter into TypeDeclaration.
*
* @param type
* @param provider
* @return
Expand All @@ -154,6 +156,7 @@ private TypeDeclaration convertParamType(TypeDeclaration type,
/**
* Converts TypeDeclaration into Java Class and compares whether another parameter is compatible based
* on JSR-223.
*
* @param param parameter to compare
* @param compareParam compare parameter
* @param provider SourceCompletionProvider
Expand Down Expand Up @@ -310,6 +313,7 @@ else if (from.isPrimitive() && to != Boolean.TYPE) {

/**
* Converts TypeDeclaration qualified name to Java Class.
*
* @param name
* @return
* @throws ClassNotFoundException
Expand Down Expand Up @@ -377,6 +381,7 @@ else if (cls == JSObjectClass) {

/**
* Convenience method to parse function string and converts to JavaScriptFunctionType
*
* @param function String to parse e.g. convertValue(java.util.String val);
* @param provider used for type conversions
* @return The function type.
Expand Down Expand Up @@ -417,6 +422,7 @@ public static JavaScriptFunctionType parseFunction(String function,

/**
* Converts JavaScript class name to integer code.
*
* @param clsName
* @return
* @throws ClassNotFoundException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void removeConstructor(JSCompletion completion) {

/**
* Set the class type completion e.g. String, Number
*
* @param classType Completion to format the class
*/
public void setClassTypeCompletion(JSCompletion classType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ private boolean isAccessible(MemberInfo info, boolean staticOnly, boolean isJJTy
* <LI>!staticsOnly && public return true; //All public methods and fields</LI>
* <LI>Built in JavaScript type and public or protected return true; //All public/protected built in JSType (org.fife.rsta.ac.js.ecma.api.ecma3 package) methods and fields</LI>
* </OL>
*
* @param access - access flag to test
* @param staticsOnly - whether loading static methods and fields only
* @param isJSType - is a built in JavasScript type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ private void mergeImports(Set<String> newImports, LinkedHashSet<String> oldImpor

/**
* Validate whether the newImports and old imports contain the same values
*
* @param newImports
* @param oldImports
* @return
Expand Down Expand Up @@ -117,6 +118,7 @@ private void clearAllImportTypes() {

/**
* Remove all TypeDeclarations from the TypeDeclarationFactory from the JavaScriptType and all it's extended classes
*
* @param type
*/
private void removeAllTypes(JavaScriptType type) {
Expand Down Expand Up @@ -157,6 +159,7 @@ private String removePackagesFromType(String type) {

/**
* Look for class file using imported classes
*
* @param manager
* @param name
* @return
Expand All @@ -174,7 +177,8 @@ private ClassFile findFromClasses(JarManager manager, String name) {
}

/**
* Look for class file using imported packages
* Look for class file using imported packages.
*
* @param manager
* @param name
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public abstract CodeBlock convertAstNodeToCodeBlock(AstRoot root,

/**
* If options are null, then it is assumed that the main editor text is being parsed.
*
* @return whether options is not null and is in pre-processing mode.
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public RhinoJavaScriptAstParser(SourceCompletionProvider provider, int dot,

/**
* Clear the importPackage and importClass cache
*
* @param provider SourceCompletionProvider
*/
public void clearImportCache(SourceCompletionProvider provider) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public void removeType(String name) {

/**
* Returns whether the qualified name is a built-in JavaScript type
*
* @param td The type declaration to check.
* @return Whether it is a built-in JS type.
*/
Expand All @@ -100,6 +101,7 @@ public boolean isJavaScriptType(TypeDeclaration td) {

/**
* Returns the type declaration.
*
* @param name
* @return Lookup type declaration from name. If the
* <code>TypeDeclaration</code> cannot be found, then lookup using
Expand All @@ -123,9 +125,12 @@ private String getJSTypeDeclarationAsString(String name) {

/**
* The API may have its own types, so these need converting back to
* JavaScript types e.g. JSString == String, JSNumber == Number
* JavaScript types e.g. JSString == String, JSNumber == Number.
*
* @param lookupName The name to look up.
* @param qualified Whether it is fully qualified.
* @return The type.
*/

public String convertJavaScriptType(String lookupName, boolean qualified) {
if (lookupName != null) {
if (TypeDeclarations.NULL_TYPE.equals(lookupName)) { // void has no type
Expand Down Expand Up @@ -183,8 +188,9 @@ public Set<JavaScriptObject> getECMAScriptObjects() {

/**
* Answers the question whether an object can be instantiated (i.e. has a constructor)
* @param name name of class to test
*
* @param name name of class to test
* @return Whether the object can be instantiated.
*/
public boolean canJavaScriptBeInstantiated(String name) {
return ecma.canECMAObjectBeInstantiated(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ public void removeType(String name) {
/**
* Returns whether the qualified name is a built-in JavaScript type
*
* @param td
* @return
* @param td The type declaration, which may be {@code null}.
* @return Whether it is a built-in JS type.
*/
public boolean isJavaScriptType(TypeDeclaration td) {
return td != null && td.getPackageName() != null
Expand Down Expand Up @@ -255,8 +255,9 @@ public Set<JavaScriptObject> getJavaScriptObjects() {
/**
* Answers the question whether an object can be instantiated (i.e. has a constructor)
* Note, only tests ECMA objects
* @param name name of class to test
*
* @param name name of class to test
* @return Whether the object can be instantiated.
*/
public boolean canECMAObjectBeInstantiated(String name) {
String tempName = javascriptReverseLookup.get(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
public abstract class History implements HistoryFunctions {

/**
* Object History()
* Object History().
*
* @super Object
* @constructor
* @since Common Usage, no standard
Expand Down Expand Up @@ -39,7 +40,8 @@ public History(){}
public History prototype;

/**
* Property length
* Property length.
*
* @type Number
* @memberOf History
*/
Expand Down
Loading