示例#1
0
 private MacroDescriptor create(
     final MacroKey macroKey,
     final String displayName,
     final String description,
     final Form form) {
   return MacroDescriptor.create()
       .key(macroKey)
       .displayName(displayName)
       .description(description)
       .form(form)
       .icon(IconLoader.loadIcon(this.getClass(), MACRO_DESCRIPTORS_FOLDER, macroKey.getName()))
       .build();
 }
示例#2
0
 public MacroDescriptor getByKey(final MacroKey key) {
   if (!ApplicationKey.SYSTEM.equals(key.getApplicationKey())) {
     return null;
   }
   return macrosByName.get(key.getName().toLowerCase());
 }