xored / f4

F4 – Fantom IDE
30 stars 5 forks source link

Open Fantom Type Dialogue does not show types from project libraries #73

Closed SlimerDude closed 4 months ago

SlimerDude commented 8 years ago

The Open Fantom Type Dialogue (Shift+Ctrl+T) does not show types from project libraries (dependant pods) - not even from sys.

openfantomtypedialogue

SlimerDude commented 8 years ago

Interestingly, the autocomplete options for class inheritance do show types from project libraries:

alltypes

Now, how to get the same list in the Open Fantom Type dialogue?

SlimerDude commented 8 years ago

TypeNameMatchRequestorWrapper.acceptType() is given a resource path of C:/Apps/fantom-1.0.68/lib/fan/xml.pod/XDoc.fcode. It incorrectly assumes it is a Path resource, and not a Zip resoouce, because it does not contain the IDLTKSearchScope.FILE_ENTRY_SEPARATOR char of |. Because the path does not exist, it is not added.

It should have been handed a path of C:/Apps/fantom-1.0.68/lib/fan/xml.pod|XDoc.fcode

The documentPath was created by InternalSearchPattern.acceptMatch() which is handed the separator by InternalSearchPattern.findIndexMatches() which in turn takes it from Index.separator which sets it to its DEFAULT_SEPARATOR constant and not the JAR_SEPARATOR.

The problem is, I can't find a means to change these classes or alter their behaviour.

Info: the main entry point is com.xored.fanide.ui - com.xored.fanide.internal.ui.actions.FanOpenTypeAction. createDialog() may be overridden to create an OpenTypeSelectionDialog2 instance with a custom DLTKWorkspaceScope.

FQCNs:

Even beyond that (if I alter paths in Debug) DLTKSearchScope.projectFragment() is unable to resolve the ZIP file because Model.getTarget() uses EnvironmentPathUtils.getFile(path) which fails to resolve an environment. Too many things seem wrong around here, which makes me think I'm barking up the wrong tree.