-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added the abstract syntax, textual syntax and graphical syntax of the Project Workloads DSL - added a runtime sample that contains a model and a diagram
- Loading branch information
1 parent
41630ce
commit db7de75
Showing
207 changed files
with
15,947 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>workload.emf.edit</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: %pluginName | ||
Bundle-SymbolicName: workload.emf.edit;singleton:=true | ||
Automatic-Module-Name: workload.emf.edit | ||
Bundle-Version: 1.0.0.qualifier | ||
Bundle-ClassPath: . | ||
Bundle-Activator: workload.provider.WorkloadEditPlugin$Implementation | ||
Bundle-Vendor: %providerName | ||
Bundle-Localization: plugin | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 | ||
Export-Package: workload.provider | ||
Require-Bundle: org.eclipse.core.runtime, | ||
workload.emf;visibility:=reexport, | ||
org.eclipse.emf.edit;visibility:=reexport | ||
Bundle-ActivationPolicy: lazy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
|
||
bin.includes = .,\ | ||
icons/,\ | ||
META-INF/,\ | ||
plugin.xml,\ | ||
plugin.properties | ||
jars.compile.order = . | ||
source.. = src/ | ||
output.. = bin/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
|
||
pluginName = workload.emf Edit Support | ||
providerName = www.example.org | ||
|
||
_UI_CreateChild_text = {0} | ||
_UI_CreateChild_text2 = {1} {0} | ||
_UI_CreateChild_text3 = {1} | ||
_UI_CreateChild_tooltip = Create New {0} Under {1} Feature | ||
_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. | ||
_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. | ||
|
||
_UI_PropertyDescriptor_description = The {0} of the {1} | ||
|
||
_UI_Project_type = Project | ||
_UI_Task_type = Task | ||
_UI_Person_type = Person | ||
_UI_Effort_type = Effort | ||
_UI_CostCentre_type = Cost Centre | ||
_UI_Unknown_type = Object | ||
|
||
_UI_Unknown_datatype= Value | ||
|
||
_UI_Project_tasks_feature = Tasks | ||
_UI_Project_people_feature = People | ||
_UI_Task_name_feature = Name | ||
_UI_Task_effortsExpression_feature = Efforts Expression | ||
_UI_Task_efforts_feature = Efforts | ||
_UI_Task_leader_feature = Leader | ||
_UI_Task_dependencies_feature = Dependencies | ||
_UI_Person_name_feature = Name | ||
_UI_Effort_person_feature = Person | ||
_UI_Effort_months_feature = Months | ||
_UI_CostCentre_name_feature = Name | ||
_UI_CostCentre_efforts_feature = Efforts | ||
_UI_Unknown_feature = Unspecified | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.0"?> | ||
|
||
<!-- | ||
--> | ||
|
||
<plugin> | ||
|
||
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> | ||
<!-- @generated workload --> | ||
<factory | ||
uri="ProjectWorkloadsDSL" | ||
class="workload.provider.WorkloadItemProviderAdapterFactory" | ||
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> |
169 changes: 169 additions & 0 deletions
169
workload.emf.edit/src/workload/provider/CostCentreItemProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
/** | ||
*/ | ||
package workload.provider; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.eclipse.emf.common.notify.AdapterFactory; | ||
import org.eclipse.emf.common.notify.Notification; | ||
|
||
import org.eclipse.emf.common.util.ResourceLocator; | ||
|
||
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | ||
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; | ||
import org.eclipse.emf.edit.provider.IItemLabelProvider; | ||
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | ||
import org.eclipse.emf.edit.provider.IItemPropertySource; | ||
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; | ||
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; | ||
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | ||
import org.eclipse.emf.edit.provider.ItemProviderAdapter; | ||
import org.eclipse.emf.edit.provider.ViewerNotification; | ||
|
||
import workload.CostCentre; | ||
import workload.WorkloadPackage; | ||
|
||
/** | ||
* This is the item provider adapter for a {@link workload.CostCentre} object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public class CostCentreItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, | ||
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { | ||
/** | ||
* This constructs an instance from a factory and a notifier. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public CostCentreItemProvider(AdapterFactory adapterFactory) { | ||
super(adapterFactory); | ||
} | ||
|
||
/** | ||
* This returns the property descriptors for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { | ||
if (itemPropertyDescriptors == null) { | ||
super.getPropertyDescriptors(object); | ||
|
||
addNamePropertyDescriptor(object); | ||
addEffortsPropertyDescriptor(object); | ||
} | ||
return itemPropertyDescriptors; | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Name feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addNamePropertyDescriptor(Object object) { | ||
itemPropertyDescriptors | ||
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), | ||
getResourceLocator(), getString("_UI_CostCentre_name_feature"), | ||
getString("_UI_PropertyDescriptor_description", "_UI_CostCentre_name_feature", | ||
"_UI_CostCentre_type"), | ||
WorkloadPackage.Literals.COST_CENTRE__NAME, true, false, false, | ||
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Efforts feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addEffortsPropertyDescriptor(Object object) { | ||
itemPropertyDescriptors | ||
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), | ||
getResourceLocator(), getString("_UI_CostCentre_efforts_feature"), | ||
getString("_UI_PropertyDescriptor_description", "_UI_CostCentre_efforts_feature", | ||
"_UI_CostCentre_type"), | ||
WorkloadPackage.Literals.COST_CENTRE__EFFORTS, true, false, true, null, null, null)); | ||
} | ||
|
||
/** | ||
* This returns CostCentre.gif. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public Object getImage(Object object) { | ||
return overlayImage(object, getResourceLocator().getImage("full/obj16/CostCentre")); | ||
} | ||
|
||
/** | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
protected boolean shouldComposeCreationImage() { | ||
return true; | ||
} | ||
|
||
/** | ||
* This returns the label text for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public String getText(Object object) { | ||
String label = ((CostCentre) object).getName(); | ||
return label == null || label.length() == 0 ? getString("_UI_CostCentre_type") | ||
: getString("_UI_CostCentre_type") + " " + label; | ||
} | ||
|
||
/** | ||
* This handles model notifications by calling {@link #updateChildren} to update any cached | ||
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public void notifyChanged(Notification notification) { | ||
updateChildren(notification); | ||
|
||
switch (notification.getFeatureID(CostCentre.class)) { | ||
case WorkloadPackage.COST_CENTRE__NAME: | ||
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); | ||
return; | ||
} | ||
super.notifyChanged(notification); | ||
} | ||
|
||
/** | ||
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children | ||
* that can be created under this object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { | ||
super.collectNewChildDescriptors(newChildDescriptors, object); | ||
} | ||
|
||
/** | ||
* Return the resource locator for this item provider's resources. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public ResourceLocator getResourceLocator() { | ||
return WorkloadEditPlugin.INSTANCE; | ||
} | ||
|
||
} |
Oops, something went wrong.