File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/xpath
tests/org.eclipse.e4.emf.xpath.test/src/org/eclipse/e4/emf/xpath/test Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1414package org .eclipse .e4 .emf .xpath ;
1515
1616import org .eclipse .e4 .emf .internal .xpath .JXPathContextFactoryImpl ;
17+ import org .eclipse .emf .ecore .EObject ;
1718
1819/**
1920 * Factory responsible to create an XPath-Context
@@ -38,13 +39,20 @@ public abstract class XPathContextFactory<T> {
3839 * @param parentContext parent context
3940 * @param contextBean Object
4041 * @return XPathContext
42+ * @deprecated The parent-context does not provide any real value. Just use
43+ * {@link #newContext(Object)}
4144 */
45+ @ Deprecated (forRemoval = true , since = "2025-03 (removal in 2027-03 or later)" )
4246 public abstract XPathContext newContext (XPathContext parentContext , T contextBean );
4347
4448 /**
4549 * @param <T> the object type the xpath is created for
4650 * @return Create a new XPath-Factory
51+ * @deprecated The implementation returned by this method just supports
52+ * {@link EObject} elements. Use a specializd factory instead like
53+ * {@link EcoreXPathContextFactory}.
4754 */
55+ @ Deprecated (forRemoval = true , since = "2025-03 (removal in 2027-03 or later)" )
4856 public static <T > XPathContextFactory <T > newInstance () {
4957 return new JXPathContextFactoryImpl <>();
5058 }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ public void setUp() {
7373 xpathContext = f .newContext (resource .getContents ().get (0 ));
7474 URI childUri = URI .createPlatformPluginURI ("/org.eclipse.e4.emf.xpath.test/model/fragment.e4xmi" , true );
7575 childResource = resourceSet .getResource (childUri , true );
76- xpathChildContext = f .newContext (xpathContext , childResource .getContents ().get (0 ));
76+ xpathChildContext = f .newContext (childResource .getContents ().get (0 ));
7777 }
7878
7979 @ After
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ public void testRelative() {
131131 EObject context = resource .getContents ().get (0 );
132132 List <EObject > eContents = context .eContents ();
133133 EObject firstElement = eContents .get (0 );
134- XPathContext nestedXpathContext = xpathContextFactory .newContext (xpathContext , firstElement );
134+ XPathContext nestedXpathContext = xpathContextFactory .newContext (firstElement );
135135
136136 List <Node > dotList = nestedXpathContext .stream ("." , Node .class ).toList ();
137137 assertEquals (1 , dotList .size ());
You can’t perform that action at this time.
0 commit comments