Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:55:36 +0000
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /visualizer
parent8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (diff)
downloadorg.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.gz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.xz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.zip
Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Remove redundant type arguments and completing the wizard Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
Diffstat (limited to 'visualizer')
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/Extension.java2
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.examples/src/org/eclipse/cdt/visualizer/examples/sourcegraph/SourceGraphControl.java4
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java2
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java10
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java4
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java10
8 files changed, 18 insertions, 18 deletions
diff --git a/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/Extension.java b/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/Extension.java
index ee566d3f62e..d25af0c4171 100644
--- a/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/Extension.java
+++ b/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/Extension.java
@@ -62,7 +62,7 @@ public class Extension extends ExtensionElement {
/** Wraps list of raw extension declarations. */
public static List<Extension> wrapExtensions(IConfigurationElement[] elements) {
int count = (elements == null) ? 0 : elements.length;
- List<Extension> result = new ArrayList<Extension>(count);
+ List<Extension> result = new ArrayList<>(count);
for (int i = 0; i < count; ++i) {
result.add(new Extension(elements[i]));
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java b/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java
index 61c1faee6cc..49e4bdce1f7 100755
--- a/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java
+++ b/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java
@@ -39,7 +39,7 @@ public class ExtensionElement {
/** Wraps list of raw extension declarations. */
public static List<ExtensionElement> wrapExtensionElements(IConfigurationElement[] elements) {
int count = (elements == null) ? 0 : elements.length;
- List<ExtensionElement> result = new ArrayList<ExtensionElement>(count);
+ List<ExtensionElement> result = new ArrayList<>(count);
for (int i = 0; i < count; ++i) {
result.add(new ExtensionElement(elements[i]));
}
diff --git a/visualizer/org.eclipse.cdt.visualizer.examples/src/org/eclipse/cdt/visualizer/examples/sourcegraph/SourceGraphControl.java b/visualizer/org.eclipse.cdt.visualizer.examples/src/org/eclipse/cdt/visualizer/examples/sourcegraph/SourceGraphControl.java
index 9843aa983df..b2764f5a9b6 100644
--- a/visualizer/org.eclipse.cdt.visualizer.examples/src/org/eclipse/cdt/visualizer/examples/sourcegraph/SourceGraphControl.java
+++ b/visualizer/org.eclipse.cdt.visualizer.examples/src/org/eclipse/cdt/visualizer/examples/sourcegraph/SourceGraphControl.java
@@ -89,7 +89,7 @@ public class SourceGraphControl extends BufferedCanvas {
/** Constructor. */
public SourceGraphControl(Composite parent) {
super(parent);
- m_characters = new ArrayList<CharStat>();
+ m_characters = new ArrayList<>();
m_banner = new GraphicObject();
}
@@ -117,7 +117,7 @@ public class SourceGraphControl extends BufferedCanvas {
// TODO: reuse the array/hashtable and stat objects
- Hashtable<String, CharStat> characters = new Hashtable<String, CharStat>();
+ Hashtable<String, CharStat> characters = new Hashtable<>();
int len = m_sourceText.length();
int fragment_length = 2;
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java
index 5d548bd7a95..2aa59e9a0e6 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerViewer.java
@@ -267,7 +267,7 @@ public class VisualizerViewer extends PageBook
// TODO: add error checking, logging for errors in extension declarations
// TODO: do we need to worry about this being called more than once?
- m_visualizers = new Hashtable<String, IVisualizer>();
+ m_visualizers = new Hashtable<>();
List<Extension> visualizers = Extension.getExtensions(CDTVisualizerUIPlugin.FEATURE_ID,
VISUALIZER_EXTENSION_POINT_NAME);
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java
index 1dd1559e419..28c5da4b28b 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/GraphicCanvas.java
@@ -46,7 +46,7 @@ public class GraphicCanvas extends BufferedCanvas {
/** Constructor. */
public GraphicCanvas(Composite parent) {
super(parent);
- m_objects = new ArrayList<IGraphicObject>();
+ m_objects = new ArrayList<>();
Listener mouseListener = new Listener() {
@Override
public void handleEvent(Event event) {
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java
index b24b59f7f36..2381c74fd7e 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java
@@ -40,10 +40,10 @@ public class VirtualBoundsGraphicObject extends GraphicObject {
protected Rectangle m_virtualBounds = new Rectangle(0, 0, 0, 0);
/** List of children objects contained in this one */
- protected ArrayList<VirtualBoundsGraphicObject> m_childrenObjects = new ArrayList<VirtualBoundsGraphicObject>();
+ protected ArrayList<VirtualBoundsGraphicObject> m_childrenObjects = new ArrayList<>();
/** Map of contained objects and their identifying labels. for quick look-up */
- protected HashMap<String, VirtualBoundsGraphicObject> m_childrenObjectsMap = new HashMap<String, VirtualBoundsGraphicObject>();
+ protected HashMap<String, VirtualBoundsGraphicObject> m_childrenObjectsMap = new HashMap<>();
/** Whether the container's boundaries should be drawn */
protected boolean m_drawContainerBounds = true;
@@ -262,7 +262,7 @@ public class VirtualBoundsGraphicObject extends GraphicObject {
/** Returns a list of child objects of a given derived class, optionally recursing through child objects */
public ArrayList<VirtualBoundsGraphicObject> getChildObjects(Class<?> type, boolean recurse) {
- ArrayList<VirtualBoundsGraphicObject> objs = new ArrayList<VirtualBoundsGraphicObject>();
+ ArrayList<VirtualBoundsGraphicObject> objs = new ArrayList<>();
for (VirtualBoundsGraphicObject o : this.getAllObjects(recurse)) {
if (type.isInstance(o)) {
@@ -295,7 +295,7 @@ public class VirtualBoundsGraphicObject extends GraphicObject {
/** Gets all objects from this container. Optionally recurse to all sub-objects */
public ArrayList<VirtualBoundsGraphicObject> getAllObjects(boolean recurse) {
- ArrayList<VirtualBoundsGraphicObject> list = new ArrayList<VirtualBoundsGraphicObject>();
+ ArrayList<VirtualBoundsGraphicObject> list = new ArrayList<>();
for (VirtualBoundsGraphicObject o : m_childrenObjects) {
list.add(o);
if (recurse) {
@@ -307,7 +307,7 @@ public class VirtualBoundsGraphicObject extends GraphicObject {
/** Returns a list of selectable objects */
public List<VirtualBoundsGraphicObject> getSelectableObjects() {
- List<VirtualBoundsGraphicObject> list = new ArrayList<VirtualBoundsGraphicObject>();
+ List<VirtualBoundsGraphicObject> list = new ArrayList<>();
for (VirtualBoundsGraphicObject o : m_childrenObjects) {
if (o.isSelectable()) {
list.add(o);
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java
index 35c25ecee66..a2352fac2a0 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java
@@ -78,7 +78,7 @@ abstract public class ListenerList {
/** Adds a listener */
public synchronized void addListener(Object listener) {
if (m_listeners == null) {
- m_listeners = new ArrayList<Object>();
+ m_listeners = new ArrayList<>();
}
if (!m_listeners.contains(listener)) {
m_listeners.add(listener);
@@ -105,7 +105,7 @@ abstract public class ListenerList {
synchronized (this) {
// keep the lock on the listener list as brief as possible
if (m_listeners != null) {
- listeners = new ArrayList<Object>(m_listeners);
+ listeners = new ArrayList<>(m_listeners);
}
}
int count = (listeners == null) ? 0 : listeners.size();
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
index b9cde133363..3a489fec137 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
@@ -49,12 +49,12 @@ public class SelectionUtils {
@Override
public Iterator<Object> iterator() {
- return new ArrayList<Object>().iterator();
+ return new ArrayList<>().iterator();
}
@Override
public List<Object> toList() {
- return new ArrayList<Object>();
+ return new ArrayList<>();
}
@Override
@@ -138,9 +138,9 @@ public class SelectionUtils {
result = new ArrayList<Object>(structuredSelection.toList());
} else if (selection instanceof Collection) {
Collection<?> collection = (Collection<?>) selection;
- result = new ArrayList<Object>(collection);
+ result = new ArrayList<>(collection);
} else {
- List<Object> list = new ArrayList<Object>();
+ List<Object> list = new ArrayList<>();
list.add(selection);
result = list;
}
@@ -233,7 +233,7 @@ public class SelectionUtils {
/** Creates list from array/set of elements */
public static List<Object> toList(Collection<?> collection) {
int size = (collection == null) ? 0 : collection.size();
- List<Object> result = new ArrayList<Object>(size);
+ List<Object> result = new ArrayList<>(size);
if (collection != null)
result.addAll(collection);
return result;

Back to the top