? core/src/META-INF Index: core/release/bin/runideopenvms.com =================================================================== RCS file: /cvs/core/release/bin/runideopenvms.com,v retrieving revision 1.8 diff -u -u -r1.8 runideopenvms.com --- core/release/bin/runideopenvms.com 30 Oct 2001 13:47:22 -0000 1.8 +++ core/release/bin/runideopenvms.com 6 Dec 2001 12:49:53 -0000 @@ -184,6 +184,39 @@ $ endif $ endif $ +$! Check if the Java setup command procedure from a different version of the +$! JDK that we'll be using was previously executed. We do this by seeing if +$! the symbol JAVA is defined and, if it is, extracting the Java version from +$! the symbol's value. If defined and different from what we're going to use, +$! display a message to the user that a CANCEL_SETUP command procedure must +$! be executed before running NetBeans. +$ if f$type(java) .nes. "" +$ then +$ java_version = f$edit(f$parse(java,,, "DIRECTORY"), "UPCASE") +$ java_version = f$element(0, ".", java_version) - "[" +$ jdk_version = f$edit(((f$parse(jdk_home,,, "DIRECTORY") - "[") - "]"), "UPCASE") +$ if java_version .nes. jdk_version +$ then +$ cancel_procedure = (jdk_home - "]") + ".COM]" +java_version + "_CANCEL_SETUP.COM" +$ if f$search(cancel_procedure) .nes. "" +$ then +$ @'cancel_procedure' +$ else +$ write sys$output "" +$ write sys$output "Your process has symbol and logical name definitions that were created by a" +$ write sys$output "different version of Java than what will be used by the IDE. To run the IDE," +$ write sys$output "you must execute a command procedure which will reset your process so that the" +$ write sys$output "required version of Java will run properly. The command procedure name is:" +$ write sys$output java_version, "_CANCEL_SETUP.COM" +$ write sys$output "" +$ write sys$output "If you do not have this file on your system, please refer to the " +$ write sys$output "release notes for information on obtaining this file." +$ write sys$output "" +$ exit +$ endif +$ endif +$ endif +$ $! Create the path to the NetBeans kit. If the NETBEANS$HOME logical is $! defined, use its value as the NetBeans kit path. If not defined, assume $! this command file is executed from one level below the NetBeans root Index: core/src/org/netbeans/core/ExLocalFileSystem.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/ExLocalFileSystem.java,v retrieving revision 1.18 diff -u -u -r1.18 ExLocalFileSystem.java --- core/src/org/netbeans/core/ExLocalFileSystem.java 20 Jul 2001 13:58:09 -0000 1.18 +++ core/src/org/netbeans/core/ExLocalFileSystem.java 6 Dec 2001 12:49:53 -0000 @@ -24,6 +24,7 @@ import org.openide.filesystems.*; import org.openide.loaders.ExtensionList; import org.openide.util.RequestProcessor; +import org.openide.util.Utilities; /** Enhanced version of local file system that also takes care about * backuping of saving files. @@ -105,8 +106,23 @@ return null; } - int j = 0; for (int i = 0; i < arr.length; i++) { + if ( Utilities.getOperatingSystem () == Utilities.OS_VMS ) { + // In NB 3.2.x for OpenVMS, we had to use the "_" as a backup extension. + // However, OpenVMS now supports various special characters including "~". + // So we now have to change the existing backup files ending with "_" into "~". + // + + if ( arr[i].endsWith (".java_") ) { + try { + String newBackupFile = arr[i].substring (0, arr[i].length()-1) + BACKUP_EXT; + super.rename (name + "/" + arr[i], name + "/" + newBackupFile); + arr[i] = new String (newBackupFile); + } catch (IOException fex) { + } + } + } + if (arr[i].endsWith (BACKUP_EXT) || (ignoredRE != null && ignoredRE.match (arr[i]))) { arr[i] = null; } @@ -296,6 +312,4 @@ } } } - - } Index: openide/src/org/openide/filesystems/DefaultAttributes.java =================================================================== RCS file: /cvs/openide/src/org/openide/filesystems/DefaultAttributes.java,v retrieving revision 1.52 diff -u -u -r1.52 DefaultAttributes.java --- openide/src/org/openide/filesystems/DefaultAttributes.java 6 Nov 2001 12:14:52 -0000 1.52 +++ openide/src/org/openide/filesystems/DefaultAttributes.java 6 Dec 2001 12:50:01 -0000 @@ -20,6 +20,7 @@ import org.openide.util.NbBundle; import org.openide.util.enum.EmptyEnumeration; import org.openide.util.io.NbMarshalledObject; +import org.openide.util.Utilities; import org.xml.sax.*; import org.xml.sax.helpers.ParserFactory; @@ -152,7 +153,20 @@ int size = arr.length; - if (size == 1) { + if (size == 1) { + // In NB 3.2.x for OpenVMS, we had to use "_nbattrs." as a attribute file. + // However, OpenVMS now supports a file name beginning with "." + // So we now have to change the existing "_nbattrs." file into ".nbattrs" + // + if (Utilities.getOperatingSystem () == Utilities.OS_VMS && arr[0] != null && f != null) { + if (arr[0].equalsIgnoreCase ("_nbattrs.")) { + try { + renameVMSAttrFile (f); + } catch (IOException ioe) {} + arr[0] = new String (ATTR_NAME_EXT_XML); + } + } + if ((ATTR_NAME_EXT_XML.equals(arr[0]) || ATTR_NAME_EXT.equals(arr[0]))) { try { change.delete(f+"/"+arr[0]); // NOI18N @@ -162,6 +176,19 @@ } for (int i = 0; i < size; i++) { + // In NB 3.2.x for OpenVMS, we had to use "_nbattrs." as a attribute file. + // However, OpenVMS now supports a file name beginning with "." + // So we now have to change the existing "_nbattrs." file into ".nbattrs" + // + if (Utilities.getOperatingSystem () == Utilities.OS_VMS && arr[i] != null && f != null) { + if (arr[i].equalsIgnoreCase ("_nbattrs.")) { + try { + renameVMSAttrFile (f); + } catch (IOException ioe) {} + arr[i] = new String (ATTR_NAME_EXT_XML); + } + } + if (ATTR_NAME_EXT.equals (arr[i]) || ATTR_NAME_EXT_XML.equals (arr[i])) { // exclude this index arr[i] = null; @@ -172,6 +199,40 @@ return arr; } + /** Renames the attribute file for OpenVMS platform. + * The method renames "_nbattrs." into ".nbattrs". + * We cannot simply use the change.rename method + * because of the special property of OpenVMS having to do with + * a file name starting with "." + * + * @param f the folder containg the attribute file + */ + private void renameVMSAttrFile (String f) throws IOException { + InputStream is = null; + OutputStream os = null; + + try { + change.createData (f+"/"+ATTR_NAME_EXT_XML); + is = info.inputStream (f+"/"+"_nbattrs."); + os = info.outputStream (f+"/"+ATTR_NAME_EXT_XML); + + byte [] buf = new byte[256]; + int readi; + while ( (readi=is.read(buf,0,256)) >= 0x0 ) { + os.write (buf,0,readi); + } + + is.close (); + change.delete (f+"/"+"_nbattrs."); + is = null; + } catch (IOException ie) { + } finally { + if (is != null) + is.close (); + if (os != null) + os.close (); + } + } // JST: Description //