Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-07-23 11:58:35 +0000
committerEike Stepper2012-07-23 11:58:35 +0000
commit2a2e594a22e15fd799c4be59c35459a14209ff0a (patch)
tree1e1e810cd43e4efc0e38d779d6ca9653f1a0863b /plugins
parentc77eb6b61ae891fdd974249ccf84aa6c9e3ed7d0 (diff)
downloadcdo-2a2e594a22e15fd799c4be59c35459a14209ff0a.tar.gz
cdo-2a2e594a22e15fd799c4be59c35459a14209ff0a.tar.xz
cdo-2a2e594a22e15fd799c4be59c35459a14209ff0a.zip
Make feature content validation optional
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.ui/src/org/eclipse/emf/cdo/releng/version/ui/AddNatureAction.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/VersionBuilder.java32
2 files changed, 43 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.ui/src/org/eclipse/emf/cdo/releng/version/ui/AddNatureAction.java b/plugins/org.eclipse.emf.cdo.releng.version.ui/src/org/eclipse/emf/cdo/releng/version/ui/AddNatureAction.java
index a654c587cc..cb7e7e3743 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.ui/src/org/eclipse/emf/cdo/releng/version/ui/AddNatureAction.java
+++ b/plugins/org.eclipse.emf.cdo.releng.version.ui/src/org/eclipse/emf/cdo/releng/version/ui/AddNatureAction.java
@@ -66,13 +66,19 @@ public class AddNatureAction extends AbstractAction<Map<String, String>>
boolean ignoreMissingDependencyRanges = dialog.isIgnoreMissingDependencyRanges();
if (ignoreMissingDependencyRanges)
{
- arguments.put(VersionBuilder.DEPENDENCY_RANGES_ARGUMENT, "true");
+ arguments.put(VersionBuilder.IGNORE_DEPENDENCY_RANGES_ARGUMENT, "true");
}
boolean ignoreMissingExportVersions = dialog.isIgnoreMissingExportVersions();
if (ignoreMissingExportVersions)
{
- arguments.put(VersionBuilder.EXPORT_VERSIONS_ARGUMENT, "true");
+ arguments.put(VersionBuilder.IGNORE_EXPORT_VERSIONS_ARGUMENT, "true");
+ }
+
+ boolean ignoreFeatureContentChanges = dialog.isIgnoreFeatureContentChanges();
+ if (ignoreFeatureContentChanges)
+ {
+ arguments.put(VersionBuilder.IGNORE_CONTENT_CHANGES_ARGUMENT, "true");
}
}
@@ -133,6 +139,10 @@ public class AddNatureAction extends AbstractAction<Map<String, String>>
private boolean ignoreMissingExportVersions;
+ private Button ignoreFeatureContentChangesButton;
+
+ private boolean ignoreFeatureContentChanges;
+
public BuilderConfigurationDialog(Shell shell, IContainer container)
{
super(shell, false, container, IResource.FILE);
@@ -152,6 +162,11 @@ public class AddNatureAction extends AbstractAction<Map<String, String>>
return ignoreMissingExportVersions;
}
+ public boolean isIgnoreFeatureContentChanges()
+ {
+ return ignoreFeatureContentChanges;
+ }
+
@Override
protected Control createDialogArea(Composite parent)
{
@@ -163,6 +178,9 @@ public class AddNatureAction extends AbstractAction<Map<String, String>>
ignoreMissingExportVersionsButton = new Button(content, SWT.CHECK);
ignoreMissingExportVersionsButton.setText("Ignore missing package export versions");
+ ignoreFeatureContentChangesButton = new Button(content, SWT.CHECK);
+ ignoreFeatureContentChangesButton.setText("Ignore feature content changes");
+
return dialogArea;
}
@@ -178,6 +196,7 @@ public class AddNatureAction extends AbstractAction<Map<String, String>>
{
ignoreMissingDependencyRanges = ignoreMissingDependencyRangesButton.getSelection();
ignoreMissingExportVersions = ignoreMissingExportVersionsButton.getSelection();
+ ignoreFeatureContentChanges = ignoreFeatureContentChangesButton.getSelection();
super.okPressed();
}
}
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 01878b3026..1f48cab5eb 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
@@ -46,15 +46,15 @@ public class VersionBuilder extends IncrementalProjectBuilder
{
public static final String BUILDER_ID = "org.eclipse.emf.cdo.releng.version.VersionBuilder";
- public static final String DEPENDENCY_RANGES_ARGUMENT = "ignore.missing.dependency.ranges";
-
- public static final String EXPORT_VERSIONS_ARGUMENT = "ignore.missing.export.versions";
-
public static final String RELEASE_PATH_ARGUMENT = "release.path";
public static final String VALIDATOR_CLASS_ARGUMENT = "validator.class";
- public static boolean DEBUG = false;
+ public static final String IGNORE_DEPENDENCY_RANGES_ARGUMENT = "ignore.missing.dependency.ranges";
+
+ public static final String IGNORE_EXPORT_VERSIONS_ARGUMENT = "ignore.missing.export.versions";
+
+ public static final String IGNORE_CONTENT_CHANGES_ARGUMENT = "ignore.feature.content.changes";
private static final Path MANIFEST_PATH = new Path("META-INF/MANIFEST.MF");
@@ -72,6 +72,8 @@ public class VersionBuilder extends IncrementalProjectBuilder
private static final int MAJOR_CHANGE = 3;
+ private static final boolean DEBUG = false;
+
private Release release;
public VersionBuilder()
@@ -184,17 +186,17 @@ public class VersionBuilder extends IncrementalProjectBuilder
if (componentModel instanceof IPluginModelBase)
{
- if (!"true".equals(args.get(DEPENDENCY_RANGES_ARGUMENT)))
+ if (!"true".equals(args.get(IGNORE_DEPENDENCY_RANGES_ARGUMENT)))
{
checkDependencyRanges((IPluginModelBase)componentModel);
}
- if (!"true".equals(args.get(EXPORT_VERSIONS_ARGUMENT)))
+ if (!"true".equals(args.get(IGNORE_EXPORT_VERSIONS_ARGUMENT)))
{
checkPackageExports((IPluginModelBase)componentModel);
}
}
- else
+ else if (!"true".equals(args.get(IGNORE_CONTENT_CHANGES_ARGUMENT)))
{
List<Map.Entry<Element, Version>> warnings = new ArrayList<Entry<Element, Version>>();
int change = checkFeatureAPI(componentModel, element, releaseElement, buildDpependencies, warnings);
@@ -334,8 +336,7 @@ public class VersionBuilder extends IncrementalProjectBuilder
int change = checkFeatureAPI(element, releasedElement, child, warnings);
biggestChange = Math.max(biggestChange, change);
- String name = child.getName();
- IProject project = child.getType() == Element.Type.PLUGIN ? getPluginProject(name) : getFeatureProject(name);
+ IProject project = getProject(child);
if (project != null)
{
buildDpependencies.add(project);
@@ -425,6 +426,17 @@ public class VersionBuilder extends IncrementalProjectBuilder
});
}
+ private IProject getProject(Element element)
+ {
+ String name = element.getName();
+ if (element.getType() == Element.Type.PLUGIN)
+ {
+ return getPluginProject(name);
+ }
+
+ return getFeatureProject(name);
+ }
+
private IProject getPluginProject(String name)
{
IPluginModelBase pluginModel = PluginRegistry.findModel(name);

Back to the top