Skip to content

Commit

Permalink
Add attribute to get a subsystem from a file (launch file or rossyste…
Browse files Browse the repository at this point in the history
…m file)
  • Loading branch information
ipa-nhg committed Sep 4, 2023
1 parent 9a979ea commit 3154341
Show file tree
Hide file tree
Showing 27 changed files with 9,830 additions and 9,064 deletions.
1 change: 1 addition & 0 deletions plugins/de.fraunhofer.ipa.rossystem.edit/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,4 @@ _UI_RosActionConnection_from_feature = From
_UI_RosActionConnection_to_feature = To
_UI_RosServiceClientReference_type = Ros Service Client Reference
_UI_RosServiceClientReference_from_feature = From
_UI_System_fromFile_feature = From File
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
super.getPropertyDescriptors(object);

addNamePropertyDescriptor(object);
addFromFilePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
Expand Down Expand Up @@ -75,6 +76,28 @@ protected void addNamePropertyDescriptor(Object object) {
}

/**
* This adds a property descriptor for the From File feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addFromFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_System_fromFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_System_fromFile_feature", "_UI_System_type"),
RossystemPackage.Literals.SYSTEM__FROM_FILE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}

/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
Expand Down Expand Up @@ -146,6 +169,7 @@ public void notifyChanged(Notification notification) {

switch (notification.getFeatureID(system.System.class)) {
case RossystemPackage.SYSTEM__NAME:
case RossystemPackage.SYSTEM__FROM_FILE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case RossystemPackage.SYSTEM__PROCESSES:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public String getRuleName(AbstractElement element) {
}

private static void init(ImmutableMap.Builder<AbstractElement, String> builder, RosSystemGrammarAccess grammarAccess) {
builder.put(grammarAccess.getRosSystemAccess().getAlternatives_3(), "rule__RosSystem__Alternatives_3");
builder.put(grammarAccess.getRosSystemAccess().getAlternatives_4(), "rule__RosSystem__Alternatives_4");
builder.put(grammarAccess.getInterfaceReferenceAccess().getAlternatives(), "rule__InterfaceReference__Alternatives");
builder.put(grammarAccess.getConnectionAccess().getAlternatives(), "rule__Connection__Alternatives");
builder.put(grammarAccess.getRosConnectionAccess().getAlternatives(), "rule__RosConnection__Alternatives");
Expand All @@ -47,11 +47,12 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getEStringAccess().getAlternatives(), "rule__EString__Alternatives");
builder.put(grammarAccess.getRosNamesAccess().getAlternatives(), "rule__RosNames__Alternatives");
builder.put(grammarAccess.getRosSystemAccess().getGroup(), "rule__RosSystem__Group__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_3_0(), "rule__RosSystem__Group_3_0__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_3_1(), "rule__RosSystem__Group_3_1__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_3_2(), "rule__RosSystem__Group_3_2__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_3_3(), "rule__RosSystem__Group_3_3__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_3_4(), "rule__RosSystem__Group_3_4__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_3(), "rule__RosSystem__Group_3__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_4_0(), "rule__RosSystem__Group_4_0__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_4_1(), "rule__RosSystem__Group_4_1__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_4_2(), "rule__RosSystem__Group_4_2__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_4_3(), "rule__RosSystem__Group_4_3__0");
builder.put(grammarAccess.getRosSystemAccess().getGroup_4_4(), "rule__RosSystem__Group_4_4__0");
builder.put(grammarAccess.getProcessAccess().getGroup(), "rule__Process__Group__0");
builder.put(grammarAccess.getProcessAccess().getGroup_4(), "rule__Process__Group_4__0");
builder.put(grammarAccess.getProcessAccess().getGroup_4_3(), "rule__Process__Group_4_3__0");
Expand Down Expand Up @@ -146,11 +147,12 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getHeaderAccess().getGroup(), "rule__Header__Group__0");
builder.put(grammarAccess.getArraySpecRefAccess().getGroup(), "rule__ArraySpecRef__Group__0");
builder.put(grammarAccess.getRosSystemAccess().getNameAssignment_0(), "rule__RosSystem__NameAssignment_0");
builder.put(grammarAccess.getRosSystemAccess().getProcessesAssignment_3_0_2(), "rule__RosSystem__ProcessesAssignment_3_0_2");
builder.put(grammarAccess.getRosSystemAccess().getComponentsAssignment_3_1_2(), "rule__RosSystem__ComponentsAssignment_3_1_2");
builder.put(grammarAccess.getRosSystemAccess().getComponentsAssignment_3_2_2(), "rule__RosSystem__ComponentsAssignment_3_2_2");
builder.put(grammarAccess.getRosSystemAccess().getParameterAssignment_3_3_2(), "rule__RosSystem__ParameterAssignment_3_3_2");
builder.put(grammarAccess.getRosSystemAccess().getConnectionsAssignment_3_4_2(), "rule__RosSystem__ConnectionsAssignment_3_4_2");
builder.put(grammarAccess.getRosSystemAccess().getFromFileAssignment_3_1(), "rule__RosSystem__FromFileAssignment_3_1");
builder.put(grammarAccess.getRosSystemAccess().getProcessesAssignment_4_0_2(), "rule__RosSystem__ProcessesAssignment_4_0_2");
builder.put(grammarAccess.getRosSystemAccess().getComponentsAssignment_4_1_2(), "rule__RosSystem__ComponentsAssignment_4_1_2");
builder.put(grammarAccess.getRosSystemAccess().getComponentsAssignment_4_2_2(), "rule__RosSystem__ComponentsAssignment_4_2_2");
builder.put(grammarAccess.getRosSystemAccess().getParameterAssignment_4_3_2(), "rule__RosSystem__ParameterAssignment_4_3_2");
builder.put(grammarAccess.getRosSystemAccess().getConnectionsAssignment_4_4_2(), "rule__RosSystem__ConnectionsAssignment_4_4_2");
builder.put(grammarAccess.getProcessAccess().getNameAssignment_1(), "rule__Process__NameAssignment_1");
builder.put(grammarAccess.getProcessAccess().getComponentsAssignment_4_2(), "rule__Process__ComponentsAssignment_4_2");
builder.put(grammarAccess.getProcessAccess().getComponentsAssignment_4_3_1(), "rule__Process__ComponentsAssignment_4_3_1");
Expand Down
Loading

0 comments on commit 3154341

Please sign in to comment.