@Nonnull
	public FileNavigable gotoDeclaration(@Nonnull FilePathNode path) throws IncompletePathException {
		Workspace workspace = path.getValueOfType(Workspace.class);
		WorkspaceResource resource = path.getValueOfType(WorkspaceResource.class);
		FileBundle bundle = path.getValueOfType(FileBundle.class);
		FileInfo info = path.getValue();
		if (workspace == null) {
			logger.error("Cannot resolve required path nodes for file '{}', missing workspace in path", info.getName());
			throw new IncompletePathException(Workspace.class);
		}
		if (resource == null) {
			logger.error("Cannot resolve required path nodes for file '{}', missing resource in path", info.getName());
			throw new IncompletePathException(WorkspaceResource.class);
		}
		if (bundle == null) {
			logger.error("Cannot resolve required path nodes for file '{}', missing bundle in path", info.getName());
			throw new IncompletePathException(ClassBundle.class);
		}

		// Handle text vs binary
		if (info.isTextFile()) {
			return gotoDeclaration(workspace, resource, bundle, info.asTextFile());
		} else if (info.isImageFile()) {
			return gotoDeclaration(workspace, resource, bundle, info.asImageFile());
		} else if (info instanceof BinaryXmlFileInfo binaryXml) {
			return gotoDeclaration(workspace, resource, bundle, binaryXml);
		} else if (info.isAudioFile()) {
			return gotoDeclaration(workspace, resource, bundle, info.asAudioFile());
		} else if (info.isVideoFile()) {
			return gotoDeclaration(workspace, resource, bundle, info.asVideoFile());
		}
		return gotoDeclaration(workspace, resource, bundle, info.asFile());
	}
Brings a {@link FileNavigable} component representing the given file into focus.
If no such component exists, one is created.
<br>
Automatically calls the type-specific goto-declaration handling.

@param path
		Path containing a file to open.

@return Navigable content representing file content of the path.

@throws IncompletePathException
		When the path is missing parent elements.
recaf-ui/src/main/java/software/coley/recaf/services/navigation/Actions.java