Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.variables
Interface IValueVariable

All Superinterfaces:
IStringVariable

public interface IValueVariable
extends IStringVariable

A variable with a value that can be set and retrieved. The context in which a value variable is referenced does not effect the value of the variable. A value variable can be contributed by an extension or created programmatically. A contributor may optionally specify an initial value for a variable, or provide a delegate that will initialize the variable with a value.

Since 3.3, a variable can be specified as a "read only" preventing users from changing the value after it has been initialized. Furthermore, a read only variable that is contributed by an extension will always load the value from the extension.

Example of a value variable contribution with an initial value, the specified variable is created with the initial value "/usr/local/foo".

  <extension point="org.eclipse.core.variables.valueVariables">
   <variable
    name="FOO_HOME"
    initialValue="/usr/local/foo">
   </variable>
  </extension>
 

Example of a value variable contribution with an initializer class, the class "com.example.FooLocator" will be used to initialize the value the first time it's requested.

  <extension point="org.eclipse.core.variables.valueVariables">
   <variable
    name="FOO_HOME"
    initializerClass="com.example.FooLocator">
   </variable>
  </extension>
 

Since:
3.0
Restriction:
This interface is not intended to be implemented by clients.

Method Summary
  String getValue ()
          Returns the value of this variable, or null if none.
 boolean isContributed ()
          Returns whether this variable was contributed by an extension.
 boolean isReadOnly ()
          Returns whether this variable is read only.
 void setDescription ( String description)
          Sets the description of this variable to the given value.
 void setValue ( String value)
          Sets the value of this variable to the given value.
 
Methods inherited from interface org.eclipse.core.variables. IStringVariable
getDescription, getName
 

Method Detail

setValue

void setValue(
String value)
Sets the value of this variable to the given value. Since 3.3, this has no effect if this variable is read only.

Parameters:
value - variable value

getValue


String getValue()
Returns the value of this variable, or null if none.

Returns:
the value of this variable, or null if none

isContributed

boolean isContributed()
Returns whether this variable was contributed by an extension.

Returns:
whether this variable was contributed by an extension

isReadOnly

boolean isReadOnly()
Returns whether this variable is read only.

Returns:
whether this variable is read only
Since:
3.3

setDescription

void setDescription(
String description)
Sets the description of this variable to the given value.

Parameters:
description - variable description, possibly null

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire