ControlSvc.I Interface
- public static interface ControlSvc.I
-
Enclosing class
-
ControlSvc
public NewControlInfo |
-
createControlDefinition (JavaClass container, IControlLocator locator, URI controlPath)
- Show the appropriate dialog for a new control and return the
information collected.
|
public URI |
-
createControlExtensionFile (URI extensionPath, IControlLocator locator)
- Generate an extension file for a control without inserting it into a document.
|
public boolean |
-
generateFile (URI sourceURI, URI destinationURI)
- Generate a file from another file.
|
public Object |
-
getControlBehavior (String key, ISourceElement element, String tagName, String attributeName)
- Gets an object that describes a behavior for an element in a control.
|
public String |
-
getControlImplementation (ISourceElement element)
- Returns the type of the implementation class for the control associated with the given element.
|
public IControlLocator |
-
getControlLocator (IProject project, String interfaceName)
- Gets a control locator based on the interface name.
|
public IControlLocator |
-
getControlLocator (ISourceElement element)
- Gets a control locator for any control element.
|
public List |
-
getControlLocators (IProject project)
- Returns the list of available controls for the project.
|
public IDocumentViewInfo |
-
getDesignViewInfo (JavaDocument doc)
- This creates a designview for the given document.
|
public void |
-
insertControlInstance (JavaClass container, String varName, String controlType, JavaDocTag [] tags, int insertionIndex)
- Insert the instance variable for a control (jbc or jbcx) into a ControlContainer.
|
public void |
-
insertControlInstance (JavaClass type, IControlLocator locator, int insertionIndex)
- Insert the instance variable for a control into a ControlContainer.
|
public void |
-
insertControlInstance (JavaClass containerClass, String type, int insertionIndex)
- Insert the instance variable for a JBCX (or non-extensible JBC) into
a ControlContainer.
|
createControlDefinition(JavaClass, IControlLocator, URI) Method
public NewControlInfo
createControlDefinition(JavaClass
container,
IControlLocator
locator,
URI
controlPath)
Show the appropriate dialog for a new control and return the
information collected.
Parameters
-
container
- A java class into which the new control will go. This method
doesn't actaually insert the instance, the class is only used for name
uniqueness and other checks. If this is null, these checks will be skipped.
-
locator
- The control locator for the control to be created.
-
controlPath
- the URI of the control extension file to create if needed.
If this is a file ending in the correct extension, it will be the default
file to create. If it's any other file or a directory, the extension file will be created
in that directory. If null, no extension file will be created.
Returns
- A descriptor for the control, or null if the user cancels.
createControlExtensionFile(URI, IControlLocator) Method
public URI
createControlExtensionFile(URI
extensionPath,
IControlLocator
locator)
Generate an extension file for a control without inserting it into a document.
Parameters
-
extensionPath
- The default location for the JBCX file to be created.
-
locator
- the locator for the control to be extended.
Returns
- the URI to the created file, or null if cancelled or an error occurs.
generateFile(URI, URI) Method
public boolean generateFile(URI
sourceURI,
URI
destinationURI)
Generate a file from another file. The specific conversion is decided by examining
the filehandlers for the source and destination URIs.
Parameters
-
sourceURI
- the document on which the new contents are based.
-
destinationURI
- the document to create/overwrite with generated contents.
Returns
- true if the generation succeeded, false if there was an error.
getControlBehavior(String, ISourceElement, String, String) Method
public Object
getControlBehavior(String
key,
ISourceElement
element,
String
tagName,
String
attributeName)
Gets an object that describes a behavior for an element in a control. Currently, this
can be a property editor or renderer for a specific attribute.
Parameters
-
key
- The behavior which should be retrieved. This is a subset of behaviors defined
in EditorSupport.
-
element
- The element to which this behavior relates.
-
tagName
- the name of the tag for this behavior. May be null.
-
attributeName
- the name of the attribute for this behavior. May be null.
Returns
- an object describing the behavior, or null if there is no matching behavior.
BEHAVIOR_EDIT_ACTION returns the IActionProxy that edits the given (default if null) attribute.
getControlImplementation(ISourceElement) Method
public String
getControlImplementation(ISourceElement
element)
Returns the type of the implementation class for the control associated with the given element.
Parameters
-
element
- An element in an extension file for a control, or an
instance of a control.
Returns
- The java type of the implementation. This may be null if not found.
getControlLocator(IProject, String) Method
public IControlLocator
getControlLocator(IProject
project,
String
interfaceName)
Gets a control locator based on the interface name.
Parameters
-
project
- the Project in which to find the locator.
-
interfaceName
- The main interface for the control.
Returns
- The IControlLocator that describes the control.
getControlLocator(ISourceElement) Method
public IControlLocator
getControlLocator(ISourceElement
element)
Gets a control locator for any control element.
Parameters
-
element
- An element in an extension file for a control, or an
instance of a control.
Returns
- The IControlLocator that describes the control.
getControlLocators(IProject) Method
public List
getControlLocators(IProject
project)
Returns the list of available controls for the project.
Parameters
-
project
- The project whose control locators will be returned.
Returns
- A List of IControlLocator objects for all controls in the project.
This will never be null, but may be 0-length.
getDesignViewInfo(JavaDocument) Method
public IDocumentViewInfo
getDesignViewInfo(JavaDocument
doc)
This creates a designview for the given document.
Parameters
-
doc
- The document which needs a design view.
Returns
- The design view document info object. The createView() method of this interface may be used to create
the design view.
insertControlInstance(JavaClass, String, String, JavaDocTag[], int) Method
public void insertControlInstance(JavaClass
container,
String
varName,
String
controlType,
JavaDocTag
[] tags,
int insertionIndex)
Insert the instance variable for a control (jbc or jbcx) into a ControlContainer.
Parameters
-
container
- The parent of the new variable.
-
varName
- The instance name to use for the control.
-
controlType
- The full type of the control.
-
tags
- An array of javadoc tags to add in addition to common:control.
If this is null, a wizard (if appropriate to the base control) will be
shown to collect information. A zero-length array should be used
to suppress this.
-
insertionIndex
- The child index of the container after which the new
control will appear in source. -1 indicates to use the default.
insertControlInstance(JavaClass, IControlLocator, int) Method
public void insertControlInstance(JavaClass
type,
IControlLocator
locator,
int insertionIndex)
Insert the instance variable for a control into a ControlContainer.
IControlLocator.getWizard is called to get the initial instance
information, and possibly generate a control extension file.
Parameters
-
type
- The parent of the new variable.
-
locator
- Control locator for the desired control type.
insertControlInstance(JavaClass, String, int) Method
public void insertControlInstance(JavaClass
containerClass,
String
type,
int insertionIndex)
Insert the instance variable for a JBCX (or non-extensible JBC) into
a ControlContainer. This will show the wizard with the tags-only dialog shown.
Parameters
-
containerClass
- the JavaClass into which the control should be inserted.
-
type
- the fully-qualified type of the control or extension interface.