Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2016-09-15 15:57:35 +0000
committerLars Vogel2016-09-16 14:38:18 +0000
commitab23d227f57dbf933b6888a15e028ccedfc925bf (patch)
tree612f616d98aa3062daa643a0136c402fbce00b3a /bundles/org.eclipse.e4.tools.css.spy
parent28ac389271f4eac7bb5e155fa191f22b9b946982 (diff)
downloadorg.eclipse.e4.tools-ab23d227f57dbf933b6888a15e028ccedfc925bf.tar.gz
org.eclipse.e4.tools-ab23d227f57dbf933b6888a15e028ccedfc925bf.tar.xz
org.eclipse.e4.tools-ab23d227f57dbf933b6888a15e028ccedfc925bf.zip
Bug 482012 - Removes redundant type information from CSS spy code
Change-Id: I045fc1653b1db80edaec8f6baa6137b78ce988a0 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'bundles/org.eclipse.e4.tools.css.spy')
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSPropertiesContentProvider.java2
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSScratchPadPart.java4
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java8
-rw-r--r--bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/WidgetTreeProvider.java4
4 files changed, 9 insertions, 9 deletions
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSPropertiesContentProvider.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSPropertiesContentProvider.java
index c5666e7f..913454ae 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSPropertiesContentProvider.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSPropertiesContentProvider.java
@@ -45,7 +45,7 @@ public class CSSPropertiesContentProvider implements IStructuredContentProvider
@Override
public Object[] getElements(Object inputElement) {
Collection<String> propertyNames = cssEngine.getCSSProperties(input);
- List<CSSPropertyProvider> properties = new ArrayList<CSSPropertyProvider>(propertyNames.size());
+ List<CSSPropertyProvider> properties = new ArrayList<>(propertyNames.size());
for (String propertyName : propertyNames) {
properties.add(new CSSPropertyProvider(propertyName, input, cssEngine));
}
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSScratchPadPart.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSScratchPadPart.java
index 4f46fc71..5f209807 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSScratchPadPart.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSScratchPadPart.java
@@ -58,7 +58,7 @@ public class CSSScratchPadPart {
/**
* Collection of buttons created by the <code>createButton</code> method.
*/
- private HashMap<Integer, Button> buttons = new HashMap<Integer, Button>();
+ private HashMap<Integer, Button> buttons = new HashMap<>();
private Text cssText;
private Text exceptions;
@@ -145,7 +145,7 @@ public class CSSScratchPadPart {
}
sb.append("Engine[").append(engine.getClass().getSimpleName()).append("]");
ExtendedDocumentCSS doc = (ExtendedDocumentCSS) engine.getDocumentCSS();
- List<StyleSheet> sheets = new ArrayList<StyleSheet>();
+ List<StyleSheet> sheets = new ArrayList<>();
StyleSheetList list = doc.getStyleSheets();
for (int i = 0; i < list.getLength(); i++) {
sheets.add(list.item(i));
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
index 5302d18e..df636816 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
@@ -153,8 +153,8 @@ public class CssSpyPart {
private TableViewer cssPropertiesViewer;
private Text cssRules;
- private List<Shell> highlights = new LinkedList<Shell>();
- private List<Region> highlightRegions = new LinkedList<Region>();
+ private List<Shell> highlights = new LinkedList<>();
+ private List<Region> highlightRegions = new LinkedList<>();
private Text cssSearchBox;
private Button showUnsetProperties;
private Button showCssFragment;
@@ -807,7 +807,7 @@ public class CssSpyPart {
// we first check the viewCSS and then the property values
CSSStyleDeclaration decl = engine.getViewCSS().getComputedStyle(element, null);
- List<String> propertyNames = new ArrayList<String>(engine.getCSSProperties(element));
+ List<String> propertyNames = new ArrayList<>(engine.getCSSProperties(element));
Collections.sort(propertyNames);
int count = 0;
@@ -873,7 +873,7 @@ public class CssSpyPart {
}
protected void performCSSSearch(IProgressMonitor progress) {
- List<Widget> widgets = new ArrayList<Widget>();
+ List<Widget> widgets = new ArrayList<>();
performCSSSearch(progress, cssSearchBox.getText(), widgets);
if (!progress.isCanceled()) {
revealAndSelect(widgets);
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/WidgetTreeProvider.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/WidgetTreeProvider.java
index 06c03ae0..acb79523 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/WidgetTreeProvider.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/WidgetTreeProvider.java
@@ -44,7 +44,7 @@ public class WidgetTreeProvider implements ITreeContentProvider {
@Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof Display) {
- List<Shell> shells = new ArrayList<Shell>();
+ List<Shell> shells = new ArrayList<>();
for (Shell s : ((Display) parentElement).getShells()) {
if (!s.isDisposed()) {
shells.add(s);
@@ -57,7 +57,7 @@ public class WidgetTreeProvider implements ITreeContentProvider {
return EMPTY_ARRAY;
}
NodeList kids = element.getChildNodes();
- ArrayList<Object> children = new ArrayList<Object>(kids.getLength());
+ ArrayList<Object> children = new ArrayList<>(kids.getLength());
for (int i = 0; i < kids.getLength(); i++) {
children.add(((CSSStylableElement) kids.item(i)).getNativeWidget());
}

Back to the top