org.eclipse.mylyn.resources.ui_3.7.1.v20120425-0100

oring");
    IExtension[] extensions = teamProvider.getExtensions();
    IExtension[] arrayOfIExtension1;
    int j = (arrayOfIExtension1 = extensions).length;
    for (int i = 0; i < j; i++)
    {
      IExtension extension = arrayOfIExtension1[i];
      IConfigurationElement[] elements = extension.getConfigurationElements();
      IConfigurationElement[] arrayOfIConfigurationElement1;
      int m = (arrayOfIConfigurationElement1 = elements).length;
      for (int k = 0; k < m; k++)
      {
        IConfigurationElement element = arrayOfIConfigurationElement1[k];
        if ("exclude".equals(element.getName())) {
          readLinkProvider(element);
        }
      }
    }
    extensionsRead = true;
  }
  
  private static void readLinkProvider(IConfigurationElement element)
  {
    String antPatternExclusion = element.getAttribute("antPattern");
    if (antPatternExclusion != null) {
      resourceExclusionPatterns.add(antPatternExclusion);
    }
    String exclude = element.getAttribute("pattern");
    if (exclude != null) {
      resourceExclusionPatterns.addAll(ResourcePatternExclusionStrategy.convertToAntPattern(exclude));
    }
  }
}

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

import org.eclipse.core.resources.IResource;

public abstract interface IResourceExclusionStrategy
{
  public abstract void init();
  
  public abstract void dispose();
  
  public abstract void update();
  
  public abstract boolean isExcluded(IResource paramIResource);
}

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

import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.context.core.AbstractContextStructureBridge;
import org.eclipse.mylyn.context.core.ContextCore;
import org.eclipse.mylyn.context.core.IDegreeOfInterest;
import org.eclipse.mylyn.context.core.IInteractionContextManager;
import org.eclipse.mylyn.context.core.IInteractionElement;
import org.eclipse.mylyn.internal.context.core.ContextCorePlugin;
import org.eclipse.mylyn.internal.context.core.InteractionContextManager;
import org.eclipse.mylyn.monitor.core.InteractionEvent;
import org.eclipse.mylyn.monitor.core.InteractionEvent.Kind;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

public class ResourceInterestUpdater
{
  public static final String SOURCE_ID = "org.eclipse.mylyn.resources.ui.interest.updater";
  private boolean syncExec = false;
  
  public void addResourceToContext(final Set<IResource> resources, final InteractionEvent.Kind interactionKind)
  {
    try
    {
      if (!resources.isEmpty()) {
        if (syncExec)
        {
          internalAddResourceToContext(resources, interactionKind);
        }
        else
        {
          IWorkbench workbench = PlatformUI.getWorkbench();
          if ((!workbench.isClosing()) && (!workbench.getDisplay().isDisposed())) {
            workbench.getDisplay().asyncExec(new Runnable()
            {
              public void run()
              {
                ResourceInterestUpdater.this.internalAddResourceToContext(resources, interactionKind);
              }
            });
          }
        }
      }
    }
    catch (Throwable t)
    {
      StatusHandler.log(new Status(4, "org.eclipse.mylyn.resources.ui", "Could not add resource to context: \"" + 
        resources + "\"", t));
    }
  }
  
  private void internalAddResourceToContext(Set<IResource> resources, InteractionEvent.Kind interactionKind)
  {
    List<InteractionEvent> interactionEvents = new ArrayList();
    for (IResource resource : resources) {
      if (acceptResource(resource))
      {
        AbstractContextStructureBridge bridge = ContextCore.getStructureBridge(resource);
        String handle = bridge.getHandleIdentifier(resource);
        if (handle != null)
        {
          IInteractionElement element = ContextCore.getContextManager().getElement(handle);
          if ((element != null) && (!element.getInterest().isInteresting()))
          {
            InteractionEvent interactionEvent = new InteractionEvent(interactionKind, 
              bridge.getContentType(), handle, "org.eclipse.mylyn.resources.ui.interest.updater");
            interactionEvents.add(interactionEvent);
          }
        }
      }
    }
    ContextCorePlugin.getContextManager().processInteractionEvents(interactionEvents, true);
  }
  
  private boolean acceptResource(IResource resource)
  {
    if ((resource.isAccessible()) && (!resource.isDerived()) && (!resource.isPhantom())) {
      return true;
    }
    return false;
  }
  
  public void setSyncExec(boolean syncExec)
  {
    this.syncExec = syncExec;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.resources.ui.ResourceInterestUpdater
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
1 2 3

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-2019. Infinite Loop Ltd