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
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonN
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.notowning=org.eclipse.jdt.annotation.NotOwning
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.annotation.owning=org.eclipse.jdt.annotation.Owning
org.eclipse.jdt.core.compiler.annotation.resourceanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
Expand Down Expand Up @@ -50,17 +53,20 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
org.eclipse.jdt.core.compiler.problem.incompatibleOwningContract=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.insufficientResourceAnalysis=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.memberOfDeprecatedTypeNotDeprecated=info
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
Expand All @@ -69,7 +75,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
Expand All @@ -88,10 +94,10 @@ org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariable
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
Expand All @@ -106,7 +112,7 @@ org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
Expand All @@ -125,6 +131,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverridin
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLambdaParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2007 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 @@ -30,10 +30,11 @@ public abstract class AbstractMatching {
protected static final int NO_ENTRY = -1;//value with which fDT elements are initialized
protected static final String SIGN_ELEMENT= XMLStructureCreator.SIGN_ELEMENT;
int[][] fDT;//Distance Table; 1st index from fNLeft, 2nd index from fNRight
ArrayList[][] fDT_Matchings;//Mathing entries of children for a match. 1st index from fNLeft, 2nd index from fNRight
Vector fNLeft;
Vector fNRight;
Vector fMatches;
ArrayList<Match>[][] fDT_Matchings;// Mathing entries of children for a match. 1st index from fNLeft, 2nd index
// from fNRight
Vector<XMLNode> fNLeft;
Vector<XMLNode> fNRight;
Vector<Match> fMatches;

/* methods used for match */

Expand Down Expand Up @@ -97,7 +98,7 @@ protected int indexOfRN (XMLNode y) {
}

/* for testing */
public Vector getMatches() {
public Vector<Match> getMatches() {
return fMatches;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2005 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 All @@ -13,12 +13,18 @@
*******************************************************************************/
package org.eclipse.compare.examples.xml;

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Set;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IMenuCreator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.*;

import org.eclipse.jface.action.*;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;


/**
Expand Down Expand Up @@ -53,14 +59,13 @@ public Menu getMenu(Control parent) {
addActionToMenu(menu, new SelectMatcherAction(XMLStructureCreator.USE_UNORDERED, fViewer));
addActionToMenu(menu, new SelectMatcherAction(XMLStructureCreator.USE_ORDERED, fViewer));
new MenuItem(menu, SWT.SEPARATOR);
HashMap IdMaps = plugin.getIdMaps();
HashMap IdMapsInternal = plugin.getIdMapsInternal();
HashMap<String, HashMap<String, String>> IdMaps = plugin.getIdMaps();
HashMap<String, HashMap<String, String>> IdMapsInternal = plugin.getIdMapsInternal();

Set keySetIdMaps = IdMaps.keySet();
Set keySetIdMapsInternal = IdMapsInternal.keySet();
Set<String> keySetIdMaps = IdMaps.keySet();
Set<String> keySetIdMapsInternal = IdMapsInternal.keySet();
ArrayList<String> internalIdMapsAL= new ArrayList<>();
for (Iterator iter_internal = keySetIdMapsInternal.iterator(); iter_internal.hasNext(); ) {
String idmap_name = (String)iter_internal.next();
for (String idmap_name : keySetIdMapsInternal) {
internalIdMapsAL.add(idmap_name);
}
Object[] internalIdMapsA= internalIdMapsAL.toArray();
Expand All @@ -71,15 +76,13 @@ public Menu getMenu(Control parent) {
new MenuItem(menu, SWT.SEPARATOR);

ArrayList<String> userIdMapsAL= new ArrayList<>();
for (Iterator iter_idmaps = keySetIdMaps.iterator(); iter_idmaps.hasNext(); ) {
String idmap_name = (String)iter_idmaps.next();
for (String idmap_name : keySetIdMaps) {
userIdMapsAL.add(idmap_name);
}

HashMap OrderedElements= plugin.getOrderedElements();
Set keySetOrdered= OrderedElements.keySet();
for (Iterator iter_orderedElements= keySetOrdered.iterator(); iter_orderedElements.hasNext();) {
String idmap_name= (String) iter_orderedElements.next();
HashMap<String, ArrayList<String>> OrderedElements = plugin.getOrderedElements();
Set<String> keySetOrdered = OrderedElements.keySet();
for (String idmap_name : keySetOrdered) {
if (!keySetIdMaps.contains(idmap_name)) {
userIdMapsAL.add(idmap_name);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2005 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 All @@ -13,7 +13,8 @@
*******************************************************************************/
package org.eclipse.compare.examples.xml;

import java.util.*;
import java.util.HashMap;
import java.util.Set;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.window.Window;
Expand All @@ -23,9 +24,9 @@
*/
public class CreateNewIdMapAction extends Action {

private HashMap fIdMaps;// HashMap ( idname -> HashMap (signature -> id) )
private HashMap fIdMapsInternal;
private HashMap fIdExtensionToName;
private HashMap<String, HashMap<String, String>> fIdMaps;// HashMap ( idname -> HashMap (signature -> id) )
private HashMap<String, HashMap<String, String>> fIdMapsInternal;
private HashMap<String, String> fIdExtensionToName;

public CreateNewIdMapAction(XMLStructureViewer viewer) {
setImageDescriptor(XMLPlugin.getDefault().getImageDescriptor("obj16/addidmap.gif")); //$NON-NLS-1$
Expand All @@ -37,27 +38,25 @@ public void run() {
XMLPlugin plugin= XMLPlugin.getDefault();
fIdMapsInternal= plugin.getIdMapsInternal();//fIdMapsInternal is only read, not modified

fIdMaps = new HashMap();
HashMap PluginIdMaps = plugin.getIdMaps();
Set keySet = PluginIdMaps.keySet();
for (Iterator iter = keySet.iterator(); iter.hasNext(); ) {
String key = (String) iter.next();
fIdMaps.put(key, ((HashMap)PluginIdMaps.get(key)).clone());
fIdMaps = new HashMap<>();
HashMap<String, HashMap<String, String>> PluginIdMaps = plugin.getIdMaps();
Set<String> keySet = PluginIdMaps.keySet();
for (String key : keySet) {
fIdMaps.put(key, new HashMap<>(PluginIdMaps.get(key)));
}

fIdExtensionToName= new HashMap();
HashMap PluginIdExtensionToName= plugin.getIdExtensionToName();
fIdExtensionToName = new HashMap<>();
HashMap<String, String> PluginIdExtensionToName = plugin.getIdExtensionToName();
keySet= PluginIdExtensionToName.keySet();
for (Iterator iter= keySet.iterator(); iter.hasNext(); ) {
String key= (String) iter.next();
for (String key : keySet) {
fIdExtensionToName.put(key, PluginIdExtensionToName.get(key));
}

IdMap idmap = new IdMap(false);
XMLCompareAddIdMapDialog dialog= new XMLCompareAddIdMapDialog(XMLPlugin.getActiveWorkbenchShell(),idmap,fIdMaps,fIdMapsInternal,fIdExtensionToName,false);
if (dialog.open() == Window.OK) {
if (!fIdMaps.containsKey(idmap.getName())) {
fIdMaps.put(idmap.getName(),new HashMap());
fIdMaps.put(idmap.getName(), new HashMap<>());
if (!idmap.getExtension().isEmpty())
fIdExtensionToName.put(idmap.getExtension(),idmap.getName());
XMLPlugin.getDefault().setIdMaps(fIdMaps,fIdExtensionToName,null,false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2005 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 All @@ -22,9 +22,10 @@ public class IdMap {

private String fName;
private boolean fInternal;
private Vector fMappings;
private Vector<Mapping> fMappings;
private String fExtension;
private ArrayList fOrdered;//contains Mapping elements for list of ordered entries (the children of these elements will be compared in ordered fashion)
private ArrayList<Mapping> fOrdered;// contains Mapping elements for list of ordered entries (the children of these
// elements will be compared in ordered fashion)

/**
* Creates an IdMap which represents an Id Mapping Scheme
Expand All @@ -40,7 +41,7 @@ public IdMap(boolean internal) {
* @param internal true if the IdMap is internal
*/
public IdMap(String name, boolean internal) {
this(name, internal, new Vector());
this(name, internal, new Vector<>());
}

/**
Expand All @@ -49,7 +50,7 @@ public IdMap(String name, boolean internal) {
* @param internal true if the IdMap is internal
* @param mappings Vector of Mapping elements which represent the id mappings of this id mapping scheme
*/
public IdMap(String name, boolean internal, Vector mappings) {
public IdMap(String name, boolean internal, Vector<Mapping> mappings) {
this(name, internal, mappings, ""); //$NON-NLS-1$
}

Expand All @@ -60,7 +61,7 @@ public IdMap(String name, boolean internal, Vector mappings) {
* @param mappings Vector of Mapping elements which represent the id mappings of this id mapping scheme.
* @param extension Optional extension to be associated with this id mapping scheme.
*/
public IdMap(String name, boolean internal, Vector mappings, String extension) {
public IdMap(String name, boolean internal, Vector<Mapping> mappings, String extension) {
this(name, internal, mappings, extension, null);
}

Expand All @@ -72,7 +73,8 @@ public IdMap(String name, boolean internal, Vector mappings, String extension) {
* @param extension Optional extension to be associated with this id mapping scheme.
* @param ordered Optional ArrayList of Mapping elements representing ordered entries.
*/
public IdMap(String name, boolean internal, Vector mappings, String extension, ArrayList ordered) {
public IdMap(String name, boolean internal, Vector<Mapping> mappings, String extension,
ArrayList<Mapping> ordered) {
fName = name;
fInternal = internal;
fMappings = mappings;
Expand Down Expand Up @@ -108,11 +110,11 @@ public String getName() {
return fName;
}

public void setMappings(Vector mappings) {
public void setMappings(Vector<Mapping> mappings) {
fMappings = mappings;
}

public Vector getMappings() {
public Vector<Mapping> getMappings() {
return fMappings;
}

Expand All @@ -131,10 +133,12 @@ public void setExtension(String extension) {
public String getExtension() {
return fExtension;
}
public void setOrdered(ArrayList ordered) {

public void setOrdered(ArrayList<Mapping> ordered) {
fOrdered= ordered;
}
public ArrayList getOrdered() {

public ArrayList<Mapping> getOrdered() {
return fOrdered;
}

Expand Down
Loading
Loading