Minor code cleanup.
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 b118d40..eb6ded5 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
@@ -12,15 +12,15 @@
import static com.google.common.collect.Maps.newHashMap;
import static java.util.Collections.*;
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import java.io.*;
+import java.net.URI;
+import java.util.*;
+
/**
* @author alruiz@google.com (Alex Ruiz)
*/
@@ -28,115 +28,93 @@
private final Map<String, List<MarkerStub>> markersByType = newHashMap();
private IPath location;
- /** {@inheritDoc} */
@Override public void accept(IResourceProxyVisitor visitor, int memberFlags) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void accept(IResourceVisitor visitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void accept(IResourceVisitor visitor, int depth, boolean includePhantoms) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void accept(IResourceVisitor visitor, int depth, int memberFlags) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
- @Override public void appendContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor)
- {
+ @Override public void appendContents(
+ InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void appendContents(InputStream source, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void clearHistory(IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean contains(ISchedulingRule rule) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void copy(IPath destination, boolean force, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void copy(IPath destination, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void copy(IProjectDescription description, boolean force, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void copy(IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void create(InputStream source, boolean force, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void create(InputStream source, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void createLink(IPath localLocation, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void createLink(URI location, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IMarker createMarker(String type) {
MarkerStub marker = new MarkerStub(type);
addMarker(marker);
return marker;
}
- /** {@inheritDoc} */
@Override public IResourceProxy createProxy() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void delete(boolean force, boolean keepHistory, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void delete(boolean force, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void delete(int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void deleteMarkers(String type, boolean includeSubtypes, int depth) {
List<MarkerStub> markers = markersByType.get(type);
if (markers != null) {
@@ -144,17 +122,14 @@
}
}
- /** {@inheritDoc} */
@Override public boolean exists() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IMarker findMarker(long id) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IMarker[] findMarkers(String type, boolean includeSubtypes, int depth) {
List<MarkerStub> markers = markersByType.get(type);
if (markers == null) {
@@ -163,52 +138,42 @@
return markers.toArray(new IMarker[markers.size()]);
}
- /** {@inheritDoc} */
@Override public int findMaxProblemSeverity(String type, boolean includeSubtypes, int depth) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override @SuppressWarnings("rawtypes") public Object getAdapter(Class adapter) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public String getCharset() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public String getCharset(boolean checkImplicit) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public String getCharsetFor(Reader reader) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IContentDescription getContentDescription() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public InputStream getContents() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public InputStream getContents(boolean force) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override @Deprecated public int getEncoding() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public String getFileExtension() {
throw new UnsupportedOperationException();
}
@@ -218,17 +183,14 @@
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IFileState[] getHistory(IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public long getLocalTimeStamp() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IPath getLocation() {
return location;
}
@@ -237,286 +199,227 @@
this.location = location;
}
- /** {@inheritDoc} */
@Override public URI getLocationURI() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IMarker getMarker(long id) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public long getModificationStamp() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public String getName() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IContainer getParent() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IPathVariableManager getPathVariableManager() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public Map<QualifiedName, String> getPersistentProperties() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public String getPersistentProperty(QualifiedName key) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IProject getProject() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IPath getProjectRelativePath() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IPath getRawLocation() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public URI getRawLocationURI() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public ResourceAttributes getResourceAttributes() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public Map<QualifiedName, Object> getSessionProperties() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public Object getSessionProperty(QualifiedName key) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public int getType() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IWorkspace getWorkspace() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isAccessible() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isConflicting(ISchedulingRule rule) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isDerived() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isDerived(int options) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isHidden() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isHidden(int options) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isLinked() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isLinked(int options) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override @Deprecated public boolean isLocal(int depth) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isPhantom() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isReadOnly() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isSynchronized(int depth) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isTeamPrivateMember() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isTeamPrivateMember(int options) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean isVirtual() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
- @Override public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor)
- {
+ @Override public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void move(IPath destination, boolean force, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void move(IPath destination, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
- @Override public void move(IProjectDescription description, boolean force, boolean keepHistory, IProgressMonitor monitor)
- {
+ @Override public void move(
+ IProjectDescription description, boolean force, boolean keepHistory, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void move(IProjectDescription description, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void refreshLocal(int depth, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void revertModificationStamp(long value) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override @Deprecated public void setCharset(String newCharset) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setCharset(String newCharset, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
- @Override public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor)
- {
+ @Override public void setContents(IFileState source, boolean force, boolean keepHistory, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setContents(IFileState source, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
- @Override public void setContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor)
- {
+ @Override public void setContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setContents(InputStream source, int updateFlags, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override @Deprecated public void setDerived(boolean isDerived) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setDerived(boolean isDerived, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setHidden(boolean isHidden) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override @Deprecated public void setLocal(boolean flag, int depth, IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public long setLocalTimeStamp(long value) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setPersistentProperty(QualifiedName key, String value) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override @Deprecated public void setReadOnly(boolean readOnly) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setResourceAttributes(ResourceAttributes attributes) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setSessionProperty(QualifiedName key, Object value) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setTeamPrivateMember(boolean isTeamPrivate) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void touch(IProgressMonitor monitor) {
throw new UnsupportedOperationException();
}
@@ -544,8 +447,7 @@
markers.add(marker);
}
- /** {@inheritDoc} */
- @Override public void accept(IResourceProxyVisitor visitor, int depth, int memberFlags) throws CoreException {
+ @Override public void accept(IResourceProxyVisitor visitor, int depth, int memberFlags) {
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 cef018c..d3f669c 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
@@ -13,11 +13,11 @@
import static com.google.common.collect.Maps.newHashMap;
import static java.util.Collections.unmodifiableMap;
-import java.util.*;
+import com.google.common.base.Objects;
import org.eclipse.core.resources.*;
-import com.google.common.base.Objects;
+import java.util.*;
/**
* @author alruiz@google.com (Alex Ruiz)
@@ -40,27 +40,22 @@
creationTime = System.currentTimeMillis();
}
- /** {@inheritDoc} */
@Override @SuppressWarnings("rawtypes") public Object getAdapter(Class adapter) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void delete() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public boolean exists() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public Object getAttribute(String attributeName) {
return attributes.get(attributeName);
}
- /** {@inheritDoc} */
@Override public int getAttribute(String attributeName, int defaultValue) {
Object attribute = attributes.get(attributeName);
if (attribute instanceof Integer) {
@@ -69,7 +64,6 @@
return defaultValue;
}
- /** {@inheritDoc} */
@Override public String getAttribute(String attributeName, String defaultValue) {
Object attribute = attributes.get(attributeName);
if (attribute instanceof String) {
@@ -78,7 +72,6 @@
return defaultValue;
}
- /** {@inheritDoc} */
@Override public boolean getAttribute(String attributeName, boolean defaultValue) {
Object attribute = attributes.get(attributeName);
if (attribute instanceof Boolean) {
@@ -87,12 +80,10 @@
return defaultValue;
}
- /** {@inheritDoc} */
@Override public Map<String, Object> getAttributes() {
return unmodifiableMap(attributes);
}
- /** {@inheritDoc} */
@Override public Object[] getAttributes(String[] attributeNames) {
List<Object> values = newArrayList();
for (String name : attributeNames) {
@@ -101,52 +92,42 @@
return values.toArray();
}
- /** {@inheritDoc} */
@Override public long getCreationTime() {
return creationTime;
}
- /** {@inheritDoc} */
@Override public long getId() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public IResource getResource() {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public String getType() {
return type;
}
- /** {@inheritDoc} */
@Override public boolean isSubtypeOf(String superType) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setAttribute(String attributeName, int value) {
attributes.put(attributeName, value);
}
- /** {@inheritDoc} */
@Override public void setAttribute(String attributeName, Object value) {
attributes.put(attributeName, value);
}
- /** {@inheritDoc} */
@Override public void setAttribute(String attributeName, boolean value) {
attributes.put(attributeName, value);
}
- /** {@inheritDoc} */
@Override public void setAttributes(String[] attributeNames, Object[] values) {
throw new UnsupportedOperationException();
}
- /** {@inheritDoc} */
@Override public void setAttributes(Map<String, ? extends Object> attributes) {
this.attributes.putAll(attributes);
}