@Nullable
		public static ResourceModel from(@Nonnull WorkspaceResource resource) {
			if (resource instanceof WorkspaceFileResource fileResource) {
				FileInfo fileInfo = fileResource.getFileInfo();
				Path inputPath = InputFilePathProperty.get(fileInfo);
				if (inputPath != null)
					return new ResourceModel(StringUtil.pathToAbsoluteString(inputPath));
				return new ResourceModel(fileInfo.getName());
			} else if (resource instanceof WorkspaceDirectoryResource fileResource) {
				return new ResourceModel(StringUtil.pathToAbsoluteString(fileResource.getDirectoryPath()));
			} else if (resource instanceof GeneratedPhantomWorkspaceResource) {
				// Intentionally left out
				return null;
			}
			throw new UnsupportedOperationException("Cannot serialize content source of type: " +
					resource.getClass().getName());
		}
@param resource
		Some resource sourced from a file or directory.

@return Representation of the content source.
recaf-ui/src/main/java/software/coley/recaf/ui/config/RecentFilesConfig.java