|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.ksbase.core.EditorTransformationSettings
public class EditorTransformationSettings
Stores the KSBasE settings for one specific editor. This class is used by the
TransformationManager
to store settings that have been defined using the KSBasE extension
point or the KSBasE preference pages.
This class may be serialized.
Constructor Summary | |
---|---|
EditorTransformationSettings(String editorClass)
Creates a new transformation setting with the given fully qualified editor name. |
Method Summary | |
---|---|
void |
addMenuContribution(KSBasEMenuContribution contribution)
Adds a menu contribution to this editor. |
void |
addOutPlaceTransformation(KSBasETransformation t)
Adds a single transformation to the transformations list. |
void |
addTransformation(KSBasETransformation t)
Adds a single transformation to the transformations list. |
void |
addTransformationClass(Object classObject)
|
boolean |
equals(Object obj)
Two editor settings are the same if they have the same target editor and the same source contributor. |
String |
getCommandHandler()
Returns the command handler, may return an empty string but never null. |
String |
getContext()
Returns the defined diagram context. |
IContributor |
getContributor()
Gets the contributor. |
String |
getDefaultIcon()
Returns the path to the default icon. |
String |
getEditorId()
Gets the ID of the assigned editor. |
ITransformationFramework |
getFramework()
Gets the transformation framework for this editor. |
LinkedList<KSBasEMenuContribution> |
getMenuContributions()
Gets the list of existing menu contributions. |
List<String> |
getModelPackages()
Gets the model package class name. |
AbstractTransformation |
getOutPlaceTransformationById(String tid)
Tries to find a transformation by its identity string. |
AbstractTransformation |
getOutPlaceTransformationByName(String transformation)
Tries to find a transformation with a given name. |
Collection<AbstractTransformation> |
getOutPlaceTransformations()
Gets the list of defined out-place transformations. |
KSBasETransformation |
getTransformationById(String tid)
Tries to find a transformation by its identity string. |
KSBasETransformation |
getTransformationByName(String transformation)
Tries to find a transformation with a given name. |
List<Object> |
getTransformationClasses()
|
String |
getTransformationFile()
Returns the absolute path to the transformation file. |
Collection<KSBasETransformation> |
getTransformations()
Gets the list of defined transformations. |
int |
hashCode()
The hashcode is calculated from the editors hash and the hashCode of the contributor, if existing. |
boolean |
isCheckVisibility()
Visibility checks enabled? |
void |
parseTransformations(boolean createTransformations,
URL fileURL)
Parses the transformation file to read transformations and parameters. |
void |
setCheckVisibility(boolean flag)
Set visibility checks. |
void |
setCommandHandler(String handlerClass)
Sets the command handler for this editor. |
void |
setContext(String contxt)
Sets the diagram context. |
void |
setContributor(IContributor contrib)
Sets the editors contributor project. |
void |
setDefaultIcon(String icon)
Sets the path to the default icon. |
void |
setEditor(String editorid)
Sets the editor class. |
void |
setFramework(ITransformationFramework theFramework)
Sets the transformation framework for this editor. |
void |
setMenuContributions(List<KSBasEMenuContribution> contributionList)
Sets the menu contributions for this editor and removes any existing contributions. |
void |
setTransformationFile(String absolutePath)
Sets the path to the transformation file. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EditorTransformationSettings(String editorClass)
editorClass
- The fqn of the diagram editorMethod Detail |
---|
public final void setEditor(String editorid)
editorid
- The id of the diagram editorpublic final String getEditorId()
public final List<String> getModelPackages()
public final LinkedList<KSBasEMenuContribution> getMenuContributions()
public final void setMenuContributions(List<KSBasEMenuContribution> contributionList)
contributionList
- The list of menu contributions to usepublic final void addMenuContribution(KSBasEMenuContribution contribution)
contribution
- The contribution to append to the list of menu contributions.public final String getDefaultIcon()
public final void setDefaultIcon(String icon)
icon
- Icon pathpublic final Collection<KSBasETransformation> getTransformations()
public final Collection<AbstractTransformation> getOutPlaceTransformations()
public final KSBasETransformation getTransformationByName(String transformation)
transformation
- The name to find
public final AbstractTransformation getOutPlaceTransformationByName(String transformation)
transformation
- The name to find
public final KSBasETransformation getTransformationById(String tid)
tid
- The id to find
public final AbstractTransformation getOutPlaceTransformationById(String tid)
tid
- The id to find
public final void addTransformation(KSBasETransformation t)
t
- a transformation definitionpublic final void addOutPlaceTransformation(KSBasETransformation t)
t
- a transformation definitionpublic final String getTransformationFile()
public final void setTransformationFile(String absolutePath)
absolutePath
- An absolute pathpublic final IContributor getContributor()
public final void setContributor(IContributor contrib)
contrib
- The contribution that is assigned with this editor. May be null if the editor has
been defined by the user or the plug-in project does not have a contributor.public final String getContext()
public final void setContext(String contxt)
contxt
- the contextID to bind keyboard shortcutspublic String getCommandHandler()
public void setCommandHandler(String handlerClass)
handlerClass
- The name of the command handler class, must not be nullpublic ITransformationFramework getFramework()
public void setFramework(ITransformationFramework theFramework)
theFramework
- an implementation of ITransformationFrameworkpublic boolean isCheckVisibility()
public void setCheckVisibility(boolean flag)
flag
- new optionpublic final void parseTransformations(boolean createTransformations, URL fileURL)
createTransformations
- If this flag is set the transformations are created while parsing. If not, the
parameters of the existing transformations are matched with the file.fileURL
- a valid URL to an transformation file.public boolean equals(Object obj)
equals
in class Object
obj
- The Object to compare
public int hashCode()
hashCode
in class Object
public void addTransformationClass(Object classObject)
public List<Object> getTransformationClasses()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |