com.omondo.uml.std.external.profile
Class AbstractProfile

java.lang.Object
  extended bycom.omondo.uml.std.external.profile.AbstractProfile
All Implemented Interfaces:
OmondoProfile

public abstract class AbstractProfile
extends java.lang.Object
implements OmondoProfile


Field Summary
protected  java.lang.Object model
           
protected  org.eclipse.core.resources.IProject project
           
 
Constructor Summary
AbstractProfile()
           
 
Method Summary
 void addFragment(ProfileFragment fragment)
          Internal use
 boolean canBeActivated()
          This method may be used to check requierements for this profile and is called when the user selects the checkbox on the Omondo profile page in the project properties.
 org.eclipse.jface.action.IContributionItem[] getActions(int diagramType)
          Internal use
 org.eclipse.uml2.Element getElement()
          Returns the associated UML2 element (Usually a package object).
 ProfileFragment[] getFragments(int diagramType, int elementType)
          Internal use
 ProfileFragment[] getFragments(java.lang.String stereotype, int diagramType, int elementType)
          Internal use
 java.lang.String getId()
           
 org.eclipse.swt.graphics.Image getImage()
           
 java.lang.String getModelPath()
          Returns the path of the resource which contains the associated profile.
 java.lang.String getName()
           
 org.eclipse.jface.action.IContributionItem[] getNewActions(int diagramType)
          Internal use
 org.eclipse.uml2.Profile getProfile()
          Returns the associated UML2 profile.
 org.eclipse.core.resources.IProject getProject()
           
 com.omondo.uml.ui.editors.editmodel.Properties getProperties()
          Allow to acces and modify the profile's properties.
 ProfilePropertiesEditor getPropertyEditor()
          Return the editor used in the project properties to edit the properties of the profile.
 com.omondo.uml.ui.editors.editmodel.Properties getTaggedValues()
           
 void init(org.eclipse.core.resources.IProject project)
          Internal use
protected  void registerAction(org.eclipse.jface.action.Action action, int diagramType)
           
protected  void registerAction(org.eclipse.jface.action.IContributionItem action, int diagramType)
           
protected abstract  void registerDefaultContributionItems()
          The Action/contribution items must be registered in this method by the mean of the addContributionItem methods.
protected  void registerNewAction(org.eclipse.jface.action.Action action, int diagramType)
           
protected  void registerNewAction(org.eclipse.jface.action.IContributionItem action, int diagramType)
           
protected abstract  void registerNewContributionItems()
          The Action/contribution items must be registered in this method by the mean of the addNewContributionItem methods.
 void setModel(java.lang.Object model)
          Internal use
 boolean setTaggedValues(com.omondo.uml.ui.editors.editmodel.Properties taggedValues)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project

protected org.eclipse.core.resources.IProject project

model

protected java.lang.Object model
Constructor Detail

AbstractProfile

public AbstractProfile()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface OmondoProfile

getImage

public org.eclipse.swt.graphics.Image getImage()
Specified by:
getImage in interface OmondoProfile

canBeActivated

public boolean canBeActivated()
Description copied from interface: OmondoProfile
This method may be used to check requierements for this profile and is called when the user selects the checkbox on the Omondo profile page in the project properties.

Specified by:
canBeActivated in interface OmondoProfile
Returns:

getPropertyEditor

public ProfilePropertiesEditor getPropertyEditor()
Description copied from interface: OmondoProfile
Return the editor used in the project properties to edit the properties of the profile. Default implementation returns null

Specified by:
getPropertyEditor in interface OmondoProfile

getProject

public org.eclipse.core.resources.IProject getProject()
Specified by:
getProject in interface OmondoProfile

getElement

public org.eclipse.uml2.Element getElement()
Description copied from interface: OmondoProfile
Returns the associated UML2 element (Usually a package object).

Specified by:
getElement in interface OmondoProfile
Returns:
the associated UML2 element (not null)

getProfile

public org.eclipse.uml2.Profile getProfile()
Description copied from interface: OmondoProfile
Returns the associated UML2 profile.

Specified by:
getProfile in interface OmondoProfile
Returns:
the associated UML2 profile (not null)

init

public void init(org.eclipse.core.resources.IProject project)
Description copied from interface: OmondoProfile
Internal use

Specified by:
init in interface OmondoProfile

getId

public java.lang.String getId()
Specified by:
getId in interface OmondoProfile

getModelPath

public java.lang.String getModelPath()
Description copied from interface: OmondoProfile
Returns the path of the resource which contains the associated profile.

Specified by:
getModelPath in interface OmondoProfile
Returns:
the path of the model file

getProperties

public com.omondo.uml.ui.editors.editmodel.Properties getProperties()
Description copied from interface: OmondoProfile
Allow to acces and modify the profile's properties. Note that 2 keys are reserved (and cannot be set): Properties.ID & Properties.NAME

Specified by:
getProperties in interface OmondoProfile
Returns:
the container object of the profile properties

setModel

public void setModel(java.lang.Object model)
Description copied from interface: OmondoProfile
Internal use

Specified by:
setModel in interface OmondoProfile

getNewActions

public final org.eclipse.jface.action.IContributionItem[] getNewActions(int diagramType)
Description copied from interface: OmondoProfile
Internal use

Specified by:
getNewActions in interface OmondoProfile

getActions

public final org.eclipse.jface.action.IContributionItem[] getActions(int diagramType)
Description copied from interface: OmondoProfile
Internal use

Specified by:
getActions in interface OmondoProfile

registerDefaultContributionItems

protected abstract void registerDefaultContributionItems()
The Action/contribution items must be registered in this method by the mean of the addContributionItem methods. These items will be added to a the element popup menu in a group of the profile name.


registerNewContributionItems

protected abstract void registerNewContributionItems()
The Action/contribution items must be registered in this method by the mean of the addNewContributionItem methods. These items will be added to a the element popup menu in a group called 'New'.


getFragments

public ProfileFragment[] getFragments(java.lang.String stereotype,
                                      int diagramType,
                                      int elementType)
Description copied from interface: OmondoProfile
Internal use

Specified by:
getFragments in interface OmondoProfile

getFragments

public ProfileFragment[] getFragments(int diagramType,
                                      int elementType)
Description copied from interface: OmondoProfile
Internal use

Specified by:
getFragments in interface OmondoProfile

registerAction

protected final void registerAction(org.eclipse.jface.action.Action action,
                                    int diagramType)

registerNewAction

protected final void registerNewAction(org.eclipse.jface.action.Action action,
                                       int diagramType)

registerAction

protected final void registerAction(org.eclipse.jface.action.IContributionItem action,
                                    int diagramType)

registerNewAction

protected final void registerNewAction(org.eclipse.jface.action.IContributionItem action,
                                       int diagramType)

addFragment

public void addFragment(ProfileFragment fragment)
Description copied from interface: OmondoProfile
Internal use

Specified by:
addFragment in interface OmondoProfile

getTaggedValues

public com.omondo.uml.ui.editors.editmodel.Properties getTaggedValues()

setTaggedValues

public boolean setTaggedValues(com.omondo.uml.ui.editors.editmodel.Properties taggedValues)