Package com.iizigo.link.java
Class JavaElementLinkAdapter
java.lang.Object
com.iizigo.link.java.JavaElementLinkAdapter
- All Implemented Interfaces:
ILinkCapable
,org.eclipse.core.runtime.IAdaptable
Class used to create an ILinkCapable instance of a Java class.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from interface com.iizigo.link.ILinkCapable
STATUS_LINK_NOT_SUPPORTED
Constructor Summary
ConstructorDescriptionJavaElementLinkAdapter
(org.eclipse.jdt.core.IJavaElement element) The constructor.JavaElementLinkAdapter
(org.eclipse.jdt.core.IMethod method) The constructor.JavaElementLinkAdapter
(org.eclipse.jdt.core.IType type) The constructor.Method Summary
Modifier and TypeMethodDescription<T> T
getAdapter
(Class<T> adapter) Adapter.Gets the link text to display when drag-dropping into JavaScript Panel Editor.getLinkOperations
(LinkData data) Called when the drag-drop is to be performed (link or paste-link menu item).org.eclipse.core.runtime.IStatus
isLinkCapable
(LinkData data) Returns if this property container could potentially be link capable.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.iizigo.link.ILinkCapable
getDragDropHTML
Constructor Details
JavaElementLinkAdapter
public JavaElementLinkAdapter(org.eclipse.jdt.core.IMethod method) The constructor.- Parameters:
method
- The method.
JavaElementLinkAdapter
public JavaElementLinkAdapter(org.eclipse.jdt.core.IType type) The constructor.- Parameters:
type
- The type.
JavaElementLinkAdapter
public JavaElementLinkAdapter(org.eclipse.jdt.core.IJavaElement element) The constructor.- Parameters:
element
- The Java element.
Method Details
isLinkCapable
Returns if this property container could potentially be link capable.This call is done many times during drag-drop and must be very fast and not cause too much garbage collection.
- Specified by:
isLinkCapable
in interfaceILinkCapable
- Parameters:
data
- The link data.- Returns:
- The status of capability of the operation.
getDragDropText
Gets the link text to display when drag-dropping into JavaScript Panel Editor.- Specified by:
getDragDropText
in interfaceILinkCapable
- Returns:
- The drag-drop text to use, or null if the method
is used instead.ILinkCapable.getDragDropHTML()
getLinkOperations
Called when the drag-drop is to be performed (link or paste-link menu item). The link-capable instance fills in only what it handles.- Specified by:
getLinkOperations
in interfaceILinkCapable
- Parameters:
data
- The link data.- Returns:
- The list of operations required.
getAdapter
Adapter.- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable