{ - - public final P first; - public final K second; - - private Pair (P first, K second) { - this.first = first; - this.second = second; - } - - - public static
Pair
of (P first, K second) { - return new Pair
(first,second);
- }
-
-
- @Override
- public int hashCode () {
- int hashCode = 0;
- hashCode ^= first == null ? 0 : first.hashCode();
- hashCode ^= second == null ? 0: second.hashCode();
- return hashCode;
- }
-
- @Override
- public boolean equals (final Object other) {
- if (other instanceof Pair) {
- Pair,?> otherPair = (Pair,?>) other;
- return (this.first == null ? otherPair.first == null : this.first.equals(otherPair.first)) &&
- (this.second == null ? otherPair.second == null : this.second.equals(otherPair.second));
- }
- return false;
- }
-
- @Override
- public String toString () {
- return String.format("Pair[%s,%s]", first,second);
- }
-}
diff --git a/java.j2seprofiles/src/org/netbeans/modules/java/j2seprofiles/ProfilesAnalyzer.java b/java.j2seprofiles/src/org/netbeans/modules/java/j2seprofiles/ProfilesAnalyzer.java
--- a/java.j2seprofiles/src/org/netbeans/modules/java/j2seprofiles/ProfilesAnalyzer.java
+++ b/java.j2seprofiles/src/org/netbeans/modules/java/j2seprofiles/ProfilesAnalyzer.java
@@ -107,6 +107,7 @@
import org.openide.filesystems.FileUtil;
import org.openide.filesystems.URLMapper;
import org.openide.util.Exceptions;
+import org.openide.util.Pair;
import org.openide.util.lookup.ServiceProvider;
/**
@@ -188,7 +189,7 @@
filterForRoot = Pair.
{ - - public final P first; - public final K second; - - private Pair (P first, K second) { - this.first = first; - this.second = second; - } - - - public static
Pair
of (P first, K second) { - return new Pair
(first,second);
- }
-
-
- @Override
- public int hashCode () {
- int hashCode = 0;
- hashCode ^= first == null ? 0 : first.hashCode();
- hashCode ^= second == null ? 0: second.hashCode();
- return hashCode;
- }
-
- @Override
- public boolean equals (final Object other) {
- if (other instanceof Pair) {
- Pair otherPair = (Pair) other;
- return (this.first == null ? otherPair.first == null : this.first.equals(otherPair.first)) &&
- (this.second == null ? otherPair.second == null : this.second.equals(otherPair.second));
- }
- return false;
- }
-
- @Override
- public String toString () {
- return String.format("Pair[%s,%s]", first,second);
- }
-}
diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/base/Resolvers.java b/java.navigation/src/org/netbeans/modules/java/navigation/base/Resolvers.java
--- a/java.navigation/src/org/netbeans/modules/java/navigation/base/Resolvers.java
+++ b/java.navigation/src/org/netbeans/modules/java/navigation/base/Resolvers.java
@@ -63,6 +63,7 @@
import org.netbeans.api.java.source.JavaSource;
import org.netbeans.api.java.source.Task;
import org.openide.filesystems.FileObject;
+import org.openide.util.Pair;
import org.openide.util.Parameters;
/**
diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/base/SelectJavadocTask.java b/java.navigation/src/org/netbeans/modules/java/navigation/base/SelectJavadocTask.java
--- a/java.navigation/src/org/netbeans/modules/java/navigation/base/SelectJavadocTask.java
+++ b/java.navigation/src/org/netbeans/modules/java/navigation/base/SelectJavadocTask.java
@@ -58,6 +58,7 @@
import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
+import org.openide.util.Pair;
import org.openide.util.Parameters;
/**
@@ -90,7 +91,7 @@
final JavadocTopComponent tc = JavadocTopComponent.findInstance();
if (tc != null) {
tc.open();
- tc.setJavadoc(documentation.first,documentation.second);
+ tc.setJavadoc(documentation.first(),documentation.second());
}
}
});
diff --git a/java.navigation/src/org/netbeans/modules/java/navigation/hierarchy/HierarchyTopComponent.java b/java.navigation/src/org/netbeans/modules/java/navigation/hierarchy/HierarchyTopComponent.java
--- a/java.navigation/src/org/netbeans/modules/java/navigation/hierarchy/HierarchyTopComponent.java
+++ b/java.navigation/src/org/netbeans/modules/java/navigation/hierarchy/HierarchyTopComponent.java
@@ -95,7 +95,6 @@
import org.netbeans.modules.java.navigation.JavadocTopComponent;
import org.netbeans.modules.java.navigation.NoBorderToolBar;
import org.netbeans.modules.java.navigation.base.HistorySupport;
-import org.netbeans.modules.java.navigation.base.Pair;
import org.netbeans.modules.java.navigation.base.Resolvers;
import org.netbeans.modules.java.navigation.base.SelectJavadocTask;
import org.netbeans.modules.java.navigation.base.TapPanel;
@@ -116,6 +115,7 @@
import org.openide.util.NbPreferences;
import org.openide.windows.TopComponent;
import org.openide.util.NbBundle.Messages;
+import org.openide.util.Pair;
import org.openide.util.RequestProcessor;
import org.openide.util.lookup.AbstractLookup;
import org.openide.util.lookup.InstanceContent;
@@ -530,20 +530,20 @@
final Pair
{ - - public final P first; - public final K second; - - private Pair (P first, K second) { - this.first = first; - this.second = second; - } - - - public static
Pair
of (P first, K second) { - return new Pair
(first,second);
- }
-
-
- @Override
- public int hashCode () {
- int hashCode = 0;
- hashCode ^= first == null ? 0 : first.hashCode();
- hashCode ^= second == null ? 0: second.hashCode();
- return hashCode;
- }
-
- @Override
- public boolean equals (final Object other) {
- if (other instanceof Pair) {
- Pair otherPair = (Pair) other;
- return (this.first == null ? otherPair.first == null : this.first.equals(otherPair.first)) &&
- (this.second == null ? otherPair.second == null : this.second.equals(otherPair.second));
- }
- return false;
- }
-
- @Override
- public String toString () {
- return String.format("Pair[%s,%s]", first,second);
- }
-}
diff --git a/java.source/src/org/netbeans/modules/java/source/usages/PersistentClassIndex.java b/java.source/src/org/netbeans/modules/java/source/usages/PersistentClassIndex.java
--- a/java.source/src/org/netbeans/modules/java/source/usages/PersistentClassIndex.java
+++ b/java.source/src/org/netbeans/modules/java/source/usages/PersistentClassIndex.java
@@ -79,6 +79,7 @@
import org.openide.filesystems.FileUtil;
import org.openide.filesystems.URLMapper;
import org.openide.util.Exceptions;
+import org.openide.util.Pair;
import org.openide.util.Parameters;
/**
@@ -213,9 +214,9 @@
QueryUtil.createPackageUsagesQuery(binaryName,usageType,Occur.SHOULD),
scope);
if (q!=null) {
- index.query(result, ctu.first, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), q);
- if (ctu.second != null) {
- ctu.second.query(result, convertor, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), q);
+ index.query(result, ctu.first(), DocumentUtil.declaredTypesFieldSelector(), cancel.get(), q);
+ if (ctu.second() != null) {
+ ctu.second().query(result, convertor, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), q);
}
}
return null;
@@ -239,9 +240,9 @@
QueryUtil.createUsagesQuery(binaryName, usageType, Occur.SHOULD),
scope);
if (usagesQuery != null) {
- index.query(result, ctu.first, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), usagesQuery);
- if (ctu.second != null) {
- ctu.second.query(result, convertor, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), usagesQuery);
+ index.query(result, ctu.first(), DocumentUtil.declaredTypesFieldSelector(), cancel.get(), usagesQuery);
+ if (ctu.second() != null) {
+ ctu.second().query(result, convertor, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), usagesQuery);
}
}
return null;
@@ -277,9 +278,9 @@
DocumentUtil.translateQueryKind(kind)),
scope);
if (query != null) {
- index.query(result, ctu.first, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), query);
- if (ctu.second != null) {
- ctu.second.query(result, convertor, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), query);
+ index.query(result, ctu.first(), DocumentUtil.declaredTypesFieldSelector(), cancel.get(), query);
+ if (ctu.second() != null) {
+ ctu.second().query(result, convertor, DocumentUtil.declaredTypesFieldSelector(), cancel.get(), query);
}
}
return null;
@@ -315,13 +316,13 @@
};
index.queryDocTerms(
result,
- ctu.first,
+ ctu.first(),
t2s,
DocumentUtil.declaredTypesFieldSelector(),
cancel.get(),
query);
- if (ctu.second != null) {
- ctu.second.queryDocTerms(
+ if (ctu.second() != null) {
+ ctu.second().queryDocTerms(
result,
convertor,
t2s,
@@ -360,7 +361,7 @@
collectInto = result;
}
final Pair
"); //NOI18N
Type exType = throwsTag.exceptionType();
if (exType != null) {
- createLink(thr, ctx.second.elementFor(exType.asClassDoc()), exType.simpleTypeName());
+ createLink(thr, ctx.second().elementFor(exType.asClassDoc()), exType.simpleTypeName());
} else {
thr.append(throwsTag.exceptionName());
}
@@ -1090,7 +1090,7 @@
String label = stag.label();
if (memberName != null) {
if (refClass != null) {
- createLink(see, ctx.second.elementFor(stag.referencedMember()), "" + (label != null && label.length() > 0 ? label : (refClass.simpleTypeName() + "." + memberName)) + "
"); //NOI18N
+ createLink(see, ctx.second().elementFor(stag.referencedMember()), "" + (label != null && label.length() > 0 ? label : (refClass.simpleTypeName() + "." + memberName)) + "
"); //NOI18N
} else {
see.append(className);
see.append('.'); //NOI18N
@@ -1099,9 +1099,9 @@
see.append(", "); //NOI18N
} else if (className != null) {
if (refClass != null) {
- createLink(see, ctx.second.elementFor(refClass), "" + (label != null && label.length() > 0 ? label : refClass.simpleTypeName()) + "
"); //NOI18N
+ createLink(see, ctx.second().elementFor(refClass), "" + (label != null && label.length() > 0 ? label : refClass.simpleTypeName()) + "
"); //NOI18N
} else if (refPackage != null) {
- createLink(see, ctx.second.elementFor(refPackage), "" + (label != null && label.length() > 0 ? label : refPackage.name()) + "
"); //NOI18N
+ createLink(see, ctx.second().elementFor(refPackage), "" + (label != null && label.length() > 0 ? label : refPackage.name()) + "
"); //NOI18N
} else {
see.append(className);
}
@@ -1159,7 +1159,7 @@
thr.append(""); //NOI18N
Type exType = ((ThrowsTag)tag).exceptionType();
if (exType != null)
- createLink(thr, ctx.second.elementFor(exType.asClassDoc()), exType.simpleTypeName());
+ createLink(thr, ctx.second().elementFor(exType.asClassDoc()), exType.simpleTypeName());
else
thr.append(((ThrowsTag)tag).exceptionName());
thr.append("
"); //NOI18N
@@ -1181,7 +1181,7 @@
String label = stag.label();
if (memberName != null) {
if (refClass != null) {
- createLink(see, ctx.second.elementFor(stag.referencedMember()), "" + (label != null && label.length() > 0 ? label : (refClass.simpleTypeName() + "." + memberName)) + "
"); //NOI18N
+ createLink(see, ctx.second().elementFor(stag.referencedMember()), "" + (label != null && label.length() > 0 ? label : (refClass.simpleTypeName() + "." + memberName)) + "
"); //NOI18N
} else {
see.append(className);
see.append('.'); //NOI18N
@@ -1190,9 +1190,9 @@
see.append(", "); //NOI18N
} else if (className != null) {
if (refClass != null) {
- createLink(see, ctx.second.elementFor(refClass), "" + (label != null && label.length() > 0 ? label : refClass.simpleTypeName()) + "
"); //NOI18N
+ createLink(see, ctx.second().elementFor(refClass), "" + (label != null && label.length() > 0 ? label : refClass.simpleTypeName()) + "
"); //NOI18N
} else if (refPackage != null) {
- createLink(see, ctx.second.elementFor(refPackage), "" + (label != null && label.length() > 0 ? label : refPackage.name()) + "
"); //NOI18N
+ createLink(see, ctx.second().elementFor(refPackage), "" + (label != null && label.length() > 0 ? label : refPackage.name()) + "
"); //NOI18N
} else {
see.append(className);
}
@@ -1262,7 +1262,7 @@
boolean plain = LINKPLAIN_TAG.equals(stag.name());
if (memberName != null) {
if (refClass != null) {
- createLink(sb, ctx.second.elementFor(stag.referencedMember()), (plain ? "" : "") + (label != null && label.length() > 0 ? label : (refClass.simpleTypeName() + "." + memberName)) + (plain ? "" : "
")); //NOI18N
+ createLink(sb, ctx.second().elementFor(stag.referencedMember()), (plain ? "" : "") + (label != null && label.length() > 0 ? label : (refClass.simpleTypeName() + "." + memberName)) + (plain ? "" : "
")); //NOI18N
} else {
sb.append(stag.referencedClassName());
sb.append('.'); //NOI18N
@@ -1270,9 +1270,9 @@
}
} else {
if (refClass != null) {
- createLink(sb, ctx.second.elementFor(refClass), (plain ? "" : "") + (label != null && label.length() > 0 ? label : refClass.simpleTypeName()) + (plain ? "" : "
")); //NOI18N
+ createLink(sb, ctx.second().elementFor(refClass), (plain ? "" : "") + (label != null && label.length() > 0 ? label : refClass.simpleTypeName()) + (plain ? "" : "
")); //NOI18N
} else if (refPackage != null) {
- createLink(sb, ctx.second.elementFor(refPackage), (plain ? "" : "") + (label != null && label.length() > 0 ? label : refPackage.name()) + (plain ? "" : "
")); //NOI18N
+ createLink(sb, ctx.second().elementFor(refPackage), (plain ? "" : "") + (label != null && label.length() > 0 ? label : refPackage.name()) + (plain ? "" : "
")); //NOI18N
} else {
String className = stag.referencedClassName();
sb.append(className != null ? className : stag.text());
@@ -1383,7 +1383,7 @@
String tName = cd != null ? cd.name() : type.simpleTypeName();
if (cd != null && cd.isAnnotationType() && annotation)
tName = "@" + tName; //NOI18N
- len += createLink(sb, ctx.second.elementFor(type.asClassDoc()), tName);
+ len += createLink(sb, ctx.second().elementFor(type.asClassDoc()), tName);
ParameterizedType pt = type.asParameterizedType();
if (pt != null) {
Type[] targs = pt.typeArguments();
@@ -1433,7 +1433,7 @@
for (ClassDoc ifaceDoc : cdoc.interfaces()) {
for (MethodDoc methodDoc : ifaceDoc.methods(false)) {
if (mdoc.overrides(methodDoc)) {
- Element e = ctx.second.elementFor(methodDoc);
+ Element e = ctx.second().elementFor(methodDoc);
boolean isLocalized = false;
if (e != null) {
inheritedPage = JavadocHelper.getJavadoc(e, cancel);
@@ -1441,7 +1441,7 @@
docURL = inheritedPage.getLocation();
}
if (!(isLocalized = isLocalized(docURL, e)))
- ctx.first.getTree(e);
+ ctx.first().getTree(e);
}
if (!isLocalized) {
List inheritedInlineTags = null;
@@ -1606,7 +1606,7 @@
if (superclass != null) { //NOI18N
for (MethodDoc methodDoc : superclass.methods(false)) {
if (mdoc.overrides(methodDoc)) {
- Element e = ctx.second.elementFor(methodDoc);
+ Element e = ctx.second().elementFor(methodDoc);
boolean isLocalized = false;
if (e != null) {
inheritedPage = JavadocHelper.getJavadoc(e, cancel);
@@ -1614,7 +1614,7 @@
docURL = inheritedPage.getLocation();
}
if (!(isLocalized = isLocalized(docURL, e)))
- ctx.first.getTree(e);
+ ctx.first().getTree(e);
}
if (!isLocalized) {
List inheritedInlineTags = null;
diff --git a/javascript.editing/nbproject/project.xml b/javascript.editing/nbproject/project.xml
--- a/javascript.editing/nbproject/project.xml
+++ b/javascript.editing/nbproject/project.xml
@@ -262,7 +262,7 @@
- 8.0
+ 8.32
+ Added a type safe Pair of 2 elements. +
+{ - - public final P first; - public final K second; - - private Pair (P first, K second) { - this.first = first; - this.second = second; - } - - - public static
Pair
of (P first, K second) { - return new Pair
(first,second);
- }
-
-
- @Override
- public int hashCode () {
- int hashCode = 0;
- hashCode ^= first == null ? 0 : first.hashCode();
- hashCode ^= second == null ? 0: second.hashCode();
- return hashCode;
- }
-
- @Override
- public boolean equals (final Object other) {
- if (other instanceof Pair) {
- Pair otherPair = (Pair) other;
- return (this.first == null ? otherPair.first == null : this.first.equals(otherPair.first)) &&
- (this.second == null ? otherPair.second == null : this.second.equals(otherPair.second));
- }
- return false;
- }
-
- @Override
- public String toString () {
- return String.format("Pair[%s,%s]", first,second);
- }
-}
diff --git a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java
--- a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java
+++ b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/RepositoryUpdater.java
@@ -126,6 +126,7 @@
import org.openide.util.Lookup;
import org.openide.util.Mutex.ExceptionAction;
import org.openide.util.NbBundle;
+import org.openide.util.Pair;
import org.openide.util.Parameters;
import org.openide.util.RequestProcessor;
import org.openide.util.TopologicalSortException;
@@ -626,20 +627,20 @@
if (fo != null && fo.isValid()) {
if (source == null || source.booleanValue()) {
root = getOwningSourceRoot(fo);
- if (root != null && visibilitySupport.isVisible(fo, root.second)) {
- if (root.second == null) {
+ if (root != null && visibilitySupport.isVisible(fo, root.second())) {
+ if (root.second() == null) {
LOGGER.log(
Level.INFO,
"Ignoring event from non existing FileObject {0}", //NOI18N
- root.first);
+ root.first());
return;
}
- boolean sourcForBinaryRoot = sourcesForBinaryRoots.contains(root.first);
- ClassPath.Entry entry = sourcForBinaryRoot ? null : getClassPathEntry(root.second);
+ boolean sourcForBinaryRoot = sourcesForBinaryRoots.contains(root.first());
+ ClassPath.Entry entry = sourcForBinaryRoot ? null : getClassPathEntry(root.second());
if (entry == null || entry.includes(fo)) {
Work wrk;
- if (fo.equals(root.second)) {
- if (scannedRoots2Dependencies.get(root.first) == EMPTY_DEPS) {
+ if (fo.equals(root.second())) {
+ if (scannedRoots2Dependencies.get(root.first()) == EMPTY_DEPS) {
//For first time seeing valid root do roots work to recalculate dependencies
wrk = new RootsWork(
scannedRoots2Dependencies,
@@ -649,7 +650,7 @@
false,
scannedRoots2DependenciesLamport,
suspendSupport.getSuspendStatus(),
- LogContext.create(LogContext.EventType.FILE, null).addRoots(Collections.singleton(root.first)));
+ LogContext.create(LogContext.EventType.FILE, null).addRoots(Collections.singleton(root.first())));
} else {
//Already seen files work is enough
final FileObject[] children = fo.getChildren();
@@ -657,7 +658,7 @@
if (children.length > 0) {
wrk = new FileListWork(
scannedRoots2Dependencies,
- root.first,
+ root.first(),
c,
false,
false,
@@ -666,7 +667,7 @@
true,
suspendSupport.getSuspendStatus(),
LogContext.create(LogContext.EventType.FILE, null).
- withRoot(root.first).
+ withRoot(root.first()).
addFileObjects(c));
} else {
//If no children nothing needs to be done - save some CPU time
@@ -677,7 +678,7 @@
Collection
{ - - public final P first; - public final K second; - - private Pair(P first, K second) { - this.first = first; - this.second = second; - } - - public static
Pair
of(P first, K second) { - return new Pair
(first, second);
- }
-
- @Override
- public int hashCode() {
- int hashCode = 0;
- hashCode ^= first == null ? 0 : first.hashCode();
- hashCode ^= second == null ? 0 : second.hashCode();
- return hashCode;
- }
-
- @Override
- public boolean equals(final Object other) {
- if (other instanceof Pair) {
- Pair, ?> otherPair = (Pair) other;
- return (this.first == null ? otherPair.first == null : this.first.equals(otherPair.first))
- && (this.second == null ? otherPair.second == null : this.second.equals(otherPair.second));
- }
- return false;
- }
-
- @Override
- public String toString() {
- return String.format("Pair [%s, %s]", first, second); // NOI18N
- }
-}
diff --git a/php.dbgp/manifest.mf b/php.dbgp/manifest.mf
--- a/php.dbgp/manifest.mf
+++ b/php.dbgp/manifest.mf
@@ -3,5 +3,5 @@
OpenIDE-Module: org.netbeans.modules.php.dbgp
OpenIDE-Module-Layer: org/netbeans/modules/php/dbgp/resources/layer.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/php/dbgp/resources/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.29
+OpenIDE-Module-Specification-Version: 1.30
diff --git a/php.dbgp/nbproject/project.xml b/php.dbgp/nbproject/project.xml
--- a/php.dbgp/nbproject/project.xml
+++ b/php.dbgp/nbproject/project.xml
@@ -74,7 +74,7 @@
{ - - public final P first; - public final K second; - - private Pair (P first, K second) { - this.first = first; - this.second = second; - } - - - public static
Pair
of (P first, K second) { - return new Pair
(first,second);
- }
-
-
- @Override
- public int hashCode () {
- int hashCode = 0;
- hashCode ^= first == null ? 0 : first.hashCode();
- hashCode ^= second == null ? 0: second.hashCode();
- return hashCode;
- }
-
- @Override
- public boolean equals (final Object other) {
- if (other instanceof Pair) {
- Pair otherPair = (Pair) other;
- return (this.first == null ? otherPair.first == null : this.first.equals(otherPair.first)) &&
- (this.second == null ? otherPair.second == null : this.second.equals(otherPair.second));
- }
- return false;
- }
-
- @Override
- public String toString () {
- return String.format("Pair[%s,%s]", first,second);
- }
-}
diff --git a/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/InlineMethodTransformer.java b/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/InlineMethodTransformer.java
--- a/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/InlineMethodTransformer.java
+++ b/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/InlineMethodTransformer.java
@@ -77,12 +77,12 @@
import org.netbeans.api.java.source.GeneratorUtilities;
import org.netbeans.api.java.source.TreePathHandle;
import org.netbeans.modules.refactoring.api.Problem;
-import org.netbeans.modules.refactoring.java.Pair;
import org.netbeans.modules.refactoring.java.RefactoringUtils;
import org.netbeans.modules.refactoring.java.api.JavaRefactoringUtils;
import org.netbeans.modules.refactoring.java.spi.RefactoringVisitor;
import org.openide.filesystems.FileUtil;
import org.openide.util.NbBundle;
+import org.openide.util.Pair;
/**
*
@@ -476,8 +476,8 @@
if(path != null) {
el = trees.getElement(path);
}
- if (p.first.equals(el)) {
- original2TranslatedBody.put(node, make.setLabel(node, p.second));
+ if (p.first().equals(el)) {
+ original2TranslatedBody.put(node, make.setLabel(node, p.second()));
}
return super.visitIdentifier(node, p);
}
@@ -513,8 +513,8 @@
if(currentPath != null) {
el = trees.getElement(currentPath);
}
- if (p.first.equals(el)) {
- original2TranslatedBody.put(node, p.second);
+ if (p.first().equals(el)) {
+ original2TranslatedBody.put(node, p.second());
}
return super.visitIdentifier(node, p);
}
diff --git a/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/MoveMembersTransformer.java b/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/MoveMembersTransformer.java
--- a/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/MoveMembersTransformer.java
+++ b/refactoring.java/src/org/netbeans/modules/refactoring/java/plugins/MoveMembersTransformer.java
@@ -59,7 +59,6 @@
import org.netbeans.api.java.source.*;
import org.netbeans.modules.refactoring.api.MoveRefactoring;
import org.netbeans.modules.refactoring.api.Problem;
-import org.netbeans.modules.refactoring.java.Pair;
import org.netbeans.modules.refactoring.java.RefactoringUtils;
import org.netbeans.modules.refactoring.java.api.JavaMoveMembersProperties;
import org.netbeans.modules.refactoring.java.api.JavaMoveMembersProperties.Visibility;
@@ -68,6 +67,7 @@
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;
import org.openide.util.NbBundle;
+import org.openide.util.Pair;
/**
*
@@ -648,8 +648,8 @@
public Void visitIdentifier(IdentifierTree node, Pair
{ - - public final P first; - public final K second; - - private Pair(P first, K second) { - this.first = first; - this.second = second; - } - - public static
Pair
of(P first, K second) { - return new Pair
(first, second); - } - - @Override - public boolean equals(Object obj) { - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - final Pair
other = (Pair
) obj;
- if (this.first != other.first && (this.first == null || !this.first.equals(other.first))) {
- return false;
- }
- if (this.second != other.second && (this.second == null || !this.second.equals(other.second))) {
- return false;
- }
- return true;
- }
-
- @Override
- public int hashCode() {
- int hash = 7;
- hash = 83 * hash + (this.first != null ? this.first.hashCode() : 0);
- hash = 83 * hash + (this.second != null ? this.second.hashCode() : 0);
- return hash;
- }
-
- @Override
- public String toString() {
- return "Pair{" + "first=" + first + "second=" + second + '}';
- }
-
-}
diff --git a/web.el/src/org/netbeans/modules/web/el/ResourceBundles.java b/web.el/src/org/netbeans/modules/web/el/ResourceBundles.java
--- a/web.el/src/org/netbeans/modules/web/el/ResourceBundles.java
+++ b/web.el/src/org/netbeans/modules/web/el/ResourceBundles.java
@@ -61,6 +61,7 @@
import org.netbeans.modules.web.el.spi.ResourceBundle;
import org.netbeans.spi.java.classpath.ClassPathProvider;
import org.openide.filesystems.*;
+import org.openide.util.Pair;
import org.openide.util.Parameters;
import org.openide.util.WeakListeners;
diff --git a/web.el/src/org/netbeans/modules/web/el/completion/ELSanitizer.java b/web.el/src/org/netbeans/modules/web/el/completion/ELSanitizer.java
--- a/web.el/src/org/netbeans/modules/web/el/completion/ELSanitizer.java
+++ b/web.el/src/org/netbeans/modules/web/el/completion/ELSanitizer.java
@@ -49,7 +49,7 @@
import org.netbeans.modules.web.el.ELElement;
import org.netbeans.modules.web.el.ELParser;
import org.netbeans.modules.web.el.ELPreprocessor;
-import org.netbeans.modules.web.el.Pair;
+import org.openide.util.Pair;
/**
* Attempts to sanitize EL statements. Check the unit test
@@ -146,9 +146,9 @@
}
// special handling for brackets
for (Pair