We need to keep the runtime commands provider attached to the VcsAttributes. BLD200303251330
authormentlicher@netbeans.org
Tue, 25 Mar 2003 12:41:50 +0000
changeset 33249ec1dd571678
parent 3323 7c1652f13111
child 3325 830aee887041
We need to keep the runtime commands provider attached to the VcsAttributes.
If new VcsAttributes are created, the provider must be passed in.
This is a fix of regression if issue #32097.
vcscore/src/org/netbeans/modules/vcscore/VcsAttributes.java
vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java
     1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsAttributes.java	Mon Mar 24 14:42:25 2003 +0000
     1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsAttributes.java	Tue Mar 25 12:41:50 2003 +0000
     1.3 @@ -201,6 +201,10 @@
     1.4          this.commandsProvider = commandsProvider;
     1.5      }
     1.6      
     1.7 +    public RuntimeCommandsProvider getRuntimeCommandsProvider() {
     1.8 +        return runtimeProvider;
     1.9 +    }
    1.10 +    
    1.11      public void setRuntimeCommandsProvider(RuntimeCommandsProvider provider) {
    1.12          this.runtimeProvider = provider;
    1.13      }
     2.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java	Mon Mar 24 14:42:25 2003 +0000
     2.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java	Tue Mar 25 12:41:50 2003 +0000
     2.3 @@ -2813,6 +2813,10 @@
     2.4              // When we change the root, we have to create new attributes,
     2.5              // that are with respect to the new root.
     2.6              VcsAttributes a = new VcsAttributes (info, change, this, this, actionSupporter);
     2.7 +            VcsAttributes oldAttrs = getVcsAttributes();
     2.8 +            if (oldAttrs != null) {
     2.9 +                a.setRuntimeCommandsProvider(oldAttrs.getRuntimeCommandsProvider());
    2.10 +            }
    2.11              attr = a;
    2.12              list = a;
    2.13          }