Class DesignerProp

java.lang.Object
com.iizigo.prop.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

public class DesignerProp extends Object implements IAdaptable, INavigatorPresentation, EventListener
The designer property extensions are located in this class, delegated from the original designer property classes in order to have one piece of code.
Author:
Christopher Mindus
  • Field Details

    • DESIGNER_PROPERTY

      public static final QualifiedName DESIGNER_PROPERTY
      The qualified name for session property to link an IResource to a property.
    • OP_COPY

      public static final int OP_COPY
      Copy operation.
      See Also:
    • OP_MOVE

      public static final int OP_MOVE
      Move operation.
      See Also:
    • OP_DELETE

      public static final int OP_DELETE
      Delete operation.
      See Also:
    • moveUpProperty

      public static final ContextMenuActionAdapter moveUpProperty
      Move up property context menu action.
    • moveDownProperty

      public static final ContextMenuActionAdapter moveDownProperty
      Move down property context menu action.
    • propertyContainer

      protected final PropCnr propertyContainer
      The owner.
    • isRoot

      public final boolean isRoot
      Flag for if this is the root property.
    • isFolder

      public final boolean isFolder
      Flag for if this is a folder module property.
  • Constructor Details

    • DesignerProp

      public DesignerProp(PropCnr propertyContainer)
      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

      public static void addCommandContributionItem(ContextMenuItem item, Class<?>... classes)
      Adds an Add command contribution item for the DesignerProp class.
      Parameters:
      item - The item to add.
      classes - The classes, should extend PropCnr.
    • removeFileErrors

      public static void removeFileErrors(DesignerProp property)
      Removes all file errors for a property container.
    • createFileErrorAtom

      public static Atom createFileErrorAtom(PropCnr parentContainer)
      Creates a unique property atom for file errors for a property.
    • getInstance

      public static ResourceDesignerProp getInstance(IResource resource)
      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

      public static ResourceDesignerProp getInstance(IResource resource, boolean logError)
      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

      public final PropCnr getPropCnr()
      Gets the originating property container.
    • getParentFolderProp

      public final FolderPropCnr getParentFolderProp()
      Gets the parent folder property container.
      Returns:
      The parent folder property container, or null if not found.
    • getFolderProp

      public final ModuleFolderPropCnr getFolderProp()
      Gets the module folder property container.
      Returns:
      The folder property container, or null if not found.
    • getFolder

      public final ModuleFolder getFolder()
      Gets the ModuleFolder for this property.
      Returns:
      The module folder, or null if not found.
    • getRoot

      public final ModuleRootPropCnr getRoot()
      Gets the root property container for the module project.
      Returns:
      The root property container, or null if not found.
    • getModel

      public final ModuleModel getModel()
      Gets the Module Model.
      Returns:
      The Module Model or null if not found.
    • getProject

      public final IProject getProject()
      Gets the project.
      Returns:
      The project, or null if not found.
    • getJavaProject

      public final IJavaProject 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

      public <T> T getAdapter(Class<T> adapter)
      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 interface IAdaptable
    • setIResource

      public final void setIResource(IResource resource)
      Sets the IResource object for this property container.
      Parameters:
      resource - The IResource object or null to clear it.
    • setIResource

      public static void setIResource(IResource resource, DesignerProp prop, boolean checkPresence)
      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

      public final IResource 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

      public boolean validateResouce(IResource resource)
      Validates a resource against the designer property extension.
    • updateFolderResources

      public void updateFolderResources(IFolder folder)
      This folder has been moved and needs updating the resource, along with all children properties.
    • setException

      public void setException(Throwable exception)
      Sets the exception that occurred during loading of the file.
      Parameters:
      exception - The exception or null for no error.
    • getException

      public Throwable getException()
      Gets the exception that occurred during loading of the file.
      Returns:
      The exception or null for no error.
    • setIEditorFileActions

      public void setIEditorFileActions(ArrayList<?> list)
      Sets an ArrayList of IEditorFileAction.
    • getIEditorFileActions

      public ArrayList<?> getIEditorFileActions()
      Gets an ArrayList of IEditorFileAction.
    • firePropertyUpdateViewerEvent

      public void firePropertyUpdateViewerEvent()
      Flags the property for update in the viewer(s).
    • addMarker

      public void addMarker(PropMarker marker)
      Adds a marker to the property.
      Parameters:
      marker - The marker.
    • hasMarkerID

      public boolean hasMarkerID(String markerID)
      Checks for presence of a marker ID.
    • removeMarkers

      public void removeMarkers(String markerID)
      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

      public PropMarker[] 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

      public final DesignerProp 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

      public Object getCNParent(int flags)
      Gets the parent for Common Navigator.
      Specified by:
      getCNParent in interface INavigatorPresentation
      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

      public static Object getCNParent(GProp<?> property, int flags)
      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

      public DesignerProp 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 interface INavigatorPresentation
      Returns:
      This method returns zero, i.e. no category.
    • getCNComparator

      public IViewerComparator getCNComparator()
      Get the Comparator 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 interface INavigatorPresentation
      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

      public boolean isCNVisible0(GProp<?> property, int flags)
      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 interface INavigatorPresentation
      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, and false if it has no children.
    • getCNChildren

      public Object[] getCNChildren(int flags)
      Gets the children of this container for Common Navigator.
      Specified by:
      getCNChildren in interface INavigatorPresentation
      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

      public Image getCNImage(int flags)
      Gets the image for the Common Navigator.
      Specified by:
      getCNImage in interface INavigatorPresentation
      Parameters:
      flags - The flags for the image, see FLAG_IMAGE_*.
      Returns:
      Image or null if there is no image.
    • getCNImage

      public static Image getCNImage(GProp<?> property, int flags)
      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

      protected Image getCNImage0(GProp<?> property, int flags)
      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

      public Image getCNImage(int columnIndex, int flags)
      Gets the image for the Common Tree Viewer showing column contents.
      Specified by:
      getCNImage in interface INavigatorPresentation
      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

      public static Image getCNImage(GProp<?> property, int columnIndex, int flags)
      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

      protected Image getCNImage0(GProp<?> property, int columnIndex, int flags)
      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

      public String getCNText(int flags)
      Gets the label text for the Common Navigator.
      Specified by:
      getCNText in interface INavigatorPresentation
      Returns:
      String or or null if there is no text.
    • getCNText

      public static String getCNText(GProp<?> property, int flags)
      Gets the text for a sub-property for the Common Navigator.
    • getCNText0

      protected String getCNText0(GProp<?> property, int flags)
      Gets the text for a sub-property for the Common Navigator.
    • getCNText

      public String getCNText(int columnIndex, int flags)
      Gets the label text for the Common Navigator.
      Specified by:
      getCNText in interface INavigatorPresentation
      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

      public static String getCNText(GProp<?> property, int columnIndex, int flags)
      Gets the text for a sub-property for the Common Navigator.
    • getCNText0

      protected String getCNText0(GProp<?> property, int columnIndex, int flags)
      Gets the text for a sub-property for the Common Navigator.
    • getCNForeground

      public Color getCNForeground(int columnIndex, int flags)
      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

      public static Color getCNForeground(GProp<?> property, int columnIndex, int flags)
      Provides a foreground color for the given element.
    • getCNForeground0

      protected Color getCNForeground0(GProp<?> property, int columnIndex, int flags)
      Provides a foreground color for the given element.
    • getCNBackground

      public Color getCNBackground(int columnIndex, int flags)
      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

      public static Color getCNBackground(GProp<?> property, int columnIndex, int flags)
      Provides a background color for the given element at the specified index.
    • getCNBackground0

      protected Color getCNBackground0(GProp<?> property, int columnIndex, int flags)
      Provides a background color for the given element at the specified index.
    • getCNStyledText

      public StyledString getCNStyledText(int flags)
      Gets the label text for the Common Navigator.
      Specified by:
      getCNStyledText in interface INavigatorPresentation
      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

      public StyledString appendCNStyledTextAdditions(StyledString ss, int flags)
      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

      public static StyledString getCNStyledText(GProp<?> property, int flags)
      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

      protected StyledString getCNStyledText0(GProp<?> property, int flags)
      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

      public String getCNDescription(int flags)
      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 interface INavigatorPresentation
      Returns:
      A description for the status bar view, or null if not available.
    • getCNDescription

      public static String getCNDescription(GProp<?> property, int flags)
      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

      protected String getCNDescription0(GProp<?> property, int flags)
      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

      public String 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

      public DesignerProp 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

      public boolean hasCNToolTip(ViewerCell cell)
      Checks for Common Navigator tool-tip for this item.
      Parameters:
      cell - The cell (might be in a table), or null for none.
    • hasCNToolTip

      public static boolean hasCNToolTip(GProp<?> property, ViewerCell cell)
      Checks for Common Navigator tool-tip for this item.
    • hasCNToolTip0

      protected boolean hasCNToolTip0(GProp<?> property, ViewerCell cell)
      Checks for Common Navigator tool-tip for this item.
    • getCNToolTipShift

      public Point 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. 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 or null if the default shift should be used.
    • getCNToolTipShift

      public 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. 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 or null if the default shift should be used.
    • getCNToolTipShift0

      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. 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 or null if the default shift should be used.
    • getCNToolTipTimeDisplayed

      public int getCNToolTipTimeDisplayed(ViewerCell cell)
      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

      public static int getCNToolTipTimeDisplayed(GProp<?> property, ViewerCell cell)
      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

      protected int getCNToolTipTimeDisplayed0(GProp<?> property, ViewerCell cell)
      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

      public int getCNToolTipDisplayDelayTime(ViewerCell cell)
      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

      public static int getCNToolTipDisplayDelayTime(GProp<?> property, ViewerCell cell)
      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

      protected int getCNToolTipDisplayDelayTime0(GProp<?> property, ViewerCell cell)
      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

      public Composite createCNToolTip(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.
    • appendTooltipPropErrors

      public void appendTooltipPropErrors(Composite composite)
      Appends property error information to a Composite that has a grid layout of 2 columns.
      Parameters:
      composite - The composite.
    • appendTooltipPropErrors

      public static boolean appendTooltipPropErrors(Composite composite, GProp<?> property)
      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

      public String getSubPropertyName(IGProp<?> subProperty)
      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

      protected PropertyEditorSetup getPropertyEditorSetup()
      Gets the Setup used for iiziGo, subclasses must override and provide their instance.
    • toString

      public String toString()
      Provides a toString for the Go Into Project Explorer View.
      Overrides:
      toString in class Object
    • 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

      public String createImageDefinitions(List<String> names, IPropUndoRedo undoRedo)
      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

      public ArrayList<ContextMenuItem> 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

      public void addContextMenuItems(IMenuManager menu)
      Fills the contribution menu with ContextMenuItems. A separator is added prior to the items if the menu is not empty.
    • addContextMenuItems

      public void addContextMenuItems(Viewer viewer, IzMenu menu, IPropUndoRedo undoRedo)
      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

      public String canPerform(int operation)
      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

      public void onEvent(GEvent event)
      Property event from property container.
      Specified by:
      onEvent in interface EventListener
      Parameters:
      event - The property event.
    • processQuery

      protected void processQuery(QueryDesignerPropEvent query)
      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 of ISynchronizeMarkers. This method should be called from a builder that receives the "clean" event.
    • onPropErrorChanged

      public final void onPropErrorChanged()
      Called from ISynchronizeEclipseMarkers when a property error change occurs in order to set the errors correctly for the file resource.
    • getUndoContextFromTree

      public IUndoContext 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.