Commit 660b6a1f authored by Adrien's avatar Adrien Committed by Romain Bioteau

feat(explorer) display pool version in explorer (#1477)

parent 241ea3a7
......@@ -52,19 +52,19 @@ public abstract class ListProcessContributionItem extends CompoundContributionIt
.map(DiagramFileStore.class::cast);
if (fileStore.isPresent()) {
return fileStore.get().getProcesses().stream()
.map(process -> createContributionItem(process, fileStore.get()))
.map(this::createContributionItem)
.collect(Collectors.toList()).toArray(new IContributionItem[0]);
}
return new IContributionItem[0];
}
protected IContributionItem createContributionItem(AbstractProcess process, DiagramFileStore fileStore) {
private IContributionItem createContributionItem(AbstractProcess process) {
return new ContributionItem() {
@Override
public void fill(Menu menu, int index) {
MenuItem item = new MenuItem(menu, SWT.PUSH);
item.setText(process.getName());
item.setText(String.format("%s (%s)", process.getName(), process.getVersion()));
item.addListener(SWT.Selection, createSelectionListener(process));
}
};
......
......@@ -96,7 +96,7 @@ public class ProjectExplorerDiagramIT {
bot.waitUntil(projectExplorerBot.contextMenuAvailable(diagramTreeItem, action));
SWTBotMenu contextMenu = diagramTreeItem.contextMenu(action);
assertThat(contextMenu.menuItems()).hasSize(1);
assertThat(contextMenu.menuItems().get(0)).isEqualTo(poolName);
assertThat(contextMenu.menuItems().get(0)).isEqualTo(String.format("%s (%s)", poolName, DEFAULT_VERSION));
}
private void deployDiagramFromExplorer(String diagramName, String poolName) throws Exception {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment