Class DesignerProp
- All Implemented Interfaces:
INavigatorPresentation,EventListener,org.eclipse.core.runtime.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
FieldsModifier and TypeFieldDescriptionstatic final org.eclipse.core.runtime.QualifiedNameThe qualified name for session property to link an IResource to a property.final booleanFlag for if this is a folder module property.final booleanFlag for if this is the root property.static final ContextMenuActionAdapterMove down property context menu action.static final ContextMenuActionAdapterMove up property context menu action.static final intCopy operation.static final intDelete operation.static final intMove operation.protected final PropCnrThe 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_FOLDERSConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionstatic voidaddCommandContributionItem(ContextMenuItem item, Class<?>... classes) Adds an Add command contribution item for the DesignerProp class.voidaddContextMenuItems(org.eclipse.jface.action.IMenuManager menu) Fills the contribution menu with ContextMenuItems.voidaddContextMenuItems(org.eclipse.jface.viewers.Viewer viewer, IzMenu menu, IPropUndoRedo undoRedo) Fills the pop-up menu with ContextMenuItems.voidaddContextMenuItems(org.eclipse.swt.widgets.Control formControl, IzMenu menu, IPropUndoRedo undoRedo, DesignerProp target) Fills the pop-up menu with ContextMenuItems.voidaddMarker(PropMarker marker) Adds a marker to the property.org.eclipse.jface.viewers.StyledStringappendCNStyledTextAdditions(org.eclipse.jface.viewers.StyledString ss, int flags) Appends optional items to styled text.voidappendTooltipPropErrors(org.eclipse.swt.widgets.Composite composite) Appends property error information to a Composite that has a grid layout of 2 columns.static booleanappendTooltipPropErrors(org.eclipse.swt.widgets.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 voidThis method should be called from a builder that receives the "clean" event, it just clears the markers internally in DesignerProp.static org.eclipse.swt.widgets.CompositecreateCNToolTip(GProp<?> property, org.eclipse.swt.widgets.Event event, org.eclipse.jface.viewers.ViewerCell cell, org.eclipse.swt.widgets.Composite parent) Requests creates of the Composite used to show the tooltip.org.eclipse.swt.widgets.CompositecreateCNToolTip(org.eclipse.swt.widgets.Event event, org.eclipse.jface.viewers.ViewerCell cell, org.eclipse.swt.widgets.Composite parent) Requests creates of the Composite used to show the tooltip.protected org.eclipse.swt.widgets.CompositecreateCNToolTip0(GProp<?> property, org.eclipse.swt.widgets.Event event, org.eclipse.jface.viewers.ViewerCell cell, org.eclipse.swt.widgets.Composite parent) Requests creates of the Composite used to show the tooltip.static org.eclipse.swt.widgets.CompositecreateCNToolTipItemList(org.eclipse.swt.widgets.Composite parent, PropCnr pc, List<TooltipItem> list, boolean appendErrors) Creates a simple list of items for a property with appended property error information.static AtomcreateFileErrorAtom(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 voiddispose()Called when the DesignerProp is disposed of due to dispose of the associated property.booleanSorting on index, but categories first.voidFlags the property for update in the viewer(s).<T> TgetAdapter(Class<T> adapter) Adapts to the IResource or to an IIZI Property.org.eclipse.swt.graphics.ColorgetCNBackground(int columnIndex, int flags) Provides a background color for the given element at the specified indexstatic org.eclipse.swt.graphics.ColorgetCNBackground(GProp<?> property, int columnIndex, int flags) Provides a background color for the given element at the specified index.protected org.eclipse.swt.graphics.ColorgetCNBackground0(GProp<?> property, int columnIndex, int flags) Provides a background color for the given element at the specified index.intGets the category of this Common Navigator object, used for sorting.Object[]getCNChildren(int flags) Gets the children of this container for Common Navigator.Get theComparatorobject 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 StringgetCNDescription(GProp<?> property, int flags) Provide a description for the status bar view, if available.protected StringgetCNDescription0(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.org.eclipse.swt.graphics.ColorgetCNForeground(int columnIndex, int flags) Provides a foreground color for the given element.static org.eclipse.swt.graphics.ColorgetCNForeground(GProp<?> property, int columnIndex, int flags) Provides a foreground color for the given element.protected org.eclipse.swt.graphics.ColorgetCNForeground0(GProp<?> property, int columnIndex, int flags) Provides a foreground color for the given element.org.eclipse.swt.graphics.ImagegetCNImage(int flags) Gets the image for the Common Navigator.org.eclipse.swt.graphics.ImagegetCNImage(int columnIndex, int flags) Gets the image for the Common Tree Viewer showing column contents.static org.eclipse.swt.graphics.ImagegetCNImage(GProp<?> property, int flags) Gets the image for the Common Navigator.static org.eclipse.swt.graphics.ImagegetCNImage(GProp<?> property, int columnIndex, int flags) Gets the image for the Common Navigator.protected org.eclipse.swt.graphics.ImagegetCNImage0(GProp<?> property, int flags) Gets the image for the Common Navigator.protected org.eclipse.swt.graphics.ImagegetCNImage0(GProp<?> property, int columnIndex, int flags) Gets the image for the Common Navigator.getCNParent(int flags) Gets the parent for Common Navigator.static ObjectgetCNParent(GProp<?> property, int flags) Gets the parent for Common Navigator.Gets the "real" property when the DesignerProp has been retrieved from e.g.org.eclipse.jface.viewers.StyledStringgetCNStyledText(int flags) Gets the label text for the Common Navigator.static org.eclipse.jface.viewers.StyledStringgetCNStyledText(GProp<?> property, int flags) Gets the text for a sub-property for the Common Navigator.protected org.eclipse.jface.viewers.StyledStringgetCNStyledText0(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 StringGets the text for a sub-property for the Common Navigator.static StringGets the text for a sub-property for the Common Navigator.protected StringgetCNText0(GProp<?> property, int flags) Gets the text for a sub-property for the Common Navigator.protected StringgetCNText0(GProp<?> property, int columnIndex, int flags) Gets the text for a sub-property for the Common Navigator.static intgetCNToolTipDisplayDelayTime(GProp<?> property, org.eclipse.jface.viewers.ViewerCell cell) The time in milliseconds until the tool tip is displayed.intgetCNToolTipDisplayDelayTime(org.eclipse.jface.viewers.ViewerCell cell) The time in milliseconds until the tool tip is displayed.protected intgetCNToolTipDisplayDelayTime0(GProp<?> property, org.eclipse.jface.viewers.ViewerCell cell) The time in milliseconds until the tool tip is displayed.static org.eclipse.swt.graphics.PointgetCNToolTipShift(GProp<?> property, org.eclipse.jface.viewers.ViewerCell cell) Return the amount of pixels in x and y direction you want the tool tip to pop up from the mouse pointer.org.eclipse.swt.graphics.PointgetCNToolTipShift(org.eclipse.jface.viewers.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 org.eclipse.swt.graphics.PointgetCNToolTipShift0(GProp<?> property, org.eclipse.jface.viewers.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 intgetCNToolTipTimeDisplayed(GProp<?> property, org.eclipse.jface.viewers.ViewerCell cell) The time in milliseconds the tool tip is shown for.intgetCNToolTipTimeDisplayed(org.eclipse.jface.viewers.ViewerCell cell) The time in milliseconds the tool tip is shown for.protected intgetCNToolTipTimeDisplayed0(GProp<?> property, org.eclipse.jface.viewers.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.intChecks if a property has an error or warning in itself or the children.Gets the exception that occurred during loading of the file.final ModuleFolderGets the ModuleFolder for this property.final ModuleFolderPropCnrGets the module folder property container.ArrayList<?>Gets an ArrayList of IEditorFileAction.static ResourceDesignerPropgetInstance(org.eclipse.core.resources.IResource resource) Gets the instance of the property in a resource.static ResourceDesignerPropgetInstance(org.eclipse.core.resources.IResource resource, boolean logError) Gets the instance of the property in a resource.final org.eclipse.core.resources.IResourceGets the IResource object for this property container.final org.eclipse.jdt.core.IJavaProjectGets the Java project.Gets the array of markers in this property.final ModuleModelgetModel()Gets the Module Model.final longGets the file modification stamp.final DesignerPropGets the parent.final FolderPropCnrGets the parent folder property container.final org.eclipse.core.resources.IProjectGets the project.final PropCnrGets the originating property container.protected PropertyEditorSetupGets the Setup used for iiziGo, subclasses must override and provide their instance.final ModuleRootPropCnrgetRoot()Gets the root property container for the module project.getSubPropertyName(IGProp<?> subProperty) Get the name of a sub-property.static booleanGets the default paste operation allowed for transfer properties.org.eclipse.core.commands.operations.IUndoContextFind an UndoContext for this property of from one of it's parents.booleanhasCNChildren(int flags) Returns whether the given element has children for the Common Navigator.static booleanhasCNToolTip(GProp<?> property, org.eclipse.jface.viewers.ViewerCell cell) Checks for Common Navigator tool-tip for this item.booleanhasCNToolTip(org.eclipse.jface.viewers.ViewerCell cell) Checks for Common Navigator tool-tip for this item.protected booleanhasCNToolTip0(GProp<?> property, org.eclipse.jface.viewers.ViewerCell cell) Checks for Common Navigator tool-tip for this item.booleanhasMarkerID(String markerID) Checks for presence of a marker ID.booleanCheck for naming error in the property due to wrong file name.booleanGets the drop index in the parent container if possible.booleanisCNVisible(int flags) Checks if a property should be included in the view or if it's hidden or filtered out.booleanisCNVisible0(GProp<?> property, int flags) Checks if a property should be included in the view or if it's hidden or filtered out.final booleanFlag for designer-loaded-from-file.final booleanCheck for designer moved.voidProperty event from property container.final voidCalled fromISynchronizeEclipseMarkerswhen 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 voidProcessing of Query message.final voidRebuilds 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 voidremoveFileErrors(DesignerProp property) Removes all file errors for a property container.voidremoveMarkers(String markerID) Removes the marker "markerID" or all markers (when markerID is null) for the property.final voidSets designer loaded, once only, never cleared.final voidStarts the designer move of a property.voidsetException(Throwable exception) Sets the exception that occurred during loading of the file.voidsetIEditorFileActions(ArrayList<?> list) Sets an ArrayList of IEditorFileAction.final voidsetIResource(org.eclipse.core.resources.IResource resource) Sets the IResource object for this property container.static voidsetIResource(org.eclipse.core.resources.IResource resource, DesignerProp prop, boolean checkPresence) Sets a session property for a resource.final voidsetModificationStamp(long stamp) Sets the file modification stamp.static voidsetTransferDefaultPasteAllowed(boolean on) Sets the default paste operation allowed for transfer properties.toString()Provides a toString for the Go Into Project Explorer View.voidupdateFolderResources(org.eclipse.core.resources.IFolder folder) This folder has been moved and needs updating the resource, along with all children properties.protected booleanvalidateClasses(boolean doPerform, PropCnr target, GProp<?>[] props, boolean isMove) Validates the target property container classes for paste.booleanvalidateResouce(org.eclipse.core.resources.IResource resource) Validates a resource against the designer property extension.
Field Details
DESIGNER_PROPERTY
public static final org.eclipse.core.runtime.QualifiedName DESIGNER_PROPERTYThe 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
public static ResourceDesignerProp getInstance(org.eclipse.core.resources.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
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
public final org.eclipse.core.resources.IProject getProject()Gets the project.- Returns:
- The project, or null if not found.
getJavaProject
public final org.eclipse.jdt.core.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
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:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable
setIResource
public final void setIResource(org.eclipse.core.resources.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(org.eclipse.core.resources.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 org.eclipse.core.resources.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(org.eclipse.core.resources.IResource resource) Validates a resource against the designer property extension.updateFolderResources
public void updateFolderResources(org.eclipse.core.resources.IFolder folder) 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:
getCNParentin 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:
getCNCategoryin interfaceINavigatorPresentation- Returns:
- This method returns zero, i.e. no category.
getCNComparator
Get theComparatorobject 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:
getCNComparatorin 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:
hasCNChildrenin 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:
trueif the node has children, andfalseif it has no children.
getCNChildren
Gets the children of this container for Common Navigator.- Specified by:
getCNChildrenin 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
public org.eclipse.swt.graphics.Image getCNImage(int flags) Gets the image for the Common Navigator.- Specified by:
getCNImagein interfaceINavigatorPresentation- Parameters:
flags- The flags for the image, see FLAG_IMAGE_*.- Returns:
- Image or
nullif 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
nullif 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
nullif there is no image.
getCNImage
public org.eclipse.swt.graphics.Image getCNImage(int columnIndex, int flags) Gets the image for the Common Tree Viewer showing column contents.- Specified by:
getCNImagein 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
nullif there is no image for the given object at columnIndex.
getCNImage
public static org.eclipse.swt.graphics.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
nullif 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
nullif there is no image.
getCNText
Gets the label text for the Common Navigator.- Specified by:
getCNTextin interfaceINavigatorPresentation- Returns:
- String or or
nullif 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:
getCNTextin interfaceINavigatorPresentation- Parameters:
columnIndex- The zero-based index for the column (zero is never used, the method getCNText() is called instead.- Returns:
- String or or
nullif 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
public org.eclipse.swt.graphics.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
nullto use the default foreground color.
getCNForeground
public static org.eclipse.swt.graphics.Color getCNForeground(GProp<?> property, int columnIndex, int flags) Provides a foreground color for the given element.getCNForeground0
protected org.eclipse.swt.graphics.Color getCNForeground0(GProp<?> property, int columnIndex, int flags) Provides a foreground color for the given element.getCNBackground
public org.eclipse.swt.graphics.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
nullto use the default background color.
getCNBackground
public static org.eclipse.swt.graphics.Color getCNBackground(GProp<?> property, int columnIndex, int flags) Provides a background color for the given element at the specified index.getCNBackground0
protected org.eclipse.swt.graphics.Color getCNBackground0(GProp<?> property, int columnIndex, int flags) Provides a background color for the given element at the specified index.getCNStyledText
public org.eclipse.jface.viewers.StyledString getCNStyledText(int flags) Gets the label text for the Common Navigator.- Specified by:
getCNStyledTextin 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
public org.eclipse.jface.viewers.StyledString appendCNStyledTextAdditions(org.eclipse.jface.viewers.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
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:
getCNDescriptionin 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
public boolean hasCNToolTip(org.eclipse.jface.viewers.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
Checks for Common Navigator tool-tip for this item.hasCNToolTip0
Checks for Common Navigator tool-tip for this item.getCNToolTipShift
public org.eclipse.swt.graphics.Point getCNToolTipShift(org.eclipse.jface.viewers.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:
Pointto shift of the tool tip ornullif the default shift should be used.
getCNToolTipShift
public static org.eclipse.swt.graphics.Point getCNToolTipShift(GProp<?> property, org.eclipse.jface.viewers.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:
Pointto shift of the tool tip ornullif the default shift should be used.
getCNToolTipShift0
protected org.eclipse.swt.graphics.Point getCNToolTipShift0(GProp<?> property, org.eclipse.jface.viewers.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:
Pointto shift of the tool tip ornullif the default shift should be used.
getCNToolTipTimeDisplayed
public int getCNToolTipTimeDisplayed(org.eclipse.jface.viewers.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, org.eclipse.jface.viewers.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, org.eclipse.jface.viewers.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(org.eclipse.jface.viewers.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, org.eclipse.jface.viewers.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, org.eclipse.jface.viewers.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 org.eclipse.swt.widgets.Composite createCNToolTip(org.eclipse.swt.widgets.Event event, org.eclipse.jface.viewers.ViewerCell cell, org.eclipse.swt.widgets.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(org.eclipse.swt.widgets.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(org.eclipse.swt.widgets.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 org.eclipse.swt.widgets.Composite createCNToolTip(GProp<?> property, org.eclipse.swt.widgets.Event event, org.eclipse.jface.viewers.ViewerCell cell, org.eclipse.swt.widgets.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 org.eclipse.swt.widgets.Composite createCNToolTip0(GProp<?> property, org.eclipse.swt.widgets.Event event, org.eclipse.jface.viewers.ViewerCell cell, org.eclipse.swt.widgets.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 org.eclipse.swt.widgets.Composite createCNToolTipItemList(org.eclipse.swt.widgets.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,
nullif 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
public void addContextMenuItems(org.eclipse.jface.action.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(org.eclipse.jface.viewers.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(org.eclipse.swt.widgets.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:
onEventin 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 fromISynchronizeEclipseMarkerswhen a property error change occurs in order to set the errors correctly for the file resource.getUndoContextFromTree
public org.eclipse.core.commands.operations.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.