mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
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
This commit is contained in:
parent
d4c76e1e98
commit
37f1e5f996
4 changed files with 62 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -97,7 +97,22 @@
|
|||
</run>
|
||||
</cextension>
|
||||
</extension>
|
||||
|
||||
<!-- This is for backward compatibility: an Typo was introduce in on of the realease
|
||||
and "ELF" instead of "Elf" -->
|
||||
<extension
|
||||
id="TYPO_Elf"
|
||||
name="%ElfParser.name"
|
||||
point="org.eclipse.cdt.core.BinaryParser">
|
||||
<cextension>
|
||||
<filter
|
||||
name = "visibility"
|
||||
value = "private">
|
||||
</filter>
|
||||
<run
|
||||
class="org.eclipse.cdt.utils.elf.parser.ElfParser">
|
||||
</run>
|
||||
</cextension>
|
||||
</extension>
|
||||
<!-- =================================================================================== -->
|
||||
<!-- Define the list of Error Parser provided by the CDT -->
|
||||
<!-- =================================================================================== -->
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue