Znuny

Znuny is an extension that helps you to make Znuny development easier, faster and more error-free.

RepositoryGitHubVisual Studio Marketplace
GitHub release (latest by date)GitHub open issues GitHub closed issuesVisual Studio Marketplace last-updated Visual Studio Marketplace Version
GitHub licenseGitHub pull requests GitHub closed pull requestsVisual Studio Marketplace Rating release-date
GitHub language countGitHub contributorsVisual Studio Marketplace Rating (Stars) Visual Studio Marketplace Rating
GitHub code size in bytesGitHub downloadsVSC marketplace download VSC marketplace install
VersionsStatus
GitHub label version GitHub label version GitHub label version
GitHub label version GitHub label version
GitHub commits since tagged version GitHub Workflow Lint Snippet GitHub Workflow Pages

Features


Snippets

Snippets Total Counter

Znuny code snippets for fast, consistent and error free coding.

Snippets

Static

Snippets Static Counter

Statically created snippets.

  • CodePolicy
  • ConfigXML
  • Customizing
  • Debugging
  • DynamicFields
  • GitLab
  • Language
  • Licensing
  • Needed
  • Perl
  • POD
  • Scaffolding
  • Selenium
  • SOPM
  • VariableCheck

Generated

Snippets Generated Counter

Snippets created generically using the existing Perl POD.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
snippets

└───Functions
   └───ConfigObject
          $ConfigObject->Get()
          $ConfigObject->Set()
   
   └───TicketObject
           $TicketObject->TicketGet()
           $TicketObject->TicketSearch()
           ...

└───Modules
       AgentTicketZoom
       CustomerTicketOverview
       ...

└───ObjectManager
        ConfigObject
            my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
        TicketObject
            my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');
        ...

AddFolderToWorkspace

This Function provides a searchable list of folders (Workspaces) that can be added to the current VSC Workspace. All configured folders will be displayed.

1
2
3
    Of course, you can use the already built-in function:
    `Workspaces: Add Folder To Workspace...` (workbench.action.addRootFolder).
    But then you have to click through all the folders again and again.

Shortcut: strg + alt + z, p
Command: Znuny: Add Folder to Workspace.

AddFolderToWorkspace

Settings

Preferences -> Settings -> Extensions -> Znuny

NameDescriptionDefault Value
znuny.addFolderToWorkspace.workspacesProvides a list of folders (Workspaces) that can be added to the current VSC Workspace./Users/
znuny.addFolderToWorkspace.recursiveWorkspacesProvides a searchable (only first level) list of folders (Workspaces) that can be added to the current VSC Workspace./Users/

RemoveFolderFromWorkspace

This Function provides a searchable list of folders (Workspaces) that can be removed simultaneous from the current VSC Workspace. All current open folders are displayed.

Shortcut: strg + alt + z, shift + p
Command: Znuny: Remove Folder from Workspace.

RemoveFolderFromWorkspace


Customizer

This function fetches Znuny files from GitHub and adds origin to header.

1
# $origin: Znuny - 7775216b80452a6ce2267812a25bf23ae786ae57 - Kernel/System/Ticket.pm

Shortcut: strg + alt + z, c
Command: Znuny: Fetch Znuny files from GitHub.

Opens a project, branch and file selection list to chose a framework or addon file from. The file will get fetched live from the selected GitHub branch and added to the (selected) folder. The origin tag will be added automatically to the file header for you. The file will also be automatically added to the ‘Custom/’ directory in case it’s a file with one of the file extensions ‘.pm’, ‘.dtl’ or ‘.tt’. If the copyright is set in the settings, it will be added as well.

The GitHub API is limited to 60 requests per hour for non authorized requests. If you need more requests, please create an issue on the use of credentials.

The following steps are performed one after the other.

1. Znuny - Customizer (1/5): Fetching GitHub repositories.

1
2
    This function allows you to search for GitHub owners or GitHub repositories.
    The search results (owner/repository) are then displayed.

2. Znuny - Customizer (2/5): Fetching branches.

1
    After selecting the repository, all possible branches are displayed.

3. Znuny - Customizer (3/5): Fetching files.

1
    After that, select the desired file.

4. Znuny - Customizer (4/5): Fetching destination folder.

1
    Finally, the destination folder must be selected.

5. Znuny - Customizer (5/5): Added file.

1
    `Hocus Pocus` - The file was created at the desired location.

Settings

Preferences -> Settings -> Extensions -> Znuny

NameDescriptionDefault Value  
znuny.customizer.copyrightZnuny Customizer Copyright. This Copyright will be added to the Customizer file under the Znuny Copyright.   
znuny.customizer.repositoriesList of possible GitHub repositories.ZnunyFAQ

Customizer


GenerateFilelist

Inserts the SOPM Filelist content containing all files of a selectable project.
The following file types will be added: pm | tt | t | xml | js | html.tmpl

The function can be executed only in the .sopm file.

Shortcut: strg + alt + z, f
Command: Znuny: Insert Filelist to SOPM.

Settings

Preferences -> Settings -> Extensions -> Znuny

NameDescriptionDefault Value
znuny.generateFilelist.modeZnuny Generate Filelist Mode is used in GenerateFilelist function.
It defines how the file list should be generated.

File => Adds only every single file without <Filelist>.
Filelist => Adds the complete filelist with <Filelist>.
File

GenerateFilelist


ObjectDependencies

This function inserts the @ObjectDependencies array by parsing the file content. Only regular used OM (ObjectManager) calls are supported.

Shortcut: strg + alt + z, d
Command: Znuny: Insert @ObjectDependencies.

ObjectDependencies


QuoteWithMarker

This function quotes the selected area and adds a custom marker to it.

QuoteWithMarker can be very useful especially for custom files Custom/**.

Shortcut: strg + alt + z, q
Command: Znuny: Quote with Marker.

Works for the following languages: | LanguageID | LineComment | | ----------------------- | ----------- | | bat | @REM | | clojure | ;; | | coffeescript | # | | c | // | | cpp | // | | cuda-cpp | // | | csharp | // | | CSS | | | dart | // | | diff | # | | dockerfile | # | | fsharp | // | | git-commit | # | | git-rebase | # | | ignore | # | | go | // | | groovy | // | | handlebars | | | hlsl | // | | HTML | | | ini | ; | | plaintext | # | | java | // | | javascriptreact | // | | JavaScript | // | | jsx-tags | | | json | // | | jsonc | // | | jsonl | // | | julia | # | | tex | % | | latex | % | | cpp_embedded_latex | // | | markdown_latex_combined | | | less | // | | lua | -- | | makefile | # | | Markdown | | | objective-c | // | | objective-cpp | // | | perl | # | | perl6 | # | | php | // | | powershell | # | | jade | //- | | python | # | | r | # | | razor | | | restructuredtext | .. | | ruby | # | | rust | // | | SCSS | // | | shaderlab | // | | shellscript | # | | sql | -- | | swift | // | | TypeScript | // | | typescriptreact | // | | vb | ' | | xml | | | xsl | | | dockercompose | # | | yaml | # |

Settings

Preferences -> Settings -> Extensions -> Znuny

NameDescriptionDefault Value
znuny.quoteWithMarker.codeMarkerZnuny Code Marker used in QuoteWithMarker function.Znuny

QuoteWithMarker


StatusBar

The status bar gets an additional Znuny item and the entire status bar is displayed in the Znuny color #ff9b00
if the active file is a “Znuny file”.

  • If the active file belongs to a Znuny framework (“Znuny file”) in the workspace, the product name and version are displayed from the RELEASE file.
  • If the active file belongs to a Znuny package (“Znuny file”) in the workspace, the vendor and the largest framework version are displayed from the SOPM file.

The status bar is updated with every active file change.

Shortcut: strg + alt + z, v
Command: Znuny: Show Znuny Version.

Settings

Preferences -> Settings -> Extensions -> Znuny

NameDescriptionDefault Value
znuny.statusBar.enabledDefines when the StatusBar should be updated.

On: Always active.
On Command: Activated only by a command.
On ChangeActiveTextEditor: Activated only by change of active TextEditor.
Off: Not active.
On
znuny.statusBar.statusBar.backgroundZnuny Status Bar background color.#ff9b00
znuny.statusBar.statusBar.foregroundZnuny Status Bar foreground color.#000000
znuny.statusBar.statusBar.foregroundZnunyZnuny Status Bar foreground color for Znuny Version Item.#ffffff
znuny.statusBar.statusBarItem.hoverBackgroundZnuny Status Bar hoverBackground color.#ffc062

StatusBar


Installation

To install this extension, you have three options:

1. Search Extension in Marketplace

Search and install online extension via VSC extensions menu.

Code -> Preferences -> Extensions simply search for Znuny to install.

2. Install via vsix file

Download latest vsix file and install via extensions menu.

Code -> Preferences -> Extensions -> Views and More Action -> Install from VSIX.

3. Source code

Download archive with the latest release and unpack it to VisualStudioCode extensions folder $HOME/.vscode/extensions/.


Download

For download see VSCode-Znuny


Enjoy!

Your Denny Korsukéwitz 🚀