Extend Attributes in masterfs instead of DefaultAttributes.
This is necessary for the implementation of issue #42412.
1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsAttributes.java Wed May 12 15:40:09 2004 +0000
1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsAttributes.java Wed May 12 15:57:36 2004 +0000
1.3 @@ -7,7 +7,7 @@
1.4 * http://www.sun.com/
1.5 *
1.6 * The Original Code is NetBeans. The Initial Developer of the Original
1.7 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
1.8 + * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
1.9 * Microsystems, Inc. All Rights Reserved.
1.10 */
1.11
1.12 @@ -15,6 +15,7 @@
1.13
1.14 import java.beans.FeatureDescriptor;
1.15 import java.beans.PropertyVetoException;
1.16 +import java.io.File;
1.17 import java.io.IOException;
1.18 import java.util.*;
1.19
1.20 @@ -24,6 +25,8 @@
1.21 import org.openide.util.RequestProcessor;
1.22 import org.openide.loaders.DataObject;
1.23
1.24 +import org.netbeans.modules.masterfs.providers.Attributes;
1.25 +
1.26 import org.netbeans.api.vcs.commands.Command;
1.27 import org.netbeans.api.vcs.commands.CommandTask;
1.28
1.29 @@ -50,7 +53,7 @@
1.30 * the DefaultAttributes, but are interpreted as VCS commands.
1.31 * @author Martin Entlicher
1.32 */
1.33 -public class VcsAttributes extends DefaultAttributes {
1.34 +public class VcsAttributes extends Attributes {
1.35
1.36 /**
1.37 * The name of attribute, that contains the java.io.File object for
1.38 @@ -177,9 +180,9 @@
1.39 static final long serialVersionUID = 8084585278800267078L;
1.40
1.41 /** Creates new VcsAttributes */
1.42 - public VcsAttributes(AbstractFileSystem.Info info, AbstractFileSystem.Change change,
1.43 + public VcsAttributes(File mountPoint, AbstractFileSystem.Info info, AbstractFileSystem.Change change,
1.44 AbstractFileSystem.List list, VcsFileSystem fileSystem, VcsActionSupporter supp) {
1.45 - super(info, change, list);
1.46 + super(mountPoint, info, change, list);
1.47 this.fileSystem = fileSystem;
1.48 supporter = supp;
1.49 commandsProvider = fileSystem.getCommandsProvider();
2.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Wed May 12 15:40:09 2004 +0000
2.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Wed May 12 15:57:36 2004 +0000
2.3 @@ -1748,7 +1748,7 @@
2.4 info = this;
2.5 change = this;
2.6 actionSupporter = new VcsActionSupporter();
2.7 - VcsAttributes a = new VcsAttributes (info, change, this, this, actionSupporter);
2.8 + VcsAttributes a = new VcsAttributes (rootFile, info, change, this, this, actionSupporter);
2.9 attr = a;
2.10 list = a;
2.11 vcsList = new VcsList();
2.12 @@ -1873,7 +1873,7 @@
2.13 refresher = new VcsRefreshRequest (this, 0, this);
2.14 actionSupporter = new VcsActionSupporter();
2.15 if (!(attr instanceof VcsAttributes)) {
2.16 - VcsAttributes a = new VcsAttributes (info, change, this, this, actionSupporter);
2.17 + VcsAttributes a = new VcsAttributes (rootFile, info, change, this, this, actionSupporter);
2.18 attr = a;
2.19 list = a;
2.20 } else {
2.21 @@ -2910,7 +2910,7 @@
2.22 }
2.23 // When we change the root, we have to create new attributes,
2.24 // that are with respect to the new root.
2.25 - VcsAttributes a = new VcsAttributes (info, change, this, this, actionSupporter);
2.26 + VcsAttributes a = new VcsAttributes (rootFile, info, change, this, this, actionSupporter);
2.27 VcsAttributes oldAttrs = getVcsAttributes();
2.28 if (oldAttrs != null) {
2.29 a.setRuntimeCommandsProvider(oldAttrs.getRuntimeCommandsProvider());