mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
properly set binary parser when ask to update from preference
This commit is contained in:
parent
e18d7494d0
commit
d055189a64
1 changed files with 10 additions and 5 deletions
|
@ -7,14 +7,16 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
package org.eclipse.cdt.make.internal.core;
|
package org.eclipse.cdt.make.internal.core;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.ICDescriptor;
|
import org.eclipse.cdt.core.ICDescriptor;
|
||||||
import org.eclipse.cdt.core.ICOwner;
|
import org.eclipse.cdt.core.ICOwner;
|
||||||
|
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||||
import org.eclipse.cdt.make.core.MakeScannerProvider;
|
import org.eclipse.cdt.make.core.MakeScannerProvider;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
import org.eclipse.core.runtime.Preferences;
|
||||||
|
|
||||||
public class MakeProject implements ICOwner {
|
public class MakeProject implements ICOwner {
|
||||||
|
|
||||||
|
@ -25,12 +27,15 @@ public class MakeProject implements ICOwner {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(ICDescriptor cproject, String extensionID) throws CoreException {
|
public void update(ICDescriptor cproject, String extensionID) throws CoreException {
|
||||||
if ( extensionID.equals(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID)) {
|
if (extensionID.equals(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID)) {
|
||||||
cproject.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, MakeScannerProvider.INTERFACE_IDENTITY);
|
cproject.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, MakeScannerProvider.INTERFACE_IDENTITY);
|
||||||
}
|
}
|
||||||
if ( extensionID.equals(CCorePlugin.BINARY_PARSER_UNIQ_ID)) {
|
if (extensionID.equals(CCorePlugin.BINARY_PARSER_UNIQ_ID)) {
|
||||||
cproject.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, CCorePlugin.PLUGIN_ID + ".Elf"); //$NON-NLS-1$
|
Preferences makePrefs = MakeCorePlugin.getDefault().getPluginPreferences();
|
||||||
|
String id = makePrefs.getString(CCorePlugin.PREF_BINARY_PARSER);
|
||||||
|
if (id != null && id.length() != 0) {
|
||||||
|
cproject.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue