| java.lang.Object javax.swing.tree.DefaultTreeModel tide.sources.LibrariesTreeModel
LibrariesTreeModel | final public class LibrariesTreeModel extends DefaultTreeModel implements JavaFilesTreeModel(Code) | | Contains src.jar instead of rt.jar, to allow transparent source browsing of the api.
For completions, use the ClassFilesManager instead !, for example it contains
java.awt.geom.Point2D.Double, not only Point2D.java !
TODO: use rt.jar + map src.jar if available
Exist only once, clearModel() and add() allow changing project.
at first level, one finds the lib roots. Either directories or jars or zips.
[Aug2006] only classes are shown in the tree, but sources are mapped in a hashtable.
|
Method Summary | |
public void | clearModel() important: also call this when changing project, this releases the zip files references... | public void | getAllDirsRecurse(List<LibFileItem> items, LibFileItem froot) Every directories (packages). | public List<LibFileItem> | getAllFiles() | public List<LibFileItem> | getAllFilesContainingName(String javaPartName, boolean caseSensitive, boolean exact, boolean javaOnly) Useful to locate missing imports (slow). | public void | getAllFilesRecurse(List<LibFileItem> items, LibFileItem froot, boolean javaOnly) Everything but directories. | public List<LibFileItem> | getAllJavaFilesWithSimpleNameStartingWith(String start) | public List<FileItem> | getAllPackages(String javaName) Looks in each library. | public List<LibFileItem> | getAllTopLevelLibs() Top level libraries (rt.jar, src.zip, ...). | public LibFileItem | getFile(String javaName, String fileName) | public FileItem | getPackage(String javaName) | String | getSourceFor(String javaName) | public FileItem | quickGet(String javaName, boolean caseSensitive) | public FileItem | quickPackageGet(String javaName, boolean caseSensitive) | public void | setRoots(List<File> librariesRoots, List<File> sourcesOfLibraries) |
LibrariesTreeModel | public LibrariesTreeModel()(Code) | | |
clearModel | public void clearModel()(Code) | | important: also call this when changing project, this releases the zip files references...
|
getAllFiles | public List<LibFileItem> getAllFiles()(Code) | | TODO: this could be cached, removed at clearModel() and recreated at addRoot() !
even non java ones !
|
getAllFilesContainingName | public List<LibFileItem> getAllFilesContainingName(String javaPartName, boolean caseSensitive, boolean exact, boolean javaOnly)(Code) | | Useful to locate missing imports (slow).
Parameters: javaOnly - if true, only .class and .java are searched. |
getAllTopLevelLibs | public List<LibFileItem> getAllTopLevelLibs()(Code) | | Top level libraries (rt.jar, src.zip, ...).
|
getFile | public LibFileItem getFile(String javaName, String fileName)(Code) | | Parameters: javaName - is the full class name (NOT the package name) Parameters: fileName - if not empty is to be used when the type has not the name of the file ! null if not foundWARNING: may not respect priorities in case of conflicts...but respects the lib order. |
getPackage | public FileItem getPackage(String javaName)(Code) | | the package file (folder) for the given java name (ex: java.util) |
setRoots | public void setRoots(List<File> librariesRoots, List<File> sourcesOfLibraries)(Code) | | Parameters: librariesRoots - dirs and jars |
Methods inherited from javax.swing.tree.DefaultTreeModel | public void addTreeModelListener(TreeModelListener l)(Code)(Java Doc) public boolean asksAllowsChildren()(Code)(Java Doc) protected void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)(Code)(Java Doc) protected void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)(Code)(Java Doc) protected void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)(Code)(Java Doc) protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)(Code)(Java Doc) public Object getChild(Object parent, int index)(Code)(Java Doc) public int getChildCount(Object parent)(Code)(Java Doc) public int getIndexOfChild(Object parent, Object child)(Code)(Java Doc) public T[] getListeners(Class<T> listenerType)(Code)(Java Doc) public TreeNode[] getPathToRoot(TreeNode aNode)(Code)(Java Doc) protected TreeNode[] getPathToRoot(TreeNode aNode, int depth)(Code)(Java Doc) public Object getRoot()(Code)(Java Doc) public TreeModelListener[] getTreeModelListeners()(Code)(Java Doc) public void insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index)(Code)(Java Doc) public boolean isLeaf(Object node)(Code)(Java Doc) public void nodeChanged(TreeNode node)(Code)(Java Doc) public void nodeStructureChanged(TreeNode node)(Code)(Java Doc) public void nodesChanged(TreeNode node, int[] childIndices)(Code)(Java Doc) public void nodesWereInserted(TreeNode node, int[] childIndices)(Code)(Java Doc) public void nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren)(Code)(Java Doc) public void reload()(Code)(Java Doc) public void reload(TreeNode node)(Code)(Java Doc) public void removeNodeFromParent(MutableTreeNode node)(Code)(Java Doc) public void removeTreeModelListener(TreeModelListener l)(Code)(Java Doc) public void setAsksAllowsChildren(boolean newValue)(Code)(Java Doc) public void setRoot(TreeNode root)(Code)(Java Doc) public void valueForPathChanged(TreePath path, Object newValue)(Code)(Java Doc)
|
|
|