GSF Issues
This document attempts to pending issues for GSF (the language-neutral IDE-side infrastructure used by the Ruby support in 6.0, JavaScript, HTML & CSS in 6.1, PHP & Groovy in 6.5).
Index
- The indices from different language plugins must be partitioned such that they don't clobber each other. Currently, there is a single set of slices and potentially separate clients could use the same keys or iterate each other's documents. (Recently fixed)
- The index directory has a version number which is rev'ed whenever the Ruby client changes its database schema in Lucene. This needs to be changed so we don't have to rev the version for all clients whenever anyone changes their version; it must be per client. (Recently fixed)
- I should support incremental parsing. Important if I want to support detailed type analysis in indexing where I can afford to analyze the entire buffer as you're typing through code
completion. (Relevant Java change,Errors)
- There are some bugs in the LuceneIndex which means that the result maps may include results that don't actually match the search criteria. In the Ruby and Javascript indices, I validate results I get back from Lucene and skip these. I should revisit this, debug when it happens and remove the extra validation code.
- For JavaScript and Ruby, I added case-insensitive fields that I could search for. But that shouldn't be necessary since there is a case insensitive search type. Figure out the deatils of this and make it work.
- Indexers should be passed the CompilationInfo, or at least the embedding model when indexing a file. For JavaScript indexing for example it fails to find the comment corresponding to the code it's
indexing because the offsets are wrong - it needs the embedding model to look them up.
Projects/Scanning
- I need to find a cleaner way for the project types to communicate classpath-style settings to the indexers.
- Jar and zip files need to be supported.
- Figure out how to integrate with the tasklist in such a way that it doesn't have to be done by each language plugin
- Try to move some of the hints logic out of ruby/hints and into gsf such that it can be shared (but still allowing rule interfaces to contain language specific attributes like AST nodes) (Recently fixed)
- We should have error badges on files containing errors, as well as project folders recursively for folders containing errors. (Note - this recent changeset looks like it may do some of this for us, automatically)
- GSF might need to do something to support project-less file editing (this is being looked into for PHP etc. - see Openproject and EditingFilesOutsideOfProject). One possibility is at least including libraries in code completion even if local file completion won't work.
Parser Embedding
- This needs to be cleaned up.
- Indexer.isIndexable should be passing mimetypes as well via the ParserFile so the decision isn't just made based on file extensions. (However, this is tricky for a few reasons - see the comment above the isIndexable method in the interface).
Navigation
- It doesn't make sense to sort the HTML elements in html files for example (which causes a performance issues in large files, see
issue132883). Perhaps add some kind of attribute to the structure analyzer regarding this.
- The filters need to be customizable per language
- The embedding scenario in the navigator is a bit hacky right now
- The labels on the filters need to be customizable - it used to say "Members" and somebody said that doesn't apply to Ruby so it's something even more generic now - but this still won't apply to all languages. Actually, the whole filter itself should be customizeable!
- The re-counting nodes for refreshing in navigator shouldn't be done in the AWT thread.
Keystroke Handler
- Support document generation as part of the keystroke handler; see issue 133210 for details on where this is necessary.
Folding
- The folding categories should be customizeable (and have a better API than the current map name approach)
- The counting of folding shouldn't be done in the AWT thread.
Errors
- There should be possibility to mark more errors on one line. See issue 137121.
Code Completion
- ParameterInfo should allow multiple/overloaded methods
- Revisit the code which tries to auto close no-match completion when it was auto popped up (Recently fixed)
- Support for code completion in scenarios where there's no language embedding. For example, code completion inside an EMPTY JavaScript attribute in an HTML file needs to invoke the JavaScript code completion! (This is tracked by issue 114348) (Recently fixed)
- Implemented the isTruncated() support that is added on CompletionResults (to show an item that is sorted on the bottom, and then perform actual truncation of large result sets in Ruby and JAvaScript) (Recently fixed)
Custom Editor Kits
- There is some basic support for using custom editor kits (bypassing the GsfEditorKit). However, this means that these plugins must manually register the GSF services in their layer files (those services that they don't want to override themselves). This should be done more cleanly so I avoid duplicating full class names to GsfHyperlinkProvider etc. in client modules.
TODO
- Documentation!
- Refactoring: The refactoring support for Ruby bypasses the API module and reaches directly into the GSF implementation. The necessary pieces needs to be pulled out and formalized. I need to figure out a way for this to cooperate with other refactoring providers such that Ruby files in Java projects can participate in rename refactoring etc.
- Tasklist: The tasklist should only operate on files that are relevant from an indexing perspective, as well as filter out such that it only looks at source folders. In Rails projects for example,
the vendor/ folder should be skipped.
- Add some abstract classes implementing the APIs that most clients can subclass to insulate themselves from frequent changes during development?
API cleanup
- Try to get rid of the Element API; the IDE side should only need The ElementHandle class (Recently fixed)
- The scheme to plug in type resolvers (for Open Type) needs to be improved
- Rename Completable (to CodeCompleter?) (Recently fixed)
- Rename BracketCompleter (to KeystrokeHandler?) (Recently fixed)
- Support arbitrary nextWord/previousWord computation. Currently only done for camel case navigation, but need the general case to allow arbitrary identifier searches. Get rid of corresponding identifier-char method in GsfLanguage.
- Rip out the SemanticTask and OccurrencesTask methods from the Parser class and make separate interfaces for these like other services (Recently Fixed)
- Change "GSF" name?
Implementation
- Move away from modifying the layer files (in the userdir) and instead use the new API in NB6 to add a layer to the file system (using issue 26338)
- Update to Lucene 2.2 APIs (port trunk performance fix) (partially done)
- Update forked bits
- I should be able to localize the Navigate editor popup menu when I create it on behalf of modules. Currently a hack like this is necessary. Tracked in issue 127161.
- I should be able to automatically register hints preferences panels in the editing options for modules that supply a hints provider with hints.
Recently Completed:
- Remove FormattingPreferences
- Remove GsfTokenId