Active Connection

There are many ways how you can connect to a KDB instance, and the fastest one is to use active ‘Kdb Connection’ combobox in the toolbar:

toolbarConnectionBox

The ComboBox contains a list of active connections which you can switch between as well as a list of disconnected instances since the last IDEA restart:

toolbarConnectionList

Another feature of the ‘Kdb Connection’ toolbox is searching or filtering instances by typing its name or URI:

toolbarConnectionFiltering

And the last one ability is to just create a new connection for non-exist instance by typing its full URI:

toolbarConnection

and you can create a free configured instance with default settings, or you can select a Scope which new instance will belong to. In the last case, the Scope parameters, like credentials and encoding, will be used.

Scopes

New Scope

Kdb Instances’ or ‘Scope Manager’ is a tool windows located at the top right:

scopesEmpty

All scopes and instances created in a scope as stored in IDEA configuration files and can belong to a project or shared across many projects.

You can create new scope by ‘Create New Scope’ button in the middle of the tool windows you use or right-click on the tool windows tab to open a menu for scopes management as well as for importing a scope or exporting the current one.

scopesMenu

You also can use the appropriate button in the tool windows toolbar to load Scopes Management dialog.

If someone in your team already uses the plugin, you can ask her or him to export required scopes and import it on your side.

Scope Dialog

The Scope Dialog is the main and only one place where you can manager your scopes:

scopesDialog

There are two types of scopes:

  • Local - a local scope configuration and all defined instances are stored only in the project configuration file. If you’d like to use the same scope in another project, you have export and import the scope or make it shared
  • Shared - a shared across all project (where the plugin is enabled by adding new module or framework) scope. Configuration files and defined instances are stored in the IDEA configuration files instead of a project and changing the scope content affects all projects.

You can change a scope type just by clicking on checkbox next to the scope name.

Each scope contains can redefine default authentication parameters as well as connection options.

Each scope defined in the Scope Dialog is shown as a separate tab in the tool window: scopesTabs

Scope Import/Export

Any scope can be exported into XML file: scopesExport

One thing to remember: when you export your scope, you should explicitly approve if you’d like to export all credentials as well, or they must be ignored: scopesExportWarn

Instances

Instances Tree

You can organize instances inside a scope in a tree-link structure for simpler organization. Just use the toolbar or right-click to get the menu:
instancesMenu

You can use drag-and-drop to manage the InstancesTree. You can hold Ctrl button at dragging time to create a copy.

Highlighting Severity

If some of your instances are more important, and you’d like to protect yourself from mistakes, you can mark such instances or a subtree with all instances by a color:

severityMenu

After a color selection:

  • all instances in the Instances View will be marked with the color

  • the same color will be used in Connection ComboBox:
    severityCombobox

  • and the same color will be used to mark Console tab in Kdb Console:
    severityConsole

You can disable console background coloring in the plugin options if you don’t like it and leave only the Console tab color:

severityDisableBackground

Searching and Replacing

If your InstancesTree is quite big, you can straggle with finding required instance. There are two options that you can use to search and one to replace instance parameters in the InstancesTree:

  • Quick Search the search is activated by Ctrl+F or from the context menu or starting typing when the InstancesTree component has focus:

instancesQuickSeach

In this mode, a space is used as a tokens’ separator and an instance that contains all the tokens will be selected and highlighted. You can use arrows up and down to move over found instances.

  • Search by Parameters is activated by Ctrl+Shift+F or from the context menu and is stricter than quick search functionality as search by the instance name or address and using a matching case, whole world or RegEx instancesSeachByParameters

  • Replace by Parameters is activated by Ctrl+Shift+R or from the context menu and additionally to Search by Parameters allows replacing found parameters

instancesReplaceByParameters

Additional filter allows to search/replace in only in the name or in the address, if required.

instancesReplaceByParametersFilter

Instances Import/Export

Apart from Importing/Exporting whole scope, you also can Import/Export an instance or a subtree from the context menu:

instancesIE

Export is done in the same format as a scope exporting, and any scope can be imported as a subtree of another scope, if required.

You also can import data from another application. Please check Import->Import from … submenu of the context menu to get list all supported formats.

Connections

Double-click on any instance in the tree open connection to the instance. If an instance is already connected, it will be activated.

Connected instances market with bold text and last status and update time shown in the tree.

Failed instances (connection was lost or can’t be created) highlighted with red color.

File format

A scope Import/Export file format is XML-based and is very simple. The file can be generated from any application and imported into the InstancesTree:

An example of the file:

<scopes>
  <scope name="Local Instances" type="LOCAL">
    <package name="prod" color="#ffecec">
      <instance name="`:localhost:9090" host="localhost" port="9090" />
    </package>
    <package name="uat">
      <instance name="`:localhost:9090" host="localhost" port="9090" />
      <instance name="`:localhost:9091" host="localhost" port="9091" />
    </package>
  </scope>
</scopes>