Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2019-12-14 06:01:26 +0000
committerEike Stepper2019-12-14 08:26:37 +0000
commitfb21060053c5e2d335aedde561619bf46bff7368 (patch)
tree608e92d6da36db65475fd3c04ee4002ab949f987 /plugins/org.eclipse.emf.cdo.ui
parent3057ec447b4764b8a6a9cc535e5bcc37c3e01479 (diff)
downloadcdo-fb21060053c5e2d335aedde561619bf46bff7368.tar.gz
cdo-fb21060053c5e2d335aedde561619bf46bff7368.tar.xz
cdo-fb21060053c5e2d335aedde561619bf46bff7368.zip
[Releng] Use Java 8 diamond operator where possible
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/.settings/org.eclipse.jdt.ui.prefs13
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/AsyncContentProvider.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractLockObjectsAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RemoveAllContainerItemAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/RemoveResourceActionDelegate.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dnd/CDOObjectDropAdapter.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOActionBarContributor.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/LockingHandler.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryUIProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOWatchListView.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorOpener.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorUtil.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOTreeExpansionAgent.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/TimeSlider.java2
33 files changed, 105 insertions, 94 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.ui/.settings/org.eclipse.jdt.ui.prefs
index 0097568eb1..49111f3054 100644
--- a/plugins/org.eclipse.emf.cdo.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.emf.cdo.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -11,10 +11,12 @@ cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=false
cleanup.always_use_this_for_non_static_field_access=false
cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
cleanup.convert_to_enhanced_for_loop=false
cleanup.correct_indentation=true
cleanup.format_source_code=true
cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
cleanup.make_local_variable_final=true
cleanup.make_parameters_final=false
cleanup.make_private_fields_final=true
@@ -23,15 +25,20 @@ cleanup.make_variable_declarations_final=false
cleanup.never_use_blocks=false
cleanup.never_use_parentheses_in_expressions=true
cleanup.organize_imports=true
+cleanup.push_down_negation=false
cleanup.qualify_static_field_accesses_with_declaring_class=false
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
cleanup.qualify_static_member_accesses_with_declaring_class=false
cleanup.qualify_static_method_accesses_with_declaring_class=false
cleanup.remove_private_constructors=true
+cleanup.remove_redundant_modifiers=false
+cleanup.remove_redundant_semicolons=true
+cleanup.remove_redundant_type_arguments=true
cleanup.remove_trailing_whitespaces=true
cleanup.remove_trailing_whitespaces_all=true
cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_array_creation=true
cleanup.remove_unnecessary_casts=true
cleanup.remove_unnecessary_nls_tags=true
cleanup.remove_unused_imports=true
@@ -42,14 +49,18 @@ cleanup.remove_unused_private_methods=true
cleanup.remove_unused_private_types=true
cleanup.sort_members=false
cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_autoboxing=false
cleanup.use_blocks=true
cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
cleanup.use_parentheses_in_expressions=true
cleanup.use_this_for_non_static_field_access=true
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
cleanup.use_this_for_non_static_method_access=true
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-cleanup_profile=_EMFT
+cleanup.use_unboxing=false
+cleanup_profile=_CDO
cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/AsyncContentProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/AsyncContentProvider.java
index 9c0947ded3..a554ba700c 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/AsyncContentProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/AsyncContentProvider.java
@@ -32,7 +32,7 @@ public class AsyncContentProvider implements ITreeContentProvider
private ITreeContentProvider delegate;
- private WeakHashMap<Object, LoadJob> loadJobs = new WeakHashMap<Object, LoadJob>();
+ private WeakHashMap<Object, LoadJob> loadJobs = new WeakHashMap<>();
public AsyncContentProvider(ITreeContentProvider delegate)
{
@@ -141,7 +141,7 @@ public class AsyncContentProvider implements ITreeContentProvider
{
private Object parent;
- private List<Object> children = new ArrayList<Object>();
+ private List<Object> children = new ArrayList<>();
public LoadJob(Object parent)
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java
index 8435559140..15ec316406 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/CDOPropertyAdapterFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013, 2015, 2016, 2018 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2011-2013, 2015, 2016, 2018, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -56,13 +56,13 @@ import java.util.Map;
*/
public class CDOPropertyAdapterFactory extends AbstractPropertyAdapterFactory
{
- private static final IActionFilter REPOSITORY_ACTION_FILTER = new DefaultActionFilter<CDOCommonRepository>(RepositoryProperties.INSTANCE);
+ private static final IActionFilter REPOSITORY_ACTION_FILTER = new DefaultActionFilter<>(RepositoryProperties.INSTANCE);
- private static final IActionFilter SESSION_ACTION_FILTER = new DefaultActionFilter<CDOSession>(SessionProperties.INSTANCE);
+ private static final IActionFilter SESSION_ACTION_FILTER = new DefaultActionFilter<>(SessionProperties.INSTANCE);
- private static final IActionFilter VIEW_ACTION_FILTER = new DefaultActionFilter<CDOView>(ViewProperties.INSTANCE);
+ private static final IActionFilter VIEW_ACTION_FILTER = new DefaultActionFilter<>(ViewProperties.INSTANCE);
- private static final IActionFilter OBJECT_ACTION_FILTER = new DefaultActionFilter<EObject>(ObjectProperties.INSTANCE);
+ private static final IActionFilter OBJECT_ACTION_FILTER = new DefaultActionFilter<>(ObjectProperties.INSTANCE);
public CDOPropertyAdapterFactory()
{
@@ -75,17 +75,17 @@ public class CDOPropertyAdapterFactory extends AbstractPropertyAdapterFactory
{
if (object instanceof CDOCommonRepository)
{
- return new DefaultPropertySource<CDOCommonRepository>((CDOCommonRepository)object, RepositoryProperties.INSTANCE);
+ return new DefaultPropertySource<>((CDOCommonRepository)object, RepositoryProperties.INSTANCE);
}
if (object instanceof CDOSession)
{
- return new DefaultPropertySource<CDOSession>((CDOSession)object, SessionProperties.INSTANCE);
+ return new DefaultPropertySource<>((CDOSession)object, SessionProperties.INSTANCE);
}
if (object instanceof CDOView)
{
- return new DefaultPropertySource<CDOView>((CDOView)object, ViewProperties.INSTANCE);
+ return new DefaultPropertySource<>((CDOView)object, ViewProperties.INSTANCE);
}
if (object instanceof CDOElement)
@@ -99,7 +99,7 @@ public class CDOPropertyAdapterFactory extends AbstractPropertyAdapterFactory
InternalCDOObject cdoObject = (InternalCDOObject)CDOUtil.getCDOObject(eObject, false);
if (cdoObject != null)
{
- final Map<String, Object> emfProperties = new HashMap<String, Object>();
+ final Map<String, Object> emfProperties = new HashMap<>();
DefaultPropertySource<EObject> result = new DefaultPropertySource<EObject>(cdoObject, ObjectProperties.INSTANCE)
{
@Override
@@ -241,7 +241,7 @@ public class CDOPropertyAdapterFactory extends AbstractPropertyAdapterFactory
public static String getTypeText(ComposedAdapterFactory adapterFactory, EObject eObject)
{
String typeKey = eObject.eClass().getName();
- List<Adapter> originalAdapters = new ArrayList<Adapter>(eObject.eAdapters());
+ List<Adapter> originalAdapters = new ArrayList<>(eObject.eAdapters());
try
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractLockObjectsAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractLockObjectsAction.java
index bfed46a09d..c8027c894d 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractLockObjectsAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/AbstractLockObjectsAction.java
@@ -35,9 +35,9 @@ import java.util.List;
@Deprecated
public abstract class AbstractLockObjectsAction extends EditingDomainAction
{
- private List<InternalCDOObject> objects = new ArrayList<InternalCDOObject>();
+ private List<InternalCDOObject> objects = new ArrayList<>();
- private List<InternalCDOObject> lockObjects = new ArrayList<InternalCDOObject>();
+ private List<InternalCDOObject> lockObjects = new ArrayList<>();
private Boolean lock;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java
index 742f6eaa48..15aa68b527 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DeleteResourceAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2016, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public class DeleteResourceAction extends SafeAction
{
super(Messages.getString("DeleteResourceAction_1"), Messages.getString("DeleteResourceAction_5"), SharedIcons.getDescriptor(SharedIcons.ETOOL_DELETE));
this.shell = shell;
- this.nodes = new HashSet<CDOResourceNode>(nodes);
+ this.nodes = new HashSet<>(nodes);
}
@Override
@@ -65,7 +65,7 @@ public class DeleteResourceAction extends SafeAction
@Override
protected IStatus run(IProgressMonitor monitor)
{
- Set<CDOResourceNode> nestedNodes = new HashSet<CDOResourceNode>();
+ Set<CDOResourceNode> nestedNodes = new HashSet<>();
for (CDOResourceNode node : nodes)
{
if (isNested(node))
@@ -76,7 +76,7 @@ public class DeleteResourceAction extends SafeAction
nodes.removeAll(nestedNodes);
- Map<Integer, CDOTransaction> repositoryToTransaction = new HashMap<Integer, CDOTransaction>();
+ Map<Integer, CDOTransaction> repositoryToTransaction = new HashMap<>();
for (CDOResourceNode node : nodes)
{
CDOSession session = node.cdoView().getSession();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java
index 5dd56794e1..0cde829531 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007-2013, 2015, 2016 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2007-2013, 2015, 2016, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -87,7 +87,7 @@ public class ExportResourceAction extends AbstractViewAction
// Source Resource
Resource source = view.getResource(targetPath);
- List<EObject> sourceContents = new ArrayList<EObject>(source.getContents());
+ List<EObject> sourceContents = new ArrayList<>(source.getContents());
exportObjects(sourceContents);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java
index 12b0d90632..1b037e384a 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportResourceAction.java
@@ -88,7 +88,7 @@ public class ImportResourceAction extends AbstractViewAction
// Source Resource
Resource source = sourceSet.getResource(sourceURI, true);
- List<EObject> sourceContents = new ArrayList<EObject>(source.getContents());
+ List<EObject> sourceContents = new ArrayList<>(source.getContents());
// Target Resource
Resource target = transaction.createResource(targetPath);
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java
index e5a31c9e9d..a839900e8e 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007-2009, 2011, 2012, 2015 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2007-2009, 2011, 2012, 2015, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -94,7 +94,7 @@ public class ImportRootsAction extends EditingDomainAction
List<Resource> resources = getSourceResources();
for (Resource resource : resources)
{
- List<EObject> contents = new ArrayList<EObject>(resource.getContents());
+ List<EObject> contents = new ArrayList<>(resource.getContents());
for (EObject root : contents)
{
targetContents.add(root);
@@ -105,7 +105,7 @@ public class ImportRootsAction extends EditingDomainAction
protected List<Resource> getSourceResources()
{
ResourceSetImpl resourceSet = createSourceResourceSet();
- List<Resource> resources = new ArrayList<Resource>(uris.size());
+ List<Resource> resources = new ArrayList<>(uris.size());
for (URI uri : uris)
{
Resource resource = resourceSet.getResource(uri, true);
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java
index 4b77fe547b..b8589558ed 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007-2009, 2011, 2012, 2015, 2016 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2007-2009, 2011, 2012, 2015, 2016, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -65,7 +65,7 @@ public class RegisterFilesystemPackagesAction extends RegisterPackagesAction
if (fileNames != null && fileNames.length != 0)
{
ResourceSet resourceSet = EMFUtil.newEcoreResourceSet();
- List<EPackage> ePackages = new ArrayList<EPackage>(fileNames.length);
+ List<EPackage> ePackages = new ArrayList<>(fileNames.length);
for (String fileName : fileNames)
{
String path = filterPath + File.separator + fileName;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
index d642259c84..19b0e5ba80 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
@@ -54,7 +54,7 @@ public class RegisterGeneratedPackagesAction extends RegisterPackagesAction
if (dialog.open() == SelectPackageDialog.OK)
{
Set<String> checkedURIs = dialog.getCheckedURIs();
- List<EPackage> ePackages = new ArrayList<EPackage>(checkedURIs.size());
+ List<EPackage> ePackages = new ArrayList<>(checkedURIs.size());
for (String uri : checkedURIs)
{
try
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RemoveAllContainerItemAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RemoveAllContainerItemAction.java
index 3faf983930..b11dea34e9 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RemoveAllContainerItemAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RemoveAllContainerItemAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, 2011, 2012, 2015 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2008, 2009, 2011, 2012, 2015, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public class RemoveAllContainerItemAction<E> extends AbstractContainerAction<E>
protected void doRun(IProgressMonitor progressMonitor) throws Exception
{
Modifiable<E> container = getContainer();
- ArrayList<E> elementsToRemove = new ArrayList<E>();
+ ArrayList<E> elementsToRemove = new ArrayList<>();
for (E element : container.getElements())
{
elementsToRemove.add(element);
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java
index 5cad16b59f..8eef953434 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ExportResourceActionDelegate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2016, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -86,7 +86,7 @@ public class ExportResourceActionDelegate extends TransactionalBackgroundActionD
{
// Source Resource
Resource source = object instanceof CDOResource ? (CDOResource)object : object.cdoResource();
- List<EObject> sourceContents = new ArrayList<EObject>(source.getContents());
+ List<EObject> sourceContents = new ArrayList<>(source.getContents());
exportObjects(sourceContents);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java
index cc67cba0d1..779728053e 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/ImportResourceActionDelegate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2016, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -87,7 +87,7 @@ public class ImportResourceActionDelegate extends NewResourceActionDelegate
// Source Resource
Resource source = sourceSet.getResource(sourceURI, true);
- List<EObject> sourceContents = new ArrayList<EObject>(source.getContents());
+ List<EObject> sourceContents = new ArrayList<>(source.getContents());
// Target Resource
EList<EObject> targetContents = resource.getContents();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/RemoveResourceActionDelegate.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/RemoveResourceActionDelegate.java
index f592eadbec..a580206705 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/RemoveResourceActionDelegate.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/delegates/RemoveResourceActionDelegate.java
@@ -80,7 +80,7 @@ public class RemoveResourceActionDelegate implements IObjectActionDelegate
@Override
protected IStatus run(IProgressMonitor monitor)
{
- Map<Integer, CDOTransaction> repositoryToTransaction = new HashMap<Integer, CDOTransaction>();
+ Map<Integer, CDOTransaction> repositoryToTransaction = new HashMap<>();
for (CDOResourceNode node : nodes)
{
CDOSession session = node.cdoView().getSession();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java
index 4a446058f4..5be6909176 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/BulkAddDialog.java
@@ -48,7 +48,7 @@ public class BulkAddDialog extends TitleAreaDialog
private IWorkbenchPage page;
- private List<EReference> features = new ArrayList<EReference>();
+ private List<EReference> features = new ArrayList<>();
private EReference feature;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java
index 2f281da286..98af9c45ed 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/PackageRegistryDialog.java
@@ -178,7 +178,7 @@ public class PackageRegistryDialog extends TitleAreaDialog
private boolean isGlobalPackageAvaliable()
{
- Set<String> uris = new HashSet<String>(EPackage.Registry.INSTANCE.keySet());
+ Set<String> uris = new HashSet<>(EPackage.Registry.INSTANCE.keySet());
uris.removeAll(session.getPackageRegistry().keySet());
return !uris.isEmpty();
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java
index 2effdb9b77..3603de6665 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectClassDialog.java
@@ -287,7 +287,7 @@ public class SelectClassDialog extends TitleAreaDialog
{
final EPackage.Registry registry = (EPackage.Registry)input;
- List<String> nsURIs = new ArrayList<String>();
+ List<String> nsURIs = new ArrayList<>();
for (String nsURI : registry.keySet())
{
if (filter == null || nsURI.toLowerCase().contains(filter))
@@ -389,7 +389,7 @@ public class SelectClassDialog extends TitleAreaDialog
{
EPackage ePackage = (EPackage)input;
- List<EClass> eClasses = new ArrayList<EClass>();
+ List<EClass> eClasses = new ArrayList<>();
for (EClassifier eClassifier : ePackage.getEClassifiers())
{
if (eClassifier instanceof EClass)
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java
index fee2e3fed6..74d13d8219 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/SelectPackageDialog.java
@@ -48,9 +48,9 @@ public class SelectPackageDialog extends BaseDialog<CheckboxTableViewer>
{
private static final Set<String> NO_URIS = Collections.emptySet();
- private Set<String> excludedURIs = new HashSet<String>();
+ private Set<String> excludedURIs = new HashSet<>();
- private Set<String> checkedURIs = new HashSet<String>();
+ private Set<String> checkedURIs = new HashSet<>();
public SelectPackageDialog(Shell shell, String title, String message, Set<String> excludedURIs)
{
@@ -121,10 +121,10 @@ public class SelectPackageDialog extends BaseDialog<CheckboxTableViewer>
@Override
public Object[] getElements(Object inputElement)
{
- Set<String> uris = new HashSet<String>(EPackage.Registry.INSTANCE.keySet());
+ Set<String> uris = new HashSet<>(EPackage.Registry.INSTANCE.keySet());
uris.removeAll(excludedURIs);
- List<String> elements = new ArrayList<String>(uris);
+ List<String> elements = new ArrayList<>(uris);
Collections.sort(elements);
return elements.toArray();
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dnd/CDOObjectDropAdapter.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dnd/CDOObjectDropAdapter.java
index bbb473bfba..bc171f00cb 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dnd/CDOObjectDropAdapter.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dnd/CDOObjectDropAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008-2012 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2008-2012, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -47,7 +47,7 @@ public class CDOObjectDropAdapter extends DNDDropAdapter<TreeSelection>
if (target instanceof IContainer.Modifiable<?>)
{
IContainer.Modifiable<CDOObject> objectContainer = (IContainer.Modifiable<CDOObject>)target;
- ArrayList<CDOObject> elementsToAdd = new ArrayList<CDOObject>();
+ ArrayList<CDOObject> elementsToAdd = new ArrayList<>();
for (Object obj : data.toArray())
{
if (isWatchable(obj))
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOActionBarContributor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOActionBarContributor.java
index 7ce7ccc142..fde8e0ba26 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOActionBarContributor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOActionBarContributor.java
@@ -405,7 +405,7 @@ public class CDOActionBarContributor extends EditingDomainActionBarContributor i
*/
protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection)
{
- Collection<IAction> actions = new ArrayList<IAction>();
+ Collection<IAction> actions = new ArrayList<>();
if (descriptors != null)
{
for (Object descriptor : descriptors)
@@ -425,7 +425,7 @@ public class CDOActionBarContributor extends EditingDomainActionBarContributor i
*/
protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection)
{
- Collection<IAction> actions = new ArrayList<IAction>();
+ Collection<IAction> actions = new ArrayList<>();
if (descriptors != null)
{
for (Object descriptor : descriptors)
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
index 3049f14b97..c472d28198 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
@@ -201,7 +201,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
*/
private static List<String> prefixExtensions(List<String> extensions, String prefix)
{
- List<String> result = new ArrayList<String>();
+ List<String> result = new ArrayList<>();
for (String extension : extensions)
{
result.add(prefix + extension);
@@ -300,7 +300,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
* <!-- end-user-doc -->
* @generated
*/
- protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<>();
/**
* This is the viewer that shadows the selection in the content outline.
@@ -329,7 +329,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
- protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<>();
/**
* This keeps track of the selection of the editor as a whole.
@@ -401,28 +401,28 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
- protected Collection<Resource> removedResources = new ArrayList<Resource>();
+ protected Collection<Resource> removedResources = new ArrayList<>();
/**
* Resources that have been changed since last activation.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
- protected Collection<Resource> changedResources = new ArrayList<Resource>();
+ protected Collection<Resource> changedResources = new ArrayList<>();
/**
* Resources that have been saved.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
- protected Collection<Resource> savedResources = new ArrayList<Resource>();
+ protected Collection<Resource> savedResources = new ArrayList<>();
/**
* Map to store the diagnostic associated with a resource.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
- protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
+ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<>();
/**
* Controls whether the problem indication should be updated.
@@ -1842,7 +1842,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
//
Object selectedElement = selectedElements.next();
- ArrayList<Object> selectionList = new ArrayList<Object>();
+ ArrayList<Object> selectionList = new ArrayList<>();
selectionList.add(selectedElement);
while (selectedElements.hasNext())
{
@@ -1878,7 +1878,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
{
// Save only resources that have actually changed.
//
- final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ final Map<Object, Object> saveOptions = new HashMap<>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
// Do the work within an operation because this is a long running activity that modifies the workbench.
@@ -1947,7 +1947,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
Display.getCurrent().asyncExec(null);
// Save only resources that have actually changed.
//
- final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ final Map<Object, Object> saveOptions = new HashMap<>();
saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
IRunnableWithProgress operation = new IRunnableWithProgress()
@@ -2382,7 +2382,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
if (element instanceof EObject)
{
final EObject object = (EObject)element;
- final List<EReference> features = new ArrayList<EReference>();
+ final List<EReference> features = new ArrayList<>();
for (EReference containment : object.eClass().getEAllContainments())
{
if (containment.isMany())
@@ -2419,7 +2419,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
@Override
protected void doRun(IProgressMonitor progressMonitor) throws Exception
{
- List<EObject> children = new ArrayList<EObject>();
+ List<EObject> children = new ArrayList<>();
for (int i = 0; i < instances; i++)
{
EObject child = EcoreUtil.create(feature.getEReferenceType());
@@ -2966,7 +2966,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
protected void populateSubMenu(EPackage ePackage, final IMenuManager submenuManager)
{
- List<EObject> objects = new ArrayList<EObject>();
+ List<EObject> objects = new ArrayList<>();
for (EClassifier eClassifier : ePackage.getEClassifiers())
{
if (eClassifier instanceof EClass)
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java
index 44f2289057..65ddb959b0 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/CreateBranchHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -80,7 +80,7 @@ public class CreateBranchHandler extends AbstractBaseHandler<CDOBranchCreationCo
public static String getValidChildName(CDOBranch branch)
{
- Set<String> names = new HashSet<String>();
+ Set<String> names = new HashSet<>();
for (CDOBranch child : branch.getBranches())
{
names.add(child.getName());
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/LockingHandler.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/LockingHandler.java
index 9f09c45c92..2ca5e79667 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/LockingHandler.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/handlers/LockingHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2015, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -45,7 +45,7 @@ public abstract class LockingHandler extends AbstractBaseHandler<EObject>
protected void doExecute(IProgressMonitor monitor) throws Exception
{
CDOView view = null;
- Set<CDOObject> objects = new HashSet<CDOObject>();
+ Set<CDOObject> objects = new HashSet<>();
for (EObject element : elements)
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java
index ab173cb8f2..1a89a8b5e5 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Commit.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2016 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2012, 2016, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -175,7 +175,7 @@ public final class Commit
{
if (mergeTargets == null)
{
- mergeTargets = new ArrayList<Commit>(1);
+ mergeTargets = new ArrayList<>(1);
}
else
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java
index 5da7153ca9..3904c4e9e3 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/history/Net.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, 2015, 2016 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2012, 2013, 2015, 2016, 2019 Eike Stepper (Loehne, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -48,11 +48,11 @@ public class Net
private Track[] tracks = {};
- private final Map<CDOBranch, Branch> branches = new HashMap<CDOBranch, Branch>();
+ private final Map<CDOBranch, Branch> branches = new HashMap<>();
- private final Map<CDOCommitInfo, Commit> commits = new WeakHashMap<CDOCommitInfo, Commit>();
+ private final Map<CDOCommitInfo, Commit> commits = new WeakHashMap<>();
- private final Map<CDOCommitInfo, List<Commit>> danglingMergeTargets = new WeakHashMap<CDOCommitInfo, List<Commit>>();
+ private final Map<CDOCommitInfo, List<Commit>> danglingMergeTargets = new WeakHashMap<>();
private int commitCounter;
@@ -476,7 +476,7 @@ public class Net
List<Commit> mergeTargets = danglingMergeTargets.get(mergedCommitInfo);
if (mergeTargets == null)
{
- mergeTargets = new ArrayList<Commit>(1);
+ mergeTargets = new ArrayList<>(1);
danglingMergeTargets.put(mergedCommitInfo, mergeTargets);
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java
index 72807f63a0..939abf8877 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryPluginDropAdapter.java
@@ -71,7 +71,7 @@ public class RepositoryPluginDropAdapter implements IDropActionDelegate
CDOView view = nodes.get(0).cdoView();
CDOTransferSystem sourceSystem = new RepositoryTransferSystem(view);
- List<CDOTransferElement> sourceElements = new ArrayList<CDOTransferElement>(nodes.size());
+ List<CDOTransferElement> sourceElements = new ArrayList<>(nodes.size());
for (CDOResourceNode node : nodes)
{
sourceElements.add(sourceSystem.getElement(node.getPath()));
@@ -115,7 +115,7 @@ public class RepositoryPluginDropAdapter implements IDropActionDelegate
return null;
}
- List<CDOResourceNode> nodes = new ArrayList<CDOResourceNode>();
+ List<CDOResourceNode> nodes = new ArrayList<>();
for (;;)
{
String path = in.readString();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryUIProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryUIProvider.java
index b93cb7aee3..87b55ca953 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryUIProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/transfer/RepositoryUIProvider.java
@@ -88,7 +88,7 @@ public class RepositoryUIProvider implements TransferUIProvider
@Override
public Object convertSelection(IStructuredSelection selection)
{
- List<CDOResourceNode> result = new ArrayList<CDOResourceNode>();
+ List<CDOResourceNode> result = new ArrayList<>();
for (Iterator<?> it = selection.iterator(); it.hasNext();)
{
Object object = it.next();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOWatchListView.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOWatchListView.java
index 54c1f1f7a3..4ad23bb92d 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOWatchListView.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOWatchListView.java
@@ -169,13 +169,13 @@ public class CDOWatchListView extends ViewPart implements ISelectionProvider
private void createActions()
{
ISharedImages platformImages = PlatformUI.getWorkbench().getSharedImages();
- removeAction = new RemoveContainerItemAction<CDOObject>(container, viewer);
+ removeAction = new RemoveContainerItemAction<>(container, viewer);
removeAction.setText(Messages.getString("CDOWatchListView.4")); //$NON-NLS-1$
removeAction.setImageDescriptor(platformImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
removeAction.setDisabledImageDescriptor(platformImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
removeAction.setToolTipText(Messages.getString("CDOWatchListView.5")); //$NON-NLS-1$
- removeAllAction = new RemoveAllContainerItemAction<CDOObject>(container);
+ removeAllAction = new RemoveAllContainerItemAction<>(container);
removeAllAction.setText(Messages.getString("CDOWatchListView.6")); //$NON-NLS-1$
removeAllAction.setImageDescriptor(platformImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
removeAllAction.setToolTipText(Messages.getString("CDOWatchListView.7")); //$NON-NLS-1$
@@ -406,7 +406,7 @@ public class CDOWatchListView extends ViewPart implements ISelectionProvider
*/
private final class CDOObjectContainer extends Container<CDOObject> implements IContainer.Modifiable<CDOObject>
{
- private Set<CDOObject> watchedObjects = new HashSet<CDOObject>();
+ private Set<CDOObject> watchedObjects = new HashSet<>();
private CDOSubscriptionAdapter subscriptionAdapter = new CDOSubscriptionAdapter();
@@ -470,7 +470,7 @@ public class CDOWatchListView extends ViewPart implements ISelectionProvider
@Override
public boolean addAllElements(Collection<CDOObject> elements)
{
- ArrayList<CDOObject> addedElements = new ArrayList<CDOObject>();
+ ArrayList<CDOObject> addedElements = new ArrayList<>();
for (CDOObject cdoObject : elements)
{
if (watchedObjects.add(cdoObject))
@@ -495,7 +495,7 @@ public class CDOWatchListView extends ViewPart implements ISelectionProvider
@Override
public boolean removeAllElements(Collection<CDOObject> elements)
{
- ArrayList<CDOObject> removedElements = new ArrayList<CDOObject>();
+ ArrayList<CDOObject> removedElements = new ArrayList<>();
for (CDOObject cdoObject : elements)
{
if (watchedObjects.remove(cdoObject))
@@ -573,7 +573,7 @@ public class CDOWatchListView extends ViewPart implements ISelectionProvider
{
if (((ILifecycleEvent)event).getKind() == ILifecycleEvent.Kind.ABOUT_TO_DEACTIVATE)
{
- List<CDOObject> aboutToRemove = new ArrayList<CDOObject>();
+ List<CDOObject> aboutToRemove = new ArrayList<>();
for (CDOObject object : getElements())
{
if (object.cdoView().equals(event.getSource()))
@@ -594,7 +594,7 @@ public class CDOWatchListView extends ViewPart implements ISelectionProvider
*/
private final class CDOViewReferenceCounterManager
{
- private List<CDOViewReferenceCounter> viewReferences = new ArrayList<CDOViewReferenceCounter>();
+ private List<CDOViewReferenceCounter> viewReferences = new ArrayList<>();
public CDOViewReferenceCounterManager()
{
@@ -658,7 +658,7 @@ public class CDOWatchListView extends ViewPart implements ISelectionProvider
*/
private final class WatchedObjectsDataRegistry extends org.eclipse.net4j.util.event.Notifier implements IListener
{
- private Map<Object, WatchedObjectData> registry = new HashMap<Object, WatchedObjectData>();
+ private Map<Object, WatchedObjectData> registry = new HashMap<>();
private final IEvent dataRegistryEvent = new IEvent()
{
@@ -992,7 +992,7 @@ public class CDOWatchListView extends ViewPart implements ISelectionProvider
@Override
protected void doRun(IProgressMonitor progressMonitor) throws Exception
{
- ArrayList<Object> aboutToReset = new ArrayList<Object>();
+ ArrayList<Object> aboutToReset = new ArrayList<>();
for (CDOObject cdoObject : container.getElements())
{
aboutToReset.add(cdoObject);
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorOpener.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorOpener.java
index e5ac760fac..923a9e9d44 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorOpener.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorOpener.java
@@ -154,7 +154,7 @@ public interface CDOEditorOpener
@Override
public IEditorPart openEditor(final IWorkbenchPage page, URI uri)
{
- final Set<IEditorPart> editors = new HashSet<IEditorPart>();
+ final Set<IEditorPart> editors = new HashSet<>();
final IEditorPart[] editor = { null };
IPartListener partListener = new IPartListener()
@@ -237,7 +237,7 @@ public interface CDOEditorOpener
private static final String EXT_POINT = "editorOpeners"; //$NON-NLS-1$
- private final Map<String, CDOEditorOpener> editorOpeners = new HashMap<String, CDOEditorOpener>();
+ private final Map<String, CDOEditorOpener> editorOpeners = new HashMap<>();
public Registry()
{
@@ -272,7 +272,7 @@ public interface CDOEditorOpener
public CDOEditorOpener[] getEditorOpeners(URI uri)
{
- List<CDOEditorOpener> result = new ArrayList<CDOEditorOpener>();
+ List<CDOEditorOpener> result = new ArrayList<>();
synchronized (editorOpeners)
{
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorUtil.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorUtil.java
index b9a37bb0d5..936f28dc34 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorUtil.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOEditorUtil.java
@@ -64,7 +64,7 @@ public final class CDOEditorUtil
private static final IEditorRegistry EDITOR_REGISTRY = PlatformUI.getWorkbench().getEditorRegistry();
- private static final Map<CDOResourceLeaf, String> EDITOR_OVERRIDES = new WeakHashMap<CDOResourceLeaf, String>();
+ private static final Map<CDOResourceLeaf, String> EDITOR_OVERRIDES = new WeakHashMap<>();
private static String editorID = EDITOR_ID;
@@ -211,7 +211,7 @@ public final class CDOEditorUtil
*/
public static IEditorReference[] findEditor(IWorkbenchPage page, CDOView view, String resourcePath)
{
- List<IEditorReference> result = new ArrayList<IEditorReference>();
+ List<IEditorReference> result = new ArrayList<>();
IEditorReference[] editorReferences = page.getEditorReferences();
for (IEditorReference editorReference : editorReferences)
{
@@ -299,7 +299,7 @@ public final class CDOEditorUtil
*/
public static String[] getAllEditorIDs(CDOResourceLeaf resource)
{
- List<String> editorIDs = new ArrayList<String>();
+ List<String> editorIDs = new ArrayList<>();
if (resource instanceof CDOResource)
{
editorIDs.add(EDITOR_ID);
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
index 5c4384c437..d869cf6b6c 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
@@ -619,7 +619,7 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
*/
public boolean fillGenerated(MenuManager manager, CDOSession session)
{
- List<String> registeredURIs = new ArrayList<String>(EPackage.Registry.INSTANCE.keySet());
+ List<String> registeredURIs = new ArrayList<>(EPackage.Registry.INSTANCE.keySet());
Collections.sort(registeredURIs, new Comparator<String>()
{
@Override
@@ -898,7 +898,7 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
*/
private final class ElementListener implements IListener, CDOObjectHandler
{
- private final Set<INotifier> notifiers = new HashSet<INotifier>();
+ private final Set<INotifier> notifiers = new HashSet<>();
private boolean disposed;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOTreeExpansionAgent.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOTreeExpansionAgent.java
index 159c1a797a..275604ead6 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOTreeExpansionAgent.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOTreeExpansionAgent.java
@@ -44,9 +44,9 @@ public class CDOTreeExpansionAgent
{
private final Listener listener = new Listener();
- private final Set<CDOID> expandedIDs = new HashSet<CDOID>();
+ private final Set<CDOID> expandedIDs = new HashSet<>();
- private final Set<CDOID> expandedWrappers = new HashSet<CDOID>();
+ private final Set<CDOID> expandedWrappers = new HashSet<>();
private final CDOView view;
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/TimeSlider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/TimeSlider.java
index 893f4b69e0..faa5a7e6f4 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/TimeSlider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/TimeSlider.java
@@ -53,7 +53,7 @@ public class TimeSlider extends Scale implements IListener, ITreeViewerListener
private static final double FACTOR = MAX - MIN;
- private final Set<CDOID> expandedIDs = new HashSet<CDOID>();
+ private final Set<CDOID> expandedIDs = new HashSet<>();
private long startTimeStamp;

Back to the top