Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ISourceProvider variable that can be null
ISourceProvider variable that can be null [message #336694] Sun, 28 June 2009 18:44 Go to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Hi.

I want to provide my own variable by using ISourceProvider. The problem is that this variable can
also be null. It seems that this is not supported (I get an exception then, telling me that this
variable is not defined).
Is there a reason why null variables are not supported?
Ok, I can simply wrap it in a list, but wonder why I have to.

Regards,
Kai
Re: ISourceProvider variable that can be null [message #336720 is a reply to message #336694] Mon, 29 June 2009 14:44 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

It was set up to return null if the context doesn't know about the
variable at all, so it is API. The solution is to set it to
org.eclipse.core.expressions.IEvaluationContext.UNDEFINED_VA RIABLE when
you want it to be null. That way it won't kill expressions (which throw
an Undefined Variable exception of some kind).

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:managing plugins with p2
Next Topic:Question about Update Manager for Eclipse 3.3
Goto Forum:
  


Current Time: Fri Dec 27 00:07:54 GMT 2024

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

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

Back to the top