Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-08-24 17:41:35 +0000
committerEike Stepper2012-08-24 17:41:35 +0000
commitfe241340b4bae9e73bcd9029866acaed41e7519b (patch)
treee3f9d072c4c6dc54fb65e976767953cc16f6cf79 /plugins
parentac6893bf13820c1d03d44cc7a67479f9858fc7f5 (diff)
downloadcdo-fe241340b4bae9e73bcd9029866acaed41e7519b.tar.gz
cdo-fe241340b4bae9e73bcd9029866acaed41e7519b.tar.xz
cdo-fe241340b4bae9e73bcd9029866acaed41e7519b.zip
Add quick fix tests
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/META-INF/MANIFEST.MF9
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/VersionBuilderTests.launch4
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/src/org/eclipse/emf/cdo/releng/version/tests/VersionBuilderTest.java247
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00001-NoProblemAfterNewBaseline/clean/build.markers (renamed from plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00001-NoProblemAfterNewBaseline/clean/results.txt)0
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/clean/build.markers (renamed from plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/clean/results.txt)0
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/build.markers (renamed from plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/results.txt)0
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix1.markers20
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix2.markers0
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.ui/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/Markers.java3
10 files changed, 171 insertions, 114 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.releng.version.tests/META-INF/MANIFEST.MF
index 0811bd4dbf..9ceb0746bd 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/META-INF/MANIFEST.MF
@@ -8,12 +8,15 @@ Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
+Require-Bundle: org.eclipse.equinox.ds;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
org.eclipse.pde.core;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.ui;bundle-version="3.8.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
org.eclipse.emf.cdo.releng.version;bundle-version="2.0.0",
org.eclipse.emf.cdo.releng.version.digest;bundle-version="2.0.0",
- org.junit;bundle-version="[4.0.0,5.0.0)",
- org.eclipse.equinox.ds;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.emf.cdo.releng.version.ui;bundle-version="1.0.0",
+ org.junit;bundle-version="[4.0.0,5.0.0)"
Export-Package: org.eclipse.emf.cdo.releng.version.tests;version="2.0.0"
Bundle-Activator: org.eclipse.emf.cdo.releng.version.tests.Activator
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/VersionBuilderTests.launch b/plugins/org.eclipse.emf.cdo.releng.version.tests/VersionBuilderTests.launch
index 222764ec6a..bb9763f5a6 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.tests/VersionBuilderTests.launch
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/VersionBuilderTests.launch
@@ -32,8 +32,8 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.emf.cdo.explorer.product"/>
<booleanAttribute key="run_in_ui_thread" value="false"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.team.core@default:default,org.eclipse.text@default:default,org.eclipse.update.configurator@3:true,org.hamcrest.core@default:default,org.junit*4.10.0.v4_10_0_v20120426-0900@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.releng.version.digest@default:default,org.eclipse.emf.cdo.releng.version.tests@default:default,org.eclipse.emf.cdo.releng.version@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:default,org.eclipse.core.net@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.publisher.eclipse@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.util@default:default,org.eclipse.help@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.core@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.build@default:default,org.eclipse.pde.core@default:default,org.eclipse.swt.win32.win32.x86_64@default:default,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.text@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.win32@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.eclipse.update.core.win32@default:default,org.eclipse.update.core@default:default,org.hamcrest.core@default:default,org.junit*4.10.0.v4_10_0_v20120426-0900@default:default,org.sat4j.core@default:default,org.sat4j.pb@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.releng.version.digest@default:default,org.eclipse.emf.cdo.releng.version.tests@default:default,org.eclipse.emf.cdo.releng.version.ui@default:default,org.eclipse.emf.cdo.releng.version@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/src/org/eclipse/emf/cdo/releng/version/tests/VersionBuilderTest.java b/plugins/org.eclipse.emf.cdo.releng.version.tests/src/org/eclipse/emf/cdo/releng/version/tests/VersionBuilderTest.java
index d1feec55db..d1022125b3 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.tests/src/org/eclipse/emf/cdo/releng/version/tests/VersionBuilderTest.java
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/src/org/eclipse/emf/cdo/releng/version/tests/VersionBuilderTest.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.releng.version.tests;
import org.eclipse.emf.cdo.releng.version.Markers;
import org.eclipse.emf.cdo.releng.version.VersionUtil;
+import org.eclipse.emf.cdo.releng.version.ui.quickfixes.VersionResolutionGenerator;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
@@ -23,10 +24,9 @@ import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.ui.IMarkerResolution;
import java.io.File;
-import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
@@ -42,9 +42,7 @@ import junit.framework.TestCase;
*/
public class VersionBuilderTest extends TestCase
{
- private static final PrintStream MSG = System.out;
-
- private static final String RESULTS_FILE = "results.txt";
+ private static final VersionResolutionGenerator FIX_GENERATOR = new VersionResolutionGenerator();
private static final IWorkspace WORKSPACE = ResourcesPlugin.getWorkspace();
@@ -54,10 +52,10 @@ public class VersionBuilderTest extends TestCase
private static final int TRIM_LENGTH = WORKSPACE_FILE.getAbsolutePath().length() + 1;
- private static final String[] PHASES = { "clean", "incremental" };
-
private static final String DELETE_SUFFIX = "-DELETE";
+ private static final PrintStream MSG = System.out;
+
private BundleFile testFolder;
public VersionBuilderTest(BundleFile testFolder)
@@ -69,122 +67,122 @@ public class VersionBuilderTest extends TestCase
@Override
public void runBare() throws Throwable
{
+ MSG.println("===============================================================================================");
MSG.println("Test " + getName());
- WORKSPACE.getDescription().setAutoBuilding(false);
+ MSG.println("===============================================================================================");
- WORKSPACE.run(new IWorkspaceRunnable()
- {
- public void run(IProgressMonitor monitor) throws CoreException
- {
- clearWorkspace();
- }
- }, new NullProgressMonitor());
-
- buildWorkspace(true);
+ clearWorkspace();
boolean clean = true;
- for (String phase : PHASES)
+ for (BundleFile phase : testFolder.getChildren())
{
- final BundleFile folder = testFolder.getChild(phase);
- if (folder != null)
+ if (phase.isDirectory())
{
- MSG.println(" Update workspace for " + phase + " build");
- WORKSPACE.run(new IWorkspaceRunnable()
- {
- public void run(IProgressMonitor monitor) throws CoreException
- {
- try
- {
- updateWorkspace(folder, monitor);
- }
- catch (IOException ex)
- {
- ex.printStackTrace();
- // TODO throw CoreException?
- }
- }
- }, new NullProgressMonitor());
-
- MSG.println(" Build " + phase);
- long start = System.currentTimeMillis();
- IMarker[] markers = buildWorkspace(clean);
- msg("Took " + (System.currentTimeMillis() - start) + " millis");
-
- final BundleFile resultsFile = folder.getChild(RESULTS_FILE);
- if (resultsFile != null)
- {
- MSG.println(" Check results of " + phase + " build");
- checkResults(phase, resultsFile, markers);
- }
- else
- {
- MSG.println(" Generate results of " + phase + " build");
- generateResults(folder, markers);
- }
+ MSG.println(" Phase '" + phase.getName() + "'");
+ runPhase(phase, clean);
+ clean = false;
}
-
- clean = false;
}
MSG.println();
}
- private void clearWorkspace() throws CoreException
+ private void runPhase(BundleFile phase, boolean clean) throws Throwable
{
- boolean first = true;
- for (IProject project : ROOT.getProjects())
- {
- if (first)
- {
- MSG.println(" Clear workspace");
- first = false;
- }
+ MSG.println(" Update workspace");
+ updateWorkspace(phase);
+ IMarker[] markers = buildWorkspace(phase, clean);
+ processMarkers(phase, markers, "build.markers");
- msg("Deleting project " + project.getName());
- project.delete(true, new NullProgressMonitor());
+ int fixAttempt = 0;
+ while (markers.length != 0)
+ {
+ MSG.println(" Fix workspace (attempt " + ++fixAttempt + ")");
+ fixWorkspace(phase, markers);
+ markers = buildWorkspace(phase, false);
+ processMarkers(phase, markers, "fix" + fixAttempt + ".markers");
}
+ }
- for (File file : WORKSPACE_FILE.listFiles())
+ private void clearWorkspace() throws Throwable
+ {
+ WORKSPACE.getDescription().setAutoBuilding(false);
+ WORKSPACE.run(new IWorkspaceRunnable()
{
- if (file.isDirectory() && !".metadata".equals(file.getName()))
+ public void run(IProgressMonitor monitor) throws CoreException
{
- msg("Deleting location " + file);
- VersionUtil.delete(file);
+ for (IProject project : ROOT.getProjects())
+ {
+ MSG.println(" Deleting project " + project.getName());
+ project.delete(true, null);
+ }
+
+ for (File file : WORKSPACE_FILE.listFiles())
+ {
+ if (file.isDirectory() && !".metadata".equals(file.getName()))
+ {
+ MSG.println(" Deleting location " + file);
+ VersionUtil.delete(file);
+ }
+ }
}
- }
+ }, null);
}
- private void updateWorkspace(BundleFile updateFolder, IProgressMonitor monitor) throws CoreException, IOException
+ private void updateWorkspace(final BundleFile phase) throws Throwable
{
- updateWorkspace(updateFolder, WORKSPACE_FILE, true);
-
- for (File file : WORKSPACE_FILE.listFiles())
+ WORKSPACE.run(new IWorkspaceRunnable()
{
- String name = file.getName();
- if (file.isDirectory() && !".metadata".equals(name))
+ public void run(IProgressMonitor monitor) throws CoreException
{
- IProject project = ROOT.getProject(name);
- if (project.exists())
+ try
{
- if (project.isOpen())
- {
- project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
- }
- else
+ updateWorkspace(phase, WORKSPACE_FILE, 0);
+
+ for (File file : WORKSPACE_FILE.listFiles())
{
- project.open(monitor);
+ String name = file.getName();
+ if (file.isDirectory() && !".metadata".equals(name))
+ {
+ IProject project = ROOT.getProject(name);
+ if (project.exists())
+ {
+ if (project.isOpen())
+ {
+ project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ }
+ else
+ {
+ project.open(monitor);
+ }
+ }
+ else
+ {
+ project.create(monitor);
+ project.open(monitor);
+ }
+ }
}
+
+ // TODO Remove deleted projects
}
- else
+ catch (CoreException ex)
{
- project.create(monitor);
- project.open(monitor);
+ throw ex;
+ }
+ catch (RuntimeException ex)
+ {
+ throw ex;
+ }
+ catch (Throwable ex)
+ {
+ throw new RuntimeException(ex);
}
}
- }
+ }, null);
}
- private void updateWorkspace(BundleFile source, File target, boolean onlyDirectories) throws IOException
+ private void updateWorkspace(BundleFile source, File target, int level) throws Throwable
{
if (source.getName().endsWith(DELETE_SUFFIX))
{
@@ -204,10 +202,10 @@ public class VersionBuilderTest extends TestCase
for (BundleFile sourceChild : source.getChildren())
{
File targetChild = new File(target, sourceChild.getName());
- updateWorkspace(sourceChild, targetChild, false);
+ updateWorkspace(sourceChild, targetChild, level + 1);
}
}
- else if (!onlyDirectories)
+ else if (level > 1) // Exclude files on project level
{
if (!target.exists())
{
@@ -222,37 +220,72 @@ public class VersionBuilderTest extends TestCase
}
}
- private IMarker[] buildWorkspace(boolean clean) throws CoreException, InterruptedException
+ private IMarker[] buildWorkspace(BundleFile phase, boolean clean) throws Throwable
{
+ MSG.println(" Build " + (clean ? "clean" : "incremental"));
+ long start = System.currentTimeMillis();
+
if (clean)
{
- WORKSPACE.build(IncrementalProjectBuilder.CLEAN_BUILD, new NullProgressMonitor());
- WORKSPACE.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ WORKSPACE.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
+ WORKSPACE.build(IncrementalProjectBuilder.FULL_BUILD, null);
}
else
{
- WORKSPACE.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new NullProgressMonitor());
+ WORKSPACE.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
+ msg("Took " + (System.currentTimeMillis() - start) + " millis");
return ROOT.findMarkers(Markers.MARKER_TYPE, false, IResource.DEPTH_INFINITE);
}
- private void checkResults(String phase, BundleFile resultsFile, IMarker[] markers) throws CoreException
+ private void fixWorkspace(BundleFile phase, IMarker[] markers)
+ {
+ for (IMarker marker : markers)
+ {
+ IMarkerResolution[] resolutions = FIX_GENERATOR.getResolutions(marker);
+ if (resolutions != null && resolutions.length != 0)
+ {
+ assertTrue("Marker has resolutions but hasResolutions() returns false", FIX_GENERATOR.hasResolutions(marker));
+ for (IMarkerResolution resolution : resolutions)
+ {
+ msg("Fixing " + marker.getResource().getFullPath() + ": " + resolution.getLabel());
+ resolution.run(marker);
+ }
+ }
+ }
+ }
+
+ private void processMarkers(BundleFile phase, IMarker[] markers, String fileName) throws Throwable
{
- String expectedResults = resultsFile.getContents();
- String actualResults = createResults(markers);
- assertEquals("After " + phase + " build", expectedResults, actualResults);
+ BundleFile markersFile = phase.getChild(fileName);
+ if (markersFile != null)
+ {
+ MSG.println(" Check markers");
+ checkMarkers(phase, markers, markersFile);
+ }
+ else
+ {
+ MSG.println(" Generate markers");
+ generateMarkers(phase, markers, fileName);
+ }
}
- private void generateResults(BundleFile folder, IMarker[] markers) throws CoreException, IOException
+ private void checkMarkers(BundleFile phase, IMarker[] markers, BundleFile markersFile) throws Throwable
{
- String results = createResults(markers);
+ String expected = markersFile.getContents();
+ String actual = createMarkers(markers);
+ assertEquals("After " + phase.getName() + " build", expected, actual);
+ }
- BundleFile resultsFile = folder.addChild(RESULTS_FILE, false);
- resultsFile.setContents(results);
+ private void generateMarkers(BundleFile phase, IMarker[] markers, String fileName) throws Throwable
+ {
+ String contents = createMarkers(markers);
+ BundleFile resultsFile = phase.addChild(fileName, false);
+ resultsFile.setContents(contents);
}
- private String createResults(IMarker[] markers) throws CoreException
+ private static String createMarkers(IMarker[] markers) throws CoreException
{
if (markers.length == 0)
{
@@ -303,7 +336,7 @@ public class VersionBuilderTest extends TestCase
return builder.toString();
}
- private void addAttribute(StringBuilder builder, String key, Object value)
+ private static void addAttribute(StringBuilder builder, String key, Object value)
{
String str = " " + key + " = " + value;
msg(str);
@@ -319,6 +352,6 @@ public class VersionBuilderTest extends TestCase
private static void msg(String string)
{
- MSG.println(" " + string);
+ MSG.println(" " + string);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00001-NoProblemAfterNewBaseline/clean/results.txt b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00001-NoProblemAfterNewBaseline/clean/build.markers
index e69de29bb2..e69de29bb2 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00001-NoProblemAfterNewBaseline/clean/results.txt
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00001-NoProblemAfterNewBaseline/clean/build.markers
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/clean/results.txt b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/clean/build.markers
index e69de29bb2..e69de29bb2 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/clean/results.txt
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/clean/build.markers
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/results.txt b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/build.markers
index f7be5a0cd0..f7be5a0cd0 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/results.txt
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/build.markers
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix1.markers b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix1.markers
new file mode 100644
index 0000000000..9a006e0f02
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix1.markers
@@ -0,0 +1,20 @@
+Marker
+ <resource> = /com.foo.project1-feature/feature.xml
+ charEnd = 681
+ charStart = 665
+ lineNumber = 27
+ message = Plug-in reference 'com.foo.project1' has been changed from 1.0.0 to 1.0.100
+ problemType = component.version
+ quickFixConfigureOption = ignore.feature.content.changes
+ severity = 1
+Marker
+ <resource> = /com.foo.project1-feature/feature.xml
+ charEnd = 124
+ charStart = 119
+ lineNumber = 4
+ message = Version must be increased to 1.0.100 because the feature's references have changed
+ problemType = component.version
+ quickFixConfigureOption = ignore.feature.content.changes
+ quickFixPattern = feature.*?version\s*=\s*["'](\d+(\.\d+(\.\d+)?)?)
+ quickFixReplacement = 1.0.100
+ severity = 2
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix2.markers b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix2.markers
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix2.markers
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.releng.version.ui/META-INF/MANIFEST.MF
index 7d637a202b..f285385101 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.releng.version.ui/META-INF/MANIFEST.MF
@@ -19,6 +19,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
Export-Package: org.eclipse.emf.cdo.releng.version.ui;version="2.0.0";x-internal:=true,
org.eclipse.emf.cdo.releng.version.ui.actions;version="2.0.0";x-internal:=true,
org.eclipse.emf.cdo.releng.version.ui.dialogs;version="2.0.0";x-internal:=true,
- org.eclipse.emf.cdo.releng.version.ui.quickfixes;version="2.0.0";x-internal:=true,
+ org.eclipse.emf.cdo.releng.version.ui.quickfixes;version="2.0.0";x-friends:="org.eclipse.emf.cdo.releng.version.tests",
org.eclipse.emf.cdo.releng.version.ui.views;version="2.0.0";x-internal:=true
Eclipse-BuddyPolicy: dependent
diff --git a/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/Markers.java b/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/Markers.java
index a39f580629..dff7bad1b8 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/Markers.java
+++ b/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/version/Markers.java
@@ -116,7 +116,8 @@ public final class Markers
return marker.getResource().getFullPath().toString();
}
- return marker.getAttribute(attributeName).toString();
+ Object value = marker.getAttribute(attributeName);
+ return value == null ? null : value.toString();
}
catch (CoreException ex)
{

Back to the top