sandbox/old-modules/overlays/netbeans
branchdonation_review
changeset 1043 57843026e60b
parent 1027 205b7632914c
parent 1040 f7b6892fd754
child 1044 7feb751ba76b
     1.1 --- a/sandbox/old-modules/overlays/netbeans	Mon Dec 19 11:37:36 2016 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,307 +0,0 @@
     1.4 -diff --git a/openide.filesystems/src/META-INF/upgrade/org.openide.filesystems.FileObject.hint b/openide.filesystems/src/META-INF/upgrade/org.openide.filesystems.FileObject.hint
     1.5 -new file mode 100644
     1.6 ---- /dev/null
     1.7 -+++ b/openide.filesystems/src/META-INF/upgrade/org.openide.filesystems.FileObject.hint
     1.8 -@@ -0,0 +1,23 @@
     1.9 -+'FileObject.getPackageNameExt(char, char) is deprecated':
    1.10 -+   $0.getPackageNameExt('/', '.') :: $0 instanceof org.openide.FileObject
    1.11 -+=> $0.getPath()
    1.12 -+;;
    1.13 -+'FileObject.getPackageNameExt(char, char) is deprecated':
    1.14 -+   $0.getPackageNameExt($1, '.') :: $0 instanceof org.openide.FileObject && $1 instanceof char
    1.15 -+=> $0.getPath().replace('/', $1)
    1.16 -+;;
    1.17 -+
    1.18 -+'FileObject.isReadOnly() is deprecated':
    1.19 -+    $0.isReadOnly() :: $0 instanceof org.openide.FileObject
    1.20 -+=> !$0.canWrite()
    1.21 -+;;
    1.22 -+
    1.23 -+'Repository.getDefaultFileSystem()':
    1.24 -+   org.openide.filesystems.Repository.getDefault.getDefaultFileSystem()
    1.25 -+=> org.openide.filesystems.FileUtil.getConfigRoot()
    1.26 -+;;
    1.27 -+
    1.28 -+'Repository.getDefaultFileSystem()':
    1.29 -+   org.openide.filesystems.Repository.getDefault.getDefaultFileSystem().findResource($path) :: $path instanceof java.lang.String
    1.30 -+=> org.openide.filesystems.FileUtil.getConfigFile($path)
    1.31 -+;;
    1.32 -diff --git a/openide.loaders/src/META-INF/upgrade/org.openide.loaders.DataObject.hint b/openide.loaders/src/META-INF/upgrade/org.openide.loaders.DataObject.hint
    1.33 -new file mode 100644
    1.34 ---- /dev/null
    1.35 -+++ b/openide.loaders/src/META-INF/upgrade/org.openide.loaders.DataObject.hint
    1.36 -@@ -0,0 +1,3 @@
    1.37 -+'DataObject.getCookie is obsolette':
    1.38 -+$this.getCookie($1) :: $this instanceof org.openide.loaders.DataObject && $1 instanceof java.lang.Class
    1.39 -+   => $this.getLookup().lookup($1) ;;
    1.40 -diff --git a/openide.nodes/src/META-INF/upgrade/org.openide.nodes.Node.hint b/openide.nodes/src/META-INF/upgrade/org.openide.nodes.Node.hint
    1.41 -new file mode 100644
    1.42 ---- /dev/null
    1.43 -+++ b/openide.nodes/src/META-INF/upgrade/org.openide.nodes.Node.hint
    1.44 -@@ -0,0 +1,3 @@
    1.45 -+'Node.getCookie is obsolette':
    1.46 -+$this.getCookie($1) :: $this instanceof org.openide.loaders.DataObject && $1 instanceof java.lang.Class
    1.47 -+   => $this.getLookup().lookup($1) ;;
    1.48 -diff --git a/openide.text/src/META-INF/upgrade/org.openide.text.Line.hint b/openide.text/src/META-INF/upgrade/org.openide.text.Line.hint
    1.49 -new file mode 100644
    1.50 ---- /dev/null
    1.51 -+++ b/openide.text/src/META-INF/upgrade/org.openide.text.Line.hint
    1.52 -@@ -0,0 +1,12 @@
    1.53 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_TRY_SHOW, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.NONE, org.openide.text.Line.ShowVisibilityType.NONE, $1) ;;
    1.54 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_SHOW, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.NONE, $1) ;;
    1.55 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_GOTO, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.FOCUS, $1) ;;
    1.56 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_TOFRONT, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.FRONT, $1) ;;
    1.57 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_REUSE, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.REUSE, org.openide.text.Line.ShowVisibilityType.FOCUS, $1) ;;
    1.58 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_REUSE_NEW, $1) :: $1 instanceof int && $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.REUSE_NEW, org.openide.text.Line.ShowVisibilityType.FOCUS, $1) ;;
    1.59 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_TRY_SHOW) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.NONE, org.openide.text.Line.ShowVisibilityType.NONE) ;;
    1.60 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_SHOW) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.NONE) ;;
    1.61 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_GOTO) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.FOCUS) ;;
    1.62 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_TOFRONT) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.OPEN, org.openide.text.Line.ShowVisibilityType.FRONT) ;;
    1.63 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_REUSE) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.REUSE, org.openide.text.Line.ShowVisibilityType.FOCUS) ;;
    1.64 -+'Line.show is deprecated': $this.show(org.openide.text.Line.SHOW_REUSE_NEW) :: $this instanceof org.openide.text.Line => $this.show(org.openide.text.Line.ShowOpenType.REUSE_NEW, org.openide.text.Line.ShowVisibilityType.FOCUS) ;;
    1.65 -diff --git a/openide.util/src/META-INF/upgrade/org.openide.ErrorManager.hint b/openide.util/src/META-INF/upgrade/org.openide.ErrorManager.hint
    1.66 -new file mode 100644
    1.67 ---- /dev/null
    1.68 -+++ b/openide.util/src/META-INF/upgrade/org.openide.ErrorManager.hint
    1.69 -@@ -0,0 +1,104 @@
    1.70 -+'ErrorManager.notify is deprecated':
    1.71 -+$this.notify(org.openide.ErrorManager.UNKNOWN, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
    1.72 -+   =>org.openide.util.Exceptions.printStackTrace($1)
    1.73 -+   ;;
    1.74 -+
    1.75 -+'ErrorManager.notify is deprecated':
    1.76 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.EXCEPTION, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
    1.77 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, null, $1)
    1.78 -+   ;;
    1.79 -+
    1.80 -+'ErrorManager.notify is deprecated':
    1.81 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.EXCEPTION, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
    1.82 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, null, $1)
    1.83 -+   ;;
    1.84 -+
    1.85 -+'ErrorManager.notify is deprecated':
    1.86 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.INFORMATIONAL, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
    1.87 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.INFO, null, $1)
    1.88 -+   ;;
    1.89 -+
    1.90 -+'ErrorManager.notify is deprecated':
    1.91 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.USER, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
    1.92 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, null, $1)
    1.93 -+   ;;
    1.94 -+
    1.95 -+'ErrorManager.notify is deprecated':
    1.96 -+org.openide.ErrorManager.getDefault().notify(org.openide.ErrorManager.WARNING, $1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
    1.97 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, null, $1)
    1.98 -+   ;;
    1.99 -+
   1.100 -+'ErrorManager.notify is deprecated':
   1.101 -+$this.notify($1) :: $1 instanceof java.lang.Throwable && $this instanceof org.openide.ErrorManager
   1.102 -+   =>org.openide.util.Exceptions.printStackTrace($1)
   1.103 -+   ;;
   1.104 -+
   1.105 -+'ErrorManager.log is deprecated':
   1.106 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.UNKNOWN, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
   1.107 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.INFO, $1)
   1.108 -+   ;;
   1.109 -+
   1.110 -+'ErrorManager.log is deprecated':
   1.111 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.ERROR, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
   1.112 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.SEVERE, $1)
   1.113 -+   ;;
   1.114 -+
   1.115 -+'ErrorManager.log is deprecated':
   1.116 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.EXCEPTION, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
   1.117 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.SEVERE, $1)
   1.118 -+   ;;
   1.119 -+
   1.120 -+'ErrorManager.log is deprecated':
   1.121 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.INFORMATIONAL, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
   1.122 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.FINE, $1)
   1.123 -+   ;;
   1.124 -+
   1.125 -+'ErrorManager.log is deprecated':
   1.126 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.USER, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
   1.127 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, $1)
   1.128 -+   ;;
   1.129 -+
   1.130 -+'ErrorManager.log is deprecated':
   1.131 -+org.openide.ErrorManager.getDefault().log(org.openide.ErrorManager.WARNING, $1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
   1.132 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.WARNING, $1)
   1.133 -+   ;;
   1.134 -+
   1.135 -+'ErrorManager.log is deprecated':
   1.136 -+org.openide.ErrorManager.getDefault().log($1) :: $1 instanceof java.lang.String && $this instanceof org.openide.ErrorManager
   1.137 -+   =>java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.FINE, $1)
   1.138 -+   ;;
   1.139 -+
   1.140 -+'ErrorManager.isLoggable is deprecated':
   1.141 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.UNKNOWN) :: $this instanceof org.openide.ErrorManager
   1.142 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.INFO)
   1.143 -+   ;;
   1.144 -+
   1.145 -+'ErrorManager.isLoggable is deprecated':
   1.146 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.ERROR) :: $this instanceof org.openide.ErrorManager
   1.147 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.SEVERE)
   1.148 -+   ;;
   1.149 -+
   1.150 -+'ErrorManager.isLoggable is deprecated':
   1.151 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.EXCEPTION) :: $this instanceof org.openide.ErrorManager
   1.152 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.SEVERE)
   1.153 -+   ;;
   1.154 -+
   1.155 -+'ErrorManager.isLoggable is deprecated':
   1.156 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.INFORMATIONAL) :: $this instanceof org.openide.ErrorManager
   1.157 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.FINE)
   1.158 -+   ;;
   1.159 -+
   1.160 -+'ErrorManager.isLoggable is deprecated':
   1.161 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.USER) :: $this instanceof org.openide.ErrorManager
   1.162 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.WARNING)
   1.163 -+   ;;
   1.164 -+
   1.165 -+'ErrorManager.isLoggable is deprecated':
   1.166 -+org.openide.ErrorManager.getDefault().isLoggable(org.openide.ErrorManager.WARNING) :: $this instanceof org.openide.ErrorManager
   1.167 -+   =>java.util.logging.Logger.getLogger("global").isLoggable(java.util.logging.Level.WARNING)
   1.168 -+   ;;
   1.169 -+
   1.170 -+'ErrorManager.annotate is deprecated':
   1.171 -+$this.annotate($1, $2) :: $1 instanceof java.lang.Throwable && $2 instanceof java.lang.String  && $this instanceof org.openide.ErrorManager
   1.172 -+   =>org.openide.util.Exceptions.attachLocalizedMessage($1, $2)
   1.173 -+   ;;
   1.174 -diff --git a/openide.util/src/META-INF/upgrade/org.openide.util.Lookup.hint b/openide.util/src/META-INF/upgrade/org.openide.util.Lookup.hint
   1.175 -new file mode 100644
   1.176 ---- /dev/null
   1.177 -+++ b/openide.util/src/META-INF/upgrade/org.openide.util.Lookup.hint
   1.178 -@@ -0,0 +1,17 @@
   1.179 -+'Lookup.lookupAll can be used instead':
   1.180 -+$0.lookup(new org.openide.util.Lookup.Template($1)).allInstances() :: $0 instanceof org.openide.util.Lookup && $1 instanceof java.lang.Class
   1.181 -+=>
   1.182 -+$0.lookupAll($1)
   1.183 -+;;
   1.184 -+
   1.185 -+'Lookup.lookupResult can be used instead':
   1.186 -+$0.lookup(new org.openide.util.Lookup.Template($1)) :: $0 instanceof org.openide.util.Lookup && $1 instanceof java.lang.Class && !parentMatches("$_.allInstances()")
   1.187 -+=>
   1.188 -+$0.lookupResult($1)
   1.189 -+;;
   1.190 -+
   1.191 -+'Lookup.Template() is deprecated':
   1.192 -+new org.openide.util.Lookup.Template()
   1.193 -+=>
   1.194 -+new org.openide.util.Lookup.Template(java.lang.Object.class)
   1.195 -+;;
   1.196 -diff --git a/openide.util/src/META-INF/upgrade/org.openide.util.Utilities.hint b/openide.util/src/META-INF/upgrade/org.openide.util.Utilities.hint
   1.197 -new file mode 100644
   1.198 ---- /dev/null
   1.199 -+++ b/openide.util/src/META-INF/upgrade/org.openide.util.Utilities.hint
   1.200 -@@ -0,0 +1,19 @@
   1.201 -+'Utilities.mergeImages is deprecated':
   1.202 -+   org.openide.util.Utilities.mergeImages($1, $2, $3, $4) :: $1 instanceof java.awt.Image && $2 instanceof java.awt.Image && $3 instanceof int && $4 instanceof int
   1.203 -+=> org.openide.util.ImageUtilities.mergeImages($1, $2, $3, $4)
   1.204 -+;;
   1.205 -+
   1.206 -+'Utilities.loadImage is deprecated':
   1.207 -+   org.openide.util.Utilities.loadImage($1) :: $1 instanceof String
   1.208 -+=> org.openide.util.ImageUtilities.loadImage($1)
   1.209 -+;;
   1.210 -+
   1.211 -+'Utilities.icon2Image is deprecated':
   1.212 -+   org.openide.util.Utilities.icon2Image($1) :: $1 instanceof javax.swing.Icon
   1.213 -+=> org.openide.util.ImageUtilities.icon2Image($1)
   1.214 -+;;
   1.215 -+
   1.216 -+'Utilities.image2Icon can be used instead of new ImageIcon':
   1.217 -+   new javax.swing.ImageIcon($1) :: $1 instanceof java.awt.Image
   1.218 -+=> org.openide.util.ImageUtilities.image2Icon($1)
   1.219 -+;;
   1.220 -diff --git a/openide.util/test/unit/src/META-INF/upgrade/org.openide.util.Utilities.test b/openide.util/test/unit/src/META-INF/upgrade/org.openide.util.Utilities.test
   1.221 -new file mode 100644
   1.222 ---- /dev/null
   1.223 -+++ b/openide.util/test/unit/src/META-INF/upgrade/org.openide.util.Utilities.test
   1.224 -@@ -0,0 +1,86 @@
   1.225 -+%%TestCase mergeImages1
   1.226 -+package test;
   1.227 -+import java.awt.Image;
   1.228 -+import org.openide.util.Utilities;
   1.229 -+public class Test {
   1.230 -+    private void test() {
   1.231 -+        Image i1 = null, i2 = null;
   1.232 -+        Utilities.mergeImages(i1, i2, -9, 34);
   1.233 -+    }
   1.234 -+}
   1.235 -+%%=>
   1.236 -+package test;
   1.237 -+import java.awt.Image;
   1.238 -+import org.openide.util.ImageUtilities;
   1.239 -+import org.openide.util.Utilities;
   1.240 -+public class Test {
   1.241 -+    private void test() {
   1.242 -+        Image i1 = null, i2 = null;
   1.243 -+        ImageUtilities.mergeImages(i1, i2, -9, 34);
   1.244 -+    }
   1.245 -+}
   1.246 -+%%TestCase loadImage1
   1.247 -+package test;
   1.248 -+import java.awt.Image;
   1.249 -+import org.openide.util.Utilities;
   1.250 -+public class Test {
   1.251 -+    private void test() {
   1.252 -+        Utilities.loadImage("foobar");
   1.253 -+    }
   1.254 -+}
   1.255 -+%%=>
   1.256 -+package test;
   1.257 -+import java.awt.Image;
   1.258 -+import org.openide.util.ImageUtilities;
   1.259 -+import org.openide.util.Utilities;
   1.260 -+public class Test {
   1.261 -+    private void test() {
   1.262 -+        ImageUtilities.loadImage("foobar");
   1.263 -+    }
   1.264 -+}
   1.265 -+%%TestCase icon2Image1
   1.266 -+package test;
   1.267 -+import javax.swing.Icon;
   1.268 -+import org.openide.util.Utilities;
   1.269 -+public class Test {
   1.270 -+    private void test() {
   1.271 -+        Icon i = null;
   1.272 -+        Utilities.icon2Image(i);
   1.273 -+    }
   1.274 -+}
   1.275 -+%%=>
   1.276 -+package test;
   1.277 -+import javax.swing.Icon;
   1.278 -+import org.openide.util.ImageUtilities;
   1.279 -+import org.openide.util.Utilities;
   1.280 -+public class Test {
   1.281 -+    private void test() {
   1.282 -+        Icon i = null;
   1.283 -+        ImageUtilities.icon2Image(i);
   1.284 -+    }
   1.285 -+}
   1.286 -+%%TestCase image2Icon1
   1.287 -+package test;
   1.288 -+import java.awt.Image;
   1.289 -+import javax.swing.Icon;
   1.290 -+import javax.swing.ImageIcon;
   1.291 -+import org.openide.util.Utilities;
   1.292 -+public class Test {
   1.293 -+    private void test() {
   1.294 -+        Image img = null;
   1.295 -+        Icon i = new ImageIcon(img);
   1.296 -+    }
   1.297 -+}
   1.298 -+%%=>
   1.299 -+package test;
   1.300 -+import java.awt.Image;
   1.301 -+import javax.swing.Icon;
   1.302 -+import javax.swing.ImageIcon;
   1.303 -+import org.openide.util.ImageUtilities;
   1.304 -+import org.openide.util.Utilities;
   1.305 -+public class Test {
   1.306 -+    private void test() {
   1.307 -+        Image img = null;
   1.308 -+        Icon i = ImageUtilities.image2Icon(img);
   1.309 -+    }
   1.310 -+}