Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Condition to palette/components(Set a condition to display components)
Condition to palette/components [message #1576704] Wed, 21 January 2015 13:21 Go to next message
Rafael Barioni is currently offline Rafael BarioniFriend
Messages: 18
Registered: October 2014
Junior Member
Hello everyone.

Please, need some help with this.

Is there a way of adding a condition to my palette or my components, so that it´ll only display in a determined situation?

I need to show some components if I open a file and show others components if I open other kind of file.

Is it possible in WB ?

Thanks a lot.
Re: Condition to palette/components [message #1576787 is a reply to message #1576704] Wed, 21 January 2015 14:22 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
Sure. That is how WindowBuilder shows Swing widgets when looking at a Swing UI and SWT widgets when looking at an SWT UI (and both files are .java files).
Re: Condition to palette/components [message #1576815 is a reply to message #1576787] Wed, 21 January 2015 14:41 Go to previous messageGo to next message
Rafael Barioni is currently offline Rafael BarioniFriend
Messages: 18
Registered: October 2014
Junior Member
Eric Clayberg wrote on Wed, 21 January 2015 14:22
Sure. That is how WindowBuilder shows Swing widgets when looking at a Swing UI and SWT widgets when looking at an SWT UI (and both files are .java files).


great...thanks Eric.,.

where can I find these tricks? Very Happy

Thanks a lot.
Re: Condition to palette/components [message #1578731 is a reply to message #1576815] Thu, 22 January 2015 15:31 Go to previous message
Rafael Barioni is currently offline Rafael BarioniFriend
Messages: 18
Registered: October 2014
Junior Member
Hello.

I added this condition to my component:

condition="MyClass.myMethod()"


But, when I run it, I got an error:

[Error: could not access: MyClass; in class: null]
[Near : {... Unknown ....}]
             ^
[Line: 1, Column: 0]
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:592)
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:310)
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:136)
	at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:134)
	at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
	at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:103)
	at org.mvel2.MVEL.executeExpression(MVEL.java:1069)
	at org.eclipse.wb.internal.core.model.util.ScriptUtils.evaluate(ScriptUtils.java:146)
	at org.eclipse.wb.internal.core.model.util.ScriptUtils.evaluate(ScriptUtils.java:141)
...


Does anyone know why I get this?

Thanks a lot.
Previous Topic:Installing Nebula controls in WindowBuilder
Next Topic:Understand WB XWT Model
Goto Forum:
  


Current Time: Wed Nov 14 09:50:05 GMT 2018

Powered by FUDForum. Page generated in 0.01590 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top