Package org.jboss.ide.eclipse.freemarker.configuration

Examples of org.jboss.ide.eclipse.freemarker.configuration.MacroLibrary


      MacroInstance instance = (MacroInstance) item;
      int index = instance.getName().indexOf(LexicalConstants.PERIOD);
      if (index > 0) {
        // it is from a macro library
        String namespace = instance.getName().substring(0, index);
        MacroLibrary macroLibrary = ConfigurationManager.getInstance(editor.getProject()).getMacroLibrary(namespace);
        if (null != macroLibrary) {
          MacroDirective[] macros = macroLibrary.getMacros();
          if (null != macros) {
            for (MacroDirective macro : macros) {
              if (macro.getName().equals(instance.getName())) {
                // we have a match
                return new IHyperlink[]{new MacroHyperlink(
                    instance, macroLibrary.getFile(),
                    macro.getOffset(), macro.getLength())};
              }
            }
          }
        }
        if (null != macroLibrary)
          return new IHyperlink[]{new MacroHyperlink(instance, macroLibrary.getFile(), -1, -1)};
      }
      else {
        List<MacroDirective> macroDefinitions = instance.getItemSet().getMacroDefinitions();
        for (Iterator<MacroDirective> i=macroDefinitions.iterator(); i.hasNext(); ) {
          MacroDirective macroDefinition = i.next();
View Full Code Here

TOP

Related Classes of org.jboss.ide.eclipse.freemarker.configuration.MacroLibrary

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.