Minor improvements required for external test dsl
Change-Id: I11fcf17de91a05ac7a6ff975cddce67844db4cae
diff --git a/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/validation/BaseValidator.java b/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/validation/BaseValidator.java
new file mode 100644
index 0000000..4ffc8cf
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/validation/BaseValidator.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Juergen Haug (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.common.validation;
+
+// New xtext project expect BaseValidator instead of BaseJavaValidator
+public class BaseValidator extends BaseJavaValidator {
+
+}
diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java
index 10fcfe3..770eb43 100644
--- a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java
+++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/RoomHelpers.java
@@ -1136,15 +1136,20 @@
* @see #getAllMessages(ProtocolClass, boolean)
*/
public List<Message> getMessageListDeep(InterfaceItem item, boolean outgoing) {
+ if(item.getGeneralProtocol().eIsProxy()){
+ return Lists.newArrayList();
+ }
+
ProtocolClass protocol = null;
if (item instanceof Port) {
- if (!(((Port) item).getProtocol() instanceof ProtocolClass)) {
+ Port port = (Port) item;
+ if (!(port.getProtocol() instanceof ProtocolClass)) {
// end ports (for which this is called) can have no CompoundProtocolClass
assert(false): "unexpected protocol type";
return null;
}
- protocol = (ProtocolClass) ((Port) item).getProtocol();
+ protocol = (ProtocolClass) port.getProtocol();
if (((Port) item).isConjugated())
outgoing = !outgoing;
}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
index 6549df5..5edefad 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/AbstractGenerator.java
@@ -452,9 +452,9 @@
// create a list of ROOM models
List<RoomModel> rml = new ArrayList<RoomModel>();
for (Resource resource : getResourceSet().getResources()) {
- List<EObject> contents = resource.getContents();
- if (!contents.isEmpty() && contents.get(0) instanceof RoomModel) {
- rml.add((RoomModel)contents.get(0));
+ for(EObject content : resource.getContents()){
+ if(content instanceof RoomModel)
+ rml.add((RoomModel) content);
}
}
if (rml.isEmpty()) {