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 50710
Collapse All | Expand All

(-)api/doc/changes/apichanges.xml (+16 lines)
Lines 115-120 Link Here
115
<!-- ACTUAL CHANGES BEGIN HERE: -->
115
<!-- ACTUAL CHANGES BEGIN HERE: -->
116
<changes>
116
<changes>
117
117
118
    <change id="add-detection-of-FreeBSD-OS">
119
      <api name="util"/>
120
      <summary>Added field <code>OS_FREEBSD</code> to <code>Utilities</code></summary>
121
      <version major="4" minor="50"/>
122
      <date day="29" month="10" year="2004"/>
123
      <author login="jrechtacek"/>
124
      <compatibility addition="yes"/>
125
      <description>
126
        <p>FreeBSD was not recognized as Unix OS. <code>Utilities</code> has been
127
        enlarged with new field <code>OS_FREEBSD</code>, part of OS Unix mask. <code>Utilities.isUnix()</code>
128
        now returns <code>true</code> for applications run on FreeBSD.
129
        </p>
130
      </description>
131
      <class package="org.openide.util" name="Utilities"/>
132
    </change>
133
    
118
    <change id="no-icon-in-menu-for-actions">
134
    <change id="no-icon-in-menu-for-actions">
119
      <api name="actions"/>
135
      <api name="actions"/>
120
      <summary>Added property to <code>SystemAction/Action</code> that causes it's icon not to be displayed in menu.</summary>
136
      <summary>Added property to <code>SystemAction/Action</code> that causes it's icon not to be displayed in menu.</summary>
(-)src/org/openide/util/Utilities.java (-22 / +27 lines)
Lines 7-13 Link Here
7
 * http://www.sun.com/
7
 * http://www.sun.com/
8
 * 
8
 * 
9
 * The Original Code is NetBeans. The Initial Developer of the Original
9
 * The Original Code is NetBeans. The Initial Developer of the Original
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
10
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
11
 * Microsystems, Inc. All Rights Reserved.
11
 * Microsystems, Inc. All Rights Reserved.
12
 */
12
 */
13
13
Lines 51-93 Link Here
51
    private Utilities() {}
51
    private Utilities() {}
52
52
53
    /** Operating system is Windows NT. */
53
    /** Operating system is Windows NT. */
54
    public static final int OS_WINNT = 1;
54
    public static final int OS_WINNT = 1 << 0;
55
    /** Operating system is Windows 95. */
55
    /** Operating system is Windows 95. */
56
    public static final int OS_WIN95 = 2;
56
    public static final int OS_WIN95 = OS_WINNT << 1;
57
    /** Operating system is Windows 98. */
57
    /** Operating system is Windows 98. */
58
    public static final int OS_WIN98 = 4;
58
    public static final int OS_WIN98 = OS_WIN95 << 1;
59
    /** Operating system is Solaris. */
59
    /** Operating system is Solaris. */
60
    public static final int OS_SOLARIS = 8;
60
    public static final int OS_SOLARIS = OS_WIN98 << 1;
61
    /** Operating system is Linux. */
61
    /** Operating system is Linux. */
62
    public static final int OS_LINUX = 16;
62
    public static final int OS_LINUX = OS_SOLARIS << 1;
63
    /** Operating system is HP-UX. */
63
    /** Operating system is HP-UX. */
64
    public static final int OS_HP = 32;
64
    public static final int OS_HP = OS_LINUX << 1;
65
    /** Operating system is IBM AIX. */
65
    /** Operating system is IBM AIX. */
66
    public static final int OS_AIX = 64;
66
    public static final int OS_AIX = OS_HP << 1;
67
    /** Operating system is SGI IRIX. */
67
    /** Operating system is SGI IRIX. */
68
    public static final int OS_IRIX = 128;
68
    public static final int OS_IRIX = OS_AIX << 1;
69
    /** Operating system is Sun OS. */
69
    /** Operating system is Sun OS. */
70
    public static final int OS_SUNOS = 256;
70
    public static final int OS_SUNOS = OS_IRIX << 1;
71
    /** Operating system is Compaq TRU64 Unix */
71
    /** Operating system is Compaq TRU64 Unix */
72
    public static final int OS_TRU64 = 512;
72
    public static final int OS_TRU64 = OS_SUNOS << 1;
73
    /** @deprecated please use OS_TRU64 instead */
73
    /** @deprecated please use OS_TRU64 instead */
74
    public static final int OS_DEC = OS_TRU64;
74
    public static final int OS_DEC = OS_TRU64 << 1;
75
    /** Operating system is OS/2. */
75
    /** Operating system is OS/2. */
76
    public static final int OS_OS2 = 1024;
76
    public static final int OS_OS2 = OS_DEC << 1;
77
    /** Operating system is Mac. */
77
    /** Operating system is Mac. */
78
    public static final int OS_MAC = 2048;
78
    public static final int OS_MAC = OS_OS2 << 1;
79
    /** Operating system is Windows 2000. */
79
    /** Operating system is Windows 2000. */
80
    public static final int OS_WIN2000 = 4096;
80
    public static final int OS_WIN2000 = OS_MAC << 1;
81
    /** Operating system is Compaq OpenVMS */
81
    /** Operating system is Compaq OpenVMS */
82
    public static final int OS_VMS = 8192;
82
    public static final int OS_VMS = OS_WIN2000 << 1;
83
    /**
83
    /**
84
     *Operating system is one of the Windows variants but we don't know which
84
     *Operating system is one of the Windows variants but we don't know which
85
     *one it is
85
     *one it is
86
     */
86
     */
87
    public static final int OS_WIN_OTHER = 16384;
87
    public static final int OS_WIN_OTHER = OS_VMS << 1;
88
    
89
    /** Operating system is unknown. */
88
    /** Operating system is unknown. */
90
    public static final int OS_OTHER = 65536;
89
    public static final int OS_OTHER = OS_WIN_OTHER << 1;
90
    /** Operating system is FreeBSD
91
     * @since 4.50
92
     */
93
    public static final int OS_FREEBSD = OS_OTHER << 1;
91
94
92
    //TODO: reavaluate OS_OS2 addition into the OS_WINDOWS_MASK     
95
    //TODO: reavaluate OS_OS2 addition into the OS_WINDOWS_MASK     
93
    //OS_OS2 added cause #44136: Filesystem support has been broken under OS/2
96
    //OS_OS2 added cause #44136: Filesystem support has been broken under OS/2
Lines 95-101 Link Here
95
    /** A mask for Windows platforms. */
98
    /** A mask for Windows platforms. */
96
    public static final int OS_WINDOWS_MASK = OS_WINNT | OS_WIN95 | OS_WIN98 | OS_WIN2000 | OS_WIN_OTHER | OS_OS2;
99
    public static final int OS_WINDOWS_MASK = OS_WINNT | OS_WIN95 | OS_WIN98 | OS_WIN2000 | OS_WIN_OTHER | OS_OS2;
97
    /** A mask for Unix platforms. */
100
    /** A mask for Unix platforms. */
98
    public static final int OS_UNIX_MASK = OS_SOLARIS | OS_LINUX | OS_HP | OS_AIX | OS_IRIX | OS_SUNOS | OS_TRU64 | OS_MAC;
101
    public static final int OS_UNIX_MASK = OS_SOLARIS | OS_LINUX | OS_HP | OS_AIX | OS_IRIX | OS_SUNOS | OS_TRU64 | OS_MAC | OS_FREEBSD;
99
102
100
    /** A height of the windows's taskbar */
103
    /** A height of the windows's taskbar */
101
    public static final int TYPICAL_WINDOWS_TASKBAR_HEIGHT = 27;
104
    public static final int TYPICAL_WINDOWS_TASKBAR_HEIGHT = 27;
Lines 197-202 Link Here
197
                operatingSystem = OS_MAC;
200
                operatingSystem = OS_MAC;
198
            else if (osName.startsWith ("Darwin")) // NOI18N
201
            else if (osName.startsWith ("Darwin")) // NOI18N
199
                operatingSystem = OS_MAC;
202
                operatingSystem = OS_MAC;
203
            else if (osName.toLowerCase (Locale.US).startsWith ("freebsd")) { // NOI18N 
204
                operatingSystem = OS_FREEBSD;
205
            }
200
            else
206
            else
201
                operatingSystem = OS_OTHER;
207
                operatingSystem = OS_OTHER;
202
        }
208
        }
Lines 220-227 Link Here
220
226
221
    /** The operating system on which NetBeans runs*/
227
    /** The operating system on which NetBeans runs*/
222
    private static int operatingSystem = -1;
228
    private static int operatingSystem = -1;
223
229
    
224
225
    /** Test whether a given string is a valid Java identifier.
230
    /** Test whether a given string is a valid Java identifier.
226
    * @param id string which should be checked
231
    * @param id string which should be checked
227
    * @return <code>true</code> if a valid identifier
232
    * @return <code>true</code> if a valid identifier

Return to bug 50710