This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 18368
Collapse All | Expand All

(-)core/release/bin/runideopenvms.com (+33 lines)
Lines 184-189 Link Here
184
$   endif
184
$   endif
185
$ endif
185
$ endif
186
$
186
$
187
$! Check if the Java setup command procedure from a different version of the
188
$! JDK that we'll be using was previously executed. We do this by seeing if
189
$! the symbol JAVA is defined and, if it is, extracting the Java version from
190
$! the symbol's value. If defined and different from what we're going to use,
191
$! display a message to the user that a CANCEL_SETUP command procedure must
192
$! be executed before running NetBeans.
193
$ if f$type(java) .nes. ""
194
$ then
195
$   java_version = f$edit(f$parse(java,,, "DIRECTORY"), "UPCASE")
196
$   java_version = f$element(0, ".", java_version) - "["
197
$   jdk_version = f$edit(((f$parse(jdk_home,,, "DIRECTORY") - "[") - "]"), "UPCASE")
198
$   if java_version .nes. jdk_version
199
$   then
200
$     cancel_procedure = (jdk_home - "]") + ".COM]" +java_version + "_CANCEL_SETUP.COM"
201
$     if f$search(cancel_procedure) .nes. ""
202
$     then
203
$       @'cancel_procedure'
204
$     else
205
$       write sys$output ""
206
$       write sys$output "Your process has symbol and logical name definitions that were created by a"
207
$       write sys$output "different version of Java than what will be used by the IDE. To run the IDE,"
208
$       write sys$output "you must execute a command procedure which will reset your process so that the"
209
$       write sys$output "required version of Java will run properly. The command procedure name is:"
210
$       write sys$output java_version, "_CANCEL_SETUP.COM"
211
$       write sys$output ""
212
$       write sys$output "If you do not have this file on your system, please refer to the "
213
$       write sys$output "release notes for information on obtaining this file."
214
$       write sys$output ""
215
$       exit
216
$     endif
217
$   endif
218
$ endif
219
$
187
$! Create the path to the NetBeans kit. If the NETBEANS$HOME logical is
220
$! Create the path to the NetBeans kit. If the NETBEANS$HOME logical is
188
$! defined, use its value as the NetBeans kit path. If not defined, assume
221
$! defined, use its value as the NetBeans kit path. If not defined, assume
189
$! this command file is executed from one level below the NetBeans root
222
$! this command file is executed from one level below the NetBeans root
(-)core/src/org/netbeans/core/ExLocalFileSystem.java (-3 / +17 lines)
Lines 24-29 Link Here
24
import org.openide.filesystems.*;
24
import org.openide.filesystems.*;
25
import org.openide.loaders.ExtensionList;
25
import org.openide.loaders.ExtensionList;
26
import org.openide.util.RequestProcessor;
26
import org.openide.util.RequestProcessor;
27
import org.openide.util.Utilities;
27
28
28
/** Enhanced version of local file system that also takes care about
29
/** Enhanced version of local file system that also takes care about
29
* backuping of saving files.
30
* backuping of saving files.
Lines 105-112 Link Here
105
            return null;
106
            return null;
106
        }
107
        }
107
108
108
        int j = 0;
109
        for (int i = 0; i < arr.length; i++) {
109
        for (int i = 0; i < arr.length; i++) {
110
            if ( Utilities.getOperatingSystem () == Utilities.OS_VMS ) {
111
                // In NB 3.2.x for OpenVMS, we had to use the "_" as a backup extension.
112
                // However, OpenVMS now supports various special characters including "~".
113
                // So we now have to change the existing backup files ending with "_" into "~".
114
                //
115
                 
116
                if ( arr[i].endsWith (".java_") ) {
117
                    try {
118
                        String newBackupFile = arr[i].substring (0, arr[i].length()-1) + BACKUP_EXT;           
119
                        super.rename (name + "/" + arr[i], name + "/" + newBackupFile);
120
                        arr[i] = new String (newBackupFile);
121
                    } catch (IOException fex) {                        
122
                    } 
123
                }
124
            }
125
           
110
            if (arr[i].endsWith (BACKUP_EXT) || (ignoredRE != null && ignoredRE.match (arr[i]))) {
126
            if (arr[i].endsWith (BACKUP_EXT) || (ignoredRE != null && ignoredRE.match (arr[i]))) {
111
                arr[i] = null;
127
                arr[i] = null;
112
            }
128
            }
Lines 296-301 Link Here
296
            }
312
            }
297
        }
313
        }
298
    }
314
    }
299
    
300
    
301
}
315
}
(-)openide/src/org/openide/filesystems/DefaultAttributes.java (-1 / +62 lines)
Lines 20-25 Link Here
20
import org.openide.util.NbBundle;
20
import org.openide.util.NbBundle;
21
import org.openide.util.enum.EmptyEnumeration;
21
import org.openide.util.enum.EmptyEnumeration;
22
import org.openide.util.io.NbMarshalledObject;
22
import org.openide.util.io.NbMarshalledObject;
23
import org.openide.util.Utilities;
23
24
24
import org.xml.sax.*;
25
import org.xml.sax.*;
25
import org.xml.sax.helpers.ParserFactory;
26
import org.xml.sax.helpers.ParserFactory;
Lines 152-158 Link Here
152
153
153
        int size = arr.length;
154
        int size = arr.length;
154
155
155
        if (size == 1) {            
156
        if (size == 1) {
157
            // In NB 3.2.x for OpenVMS, we had to use  "_nbattrs." as a attribute file.
158
            // However, OpenVMS now supports a file name beginning with "."
159
            // So we now have to change the existing "_nbattrs." file into ".nbattrs"
160
            //
161
            if (Utilities.getOperatingSystem () == Utilities.OS_VMS && arr[0] != null && f != null) {
162
            	if (arr[0].equalsIgnoreCase ("_nbattrs.")) {
163
                    try {
164
                        renameVMSAttrFile (f);
165
                    } catch (IOException ioe) {}
166
                    arr[0] = new String (ATTR_NAME_EXT_XML);
167
            	}
168
            }
169
            
156
            if ((ATTR_NAME_EXT_XML.equals(arr[0]) || ATTR_NAME_EXT.equals(arr[0]))) {
170
            if ((ATTR_NAME_EXT_XML.equals(arr[0]) || ATTR_NAME_EXT.equals(arr[0]))) {
157
                try {
171
                try {
158
                    change.delete(f+"/"+arr[0]); // NOI18N
172
                    change.delete(f+"/"+arr[0]); // NOI18N
Lines 162-167 Link Here
162
        }
176
        }
163
                
177
                
164
        for (int i = 0; i < size; i++) {
178
        for (int i = 0; i < size; i++) {
179
            // In NB 3.2.x for OpenVMS, we had to use  "_nbattrs." as a attribute file.
180
            // However, OpenVMS now supports a file name beginning with "."
181
            // So we now have to change the existing "_nbattrs." file into ".nbattrs"
182
            //
183
            if (Utilities.getOperatingSystem () == Utilities.OS_VMS && arr[i] != null && f != null) {
184
            	if (arr[i].equalsIgnoreCase ("_nbattrs.")) {
185
                    try {
186
                        renameVMSAttrFile (f);
187
                    } catch (IOException ioe) {}
188
                    arr[i] = new String (ATTR_NAME_EXT_XML);
189
            	}
190
            }
191
            
165
            if (ATTR_NAME_EXT.equals (arr[i]) || ATTR_NAME_EXT_XML.equals (arr[i])) {
192
            if (ATTR_NAME_EXT.equals (arr[i]) || ATTR_NAME_EXT_XML.equals (arr[i])) {
166
                // exclude this index
193
                // exclude this index
167
                arr[i] = null;
194
                arr[i] = null;
Lines 172-177 Link Here
172
        return arr;
199
        return arr;
173
    }
200
    }
174
201
202
    /** Renames the attribute file for OpenVMS platform.
203
     *  The method renames "_nbattrs." into ".nbattrs".
204
     *  We cannot simply use the change.rename method
205
     *  because of the special property of OpenVMS having to do with
206
     *  a file name starting with "."
207
     *
208
     *  @param f the folder containg the attribute file
209
     */
210
    private void renameVMSAttrFile (String f) throws IOException {
211
        InputStream is = null;
212
        OutputStream os = null;
213
        
214
        try {    
215
            change.createData (f+"/"+ATTR_NAME_EXT_XML);
216
            is = info.inputStream (f+"/"+"_nbattrs.");
217
            os = info.outputStream (f+"/"+ATTR_NAME_EXT_XML);
218
            
219
            byte [] buf = new byte[256];
220
            int readi;
221
            while ( (readi=is.read(buf,0,256)) >= 0x0 ) {
222
                os.write (buf,0,readi);
223
            }
224
           
225
            is.close ();
226
            change.delete (f+"/"+"_nbattrs.");
227
            is = null;
228
        } catch (IOException ie) {
229
        } finally {
230
            if (is != null)
231
                is.close ();
232
            if (os != null)
233
                os.close ();
234
        }
235
    }
175
236
176
    // JST: Description
237
    // JST: Description
177
    //
238
    //

Return to bug 18368