Skip to content

Commit

Permalink
New feature: colour nodes based on Action Type
Browse files Browse the repository at this point in the history
Added new ACTION_TYPE_ENUM literals to the FRIPP metamodel
Modified the FRIPP representation to color processes based on
ACTION_TYPE_ENUM
  • Loading branch information
ArifMehmood16 committed Jul 24, 2024
1 parent b1b9041 commit 2498c86
Show file tree
Hide file tree
Showing 24 changed files with 343 additions and 166 deletions.
36 changes: 32 additions & 4 deletions FRIPP/FRIPP.design/description/FRIPP.odesign
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,38 @@
</style>
</borderedNodeMappings>
<subContainerMappings name="ProcessHierarchy_PD" preconditionExpression="aql: self->notEmpty()=true and self.oclIsKindOf(PROVE::Process)" deletionDescription="//@ownedViewpoints[name='FRIPPviewpoint']/@ownedRepresentations[name='FRIPP%20Representation']/@defaultLayer/@toolSections.0/@ownedTools[name='DeleteActivity']" labelDirectEdit="//@ownedViewpoints[name='FRIPPviewpoint']/@ownedRepresentations[name='FRIPP%20Representation']/@defaultLayer/@toolSections.0/@ownedTools[name='ChangeName']" semanticCandidatesExpression="aql: self.process" doubleClickDescription="//@ownedViewpoints[name='FRIPPviewpoint']/@ownedRepresentations[name='FRIPP%20Representation']/@defaultLayer/@toolSections.0/@ownedTools[name='dblclkActivityProcess']" domainClass="PROVE::Process" reusedBorderedNodeMappings="//@ownedViewpoints[name='FRIPPviewpoint']/@ownedRepresentations[name='FRIPP%20Representation']/@defaultLayer/@containerMappings[name='ProcessTopHierarchy_PD']/@subContainerMappings[name='ProcessContainer_PD']/@borderedNodeMappings[name='ArtifactDestinationPort'] //@ownedViewpoints[name='FRIPPviewpoint']/@ownedRepresentations[name='FRIPP%20Representation']/@defaultLayer/@containerMappings[name='ProcessTopHierarchy_PD']/@subContainerMappings[name='ProcessContainer_PD']/@borderedNodeMappings[name='ArtifactSourcePort']" dropDescriptions="//@ownedViewpoints[name='FRIPPviewpoint']/@ownedRepresentations[name='FRIPP%20Representation']/@defaultLayer/@toolSections.0/@ownedTools[name='ReconnectFlowDestination'] //@ownedViewpoints[name='FRIPPviewpoint']/@ownedRepresentations[name='FRIPP%20Representation']/@defaultLayer/@toolSections.0/@ownedTools[name='ReconnectFlowSource'] //@ownedViewpoints[name='FRIPPviewpoint']/@ownedRepresentations[name='FRIPP%20Representation']/@defaultLayer/@toolSections.0/@ownedTools[name='MoveActivity']">
<style xsi:type="style:WorkspaceImageDescription" borderSizeComputationExpression="2" labelSize="12" showIcon="false" labelExpression="aql: self.name + '[' + self.resourceUsed->filter(FRIPP::Actuator).name->sep('+') + '] '" tooltipExpression="aql: 'Start: ' + self.startDate + '\n' + 'End: ' + self.endDate + '\n' + 'Resources: ' + self.resourceUsed.name->sep(' + ')">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
<conditionnalStyles predicateExpression="aql: self.actionType == FRIPP::ACTION_TYPE_ENUM::MANUAL">
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="12" labelExpression="aql: self.name + '[' + self.resourceUsed->filter(FRIPP::Actuator).name->sep('+') + '] '" tooltipExpression="aql: 'Start: ' + self.startDate + '\n' + 'End: ' + self.endDate + '\n' + 'Resources: ' + self.resourceUsed.name->sep(' + ')">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_yellow']"/>
<foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_yellow']"/>
</style>
</conditionnalStyles>
<conditionnalStyles predicateExpression="aql: self.actionType == FRIPP::ACTION_TYPE_ENUM::AUTOMATIC">
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="12" labelExpression="aql: self.name + '[' + self.resourceUsed->filter(FRIPP::Actuator).name->sep('+') + '] '" tooltipExpression="aql: 'Start: ' + self.startDate + '\n' + 'End: ' + self.endDate + '\n' + 'Resources: ' + self.resourceUsed.name->sep(' + ')">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_blue']"/>
<foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_blue']"/>
</style>
</conditionnalStyles>
<conditionnalStyles predicateExpression="aql: self.actionType == FRIPP::ACTION_TYPE_ENUM::DUAL">
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="12" labelExpression="aql: self.name + '[' + self.resourceUsed->filter(FRIPP::Actuator).name->sep('+') + '] '" tooltipExpression="aql: 'Start: ' + self.startDate + '\n' + 'End: ' + self.endDate + '\n' + 'Resources: ' + self.resourceUsed.name->sep(' + ')">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_yellow']"/>
<foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_blue']"/>
</style>
</conditionnalStyles>
<conditionnalStyles predicateExpression="aql: self.actionType == FRIPP::ACTION_TYPE_ENUM::UNKNOWN">
<style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelSize="12" labelExpression="aql: self.name + '[' + self.resourceUsed->filter(FRIPP::Actuator).name->sep('+') + '] '" tooltipExpression="aql: 'Start: ' + self.startDate + '\n' + 'End: ' + self.endDate + '\n' + 'Resources: ' + self.resourceUsed.name->sep(' + ')">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
<backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
<foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
</style>
</conditionnalStyles>
</subContainerMappings>
<style xsi:type="style:WorkspaceImageDescription" borderSizeComputationExpression="2" labelSize="12" showIcon="false" labelExpression="aql: self.name + '[' + self.resourceUsed->filter(FRIPP::Actuator).name->sep('+') + '] '" tooltipExpression="aql: 'Start: ' + self.startDate + '\n' + 'End: ' + self.endDate + '\n' + 'Resources: ' + self.resourceUsed.name->sep(' + ')">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
Expand Down
2 changes: 1 addition & 1 deletion FRIPP/dsm.FRIPP.edit/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bundle-ClassPath: .
Bundle-Activator: dsm.FRIPP.provider.FRIPPEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-RequiredExecutionEnvironment: JavaSE-15
Export-Package: PROVE.provider,
dependencyModel.provider,
dsm.FRIPP.provider
Expand Down
2 changes: 2 additions & 0 deletions FRIPP/dsm.FRIPP.edit/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,5 @@ _UI_Organisation_type = Organisation
_UI_PlaybookProcess_associatedRole_feature = Associated Role
_UI_Organisation_playbookprocess_feature = Playbookprocess
_UI_Organisation_role_feature = Role
_UI_ACTION_TYPE_ENUM_DUAL_literal = DUAL
_UI_ACTION_TYPE_ENUM_UNKNOWN_literal = UNKNOWN
13 changes: 13 additions & 0 deletions FRIPP/dsm.FRIPP.edit/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,18 @@
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>

<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<!-- @generated FRIPP -->
<factory
uri="http://www.example.org/dependencyModel"
class="dependencyModel.provider.DependencyModelItemProviderAdapterFactory"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>


</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import dsm.FRIPP.FRIPPPackage;

import dsm.PROVE.PROVEPackage;
import dsm.PROVE.provider.ResourceItemProvider;
import java.util.Collection;
import java.util.List;

Expand All @@ -26,7 +27,7 @@
* <!-- end-user-doc -->
* @generated
*/
public class ActuatorItemProvider extends dsm.PROVE.provider.ResourceItemProvider {
public class ActuatorItemProvider extends ResourceItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import dsm.FRIPP.PlaybookProcess;

import dsm.PROVE.PROVEPackage;
import dsm.PROVE.provider.ProcessItemProvider;
import java.util.Collection;
import java.util.List;

Expand All @@ -28,7 +29,7 @@
* <!-- end-user-doc -->
* @generated
*/
public class PlaybookProcessItemProvider extends dsm.PROVE.provider.ProcessItemProvider {
public class PlaybookProcessItemProvider extends ProcessItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
Expand Down
2 changes: 1 addition & 1 deletion FRIPP/dsm.FRIPP.editor/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bundle-ClassPath: .
Bundle-Activator: dsm.FRIPP.presentation.FRIPPEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-RequiredExecutionEnvironment: JavaSE-15
Export-Package: PROVE.presentation,
dependencyModel.presentation,
dsm.FRIPP.presentation
Expand Down
28 changes: 28 additions & 0 deletions FRIPP/dsm.FRIPP.editor/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,34 @@
</editor>
</extension>

<extension point="org.eclipse.ui.newWizards">
<!-- @generated FRIPP -->
<category
id="org.eclipse.emf.ecore.Wizard.category.ID"
name="%_UI_Wizard_category"/>
<wizard
id="dependencyModel.presentation.DependencyModelModelWizardID"
name="%_UI_DependencyModelModelWizard_label"
class="dependencyModel.presentation.DependencyModelModelWizard"
category="org.eclipse.emf.ecore.Wizard.category.ID"
icon="icons/full/obj16/DependencyModelModelFile.gif">
<description>%_UI_DependencyModelModelWizard_description</description>
<selection class="org.eclipse.core.resources.IResource"/>
</wizard>
</extension>

<extension point="org.eclipse.ui.editors">
<!-- @generated FRIPP -->
<editor
id="dependencyModel.presentation.DependencyModelEditorID"
name="%_UI_DependencyModelEditor_label"
icon="icons/full/obj16/DependencyModelModelFile.gif"
extensions="dependencymodel"
class="dependencyModel.presentation.DependencyModelEditor"
contributorClass="dependencyModel.presentation.DependencyModelActionBarContributor">
</editor>
</extension>



</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@

import dsm.FRIPP.provider.FRIPPItemProviderAdapterFactory;

import dsm.PROVE.provider.PROVEItemProviderAdapterFactory;
import org.eclipse.ui.actions.WorkspaceModifyOperation;

/**
Expand Down Expand Up @@ -690,7 +691,7 @@ protected void initializeEditingDomain() {
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new FRIPPItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new DependencyModelItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new dsm.PROVE.provider.PROVEItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new PROVEItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

// Create the command stack that will notify this editor as commands are executed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
import dsm.FRIPP.provider.FRIPPItemProviderAdapterFactory;
import dependencyModel.provider.DependencyModelItemProviderAdapterFactory;

import dsm.PROVE.provider.PROVEItemProviderAdapterFactory;
import org.eclipse.ui.actions.WorkspaceModifyOperation;

/**
Expand Down Expand Up @@ -688,7 +689,7 @@ protected void initializeEditingDomain() {
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new FRIPPItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new DependencyModelItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new dsm.PROVE.provider.PROVEItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new PROVEItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

// Create the command stack that will notify this editor as commands are executed.
Expand Down
2 changes: 1 addition & 1 deletion FRIPP/dsm.FRIPP/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-RequiredExecutionEnvironment: JavaSE-15
Export-Package: PROVE;
uses:="org.eclipse.emf.ecore,
org.eclipse.emf.common.util",
Expand Down
Loading

0 comments on commit 2498c86

Please sign in to comment.