Lines 97-102
Link Here
|
97 |
|
97 |
|
98 |
public static final String ALL_LANGUAGES = NbBundle.getMessage(ColorModel.class, "CTL_All_Languages"); //NOI18N |
98 |
public static final String ALL_LANGUAGES = NbBundle.getMessage(ColorModel.class, "CTL_All_Languages"); //NOI18N |
99 |
private static final String [] EMPTY_MIMEPATH = new String[0]; |
99 |
private static final String [] EMPTY_MIMEPATH = new String[0]; |
|
|
100 |
private boolean isInitializing; |
100 |
|
101 |
|
101 |
// schemes ................................................................. |
102 |
// schemes ................................................................. |
102 |
|
103 |
|
Lines 289-295
Link Here
|
289 |
|
290 |
|
290 |
SwingUtilities.invokeLater (new Runnable () { |
291 |
SwingUtilities.invokeLater (new Runnable () { |
291 |
public void run () { |
292 |
public void run () { |
292 |
updateMimeType(mimeType); |
293 |
try { |
|
|
294 |
isInitializing = true; |
295 |
updateMimeType(mimeType); |
296 |
} finally { |
297 |
isInitializing = false; |
298 |
} |
293 |
} |
299 |
} |
294 |
}); |
300 |
}); |
295 |
setCursor (Cursor.getPredefinedCursor (Cursor.HAND_CURSOR)); |
301 |
setCursor (Cursor.getPredefinedCursor (Cursor.HAND_CURSOR)); |
Lines 305-314
Link Here
|
305 |
|
311 |
|
306 |
SwingUtilities.invokeLater (new Runnable () { |
312 |
SwingUtilities.invokeLater (new Runnable () { |
307 |
public void run () { |
313 |
public void run () { |
|
|
314 |
try { |
315 |
isInitializing = true; |
308 |
if (!mimeType.equals(currentMimeType)) { |
316 |
if (!mimeType.equals(currentMimeType)) { |
309 |
updateMimeType(mimeType); |
317 |
updateMimeType(mimeType); |
310 |
} |
318 |
} |
311 |
|
319 |
|
312 |
if (defaults != null) { |
320 |
if (defaults != null) { |
313 |
EditorSettings.getDefault().getFontColorSettings(EMPTY_MIMEPATH).setAllFontColors( |
321 |
EditorSettings.getDefault().getFontColorSettings(EMPTY_MIMEPATH).setAllFontColors( |
314 |
testProfileName, |
322 |
testProfileName, |
Lines 328-333
Link Here
|
328 |
syntaxColorings |
336 |
syntaxColorings |
329 |
); |
337 |
); |
330 |
} |
338 |
} |
|
|
339 |
} finally { |
340 |
isInitializing = false; |
341 |
} |
331 |
} |
342 |
} |
332 |
}); |
343 |
}); |
333 |
} |
344 |
} |
Lines 380-386
Link Here
|
380 |
} |
391 |
} |
381 |
} |
392 |
} |
382 |
|
393 |
|
383 |
if (elementName != null) { |
394 |
if (elementName != null && !isInitializing) { |
384 |
firePropertyChange(PROP_CURRENT_ELEMENT, null, elementName); |
395 |
firePropertyChange(PROP_CURRENT_ELEMENT, null, elementName); |
385 |
} |
396 |
} |
386 |
} |
397 |
} |