Semmle 1.20
Skip to end of metadata
Go to start of metadata

This topic describes how to change the display name for a project used by client applications.

Overview

By default, the directory name of each project is displayed in client applications as the project name. Sometimes you may want to override this default name with a more descriptive name. There are two ways to override the project name:

  • Define an alternative name in the project file using the displayName element – this provides an alternative name that will be used in all dashboards that include the project.
  • Override the project name in a specific dashboard using a @renameProject or @projectLayout directive in the dashboard Configuration file – this provides an alternative name that will be used only in the dashboard edited.

It is recommended that you choose one of these approaches rather than trying to use both for the same project.

Define an alternative name in the project file

This is the easiest method for changing the name of a project on a global basis. It ensures that the project is displayed with the new name in all dashboards that do not explicitly rename the project.

You can edit the project file using your preferred text editor.

To define an alternative project name using <displayName>
  1. Open the project file for editing, for example: odasa/projects/AppOne/project
  2. Before the autoupdate element, add a displayName element that specifies the desired project name. For example, to give the project the name "Application One" you might write:

    <project language="java">
      <ram>2048</ram>
      <timeout>600</timeout>
      <displayName>Application One</displayName>
      <autoupdate> ... 
  3. Save the project file.

When dashboards that include this project are rebuilt, the project will be displayed with the new name of "Application One".

Overriding the display name in a dashboard

This method allows you to override the name of a project in a specific dashboard.

You can edit the dashboard Configuration file using your preferred text editor.

To define an alternative project name using @renameProject
  1. Open the dashboard Configuration file for editing, for example: odasa/dashboards/AllApps/Configuration
  2. At the start of the file (before the analysis block), add a @renameProject directive that specifies the desired project name. For example, to rename the project from "AppOne" to "Application One" you might write:

    @renameProject "AppOne" "Application One"
     
    ${semmle_data}/projects/AppOne/*
    ...
  3. Save the Configuration file.

When this dashboard is rebuilt, the project will be displayed with the new name of "Application One". In all other dashboards, the default name of "AppOne" will still be displayed.