Adjusting to recent changes in NetBeans proper.
1.1 --- a/api/test/unit/src/org/netbeans/modules/jackpot30/impl/indexing/IndexTestBase.java Fri Dec 16 11:41:04 2011 +0100
1.2 +++ b/api/test/unit/src/org/netbeans/modules/jackpot30/impl/indexing/IndexTestBase.java Fri Dec 16 17:22:16 2011 +0100
1.3 @@ -46,8 +46,8 @@
1.4 import org.netbeans.core.startup.Main;
1.5 import org.netbeans.junit.NbTestCase;
1.6 import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
1.7 +import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
1.8 import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
1.9 -import org.netbeans.modules.parsing.impl.indexing.Util;
1.10 import org.netbeans.spi.java.classpath.support.ClassPathSupport;
1.11 import org.openide.filesystems.FileObject;
1.12 import org.openide.filesystems.FileUtil;
1.13 @@ -68,7 +68,7 @@
1.14 Main.initializeURLFactory();
1.15 org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
1.16 prepareTest();
1.17 - Util.allMimeTypes = Collections.singleton("text/x-java");
1.18 + MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
1.19 GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {sourceCP});
1.20 RepositoryUpdater.getDefault().start(true);
1.21 super.setUp();
2.1 --- a/api/test/unit/src/org/netbeans/modules/jackpot30/spi/refactoring/JackpotBasedRefactoringTestBase.java Fri Dec 16 11:41:04 2011 +0100
2.2 +++ b/api/test/unit/src/org/netbeans/modules/jackpot30/spi/refactoring/JackpotBasedRefactoringTestBase.java Fri Dec 16 17:22:16 2011 +0100
2.3 @@ -54,6 +54,7 @@
2.4 import org.netbeans.modules.java.JavaDataLoader;
2.5 import org.netbeans.modules.java.source.indexing.JavaCustomIndexer;
2.6 import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
2.7 +import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
2.8 import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
2.9 import org.netbeans.modules.parsing.impl.indexing.Util;
2.10 import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
2.11 @@ -156,7 +157,7 @@
2.12 org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
2.13 prepareTest();
2.14 org.netbeans.api.project.ui.OpenProjects.getDefault().open(new Project[] {prj = ProjectManager.getDefault().findProject(src)}, false);
2.15 - Util.allMimeTypes = Collections.singleton("text/x-java");
2.16 + MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
2.17 GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {ClassPathSupport.createClassPath(src)});
2.18 RepositoryUpdater.getDefault().start(true);
2.19 super.setUp();
3.1 --- a/borrowedtests/nbproject/genfiles.properties Fri Dec 16 11:41:04 2011 +0100
3.2 +++ b/borrowedtests/nbproject/genfiles.properties Fri Dec 16 17:22:16 2011 +0100
3.3 @@ -3,6 +3,6 @@
3.4 build.xml.stylesheet.CRC32=79c3b980@1.28.0.7
3.5 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
3.6 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
3.7 -nbproject/build-impl.xml.data.CRC32=7b8d1111
3.8 +nbproject/build-impl.xml.data.CRC32=c00f7099
3.9 nbproject/build-impl.xml.script.CRC32=c6833bcb
3.10 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46
3.11 +nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.49
4.1 --- a/borrowedtests/nbproject/project.xml Fri Dec 16 11:41:04 2011 +0100
4.2 +++ b/borrowedtests/nbproject/project.xml Fri Dec 16 17:22:16 2011 +0100
4.3 @@ -7,6 +7,15 @@
4.4 <standalone/>
4.5 <module-dependencies>
4.6 <dependency>
4.7 + <code-name-base>org.netbeans.api.annotations.common</code-name-base>
4.8 + <build-prerequisite/>
4.9 + <compile-dependency/>
4.10 + <run-dependency>
4.11 + <release-version>1</release-version>
4.12 + <specification-version>1.13</specification-version>
4.13 + </run-dependency>
4.14 + </dependency>
4.15 + <dependency>
4.16 <code-name-base>org.netbeans.api.java</code-name-base>
4.17 <build-prerequisite/>
4.18 <compile-dependency/>
5.1 --- a/borrowedtests/src/org/netbeans/api/java/source/SourceUtilsTestUtil.java Fri Dec 16 11:41:04 2011 +0100
5.2 +++ b/borrowedtests/src/org/netbeans/api/java/source/SourceUtilsTestUtil.java Fri Dec 16 17:22:16 2011 +0100
5.3 @@ -46,12 +46,12 @@
5.4 import java.io.IOException;
5.5 import java.net.URL;
5.6 import java.util.ArrayList;
5.7 -import java.util.Arrays;
5.8 import java.util.Enumeration;
5.9 import java.util.HashSet;
5.10 import java.util.LinkedList;
5.11 import java.util.List;
5.12 import java.util.Map;
5.13 +import java.util.Set;
5.14 import java.util.WeakHashMap;
5.15 import java.util.logging.Logger;
5.16 import java.util.logging.Level;
5.17 @@ -69,7 +69,7 @@
5.18 import org.netbeans.modules.java.source.parsing.JavacParserFactory;
5.19 import org.netbeans.modules.java.source.usages.IndexUtil;
5.20 import org.netbeans.modules.parsing.api.indexing.IndexingManager;
5.21 -import org.netbeans.modules.parsing.impl.indexing.Util;
5.22 +import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
5.23 import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
5.24 import org.netbeans.spi.java.classpath.ClassPathProvider;
5.25 import org.netbeans.spi.java.classpath.support.ClassPathSupport;
5.26 @@ -150,13 +150,17 @@
5.27
5.28 SourceUtilsTestUtil2.disableLocks();
5.29
5.30 - if (Util.allMimeTypes == null) {
5.31 - Util.allMimeTypes = new HashSet<String>();
5.32 + Set<String> mimeTypes = MimeTypes.getAllMimeTypes();
5.33 +
5.34 + if (mimeTypes == null) {
5.35 + mimeTypes = new HashSet<String>();
5.36 } else {
5.37 - Util.allMimeTypes = new HashSet<String>(Util.allMimeTypes);
5.38 + mimeTypes = new HashSet<String>(mimeTypes);
5.39 }
5.40
5.41 - Util.allMimeTypes.add("text/x-java");
5.42 + mimeTypes.add("text/x-java");
5.43 +
5.44 + MimeTypes.setAllMimeTypes(mimeTypes);
5.45 org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
5.46 }
5.47
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/borrowedtests/src/org/netbeans/modules/parsing/impl/indexing/MimeTypes.java Fri Dec 16 17:22:16 2011 +0100
6.3 @@ -0,0 +1,66 @@
6.4 +/*
6.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
6.6 + *
6.7 + * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
6.8 + *
6.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
6.10 + * Other names may be trademarks of their respective owners.
6.11 + *
6.12 + * The contents of this file are subject to the terms of either the GNU
6.13 + * General Public License Version 2 only ("GPL") or the Common
6.14 + * Development and Distribution License("CDDL") (collectively, the
6.15 + * "License"). You may not use this file except in compliance with the
6.16 + * License. You can obtain a copy of the License at
6.17 + * http://www.netbeans.org/cddl-gplv2.html
6.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
6.19 + * specific language governing permissions and limitations under the
6.20 + * License. When distributing the software, include this License Header
6.21 + * Notice in each file and include the License file at
6.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
6.23 + * particular file as subject to the "Classpath" exception as provided
6.24 + * by Oracle in the GPL Version 2 section of the License file that
6.25 + * accompanied this code. If applicable, add the following below the
6.26 + * License Header, with the fields enclosed by brackets [] replaced by
6.27 + * your own identifying information:
6.28 + * "Portions Copyrighted [year] [name of copyright owner]"
6.29 + *
6.30 + * If you wish your version of this file to be governed by only the CDDL
6.31 + * or only the GPL Version 2, indicate your decision by adding
6.32 + * "[Contributor] elects to include this software in this distribution
6.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
6.34 + * single choice of license, a recipient has the option to distribute
6.35 + * your version of this file under either the CDDL, the GPL Version 2 or
6.36 + * to extend the choice of license to its licensees as provided above.
6.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
6.38 + * Version 2 license, then the option applies only if the new code is
6.39 + * made subject to such option by the copyright holder.
6.40 + *
6.41 + * Contributor(s):
6.42 + *
6.43 + * Portions Copyrighted 2011 Sun Microsystems, Inc.
6.44 + */
6.45 +package org.netbeans.modules.parsing.impl.indexing;
6.46 +
6.47 +import java.util.Set;
6.48 +import org.netbeans.api.annotations.common.CheckForNull;
6.49 +import org.netbeans.api.annotations.common.NonNull;
6.50 +import org.openide.util.Parameters;
6.51 +
6.52 +/**
6.53 + *
6.54 + * @author Tomas Zezula
6.55 + */
6.56 +public class MimeTypes {
6.57 +
6.58 + private MimeTypes() {}
6.59 +
6.60 + public static void setAllMimeTypes(@NonNull final Set<String> allMimeTypes) {
6.61 + Parameters.notNull("allMimeTypes", allMimeTypes); //NOI18N
6.62 + Util.allMimeTypes = allMimeTypes;
6.63 + }
6.64 +
6.65 + @CheckForNull
6.66 + public static Set<String> getAllMimeTypes() {
6.67 + return Util.allMimeTypes;
6.68 + }
6.69 +}
7.1 --- a/bridges/refactoring/nbproject/genfiles.properties Fri Dec 16 11:41:04 2011 +0100
7.2 +++ b/bridges/refactoring/nbproject/genfiles.properties Fri Dec 16 17:22:16 2011 +0100
7.3 @@ -3,6 +3,6 @@
7.4 build.xml.stylesheet.CRC32=79c3b980@1.39
7.5 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
7.6 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
7.7 -nbproject/build-impl.xml.data.CRC32=91e5a28b
7.8 +nbproject/build-impl.xml.data.CRC32=2e452477
7.9 nbproject/build-impl.xml.script.CRC32=fd9920c9
7.10 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.47
7.11 +nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.49
8.1 --- a/bridges/refactoring/nbproject/project.xml Fri Dec 16 11:41:04 2011 +0100
8.2 +++ b/bridges/refactoring/nbproject/project.xml Fri Dec 16 17:22:16 2011 +0100
8.3 @@ -58,6 +58,15 @@
8.4 </run-dependency>
8.5 </dependency>
8.6 <dependency>
8.7 + <code-name-base>org.netbeans.modules.java.sourceui</code-name-base>
8.8 + <build-prerequisite/>
8.9 + <compile-dependency/>
8.10 + <run-dependency>
8.11 + <release-version>1</release-version>
8.12 + <specification-version>1.26.0.1.19</specification-version>
8.13 + </run-dependency>
8.14 + </dependency>
8.15 + <dependency>
8.16 <code-name-base>org.netbeans.modules.queries</code-name-base>
8.17 <build-prerequisite/>
8.18 <compile-dependency/>
9.1 --- a/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RefactoringActionsProviderExt.java Fri Dec 16 11:41:04 2011 +0100
9.2 +++ b/bridges/refactoring/src/org/netbeans/modules/jackpot30/refactoring/RefactoringActionsProviderExt.java Fri Dec 16 17:22:16 2011 +0100
9.3 @@ -48,10 +48,11 @@
9.4 import javax.lang.model.type.TypeKind;
9.5 import org.netbeans.api.java.source.CompilationInfo;
9.6 import org.netbeans.api.java.source.TreePathHandle;
9.7 +import org.netbeans.api.java.source.ui.ScanDialog;
9.8 import org.netbeans.modules.jackpot30.refactoring.invertboolean.InvertBooleanRefactoringUI;
9.9 import org.netbeans.modules.jackpot30.refactoring.noconstructor.ReplaceConstructorRefactoringUI;
9.10 import org.netbeans.modules.refactoring.api.RenameRefactoring;
9.11 -import org.netbeans.modules.refactoring.java.RetoucheUtils;
9.12 +import org.netbeans.modules.refactoring.java.RefactoringUtils;
9.13 import org.netbeans.modules.refactoring.java.ui.RefactoringActionsProvider;
9.14 import org.netbeans.modules.refactoring.spi.ui.ActionsImplementationProvider;
9.15 import org.netbeans.modules.refactoring.spi.ui.RefactoringUI;
9.16 @@ -113,7 +114,7 @@
9.17 };
9.18 }
9.19
9.20 - RetoucheUtils.invokeAfterScanFinished(task, "Remove Constructor");//getActionName(RefactoringActionsFactory.renameAction()));
9.21 + ScanDialog.runWhenScanFinished(task, "Remove Constructor");//getActionName(RefactoringActionsFactory.renameAction()));
9.22 }
9.23
9.24 private static RefactoringUI doInvertBooleanImpl(TreePathHandle selectedElement, CompilationInfo info) {
9.25 @@ -160,7 +161,7 @@
9.26 };
9.27 }
9.28
9.29 - RetoucheUtils.invokeAfterScanFinished(task, "Remove Constructor");//getActionName(RefactoringActionsFactory.renameAction()));
9.30 + ScanDialog.runWhenScanFinished(task, "Remove Constructor");//getActionName(RefactoringActionsFactory.renameAction()));
9.31 }
9.32
9.33 // static String getActionName(Action action) {
9.34 @@ -185,13 +186,13 @@
9.35 Node node = nodes.iterator().next();
9.36 TreePathHandle tph = node.getLookup().lookup(TreePathHandle.class);
9.37 if (tph != null) {
9.38 - return RetoucheUtils.isRefactorable(tph.getFileObject());
9.39 + return RefactoringUtils.isRefactorable(tph.getFileObject());
9.40 }
9.41 DataObject dObj = node.getCookie(DataObject.class);
9.42 if(null == dObj)
9.43 return false;
9.44 FileObject fileObj = dObj.getPrimaryFile();
9.45 - if(null == fileObj || !RetoucheUtils.isRefactorable(fileObj))
9.46 + if(null == fileObj || !RefactoringUtils.isRefactorable(fileObj))
9.47 return false;
9.48
9.49 EditorCookie ec = lookup.lookup(EditorCookie.class);
10.1 --- a/bridges/refactoring/test/unit/src/org/netbeans/modules/jackpot30/refactoring/RefactoringTestBase.java Fri Dec 16 11:41:04 2011 +0100
10.2 +++ b/bridges/refactoring/test/unit/src/org/netbeans/modules/jackpot30/refactoring/RefactoringTestBase.java Fri Dec 16 17:22:16 2011 +0100
10.3 @@ -59,8 +59,8 @@
10.4 import org.netbeans.junit.NbTestCase;
10.5 import org.netbeans.modules.java.source.indexing.JavaCustomIndexer;
10.6 import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
10.7 +import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
10.8 import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
10.9 -import org.netbeans.modules.parsing.impl.indexing.Util;
10.10 import org.netbeans.modules.refactoring.api.AbstractRefactoring;
10.11 import org.netbeans.modules.refactoring.api.RefactoringSession;
10.12 import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
10.13 @@ -148,7 +148,7 @@
10.14 org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
10.15 prepareTest();
10.16 org.netbeans.api.project.ui.OpenProjects.getDefault().open(new Project[] {prj = ProjectManager.getDefault().findProject(src)}, false);
10.17 - Util.allMimeTypes = Collections.singleton("text/x-java");
10.18 + MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
10.19 GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {ClassPathSupport.createClassPath(src)});
10.20 RepositoryUpdater.getDefault().start(true);
10.21 super.setUp();