Community
Participate
Working Groups
HEAD The code in org.eclipse.jdt.internal.ui.jarpackagerfat is hard to maintain because relevant string literals are spread and duplicated in various classes, e.g. JarRsrcLoader, RsrcURLStreamHandler, FatJarRsrcUrlAntExporter, FatJarRsrcUrlManifestProvider, etc. String literals like "Rsrc-Main-Class", "rsrc" (the URL protocol), etc. should be extracted into constants and moved into a few selected classes. Coordinate this with bug 262746 (move redistributable classes into a separate source folder).
Ferenc, could you provide a patch for this?
I will keep this on hold until bug 262746 is fixed.
Please put the constants from org.eclipse.jdt.internal.jarinjarloader into JarRsrcLoader.java and don't refer to them from org.eclipse.jdt.internal.ui.jarpackagerfat (they would not be visible in the built plug-in). Just use the same constant names, e.g. in FatJarRsrcUrlAntExporter
I will add a patch next week
> I will add a patch next week Thanks. Next week is M6 and we won't have time to release it then, but I'll look at it early M7.
ping.
Oops, shame on me... I will get on with it!
Created attachment 150566 [details] extracted constants into class JIJConst the patch extracts constant strings regarding the jar in jar loader into the Class JIJConst. The class exists twice. Once for the loader and once for the export wizard.
Thanks, released to HEAD with a few changes: - replaced JIJConst.JAR_MANIFEST with JarFile.MANIFEST_NAME - renamed JIJConst to JIJConstants - removed @author tags - added @since 3.6 - removed unused constants - formatting