Changed to extend AbstractDiffCmdline instead of AbstractDiff. sandwich_build_6
authormentlicher@netbeans.org
Wed, 13 Sep 2000 09:42:11 +0000
changeset 341de61261ee621
parent 340 43987e1ea7f8
child 342 455260c18837
Changed to extend AbstractDiffCmdline instead of AbstractDiff.
Some modifications made due to this change.
vcscvs/src/org/netbeans/modules/vcs/cmdline/commands/CvsDiff.java
     1.1 --- a/vcscvs/src/org/netbeans/modules/vcs/cmdline/commands/CvsDiff.java	Tue Sep 12 08:38:41 2000 +0000
     1.2 +++ b/vcscvs/src/org/netbeans/modules/vcs/cmdline/commands/CvsDiff.java	Wed Sep 13 09:42:11 2000 +0000
     1.3 @@ -21,16 +21,17 @@
     1.4   * @author  Martin Entlicher
     1.5   * @version 
     1.6   */
     1.7 -public class CvsDiff extends AbstractDiff {
     1.8 +public class CvsDiff extends AbstractDiffCmdline {
     1.9  
    1.10      private Debug E=new Debug("CvsDiff",true); // NOI18N
    1.11      private Debug D=E;
    1.12  
    1.13      private static final String REVISION_STR = "retrieving revision";
    1.14  
    1.15 -    static final long serialVersionUID =1778237637756332791L;
    1.16 +    //static final long serialVersionUID =1778237637756332791L;
    1.17      /** Creates new CvsDiff */
    1.18      public CvsDiff() {
    1.19 +        setBundle(org.openide.util.NbBundle.getBundle(CvsDiff.class));
    1.20      }
    1.21  
    1.22      public void match(String[] elements) {
    1.23 @@ -42,7 +43,7 @@
    1.24          int n1 = 0, n2 = 0, n3 = 0, n4 = 0;
    1.25          String nStr;
    1.26          if ((index = elements[0].indexOf('a')) >= 0) {
    1.27 -            DiffAction action = new DiffAction();
    1.28 +            //DiffAction action = new DiffAction();
    1.29              try {
    1.30                  n1 = Integer.parseInt(elements[0].substring(0, index));
    1.31                  index++;
    1.32 @@ -68,10 +69,11 @@
    1.33                  E.deb("NumberFormatException "+e.getMessage()); // NOI18N
    1.34                  return;
    1.35              }
    1.36 -            action.setAddAction(n1, n3, n4);
    1.37 -            diffActions.add(action);
    1.38 +            //action.setAddAction(n1, n3, n4);
    1.39 +            //diffActions.add(action);
    1.40 +            diff.addAddAction(n1, n3, n4);
    1.41          } else if ((index = elements[0].indexOf('d')) >= 0) {
    1.42 -            DiffAction action = new DiffAction();
    1.43 +            //DiffAction action = new DiffAction();
    1.44              commaIndex = elements[0].lastIndexOf(',', index);
    1.45              try {
    1.46                  if (commaIndex < 0) {
    1.47 @@ -96,10 +98,11 @@
    1.48                  E.deb("NumberFormatException "+e.getMessage()); // NOI18N
    1.49                  return;
    1.50              }
    1.51 -            action.setDeleteAction(n1, n2, n3);
    1.52 -            diffActions.add(action);
    1.53 +            //action.setDeleteAction(n1, n2, n3);
    1.54 +            //diffActions.add(action);
    1.55 +            diff.addDeleteAction(n1, n2, n3);
    1.56          } else if ((index = elements[0].indexOf('c')) >= 0) {
    1.57 -            DiffAction action = new DiffAction();
    1.58 +            //DiffAction action = new DiffAction();
    1.59              commaIndex = elements[0].lastIndexOf(',', index);
    1.60              try {
    1.61                  if (commaIndex < 0) {
    1.62 @@ -136,8 +139,9 @@
    1.63                  E.deb("NumberFormatException "+e.getMessage()); // NOI18N
    1.64                  return;
    1.65              }
    1.66 -            action.setChangeAction(n1, n2, n3, n4);
    1.67 -            diffActions.add(action);
    1.68 +            //action.setChangeAction(n1, n2, n3, n4);
    1.69 +            //diffActions.add(action);
    1.70 +            diff.addChangeAction(n1, n2, n3, n4);
    1.71          } else if (elements[0].indexOf(REVISION_STR) == 0) {
    1.72              String rev = elements[0].substring(REVISION_STR.length()).trim();
    1.73              if (diffOutRev1 == null) diffOutRev1 = rev;
    1.74 @@ -145,8 +149,4 @@
    1.75          }
    1.76      }
    1.77  
    1.78 -    protected java.util.ResourceBundle getBundle() {
    1.79 -        //D.deb("getting "+s);
    1.80 -        return org.openide.util.NbBundle.getBundle(CvsDiff.class);
    1.81 -    }
    1.82  }