Package de.innovationgate.wga.common.beans.csconfig.v2

Examples of de.innovationgate.wga.common.beans.csconfig.v2.Shortcut


   
        bind(form, SWTBinder.BINDING_STRATEGY_AS_YOU_TYPE);
  }

  private void handleAddShortcut() {
    Shortcut shortcut = new Shortcut()
    shortcut.setShortcut("");
    shortcut.setReference("");
    shortcut.setType(ShortcutType.TYPE_PLUGIN);
    _shortcutsModel.add(shortcut);
  }
View Full Code Here


        CSConfig csconfig = (CSConfig) db.getAttribute(DBATTRIB_CSCONFIG);
        if (csconfig != null && csconfig instanceof de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) {
            de.innovationgate.wga.common.beans.csconfig.v2.CSConfig v2 = (de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) csconfig;
            Iterator shortcuts = v2.getShortcuts().iterator();
            while (shortcuts.hasNext()) {
                Shortcut shortcut = (Shortcut) shortcuts.next();
                if (shortcut.getType() == Shortcut.TYPE_ITEM_MAPPING ||
                    shortcut.getType() == Shortcut.TYPE_META_MAPPING ||
                    shortcut.getType() == Shortcut.TYPE_PLUGIN) {
                    Map<String, String> mappings = (Map<String, String>) (shortcut.getType() == Shortcut.TYPE_ITEM_MAPPING ? itemMappings :
                                          shortcut.getType() == Shortcut.TYPE_META_MAPPING ? metaMappings :
                                                                                             pluginShortcuts);
                    mappings.put(shortcut.getShortcut(), shortcut.getReference());
                }
            }
        }
    }
View Full Code Here

               
                // Add TMLScript global shortcuts
                de.innovationgate.wga.common.beans.csconfig.v2.CSConfig v2 = (de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) csConfig;
                Iterator shortcuts = v2.getShortcuts().iterator();
                while (shortcuts.hasNext()) {
                    Shortcut shortcut = (Shortcut) shortcuts.next();
                    if (shortcut.getType() == Shortcut.TYPE_TMLSCRIPT_GLOBAL) {
                        getTmlscriptGlobalRegistry().registerGlobal(new TMLScriptGlobal(shortcut.getShortcut(), TMLScriptGlobal.TYPE_PACKAGE_OR_CLASS, shortcut.getReference()));
                    }
                }
               
            }
           
View Full Code Here

        if (_csConfig instanceof de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) {
            de.innovationgate.wga.common.beans.csconfig.v2.CSConfig v2 = (de.innovationgate.wga.common.beans.csconfig.v2.CSConfig) _csConfig;
            Iterator<Shortcut> shortcuts = v2.getShortcuts().iterator();
            while (shortcuts.hasNext()) {
                Shortcut shortcut = shortcuts.next();
                if (WGUtils.isEmpty(shortcut.getShortcut())) {
                    errors.add(new ValidationError("A shortcut has no name", new String[] { "shortcuts" }));
                }
                else if (WGUtils.isEmpty(shortcut.getReference())) {
                    errors.add(new ValidationError("The shortcut '" + shortcut.getShortcut() + "' has no reference", new String[] { "shortcuts" }));
                }
                else if (shortcut.getType() == Shortcut.TYPE_TMLSCRIPT_GLOBAL) {
                    if (!Character.isUpperCase(shortcut.getShortcut().charAt(0))) {
                        errors.add(new ValidationError("The TMLScript global shortcut '" + shortcut.getShortcut() + "' must start with an uppercase letter.", new String[] { "shortcuts" }));
                    }
                }

            }
        }
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.common.beans.csconfig.v2.Shortcut

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.