Moved to JDK 1.8 with some code cleanup.
diff --git a/com.google.eclipse.protobuf.cdt.test/.classpath b/com.google.eclipse.protobuf.cdt.test/.classpath
index ad32c83..eca7bdb 100644
--- a/com.google.eclipse.protobuf.cdt.test/.classpath
+++ b/com.google.eclipse.protobuf.cdt.test/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/com.google.eclipse.protobuf.cdt.test/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.cdt.test/META-INF/MANIFEST.MF
index 8142a4b..3e989ba 100644
--- a/com.google.eclipse.protobuf.cdt.test/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.cdt.test/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@
Bundle-Version: 2.2.0.qualifier
Bundle-Vendor: Google, Inc.
Fragment-Host: com.google.eclipse.protobuf.cdt;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.junit;bundle-version="4.8.2",
org.mockito;bundle-version="1.8.5",
org.hamcrest.core;bundle-version="1.1.0",
diff --git a/com.google.eclipse.protobuf.cdt/.classpath b/com.google.eclipse.protobuf.cdt/.classpath
index ad32c83..eca7bdb 100644
--- a/com.google.eclipse.protobuf.cdt/.classpath
+++ b/com.google.eclipse.protobuf.cdt/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/com.google.eclipse.protobuf.cdt/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.cdt/META-INF/MANIFEST.MF
index 0c9f150..449bfe1 100644
--- a/com.google.eclipse.protobuf.cdt/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.cdt/META-INF/MANIFEST.MF
@@ -15,5 +15,5 @@
org.eclipse.jface.text;bundle-version="3.7.1",
org.eclipse.xtext;bundle-version="2.2.1",
org.eclipse.xtext.ui;bundle-version="2.2.1"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
diff --git a/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/mapping/IBindings.java b/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/mapping/IBindings.java
index 4773455..6e7c9d7 100644
--- a/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/mapping/IBindings.java
+++ b/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/mapping/IBindings.java
@@ -9,7 +9,6 @@
package com.google.eclipse.protobuf.cdt.mapping;
import static com.google.common.collect.ImmutableList.of;
-import static com.google.common.collect.Lists.newArrayList;
import static java.util.Collections.unmodifiableList;
import com.google.common.collect.ImmutableList;
@@ -23,6 +22,7 @@
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTQualifiedName;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassType;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -54,7 +54,7 @@
}
public List<String> qualifiedNameOf(IBinding binding) {
- List<String> segments = newArrayList();
+ List<String> segments = new ArrayList<>();
for (IBinding owner = binding.getOwner(); owner != null; owner = owner.getOwner()) {
if (owner instanceof ICPPEnumeration && !((ICPPEnumeration) owner).isScoped()) {
continue;
diff --git a/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/util/Editors.java b/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/util/Editors.java
index 75d3c2b..adef7c0 100644
--- a/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/util/Editors.java
+++ b/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/util/Editors.java
@@ -45,6 +45,6 @@
* @return the file displayed in the given editor.
*/
public IFile fileDisplayedIn(IEditorPart editor) {
- return (IFile) editor.getEditorInput().getAdapter(IFile.class);
+ return editor.getEditorInput().getAdapter(IFile.class);
}
}
diff --git a/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/util/ExtendedListIterator.java b/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/util/ExtendedListIterator.java
index a8c7e2a..e2f3022 100644
--- a/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/util/ExtendedListIterator.java
+++ b/com.google.eclipse.protobuf.cdt/src/com/google/eclipse/protobuf/cdt/util/ExtendedListIterator.java
@@ -11,8 +11,7 @@
import static java.util.Collections.emptyList;
import static java.util.Collections.unmodifiableList;
-import static com.google.common.collect.Lists.newArrayList;
-
+import java.util.Arrays;
import java.util.List;
import com.google.common.annotations.VisibleForTesting;
@@ -41,8 +40,9 @@
* @param elements the elements of the {@code Iterator} to create.
* @return the created {@code ListIterator}.
*/
- public static <T> ExtendedIterator<T> newIterator(T...elements) {
- return new ExtendedListIterator<T>(newArrayList(elements));
+ @SafeVarargs
+ public static <T> ExtendedIterator<T> newIterator(T... elements) {
+ return new ExtendedListIterator<T>(Arrays.asList(elements));
}
/**
diff --git a/com.google.eclipse.protobuf.feature/feature.properties b/com.google.eclipse.protobuf.feature/feature.properties
index 97c61be..9a8cf8f 100644
--- a/com.google.eclipse.protobuf.feature/feature.properties
+++ b/com.google.eclipse.protobuf.feature/feature.properties
@@ -16,19 +16,19 @@
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# This file should be translated.
-# "featureName" property - name of the feature
+# The name of the feature.
featureName=Protocol Buffer Editor
-# "providerName" property - name of the company that provides the feature
+# The name of the company that provides the feature.
providerName=Google, Inc.
-# "updateSiteName" property - label for the update site
+# The label for the update site.
updateSiteName=protobuf-dt
-# "description" property - description of the feature
+# The description of the feature.
description=Google's Eclipse-based Development Environment for Protocol Buffers
-# copyright
+# Copyright notice.
copyright=\
Copyright (c) 2011 Google, Inc.\n\
All rights reserved. This program and the accompanying materials\n\
@@ -36,11 +36,11 @@
which accompanies this distribution, and is available at\n\
http://www.eclipse.org/legal/epl-v10.html
-# "licenseURL" property - URL of the "Feature License"
+# The URL of the "Feature License"
# do not translate value - just change to point to a locale-specific HTML page
licenseURL=epl-v10.html
-# "license" property - text of the "Feature Update License"
+# The text of the "Feature Update License"
# should be plain text version of license agreement pointed to be "licenseURL"
license=\
Eclipse Foundation Software User Agreement\n\
diff --git a/com.google.eclipse.protobuf.integration.test/.classpath b/com.google.eclipse.protobuf.integration.test/.classpath
index 8e896d3..eca7bdb 100644
--- a/com.google.eclipse.protobuf.integration.test/.classpath
+++ b/com.google.eclipse.protobuf.integration.test/.classpath
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry combineaccessrules="false" kind="src" path="/com.google.eclipse.protobuf.test"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/com.google.eclipse.protobuf.integration.test/.settings/org.eclipse.jdt.core.prefs b/com.google.eclipse.protobuf.integration.test/.settings/org.eclipse.jdt.core.prefs
index f42de36..0c68a61 100644
--- a/com.google.eclipse.protobuf.integration.test/.settings/org.eclipse.jdt.core.prefs
+++ b/com.google.eclipse.protobuf.integration.test/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/com.google.eclipse.protobuf.integration.test/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.integration.test/META-INF/MANIFEST.MF
index e19c9d0..fa50f06 100644
--- a/com.google.eclipse.protobuf.integration.test/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.integration.test/META-INF/MANIFEST.MF
@@ -10,4 +10,4 @@
org.eclipse.core.resources;bundle-version="3.7.100",
org.hamcrest.core;bundle-version="1.1.0",
org.hamcrest.library;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/com.google.eclipse.protobuf.test/.classpath b/com.google.eclipse.protobuf.test/.classpath
index e8ea977..eca7bdb 100644
--- a/com.google.eclipse.protobuf.test/.classpath
+++ b/com.google.eclipse.protobuf.test/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/com.google.eclipse.protobuf.test/.settings/org.eclipse.jdt.core.prefs b/com.google.eclipse.protobuf.test/.settings/org.eclipse.jdt.core.prefs
index d17b672..a698e59 100644
--- a/com.google.eclipse.protobuf.test/.settings/org.eclipse.jdt.core.prefs
+++ b/com.google.eclipse.protobuf.test/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/com.google.eclipse.protobuf.test/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.test/META-INF/MANIFEST.MF
index 42172ec..85d4186 100644
--- a/com.google.eclipse.protobuf.test/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.test/META-INF/MANIFEST.MF
@@ -10,7 +10,7 @@
org.eclipse.core.resources;bundle-version="3.7.100",
org.hamcrest.core;bundle-version="1.1.0",
org.hamcrest.library;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.google.eclipse.protobuf.junit.core,
com.google.eclipse.protobuf.junit.matchers,
com.google.eclipse.protobuf.junit.stubs.resources,
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/FileCreator.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/FileCreator.java
index bc10455..ab2deeb 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/FileCreator.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/FileCreator.java
@@ -29,16 +29,17 @@
private static final Pattern CREATE_FILE_PATTERN = compile("// Create file (.*)");
File createFileFrom(String comment) {
- Scanner scanner = new Scanner(comment);
String fileName = null;
- while (scanner.hasNextLine()) {
- String line = scanner.nextLine();
- Matcher matcher = CREATE_FILE_PATTERN.matcher(line);
- if (!matcher.matches()) {
- return null;
- }
- fileName = matcher.group(1);
- break;
+ try (Scanner scanner = new Scanner(comment)) {
+ while (scanner.hasNextLine()) {
+ String line = scanner.nextLine();
+ Matcher matcher = CREATE_FILE_PATTERN.matcher(line);
+ if (!matcher.matches()) {
+ return null;
+ }
+ fileName = matcher.group(1);
+ break;
+ }
}
return createFile(fileName, comment);
}
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java
index 31a87a6..bbf9c20 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/core/XtextRule.java
@@ -13,7 +13,6 @@
import static org.eclipse.xtext.util.Strings.isEmpty;
import java.io.File;
-import java.util.Collection;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/FileStub.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/FileStub.java
index f79492c..eeb6bff 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/FileStub.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/FileStub.java
@@ -159,7 +159,7 @@
throw new UnsupportedOperationException();
}
- @Override @SuppressWarnings("rawtypes") public Object getAdapter(Class adapter) {
+ @Override public <T> T getAdapter(Class<T> adapter) {
throw new UnsupportedOperationException();
}
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/MarkerStub.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/MarkerStub.java
index b27738a..b700462 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/MarkerStub.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/junit/stubs/resources/MarkerStub.java
@@ -43,7 +43,7 @@
creationTime = System.currentTimeMillis();
}
- @Override @SuppressWarnings("rawtypes") public Object getAdapter(Class adapter) {
+ @Override public <T> T getAdapter(Class<T> adapter) {
throw new UnsupportedOperationException();
}
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/model/util/MessageFields_messageTypeOf_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/model/util/MessageFields_messageTypeOf_Test.java
index df00a6a..18a82ba 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/model/util/MessageFields_messageTypeOf_Test.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/model/util/MessageFields_messageTypeOf_Test.java
@@ -14,17 +14,10 @@
import static com.google.eclipse.protobuf.junit.core.UnitTestModule.unitTestModule;
import static com.google.eclipse.protobuf.junit.core.XtextRule.overrideRuntimeModuleWith;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.emf.common.util.EList;
import org.junit.Rule;
import org.junit.Test;
import com.google.eclipse.protobuf.junit.core.XtextRule;
-import com.google.eclipse.protobuf.protobuf.Message;
-import com.google.eclipse.protobuf.protobuf.MessageElement;
import com.google.eclipse.protobuf.protobuf.MessageField;
import com.google.inject.Inject;
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/validation/ProtobufJavaValidator_checkMapNotWithinTypeExtension.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/validation/ProtobufJavaValidator_checkMapNotWithinTypeExtension.java
index 13afc7e..be1ae63 100644
--- a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/validation/ProtobufJavaValidator_checkMapNotWithinTypeExtension.java
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/validation/ProtobufJavaValidator_checkMapNotWithinTypeExtension.java
@@ -24,7 +24,7 @@
import org.junit.Test;
/**
- * Tests for <code>{@link ProtobufJavaValidator#checkMapNotWithinTypeExtension(MapType)}</code>
+ * Tests for <code>{@link ProtobufJavaValidator#checkMapIsNotWithinExtension(MapType)}</code>
*/
public class ProtobufJavaValidator_checkMapNotWithinTypeExtension {
@Rule public XtextRule xtext = overrideRuntimeModuleWith(unitTestModule());
diff --git a/com.google.eclipse.protobuf.ui.functional.test/.classpath b/com.google.eclipse.protobuf.ui.functional.test/.classpath
index 098194c..eca7bdb 100644
--- a/com.google.eclipse.protobuf.ui.functional.test/.classpath
+++ b/com.google.eclipse.protobuf.ui.functional.test/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/com.google.eclipse.protobuf.ui.functional.test/.settings/org.eclipse.jdt.core.prefs b/com.google.eclipse.protobuf.ui.functional.test/.settings/org.eclipse.jdt.core.prefs
index d17b672..a698e59 100644
--- a/com.google.eclipse.protobuf.ui.functional.test/.settings/org.eclipse.jdt.core.prefs
+++ b/com.google.eclipse.protobuf.ui.functional.test/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/com.google.eclipse.protobuf.ui.functional.test/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.ui.functional.test/META-INF/MANIFEST.MF
index 9d78685..2b858b3 100644
--- a/com.google.eclipse.protobuf.ui.functional.test/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.ui.functional.test/META-INF/MANIFEST.MF
@@ -5,6 +5,6 @@
Bundle-Version: 2.2.0.qualifier
Bundle-Vendor: Google Inc.
Fragment-Host: com.google.eclipse.protobuf.ui;bundle-version="1.1.1"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.swtbot.go;bundle-version="2.0.5",
org.mockito;bundle-version="1.8.5"
diff --git a/com.google.eclipse.protobuf.ui.integration.test/.classpath b/com.google.eclipse.protobuf.ui.integration.test/.classpath
index 098194c..eca7bdb 100644
--- a/com.google.eclipse.protobuf.ui.integration.test/.classpath
+++ b/com.google.eclipse.protobuf.ui.integration.test/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/com.google.eclipse.protobuf.ui.integration.test/.settings/org.eclipse.jdt.core.prefs b/com.google.eclipse.protobuf.ui.integration.test/.settings/org.eclipse.jdt.core.prefs
index d17b672..a698e59 100644
--- a/com.google.eclipse.protobuf.ui.integration.test/.settings/org.eclipse.jdt.core.prefs
+++ b/com.google.eclipse.protobuf.ui.integration.test/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/com.google.eclipse.protobuf.ui.integration.test/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.ui.integration.test/META-INF/MANIFEST.MF
index 5e9c628..a57e5a4 100644
--- a/com.google.eclipse.protobuf.ui.integration.test/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.ui.integration.test/META-INF/MANIFEST.MF
@@ -9,4 +9,4 @@
org.mockito;bundle-version="1.8.5",
org.hamcrest.core;bundle-version="1.1.0",
org.hamcrest.library;bundle-version="1.1.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/com.google.eclipse.protobuf.ui.test/.classpath b/com.google.eclipse.protobuf.ui.test/.classpath
index 8e896d3..eca7bdb 100644
--- a/com.google.eclipse.protobuf.ui.test/.classpath
+++ b/com.google.eclipse.protobuf.ui.test/.classpath
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry combineaccessrules="false" kind="src" path="/com.google.eclipse.protobuf.test"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/com.google.eclipse.protobuf.ui.test/.settings/org.eclipse.jdt.core.prefs b/com.google.eclipse.protobuf.ui.test/.settings/org.eclipse.jdt.core.prefs
index 1ba40b6..5219e03 100644
--- a/com.google.eclipse.protobuf.ui.test/.settings/org.eclipse.jdt.core.prefs
+++ b/com.google.eclipse.protobuf.ui.test/.settings/org.eclipse.jdt.core.prefs
@@ -1,9 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -78,4 +78,4 @@
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/com.google.eclipse.protobuf.ui.test/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.ui.test/META-INF/MANIFEST.MF
index d2ea000..b1b23f1 100644
--- a/com.google.eclipse.protobuf.ui.test/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.ui.test/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@
Bundle-Version: 2.2.0.qualifier
Bundle-Vendor: Google Inc.
Fragment-Host: com.google.eclipse.protobuf.ui;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.junit;bundle-version="4.8.1",
org.mockito;bundle-version="1.8.5",
org.hamcrest.core;bundle-version="1.1.0",
diff --git a/com.google.eclipse.protobuf.ui/.classpath b/com.google.eclipse.protobuf.ui/.classpath
index 27bd7bd..f0c5549 100644
--- a/com.google.eclipse.protobuf.ui/.classpath
+++ b/com.google.eclipse.protobuf.ui/.classpath
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/com.google.eclipse.protobuf.ui/.settings/org.eclipse.jdt.core.prefs b/com.google.eclipse.protobuf.ui/.settings/org.eclipse.jdt.core.prefs
index ce43bca..28efee5 100644
--- a/com.google.eclipse.protobuf.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/com.google.eclipse.protobuf.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,9 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -79,4 +79,4 @@
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
index 6045b75..e3f110b 100644
--- a/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf.ui/META-INF/MANIFEST.MF
@@ -22,7 +22,7 @@
org.eclipse.xtext.builder,
org.eclipse.xtext.ui,
org.eclipse.xtext.ui.shared
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.google.eclipse.protobuf.ui.contentassist,
com.google.eclipse.protobuf.ui.contentassist.antlr,
com.google.eclipse.protobuf.ui.editor,
diff --git a/com.google.eclipse.protobuf/.classpath b/com.google.eclipse.protobuf/.classpath
index 27bd7bd..f0c5549 100644
--- a/com.google.eclipse.protobuf/.classpath
+++ b/com.google.eclipse.protobuf/.classpath
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/com.google.eclipse.protobuf/.settings/org.eclipse.jdt.core.prefs b/com.google.eclipse.protobuf/.settings/org.eclipse.jdt.core.prefs
index 3cfe5b6..f146b5b 100644
--- a/com.google.eclipse.protobuf/.settings/org.eclipse.jdt.core.prefs
+++ b/com.google.eclipse.protobuf/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -78,4 +78,4 @@
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/com.google.eclipse.protobuf/META-INF/MANIFEST.MF b/com.google.eclipse.protobuf/META-INF/MANIFEST.MF
index 0d9d220..5e70a27 100644
--- a/com.google.eclipse.protobuf/META-INF/MANIFEST.MF
+++ b/com.google.eclipse.protobuf/META-INF/MANIFEST.MF
@@ -18,7 +18,7 @@
org.eclipse.xtext.ui,
org.eclipse.xtext.util,
org.eclipse.emf.ecore
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.google.eclipse.protobuf,
com.google.eclipse.protobuf.conversion,
com.google.eclipse.protobuf.formatting,
diff --git a/com.google.eclipse.protobuf/build.properties b/com.google.eclipse.protobuf/build.properties
index f88afe0..7ca6bcb 100644
--- a/com.google.eclipse.protobuf/build.properties
+++ b/com.google.eclipse.protobuf/build.properties
@@ -5,4 +5,5 @@
plugin.xml,\
OSGI-INF/,\
descriptor.proto,\
- map_entry.proto
+ map_entry.proto,\
+ schema/descriptor-source.exsd
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/GenerateProtobuf.mwe2 b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/GenerateProtobuf.mwe2
index c2a733d..097852b 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/GenerateProtobuf.mwe2
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/GenerateProtobuf.mwe2
@@ -10,6 +10,7 @@
*/
module com.google.eclipse.protobuf.Protobuf
+import com.google.eclipse.protobuf.*
import org.eclipse.emf.mwe.utils.*
import org.eclipse.xtext.generator.*
import org.eclipse.xtext.ui.generator.*
@@ -45,7 +46,7 @@
fragment = grammarAccess.GrammarAccessFragment {}
// generates Java API for the generated EPackages
- fragment = ecore.EcoreGeneratorFragment {
+ fragment = ecore.EMFGeneratorFragment {
// referencedGenModels = "uri to genmodel, uri to next genmodel"
}
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 1017681..2a39ba6 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
@@ -309,7 +309,7 @@
target=BOOL;
enum BOOL:
- true | false;
+ TRUE = 'true' | FALSE = 'false';
NumberLink:
HexNumberLink | =>LongLink | DoubleLink;
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/ProtobufGenerator.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/ProtobufGenerator.java
index e39fb93..3cd30a7 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/ProtobufGenerator.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/ProtobufGenerator.java
@@ -32,8 +32,14 @@
}
private static class XtextRuntimeModuleExtension extends XtextRuntimeModule {
+ // For the recent XText versions replace the method below with the commented
+ // out one.
@Override public Class<? extends IXtext2EcorePostProcessor> bindIXtext2EcorePostProcessor() {
return ProtobufEcorePostProcessor.class;
}
+// @Override public void configureIXtext2EcorePostProcessor(Binder binder) {
+// super.configure(binder);
+// binder.bind(IXtext2EcorePostProcessor.class).to(ProtobufEcorePostProcessor.class);
+// }
}
}
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/ProtoDescriptor.java b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/ProtoDescriptor.java
index 260e7cc..e1906e7 100644
--- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/ProtoDescriptor.java
+++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/scoping/ProtoDescriptor.java
@@ -9,30 +9,43 @@
package com.google.eclipse.protobuf.scoping;
import static com.google.common.base.Strings.isNullOrEmpty;
-import static com.google.common.collect.Lists.newArrayList;
-import static com.google.common.collect.Maps.newHashMap;
-import static com.google.common.io.Closeables.closeQuietly;
import static com.google.eclipse.protobuf.protobuf.ProtobufPackage.Literals.MESSAGE_FIELD__TYPE;
import static com.google.eclipse.protobuf.scoping.OptionType.findOptionTypeForLevelOf;
import static com.google.eclipse.protobuf.util.Encodings.UTF_8;
-import static java.util.Collections.*;
-import static org.eclipse.xtext.EcoreUtil2.*;
+import static java.util.Collections.emptyList;
+import static java.util.Collections.unmodifiableCollection;
+import static java.util.Collections.unmodifiableList;
+import static org.eclipse.xtext.EcoreUtil2.getAllContentsOfType;
+import static org.eclipse.xtext.EcoreUtil2.resolveLazyCrossReferences;
import static org.eclipse.xtext.util.CancelIndicator.NullImpl;
import com.google.common.annotations.VisibleForTesting;
import com.google.eclipse.protobuf.model.util.INodes;
-import com.google.eclipse.protobuf.protobuf.*;
+import com.google.eclipse.protobuf.protobuf.ComplexType;
import com.google.eclipse.protobuf.protobuf.Enum;
+import com.google.eclipse.protobuf.protobuf.Message;
+import com.google.eclipse.protobuf.protobuf.MessageElement;
+import com.google.eclipse.protobuf.protobuf.MessageField;
+import com.google.eclipse.protobuf.protobuf.NativeOption;
+import com.google.eclipse.protobuf.protobuf.Protobuf;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.nodemodel.INode;
-import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.IParseResult;
+import org.eclipse.xtext.parser.IParser;
import org.eclipse.xtext.resource.XtextResource;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
/**
* Contains the elements from descriptor.proto (provided with protobuf's library.)
@@ -40,7 +53,7 @@
* @author alruiz@google.com (Alex Ruiz)
*/
public class ProtoDescriptor {
- private static final Map<String, OptionType> OPTION_DEFINITION_BY_NAME = newHashMap();
+ private static final Map<String, OptionType> OPTION_DEFINITION_BY_NAME = new HashMap<>();
static {
populateMap();
@@ -52,9 +65,9 @@
}
}
- private final List<ComplexType> allTypes = newArrayList();
- private final Map<OptionType, Map<String, MessageField>> optionsByType = newHashMap();
- private final Map<String, Enum> enumsByName = newHashMap();
+ private final List<ComplexType> allTypes = new ArrayList<>();
+ private final Map<OptionType, Map<String, MessageField>> optionsByType = new HashMap<>();
+ private final Map<String, Enum> enumsByName = new HashMap<>();
private Protobuf root;
@@ -66,10 +79,8 @@
this.importUri = importUri;
this.nodes = nodes;
addOptionTypes();
- InputStreamReader reader = null;
- try {
- resource = new XtextResource(location);
- reader = new InputStreamReader(contents(location), UTF_8);
+ resource = new XtextResource(location);
+ try (InputStreamReader reader = new InputStreamReader(contents(location), UTF_8)) {
IParseResult result = parser.parse(reader);
root = (Protobuf) result.getRootASTElement();
resource.getContents().add(root);
@@ -77,8 +88,6 @@
initContents();
} catch (Throwable t) {
throw new IllegalStateException("Unable to parse descriptor.proto", t);
- } finally {
- closeQuietly(reader);
}
}
diff --git a/update-site/artifacts.jar b/update-site/artifacts.jar
index e92a0a3..764d0bb 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 71661ea..e751507 100644
--- a/update-site/content.jar
+++ b/update-site/content.jar
Binary files differ
diff --git a/update-site/features/com.google.eclipse.protobuf_2.2.0.201512281705.jar b/update-site/features/com.google.eclipse.protobuf_2.2.0.201512281705.jar
new file mode 100644
index 0000000..20d8ac7
--- /dev/null
+++ b/update-site/features/com.google.eclipse.protobuf_2.2.0.201512281705.jar
Binary files differ
diff --git a/update-site/plugins/com.google.eclipse.protobuf.ui_2.2.0.201512281705.jar b/update-site/plugins/com.google.eclipse.protobuf.ui_2.2.0.201512281705.jar
new file mode 100644
index 0000000..4c14100
--- /dev/null
+++ b/update-site/plugins/com.google.eclipse.protobuf.ui_2.2.0.201512281705.jar
Binary files differ
diff --git a/update-site/plugins/com.google.eclipse.protobuf_2.2.0.201512281705.jar b/update-site/plugins/com.google.eclipse.protobuf_2.2.0.201512281705.jar
new file mode 100644
index 0000000..7c21446
--- /dev/null
+++ b/update-site/plugins/com.google.eclipse.protobuf_2.2.0.201512281705.jar
Binary files differ
diff --git a/update-site/site.xml b/update-site/site.xml
index 63e2860..3b46369 100644
--- a/update-site/site.xml
+++ b/update-site/site.xml
@@ -12,5 +12,8 @@
<feature url="features/com.google.eclipse.protobuf_2.1.0.201412161507.jar" id="com.google.eclipse.protobuf" version="2.1.0.201412161507">
<category name="google"/>
</feature>
+ <feature url="features/com.google.eclipse.protobuf_2.2.0.201512281705.jar" id="com.google.eclipse.protobuf" version="2.2.0.201512281705">
+ <category name="google"/>
+ </feature>
<category-def name="google" label="Google Inc."/>
</site>