Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-07-25 07:38:05 +0000
committerEike Stepper2012-07-25 07:38:05 +0000
commitd85d0fcd3350853d0f6514399b66316e8f418627 (patch)
tree42940e0cb396bf4a69c55d561937960143161241 /plugins
parent37321e93deaf58988f80b4c87964ea071ddc3520 (diff)
downloadcdo-d85d0fcd3350853d0f6514399b66316e8f418627.tar.gz
cdo-d85d0fcd3350853d0f6514399b66316e8f418627.tar.xz
cdo-d85d0fcd3350853d0f6514399b66316e8f418627.zip
Fix redundancy check
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/VersionBuilder.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/VersionBuilder.java b/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/VersionBuilder.java
index c52a99f727..b1b5c3c360 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/VersionBuilder.java
+++ b/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/VersionBuilder.java
@@ -414,11 +414,13 @@ public class VersionBuilder extends IncrementalProjectBuilder implements Element
private void checkFeatureRedundancy(Element element)
{
- for (Element pluginChild : element.getChildren())
+ int i = 0;
+ List<Element> children = element.getChildren();
+ for (Element pluginChild : children)
{
if (pluginChild.getType() == Element.Type.PLUGIN)
{
- for (Element featureChild : element.getChildren())
+ for (Element featureChild : children)
{
if (featureChild.getType() == Element.Type.FEATURE)
{
@@ -440,7 +442,14 @@ public class VersionBuilder extends IncrementalProjectBuilder implements Element
}
}
}
+
+ if (children.indexOf(pluginChild) != i)
+ {
+ addRedundancyMarker(pluginChild, null);
+ }
}
+
+ ++i;
}
}
@@ -757,8 +766,9 @@ public class VersionBuilder extends IncrementalProjectBuilder implements Element
{
IFile file = getProject().getFile(FEATURE_PATH);
String name = pluginChild.getName();
- String msg = "Plug-in reference '" + name + "' is redundant because feature '" + featureChild.getName()
- + "' already includes it";
+ String cause = featureChild != null ? "feature '" + featureChild.getName() + "' already includes it"
+ : " because it occurs more than once in this feature";
+ String msg = "Plug-in reference '" + name + "' is redundant because " + cause;
addFeatureChildMarker(file, "plugin", name, msg);
}
catch (Exception ex)

Back to the top