Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundles/org.eclipse.core.databinding/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.databinding
Bundle-Version: 1.13.300.qualifier
Bundle-Version: 1.13.400.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.core.databinding,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2018 IBM Corporation and others.
* Copyright (c) 2007, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -422,12 +422,11 @@ private synchronized static Map<Pair, Object> getConverterMap() {
return converterMap;
}

private static final Class<?>[] integerClasses = new Class[] { byte.class,
Byte.class, short.class, Short.class, int.class, Integer.class,
long.class, Long.class, BigInteger.class };
private static final Class<?>[] integerClasses = { byte.class, Byte.class, short.class, Short.class, int.class,
Integer.class, long.class, Long.class, BigInteger.class };

private static final Class<?>[] floatClasses = new Class[] { float.class,
Float.class, double.class, Double.class, BigDecimal.class };
private static final Class<?>[] floatClasses = { float.class, Float.class, double.class, Double.class,
BigDecimal.class };

/**
* Registers converters to boxed and unboxed types from a list of from
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2015 IBM Corporation and others.
* Copyright (c) 2006, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -53,7 +53,7 @@ public static Class<?>[] getTypeHierarchyFlattened(Class<?> type) {
classSearchOrderLookup = lookup = new HashMap<>();
lookup.put(type, classes);
}
return classes.toArray(new Class[classes.size()]);
return classes.toArray(Class[]::new);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005, 2015 db4objects Inc. http://www.db4o.com and others.
* Copyright (C) 2005, 2025 db4objects Inc. http://www.db4o.com and others.
*
*
* This program and the accompanying materials
Expand Down Expand Up @@ -37,7 +37,7 @@ public IdentityConverter(Class<?> fromType, Class<?> toType) {
this.toType = toType;
}

private Class<?>[][] primitiveMap = new Class[][] {
private Class<?>[][] primitiveMap = {
{ Integer.TYPE, Integer.class }, { Short.TYPE, Short.class },
{ Long.TYPE, Long.class }, { Double.TYPE, Double.class },
{ Byte.TYPE, Byte.class }, { Float.TYPE, Float.class },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2014 IBM Corporation and others.
* Copyright (c) 2006, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -28,7 +28,7 @@ public class ObjectToPrimitiveValidator implements IValidator<Object> {

private Class<?> toType;

private Class<?>[][] primitiveMap = new Class[][] {
private Class<?>[][] primitiveMap = {
{ Integer.TYPE, Integer.class }, { Short.TYPE, Short.class },
{ Long.TYPE, Long.class }, { Double.TYPE, Double.class },
{ Byte.TYPE, Byte.class }, { Float.TYPE, Float.class },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2010, 2015 IBM Corporation and others.
* Copyright (c) 2010, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -40,7 +40,7 @@ public class SelectionAdapterFactory implements IAdapterFactory {
/**
* The classes we can adapt to.
*/
private static final Class<?>[] CLASSES = new Class[] { IIterable.class, ICountable.class };
private static final Class<?>[] CLASSES = { IIterable.class, ICountable.class };

@Override
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2015 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -43,7 +43,7 @@ public IPath getPath(Object element) {
}

/** The list of provided adapters. */
private static final Class<?>[] ADAPTER_LIST= new Class[] { ILocationProvider.class };
private static final Class<?>[] ADAPTER_LIST = { ILocationProvider.class };

/** The provided location provider */
private ILocationProvider fLocationProvider= new LocationProvider();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2007, 2015 IBM Corporation and others.
* Copyright (c) 2007, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -57,7 +57,7 @@ public URI getURI(Object element) {


/** The list of provided adapters. */
private static final Class<?>[] ADAPTER_LIST= new Class[] { ILocationProvider.class };
private static final Class<?>[] ADAPTER_LIST = { ILocationProvider.class };

/** The provided location provider */
private ILocationProvider fLocationProvider= new LocationProvider();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005, 2015 db4objects Inc. http://www.db4o.com
* Copyright (C) 2005, 2025 db4objects Inc. http://www.db4o.com
*
*
* This program and the accompanying materials
Expand Down Expand Up @@ -35,7 +35,7 @@ public class ReflectedMethod {
* @param methodName The name of the method.
* @param paramTypes The method's parameter types.
*/
public ReflectedMethod(Object subject, String methodName, Class<?>[] paramTypes) {
public ReflectedMethod(Object subject, String methodName, Class<?>... paramTypes) {
this.subject = subject;
method = null;
try {
Expand All @@ -62,7 +62,7 @@ public boolean exists() {
* @return any return value or null if there was no return value or an error
* occured.
*/
public Object invoke(Object[] params) {
public Object invoke(Object... params) {
if (method == null)
return null;
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2015 The Pampered Chef and others.
* Copyright (c) 2006, 2025 The Pampered Chef and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -32,14 +32,14 @@ public class ReflectedProperty {
*/
public ReflectedProperty(Object object, String propertyName) {
this.propertyName = propertyName;
getter = new ReflectedMethod(object, makeGetterName(propertyName), new Class[] {});
getter = new ReflectedMethod(object, makeGetterName(propertyName));
if (!getter.exists()) {
getter = new ReflectedMethod(object, makeBooleanGetterName(propertyName), new Class[] {});
getter = new ReflectedMethod(object, makeBooleanGetterName(propertyName));
if (!getter.exists()) {
throw new IllegalArgumentException("Cannot find getter for " + propertyName);
}
}
setter = new ReflectedMethod(object, makeSetterName(propertyName), new Class[] { getter.getType() });
setter = new ReflectedMethod(object, makeSetterName(propertyName), getter.getType());
}

private String makeBooleanGetterName(String propertyName) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005, 2015 db4objects Inc. http://www.db4o.com
* Copyright (C) 2005, 2025 db4objects Inc. http://www.db4o.com
*
*
* This program and the accompanying materials
Expand Down Expand Up @@ -38,7 +38,7 @@ public static Object implement(Class<?> interfaceToImplement, Object object) {
new RelaxedDuckType(object));
}

public static boolean includes(Object object, String method, Class<?>[] args) {
public static boolean includes(Object object, String method, Class<?>... args) {
try {
object.getClass().getMethod(method, args);
} catch (NoSuchMethodException e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2018 Tom Schindl and others.
* Copyright (c) 2006, 2025 Tom Schindl and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -191,7 +191,7 @@ protected void setValue(Object element, Object value) {
ViewerCell cell = mgr.getFocusCell();

try {
Method m = ColumnViewerEditor.class.getDeclaredMethod("processTraverseEvent", new Class[] {int.class,ViewerRow.class,TraverseEvent.class});
Method m = ColumnViewerEditor.class.getDeclaredMethod("processTraverseEvent", int.class,ViewerRow.class,TraverseEvent.class);
m.setAccessible(true);
m.invoke(editor, Integer.valueOf(cell.getColumnIndex()), cell.getViewerRow(), e);
} catch (SecurityException | NoSuchMethodException | IllegalArgumentException | IllegalAccessException | InvocationTargetException e1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.core.filebuffers.tests;singleton:=true
Bundle-Version: 3.13.400.qualifier
Bundle-Version: 3.13.500.qualifier
Bundle-Activator: org.eclipse.core.filebuffers.tests.FileBuffersTestPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Plugin.providerName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008 Symbian Software Systems, IBM Corporation and others.
* Copyright (c) 2008, 2025 Symbian Software Systems, IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -44,32 +44,32 @@ public abstract class AbstractFileBufferDocCreationTests {

@Test
public void testCreateDocumentPartipants_FileExt() {
assertParticipantsInvoked("anything.111foo", new Class[] {TestDSP1.class, TestDSP3.class});
assertParticipantsInvoked("anything.111foo", TestDSP1.class, TestDSP3.class);
}

@Test
public void testCreateDocumentPartipants_Name() {
assertParticipantsInvoked("111fooname", new Class[] {TestDSP2.class, TestDSP3.class});
assertParticipantsInvoked("111fooname", TestDSP2.class, TestDSP3.class);
}

@Test
public void testCreateDocumentPartipants_FileExt_Name() {
assertParticipantsInvoked("111fooname.111foo", new Class[] {TestDSP1.class, TestDSP2.class, TestDSP3.class});
assertParticipantsInvoked("111fooname.111foo", TestDSP1.class, TestDSP2.class, TestDSP3.class);
}

@Test
public void testCreateDocumentPartipants_FileExt_Extension() {
assertParticipantsInvoked("anything.222foo", new Class[] {TestDSP4.class, TestDSP6.class});
assertParticipantsInvoked("anything.222foo", TestDSP4.class, TestDSP6.class);
}

@Test
public void testCreateDocumentPartipants_Name_Extension() {
assertParticipantsInvoked("222fooname", new Class[] {TestDSP5.class, TestDSP6.class});
assertParticipantsInvoked("222fooname", TestDSP5.class, TestDSP6.class);
}

@Test
public void testCreateDocumentPartipants_FileExt_Name_Extension() {
assertParticipantsInvoked("222fooname.222foo", new Class[] {TestDSP4.class, TestDSP5.class, TestDSP6.class});
assertParticipantsInvoked("222fooname.222foo", TestDSP4.class, TestDSP5.class, TestDSP6.class);
}

@Test
Expand Down Expand Up @@ -119,7 +119,7 @@ public void testDocumentSetupParticipantExtension_3() {

/* Utilities */

private void assertParticipantsInvoked(String path, Class<?>[] expectedDSPsArray) {
private void assertParticipantsInvoked(String path, Class<?>... expectedDSPsArray) {
LocationKind[] lks= getSupportLocationKinds();
for (LocationKind lk : lks) {
IDocument document= fManager.createEmptyDocument(IPath.fromOSString(path), lk);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 3034 IBM Corporation and others.
* Copyright (c) 2000, 2025 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -96,7 +96,7 @@ protected StructuredViewer createViewer(Composite parent) {
ViewerColumn getViewerColumn(ColumnViewer viewer, int index) {
Method method;
try {
method = ColumnViewer.class.getDeclaredMethod("getViewerColumn", new Class[] { int.class });
method = ColumnViewer.class.getDeclaredMethod("getViewerColumn", int.class);
method.setAccessible(true);
return (ViewerColumn) method.invoke(viewer, Integer.valueOf(index));
} catch (Exception e) {
Expand Down
Loading