Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of String Constants Classes #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
417 changes: 414 additions & 3 deletions .gitignore

Large diffs are not rendered by default.

85 changes: 26 additions & 59 deletions MTIP/Constants/ActivityConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,67 +7,34 @@
*
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTIP.Constants
{
public class ActivityConstants
public static class ActivityConstants
{
public string acceptEventAction;
public string action;
public string actionPin;
public string activity;
public string activityParameter;
public string activityPartion;
public string callBehaviorAction;
public string callOperationAction;
public string centralBufferNode;
public string change;
public string conditionalNode;
public string createObjectAction;
public string decision;
public string destroyObjectAction;
public string eventType;
public string forkNode;
public string informationItem;
public string interruptibleActivityRegion;
public string mergeNode;
public string objectNode;
public string property;
public string sendSignalAction;
public string stateNode;
public string synchronization;


public ActivityConstants(){
acceptEventAction = "AcceptEventAction";
action = "Action";
actionPin = "ActionPin";
activity = "Activity";
activityParameter = "ActivityParameter";
activityPartion = "ActivityPartition";
callBehaviorAction = "CallBehaviorAction";
callOperationAction = "CallOperationAction";
centralBufferNode = "CentralBufferNode";
change = "Change";
conditionalNode = "ConditionalNode";
createObjectAction = "CreateObjectAction";
decision = "Decision";
destroyObjectAction = "DestroyObjectAction";
eventType = "Event";
forkNode = "ForkNode";
informationItem = "InformationItem";
interruptibleActivityRegion = "InterruptibleActivityRegion";
mergeNode = "MergeNode";
objectNode = "ObjectNode";
property = "Property";
sendSignalAction = "SendSignalAction";
stateNode = "StateNode";
synchronization = "Synchronization";
}
public const string ACCEPTEVENTACTION = "AcceptEventAction";
public const string ACTION = "Action";
public const string ACTIONPIN = "ActionPin";
public const string ACTIVITY = "Activity";
public const string ACTIVITYPARAMETER = "ActivityParameter";
public const string ACTIVITYPARTION = "ActivityPartition";
public const string CALLBEHAVIORACTION = "CallBehaviorAction";
public const string CALLOPERATIONACTION = "CallOperationAction";
public const string CENTRALBUFFERNODE = "CentralBufferNode";
public const string CHANGE = "Change";
public const string CONDITIONALNODE = "ConditionalNode";
public const string CREATEOBJECTACTION = "CreateObjectAction";
public const string DECISION = "Decision";
public const string DESTROYOBJECTACTION = "DestroyObjectAction";
public const string EVENTTYPE = "Event";
public const string FORKNODE = "ForkNode";
public const string INFORMATIONITEM = "InformationItem";
public const string INTERRUPTIBLEACTIVITYREGION = "InterruptibleActivityRegion";
public const string MERGENODE = "MergeNode";
public const string OBJECTNODE = "ObjectNode";
public const string PROPERTY = "Property";
public const string SENDSIGNALACTION = "SendSignalAction";
public const string STATENODE = "StateNode";
public const string SYNCHRONIZATION = "Synchronization";
}
}

103 changes: 31 additions & 72 deletions MTIP/Constants/AttributeConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,80 +8,39 @@
*
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTIP.Constants
{
public class AttributeConstants
public static class AttributeConstants
{
public string alias;
public string attribute;
public string attributes;
public string behavior;
public string body;
public string constraint;
public string defaultValue;
public string displayAs;
public string documentation;
public string extensionPoint;
public string id;
public string initialValue;
public string interactionOperatorKind;
public string isComposite;
public string messageSort;
public string multiplicity;
public string name;
public string profileId;
public string profileName;
public string receiveEvent;
public string relationships;
public string sendEvent;
public string stereotype;
public string stereotypeName;
public string submachine;
public string taggedValue;
public string text;
public string type;
public string value;
public string visibility;

public AttributeConstants()
{
this.alias = "alias";
this.attribute = "attribute";
this.attributes = "attributes";
this.behavior = "behavior";
this.body = "body";
this.constraint = "constraint";
this.defaultValue = "defaultValue";
this.displayAs = "displayAs";
this.documentation = "documentation";
this.extensionPoint = "extensionPoint";
this.id = "id";
this.initialValue = "initialValue";
this.interactionOperatorKind = "interactionOperatorKind";
this.isComposite = "isComposite";
this.messageSort = "messageSort";
this.multiplicity = "multiplicity";
this.name = "name";
this.profileId = "profileId";
this.profileName = "profileName";
this.receiveEvent = "receiveEvent";
this.relationships = "relationships";
this.sendEvent = "sendEvent";
this.stereotype = "stereotype";
this.stereotypeName = "stereotypeName";
this.submachine = "submachine";
this.taggedValue = "taggedValue";
this.text = "text";
this.type = "type";
this.value = "value";
this.visibility = "visibility";
}

public const string ALIAS = "alias";
public const string ATTRIBUTE = "attribute";
public const string ATTRIBUTES = "attributes";
public const string BEHAVIOR = "behavior";
public const string BODY = "body";
public const string CONSTRAINT = "constraint";
public const string DEFAULTVALUE = "defaultValue";
public const string DISPLAYAS = "displayAs";
public const string DOCUMENTATION = "documentation";
public const string EXTENSIONPOINT = "extensionPoint";
public const string ID = "id";
public const string INITIALVALUE = "initialValue";
public const string INTERACTIONOPERATORKIND = "interactionOperatorKind";
public const string ISCOMPOSITE = "isComposite";
public const string MESSAGESORT = "messageSort";
public const string MULTIPLICITY = "multiplicity";
public const string NAME = "name";
public const string PROFILEID = "profileId";
public const string PROFILENAME = "profileName";
public const string RECEIVEEVENT = "receiveEvent";
public const string RELATIONSHIPS = "relationships";
public const string SENDEVENT = "sendEvent";
public const string STEREOTYPE = "stereotype";
public const string STEREOTYPENAME = "stereotypeName";
public const string SUBMACHINE = "submachine";
public const string TAGGEDVALUE = "taggedValue";
public const string TEXT = "text";
public const string TYPE = "type";
public const string VALUE = "value";
public const string VISIBILITY = "visibility";
}
}
66 changes: 20 additions & 46 deletions MTIP/Constants/BlockConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,28 @@
*
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTIP.Constants
{
public class BlockConstants
public static class BlockConstants
{
public string association;
public string block;
public string constraintBlock;
public string dataType;
public string enumeration;
public string external;
public string flowPort;
public string fullPort;
public string interfaceBlock;
public string interfaceType;
public string operation;
public string port;
public string property;
public string proxyPort;
public string quantityKind;
public string signal;
public string unit;
public string valueType;
public BlockConstants()
{
association = "Association";
block = "Block";
constraintBlock = "ConstraintBlock";
dataType = "DataType";
enumeration = "Enumeration";
external = "External";
flowPort = "FlowPort";
fullPort = "FullPort";
interfaceBlock = "InterfaceBlock";
interfaceType = "Interface";
operation = "Operation";
port = "Port";
property = "Property";
proxyPort = "ProxyPort";
quantityKind = "QuantityKind";
signal = "Signal";
unit = "Unit";
valueType = "ValueType";
}
public const string ASSOCIATION = "Association";
public const string BLOCK = "Block";
public const string CONSTRAINTBLOCK = "ConstraintBlock";
public const string DATATYPE = "DataType";
public const string ENUMERATION = "Enumeration";
public const string EXTERNAL = "External";
public const string FLOWPORT = "FlowPort";
public const string FULLPORT = "FullPort";
public const string INTERFACEBLOCK = "InterfaceBlock";
public const string INTERFACETYPE = "Interface";
public const string OPERATION = "Operation";
public const string PORT = "Port";
public const string PROPERTY = "Property";
public const string PROXYPORT = "ProxyPort";
public const string QUANTITYKIND = "QuantityKind";
public const string SIGNAL = "Signal";
public const string UNIT = "Unit";
public const string VALUETYPE = "ValueType";
}
}

36 changes: 12 additions & 24 deletions MTIP/Constants/DiagramConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,18 @@

namespace MTIP.Constants
{
public class DiagramConstants
public static class DiagramConstants
{
public string activity;
public string classType;
public string component;
public string compositeStructure;
public string custom;
public string logical;
public string package;
public string sequence;
public string statechart;
public string useCase;
public DiagramConstants()
{
activity = "Activity";
classType = "Class";
component = "Component";
compositeStructure = "CompositeStructure";
custom = "Custom";
logical = "Logical";
package = "Package";
sequence = "Sequence";
statechart = "Statechart";
useCase = "Use Case";
}
public const string activity = "Activity";
public const string classType = "Class";
public const string component = "Component";
public const string compositeStructure = "CompositeStructure";
public const string custom = "Custom";
public const string logical = "Logical";
public const string package = "Package";
public const string sequence = "Sequence";
public const string statechart = "Statechart";
public const string useCase = "Use Case";
}

}
Loading