jtulach commented on code in PR #5157:
URL: https://github.com/apache/netbeans/pull/5157#discussion_r1059466485
##########
java/java.platform/src/org/netbeans/modules/java/platform/queries/PlatformSourceForBinaryQuery.java:
##########
@@ -94,24 +94,46 @@ public SourceForBinaryQueryImplementation2.Result
findSourceRoots2(URL binaryRoo
this.cache.put (binaryRoot, res);
return res;
}
- String binaryRootS = binaryRoot.toExternalForm();
- if (binaryRootS.startsWith(JAR_FILE)) {
- if (binaryRootS.endsWith(RTJAR_PATH)) {
- //Unregistered platform
- String srcZipS = binaryRootS.substring(4,binaryRootS.length()
- RTJAR_PATH.length()) + SRC_ZIP;
- try {
- URL srcZip = FileUtil.getArchiveRoot(new URL(srcZipS));
- FileObject fo = URLMapper.findFileObject(srcZip);
- if (fo != null) {
- return new UnregisteredPlatformResult (fo);
- }
- } catch (MalformedURLException mue) {
- Exceptions.printStackTrace(mue);
- }
- }
+ return searchUnregisteredPlatform(binaryRoot.toExternalForm());
+ }
+
+ static SourceForBinaryQueryImplementation2.Result
searchUnregisteredPlatform(String binaryRootS) {
+ String srcZipS = null;
+ String srcZipIn = null;
+ if (binaryRootS.startsWith(JAR_FILE)) {
+ if (binaryRootS.endsWith(RTJAR_PATH)) {
Review Comment:
A project type can provide some default `AuxiliarySettings` -
[java.mx.project
module](https://github.com/apache/netbeans/blob/master/java/java.mx.project/src/org/netbeans/modules/java/mx/project/SuiteProperties.java#L54)
is doing that to influence the Eclipse formatter (used for mx projects).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists