diff options
3 files changed, 18 insertions, 5 deletions
diff --git a/plugins/org.eclipse.etrice.core.room/.checkstyle b/plugins/org.eclipse.etrice.core.room/.checkstyle new file mode 100644 index 000000000..d417d3b25 --- /dev/null +++ b/plugins/org.eclipse.etrice.core.room/.checkstyle @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false"> + <fileset name="all" enabled="true" check-config-name="eTrice checks" local="false"> + <file-match-pattern match-pattern="." include-pattern="true"/> + </fileset> + <filter name="WriteProtectedFiles" enabled="true"/> + <filter name="FilesFromPackage" enabled="true"> + <filter-data value="src-gen"/> + </filter> +</fileset-config> diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java index 71bc7f72e..e02320001 100644 --- a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java +++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java @@ -139,9 +139,9 @@ public class RoomJavaValidator extends AbstractRoomJavaValidator { @Check
public void checkRefHasFixedMultiplicityPorts(ActorRef ar) {
- if (ar.getSize()>1) {
+ if (ar!=null) {
ActorClass ac = ar.getType();
- if (ar!=null) {
+ if (ar.getSize()>1) {
for (Port p : ac.getIfPorts()) {
if (p.getMultiplicity()<0) {
int idx = ((ActorContainerClass)ar.eContainer()).getActorRefs().indexOf(ar);
diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/ValidationUtil.java b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/ValidationUtil.java index 8eebd878f..9a7340e42 100644 --- a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/ValidationUtil.java +++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/ValidationUtil.java @@ -330,8 +330,9 @@ public class ValidationUtil { spc2 = (ProtocolClass) pc2;
else if (sub2.getProtocol() instanceof ProtocolClass)
spc2 = (ProtocolClass) sub2.getProtocol();
- if (spc1.getCommType()!=spc2.getCommType())
- return Result.error("protocol communication types don't match");
+ if (spc1!=null && spc2!=null)
+ if (spc1.getCommType()!=spc2.getCommType())
+ return Result.error("protocol communication types don't match");
}
if (compoundInvolved) {
List<Match> matches = CompoundProtocolHelpers.getMatches(p1, ref1, p2, ref2, sc, exclude);
@@ -951,7 +952,8 @@ public class ValidationUtil { tr.eContainer(),
RoomPackage.eINSTANCE.getStateGraph_Transitions(),
((StateGraph)tr.eContainer()).getTransitions().indexOf(tr));
- } }
+ }
+ }
return Result.ok();
}
|