org-netbeans-modules-masterfs

16:40:00.903 INFO  jd.cli.Main - Decompiling org-netbeans-modules-masterfs.jar
package org.netbeans.modules.masterfs;

import java.io.IOException;
import java.util.Enumeration;
import org.netbeans.modules.masterfs.providers.Attributes;
import org.openide.filesystems.AbstractFileSystem.Change;
import org.openide.filesystems.AbstractFileSystem.Info;
import org.openide.filesystems.AbstractFileSystem.List;
import org.openide.filesystems.DefaultAttributes;

class ExLocalFileSystem$OneFileAttributeAttachedToRoot
  extends DefaultAttributes
{
  public ExLocalFileSystem$OneFileAttributeAttachedToRoot(AbstractFileSystem.Info paramInfo, AbstractFileSystem.Change paramChange, AbstractFileSystem.List paramList)
  {
    super(paramInfo, paramChange, paramList, Attributes.ATTRNAME);
  }
  
  public String[] children(String paramString)
  {
    return super.children(paramString);
  }
  
  public Object readAttribute(String paramString1, String paramString2)
  {
    return super.readAttribute(transformName(paramString1), paramString2);
  }
  
  public void writeAttribute(String paramString1, String paramString2, Object paramObject)
    throws IOException
  {
    super.writeAttribute(transformName(paramString1), paramString2, paramObject);
  }
  
  public synchronized Enumeration attributes(String paramString)
  {
    return super.attributes(transformName(paramString));
  }
  
  public synchronized void renameAttributes(String paramString1, String paramString2)
  {
    super.renameAttributes(transformName(paramString1), transformName(paramString2));
  }
  
  public synchronized void deleteAttributes(String paramString)
  {
    super.deleteAttributes(transformName(paramString));
  }
  
  private String transformName(String paramString)
  {
    char c = '|';
    if (paramString.indexOf(c) != -1)
    {
      StringBuffer localStringBuffer = new StringBuffer(paramString.length() + 50);
      for (int i = 0; i < paramString.length(); i++)
      {
        localStringBuffer.append(paramString.charAt(i));
        if (paramString.charAt(i) == c) {
          localStringBuffer.append(c);
        }
      }
      paramString = localStringBuffer.toString();
    }
    return paramString.replace('/', c);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ExLocalFileSystem.OneFileAttributeAttachedToRoot
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.beans.PropertyVetoException;
import java.io.File;
import java.io.IOException;
import java.util.Enumeration;
import org.netbeans.modules.masterfs.providers.Attributes;
import org.openide.filesystems.AbstractFileSystem.Change;
import org.openide.filesystems.AbstractFileSystem.Info;
import org.openide.filesystems.AbstractFileSystem.List;
import org.openide.filesystems.DefaultAttributes;
import org.openide.filesystems.LocalFileSystem;

public class ExLocalFileSystem
  extends LocalFileSystem
{
  public static ExLocalFileSystem getInstance(File paramFile)
    throws PropertyVetoException, IOException
  {
    ExLocalFileSystem localExLocalFileSystem = new ExLocalFileSystem();
    if (paramFile.equals(Attributes.getRootForAttributes())) {
      attr = new OneFileAttributeAttachedToRoot(info, change, list);
    } else {
      attr = new Attributes(paramFile, info, change, list);
    }
    localExLocalFileSystem.setRootDirectory(paramFile);
    
    return localExLocalFileSystem;
  }
  
  public DefaultAttributes getAttributes()
  {
    return (DefaultAttributes)attr;
  }
  
  private static class OneFileAttributeAttachedToRoot
    extends DefaultAttributes
  {
    public OneFileAttributeAttachedToRoot(AbstractFileSystem.Info paramInfo, AbstractFileSystem.Change paramChange, AbstractFileSystem.List paramList)
    {
      super(paramChange, paramList, Attributes.ATTRNAME);
    }
    
    public String[] children(String paramString)
    {
      return super.children(paramString);
    }
    
    public Object readAttribute(String paramString1, String paramString2)
    {
      return super.readAttribute(transformName(paramString1), paramString2);
    }
    
    public void writeAttribute(String paramString1, String paramString2, Object paramObject)
      throws IOException
    {
      super.writeAttribute(transformName(paramString1), paramString2, paramObject);
    }
    
    public synchronized Enumeration attributes(String paramString)
    {
      return super.attributes(transformName(paramString));
    }
    
    public synchronized void renameAttributes(String paramString1, String paramString2)
    {
      super.renameAttributes(transformName(paramString1), transformName(paramString2));
    }
    
    public synchronized void deleteAttributes(String paramString)
    {
      super.deleteAttributes(transformName(paramString));
    }
    
    private String transformName(String paramString)
    {
      char c = '|';
      if (paramString.indexOf(c) != -1)
      {
        StringBuffer localStringBuffer = new StringBuffer(paramString.length() + 50);
        for (int i = 0; i < paramString.length(); i++)
        {
          localStringBuffer.append(paramString.charAt(i));
          if (paramString.charAt(i) == c) {
            localStringBuffer.append(c);
          }
        }
        paramString = localStringBuffer.toString();
      }
      return paramString.replace('/', c);
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ExLocalFileSystem
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.File;
import java.util.Collection;
import org.netbeans.spi.queries.SharabilityQueryImplementation;
import org.netbeans.spi.queries.VisibilityQueryImplementation;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Result;
import org.openide.util.Lookup.Template;

public class GlobalSharabilityQueryImpl
  implements SharabilityQueryImplementation
{
  private GlobalVisibilityQueryImpl visibilityQuery;
  
  public int getSharability(File paramFile)
  {
    if (visibilityQuery == null)
    {
      Lookup.Result localResult = Lookup.getDefault().lookup(new Lookup.Template(VisibilityQueryImplementation.class));
      Collection localCollection = localResult.allInstances();
      assert (localCollection.contains(GlobalVisibilityQueryImpl.INSTANCE));
      visibilityQuery = GlobalVisibilityQueryImpl.INSTANCE;
    }
    return visibilityQuery.isVisible(paramFile.getName()) ? 0 : 2;
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.GlobalSharabilityQueryImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.util.prefs.PreferenceChangeEvent;
import java.util.prefs.PreferenceChangeListener;
import org.openide.util.ChangeSupport;

class GlobalVisibilityQueryImpl$1
  implements PreferenceChangeListener
{
  GlobalVisibilityQueryImpl$1(GlobalVisibilityQueryImpl paramGlobalVisibilityQueryImpl) {}
  
  public void preferenceChange(PreferenceChangeEvent paramPreferenceChangeEvent)
  {
    if ("IgnoredFiles".equals(paramPreferenceChangeEvent.getKey()))
    {
      GlobalVisibilityQueryImpl.access$002(this$0, null);
      GlobalVisibilityQueryImpl.access$100(this$0).fireChange();
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.GlobalVisibilityQueryImpl.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.File;
import java.util.prefs.PreferenceChangeEvent;
import java.util.prefs.PreferenceChangeListener;
import java.util.prefs.Preferences;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.event.ChangeListener;
import org.netbeans.spi.queries.VisibilityQueryImplementation2;
import org.openide.filesystems.FileObject;
import org.openide.util.ChangeSupport;
import org.openide.util.NbPreferences;

public class GlobalVisibilityQueryImpl
  implements VisibilityQueryImplementation2
{
  static GlobalVisibilityQueryImpl INSTANCE;
  private final ChangeSupport cs = new ChangeSupport(this);
  private static final String PROP_IGNORED_FILES = "IgnoredFiles";
  private Pattern ignoreFilesPattern = null;
  
  public GlobalVisibilityQueryImpl()
  {
    INSTANCE = this;
  }
  
  private static Preferences getPreferences()
  {
    return NbPreferences.root().node("/org/netbeans/core");
  }
  
  public boolean isVisible(FileObject paramFileObject)
  {
    return isVisible(paramFileObject.getNameExt());
  }
  
  public boolean isVisible(File paramFile)
  {
    return isVisible(paramFile.getName());
  }
  
  boolean isVisible(String paramString)
  {
    Pattern localPattern = getIgnoreFilesPattern();
    return !localPattern.matcher(paramString).find();
  }
  
  public void addChangeListener(ChangeListener paramChangeListener)
  {
    cs.addChangeListener(paramChangeListener);
  }
  
  public void removeChangeListener(ChangeListener paramChangeListener)
  {
    cs.removeChangeListener(paramChangeListener);
  }
  
  private Pattern getIgnoreFilesPattern()
  {
    if (ignoreFilesPattern == null)
    {
      String str = getIgnoredFiles();
      ignoreFilesPattern = ((str != null) && (str.length() > 0) ? Pattern.compile(str) : null);
    }
    return ignoreFilesPattern;
  }
  
  protected String getIgnoredFiles()
  {
    String str = getPreferences().get("IgnoredFiles", "^(CVS|SCCS|vssver.?\\.scc|#.*#|%.*%|_svn)$|~$|^\\.(?!htaccess$).*$");
    getPreferences().addPreferenceChangeListener(new PreferenceChangeListener()
    {
      public void preferenceChange(PreferenceChangeEvent paramAnonymousPreferenceChangeEvent)
      {
        if ("IgnoredFiles".equals(paramAnonymousPreferenceChangeEvent.getKey()))
        {
          ignoreFilesPattern = null;
          cs.fireChange();
        }
      }
    });
    return str;
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.GlobalVisibilityQueryImpl
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.net.URL;
import org.netbeans.modules.masterfs.filebasedfs.FileBasedURLMapper;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.URLMapper;

public final class MasterURLMapper
  extends URLMapper
{
  private static final URLMapper delegate = new FileBasedURLMapper();
  
  public FileObject[] getFileObjects(URL paramURL)
  {
    return delegate.getFileObjects(paramURL);
  }
  
  public URL getURL(FileObject paramFileObject, int paramInt)
  {
    return delegate.getURL(paramFileObject, paramInt);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.MasterURLMapper
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$1
  implements Runnable
{
  ProvidedExtensionsProxy$1(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject, String paramString, boolean paramBoolean) {}
  
  public void run()
  {
    val$iListener.createFailure(val$parent, val$name, val$isFolder);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$10
  implements Runnable
{
  ProvidedExtensionsProxy$10(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject) {}
  
  public void run()
  {
    ((ProvidedExtensions)val$iListener).fileUnlocked(val$fo);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.10
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.File;
import java.util.concurrent.atomic.AtomicReference;
import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions;

class ProvidedExtensionsProxy$11
  implements Runnable
{
  ProvidedExtensionsProxy$11(ProvidedExtensionsProxy paramProvidedExtensionsProxy, AtomicReference paramAtomicReference, InterceptionListener paramInterceptionListener, File paramFile, String paramString) {}
  
  public void run()
  {
    val$value.set(((ProvidedExtensions)val$iListener).getAttribute(val$file, val$attrName));
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.11
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$2
  implements Runnable
{
  ProvidedExtensionsProxy$2(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject, String paramString, boolean paramBoolean) {}
  
  public void run()
  {
    val$iListener.beforeCreate(val$parent, val$name, val$isFolder);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$3
  implements Runnable
{
  ProvidedExtensionsProxy$3(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject) {}
  
  public void run()
  {
    val$iListener.deleteSuccess(val$fo);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$4
  implements Runnable
{
  ProvidedExtensionsProxy$4(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject) {}
  
  public void run()
  {
    val$iListener.deleteFailure(val$fo);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$5
  implements Runnable
{
  ProvidedExtensionsProxy$5(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject) {}
  
  public void run()
  {
    val$iListener.createSuccess(val$fo);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$6
  implements Runnable
{
  ProvidedExtensionsProxy$6(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject) {}
  
  public void run()
  {
    val$iListener.beforeDelete(val$fo);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.6
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.File;
import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions;

class ProvidedExtensionsProxy$7
  implements Runnable
{
  ProvidedExtensionsProxy$7(ProvidedExtensionsProxy paramProvidedExtensionsProxy, Boolean[] paramArrayOfBoolean, InterceptionListener paramInterceptionListener, File paramFile) {}
  
  public void run()
  {
    val$ret[0] = Boolean.valueOf(((ProvidedExtensions)val$iListener).canWrite(val$f));
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.7
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$8
  implements Runnable
{
  ProvidedExtensionsProxy$8(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject) {}
  
  public void run()
  {
    ((ProvidedExtensions)val$iListener).beforeChange(val$f);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.8
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions;
import org.openide.filesystems.FileObject;

class ProvidedExtensionsProxy$9
  implements Runnable
{
  ProvidedExtensionsProxy$9(ProvidedExtensionsProxy paramProvidedExtensionsProxy, InterceptionListener paramInterceptionListener, FileObject paramFileObject) {}
  
  public void run()
  {
    ((ProvidedExtensions)val$iListener).fileLocked(val$fo);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.9
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.File;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions.DeleteHandler;

class ProvidedExtensionsProxy$DelegatingDeleteHandler$1
  implements Runnable
{
  ProvidedExtensionsProxy$DelegatingDeleteHandler$1(ProvidedExtensionsProxy.DelegatingDeleteHandler paramDelegatingDeleteHandler, boolean[] paramArrayOfBoolean, File paramFile) {}
  
  public void run()
  {
    val$retval[0] = ProvidedExtensionsProxy.DelegatingDeleteHandler.access$200(this$1).delete(val$file);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.DelegatingDeleteHandler.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.File;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions.DeleteHandler;

class ProvidedExtensionsProxy$DelegatingDeleteHandler
  implements ProvidedExtensions.DeleteHandler
{
  private ProvidedExtensions.DeleteHandler delegate;
  
  private ProvidedExtensionsProxy$DelegatingDeleteHandler(ProvidedExtensionsProxy paramProvidedExtensionsProxy, ProvidedExtensions.DeleteHandler paramDeleteHandler)
  {
    delegate = paramDeleteHandler;
  }
  
  public boolean delete(final File paramFile)
  {
    final boolean[] arrayOfBoolean = new boolean[1];
    ProvidedExtensionsProxy.access$300(new Runnable()
    {
      public void run()
      {
        arrayOfBoolean[0] = delegate.delete(paramFile);
      }
    });
    return arrayOfBoolean[0];
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.DelegatingDeleteHandler
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.IOException;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions.IOHandler;

class ProvidedExtensionsProxy$DelegatingIOHandler$1
  implements Runnable
{
  ProvidedExtensionsProxy$DelegatingIOHandler$1(ProvidedExtensionsProxy.DelegatingIOHandler paramDelegatingIOHandler, IOException[] paramArrayOfIOException) {}
  
  public void run()
  {
    try
    {
      ProvidedExtensionsProxy.DelegatingIOHandler.access$400(this$1).handle();
    }
    catch (IOException localIOException)
    {
      val$retval[0] = localIOException;
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.DelegatingIOHandler.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.IOException;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions.IOHandler;

class ProvidedExtensionsProxy$DelegatingIOHandler
  implements ProvidedExtensions.IOHandler
{
  private ProvidedExtensions.IOHandler delegate;
  
  private ProvidedExtensionsProxy$DelegatingIOHandler(ProvidedExtensionsProxy paramProvidedExtensionsProxy, ProvidedExtensions.IOHandler paramIOHandler)
  {
    delegate = paramIOHandler;
  }
  
  public void handle()
    throws IOException
  {
    final IOException[] arrayOfIOException = new IOException[1];
    ProvidedExtensionsProxy.access$300(new Runnable()
    {
      public void run()
      {
        try
        {
          delegate.handle();
        }
        catch (IOException localIOException)
        {
          arrayOfIOException[0] = localIOException;
        }
      }
    });
    if (arrayOfIOException[0] != null) {
      throw arrayOfIOException[0];
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy.DelegatingIOHandler
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.modules.masterfs.providers.AnnotationProvider;
import org.netbeans.modules.masterfs.providers.InterceptionListener;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions.DeleteHandler;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions.IOHandler;
import org.openide.filesystems.FileObject;

public class ProvidedExtensionsProxy
  extends ProvidedExtensions
{
  private Collection<AnnotationProvider> annotationProviders;
  private static ThreadLocal reentrantCheck = new ThreadLocal();
  
  public ProvidedExtensionsProxy(Collection paramCollection)
  {
    annotationProviders = paramCollection;
  }
  
  public ProvidedExtensions.DeleteHandler getDeleteHandler(File paramFile)
  {
    ProvidedExtensions.DeleteHandler localDeleteHandler1 = null;
    for (Iterator localIterator = annotationProviders.iterator(); (localIterator.hasNext()) && (localDeleteHandler1 == null);)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      Object localObject = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localObject instanceof ProvidedExtensions))
      {
        ProvidedExtensions.DeleteHandler localDeleteHandler2 = ((ProvidedExtensions)localObject).getDeleteHandler(paramFile);
        localDeleteHandler1 = localDeleteHandler2 != null ? new DelegatingDeleteHandler(localDeleteHandler2, null) : null;
      }
    }
    return localDeleteHandler1;
  }
  
  public ProvidedExtensions.IOHandler getRenameHandler(File paramFile, String paramString)
  {
    File localFile = new File(paramFile.getParentFile(), paramString);
    ProvidedExtensions.IOHandler localIOHandler1 = null;
    for (Iterator localIterator = annotationProviders.iterator(); (localIterator.hasNext()) && (localIOHandler1 == null);)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      Object localObject = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localObject instanceof ProvidedExtensions))
      {
        ProvidedExtensions.IOHandler localIOHandler2 = ((ProvidedExtensions)localObject).getRenameHandler(paramFile, paramString);
        localIOHandler1 = localIOHandler2 != null ? new DelegatingIOHandler(localIOHandler2, null) : null;
      }
    }
    return localIOHandler1;
  }
  
  public ProvidedExtensions.IOHandler getMoveHandler(File paramFile1, File paramFile2)
  {
    ProvidedExtensions.IOHandler localIOHandler1 = null;
    for (Iterator localIterator = annotationProviders.iterator(); (localIterator.hasNext()) && (localIOHandler1 == null);)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      Object localObject = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localObject instanceof ProvidedExtensions))
      {
        ProvidedExtensions.IOHandler localIOHandler2 = ((ProvidedExtensions)localObject).getMoveHandler(paramFile1, paramFile2);
        localIOHandler1 = localIOHandler2 != null ? new DelegatingIOHandler(localIOHandler2, null) : null;
      }
    }
    return localIOHandler1;
  }
  
  public void createFailure(final FileObject paramFileObject, final String paramString, final boolean paramBoolean)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if (localInterceptionListener != null) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            localInterceptionListener.createFailure(paramFileObject, paramString, paramBoolean);
          }
        });
      }
    }
  }
  
  public void beforeCreate(final FileObject paramFileObject, final String paramString, final boolean paramBoolean)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if (localInterceptionListener != null) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            localInterceptionListener.beforeCreate(paramFileObject, paramString, paramBoolean);
          }
        });
      }
    }
  }
  
  public void deleteSuccess(final FileObject paramFileObject)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if (localInterceptionListener != null) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            localInterceptionListener.deleteSuccess(paramFileObject);
          }
        });
      }
    }
  }
  
  public void deleteFailure(final FileObject paramFileObject)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if (localInterceptionListener != null) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            localInterceptionListener.deleteFailure(paramFileObject);
          }
        });
      }
    }
  }
  
  public void createSuccess(final FileObject paramFileObject)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if (localInterceptionListener != null) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            localInterceptionListener.createSuccess(paramFileObject);
          }
        });
      }
    }
  }
  
  public void beforeDelete(final FileObject paramFileObject)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if (localInterceptionListener != null) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            localInterceptionListener.beforeDelete(paramFileObject);
          }
        });
      }
    }
  }
  
  public boolean canWrite(final File paramFile)
  {
    final Boolean[] arrayOfBoolean = { null };
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localInterceptionListener instanceof ProvidedExtensions)) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            arrayOfBoolean[0] = Boolean.valueOf(((ProvidedExtensions)localInterceptionListener).canWrite(paramFile));
          }
        });
      }
    }
    return arrayOfBoolean[0] != null ? arrayOfBoolean[0].booleanValue() : super.canWrite(paramFile);
  }
  
  public void beforeChange(final FileObject paramFileObject)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localInterceptionListener instanceof ProvidedExtensions)) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            ((ProvidedExtensions)localInterceptionListener).beforeChange(paramFileObject);
          }
        });
      }
    }
  }
  
  public void fileLocked(final FileObject paramFileObject)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localInterceptionListener instanceof ProvidedExtensions)) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            ((ProvidedExtensions)localInterceptionListener).fileLocked(paramFileObject);
          }
        });
      }
    }
  }
  
  public void fileUnlocked(final FileObject paramFileObject)
  {
    for (Iterator localIterator = annotationProviders.iterator(); localIterator.hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)localIterator.next();
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localInterceptionListener instanceof ProvidedExtensions)) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            ((ProvidedExtensions)localInterceptionListener).fileUnlocked(paramFileObject);
          }
        });
      }
    }
  }
  
  public Object getAttribute(final File paramFile, final String paramString)
  {
    final AtomicReference localAtomicReference = new AtomicReference();
    for (AnnotationProvider localAnnotationProvider : annotationProviders)
    {
      final InterceptionListener localInterceptionListener = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localInterceptionListener instanceof ProvidedExtensions)) {
        runCheckCode(new Runnable()
        {
          public void run()
          {
            localAtomicReference.set(((ProvidedExtensions)localInterceptionListener).getAttribute(paramFile, paramString));
          }
        });
      }
      if (localAtomicReference.get() != null) {
        return localAtomicReference.get();
      }
    }
    return null;
  }
  
  public long refreshRecursively(File paramFile, long paramLong, List<? super File> paramList)
  {
    for (Object localObject1 = annotationProviders.iterator(); ((Iterator)localObject1).hasNext();)
    {
      AnnotationProvider localAnnotationProvider = (AnnotationProvider)((Iterator)localObject1).next();
      Object localObject2 = localAnnotationProvider != null ? localAnnotationProvider.getInterceptionListener() : null;
      if ((localObject2 instanceof ProvidedExtensions))
      {
        ProvidedExtensions localProvidedExtensions = (ProvidedExtensions)localObject2;
        int i = paramList.size();
        long l = localProvidedExtensions.refreshRecursively(paramFile, paramLong, paramList);
        assert ((l != -1L) || (i == paramList.size())) : ("When returning -1 from refreshRecursively, you cannot modify children: " + localProvidedExtensions);
        if (l != -1L) {
          return l;
        }
      }
    }
    localObject1 = paramFile.listFiles();
    if (localObject1 != null) {
      paramList.addAll(Arrays.asList((Object[])localObject1));
    }
    return 0L;
  }
  
  public static void checkReentrancy()
  {
    if (reentrantCheck.get() != null) {
      Logger.getLogger("org.netbeans.modules.masterfs.ProvidedExtensionsProxy").log(Level.INFO, "Unexpected reentrant call", new Throwable());
    }
  }
  
  private static void runCheckCode(Runnable paramRunnable)
  {
    try
    {
      reentrantCheck.set(Boolean.TRUE);
      paramRunnable.run();
    }
    finally
    {
      reentrantCheck.set(null);
    }
  }
  
  private class DelegatingDeleteHandler
    implements ProvidedExtensions.DeleteHandler
  {
    private ProvidedExtensions.DeleteHandler delegate;
    
    private DelegatingDeleteHandler(ProvidedExtensions.DeleteHandler paramDeleteHandler)
    {
      delegate = paramDeleteHandler;
    }
    
    public boolean delete(final File paramFile)
    {
      final boolean[] arrayOfBoolean = new boolean[1];
      ProvidedExtensionsProxy.runCheckCode(new Runnable()
      {
        public void run()
        {
          arrayOfBoolean[0] = delegate.delete(paramFile);
        }
      });
      return arrayOfBoolean[0];
    }
  }
  
  private class DelegatingIOHandler
    implements ProvidedExtensions.IOHandler
  {
    private ProvidedExtensions.IOHandler delegate;
    
    private DelegatingIOHandler(ProvidedExtensions.IOHandler paramIOHandler)
    {
      delegate = paramIOHandler;
    }
    
    public void handle()
      throws IOException
    {
      final IOException[] arrayOfIOException = new IOException[1];
      ProvidedExtensionsProxy.runCheckCode(new Runnable()
      {
        public void run()
        {
          try
          {
            delegate.handle();
          }
          catch (IOException localIOException)
          {
            arrayOfIOException[0] = localIOException;
          }
        }
      });
      if (arrayOfIOException[0] != null) {
        throw arrayOfIOException[0];
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.ProvidedExtensionsProxy
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs.filebasedfs;

class FileBasedFileSystem$1
  implements Runnable
{
  FileBasedFileSystem$1(FileBasedFileSystem paramFileBasedFileSystem, boolean paramBoolean) {}
  
  public void run()
  {
    this$0.refreshImpl(val$expected);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs.filebasedfs;

import java.io.IOException;
import org.openide.filesystems.FileSystem.AtomicAction;

class FileBasedFileSystem$2
  implements FileSystem.AtomicAction
{
  FileBasedFileSystem$2(FileBasedFileSystem paramFileBasedFileSystem, Runnable paramRunnable) {}
  
  public void run()
    throws IOException
  {
    FileBasedFileSystem.runAsInconsistent(val$r);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs.filebasedfs;

import java.io.IOException;

public abstract interface FileBasedFileSystem$FSCallable<V>
{
  public abstract V call()
    throws IOException;
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.FSCallable
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs.filebasedfs;

import java.io.ObjectStreamException;
import java.io.Serializable;

class FileBasedFileSystem$SerReplace
  implements Serializable
{
  static final long serialVersionUID = -3714631266626840241L;
  
  public Object readResolve()
    throws ObjectStreamException
  {
    return FileBasedFileSystem.getInstance();
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.SerReplace
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.masterfs.filebasedfs;

import java.awt.Image;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.TooManyListenersException;
import javax.swing.Action;
import org.netbeans.modules.masterfs.ProvidedExtensionsProxy;
import org.netbeans.modules.masterfs.providers.AnnotationProvider;
import org.netbeans.modules.masterfs.providers.ProvidedExtensions;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileStatusEvent;
import org.openide.filesystems.FileStatusListener;
import org.openide.filesystems.FileSystem.HtmlStatus;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Result;
import org.openide.util.Lookup.Template;
import org.openide.util.LookupEvent;
import org.openide.util.LookupListener;
import org.openide.util.actions.SystemAction;

public final class FileBasedFileSystem$StatusImpl
  implements FileSystem.HtmlStatus, LookupListener, FileStatusListener
{
  private Lookup.Result<AnnotationProvider> annotationProviders;
  private Collection<? extends AnnotationProvider> previousProviders;
  
  public FileBasedFileSystem$StatusImpl(FileBasedFileSystem paramFileBasedFileSystem)
  {
    annotationProviders = Lookup.getDefault().lookup(new Lookup.Template(AnnotationProvider.class));
    annotationProviders.addLookupListener(this);
    resultChanged(null);
  }
  
  public ProvidedExtensions getExtensions()
  {
    Object localObject;
    if (previousProviders != null) {
      localObject = Collections.unmodifiabl
1 2 3 4 5 6 7 8

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