Skip to content

Commit

Permalink
Merge pull request #206 from ipa-nhg/ParametersForSystems
Browse files Browse the repository at this point in the history
[WIP] Parameters for systems
  • Loading branch information
ipa-nhg authored Sep 4, 2023
2 parents fde4128 + ccf8141 commit 3cff8e4
Show file tree
Hide file tree
Showing 18 changed files with 7,650 additions and 5,270 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ros.ServiceClient
import ros.ActionServer
import ros.ActionClient
import ros.NamespacedElement
import ros.Parameter

class RosQNP extends DefaultDeclarativeQualifiedNameProvider{

Expand Down Expand Up @@ -76,6 +77,12 @@ class RosQNP extends DefaultDeclarativeQualifiedNameProvider{
return getConverter().toQualifiedName(art.name + "::" + interface.name);
}

if (obj instanceof Parameter) {
val interface = obj as Parameter
val art = obj.eContainer.eContainer as Artifact
return getConverter().toQualifiedName(art.name + "::" + interface.name);
}

return super.qualifiedName(obj);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
import ros.RosFactory;
import system.RossystemFactory;
import system.RossystemPackage;

Expand Down Expand Up @@ -221,7 +222,7 @@ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors
newChildDescriptors.add
(createChildParameter
(RossystemPackage.Literals.SYSTEM__PARAMETER,
RossystemFactory.eINSTANCE.createRosParameter()));
RosFactory.eINSTANCE.createParameter()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getRosServerClientReferenceAccess().getFromAssignment_2(), "rule__RosServerClientReference__FromAssignment_2");
builder.put(grammarAccess.getRosActionServerReferenceAccess().getFromAssignment_2(), "rule__RosActionServerReference__FromAssignment_2");
builder.put(grammarAccess.getRosActionClientReferenceAccess().getFromAssignment_2(), "rule__RosActionClientReference__FromAssignment_2");
builder.put(grammarAccess.getRosParameterAccess().getNameAssignment_0(), "rule__RosParameter__NameAssignment_0");
builder.put(grammarAccess.getRosParameterAccess().getFromAssignment_2(), "rule__RosParameter__FromAssignment_2");
builder.put(grammarAccess.getRosParameterAccess().getValueAssignment_5(), "rule__RosParameter__ValueAssignment_5");
builder.put(grammarAccess.getRosParameterAccess().getNameAssignment_1(), "rule__RosParameter__NameAssignment_1");
builder.put(grammarAccess.getRosParameterAccess().getFromAssignment_3(), "rule__RosParameter__FromAssignment_3");
builder.put(grammarAccess.getRosParameterAccess().getValueAssignment_6(), "rule__RosParameter__ValueAssignment_6");
builder.put(grammarAccess.getRosSystemConnectionAccess().getFromAssignment_1(), "rule__RosSystemConnection__FromAssignment_1");
builder.put(grammarAccess.getRosSystemConnectionAccess().getToAssignment_3(), "rule__RosSystemConnection__ToAssignment_3");
builder.put(grammarAccess.getRosTopicConnectionAccess().getFromAssignment_1(), "rule__RosTopicConnection__FromAssignment_1");
Expand Down
Loading

0 comments on commit 3cff8e4

Please sign in to comment.