Options
All
  • Public
  • Public/Protected
  • All
Menu

Module project

Support for extending the project system. This library provides support for automatically tracking extensions registered with the project system so that they can be unregistered automatically. It also imports the entire arkham.project package into your script's namespace.

Include this library by adding useLibrary("project") to your script. See the plug-in authoring kit for examples that use this library.

Index

Type aliases

Actions

The registry of all actions that can be performed on project members.

File

Class representing a file or folder on the computer.

Member

Class representing a member of a project (file in a project folder).

Open

The task used to open project files, which can be extended for new file types.

Project

Class representing a project.

ProjectUtilities

Collection of utility functions that make implementing project extensions easier.

ProjectUtils

ProjectUtils: ProjectUtilities

Alias for ProjectUtilities. (This matches the naming convention of other script utility objects.)

Task

Class representing a project-related task.

TaskAction

Class representing an action that can be performed in a project.

Variables

Const ActionRegistry

ActionRegistry: TrackedRegistry<TaskAction>

A tracked registry of task actions. When registering a new action, you can pass the action's priority as a second argument. The priority determines the action's position in the project context menu. The default is Actions.PRIORITY_DEFAULT.

Const MetadataRegistry

MetadataRegistry: TrackedRegistry<"arkham.project.MetadataSource">

A tracked registry of project file metadata sources. A metatdata source provides metadata for a particular file type. This includes the icon used for the file type in the project view, and the information listed on the Properties tab when files of that type are selected.

Const NewActionRegistry

A tracked registry of child actions of the New action. A new action is used to create a new file of given type. These actions appear as subitems of the New menu in a project. The register function takes a task action and (optionally) an action, or the name of an action, that this action should be inserted after.

Const NewTaskTypeRegistry

NewTaskTypeRegistry: TrackedRegistry<"arkham.project.NewTaskType">

A tracked registry of new task types. New task types are used to add support for new kinds of task folders.

Const OpenerRegistry

OpenerRegistry: TrackedRegistry<"arkham.project.Open.InternalOpener">

A tracked registry of internal openers. Internal openers are used by the Open action to open files inside of the application. A new internal opener can be used to add support for opening new kinds of files.

Functions

testProjectScript

  • testProjectScript(): void
  • Helps test a plug-in script that extends the project system. When called, it runs your script's run() function, then creates a button an Unregister button in the app interface. You can then test your new project functionality. On clicking Unregister, the button is removed and your script's unload() function is called.

    When developing a project plug-in, it is important to unregister changes you make to the project system before re-running your script, because many elements in the project system can only be registered once. For example, only one task action with a given name can be registered at a given time.

    Returns void

unregisterAll

  • unregisterAll(): void
  • Calls the unregisterAll method of every TrackedRegistry that has been created by the script that included this library. This is typically called in the unload() function of a plug-in that extends the project system.

    Returns void