Adjusting to recent changes in java.source
authorJan Lahoda <jlahoda@netbeans.org>
Fri, 17 Dec 2010 21:19:03 +0100
changeset 50224b040fb7f78
parent 501 ec9c7955778a
child 503 597c27ada9e3
Adjusting to recent changes in java.source
api/test/unit/src/org/netbeans/modules/jackpot30/impl/UtilitiesTest.java
api/test/unit/src/org/netbeans/modules/jackpot30/impl/hints/FindDuplicatesTest.java
cmdline/compiler/src/org/netbeans/api/java/source/CompilationInfoHack.java
     1.1 --- a/api/test/unit/src/org/netbeans/modules/jackpot30/impl/UtilitiesTest.java	Fri Dec 17 21:18:14 2010 +0100
     1.2 +++ b/api/test/unit/src/org/netbeans/modules/jackpot30/impl/UtilitiesTest.java	Fri Dec 17 21:19:03 2010 +0100
     1.3 @@ -58,6 +58,7 @@
     1.4  import javax.tools.Diagnostic;
     1.5  import javax.tools.JavaFileObject;
     1.6  import org.netbeans.modules.java.source.pretty.VeryPretty;
     1.7 +import org.netbeans.modules.java.source.save.DiffContext;
     1.8  
     1.9  /**
    1.10   *
    1.11 @@ -403,7 +404,7 @@
    1.12          prepareTest("test/Test.java", code);
    1.13  
    1.14          Tree generalizedTree = Utilities.generalizePattern(info, new TreePath(info.getCompilationUnit()));
    1.15 -        VeryPretty vp = new VeryPretty(info);
    1.16 +        VeryPretty vp = new VeryPretty(new DiffContext(info));
    1.17  
    1.18          vp.print((JCTree) generalizedTree);
    1.19  
     2.1 --- a/api/test/unit/src/org/netbeans/modules/jackpot30/impl/hints/FindDuplicatesTest.java	Fri Dec 17 21:18:14 2010 +0100
     2.2 +++ b/api/test/unit/src/org/netbeans/modules/jackpot30/impl/hints/FindDuplicatesTest.java	Fri Dec 17 21:19:03 2010 +0100
     2.3 @@ -44,6 +44,7 @@
     2.4  import java.util.regex.Pattern;
     2.5  import org.netbeans.modules.jackpot30.impl.TestBase;
     2.6  import org.netbeans.modules.java.source.pretty.VeryPretty;
     2.7 +import org.netbeans.modules.java.source.save.DiffContext;
     2.8  
     2.9  /**
    2.10   *
    2.11 @@ -124,7 +125,7 @@
    2.12          prepareTest("test/Test.java", code);
    2.13  
    2.14          Tree generalizedTree = FindDuplicates.resolveAndGeneralizePattern(info, start, end);
    2.15 -        VeryPretty vp = new VeryPretty(info);
    2.16 +        VeryPretty vp = new VeryPretty(new DiffContext(info));
    2.17  
    2.18          vp.print((JCTree) generalizedTree);
    2.19          
     3.1 --- a/cmdline/compiler/src/org/netbeans/api/java/source/CompilationInfoHack.java	Fri Dec 17 21:18:14 2010 +0100
     3.2 +++ b/cmdline/compiler/src/org/netbeans/api/java/source/CompilationInfoHack.java	Fri Dec 17 21:19:03 2010 +0100
     3.3 @@ -195,7 +195,7 @@
     3.4  
     3.5      @Override
     3.6      public Snapshot getSnapshot() {
     3.7 -        throw new UnsupportedOperationException();
     3.8 +        return org.netbeans.modules.parsing.api.Source.create(file).createSnapshot();
     3.9      }
    3.10  
    3.11      @Override