Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Functions like typeIsExactly and alike are not available in the designer #11

Open
Vampire opened this issue Feb 20, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Vampire
Copy link

Vampire commented Feb 20, 2019

If you try to use those functions, you just get an exception in the exception log that the function is missing:

net.sourceforge.pmd.util.fxdesigner.model.XPathEvaluationException: java.lang.RuntimeException: org.jaxen.UnresolvableException: No Such Function typeIsExactly
	at net.sourceforge.pmd.util.fxdesigner.model.XPathEvaluator.evaluateQuery(XPathEvaluator.java:89)
	at net.sourceforge.pmd.util.fxdesigner.XPathPanelController.evaluateXPath(XPathPanelController.java:250)
	at net.sourceforge.pmd.util.fxdesigner.MainDesignerController.lambda$refreshXPathResults$10(MainDesignerController.java:210)
	at java.util.Optional.ifPresent(Optional.java:159)
	at net.sourceforge.pmd.util.fxdesigner.MainDesignerController.refreshXPathResults(MainDesignerController.java:210)
	at net.sourceforge.pmd.util.fxdesigner.XPathPanelController.lambda$beforeParentInit$4(XPathPanelController.java:137)
	at org.reactfx.util.NonAccumulativeStreamNotifications.lambda$head$0(NotificationAccumulator.java:134)
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68)
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57)
	at org.reactfx.ProperEventStream.emit(ProperEventStream.java:18)
	at org.reactfx.EventStream$1.lambda$observeInputs$0(EventStream.java:423)
	at org.reactfx.util.NonAccumulativeStreamNotifications.lambda$head$0(NotificationAccumulator.java:134)
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68)
	at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:57)
	at org.reactfx.ProperEventStream.emit(ProperEventStream.java:18)
	at org.reactfx.SuccessionReducingStream.handleTimeout(SuccessionReducingStream.java:73)
	at org.reactfx.util.FxTimer.lambda$restart$0(FxTimer.java:89)
	at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:239)
	at com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:180)
	at javafx.animation.Timeline.impl_playTo(Timeline.java:176)
	at javafx.animation.AnimationAccessorImpl.playTo(AnimationAccessorImpl.java:39)
	at com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(SingleLoopClipEnvelope.java:99)
	at javafx.animation.Animation.impl_timePulse(Animation.java:1102)
	at javafx.animation.Animation$1.lambda$timePulse$25(Animation.java:186)
	at java.security.AccessController.doPrivileged(Native Method)
	at javafx.animation.Animation$1.timePulse(Animation.java:185)
	at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
	at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:506)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490)
	at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run$$$capture(InvokeLaterDispatcher.java:95)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: org.jaxen.UnresolvableException: No Such Function typeIsExactly
	at net.sourceforge.pmd.lang.rule.xpath.JaxenXPathRuleQuery.evaluate(JaxenXPathRuleQuery.java:73)
	at net.sourceforge.pmd.lang.rule.XPathRule.evaluate(XPathRule.java:114)
	at net.sourceforge.pmd.lang.java.rule.JavaRuleChainVisitor.visit(JavaRuleChainVisitor.java:42)
	at net.sourceforge.pmd.lang.rule.AbstractRuleChainVisitor.visitAll(AbstractRuleChainVisitor.java:96)
	at net.sourceforge.pmd.RuleChain.apply(RuleChain.java:67)
	at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:140)
	at net.sourceforge.pmd.util.fxdesigner.model.XPathEvaluator.evaluateQuery(XPathEvaluator.java:84)
	... 35 more
Caused by: org.jaxen.UnresolvableException: No Such Function typeIsExactly
	at org.jaxen.SimpleFunctionContext.getFunction(SimpleFunctionContext.java:127)
	at org.jaxen.ContextSupport.getFunction(ContextSupport.java:242)
	at org.jaxen.Context.getFunction(Context.java:216)
	at org.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:176)
	at org.jaxen.expr.DefaultAndExpr.evaluate(DefaultAndExpr.java:91)
	at org.jaxen.expr.DefaultPredicate.evaluate(DefaultPredicate.java:95)
	at org.jaxen.expr.PredicateSet.applyPredicate(PredicateSet.java:269)
	at org.jaxen.expr.PredicateSet.evaluatePredicates(PredicateSet.java:244)
	at org.jaxen.expr.DefaultStep.evaluate(DefaultStep.java:164)
	at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:140)
	at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:102)
	at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:677)
	at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:216)
	at net.sourceforge.pmd.lang.rule.xpath.JaxenXPathRuleQuery.evaluate(JaxenXPathRuleQuery.java:69)
	... 41 more
@oowekyala oowekyala changed the title [core] Functions like typeIsExactly and alike are not available in the designer [ui] Functions like typeIsExactly and alike are not available in the designer Feb 20, 2019
@adangel adangel transferred this issue from pmd/pmd Mar 16, 2019
@aldaris
Copy link

aldaris commented Oct 2, 2019

I could use pmd-java:typeIs function in the designer on 6.17.0 without a problem. The view on the top left only displayed typeIs, so it took a while to figure out how to use it exactly for me at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants