diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index 36be4f5cc27..62a03ccee59 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -1,3 +1,12 @@ +2004-06-01 Alain Magloire + + A release of the CDT was distributed with + a typ "ELF" instead of "Elf" we provide + and extension point pointing back to "ELF" + parser for backward comp. + + * plugin.xml + 2004-05-26 Alain Magloire Do not generate CElementDelta for pathEntries diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml index eb4df667400..1cd9f8fdcfc 100644 --- a/core/org.eclipse.cdt.core/plugin.xml +++ b/core/org.eclipse.cdt.core/plugin.xml @@ -97,7 +97,22 @@ - + + + + + + + + + diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 31c8733da45..d16945fbb91 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,13 @@ +2004-06-01 Alain Magloire + + A release of the CDT was distributed with + a typ "ELF" instead of "Elf" we provide + and extension point pointing back to "ELF" + parser for backward comp. But ignoring + it in the UI. + + * src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java + 2004-06-01 Alain Magloire Fall back on the Nature of the project diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java index 54c84eac4d6..6207902bd81 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java @@ -34,6 +34,7 @@ import org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IProgressMonitor; @@ -53,6 +54,12 @@ public class BinaryParserBlock extends AbstractBinaryParserPage { private static final String LABEL = PREFIX + ".label"; //$NON-NLS-1$ private static final String DESC = PREFIX + ".desc"; //$NON-NLS-1$ + private static final String ATTR_FILTER = "filter"; //$NON-NLS-1$ + private static final String ATTR_NAME = "name"; //$NON-NLS-1$ + private static final String ATTR_NAME_VISIBILITY = "visibility"; //$NON-NLS-1$ + private static final String ATTR_VALUE = "value"; //$NON-NLS-1$ + private static final String ATTR_VALUE_PRIVATE = "private"; //$NON-NLS-1$ + protected CheckedListDialogField binaryList; Map configMap; List initialSelected; @@ -140,11 +147,30 @@ public class BinaryParserBlock extends AbstractBinaryParserPage { IExtension[] exts = point.getExtensions(); configMap = new HashMap(exts.length); for (int i = 0; i < exts.length; i++) { - configMap.put(exts[i].getUniqueIdentifier(), new BinaryParserConfiguration(exts[i])); + if (isExtensionVisible(exts[i])) { + configMap.put(exts[i].getUniqueIdentifier(), new BinaryParserConfiguration(exts[i])); + } } } } + private boolean isExtensionVisible(IExtension ext) { + IConfigurationElement[] elements = ext.getConfigurationElements(); + for (int i = 0; i < elements.length; i++) { + IConfigurationElement[] children = elements[i].getChildren(ATTR_FILTER); + for (int j = 0; j < children.length; j++) { + String name = children[j].getAttribute(ATTR_NAME); + if (name != null && name.equals(ATTR_NAME_VISIBILITY)) { + String value = children[j].getAttribute(ATTR_VALUE); + if (value != null && value.equals(ATTR_VALUE_PRIVATE)) { + return false; + } + } + } + } + return true; + } + public void createControl(Composite parent) { PixelConverter converter = new PixelConverter(parent);