Weaving Panel

org.eclipse.weaver.weavingPanelID

1.0

This extension defines the main component of the Model Weaver framework. The weaving panel must contain all the logic that handles a weaving section (selecting, creating, updating new links, showing them in a graphical way, etc.). If more than one weaving extension is defined the user can choose it in the Model Weaver wizard. It also defines extensions for item providers.

<!ELEMENT extension (weavingPanel)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED>


<!ELEMENT weavingPanel EMPTY>

<!ATTLIST weavingPanel

class CDATA #REQUIRED

name  CDATA #IMPLIED>

The weaving panel configuration element



It defines a weaving panel implemented in the class DefaultWeavingPanel. It is the base implementation of the model weaver.
 

<extension point=

"org.eclipse.weaver.weavingPanelID"

id=

"DefaultWeavingPanelExtension"

>

<weavingPanel name=

"Base weaving panel extension"

class=

"org.eclipse.weaver.extension.panel.DefaultWeavingPanel"

/>

</extension>

Interface for weaving panel extension
public interface IWeavingPanel extends IMenuListener, IPropertyListener, Listener, IWeaverMenuAdapter {

 /**
  * Initialize the panel with the reference of the Global Editor
  * @param editor
  */
 public void init(GlobalWeaverEditor editor);
    /**
     * Create the viewer
     * @param parent
     */
 public Viewer createViewer(Composite parent); 
    /**
     * Create the control
     * @param parent
     */
 public void createControl(Composite parent);
    /**
     * Get the viewer
     * @return
     */
 public Viewer getViewer();
 /**
     * Sets the ressource set input
     * @param input the ressource set
     */
 public void setInput(ResourceSet input);
    /**
     * Sets the panel title for ContentViewer
     * @param object
     */
 public void setTitle(Object object);
    /**
     * Set the panel title
     * @param title
     * @param image
     */
 public void setTitle(String title, Image image);
 /**
  * Dispose the panel
  */
 public void dispose();
 /**
  * adds a new selection listener.  
  * @param listener
  */
 public void addWeaverSelectionChangedListener(IWSelectionChangedListener listener);
 /**
  * removes the selection listener
  * @param listener
  */
 public void removeWeaverSelectionChangedListener(IWSelectionChangedListener listener);
}
-----------------------------------------------------------------------------------------------
Overview of other implemented interfaces 

-->

IMenuListener - public void menuAboutToShow(IMenuManager manager); To populate pop up menus with previous defined elements (see IWeaverMenuAdapter) -->

IPropertyListener - public void propertyChanged(Object source, int propId); To change/refresh property values -->

Listener - void handleEvent (Event event); Listen to other windows events (like drag and drop) -->

IWeaverMenuAdapter used to create the pop up menu objects. It wraps the MenuContributor. - public void createActions(EObject eObj); creates a list with sub menu actions associated with this eObj - public void populateMenuAboutToShow(IMenuManager parentMenu); populates the menu with the private actions into the parent menu specified

There is a default supplied implementation of this extension point in the Model Weaver Base Extension plugin "org.eclipse.weaver.extension.base". It provides all the needed functionalities for starting a weaving section. But it can be totaly redefined using this extension point.