Skip to content

Commit 6adcff7

Browse files
committed
[structural view] pluralize stereotype labels
1 parent 34f1fb0 commit 6adcff7

File tree

2 files changed

+11
-3
lines changed
  • headless-services/spring-boot-language-server

2 files changed

+11
-3
lines changed

headless-services/spring-boot-language-server/pom.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@
164164
<artifactId>commons-text</artifactId>
165165
</dependency>
166166

167+
<!-- stereotype support, especially for the new logical structure view -->
168+
167169
<dependency>
168170
<groupId>org.jmolecules.integrations</groupId>
169171
<artifactId>jmolecules-stereotype</artifactId>
@@ -176,6 +178,11 @@
176178
<version>0.30.0-STEREOTYPE-SNAPSHOT</version>
177179
</dependency>
178180

181+
<dependency>
182+
<groupId>org.atteo</groupId>
183+
<artifactId>evo-inflector</artifactId>
184+
<version>1.3</version>
185+
</dependency>
179186

180187
<dependency>
181188
<groupId>org.eclipse.lemminx</groupId>
@@ -196,7 +203,7 @@
196203
</exclusion>
197204
</exclusions>
198205
</dependency>
199-
206+
200207
<!-- Test harness -->
201208
<dependency>
202209
<groupId>org.springframework.boot</groupId>
@@ -389,7 +396,7 @@
389396
</resources>
390397
</configuration>
391398
</execution>
392-
<!--
399+
<!--
393400
<execution>
394401
<id>copy-license-files</id>
395402
<phase>process-classes</phase>

headless-services/spring-boot-language-server/src/main/java/org/springframework/ide/vscode/boot/java/commands/JsonNodeHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.util.function.BiConsumer;
2424
import java.util.function.Consumer;
2525

26+
import org.atteo.evo.inflector.English;
2627
import org.jmolecules.stereotype.api.Stereotype;
2728
import org.jmolecules.stereotype.tooling.LabelProvider;
2829
import org.jmolecules.stereotype.tooling.MethodNodeContext;
@@ -61,7 +62,7 @@ public JsonNodeHandler(LabelProvider<A, StereotypePackageElement, StereotypeClas
6162
@Override
6263
public void handleStereotype(Stereotype stereotype, NodeContext context) {
6364
addChild(node -> node
64-
.withAttribute(TEXT, labels.getSterotypeLabel(stereotype))
65+
.withAttribute(TEXT, English.plural(labels.getSterotypeLabel(stereotype)))
6566
.withAttribute(ICON, StereotypeIcons.getIcon(stereotype))
6667
);
6768
}

0 commit comments

Comments
 (0)