Merge branch 'master' into 140
diff --git a/com.google.eclipse.protobuf.feature/feature.xml b/com.google.eclipse.protobuf.feature/feature.xml
index 01cb397..7def2fd 100644
--- a/com.google.eclipse.protobuf.feature/feature.xml
+++ b/com.google.eclipse.protobuf.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="com.google.eclipse.protobuf"
       label="%featureName"
-      version="1.3.3.qualifier"
+      version="1.4.0.qualifier"
       provider-name="%providerName">
 
    <description url="https://code.google.com/p/protobuf-dt/">
diff --git a/com.google.eclipse.protobuf.ui/.gitignore b/com.google.eclipse.protobuf.ui/.gitignore
index 4247368..9041932 100644
--- a/com.google.eclipse.protobuf.ui/.gitignore
+++ b/com.google.eclipse.protobuf.ui/.gitignore
@@ -1,2 +1,3 @@
-/src-gen
+/src-gen/com
 /plugin.xml_gen
+/bin
diff --git a/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
index b509576..041ad8a 100644
--- a/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2

 Bundle-Name: %Bundle-Name

 Bundle-Vendor: %Bundle-Vendor

-Bundle-Version: 1.3.3.qualifier

+Bundle-Version: 1.4.0.qualifier

 Bundle-SymbolicName: com.google.eclipse.protobuf.ui; singleton:=true

 Bundle-ActivationPolicy: lazy

 Require-Bundle: com.google.eclipse.protobuf;visibility:=reexport,

diff --git a/com.google.eclipse.protobuf.ui/src-gen/.gitkeep b/com.google.eclipse.protobuf.ui/src-gen/.gitkeep
new file mode 100644
index 0000000..774f397
--- /dev/null
+++ b/com.google.eclipse.protobuf.ui/src-gen/.gitkeep
@@ -0,0 +1 @@
+Git doesn't support empty directories in a repo. This "empty" file force it to keep the src-gen directory.
diff --git a/com.google.eclipse.protobuf/.gitignore b/com.google.eclipse.protobuf/.gitignore
index ae11275..40272eb 100644
--- a/com.google.eclipse.protobuf/.gitignore
+++ b/com.google.eclipse.protobuf/.gitignore
@@ -1,3 +1,4 @@
-/src-gen
+/src-gen/com
 /xtend-gen
 /plugin.xml_gen
+/bin
diff --git a/com.google.eclipse.protobuf/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf/META-INF/MANIFEST.MF
index b714cf1..1c3a3fc 100644
--- a/com.google.eclipse.protobuf/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Eclipse-ExtensibleAPI: true

 Bundle-Name: %Bundle-Name

 Bundle-Vendor: %Bundle-Vendor

-Bundle-Version: 1.3.3.qualifier

+Bundle-Version: 1.4.0.qualifier

 Bundle-SymbolicName: com.google.eclipse.protobuf; singleton:=true

 Bundle-ActivationPolicy: lazy

 Require-Bundle: org.eclipse.xtext;bundle-version="2.3.0",

diff --git a/com.google.eclipse.protobuf/src-gen/.gitkeep b/com.google.eclipse.protobuf/src-gen/.gitkeep
new file mode 100644
index 0000000..774f397
--- /dev/null
+++ b/com.google.eclipse.protobuf/src-gen/.gitkeep
@@ -0,0 +1 @@
+Git doesn't support empty directories in a repo. This "empty" file force it to keep the src-gen directory.
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext
index a2e91e7..63e6b96 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext
@@ -103,7 +103,7 @@
   ('[' fieldOptions+=FieldOption (',' fieldOptions+=FieldOption)* ']')? (';')+;
 
 terminal HEX returns ecore::ELong:
-  ('-')? '0x' (NUMBER | 'a'..'f' | 'A'..'F')+;
+  ('-')? '0' ('x' | 'X') (NUMBER | 'a'..'f' | 'A'..'F')+;
 
 TypeExtension:
   =>'extend' type=ExtensibleTypeLink '{'
@@ -177,7 +177,7 @@
   MessageOptionField | '(' ExtensionOptionField ')';
 
 MessageOptionField:
-  target=[IndexedElement];  
+  target=[IndexedElement|Name];  
 
 ExtensionOptionField:
   target=[IndexedElement|QualifiedName];
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/conversion/HEXValueConverter.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/conversion/HEXValueConverter.java
index e553950..adb6208 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/conversion/HEXValueConverter.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/conversion/HEXValueConverter.java
@@ -22,7 +22,7 @@
  * @author alruiz@google.com (Alex Ruiz)
  */
 public class HEXValueConverter extends AbstractLexerBasedConverter<Long> {
-  private static final String[] VALID_PREFIXES = { "0x", "-0x", "0X", "-0x" };
+  private static final String[] VALID_PREFIXES = { "0x", "-0x", "0X", "-0X" };
 
   /**
    * Creates an {@code int} from the given input, if the given input represents an hexadecimal number.
diff --git a/update-site/artifacts.jar b/update-site/artifacts.jar
index f960e3d..5aef83c 100644
--- a/update-site/artifacts.jar
+++ b/update-site/artifacts.jar
Binary files differ
diff --git a/update-site/content.jar b/update-site/content.jar
index 866e780..e53bdc8 100644
--- a/update-site/content.jar
+++ b/update-site/content.jar
Binary files differ
diff --git a/update-site/features/com.google.eclipse.protobuf_1.3.4.201305301119.jar b/update-site/features/com.google.eclipse.protobuf_1.3.4.201305301119.jar
new file mode 100644
index 0000000..181632b
--- /dev/null
+++ b/update-site/features/com.google.eclipse.protobuf_1.3.4.201305301119.jar
Binary files differ
diff --git a/update-site/features/com.google.eclipse.protobuf_1.4.0.201305301223.jar b/update-site/features/com.google.eclipse.protobuf_1.4.0.201305301223.jar
new file mode 100644
index 0000000..7092dc6
--- /dev/null
+++ b/update-site/features/com.google.eclipse.protobuf_1.4.0.201305301223.jar
Binary files differ
diff --git a/update-site/plugins/com.google.eclipse.protobuf.ui_1.3.4.201305301119.jar b/update-site/plugins/com.google.eclipse.protobuf.ui_1.3.4.201305301119.jar
new file mode 100644
index 0000000..9a4367f
--- /dev/null
+++ b/update-site/plugins/com.google.eclipse.protobuf.ui_1.3.4.201305301119.jar
Binary files differ
diff --git a/update-site/plugins/com.google.eclipse.protobuf.ui_1.4.0.201305301223.jar b/update-site/plugins/com.google.eclipse.protobuf.ui_1.4.0.201305301223.jar
new file mode 100644
index 0000000..f1a77a1
--- /dev/null
+++ b/update-site/plugins/com.google.eclipse.protobuf.ui_1.4.0.201305301223.jar
Binary files differ
diff --git a/update-site/plugins/com.google.eclipse.protobuf_1.3.4.201305301119.jar b/update-site/plugins/com.google.eclipse.protobuf_1.3.4.201305301119.jar
new file mode 100644
index 0000000..96b4cd6
--- /dev/null
+++ b/update-site/plugins/com.google.eclipse.protobuf_1.3.4.201305301119.jar
Binary files differ
diff --git a/update-site/plugins/com.google.eclipse.protobuf_1.4.0.201305301223.jar b/update-site/plugins/com.google.eclipse.protobuf_1.4.0.201305301223.jar
new file mode 100644
index 0000000..067b146
--- /dev/null
+++ b/update-site/plugins/com.google.eclipse.protobuf_1.4.0.201305301223.jar
Binary files differ
diff --git a/update-site/site.xml b/update-site/site.xml
index b1d0890..a320571 100644
--- a/update-site/site.xml
+++ b/update-site/site.xml
@@ -3,7 +3,7 @@
    <description name="protobuf-dt" url="http://protobuf-dt.googlecode.com/git/update-site">
       Update site for protobuf-dt, an Eclipse-based Development Environment for Protocol Buffers.
    </description>
-   <feature url="features/com.google.eclipse.protobuf_1.3.3.201210291557.jar" id="com.google.eclipse.protobuf" version="1.3.3.201210291557">
+   <feature url="features/com.google.eclipse.protobuf_1.4.0.201305301223.jar" id="com.google.eclipse.protobuf" version="1.4.0.201305301223">
       <category name="google"/>
    </feature>
    <category-def name="google" label="Google Inc."/>