Class RhinoJavaScriptTypesFactory
java.lang.Object
org.fife.rsta.ac.js.ast.jsType.JavaScriptTypesFactory
org.fife.rsta.ac.js.ast.jsType.JSR223JavaScriptTypesFactory
org.fife.rsta.ac.js.ast.jsType.RhinoJavaScriptTypesFactory
Rhino Specific JavaScriptTypesFactory. Supports
importPackage and importClass.
importPackage(java.util)
importClass(java.util.HashSet)
Clears the cache every time document is parsed for importPackage and importClass to work properly.-
Field Summary
FieldsFields inherited from class JavaScriptTypesFactory
cachedTypes, typesFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddImportClass(String qualifiedClass) voidaddImportPackage(String packageName) private booleancanClearCache(HashSet<String> newImports, LinkedHashSet<String> oldImports) Validate whether the newImports and old imports contain the same valuesprivate voidvoidprivate ClassFilefindFromClasses(JarManager manager, String name) Look for class file using imported classesprivate ClassFilefindFromImport(JarManager manager, String name) Look for class file using imported packagesgetClassFile(JarManager manager, TypeDeclaration type) Override getClassFile that checks the imported packages and classnames based on the TypeDeclaration.getAPITypeName()voidmergeImports(HashSet<String> packages, HashSet<String> classes) private voidmergeImports(HashSet<String> newImports, LinkedHashSet<String> oldImports, boolean packages) private voidremoveAllTypes(JavaScriptType type) Remove all TypeDeclarations from the TypeDeclarationFactory from the JavaScriptType and all it's extended classesprivate StringremovePackagesFromType(String type) Methods inherited from class JSR223JavaScriptTypesFactory
makeJavaScriptType
-
Field Details
-
importClasses
-
importPackages
-
-
Constructor Details
-
RhinoJavaScriptTypesFactory
-
-
Method Details
-
addImportClass
-
addImportPackage
-
mergeImports
-
mergeImports
private void mergeImports(HashSet<String> newImports, LinkedHashSet<String> oldImports, boolean packages) -
canClearCache
Validate whether the newImports and old imports contain the same values- Parameters:
newImports-oldImports-- Returns:
-
clearImportCache
public void clearImportCache() -
clearAllImportTypes
private void clearAllImportTypes() -
removeAllTypes
Remove all TypeDeclarations from the TypeDeclarationFactory from the JavaScriptType and all it's extended classes- Parameters:
type-
-
getClassFile
Override getClassFile that checks the imported packages and classnames based on the TypeDeclaration.getAPITypeName()- Overrides:
getClassFilein classJavaScriptTypesFactory
-
removePackagesFromType
-
findFromClasses
Look for class file using imported classes- Parameters:
manager-name-- Returns:
-
findFromImport
Look for class file using imported packages- Parameters:
manager-name-- Returns:
-