sdedic closed pull request #257: Backport of jtulach's fixes made after Apr 22, 
2017
URL: https://github.com/apache/incubator-netbeans/pull/257
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/wizard/LibraryStartVisualPanel.java
 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/wizard/LibraryStartVisualPanel.java
index 10b755283..4775669db 100644
--- 
a/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/wizard/LibraryStartVisualPanel.java
+++ 
b/apisupport.ant/src/org/netbeans/modules/apisupport/project/ui/wizard/LibraryStartVisualPanel.java
@@ -201,14 +201,16 @@ static String populateProjectData(NewModuleProjectData 
data, String paths, boole
                 jf = new JarFile(fil);
                 if(assignValues) {
                     Manifest manifest = jf.getManifest();
-                    Attributes attributes = manifest.getMainAttributes();
-                    if(attributes.getValue("Specification-Title") != null) {
-                        
data.setProjectName(attributes.getValue("Specification-Title").replaceAll("[0-9._-]+$",
 "").replaceAll(" ", "-"));
-                    } else {
-                        if (manifest.getEntries().size() == 1) {
-                            attributes = 
manifest.getEntries().values().iterator().next();
-                            if(attributes.getValue("Specification-Title") != 
null) {
-                                
data.setProjectName(attributes.getValue("Specification-Title").replaceAll("[0-9._-]+$",
 "").replaceAll(" ", "-"));
+                    if (manifest != null) {
+                        Attributes attributes = manifest.getMainAttributes();
+                        if(attributes.getValue("Specification-Title") != null) 
{
+                            
data.setProjectName(attributes.getValue("Specification-Title").replaceAll("[0-9._-]+$",
 "").replaceAll(" ", "-"));
+                        } else {
+                            if (manifest.getEntries().size() == 1) {
+                                attributes = 
manifest.getEntries().values().iterator().next();
+                                if(attributes.getValue("Specification-Title") 
!= null) {
+                                    
data.setProjectName(attributes.getValue("Specification-Title").replaceAll("[0-9._-]+$",
 "").replaceAll(" ", "-"));
+                                }
                             }
                         }
                     }
diff --git a/core.startup/src/org/netbeans/core/startup/CoreBridge.java 
b/core.startup/src/org/netbeans/core/startup/CoreBridge.java
index fc56d82f2..5a9436ae6 100644
--- a/core.startup/src/org/netbeans/core/startup/CoreBridge.java
+++ b/core.startup/src/org/netbeans/core/startup/CoreBridge.java
@@ -192,8 +192,14 @@ public static void defineOsTokens(Collection<? super 
String> provides) {
     }
 
     static boolean isJavaFX(File javaHome) {
-        return 
-            new File(new File(javaHome, "lib"), "jfxrt.jar").exists() || 
-            new File(new File(new File(javaHome, "lib"), "ext"), 
"jfxrt.jar").exists();
+        try {
+            Class.forName("javafx.application.Platform"); // NOI18N
+            return true;
+        } catch (ClassNotFoundException ex) {
+            return
+                new File(new File(javaHome, "lib"), "jfxrt.jar").exists() ||
+                new File(new File(new File(javaHome, "lib"), "ext"), 
"jfxrt.jar").exists();
+
+        }
     }
 }
diff --git 
a/core.startup/test/unit/src/org/netbeans/core/startup/CoreBridgeTest.java 
b/core.startup/test/unit/src/org/netbeans/core/startup/CoreBridgeTest.java
index a29afd59c..3d8d3ff8b 100644
--- a/core.startup/test/unit/src/org/netbeans/core/startup/CoreBridgeTest.java
+++ b/core.startup/test/unit/src/org/netbeans/core/startup/CoreBridgeTest.java
@@ -71,15 +71,6 @@ protected void setUp() throws Exception {
         assertTrue("Dirs created", ext.isDirectory());
     }
     
-    public void testNoJavaFX() {
-        assertFalse("No fx rt.jar", CoreBridge.isJavaFX(jre));
-    }
-    
-    public void testJDK7FX() throws IOException {
-        new File(lib, "jfxrt.jar").createNewFile();
-        assertTrue("fx rt.jar found", CoreBridge.isJavaFX(jre));
-    }
-
     public void testJDK8FX() throws IOException {
         new File(ext, "jfxrt.jar").createNewFile();
         assertTrue("fx rt.jar found", CoreBridge.isJavaFX(jre));
diff --git a/o.n.bootstrap/src/org/netbeans/StandardModuleData.java 
b/o.n.bootstrap/src/org/netbeans/StandardModuleData.java
index 5d15aeee9..a095b5096 100644
--- a/o.n.bootstrap/src/org/netbeans/StandardModuleData.java
+++ b/o.n.bootstrap/src/org/netbeans/StandardModuleData.java
@@ -106,12 +106,13 @@ public StandardModuleData(Manifest mf, StandardModule 
forModule) throws InvalidE
                 if (ext.equals("${java.home}/lib/ext/jfxrt.jar")) { // NOI18N
                     // special handling on JDK7
                     File jre = new File(System.getProperty("java.home")); // 
NOI18N
-                    File jdk8 = new File(new File(new File(jre, "lib"), 
"ext"), "jfxrt.jar"); // NOI18N
-                    if (jdk8.exists()) {
-                        // jdk8 has the classes on bootclasspath
+                    File jdk7 = new File(new File(jre, "lib"), "jfxrt.jar"); 
// NOI18N
+                    if (jdk7.exists()) {
+                        extfile = jdk7; // NOI18N
+                    } else {
+                        // jdk8 and 9 have the classes on bootclasspath
                         continue;
                     }
-                    extfile = new File(new File(jre, "lib"), "jfxrt.jar"); // 
NOI18N
                 } else {
                     if (new File(ext).isAbsolute()) { // NOI18N
                         Util.err.log(Level.WARNING, "Class-Path value {0} from 
{1} is illegal according to the Java Extension Mechanism: must be relative", 
new Object[]{ext, jar});
diff --git 
a/updatecenters/src/org/netbeans/modules/updatecenters/resources/Bundle.properties
 
b/updatecenters/src/org/netbeans/modules/updatecenters/resources/Bundle.properties
index b56ced593..68380854b 100644
--- 
a/updatecenters/src/org/netbeans/modules/updatecenters/resources/Bundle.properties
+++ 
b/updatecenters/src/org/netbeans/modules/updatecenters/resources/Bundle.properties
@@ -50,7 +50,10 @@ OpenIDE-Module-Short-Description=Declares NetBeans 
autoupdate centers.
 
 Services/AutoupdateType/dev-update-provider.instance=Additional Development 
Plugins
 Services/AutoupdateType/standard-update-provider.instance=Latest Development 
Build
+Services/AutoupdateType/pluginportal-update-provider.instance=Plugin Portal
 #NOI18N
 
URL_LatestBuild=http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz
 #NOI18N
 
URL_Default_N=http://updates.netbeans.org/netbeans/updates/dev/uc/final/main/catalog.xml.gz?{$netbeans.hash.code}
+#NOI18N
+URL_PluginPortal=http://plugins.netbeans.org/nbpluginportal/updates/8.2/catalog.xml.gz
diff --git 
a/updatecenters/src/org/netbeans/modules/updatecenters/resources/mf-layer.xml 
b/updatecenters/src/org/netbeans/modules/updatecenters/resources/mf-layer.xml
index 8a6c911d0..048a32c7e 100644
--- 
a/updatecenters/src/org/netbeans/modules/updatecenters/resources/mf-layer.xml
+++ 
b/updatecenters/src/org/netbeans/modules/updatecenters/resources/mf-layer.xml
@@ -70,6 +70,15 @@ made subject to such option by the copyright holder.
           <attr name="instanceCreate" 
methodvalue="org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogFactory.createUpdateProvider"
 />
       </file>
 
+      <file name="pluginportal-update-provider.instance">
+         <attr name="displayName" 
bundlevalue="org.netbeans.modules.updatecenters.resources.Bundle#Services/AutoupdateType/pluginportal-update-provider.instance"/>
+         <attr name="iconBase" 
stringvalue="org/netbeans/modules/updatecenters/resources/updateAction.gif"/>
+         <attr name="url" 
bundlevalue="org.netbeans.modules.updatecenters.resources.Bundle#URL_PluginPortal"/>
+         <attr name="category" stringvalue="COMMUNITY"/>
+         <attr name="enabled" boolvalue="true"/>
+         <attr name="instanceOf" 
stringvalue="org.netbeans.spi.autoupdate.UpdateProvider"/>
+         <attr name="instanceCreate" 
methodvalue="org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogFactory.createUpdateProvider"/>
+      </file>
    </folder>
     
   </folder> <!-- Services -->


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to