pod afExplorer

(Internal) A Reflux file explorer application with reusable editors and viewers

Mixins

Explorer

(Service) - The main service API for Explorer operations.

FilePopupMenu

(Service) - Populates the content menu / popup menu for folder resources.

FolderPopupMenu

(Service) - Populates the content menu / popup menu for folder resources.

Classes

FandocResource

(Resource) - Represents Fantom API documentation.

FandocViewer

(View) - A viewer for .fandoc files.

FileResource

(Resource) - Represents a file on the file system or a pod resource.

FolderResource

(Resource) - Represents a folder on the file system.

HtmlViewer

(View) - A HTML viewer for HTTP and file resources.

HttpResource

(Resource) - Represents a resource available on the Internet.

ImageViewer

(View) - A simple image viewer for file resources.

Main

Use to launch the Explorer application from the command line.

TextEditor

(View) - A text editor with syntax highlighting.

Overview

Explorer is a support library that aids Alien-Factory in the development of other libraries, frameworks and applications. Though you are welcome to use it, you may find features are missing and the documentation incomplete.

Explorer is a file explorer application based on the Reflux framework. More than an application, Explorer also provides reusable Views and Editors. Explorer may also be enhanced through the use of Plugins.

Current features:

  • System file explorer
  • Fantom documentation viewer
  • A better web browser / html viewer
  • Fandoc file viewer
  • Text editor (borrowed from fluxText)
  • Syntax highlighting (uses syntax)

The small things that make me use it:

  • Quick view / edit toggling with F12
  • Easily show / hide hidden files
  • Text editor word wrapping (configurable)
  • Address bar accepts pod names, e.g. afIoc

Install

Install Explorer with the Fantom Repository Manager ( fanr ):

C:\> fanr install -r http://repo.status302.com/fanr/ afExplorer

To use in a Fantom project, add a dependency to build.fan:

depends = ["sys 1.0", ..., "afExplorer 0.0"]

Documentation

Full API & fandocs are available on the Status302 repository.

Quick Start

Simply start Explorer from the command line:

C:\> fan afExplorer

[afIoc] Adding module definition for afReflux::RefluxModule
[afIoc] Adding module definition for afExplorer::ExplorerModule
   ___    __                 _____        _
  / _ |  / /_____  _____    / ___/__  ___/ /_________  __ __
 / _  | / // / -_|/ _  /===/ __// _ \/ _/ __/ _  / __|/ // /
/_/ |_|/_//_/\__|/_//_/   /_/   \_,_/__/\__/____/_/   \_, /
                                     Explorer v0.0.4 /___/

IoC Registry built in 216ms and started up in 10ms

Example Screenshot

Explorer may optionally be started with a list of URIs to be opened up in tabs:

C:\> fan afExplorer C:\Temp

C:\> fan afExplorer http://www.fantomfactory.org/

C:\> fan afExplorer afIoc::Registry

Usage

Following Reflux browser behaviour, entering valid URIs in the address bar will bring up an associated View for that resource.

If there are multiple Views available for the resource, a drop down will appear in the address bar allowing you to toggle between them:

View Dropdowns

You may also specify the view by adding a query parameter to the URI:

file:/C:/Projects/Explorer/pod.fdoc?view=afExplorer::TextEditor

You may also specify a URI to be opened in a new tab, regardless of if the view is configured for re-use or not:

file:/C:/Projects/Explorer/pod.fdoc?newTab=true

File Explorer

Explorer may be used to explore your file system using the file: scheme. URIs should be absolute and the path should begin with a /.

file:/C:/Projects/Explorer/

You may also enter an OS specific path:

C:\Projects\Explorer

Files may be opened up in a:

  • Text Editor
  • HTML Viewer
  • Fandoc Viewer
  • Image Viewer

Web Browser

Explorer may also be used as a (basic) web browser by entering a http: scheme:

Web Browser

Fandoc Viewer

Explorer can view all the Fantom documentation held in the current Fantom installation. This includes all the API docs for all the installed pods. It uses a fandoc: scheme with the following format:

fandoc:/<pod>/<type>/<slot>

fandoc:/afReflux/View/onLoad

The address bar also accepts simple fandoc notation (case insensitive):

afReflux

afReflux::View

Fandoc Viewer

TIP: Press F1 at anytime to being up the Fandoc index.

Plugins

Exoplorer may be customised though Plugins.

A plugin is any Fantom pod that defines an index property of afExplorer.module, the value of which should be the qualified type name an IoC AppModule.

index = [ "afExplorer.module" : "myExplorerPlugin::PluginModule" ]

On startup, Explorer scans the current Fantom installation for these pods and automatically adds them to its IoC module list. These plugin modules may then configure anything a reflux application can.

Release Notes

v0.0.10

  • Chg: Zipping a directory now displays a progress dialogue - which is updated with bytes compressed.
  • Bug: HTMLViewer sometimes displayed a blank page when switching views.

v0.0.8

  • Chg: Uses Reflux v0.0.6 and RefluxBuilder.
  • Bug: Refreshing a root folder caused a NullErr.

v0.0.6

  • Bug: Empty fandoc:/ URI did not resolve.

v0.0.4

  • New: Explorer Plugins!
  • New: Compress to .zip command.
  • New: Added Edit preferences commands.
  • New: Added a Select All global command, enabled in the Text Editor.
  • New: Ctrl+Select in Folder Panel will open folder in new tab.
  • New: Small images use a thumbnail preview as their icon.
  • New: Added configurable FilePopupMenu and FolderPopupMenu services.
  • New: Allow multiple TextEditor preferences, one per file extension.
  • Chg: All dialogs are routed through the new Reflux Dialogues class.
  • Chg: Folder sort in Folder view is reset when displaying new folder.
  • Chg: ImageViewer uses the resource's icon as its icon.
  • Chg: Single file copy / paste handle duplicate names.
  • Chg: Better fandoc URI resolving, checks for type existance.
  • Bug: Show / hide hidden file command now shows and hides hidden files in the Folders Panel (again!)
  • Bug: Folders Panel favourites combo was displayed squashed when panel re-shown.
  • Bug: Folders Panel did not pick up folder deletes / renames.
  • Bug: Explorer was not picking up the correct preferences file.
  • Bug: Delete button didn't always work in TextEditors - a global command thing.

v0.0.2

  • New: Initial release.