001package jmri.jmrit; 002 003import java.util.Locale; 004import jmri.util.startup.AbstractStartupActionFactory; 005import jmri.util.startup.StartupActionFactory; 006import org.openide.util.lookup.ServiceProvider; 007 008/** 009 * 010 * @author Randall Wood Copyright 2020 011 */ 012@ServiceProvider(service = StartupActionFactory.class) 013public final class ToolsStartupActionFactory extends AbstractStartupActionFactory { 014 015 @Override 016 public String getTitle(Class<?> clazz, Locale locale) throws IllegalArgumentException { 017 if (clazz.equals(MemoryFrameAction.class)) { 018 return Bundle.getMessage(locale, "StartMemoryFrameAction"); 019 } else if (clazz.equals(XmlFileValidateAction.class)) { 020 return Bundle.getMessage(locale, "XmlFileValidateAction"); 021 } 022 throw new IllegalArgumentException(clazz.getName() + " is not supported by " + this.getClass().getName()); 023 } 024 025 @Override 026 public Class<?>[] getActionClasses() { 027 return new Class[]{MemoryFrameAction.class, XmlFileValidateAction.class}; 028 } 029 030}