1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

check if project is null in the constructor.

This commit is contained in:
Alain Magloire 2003-03-02 16:34:51 +00:00
parent d4eb2d4416
commit 316cabcdd7

View file

@ -49,14 +49,16 @@ public class BinaryParserBlock implements IWizardTab {
radios[i] = new String[] { exts[i].getLabel(), exts[i].getUniqueIdentifier()};
}
}
try {
ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(p);
ICExtensionReference[] ref = desc.get(CCorePlugin.BINARY_PARSER_UNIQ_ID);
if (ref.length > 0)
id = ref[0].getID();
if (project != null) {
try {
ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(p);
ICExtensionReference[] ref = desc.get(CCorePlugin.BINARY_PARSER_UNIQ_ID);
if (ref.length > 0)
id = ref[0].getID();
} catch (CoreException e) {
//e.printStackTrace();
} catch (CoreException e) {
//e.printStackTrace();
}
}
if (id == null) {
id = CCorePlugin.getDefault().getPluginPreferences().getDefaultString(CCorePlugin.PREF_BINARY_PARSER);