Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-09-28 14:49:18 -0400
committerRyan D. Brooks2015-09-28 14:49:18 -0400
commit071fcbc5cca4e22e650bb459701f5fc9be701013 (patch)
treeac629d866ecfea675bc4e134c68315440282d560 /plugins/org.eclipse.osee.ote.ui.define
parentb4f6f62b0d3af365b67a3786dbb24c97fa638536 (diff)
downloadorg.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.gz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.xz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.zip
refactor: Use type inference when invoking a generic constructor
Diffstat (limited to 'plugins/org.eclipse.osee.ote.ui.define')
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java2
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java2
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java2
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java6
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java10
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java6
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java14
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java6
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java2
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java10
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java18
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java2
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java2
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java2
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java2
20 files changed, 53 insertions, 53 deletions
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java
index 38527b8467..d7bc107d7f 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java
@@ -128,7 +128,7 @@ public class BranchComboDialog extends TitleAreaDialog implements Listener {
if (branch != null && branch.hasParentBranch()) {
String lastBranchSelected = Long.toString(branch.getUuid());
- List<String> history = new ArrayList<String>(Arrays.asList(branchUuids));
+ List<String> history = new ArrayList<>(Arrays.asList(branchUuids));
history.remove(lastBranchSelected);
history.add(0, lastBranchSelected);
if (history.size() > COMBO_HISTORY_LENGTH) {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java
index 8f2e06f42c..96fc12f9fd 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java
@@ -34,7 +34,7 @@ public class OverrideInvalidScriptRevisions implements IOverrideHandler {
@Override
public Set<Object> getOverridableFromUnselectable(Set<Object> unselectable) throws OseeCoreException {
- Set<Object> toReturn = new HashSet<Object>();
+ Set<Object> toReturn = new HashSet<>();
for (Object object : unselectable) {
if (object instanceof Artifact) {
ArtifactTestRunOperator operator = new ArtifactTestRunOperator(((Artifact) object));
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java
index c5f6f8192d..e39f903c92 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java
@@ -101,7 +101,7 @@ public class ReportsDialog extends TitleAreaDialog {
public ReportsDialog(Shell parent) {
super(parent);
- this.filesToDelete = new ArrayList<IFile>();
+ this.filesToDelete = new ArrayList<>();
setShellStyle(SWT.SHELL_TRIM);
}
@@ -302,7 +302,7 @@ public class ReportsDialog extends TitleAreaDialog {
group.setFont(parent.getFont());
group.setText(FORMAT_TITLE);
- this.formatButtons = new HashMap<OutputFormat, Button>();
+ this.formatButtons = new HashMap<>();
for (OutputFormat format : OutputFormat.values()) {
Button button = new Button(group, SWT.RADIO);
button.setText(format.name());
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java
index 2bec3e0a2b..c770b4207e 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java
@@ -73,7 +73,7 @@ public class OutfileImportPage extends WizardDataTransferPage {
this.treeSelectionMode = true;
this.contentProvider = new WorkbenchContentProvider();
this.labelProvider = new WorkbenchLabelProvider();
- this.filters = new ArrayList<ViewerFilter>();
+ this.filters = new ArrayList<>();
// this.filters.add(new FileFilter());
this.startingResourceSelection = selection;
}
@@ -325,7 +325,7 @@ public class OutfileImportPage extends WizardDataTransferPage {
private URI[] getSelectedResources() {
Object[] selected = treeViewer.getCheckedElements();
- List<URI> selectedResources = new ArrayList<URI>();
+ List<URI> selectedResources = new ArrayList<>();
for (Object object : selected) {
if (object instanceof IFile) {
IFile iFile = (IFile) object;
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java
index 7e7abda663..03de0e352d 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java
@@ -116,7 +116,7 @@ class CommitJobDialog extends UIJob {
}
private final class TestRunTableLabelProvider extends BaseLabelProvider implements ITableLabelProvider {
- private final HashSet<Object> unselectableItems = new HashSet<Object>();
+ private final HashSet<Object> unselectableItems = new HashSet<>();
private final int DUMMY_COLUMNS = 1;
public TestRunTableLabelProvider() {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java
index 85f0c342e8..8ab91c6faa 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java
@@ -78,7 +78,7 @@ public class CommitTestRunJob extends Job {
private Artifact[] commitSelectedArtifacts(IProgressMonitor monitor, String comment, Object[] items) throws Exception {
Map<IOseeBranch, List<Artifact>> commitMap = getArtifactsByBranch(items);
- List<Artifact> committedList = new ArrayList<Artifact>();
+ List<Artifact> committedList = new ArrayList<>();
for (IOseeBranch branch : commitMap.keySet()) {
monitor.setTaskName(String.format("Committing Artifacts into Branch: [%s]", branch.getName()));
List<Artifact> artList = commitMap.get(branch);
@@ -89,13 +89,13 @@ public class CommitTestRunJob extends Job {
}
private Map<IOseeBranch, List<Artifact>> getArtifactsByBranch(Object[] items) {
- Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<IOseeBranch, List<Artifact>>();
+ Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<>();
for (Object object : items) {
Artifact testRun = (Artifact) object;
IOseeBranch branch = testRun.getBranch();
List<Artifact> artList = branchMap.get(branch);
if (artList == null) {
- artList = new ArrayList<Artifact>();
+ artList = new ArrayList<>();
branchMap.put(branch, artList);
}
artList.add(testRun);
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java
index 16d5668dac..b79dcd3ae2 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java
@@ -66,9 +66,9 @@ public class SelectionComposite extends Composite {
private final Object[] resources;
private final boolean isSelectAllByDefault;
private final Map<Object, MutableBoolean> selectableMap;
- private final Set<Object> userSelectedResources = new HashSet<Object>();
- private final Set<Object> notSelectableResources = new HashSet<Object>();
- private final Set<Object> overridable = new HashSet<Object>();
+ private final Set<Object> userSelectedResources = new HashSet<>();
+ private final Set<Object> notSelectableResources = new HashSet<>();
+ private final Set<Object> overridable = new HashSet<>();
private final String[] columnNames;
private Label lblSelectedResourcesNumber;
private IOverrideHandler overrideHandler;
@@ -82,7 +82,7 @@ public class SelectionComposite extends Composite {
super(parent, style);
this.columnNames = columnNames;
this.tableLabelProvider = tableLabelProvider;
- this.selectableMap = new HashMap<Object, MutableBoolean>();
+ this.selectableMap = new HashMap<>();
this.resources = resources;
this.isSelectAllByDefault = isSelectAllByDefault;
if (userSelectedResources != null) {
@@ -261,7 +261,7 @@ public class SelectionComposite extends Composite {
}
private Object[] getSelectedItems(boolean thatMatchTrue) {
- List<Object> toReturn = new ArrayList<Object>();
+ List<Object> toReturn = new ArrayList<>();
for (Object key : selectableMap.keySet()) {
if (selectableMap.get(key).getValue() == thatMatchTrue) {
toReturn.add(key);
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java
index bf7592f01d..8067072fbf 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java
@@ -40,7 +40,7 @@ public class ExtensionDefinedReports {
private static ExtensionDefinedReports instance = null;
private ExtensionDefinedReports() {
- this.reportMap = new HashMap<String, ReportData>();
+ this.reportMap = new HashMap<>();
loadReports();
}
@@ -54,7 +54,7 @@ public class ExtensionDefinedReports {
@SuppressWarnings("unchecked")
public Pair<String, String>[] getIdsAndNames() {
if (idsAndNameMap == null) {
- this.idsAndNameMap = new HashMap<String, Pair<String, String>>();
+ this.idsAndNameMap = new HashMap<>();
Set<String> ids = reportMap.keySet();
for (String id : ids) {
ReportData data = reportMap.get(id);
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java
index f66e903a02..263f35e7b7 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java
@@ -36,7 +36,7 @@ public class HighLevelSummary implements ITestRunReport {
private final Map<String, CollectedData> dataMap;
public HighLevelSummary() {
- this.dataMap = new HashMap<String, CollectedData>();
+ this.dataMap = new HashMap<>();
}
@Override
@@ -67,7 +67,7 @@ public class HighLevelSummary implements ITestRunReport {
@Override
public String[][] getBody() {
int numRows = dataMap.size();
- List<String> keys = new ArrayList<String>(dataMap.keySet());
+ List<String> keys = new ArrayList<>(dataMap.keySet());
String[][] toReturn = new String[numRows][getHeader().length];
for (int row = 0; row < numRows; row++) {
String key = keys.get(row);
@@ -78,7 +78,7 @@ public class HighLevelSummary implements ITestRunReport {
}
private String[] addRow(CollectedData data) {
- List<String> values = new ArrayList<String>();
+ List<String> values = new ArrayList<>();
values.add(data.getPartition());
values.add(data.getSubsytem());
values.add(Integer.toString(data.getScriptCount()));
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java
index 0588761889..1b11930bb9 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java
@@ -40,8 +40,8 @@ public class HistoricalTestRunData implements ITestRunReport {
private final Set<String> runsByName;
public HistoricalTestRunData() {
- this.runByCollection = new HashMap<Date, Map<String, TestRunOperator>>();
- this.runsByName = new TreeSet<String>();
+ this.runByCollection = new HashMap<>();
+ this.runsByName = new TreeSet<>();
}
@Override
@@ -52,7 +52,7 @@ public class HistoricalTestRunData implements ITestRunReport {
Date date = operator.getEndDate();
Map<String, TestRunOperator> theMap = runByCollection.get(date);
if (theMap == null) {
- theMap = new HashMap<String, TestRunOperator>();
+ theMap = new HashMap<>();
runByCollection.put(date, theMap);
}
String name = operator.getScriptSimpleName();
@@ -69,7 +69,7 @@ public class HistoricalTestRunData implements ITestRunReport {
String[][] toReturn = new String[runByCollection.size() + 1][getHeader().length];
int index = 0;
toReturn[index++] = getTitleRow();
- List<Date> dateList = new ArrayList<Date>(runByCollection.keySet());
+ List<Date> dateList = new ArrayList<>(runByCollection.keySet());
Collections.sort(dateList);
for (Date date : dateList) {
Map<String, TestRunOperator> theMap = runByCollection.get(date);
@@ -79,7 +79,7 @@ public class HistoricalTestRunData implements ITestRunReport {
}
private String[] getRow(Date date, Map<String, TestRunOperator> theMap) {
- List<String> row = new ArrayList<String>();
+ List<String> row = new ArrayList<>();
row.add(formatter.format(date));
for (String name : runsByName) {
TestRunOperator operator = theMap.get(name);
@@ -107,7 +107,7 @@ public class HistoricalTestRunData implements ITestRunReport {
}
private String[] getTitleRow() {
- List<String> header = new ArrayList<String>();
+ List<String> header = new ArrayList<>();
header.add(ONE_SPACE_STRING);
for (int index = 0; index < runsByName.size(); index++) {
header.addAll(Arrays.asList(PER_SCRIPT_HEADER));
@@ -122,7 +122,7 @@ public class HistoricalTestRunData implements ITestRunReport {
@Override
public String[] getHeader() {
- List<String> header = new ArrayList<String>();
+ List<String> header = new ArrayList<>();
header.add(DATE_HEADER);
for (String name : runsByName) {
header.add(name);
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java
index 9ee272e944..c8252a59f3 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java
@@ -55,7 +55,7 @@ public class HttpReportRequest implements IHttpServerRequest {
}
public static String getUrl(String id, String format, String source, int preview) throws OseeStateException {
- Map<String, String> parameters = new HashMap<String, String>();
+ Map<String, String> parameters = new HashMap<>();
parameters.put(REPORT_ID, id);
parameters.put(REPORT_FORMAT, format);
parameters.put(REPORT_SOURCE, source);
@@ -105,7 +105,7 @@ public class HttpReportRequest implements IHttpServerRequest {
private ArtifactTestRunOperator[] getSourceData(HttpRequest httpRequest) {
String source = httpRequest.getParameter(REPORT_SOURCE);
- List<ArtifactTestRunOperator> toReturn = new ArrayList<ArtifactTestRunOperator>();
+ List<ArtifactTestRunOperator> toReturn = new ArrayList<>();
if (source.equals("local")) {
LocalSourceSelection selection = new LocalSourceSelection();
Displays.ensureInDisplayThread(selection);
@@ -154,7 +154,7 @@ public class HttpReportRequest implements IHttpServerRequest {
@Override
public void run() {
done = false;
- List<ArtifactTestRunOperator> toReturn = new ArrayList<ArtifactTestRunOperator>();
+ List<ArtifactTestRunOperator> toReturn = new ArrayList<>();
StructuredViewer viewer = TestRunView.getViewer();
if (viewer != null) {
toReturn.addAll(SelectionHelper.getInstance().getSelections(viewer));
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java
index 775b8d5a33..46d86e2476 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java
@@ -48,8 +48,8 @@ public class HtmlActiveTable {
public HtmlActiveTable() {
super();
- this.rowData = new ArrayList<List<String>>();
- this.columnList = new ArrayList<HtmlActiveTableColumnData>();
+ this.rowData = new ArrayList<>();
+ this.columnList = new ArrayList<>();
this.elementName = "ID";
this.tableHeight = "";
this.tableWidth = "";
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java
index 2c285208df..9b33d90c7e 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java
@@ -60,7 +60,7 @@ public class SelectionHelper {
}
public List<ArtifactTestRunOperator> getSelections(StructuredViewer viewer) {
- List<ArtifactTestRunOperator> toReturn = new ArrayList<ArtifactTestRunOperator>();
+ List<ArtifactTestRunOperator> toReturn = new ArrayList<>();
if (viewer != null) {
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
if (selection != null && selection.isEmpty() != true) {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java
index 9f3bb27e1b..6a7c78d99c 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java
@@ -136,7 +136,7 @@ public class DragDropHandler {
}
private URI[] toResourceArray(Object[] objects) {
- List<URI> toReturn = new ArrayList<URI>();
+ List<URI> toReturn = new ArrayList<>();
for (Object object : objects) {
if (object instanceof IAdaptable) {
Object resource = ((IAdaptable) object).getAdapter(IResource.class);
@@ -170,7 +170,7 @@ public class DragDropHandler {
private void handleArtifactDrops(ArtifactData artifactData) throws OseeCoreException {
Artifact[] artifactsDropped = artifactData.getArtifacts();
- Set<Artifact> artifactsToAdd = new HashSet<Artifact>();
+ Set<Artifact> artifactsToAdd = new HashSet<>();
for (Artifact artifact : artifactsDropped) {
if (artifact.isOfType(CoreArtifactTypes.TestRun)) {
artifactsToAdd.add(artifact);
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java
index 241b6d8647..d2f2eb4312 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java
@@ -63,7 +63,7 @@ public class TestRunXViewer extends XViewer {
private static final ImageDescriptor REMOVE_IMAGE = ImageManager.getImageDescriptor(OteDefineImage.REMOVE);
private static final ImageDescriptor REMOVE_ALL_IMAGE = ImageManager.getImageDescriptor(OteDefineImage.REMOVE_ALL);
private XViewerDataManager dataManager;
- private final List<AbstractActionHandler> actionList = new ArrayList<AbstractActionHandler>();
+ private final List<AbstractActionHandler> actionList = new ArrayList<>();
private Action editDisposition;
public TestRunXViewer(Composite parent) {
@@ -185,7 +185,7 @@ public class TestRunXViewer extends XViewer {
}
private Artifact[] getAllItemsList() {
- List<Artifact> allItems = new ArrayList<Artifact>();
+ List<Artifact> allItems = new ArrayList<>();
allItems.addAll(Arrays.asList(dataManager.getAllCommitable()));
if (isOverrideAllowed() != false) {
allItems.addAll(Arrays.asList(dataManager.getUnCommitable()));
@@ -242,7 +242,7 @@ public class TestRunXViewer extends XViewer {
boolean returnValue = false;
if (holder instanceof ArtifactItem) {
if (xCol.equals(TestRunXViewerFactory.DISPOSITION)) {
- ArrayList<Artifact> list = new ArrayList<Artifact>();
+ ArrayList<Artifact> list = new ArrayList<>();
list.add(((ArtifactItem) holder).getData());
try {
returnValue = setDisposition(list);
@@ -256,7 +256,7 @@ public class TestRunXViewer extends XViewer {
private boolean setDisposition(ArrayList<Artifact> selectedArtifacts) throws OseeCoreException {
boolean returnValue = false;
- ArrayList<Artifact> dispositionArtifacts = new ArrayList<Artifact>();
+ ArrayList<Artifact> dispositionArtifacts = new ArrayList<>();
for (Artifact artifact : selectedArtifacts) {
if (artifact.isOfType(CoreArtifactTypes.TestRun)) {
String name = artifact.getName();
@@ -289,7 +289,7 @@ public class TestRunXViewer extends XViewer {
}
public ArrayList<Artifact> getSelectedArtifacts() {
- ArrayList<Artifact> arts = new ArrayList<Artifact>();
+ ArrayList<Artifact> arts = new ArrayList<>();
TreeItem items[] = getTree().getSelection();
if (items.length > 0) {
for (TreeItem item : items) {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java
index a9bb5a0175..94d90b879d 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java
@@ -48,12 +48,12 @@ public class XViewerDataManager {
public XViewerDataManager(XViewer xViewer) {
super();
- this.backingData = new ArrayList<DataItem>();
+ this.backingData = new ArrayList<>();
this.isInitialized = false;
this.xViewer = xViewer;
- this.branchMap = new HashMap<IOseeBranch, DataItem>();
- this.commitableItems = new ArrayList<DataItem>();
- this.uncommitableItems = new ArrayList<DataItem>();
+ this.branchMap = new HashMap<>();
+ this.commitableItems = new ArrayList<>();
+ this.uncommitableItems = new ArrayList<>();
this.listeners = Collections.synchronizedSet(new HashSet<IDataChangedListener>());
}
@@ -182,7 +182,7 @@ public class XViewerDataManager {
}
private List<DataItem> getSelected() {
- List<DataItem> toReturn = new ArrayList<DataItem>();
+ List<DataItem> toReturn = new ArrayList<>();
TreeItem items[] = xViewer.getTree().getSelection();
if (items.length > 0) {
for (TreeItem item : items) {
@@ -193,7 +193,7 @@ public class XViewerDataManager {
}
public List<Artifact> getSelectedArtifacts() {
- List<Artifact> toReturn = new ArrayList<Artifact>();
+ List<Artifact> toReturn = new ArrayList<>();
for (DataItem item : getSelected()) {
Object object = item.getData();
if (object instanceof Artifact) {
@@ -212,7 +212,7 @@ public class XViewerDataManager {
}
private Artifact[] getArtifactsFromDataItemList(List<DataItem> sourceList) {
- List<Artifact> toReturn = new ArrayList<Artifact>();
+ List<Artifact> toReturn = new ArrayList<>();
for (DataItem item : sourceList) {
toReturn.add((Artifact) item.getData());
}
@@ -220,7 +220,7 @@ public class XViewerDataManager {
}
public Artifact[] getSelectedForCommit() {
- List<Artifact> toReturn = new ArrayList<Artifact>();
+ List<Artifact> toReturn = new ArrayList<>();
for (DataItem item : getSelected()) {
if (commitableItems.contains(item)) {
toReturn.add((Artifact) item.getData());
@@ -236,7 +236,7 @@ public class XViewerDataManager {
}
private void removeArtifactsFromDataItemList(List<DataItem> sourceList, final Collection<Artifact> artifactsToRemove) {
- List<DataItem> itemsToRemove = new ArrayList<DataItem>();
+ List<DataItem> itemsToRemove = new ArrayList<>();
for (DataItem item : sourceList) {
Object object = item.getData();
if (artifactsToRemove.contains(object)) {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java
index 02cf9845b0..dfa560b803 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java
@@ -54,7 +54,7 @@ public class BranchItem extends DataItem implements IXViewerItem {
public DataItem[] getChildren() {
DataItem[] toReturn = super.getChildren();
if (isGroupModeEnabled() != true) {
- List<DataItem> tempList = new ArrayList<DataItem>();
+ List<DataItem> tempList = new ArrayList<>();
for (DataItem item : toReturn) {
if (item.hasChildren()) {
for (DataItem itemX : item.getChildren()) {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java
index cbc2915891..15d68b87b3 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java
@@ -24,7 +24,7 @@ public abstract class DataItem {
public DataItem(DataItem parentItem) {
this.parentItem = parentItem;
- this.childrenMap = new HashMap<Object, DataItem>();
+ this.childrenMap = new HashMap<>();
}
public void addChild(Object key, DataItem child) {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java
index 51850def63..366aa83614 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java
@@ -233,7 +233,7 @@ public class TestRunView extends GenericViewPart implements IDataChangedListener
}
private final class ShowOnlyLatestRuns extends ViewerFilter {
- private final Map<String, ArtifactItem> latestMap = new HashMap<String, ArtifactItem>();
+ private final Map<String, ArtifactItem> latestMap = new HashMap<>();
@Override
public Object[] filter(Viewer viewer, Object parent, Object[] elements) {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java
index 3f6e0bb9b6..9e8ee772d3 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java
@@ -31,7 +31,7 @@ public class TestRunViewNavigateItem implements IXNavigateContainer {
@Override
public List<XNavigateItem> getNavigateItems() {
- List<XNavigateItem> items = new ArrayList<XNavigateItem>();
+ List<XNavigateItem> items = new ArrayList<>();
XNavigateItem msgItem = new XNavigateItem(null, "Test Analysis", PluginUiImage.FOLDER);
new XNavigateItemAction(msgItem, new OpenTestRunView(), OteDefineImage.TEST_RUN_VIEW, false);

Back to the top