package com.axonivy.ivy.process.element.rule.ui;

import java.net.URL;
import java.util.Locale;

import com.axonivy.ivy.process.element.rule.DecisionProcessElement;

import ch.ivyteam.ivy.designer.process.ui.editor.palette.IIvyProcessPalette;
import ch.ivyteam.ivy.designer.process.ui.info.IBpmnProcessElementUi;

public class DecisionProcessElementUi implements IBpmnProcessElementUi
{
  private static final String RULE_GROUP = "Rule";
  
  @Override
  public void addPaletteGroup(IIvyProcessPalette palette)
  {
    palette.addGroup(RULE_GROUP, "Rules", 11000);
  }

  @Override
  public void addPaletteEntry(IIvyProcessPalette palette, String name)
  {
    palette.addProcessElementEntry(RULE_GROUP, name, 1000);
  }
  
  @Override
  public String getName()
  {
    return DecisionProcessElement.DECISION_ACTIVITY;
  }
  
  @Override
  public String getShortName(Locale locale)
  {
    return "Decision";
  }

  @Override
  public String getName(Locale locale)
  {
    return "Decision Table Activity";
  }

  @Override
  public String getDescription(Locale locale)
  {
    return "Executes a DMN table";
  }

  @Override
  public URL getIcon()
  {
    return getClass().getResource("DecisionActivity.png");
  }
  
  @Override
  public boolean showDefaultTabs()
  {
    return true;
  }
  
  @Override
  public String getHelpPath()
  {
    return "https://github.com/ivy-supplements/bpm-beans/blob/master/rule-beans/README.MD";
  }
}

@@ -431,19 +431,17 @@
 %22Rule%22;%0A
-  
 %0A
+
   @Overr
@@ -663,30 +663,16 @@
 ette.add
-ProcessElement
 Entry(RU
@@ -694,27 +694,25 @@
  1000);%0A  %7D%0A
-  
 %0A
+
   @Override%0A
@@ -794,27 +794,25 @@
 TIVITY;%0A  %7D%0A
-  
 %0A
+
   @Override%0A
@@ -1185,27 +1185,25 @@
 .png%22);%0A  %7D%0A
-  
 %0A
+
   @Override%0A
@@ -1262,18 +1262,16 @@
 ue;%0A  %7D%0A
-  
 %0A  @Over

Use new API for process element extension