org.eclipse.mylyn.wikitext.core_1.6.1.v20120425-0100

  Messages.getString("WikiTextPlugin.5"), new Object[] { languageByName }));
              }
              try
              {
                extension = element.createExecutableExtension("class");
              }
              catch (CoreException e)
              {
                Object extension;
                getLog().log(e.getStatus());
                continue;
              }
              Object extension;
              if (!(extension instanceof ValidationRule)) {
                throw new Exception(MessageFormat.format(
                  Messages.getString("WikiTextPlugin.7"), new Object[] {extension.getClass()
                  .getName() }));
              }
              ValidationRules rules = (ValidationRules)validationRulesByLanguageName.get(markupLanguage);
              if (rules == null)
              {
                rules = new ValidationRules();
                validationRulesByLanguageName.put(markupLanguage, rules);
              }
              rules.addValidationRule((ValidationRule)extension);
            }
            catch (Exception e)
            {
              log(4, MessageFormat.format(
                Messages.getString("WikiTextPlugin.8"), new Object[] {
                element.getDeclaringExtension().getContributor().getName(), 
                "markupValidationRule", e.getMessage() }), e);
            }
          }
        }
        Set<String> languageNames = getDefault().getMarkupLanguageNames();
        for (String languageName : languageNames)
        {
          ValidationRules rules = (ValidationRules)validationRulesByLanguageName.get(languageName);
          if (rules == null)
          {
            rules = new ValidationRules();
            validationRulesByLanguageName.put(languageName, rules);
          }
        }
        for (String languageName : languageNames)
        {
          MarkupLanguage markupLanguage = getDefault().getMarkupLanguage(languageName);
          if ((markupLanguage != null) && (markupLanguage.getExtendsLanguage() != null))
          {
            ValidationRules languageRules = (ValidationRules)validationRulesByLanguageName.get(languageName);
            ValidationRules parentLanguageRules = (ValidationRules)validationRulesByLanguageName.get(markupLanguage.getExtendsLanguage());
            
            languageRules.setParent(parentLanguageRules);
          }
        }
        this.validationRulesByLanguageName = validationRulesByLanguageName;
      }
    }
  }
  
  private void initializeMarkupLanguages()
  {
    synchronized (this)
    {
      if (languageByName == null)
      {
        SortedMap<String, Class<? extends MarkupLanguage>> markupLanguageByName = new TreeMap();
        Map<String, Class<? extends MarkupLanguage>> languageByFileExtension = new HashMap();
        Map<String, String> languageExtensionByLanguage = new HashMap();
        Map<Class<? extends MarkupLanguage>, String> languageNameByLanguage = new HashMap();
        
        IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(getPluginId(), 
          "markupLanguage");
        if (extensionPoint != null)
        {
          IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
          IConfigurationElement[] arrayOfIConfigurationElement1;
          int j = (arrayOfIConfigurationElement1 = configurationElements).length;
          for (int i = 0; i < j; i++)
          {
            IConfigurationElement element = arrayOfIConfigurationElement1[i];
            String name = element.getAttribute("name");
            if ((name == null) || (name.length() == 0))
            {
              log(4, 
                MessageFormat.format(
                "markupLanguage" + Messages.getString("WikiTextPlugin.10"), new Object[] {element.getDeclaringExtension()
                .getContributor()
                .getName() }));
            }
            else
            {
              String extendsLanguage = element.getAttribute("extends");
              try
              {
                markupLanguage = element.createExecutableExtension("class");
              }
              catch (CoreException e)
              {
                Object markupLanguage;
                getLog().log(e.getStatus());
                continue;
              }
              Object markupLanguage;
              if (!(markupLanguage instanceof MarkupLanguage))
              {
                log(4, MessageFormat.format(
                  Messages.getString("WikiTextPlugin.13"), new Object[] {markupLanguage.getClass()
                  .getName() }));
              }
              else
              {
                MarkupLanguage d = (MarkupLanguage)markupLanguage;
                
                Class<? extends MarkupLanguage> previous = (Class)markupLanguageByName.put(name, d.getClass());
                if (previous != null)
                {
                  log(4, 
                    MessageFormat.format(
                    "markupLanguage" + Messages.getString("WikiTextPlugin.14"), new Object[] {
                    name, element.getDeclaringExtension().getContributor().getName(), name }));
                  markupLanguageByName.put(name, previous);
                }
                else
                {
                  languageNameByLanguage.put(d.getClass(), name);
                  if (extendsLanguage != null) {
                    languageExtensionByLanguage.put(name, extendsLanguage);
                  }
                  String fileExtensions = element.getAttribute("fileExtensions");
                  if (fileExtensions != null)
                  {
                    String[] parts = fileExtensions.split("\\s*,\\s*");
                    String[] arrayOfString1;
                    int m = (arrayOfString1 = parts).length;
                    for (int k = 0; k < m; k++)
                    {
                      String part = arrayOfString1[k];
                      if (part.length() != 0)
                      {
                        Class<? extends MarkupLanguage> previous = (Class)languageByFileExtension.put(part, 
                          d.getClass());
                        if (previous != null)
                        {
                          log(4, 
                            MessageFormat.format(
                            "markupLanguage" + 
                            Messages.getString("WikiTextPlugin.17"), new Object[] {
                            part, element.getDeclaringExtension()
                            .getContributor()
                            .getName(), part }));
                          languageByFileExtension.put(part, previous);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        this.languageByFileExtension = languageByFileExtension;
        languageByName = markupLanguageByName;
        this.languageExtensionByLanguage = languageExtensionByLanguage;
        this.languageNameByLanguage = languageNameByLanguage;
      }
    }
  }
  
  public void log(int severity, String message)
  {
    log(severity, message, null);
  }
  
  public void log(int severity, String message, Throwable t)
  {
    getLog().log(new Status(severity, getPluginId(), message, t));
  }
  
  public String getPluginId()
  {
    return getBundle().getSymbolicName();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.wikitext.core.WikiTextPlugin
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.wikitext.core;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

class Messages
{
  private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.wikitext.core.messages";
  private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle("org.eclipse.mylyn.internal.wikitext.core.messages");
  
  public static String getString(String key)
  {
    try
    {
      return RESOURCE_BUNDLE.getString(key);
    }
    catch (MissingResourceException localMissingResourceException) {}
    return '!' + key + '!';
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.wikitext.core.Messages
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd