org.topbraidcomposer.navigation.propertiestree
Class PropertiesTreeView

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.ViewPart
              extended by org.topbraidcomposer.ui.views.AbstractView
                  extended by org.topbraidcomposer.ui.views.AbstractStructuredViewerView
                      extended by org.topbraidcomposer.navigation.AbstractTreeView
                          extended by org.topbraidcomposer.navigation.propertiestree.PropertiesTreeView
All Implemented Interfaces:
java.util.EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.core.runtime.Preferences.IPropertyChangeListener, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation, IChangeEngineListener, IModelSelectionListener, IResourceSelectionListener, IOtherSelectingView, PreferenceConstants, IRefreshableWorkbenchPart, IResourceHighlighter, IResourceSelector

public class PropertiesTreeView
extends AbstractTreeView
implements org.eclipse.core.runtime.Preferences.IPropertyChangeListener, IResourceHighlighter, IChangeEngineListener, IModelSelectionListener, PreferenceConstants, IResourceSelectionListener

The "Properties" view in TopBraid. This view shows the sub-property hierarchy in a TreeViewer.

Author:
Holger Knublauch

Field Summary
 
Fields inherited from class org.topbraidcomposer.navigation.AbstractTreeView
treeViewer
 
Fields inherited from interface org.topbraidcomposer.navigation.propertiestree.preferences.PreferenceConstants
SHOW_DOMAINLESS_PROPERTIES, SHOW_MATCHING_PROPERTIES, SORT_ALPHABETICALLY
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
PropertiesTreeView()
           
 
Method Summary
 boolean canHighlight(com.hp.hpl.jena.rdf.model.Resource resource)
           
 void changeOperationPerformed(ChangeOperation operation, boolean undone)
          Notifies the receiver that changes to one or more Graphs have been performed.
protected  org.eclipse.jface.viewers.StructuredViewer createStructuredViewer(org.eclipse.swt.widgets.Composite parent)
           
 void dispose()
           
static PropertiesTreeView get()
           
 java.util.Set getSelectedProperties()
           
 void graphChangePerformed()
          Notifies the receiver that a global change to the current model has been performed.
 void graphDirty(com.hp.hpl.jena.graph.Graph graph)
          Called when a Graph has been set to dirty.
 void highlightResource(com.hp.hpl.jena.rdf.model.Resource resource)
           
 void modelSelectionChanged()
          Called by the ModelSelection singleton after the currently selected model has changed.
 void propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event)
           
 void refreshWorkbenchPart(boolean structural)
          Refreshs the part from the currently selected model and settings.
 void resourceSelected(com.hp.hpl.jena.rdf.model.Resource resource)
          Called when the resource selection has changed.
 void setSelectedProperty(com.hp.hpl.jena.rdf.model.Resource property)
           
 void setSelectedProperty(java.lang.String propertyURI)
           
protected  void setupDragAndDrop()
           
 void updateTreeViewer()
           
 
Methods inherited from class org.topbraidcomposer.navigation.AbstractTreeView
getRoot, getSelectedTreeNode, getTreeViewer, selectOther, update
 
Methods inherited from class org.topbraidcomposer.ui.views.AbstractStructuredViewerView
addDragSupport, addDropSupport, createDoubleClickAction, createMainControls, fillContextMenu, getDragSource, getSelectedResources, getSelection, getStructuredViewer, hookContextMenu, initUnselector, recreateViewer, setFocus
 
Methods inherited from class org.topbraidcomposer.ui.views.AbstractView
asyncExec, close, createPartControl, focusResourceEditor
 
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Constructor Detail

PropertiesTreeView

public PropertiesTreeView()
Method Detail

canHighlight

public boolean canHighlight(com.hp.hpl.jena.rdf.model.Resource resource)
Specified by:
canHighlight in interface IResourceHighlighter

changeOperationPerformed

public void changeOperationPerformed(ChangeOperation operation,
                                     boolean undone)
Description copied from interface: IChangeEngineListener
Notifies the receiver that changes to one or more Graphs have been performed.

Specified by:
changeOperationPerformed in interface IChangeEngineListener
Parameters:
operation - the ModelOperation that was executed, redone or undone
undone - true if the operation has been undone

createStructuredViewer

protected org.eclipse.jface.viewers.StructuredViewer createStructuredViewer(org.eclipse.swt.widgets.Composite parent)
Overrides:
createStructuredViewer in class AbstractTreeView

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class AbstractStructuredViewerView

get

public static PropertiesTreeView get()

getSelectedProperties

public java.util.Set getSelectedProperties()

graphChangePerformed

public void graphChangePerformed()
Description copied from interface: IChangeEngineListener
Notifies the receiver that a global change to the current model has been performed. This is typically called when new sub-Graphs have been added or removed, allowing the receiver to do a complete refresh.

Specified by:
graphChangePerformed in interface IChangeEngineListener

graphDirty

public void graphDirty(com.hp.hpl.jena.graph.Graph graph)
Description copied from interface: IChangeEngineListener
Called when a Graph has been set to dirty.

Specified by:
graphDirty in interface IChangeEngineListener
Parameters:
graph - the Graph that has changed

highlightResource

public void highlightResource(com.hp.hpl.jena.rdf.model.Resource resource)
Specified by:
highlightResource in interface IResourceHighlighter

modelSelectionChanged

public void modelSelectionChanged()
Description copied from interface: IModelSelectionListener
Called by the ModelSelection singleton after the currently selected model has changed.

Specified by:
modelSelectionChanged in interface IModelSelectionListener

propertyChange

public void propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent event)
Specified by:
propertyChange in interface org.eclipse.core.runtime.Preferences.IPropertyChangeListener

refreshWorkbenchPart

public void refreshWorkbenchPart(boolean structural)
Description copied from interface: IRefreshableWorkbenchPart
Refreshs the part from the currently selected model and settings. This should for example rebuild the whole tree, table or whatever else to ensure that the current state of the model is displayed.

Specified by:
refreshWorkbenchPart in interface IRefreshableWorkbenchPart
Overrides:
refreshWorkbenchPart in class AbstractStructuredViewerView
Parameters:
structural - true to completely rebuild everything, in response to structural changes - false may only refresh icons and labels.

resourceSelected

public void resourceSelected(com.hp.hpl.jena.rdf.model.Resource resource)
Description copied from interface: IResourceSelectionListener
Called when the resource selection has changed. This method is called as a side effect by the ResourceSelection class.

Specified by:
resourceSelected in interface IResourceSelectionListener
Parameters:
resource - the new selection

setSelectedProperty

public void setSelectedProperty(java.lang.String propertyURI)

setSelectedProperty

public void setSelectedProperty(com.hp.hpl.jena.rdf.model.Resource property)

setupDragAndDrop

protected void setupDragAndDrop()
Overrides:
setupDragAndDrop in class AbstractStructuredViewerView

updateTreeViewer

public void updateTreeViewer()