Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 518542

Summary: Remove XULRunner related code from SWT source repository
Product: [Eclipse Project] Platform Reporter: Lakshmi P Shanmugam <lshanmug>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, krzysztof.daniel, lufimtse, niraj.modi
Version: 4.7   
Target Milestone: 4.8 M1   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/99830
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=6ce6e56eb49a6aa3a12ce2140a0f645922afb108
https://git.eclipse.org/r/99894
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=c066068b7af86eead3d8038f9c5eff5eec4c55a7
https://git.eclipse.org/r/100030
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=16ccb324f949ee915ca80a80cba992d5d1dc7eb0
https://git.eclipse.org/r/100108
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=32c670eab330a7b35bc6f5a678c799c6fc849ec5
https://git.eclipse.org/r/100120
https://git.eclipse.org/r/100121
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=c7873a6d67287d549d73d2bb69b08a1385cd0784
https://git.eclipse.org/c/platform/eclipse.platform.swt.binaries.git/commit/?id=ced97010eb138670ab61ab535adfb68fa5e8ec01
https://git.eclipse.org/r/100314
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=18326ae5bb99e1bc2fe12f7d3b1b1b678c9b97b5
https://git.eclipse.org/r/100429
https://git.eclipse.org/r/100430
https://git.eclipse.org/c/www.eclipse.org/swt.git/commit/?id=cc26a81cb65b6e8e1ef17258d890a7016732bed9
Whiteboard:
Bug Depends on:    
Bug Blocks: 518446    

Description Lakshmi P Shanmugam CLA 2017-06-21 01:08:33 EDT
Remove XULRunner related code for all platforms from SWT source repository. Also, remove related code in tests, snippets & examples.
Comment 1 Eclipse Genie CLA 2017-06-22 06:15:15 EDT
New Gerrit change created: https://git.eclipse.org/r/99830
Comment 3 Lakshmi P Shanmugam CLA 2017-06-22 08:57:51 EDT
The above commit deprecates SWT.MOZILLA and Browser.getWebBrowser().

SWT.MOZILLA style will be ignored and code will fallback to using default browser (SWT.NONE style) if SWT.WEBKIT is not specified.
Comment 4 Eclipse Genie CLA 2017-06-22 12:24:54 EDT
New Gerrit change created: https://git.eclipse.org/r/99894
Comment 6 Lakshmi P Shanmugam CLA 2017-06-23 07:32:25 EDT
Found that we can't remove the code entirely from Mozilla source folder now. The org.eclipse.swt.internal.mozilla package is exported by fragments and all the classes in the package have APIs. So, I plan to deprecate the package using package-info.java file.
Also, removing org.eclipse.swt.browser from the Mozilla source folder causes API tools error on Mac. It doesn't have API but the package is exported. Will verify this again.
Comment 7 Eclipse Genie CLA 2017-06-26 05:18:13 EDT
New Gerrit change created: https://git.eclipse.org/r/100030
Comment 9 Alexander Kurtakov CLA 2017-06-26 06:27:55 EDT
(In reply to Lakshmi Shanmugam from comment #6)
> Found that we can't remove the code entirely from Mozilla source folder now.
> The org.eclipse.swt.internal.mozilla package is exported by fragments and
> all the classes in the package have APIs. So, I plan to deprecate the
> package using package-info.java file.
> Also, removing org.eclipse.swt.browser from the Mozilla source folder causes
> API tools error on Mac. It doesn't have API but the package is exported.
> Will verify this again.

It's internal package so I don't see an issue with removing it ? Further more keeping the java code without so files looks really weird.
Comment 10 Alexander Kurtakov CLA 2017-06-26 06:36:12 EDT
Looking more into the o.e.swt.browser classes in Mozilla dir - all of them are package private so I don't see how this can be considered API breakage. What is the API tool error you see?
Comment 11 Lakshmi P Shanmugam CLA 2017-06-27 05:58:36 EDT
(In reply to Alexander Kurtakov from comment #10)
> Looking more into the o.e.swt.browser classes in Mozilla dir - all of them
> are package private so I don't see how this can be considered API breakage.
> What is the API tool error you see?

I verified this in another workspace. Removing the o.e.swt.browser package in the Mozilla source folder gives me this API Tools error-> The major version should be incremented in version 3.106.100, since API breakage occurred since version 3.106.0. 
If I remove all the content from the package, but leave the empty package, I don't get the error.
Comment 12 Alexander Kurtakov CLA 2017-06-27 06:59:43 EDT
(In reply to Lakshmi Shanmugam from comment #11)
> (In reply to Alexander Kurtakov from comment #10)
> > Looking more into the o.e.swt.browser classes in Mozilla dir - all of them
> > are package private so I don't see how this can be considered API breakage.
> > What is the API tool error you see?
> 
> I verified this in another workspace. Removing the o.e.swt.browser package
> in the Mozilla source folder gives me this API Tools error-> The major
> version should be incremented in version 3.106.100, since API breakage
> occurred since version 3.106.0. 
> If I remove all the content from the package, but leave the empty package, I
> don't get the error.

This is really weird. o.e.swt.browser has common content that lives outside of Mozilla implementation (Progress, StatusText, Title and etc. listeners) so this package wouldn't be empty after removing the mozilla code. Do you want me to propose a patch here so we can speak over smth real?
Comment 13 Eclipse Genie CLA 2017-06-27 07:20:33 EDT
New Gerrit change created: https://git.eclipse.org/r/100108
Comment 15 Eclipse Genie CLA 2017-06-27 08:26:09 EDT
New Gerrit change created: https://git.eclipse.org/r/100120
Comment 16 Eclipse Genie CLA 2017-06-27 08:27:23 EDT
New Gerrit change created: https://git.eclipse.org/r/100121
Comment 17 Alexander Kurtakov CLA 2017-06-27 08:30:25 EDT
Lakshmi, with the 2 patches I don't see any warnings/errors. If there are still some API warnings I propose adding filters for them as we are not removing any API here.
Comment 20 Lakshmi P Shanmugam CLA 2017-06-29 02:41:11 EDT
(In reply to Alexander Kurtakov from comment #17)
> Lakshmi, with the 2 patches I don't see any warnings/errors. If there are
> still some API warnings I propose adding filters for them as we are not
> removing any API here.

Thanks for the patches, Alex. I had made similar changes and applying your patch too gave me the same API tool errors. After some debugging found that the problems were caused by the SWT tools installed in my Eclipse. Uninstalling it & installing the latest fixed the problems for me.
Comment 21 Eclipse Genie CLA 2017-06-29 02:44:04 EDT
New Gerrit change created: https://git.eclipse.org/r/100314
Comment 22 Alexander Kurtakov CLA 2017-06-29 02:44:37 EDT
(In reply to Lakshmi Shanmugam from comment #20)
> (In reply to Alexander Kurtakov from comment #17)
> > Lakshmi, with the 2 patches I don't see any warnings/errors. If there are
> > still some API warnings I propose adding filters for them as we are not
> > removing any API here.
> 
> Thanks for the patches, Alex. I had made similar changes and applying your
> patch too gave me the same API tool errors. After some debugging found that
> the problems were caused by the SWT tools installed in my Eclipse.
> Uninstalling it & installing the latest fixed the problems for me.

Ah, yes. In one of the previous patches I fixed swt.tools to not look for mozilla stuff anymore :).
Comment 24 Leo Ufimtsev CLA 2017-06-29 18:07:25 EDT
Hello guys, 


I haven't been keeping track of things, but something that came to my attention is that now on my Win10 VM, the MANIFEST.MF of
	org.eclipse.swt.win32.win32.x86_64  [in swt.binaries git]
is complaining that package:
	org.eclipse.swt.internal.mozilla; 
does not exist in this plug-in (in the list of exported packages).

If I delete the export from the MANIFEST.MF, the error goes away.

Can we remove the package from MANIFEST.MF?
Comment 25 Eclipse Genie CLA 2017-06-30 02:22:24 EDT
New Gerrit change created: https://git.eclipse.org/r/100429
Comment 26 Eclipse Genie CLA 2017-06-30 02:33:09 EDT
New Gerrit change created: https://git.eclipse.org/r/100430
Comment 27 Lakshmi P Shanmugam CLA 2017-06-30 02:46:28 EDT
(In reply to Leo Ufimtsev from comment #24)
> Hello guys, 
> 
> 
> I haven't been keeping track of things, but something that came to my
> attention is that now on my Win10 VM, the MANIFEST.MF of
> 	org.eclipse.swt.win32.win32.x86_64  [in swt.binaries git]
> is complaining that package:
> 	org.eclipse.swt.internal.mozilla; 
> does not exist in this plug-in (in the list of exported packages).
> 
> If I delete the export from the MANIFEST.MF, the error goes away.
> 
> Can we remove the package from MANIFEST.MF?

Thanks for pointing it out, fixed via --> http://git.eclipse.org/c/platform/eclipse.platform.swt.binaries.git/commit/?id=9f834a6dd55e57be67e63369e19547f99b34ec44
Comment 29 Leo Ufimtsev CLA 2017-06-30 12:05:19 EDT
(In reply to Lakshmi Shanmugam from comment #27)
> Thanks for pointing it out, fixed via -->

thnx dude.
Comment 30 Alexander Kurtakov CLA 2017-07-04 02:10:59 EDT
Marking this one as resolved as all mozilla code is gone from the swt repo.
Comment 31 Alexander Kurtakov CLA 2017-07-04 13:24:18 EDT
*** Bug 380867 has been marked as a duplicate of this bug. ***