Skip to content

Commit

Permalink
Remove fragment attribute from the feature.xml file.
Browse files Browse the repository at this point in the history
  • Loading branch information
alshamams committed Sep 30, 2023
1 parent 653f498 commit 9eb4d51
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,21 @@ private void validatePlugins(Element parent) {
assertAttributeDefined(plugin, "id", CompilerFlags.ERROR); //$NON-NLS-1$
assertAttributeDefined(plugin, "version", CompilerFlags.ERROR); //$NON-NLS-1$
NamedNodeMap attributes = plugin.getAttributes();
boolean isFragment = plugin.getAttribute("fragment").equals("true"); //$NON-NLS-1$ //$NON-NLS-2$
for (int j = 0; j < attributes.getLength(); j++) {
Attr attr = (Attr) attributes.item(j);
String name = attr.getName();
if (name.equals("id")) { //$NON-NLS-1$
validatePluginExists(plugin, attr, isFragment);
String id = attr.getValue();
int severity = CompilerFlags.getFlag(fProject, CompilerFlags.F_UNRESOLVED_PLUGINS);
if (severity != CompilerFlags.IGNORE) {
IPluginModelBase model = PluginRegistry.findModel(id);
if (model == null || !model.isEnabled()) {
VirtualMarker marker = report(NLS.bind(PDECoreMessages.Builders_Feature_reference, id),
getLine(plugin, attr.getName()), severity, PDEMarkerFactory.CAT_OTHER);
addMarkerAttribute(marker, PDEMarkerFactory.compilerKey,
CompilerFlags.F_UNRESOLVED_PLUGINS);
}
}
} else if (name.equals("version")) { //$NON-NLS-1$
validateVersionAttribute(plugin, attr);
validateVersion(plugin, attr);
Expand Down

0 comments on commit 9eb4d51

Please sign in to comment.