Class DesignerProp
- All Implemented Interfaces:
INavigatorPresentation
,EventListener
,IAdaptable
- Direct Known Subclasses:
ActionActorDesignerProp
,AppDistributionDesignerProp
,CaptureDesignerProp
,ChartDesignerProp
,DatabaseDesignerProp
,EditorPushDesignerProp
,EditorPWADesignerProp
,EditorRuntimeBuilderDesignerProp
,FontDesignerProp
,ImageDesignerProp
,RecordingDesignerProp
,ResourceDesignerProp
,ScreenDesignerProp
,SelectorDesignerProp
,ServerConfigDesignerProp
,StylesDesignerProp
,TerminalDesignerProp
,TextTableDesignerProp
,UIDesignerProp
,VirtualizedMonitorDesignerProp
,VirtualSpaceDesignerProp
,WebServiceDesignerProp
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionstatic final QualifiedName
The qualified name for session property to link an IResource to a property.final boolean
Flag for if this is a folder module property.final boolean
Flag for if this is the root property.static final ContextMenuActionAdapter
Move down property context menu action.static final ContextMenuActionAdapter
Move up property context menu action.static final int
Copy operation.static final int
Delete operation.static final int
Move operation.protected final PropCnr
The owner.Fields inherited from interface com.iizigo.navigator.INavigatorPresentation
CN_PREFERENCE_FLAGS_NAME, DEFAULT_COMPARATOR, EMPTY_ARRAY, FLAG_ADD_FILE_ITEM_PACKAGE_LOCATION, FLAG_ADD_FILE_ITEM_PROJECT, FLAG_ADD_FOLDER_PACKAGE_LOCATION, FLAG_ADD_FOLDER_PROJECT, FLAG_CUSTOM_1, FLAG_CUSTOM_2, FLAG_CUSTOM_3, FLAG_JAVA_SUPPORT, FLAG_PACKAGE_VIEW, FLAG_SHOW_DESIGNER_PROPERTIES, FLAG_SHOW_EMPTY_MODULE_FOLDERS, FLAG_SHOW_EMPTY_PACKAGES, FLAG_SHOW_FILE_ITEMS, FLAG_SHOW_SUBPROPERTIES, FLAGS_NORMAL, FLAGS_ONLY_FOLDERS
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCommandContributionItem
(ContextMenuItem item, Class<?>... classes) Adds an Add command contribution item for the DesignerProp class.void
Fills the contribution menu with ContextMenuItems.void
addContextMenuItems
(Viewer viewer, IzMenu menu, IPropUndoRedo undoRedo) Fills the pop-up menu with ContextMenuItems.void
addContextMenuItems
(Control formControl, IzMenu menu, IPropUndoRedo undoRedo, DesignerProp target) Fills the pop-up menu with ContextMenuItems.void
addMarker
(PropMarker marker) Adds a marker to the property.appendCNStyledTextAdditions
(StyledString ss, int flags) Appends optional items to styled text.void
appendTooltipPropErrors
(Composite composite) Appends property error information to a Composite that has a grid layout of 2 columns.static boolean
appendTooltipPropErrors
(Composite composite, GProp<?> property) Appends property error information to a Composite that has a grid layout of 2 columns.canPerform
(int operation) Checks if an operation on this property is permitted.final void
This method should be called from a builder that receives the "clean" event, it just clears the markers internally in DesignerProp.static Composite
createCNToolTip
(GProp<?> property, Event event, ViewerCell cell, Composite parent) Requests creates of the Composite used to show the tooltip.createCNToolTip
(Event event, ViewerCell cell, Composite parent) Requests creates of the Composite used to show the tooltip.protected Composite
createCNToolTip0
(GProp<?> property, Event event, ViewerCell cell, Composite parent) Requests creates of the Composite used to show the tooltip.static Composite
createCNToolTipItemList
(Composite parent, PropCnr pc, List<TooltipItem> list, boolean appendErrors) Creates a simple list of items for a property with appended property error information.static Atom
createFileErrorAtom
(PropCnr parentContainer) Creates a unique property atom for file errors for a property.createImageDefinitions
(List<String> names, IPropUndoRedo undoRedo) Asks the user if SVG or plain image definitions should be created for the dropped asset files.protected void
dispose()
Called when the DesignerProp is disposed of due to dispose of the associated property.boolean
Sorting on index, but categories first.void
Flags the property for update in the viewer(s).<T> T
getAdapter
(Class<T> adapter) Adapts to the IResource or to an IIZI Property.getCNBackground
(int columnIndex, int flags) Provides a background color for the given element at the specified indexstatic Color
getCNBackground
(GProp<?> property, int columnIndex, int flags) Provides a background color for the given element at the specified index.protected Color
getCNBackground0
(GProp<?> property, int columnIndex, int flags) Provides a background color for the given element at the specified index.int
Gets the category of this Common Navigator object, used for sorting.Object[]
getCNChildren
(int flags) Gets the children of this container for Common Navigator.Get theComparator
object to sort the children for the Common Navigator when presented visually in the tree.getCNDescription
(int flags) Provide a description for the status bar view, if available.static String
getCNDescription
(GProp<?> property, int flags) Provide a description for the status bar view, if available.protected String
getCNDescription0
(GProp<?> property, int flags) Provide a description for the status bar view, if available.Provide a type description for the status bar view, if available.getCNForeground
(int columnIndex, int flags) Provides a foreground color for the given element.static Color
getCNForeground
(GProp<?> property, int columnIndex, int flags) Provides a foreground color for the given element.protected Color
getCNForeground0
(GProp<?> property, int columnIndex, int flags) Provides a foreground color for the given element.getCNImage
(int flags) Gets the image for the Common Navigator.getCNImage
(int columnIndex, int flags) Gets the image for the Common Tree Viewer showing column contents.static Image
getCNImage
(GProp<?> property, int flags) Gets the image for the Common Navigator.static Image
getCNImage
(GProp<?> property, int columnIndex, int flags) Gets the image for the Common Navigator.protected Image
getCNImage0
(GProp<?> property, int flags) Gets the image for the Common Navigator.protected Image
getCNImage0
(GProp<?> property, int columnIndex, int flags) Gets the image for the Common Navigator.getCNParent
(int flags) Gets the parent for Common Navigator.static Object
getCNParent
(GProp<?> property, int flags) Gets the parent for Common Navigator.Gets the "real" property when the DesignerProp has been retrieved from e.g.getCNStyledText
(int flags) Gets the label text for the Common Navigator.static StyledString
getCNStyledText
(GProp<?> property, int flags) Gets the text for a sub-property for the Common Navigator.protected StyledString
getCNStyledText0
(GProp<?> property, int flags) Gets the text for a sub-property for the Common Navigator.getCNText
(int flags) Gets the label text for the Common Navigator.getCNText
(int columnIndex, int flags) Gets the label text for the Common Navigator.static String
Gets the text for a sub-property for the Common Navigator.static String
Gets the text for a sub-property for the Common Navigator.protected String
getCNText0
(GProp<?> property, int flags) Gets the text for a sub-property for the Common Navigator.protected String
getCNText0
(GProp<?> property, int columnIndex, int flags) Gets the text for a sub-property for the Common Navigator.static int
getCNToolTipDisplayDelayTime
(GProp<?> property, ViewerCell cell) The time in milliseconds until the tool tip is displayed.int
The time in milliseconds until the tool tip is displayed.protected int
getCNToolTipDisplayDelayTime0
(GProp<?> property, ViewerCell cell) The time in milliseconds until the tool tip is displayed.static Point
getCNToolTipShift
(GProp<?> property, ViewerCell cell) Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer.getCNToolTipShift
(ViewerCell cell) Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer.protected Point
getCNToolTipShift0
(GProp<?> property, ViewerCell cell) Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer.static int
getCNToolTipTimeDisplayed
(GProp<?> property, ViewerCell cell) The time in milliseconds the tool tip is shown for.int
The time in milliseconds the tool tip is shown for.protected int
getCNToolTipTimeDisplayed0
(GProp<?> property, ViewerCell cell) The time in milliseconds the tool tip is shown for.Gets all command contribution items to use for a property container.Gets the data DesignerProp that is associates with the FilePropCnr.int
Checks if a property has an error or warning in itself or the children.Gets the exception that occurred during loading of the file.final ModuleFolder
Gets the ModuleFolder for this property.final ModuleFolderPropCnr
Gets the module folder property container.ArrayList
<?> Gets an ArrayList of IEditorFileAction.static ResourceDesignerProp
getInstance
(IResource resource) Gets the instance of the property in a resource.static ResourceDesignerProp
getInstance
(IResource resource, boolean logError) Gets the instance of the property in a resource.final IResource
Gets the IResource object for this property container.final IJavaProject
Gets the Java project.Gets the array of markers in this property.final ModuleModel
getModel()
Gets the Module Model.final long
Gets the file modification stamp.final DesignerProp
Gets the parent.final FolderPropCnr
Gets the parent folder property container.final IProject
Gets the project.final PropCnr
Gets the originating property container.protected PropertyEditorSetup
Gets the Setup used for iiziGo, subclasses must override and provide their instance.final ModuleRootPropCnr
getRoot()
Gets the root property container for the module project.getSubPropertyName
(IGProp<?> subProperty) Get the name of a sub-property.static boolean
Gets the default paste operation allowed for transfer properties.Find an UndoContext for this property of from one of it's parents.boolean
hasCNChildren
(int flags) Returns whether the given element has children for the Common Navigator.static boolean
hasCNToolTip
(GProp<?> property, ViewerCell cell) Checks for Common Navigator tool-tip for this item.boolean
hasCNToolTip
(ViewerCell cell) Checks for Common Navigator tool-tip for this item.protected boolean
hasCNToolTip0
(GProp<?> property, ViewerCell cell) Checks for Common Navigator tool-tip for this item.boolean
hasMarkerID
(String markerID) Checks for presence of a marker ID.boolean
Check for naming error in the property due to wrong file name.boolean
Gets the drop index in the parent container if possible.boolean
isCNVisible
(int flags) Checks if a property should be included in the view or if it's hidden or filtered out.boolean
isCNVisible0
(GProp<?> property, int flags) Checks if a property should be included in the view or if it's hidden or filtered out.final boolean
Flag for designer-loaded-from-file.final boolean
Check for designer moved.void
Property event from property container.final void
Called fromISynchronizeEclipseMarkers
when a property error change occurs in order to set the errors correctly for the file resource.paste
(boolean doPerformPaste, int position, GProp<?>[] props, int operation, String description, IPropUndoRedo undoRedo) Validates or performs a paste operation.pasteProperties
(boolean doPerformPaste, GProp<?>[] props, int operation, String description, IPropUndoRedo undoRedo, GProp<?> reference, boolean isAfter) Validates or performs a paste operation.protected void
Processing of Query message.final void
Rebuilds the error markers without touching the resource marker, triggers a rebuild of this property if it contains any errors in the tree and its an instance ofISynchronizeMarkers
.static void
removeFileErrors
(DesignerProp property) Removes all file errors for a property container.void
removeMarkers
(String markerID) Removes the marker "markerID" or all markers (when markerID is null) for the property.final void
Sets designer loaded, once only, never cleared.final void
Starts the designer move of a property.void
setException
(Throwable exception) Sets the exception that occurred during loading of the file.void
setIEditorFileActions
(ArrayList<?> list) Sets an ArrayList of IEditorFileAction.final void
setIResource
(IResource resource) Sets the IResource object for this property container.static void
setIResource
(IResource resource, DesignerProp prop, boolean checkPresence) Sets a session property for a resource.final void
setModificationStamp
(long stamp) Sets the file modification stamp.static void
setTransferDefaultPasteAllowed
(boolean on) Sets the default paste operation allowed for transfer properties.toString()
Provides a toString for the Go Into Project Explorer View.void
updateFolderResources
(IFolder folder) This folder has been moved and needs updating the resource, along with all children properties.protected boolean
validateClasses
(boolean doPerform, PropCnr target, GProp<?>[] props, boolean isMove) Validates the target property container classes for paste.boolean
validateResouce
(IResource resource) Validates a resource against the designer property extension.
Field Details
DESIGNER_PROPERTY
The qualified name for session property to link an IResource to a property.OP_COPY
public static final int OP_COPYCopy operation.- See Also:
OP_MOVE
public static final int OP_MOVEMove operation.- See Also:
OP_DELETE
public static final int OP_DELETEDelete operation.- See Also:
moveUpProperty
Move up property context menu action.moveDownProperty
Move down property context menu action.propertyContainer
The owner.isRoot
public final boolean isRootFlag for if this is the root property.isFolder
public final boolean isFolderFlag for if this is a folder module property.
Constructor Details
DesignerProp
Constructor.
Method Details
getTransferDefaultPasteAllowed
public static boolean getTransferDefaultPasteAllowed()Gets the default paste operation allowed for transfer properties.setTransferDefaultPasteAllowed
public static void setTransferDefaultPasteAllowed(boolean on) Sets the default paste operation allowed for transfer properties.addCommandContributionItem
Adds an Add command contribution item for the DesignerProp class.- Parameters:
item
- The item to add.classes
- The classes, should extend PropCnr.
removeFileErrors
Removes all file errors for a property container.createFileErrorAtom
Creates a unique property atom for file errors for a property.getInstance
Gets the instance of the property in a resource.- Returns:
- The property, or null if the resource doesn't exist or the project is closed.
getInstance
Gets the instance of the property in a resource.- Returns:
- The property, or null if the resource doesn't exist or the project is closed.
getPropCnr
Gets the originating property container.getParentFolderProp
Gets the parent folder property container.- Returns:
- The parent folder property container, or null if not found.
getFolderProp
Gets the module folder property container.- Returns:
- The folder property container, or null if not found.
getFolder
Gets the ModuleFolder for this property.- Returns:
- The module folder, or null if not found.
getRoot
Gets the root property container for the module project.- Returns:
- The root property container, or null if not found.
getModel
Gets the Module Model.- Returns:
- The Module Model or null if not found.
getProject
Gets the project.- Returns:
- The project, or null if not found.
getJavaProject
Gets the Java project.- Returns:
- The Java project, or null if not found.
dispose
protected void dispose()Called when the DesignerProp is disposed of due to dispose of the associated property.Subclasses should ALWAYS call the
super.dispose()
method.getAdapter
Adapts to the IResource or to an IIZI Property. If this is a File DesignerProp, check for adaptation to it's data property.- Specified by:
getAdapter
in interfaceIAdaptable
setIResource
Sets the IResource object for this property container.- Parameters:
resource
- The IResource object or null to clear it.
setIResource
Sets a session property for a resource.- Parameters:
resource
- The IResource object or null to clear it.prop
- The Designer property.checkPresence
- Flag indicating the folder is checked for presence.
getIResource
Gets the IResource object for this property container.- Returns:
- The IResource object or null if none is set.
setModificationStamp
public final void setModificationStamp(long stamp) Sets the file modification stamp.- Parameters:
stamp
- The file modification stamp.
getModificationStamp
public final long getModificationStamp()Gets the file modification stamp.- Returns:
- The file modification stamp.
isDesignerLoaded
public final boolean isDesignerLoaded()Flag for designer-loaded-from-file.setDesignerLoaded
public final void setDesignerLoaded()Sets designer loaded, once only, never cleared.setDesignerMoved
public final void setDesignerMoved()Starts the designer move of a property.isDesignerMoved
public final boolean isDesignerMoved()Check for designer moved. This call resets the "flag", so it can only be done once.validateResouce
Validates a resource against the designer property extension.updateFolderResources
This folder has been moved and needs updating the resource, along with all children properties.setException
Sets the exception that occurred during loading of the file.- Parameters:
exception
- The exception or null for no error.
getException
Gets the exception that occurred during loading of the file.- Returns:
- The exception or null for no error.
setIEditorFileActions
Sets an ArrayList of IEditorFileAction.getIEditorFileActions
Gets an ArrayList of IEditorFileAction.firePropertyUpdateViewerEvent
public void firePropertyUpdateViewerEvent()Flags the property for update in the viewer(s).addMarker
Adds a marker to the property.- Parameters:
marker
- The marker.
hasMarkerID
Checks for presence of a marker ID.removeMarkers
Removes the marker "markerID" or all markers (when markerID is null) for the property.- Parameters:
markerID
- The marker ID or null for all markers.
getMarkers
Gets the array of markers in this property.- Returns:
- The array of markers, or null for none.
getErrorSeverity
public int getErrorSeverity()Checks if a property has an error or warning in itself or the children.Returns the maximum value of the IMarker.SEVERITY attribute across markers of the specified type on this resource, and on its children.
- Returns:
- IMarker.SEVERITY_INFO, IMarker.SEVERITY_WARNING, IMarker.SEVERITY_ERROR, or -1.
hasNamingError
public boolean hasNamingError()Check for naming error in the property due to wrong file name.getParent
Gets the parent.- Returns:
- The property container designer, or null if this is the root or the property doesn't have a parent yet.
getCNParent
Gets the parent for Common Navigator.- Specified by:
getCNParent
in interfaceINavigatorPresentation
- Parameters:
flags
- The flag that apply is FLAG_PACKAGE_VIEW.- Returns:
- The parent object: IProject or DesignerProp, or null if no parent exists (property is not added to a container).
getCNParent
Gets the parent for Common Navigator.- Parameters:
property
- The property.flags
- The flag that apply is FLAG_PACKAGE_VIEW.- Returns:
- The parent object: IProject or DesignerProp, or null if no parent exists (property is not added to a container).
getCNRealProp
Gets the "real" property when the DesignerProp has been retrieved from e.g. the ContentProvider at add/remove events. The property parent might not be the same as the DesignerProp.- Returns:
- By default, it is the "this" instance, but e.g. EditorVSRow for tables overrides it and returns the parent DesignerProp instead.
getCNCategory
public int getCNCategory()Gets the category of this Common Navigator object, used for sorting. Subclasses can override this method, in order to get the sorting in the viewer to be done within a category.- Specified by:
getCNCategory
in interfaceINavigatorPresentation
- Returns:
- This method returns zero, i.e. no category.
getCNComparator
Get theComparator
object to sort the children for the Common Navigator when presented visually in the tree.Subclasses are invited to override this method for other sorting schemes.
- Specified by:
getCNComparator
in interfaceINavigatorPresentation
- Returns:
- The default comparator. Subclasses can inhibit sorting by returning null.
isCNVisible
public boolean isCNVisible(int flags) Checks if a property should be included in the view or if it's hidden or filtered out.- Parameters:
flags
- The flags: FLAG_PACKAGE_VIEW, FLAG_SHOW_EMPTY_MAIN_FOLDER, FLAG_SHOW_EMPTY_PACKAGES, FLAG_SHOW_FILE_ITEMS, FLAG_SHOW_DESIGNER_PROPERTIES and FLAG_SHOW_SUBPROPERTIES are relevant.- Returns:
- true Default is always true.
isCNVisible0
Checks if a property should be included in the view or if it's hidden or filtered out.- Parameters:
property
- The property in question.flags
- The flags: FLAG_PACKAGE_VIEW, FLAG_SHOW_EMPTY_MAIN_FOLDER, FLAG_SHOW_EMPTY_PACKAGES, FLAG_SHOW_FILE_ITEMS, FLAG_SHOW_DESIGNER_PROPERTIES and FLAG_SHOW_SUBPROPERTIES are relevant.- Returns:
- true Default is always true.
hasCNChildren
public boolean hasCNChildren(int flags) Returns whether the given element has children for the Common Navigator.- Specified by:
hasCNChildren
in interfaceINavigatorPresentation
- Parameters:
flags
- The flags: FLAG_PACKAGE_VIEW, FLAG_SHOW_EMPTY_MAIN_FOLDER, FLAG_SHOW_EMPTY_PACKAGES, FLAG_SHOW_FILE_ITEMS, FLAG_SHOW_DESIGNER_PROPERTIES and FLAG_SHOW_SUBPROPERTIES are relevant.- Returns:
true
if the node has children, andfalse
if it has no children.
getCNChildren
Gets the children of this container for Common Navigator.- Specified by:
getCNChildren
in interfaceINavigatorPresentation
- Parameters:
flags
- The flags: FLAG_PACKAGE_VIEW, FLAG_SHOW_EMPTY_MAIN_FOLDER, FLAG_SHOW_EMPTY_PACKAGES, FLAG_SHOW_FILE_ITEMS, FLAG_SHOW_DESIGNER_PROPERTIES and FLAG_SHOW_SUBPROPERTIES are relevant.- Returns:
- An array of children objects or EMPTY_ARRAY for none.
getCNImage
Gets the image for the Common Navigator.- Specified by:
getCNImage
in interfaceINavigatorPresentation
- Parameters:
flags
- The flags for the image, see FLAG_IMAGE_*.- Returns:
- Image or
null
if there is no image.
getCNImage
Gets the image for the Common Navigator.- Parameters:
property
- The property.flags
- The flags for the image, see FLAG_IMAGE_*.- Returns:
- Image or
null
if there is no image.
getCNImage0
Gets the image for the Common Navigator.- Parameters:
property
- The property.flags
- The flags for the image, see FLAG_IMAGE_*.- Returns:
- Image or
null
if there is no image.
getCNImage
Gets the image for the Common Tree Viewer showing column contents.- Specified by:
getCNImage
in interfaceINavigatorPresentation
- Parameters:
columnIndex
- The zero-based index for the column (zero is never used, the method getCNImage() is called instead.flags
- The flags for the image, see FLAG_IMAGE_*.- Returns:
- Image or
null
if there is no image for the given object at columnIndex.
getCNImage
Gets the image for the Common Navigator.- Parameters:
property
- The property.columnIndex
- The zero-based index for the column (zero is never used, the method getCNImage() is called instead.flags
- The flags for the image, see FLAG_IMAGE_*.- Returns:
- Image or
null
if there is no image.
getCNImage0
Gets the image for the Common Navigator.- Parameters:
property
- The property.columnIndex
- The zero-based index for the column (zero is never used, the method getCNImage() is called instead.flags
- The flags for the image, see FLAG_IMAGE_*.- Returns:
- Image or
null
if there is no image.
getCNText
Gets the label text for the Common Navigator.- Specified by:
getCNText
in interfaceINavigatorPresentation
- Returns:
- String or or
null
if there is no text.
getCNText
Gets the text for a sub-property for the Common Navigator.getCNText0
Gets the text for a sub-property for the Common Navigator.getCNText
Gets the label text for the Common Navigator.- Specified by:
getCNText
in interfaceINavigatorPresentation
- Parameters:
columnIndex
- The zero-based index for the column (zero is never used, the method getCNText() is called instead.- Returns:
- String or or
null
if there is no text for the given object at columnIndex.
getCNText
Gets the text for a sub-property for the Common Navigator.getCNText0
Gets the text for a sub-property for the Common Navigator.getCNForeground
Provides a foreground color for the given element.- Parameters:
columnIndex
- The zero-based index of the column in which the color appears.flags
- Viewer flags.- Returns:
- The foreground color for the element, or
null
to use the default foreground color.
getCNForeground
Provides a foreground color for the given element.getCNForeground0
Provides a foreground color for the given element.getCNBackground
Provides a background color for the given element at the specified index- Parameters:
columnIndex
- The zero-based index of the column in which the color appears- Returns:
- The background color for the element, or
null
to use the default background color.
getCNBackground
Provides a background color for the given element at the specified index.getCNBackground0
Provides a background color for the given element at the specified index.getCNStyledText
Gets the label text for the Common Navigator.- Specified by:
getCNStyledText
in interfaceINavigatorPresentation
- Parameters:
flags
- The flags that apply are FLAG_ADD_FOLDER_PACKAGE_LOCATION, FLAG_ADD_FILE_ITEM_PACKAGE_LOCATION, FLAG_ADD_FOLDER_PROJECT and FLAG_ADD_FILE_ITEM_PROJECT.
appendCNStyledTextAdditions
Appends optional items to styled text.- Parameters:
ss
- The StyledString.flags
- The flags that apply are FLAG_ADD_FOLDER_PACKAGE_LOCATION, FLAG_ADD_FILE_ITEM_PACKAGE_LOCATION, FLAG_ADD_FOLDER_PROJECT and FLAG_ADD_FILE_ITEM_PROJECT.
getCNStyledText
Gets the text for a sub-property for the Common Navigator.- Parameters:
property
- The property.flags
- The flags that apply are FLAG_ADD_FOLDER_PACKAGE_LOCATION, FLAG_ADD_FILE_ITEM_PACKAGE_LOCATION, FLAG_ADD_FOLDER_PROJECT and FLAG_ADD_FILE_ITEM_PROJECT.
getCNStyledText0
Gets the text for a sub-property for the Common Navigator.- Parameters:
property
- The property.flags
- The flags that apply are FLAG_ADD_FOLDER_PACKAGE_LOCATION, FLAG_ADD_FILE_ITEM_PACKAGE_LOCATION, FLAG_ADD_FOLDER_PROJECT and FLAG_ADD_FILE_ITEM_PROJECT.
getCNDescription
Provide a description for the status bar view, if available. A default string of the form "(x) items selected" will be used if this method choose to return null.The empty string ("") will be respected as a valid value if returned. Return null if the extension defers to the default method of supplying status bar descriptions.
- Specified by:
getCNDescription
in interfaceINavigatorPresentation
- Returns:
- A description for the status bar view, or null if not available.
getCNDescription
Provide a description for the status bar view, if available. A default string of the form "(x) items selected" will be used if this method choose to return null.The empty string ("") will be respected as a valid value if returned. Return null if the extension defers to the default method of supplying status bar descriptions.
- Parameters:
property
- The property.- Returns:
- A description for the status bar view, or null if not available.
getCNDescription0
Provide a description for the status bar view, if available. A default string of the form "(x) items selected" will be used if this method choose to return null.The empty string ("") will be respected as a valid value if returned. Return null if the extension defers to the default method of supplying status bar descriptions.
- Parameters:
property
- The property.- Returns:
- A description for the status bar view, or null if not available.
getCNDescriptionType
Provide a type description for the status bar view, if available.- Returns:
- A type description for the status bar view, or null if not available.
getDataDesignerProp
Gets the data DesignerProp that is associates with the FilePropCnr.- Returns:
- The DesignerProp for data, null if not a file property or data is not found.
hasCNToolTip
Checks for Common Navigator tool-tip for this item.- Parameters:
cell
- The cell (might be in a table), or null for none.
hasCNToolTip
Checks for Common Navigator tool-tip for this item.hasCNToolTip0
Checks for Common Navigator tool-tip for this item.getCNToolTipShift
Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer. The default shift is 10px right and 0px below your mouse cursor. Be aware of the fact that you should at least position the tool tip 1px right to your mouse cursor else click events may not get propagated properly.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
Point
to shift of the tool tip ornull
if the default shift should be used.
getCNToolTipShift
Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer. The default shift is 10px right and 0px below your mouse cursor. Be aware of the fact that you should at least position the tool tip 1px right to your mouse cursor else click events may not get propagated properly.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
Point
to shift of the tool tip ornull
if the default shift should be used.
getCNToolTipShift0
Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer. The default shift is 10px right and 0px below your mouse cursor. Be aware of the fact that you should at least position the tool tip 1px right to your mouse cursor else click events may not get propagated properly.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
Point
to shift of the tool tip ornull
if the default shift should be used.
getCNToolTipTimeDisplayed
The time in milliseconds the tool tip is shown for.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
- Time in milliseconds the tool tip is shown for, -1 for default.
getCNToolTipTimeDisplayed
The time in milliseconds the tool tip is shown for.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
- Time in milliseconds the tool tip is shown for, -1 for default.
getCNToolTipTimeDisplayed0
The time in milliseconds the tool tip is shown for.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
- Time in milliseconds the tool tip is shown for, -1 for default.
getCNToolTipDisplayDelayTime
The time in milliseconds until the tool tip is displayed.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
- Time in milliseconds until the tool tip is displayed, -1 for default.
getCNToolTipDisplayDelayTime
The time in milliseconds until the tool tip is displayed.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
- Time in milliseconds until the tool tip is displayed, -1 for default.
getCNToolTipDisplayDelayTime0
The time in milliseconds until the tool tip is displayed.- Parameters:
cell
- The cell (might be in a table), or null for none.- Returns:
- Time in milliseconds until the tool tip is displayed, -1 for default.
createCNToolTip
Requests creates of the Composite used to show the tooltip.- Parameters:
event
- Event triggering the tooltip (mouse hover).cell
- The cell (might be in a table).parent
- The parent composite.- Returns:
- The created composite in the parent.
appendTooltipPropErrors
Appends property error information to a Composite that has a grid layout of 2 columns.- Parameters:
composite
- The composite.
appendTooltipPropErrors
Appends property error information to a Composite that has a grid layout of 2 columns.- Parameters:
composite
- The composite.property
- The property container with the errors.- Returns:
- true if errors were added, false for nothing.
createCNToolTip
public static Composite createCNToolTip(GProp<?> property, Event event, ViewerCell cell, Composite parent) Requests creates of the Composite used to show the tooltip.- Parameters:
event
- Event triggering the tooltip (mouse hover).cell
- The cell (might be in a table).parent
- The parent composite.- Returns:
- The created composite in the parent.
createCNToolTip0
protected Composite createCNToolTip0(GProp<?> property, Event event, ViewerCell cell, Composite parent) Requests creates of the Composite used to show the tooltip.- Parameters:
event
- Event triggering the tooltip (mouse hover).cell
- The cell (might be in a table).parent
- The parent composite.- Returns:
- The created composite in the parent.
createCNToolTipItemList
public static Composite createCNToolTipItemList(Composite parent, PropCnr pc, List<TooltipItem> list, boolean appendErrors) Creates a simple list of items for a property with appended property error information.- Parameters:
parent
- The parent composite.pc
- The property to display children items as properties.list
- The list of items to display if they exist.appendErrors
- Appends errors.- Returns:
- A composite for the tooltip.
getSubPropertyName
Get the name of a sub-property. A checks is done against the entries in the Property Editor.- Returns:
- The name of the property, or null for none.
getPropertyEditorSetup
Gets the Setup used for iiziGo, subclasses must override and provide their instance.toString
Provides a toString for the Go Into Project Explorer View.paste
public PasteFeedback paste(boolean doPerformPaste, int position, GProp<?>[] props, int operation, String description, IPropUndoRedo undoRedo) Validates or performs a paste operation. The paste can be a move operation.- Parameters:
doPerformPaste
- Flag indication operation is to be performed (true) or just tested for validity (false).position
- Position for paste: -1=before target, 0=in target, 1=after target.props
- The properties.operation
- The operation: OP_COPY, OP_MOVE.description
- The description of the operation "source" for undo history.undoRedo
- The undo/redo interface.- Returns:
- The feed-back instance.
isBeforeAfterDropTarget
public boolean isBeforeAfterDropTarget()Gets the drop index in the parent container if possible. This checks if this DesignerProp has a valid drop-parent with indexes relevant, i.e. to provide feed-back for insertion lines in e.g. trees.- Returns:
- -1 If not valid index, i.e. no insertion lines should be visible.
createImageDefinitions
Asks the user if SVG or plain image definitions should be created for the dropped asset files.- Parameters:
names
- The file names names of the "images", not all (or none could be images).undoRedo
- The undo/redo interface.- Returns:
- null for no error, otherwise an error string.
- Throws:
IllegalStateException
- If this is not a folder in the assets folder!
validateClasses
protected boolean validateClasses(boolean doPerform, PropCnr target, GProp<?>[] props, boolean isMove) Validates the target property container classes for paste.- Parameters:
doPerform
- The perform flag, false means just testing.target
- Target property.props
- Properties to move or paste.isMove
- Flag for move if true, false means paste.
pasteProperties
public String pasteProperties(boolean doPerformPaste, GProp<?>[] props, int operation, String description, IPropUndoRedo undoRedo, GProp<?> reference, boolean isAfter) Validates or performs a paste operation. The paste can be a move operation.- Parameters:
doPerformPaste
- Flag indication operation is to be performed (true) or just tested for validity (false).props
- The properties.operation
- The operation: OP_COPY or OP_MOVE.description
- The description of the operation "source" for undo history.undoRedo
- The undo/redo interface.reference
- Reference property where to place the new properties (important only when container has index-based ordering).isAfter
- Flag for after, otherwise before.- Returns:
- The error message if not valid,
null
if OK.
getContextMenuItems
Gets all command contribution items to use for a property container. The list first checks the registered class for identical match, then if the list contains interfaces, they are checked if the property implements them.- Returns:
- The list of command contribution items.
addContextMenuItems
Fills the contribution menu with ContextMenuItems. A separator is added prior to the items if the menu is not empty.addContextMenuItems
Fills the pop-up menu with ContextMenuItems. A separator is added prior to the items if the menu is not empty.addContextMenuItems
public void addContextMenuItems(Control formControl, IzMenu menu, IPropUndoRedo undoRedo, DesignerProp target) Fills the pop-up menu with ContextMenuItems. A separator is added prior to the items if the menu is not empty.canPerform
Checks if an operation on this property is permitted. Subclasses can override this method and return an error message, the default is to return null.- Parameters:
operation
- The operation: OP_MOVE or OP_DELETE.- Returns:
- null for OK, otherwise an error message.
onEvent
Property event from property container.- Specified by:
onEvent
in interfaceEventListener
- Parameters:
event
- The property event.
processQuery
Processing of Query message. Fill in what is possible. Subclasses can extend this method to provide further processing.clearPropErrorMarkers
public final void clearPropErrorMarkers()This method should be called from a builder that receives the "clean" event, it just clears the markers internally in DesignerProp.rebuildPropErrorMarkers
public final void rebuildPropErrorMarkers()Rebuilds the error markers without touching the resource marker, triggers a rebuild of this property if it contains any errors in the tree and its an instance ofISynchronizeMarkers
. This method should be called from a builder that receives the "clean" event.onPropErrorChanged
public final void onPropErrorChanged()Called fromISynchronizeEclipseMarkers
when a property error change occurs in order to set the errors correctly for the file resource.getUndoContextFromTree
Find an UndoContext for this property of from one of it's parents.- Returns:
- null if not found, otherwise the undo context.
doSortIndexOnCategories
public boolean doSortIndexOnCategories()Sorting on index, but categories first.- Returns:
- false for default, override to set true to use the categories.