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

(-)a/cnd.editor/src/org/netbeans/modules/cnd/editor/options/CodeStylePreferencesProvider.java (-1 / +6 lines)
Lines 72-79 Link Here
72
    public static final CodeStylePreferences.Provider INSTANCE = new CodeStylePreferences.Provider() {
72
    public static final CodeStylePreferences.Provider INSTANCE = new CodeStylePreferences.Provider() {
73
        @Override
73
        @Override
74
        public Preferences forFile(FileObject file, String mimeType) {
74
        public Preferences forFile(FileObject file, String mimeType) {
75
            // forFile can be called with (null, null) by infrastructure
76
            if (mimeType == null) {              
77
                mimeType = file == null ? null : MIMESupport.getSourceFileMIMEType(file);
78
            }
75
            if (mimeType == null) {
79
            if (mimeType == null) {
76
                mimeType = MIMESupport.getSourceFileMIMEType(file);
80
              // not accepted 
81
              return null;
77
            }
82
            }
78
            if (MIMENames.C_MIME_TYPE.equals(mimeType)) {
83
            if (MIMENames.C_MIME_TYPE.equals(mimeType)) {
79
                return NbPreferences.forModule(CodeStyle.class);
84
                return NbPreferences.forModule(CodeStyle.class);

Return to bug 270748