mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
check for invalid extension when gathering list
This commit is contained in:
parent
86c0d04560
commit
5cdf8ec7ff
2 changed files with 7 additions and 5 deletions
|
@ -151,7 +151,9 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
|
|||
if (point != null) {
|
||||
IExtension[] exts = point.getExtensions();
|
||||
for (int i = 0; i < exts.length; i++) {
|
||||
mapParsers.put(exts[i].getUniqueIdentifier(), exts[i].getLabel());
|
||||
if (exts[i].getConfigurationElements().length > 0) {
|
||||
mapParsers.put(exts[i].getUniqueIdentifier(), exts[i].getLabel());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ import org.eclipse.jface.viewers.LabelProvider;
|
|||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Group;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
|
||||
public class BinaryParserBlock extends AbstractBinaryParserPage {
|
||||
|
@ -156,7 +155,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage {
|
|||
}
|
||||
|
||||
private boolean isExtensionVisible(IExtension ext) {
|
||||
IConfigurationElement[] elements = ext.getConfigurationElements();
|
||||
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++) {
|
||||
|
@ -168,8 +167,9 @@ public class BinaryParserBlock extends AbstractBinaryParserPage {
|
|||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false; // invalid extension definition (must have at least cextension elements)
|
||||
}
|
||||
|
||||
public void createControl(Composite parent) {
|
||||
|
@ -272,7 +272,7 @@ public class BinaryParserBlock extends AbstractBinaryParserPage {
|
|||
|
||||
if (getContainer().getProject() != null) {
|
||||
try {
|
||||
ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(getContainer().getProject());
|
||||
ICDescriptor desc = CCorePlugin.getDefault().getCProjectDescription(getContainer().getProject(), true);
|
||||
ICExtensionReference[] ref = desc.get(CCorePlugin.BINARY_PARSER_UNIQ_ID);
|
||||
initialSelected = new ArrayList(ref.length);
|
||||
for (int i = 0; i < ref.length; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue