aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwannheden2009-08-28 09:18:01 (EDT)
committersefftinge2009-08-28 09:18:01 (EDT)
commit037175f4c9a57d17596df1bb41251cb6ea6dafd7 (patch)
tree6531836f94950281eaa34e25935ed5a4170f3e06
parent9161a28d97f4ebf3c74a57fc51a2ce9a0301d92f (diff)
downloadorg.eclipse.xtext-037175f4c9a57d17596df1bb41251cb6ea6dafd7.zip
org.eclipse.xtext-037175f4c9a57d17596df1bb41251cb6ea6dafd7.tar.gz
org.eclipse.xtext-037175f4c9a57d17596df1bb41251cb6ea6dafd7.tar.bz2
Documentation: first stab at documentation for quickfix support - https://bugs.eclipse.org/bugs/show_bug.cgi?id=263793
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel.ui/src/org/eclipse/xtext/example/quickfix/DomainmodelQuickfixProvider.java2
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src/org/eclipse/xtext/example/validation/DomainmodelJavaValidator.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/org.eclipse.xtext.example.domainmodel.ui/src/org/eclipse/xtext/example/quickfix/DomainmodelQuickfixProvider.java b/examples/org.eclipse.xtext.example.domainmodel.ui/src/org/eclipse/xtext/example/quickfix/DomainmodelQuickfixProvider.java
index 03e62db..4fd1f28 100644
--- a/examples/org.eclipse.xtext.example.domainmodel.ui/src/org/eclipse/xtext/example/quickfix/DomainmodelQuickfixProvider.java
+++ b/examples/org.eclipse.xtext.example.domainmodel.ui/src/org/eclipse/xtext/example/quickfix/DomainmodelQuickfixProvider.java
@@ -16,7 +16,7 @@ import org.eclipse.xtext.ui.core.quickfix.Fix;
public class DomainmodelQuickfixProvider extends AbstractDeclarativeQuickfixProvider {
- @Fix(code = DomainmodelJavaValidator.CAPITAL_TYPE_NAME, label = "Capitalize name", description = "Capitalize name of type")
+ @Fix(code = DomainmodelJavaValidator.INVALID_TYPE_NAME, label = "Capitalize name", description = "Capitalize name of type")
public void fixName(Type type, IMarker marker) {
type.setName(type.getName().toUpperCase());
}
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src/org/eclipse/xtext/example/validation/DomainmodelJavaValidator.java b/examples/org.eclipse.xtext.example.domainmodel/src/org/eclipse/xtext/example/validation/DomainmodelJavaValidator.java
index 1f92afc..73f0b4d 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src/org/eclipse/xtext/example/validation/DomainmodelJavaValidator.java
+++ b/examples/org.eclipse.xtext.example.domainmodel/src/org/eclipse/xtext/example/validation/DomainmodelJavaValidator.java
@@ -6,12 +6,12 @@ import org.eclipse.xtext.validation.Check;
public class DomainmodelJavaValidator extends AbstractDomainmodelJavaValidator {
- public static final int CAPITAL_TYPE_NAME = 1;
+ public static final int INVALID_TYPE_NAME = 1;
@Check
public void checkTypeNameStartsWithCapital(Type type) {
if (!Character.isUpperCase(type.getName().charAt(0))) {
- warning("Name should start with a capital", DomainmodelPackage.TYPE__NAME, CAPITAL_TYPE_NAME);
+ warning("Name should start with a capital", DomainmodelPackage.TYPE__NAME, INVALID_TYPE_NAME);
}
}