Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-08-25 06:22:29 +0000
committerEike Stepper2012-08-25 06:22:29 +0000
commiteb242d8fef3db88676d210f5544cf7b272e5bd59 (patch)
tree2fd9afb5d1c81775ca12ddd18eae7e55a5056366 /plugins
parent5850f0be086f21ba6a18fcbcc9dc283e0938dd80 (diff)
downloadcdo-eb242d8fef3db88676d210f5544cf7b272e5bd59.tar.gz
cdo-eb242d8fef3db88676d210f5544cf7b272e5bd59.tar.xz
cdo-eb242d8fef3db88676d210f5544cf7b272e5bd59.zip
Remove qcfx fom explanatoy warnng
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/src/org/eclipse/emf/cdo/releng/version/tests/VersionBuilderTest.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/build.markers8
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/fix1.markers16
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/internal/version/VersionBuilder.java7
4 files changed, 38 insertions, 19 deletions
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 bf032201df..0f52fa9bc1 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
@@ -96,7 +96,7 @@ public class VersionBuilderTest extends TestCase
processMarkers(phase, markers, "build.markers");
int fixAttempt = 0;
- while (markers.length != 0)
+ while (markers.length != 0) // TODO Can be inifinite?
{
MSG.println(" Fix workspace (attempt " + ++fixAttempt + ")");
fixWorkspace(phase, markers);
@@ -326,7 +326,7 @@ public class VersionBuilderTest extends TestCase
builder.append("Marker\n");
IFile file = (IFile)marker.getResource();
- addAttribute(builder, Markers.RESOURCE_ATTRIBUTE, file.getFullPath());
+ addAttribute(builder, Markers.RESOURCE_ATTRIBUTE + " ", file.getFullPath());
Map<String, Object> attributes = marker.getAttributes();
List<String> keys = new ArrayList<String>(attributes.keySet());
@@ -376,7 +376,7 @@ public class VersionBuilderTest extends TestCase
}
else
{
- addAttribute(builder, "<" + IMarker.CHAR_END + ">", value);
+ addAttribute(builder, "<" + IMarker.CHAR_END + "> ", value);
break;
}
}
@@ -386,12 +386,13 @@ public class VersionBuilderTest extends TestCase
if (keys.remove(IMarker.SEVERITY))
{
- addAttribute(builder, "<" + IMarker.SEVERITY + ">", attributes.get(IMarker.SEVERITY));
+ int severity = (Integer)attributes.get(IMarker.SEVERITY);
+ addAttribute(builder, "<" + IMarker.SEVERITY + "> ", getSeverityLabel(severity));
}
if (keys.remove(IMarker.MESSAGE))
{
- addAttribute(builder, "<" + IMarker.MESSAGE + ">", attributes.get(IMarker.MESSAGE));
+ addAttribute(builder, "<" + IMarker.MESSAGE + "> ", attributes.get(IMarker.MESSAGE));
}
if (keys.remove(Markers.PROBLEM_TYPE))
@@ -410,6 +411,21 @@ public class VersionBuilderTest extends TestCase
return builder.toString();
}
+ private static Object getSeverityLabel(int severity)
+ {
+ switch (severity)
+ {
+ case IMarker.SEVERITY_INFO:
+ return "INFO";
+ case IMarker.SEVERITY_WARNING:
+ return "WARNING";
+ case IMarker.SEVERITY_ERROR:
+ return "ERROR";
+ default:
+ throw new IllegalStateException("Illegal severity code " + severity);
+ }
+ }
+
private static void addAttribute(StringBuilder builder, String key, Object value)
{
String str = " " + key + " = " + value;
diff --git a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/build.markers b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/build.markers
index e01bee70b2..69dd465d61 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/build.markers
+++ b/plugins/org.eclipse.emf.cdo.releng.version.tests/tests/00002-ProblemAfterChange/incremental/build.markers
@@ -1,9 +1,9 @@
Marker
- <resource> = /com.foo.project1/META-INF/MANIFEST.MF
+ <resource> = /com.foo.project1/META-INF/MANIFEST.MF
<charStart> = (4,18)
- <charEnd> = (4,23)
- <severity> = 2
- <message> = Version must be increased to 1.0.100 because the project's contents have changed
+ <charEnd> = (4,23)
+ <severity> = ERROR
+ <message> = Version must be increased to 1.0.100 because the project's contents have changed
problemType = component.version
quickFixPattern = Bundle-Version: *(\d+(\.\d+(\.\d+)?)?)
quickFixReplacement = 1.0.100
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
index 2c9c6ff8c4..d45b43d184 100644
--- 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
@@ -1,17 +1,17 @@
Marker
- <resource> = /com.foo.project1-feature/feature.xml
+ <resource> = /com.foo.project1-feature/feature.xml
<charStart> = (28,15)
- <charEnd> = (28,31)
- <severity> = 1
- <message> = Plug-in reference 'com.foo.project1' has been changed from 1.0.0 to 1.0.100
+ <charEnd> = (28,31)
+ <severity> = WARNING
+ <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
Marker
- <resource> = /com.foo.project1-feature/feature.xml
+ <resource> = /com.foo.project1-feature/feature.xml
<charStart> = (5,17)
- <charEnd> = (5,22)
- <severity> = 2
- <message> = Version must be increased to 1.0.100 because the feature's references have changed
+ <charEnd> = (5,22)
+ <severity> = ERROR
+ <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+)?)?)
diff --git a/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/internal/version/VersionBuilder.java b/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/internal/version/VersionBuilder.java
index 5b1cb5eb42..8ee310e91f 100644
--- a/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/internal/version/VersionBuilder.java
+++ b/plugins/org.eclipse.emf.cdo.releng.version/src/org/eclipse/emf/cdo/releng/internal/version/VersionBuilder.java
@@ -1491,8 +1491,11 @@ public class VersionBuilder extends IncrementalProjectBuilder implements IElemen
IMarker marker = addFeatureChildMarker(file, Markers.COMPONENT_VERSION_PROBLEM, tag, name, msg,
element.isLicenseFeature(), componentReferenceType == ComponentReferenceType.ADDED, replacementVersion,
severity);
- marker.setAttribute(Markers.QUICK_FIX_CONFIGURE_OPTION,
- IVersionBuilderArguments.IGNORE_CONTENT_CHANGES_ARGUMENT);
+ if (severity != IMarker.SEVERITY_ERROR)
+ {
+ marker.setAttribute(Markers.QUICK_FIX_CONFIGURE_OPTION,
+ IVersionBuilderArguments.IGNORE_CONTENT_CHANGES_ARGUMENT);
+ }
}
}
catch (Exception ex)

Back to the top