diff --git a/com.google.eclipse.protobuf.ui/OSGI-INF/l10n/bundle.properties b/com.google.eclipse.protobuf.ui/OSGI-INF/l10n/bundle.properties
index b699865..6feb38a 100644
--- a/com.google.eclipse.protobuf.ui/OSGI-INF/l10n/bundle.properties
+++ b/com.google.eclipse.protobuf.ui/OSGI-INF/l10n/bundle.properties
@@ -16,4 +16,6 @@
 command.tooltip.0 = Open Quick Outline
 command.description.1 = Insert semicolon.
 command.name.1 = Insert semicolon
-command.tooltip.1 = Insert semicolon
\ No newline at end of file
+command.tooltip.1 = Insert semicolon
+protoc.marker.name = Protocol Buffer Compiler
+protoq.marker.name = Protocol Buffer (Quick Check)
\ No newline at end of file
diff --git a/com.google.eclipse.protobuf.ui/build.properties b/com.google.eclipse.protobuf.ui/build.properties
index 0d2ea5b..0ffd4f4 100644
--- a/com.google.eclipse.protobuf.ui/build.properties
+++ b/com.google.eclipse.protobuf.ui/build.properties
@@ -4,4 +4,5 @@
                .,\
                plugin.xml,\
                OSGI-INF/,\
-               icons/
+               icons/,\
+               OSGI-INF/l10n/bundle.properties
diff --git a/com.google.eclipse.protobuf.ui/plugin.xml b/com.google.eclipse.protobuf.ui/plugin.xml
index fd013cb..133a7c3 100644
--- a/com.google.eclipse.protobuf.ui/plugin.xml
+++ b/com.google.eclipse.protobuf.ui/plugin.xml
@@ -170,7 +170,7 @@
       class="com.google.eclipse.protobuf.ui.ProtobufExecutableExtensionFactory:com.google.eclipse.protobuf.ui.builder.ProtobufBuildParticipant">
     </participant>
   </extension>
-  <extension id="pbmarker" name="Protocol Buffer Marker" point="org.eclipse.core.resources.markers">
+  <extension id="protocMarker" name="%protoc.marker.name" point="org.eclipse.core.resources.markers">
     <super type="org.eclipse.core.resources.problemmarker">
     </super>
     <super type="org.eclipse.core.resources.textmarker">
@@ -178,7 +178,7 @@
     <persistent value="true">
     </persistent>
   </extension>
-
+  
   <!-- Rename Refactoring -->
   <extension point="org.eclipse.ui.handlers">
     <handler
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtobufBuildParticipant.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtobufBuildParticipant.java
index ad2fe4a..fe1066b 100644
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtobufBuildParticipant.java
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtobufBuildParticipant.java
@@ -39,7 +39,7 @@
   private static Logger logger = Logger.getLogger(ProtobufBuildParticipant.class);
 
   @Inject private IPreferenceStoreAccess preferenceStoreAccess;
-  @Inject private MarkerFactory markerFactory;
+  @Inject private ProtocOutputParser outputParser;
   @Inject private ProtocCommandFactory commandFactory;
 
   public void build(IBuildContext context, IProgressMonitor monitor) throws CoreException {
@@ -80,7 +80,7 @@
   private void generateSingleProto(IFile source, String protocPath, TargetLanguage language, String outputFolderPath) {
     String command = commandFactory.protocCommand(source, protocPath, language, outputFolderPath);
     try {
-      source.deleteMarkers(MarkerFactory.MARKER_ID, true, DEPTH_INFINITE);
+      source.deleteMarkers(ProtocOutputParser.MARKER_ID, true, DEPTH_INFINITE);
       Process process = Runtime.getRuntime().exec(command);
       processStream(process.getErrorStream(), source);
       process.destroy();
@@ -96,8 +96,9 @@
       reader = new InputStreamReader(stream);
       BufferedReader bufferedReader = new BufferedReader(reader);
       String line = null;
+      ProtocMarkerFactory markerFactory = new ProtocMarkerFactory(source);
       while ((line = bufferedReader.readLine()) != null) {
-        markerFactory.parseAndCreateMarkerIfNecessary(line, source);
+        outputParser.parseAndAddMarkerIfNecessary(line, markerFactory);
         System.out.println("[protoc] " + line);
       }
     } catch (Exception e) {
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtocMarkerFactory.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtocMarkerFactory.java
new file mode 100644
index 0000000..f67be7c
--- /dev/null
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtocMarkerFactory.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2011 Google Inc.
+ *
+ * All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
+ * Public License v1.0 which accompanies this distribution, and is available at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package com.google.eclipse.protobuf.ui.builder;
+
+import static org.eclipse.core.resources.IMarker.*;
+import static org.eclipse.core.resources.IResource.DEPTH_INFINITE;
+import static org.eclipse.xtext.ui.MarkerTypes.FAST_VALIDATION;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Factory of <code>{@link IMarker}</code>s derived from errors reported by protoc.
+ *
+ * @author alruiz@google.com (Alex Ruiz)
+ */
+class ProtocMarkerFactory {
+
+  static final String MARKER_ID = "com.google.eclipse.protobuf.ui.protocMarker";
+
+  private final IFile file;
+  private final IMarker[] markers;
+
+  ProtocMarkerFactory(IFile file) throws CoreException {
+    this.file = file;
+    markers = this.file.findMarkers(FAST_VALIDATION, true, DEPTH_INFINITE);
+  }
+  
+  void createErrorIfNecessary(String description, int lineNumber) throws CoreException {
+    if (containsMarker(description, lineNumber)) return;
+    IMarker marker = file.createMarker(MARKER_ID);
+    marker.setAttribute(SEVERITY, SEVERITY_ERROR);
+    marker.setAttribute(MESSAGE, description);
+    marker.setAttribute(LINE_NUMBER, lineNumber);
+  }
+  
+  private boolean containsMarker(String description, int lineNumber) throws CoreException {
+    for (IMarker marker : markers)
+      if (marker.getAttribute(MESSAGE).equals(description) && marker.getAttribute(LINE_NUMBER).equals(lineNumber))
+        return true;
+    return false;
+  }
+}
diff --git a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/MarkerFactory.java b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtocOutputParser.java
similarity index 63%
rename from com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/MarkerFactory.java
rename to com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtocOutputParser.java
index 7a850b5..8ce8bc5 100644
--- a/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/MarkerFactory.java
+++ b/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/builder/ProtocOutputParser.java
@@ -9,23 +9,20 @@
 package com.google.eclipse.protobuf.ui.builder;
 
 import static java.lang.Integer.parseInt;
-import static org.eclipse.core.resources.IMarker.*;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.CoreException;
 
 /**
- * Parses the output of protoc and create error markers if necessary.
+ * Parses the output of protoc.
  *
  * @author alruiz@google.com (Alex Ruiz)
  */
-class MarkerFactory {
+class ProtocOutputParser {
 
-  static final String MARKER_ID = "com.google.eclipse.protobuf.ui.pbmarker";
+  static final String MARKER_ID = "com.google.eclipse.protobuf.ui.protocMarker";
 
   /*
    * (.*):(\\d+):(\\d+):\\s*(.*)
@@ -39,18 +36,11 @@
    */
   private static final Pattern ERROR_PATTERN = Pattern.compile("(.*):(\\d+):(\\d+):\\s*(.*)");
 
-  void parseAndCreateMarkerIfNecessary(String line, IFile file) throws CoreException {
-    parseError(line, file);
-  }
-
-  private void parseError(String line, IFile file) throws CoreException {
+  void parseAndAddMarkerIfNecessary(String line, ProtocMarkerFactory markerFactory) throws CoreException {
     Matcher errorMatcher = ERROR_PATTERN.matcher(line);
     if (!errorMatcher.matches()) return;
     int lineNumber = parseInt(errorMatcher.group(2));
     String description = errorMatcher.group(4);
-    IMarker marker = file.createMarker(MARKER_ID);
-    marker.setAttribute(SEVERITY, SEVERITY_ERROR);
-    marker.setAttribute(MESSAGE, description);
-    marker.setAttribute(LINE_NUMBER, lineNumber);
+    markerFactory.createErrorIfNecessary(description, lineNumber);
   }
 }
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/ProtobufJavaValidator.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/ProtobufJavaValidator.java
index 5932ad4..158aa1b 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/ProtobufJavaValidator.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/validation/ProtobufJavaValidator.java
@@ -8,16 +8,24 @@
  */
 package com.google.eclipse.protobuf.validation;
 
+import org.eclipse.xtext.validation.Check;
+
+import com.google.eclipse.protobuf.protobuf.Property;
+
 /**
  * @author alruiz@google.com (Alex Ruiz)
  */
 public class ProtobufJavaValidator extends AbstractProtobufJavaValidator {
 
-//	@Check
-//	public void checkGreetingStartsWithCapital(Greeting greeting) {
-//		if (!Character.isUpperCase(greeting.getName().charAt(0))) {
-//			warning("Name should start with a capital", MyDslPackage.GREETING__NAME);
-//		}
-//	}
+  /**
+   * Creates an error if the tag number of the given property is less than zero.
+   * @param property the given property.
+   */
+  @Check public void checkTagNumberIsGreaterThanZero(Property property) {
+    int index = property.getIndex();
+    if (index > 0) return;
+    String msg = (index == 0) ? "Field numbers must be positive integers." : "Expected field number.";
+    error(msg, property.eClass().getEStructuralFeature("index"));
+  }
 
 }
