You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/06/19 07:24:23 UTC

[GitHub] [netbeans] tzezula commented on a change in pull request #1307: Added support for per-project platform for mx projects.

tzezula commented on a change in pull request #1307: Added support for per-project platform for mx projects.
URL: https://github.com/apache/netbeans/pull/1307#discussion_r295154094
 
 

 ##########
 File path: java/java.project/src/org/netbeans/spi/java/project/support/ProjectPlatform.java
 ##########
 @@ -76,28 +75,53 @@ public static JavaPlatform forProject(
             @NonNull final String platformType) {
         Parameters.notNull("owner", owner); //NOI18N
         Parameters.notNull("eval", eval); //NOI18N
-        Parameters.notNull("platformType", platformType);   //NOI18N        
-        final String platformName = eval.getProperty(PLATFORM_ACTIVE);        
+        Parameters.notNull("platformType", platformType);   //NOI18N
+        final String platformName = eval.getProperty(PLATFORM_ACTIVE);
         final FileObject jdkHome = resolvePlatformHome(
                 platformName,
                 owner.getProjectDirectory(),
                 eval);
         if (jdkHome == null) {
             return null;
         }
+        return forProject(owner, jdkHome, platformName, platformType);
+    }
+
+    /**
+     * Creates a transient {@link JavaPlatform} defined in given {@link Project}.
+     * @param owner the project to return the {@link JavaPlatform} for
+     * @param platformHome the {@link JavaPlatform} install folder
+     * @param platformName the {@link JavaPlatform} system name uniquely identifying the platform.
+     * The name has to be valid property name, use the {@link PropertyUtils#getUsablePropertyName(java.lang.String)} to create the name.
+     * For the Ant based project the platform name is a value of {@code platform.active} property.
 
 Review comment:
   I will add apichange.xml.
   Regarding the ` For the Ant based project...` I agree, but I have no other place to describe the contract required by Ant project. Ant project's broken project support depends on it. So I prefer to keep it here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists