Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
#2016181: added short description
Browse files Browse the repository at this point in the history
  • Loading branch information
rH4rtinger committed Mar 8, 2023
1 parent 2a57143 commit 86eb904
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.netbeans.modules.lsp.client.spi.ServerRestarter;
import org.openide.awt.*;

import javax.swing.*;
import javax.swing.text.JTextComponent;
import java.awt.event.ActionEvent;

Expand All @@ -20,7 +21,7 @@
@ActionReference(path = "Editors/text/javascript/Toolbars/Default", position = 20220)
})
@ActionID(category = "adito/editor/toolbar", id = "de.adito.aditoweb.nbm.nodejs.impl.actions.RestartLSP")
@ActionRegistration(displayName = "Restart the server that provides autocomplete, go-to actions and other features for js/ts files",
@ActionRegistration(displayName = "Restart LSP",
iconBase = "de/adito/aditoweb/nbm/nodejs/impl/actions/restart.svg", lazy = false)
public class RestartLSPAction extends BaseAction
{
Expand All @@ -30,8 +31,9 @@ public class RestartLSPAction extends BaseAction
*/
public RestartLSPAction()
{
super("Restart the server that provides autocomplete, go-to actions and other features for js/ts files");
super("Restart LSP");
putValue(BaseAction.ICON_RESOURCE_PROPERTY, "de/adito/aditoweb/nbm/nodejs/impl/actions/restart.svg");
putValue(Action.SHORT_DESCRIPTION, "Restart the server that provides autocomplete, go-to actions and other features for js/ts files");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ void testConstructor()
{
RestartLSPAction restartLSPAction = new RestartLSPAction();

Map<String, Object> expected = Map.of("Name", "Restart the server that provides autocomplete, go-to actions and other features for js/ts files",
"IconResource", "de/adito/aditoweb/nbm/nodejs/impl/actions/restart.svg");
Map<String, Object> expected = Map.of("Name", "Restart LSP",
"IconResource", "de/adito/aditoweb/nbm/nodejs/impl/actions/restart.svg",
"ShortDescription", "Restart the server that provides autocomplete, go-to actions and other features for js/ts files");

Map<String, Object> actual = new HashMap<>();
// Transforming all key - values in the restartAction
Expand Down

0 comments on commit 86eb904

Please sign in to comment.