Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2019-08-19 10:04:57 -0400
committerJuergen Haug2019-08-19 10:04:57 -0400
commit39d6bf6fae099927b009e4b82589dff0f6887de7 (patch)
tree9686fae74bfef57aaca24c3c2cbce3a217e9af16
parent5e3a5d12e1ef4618fb4677e1c7dc919f8c67ee70 (diff)
downloadorg.eclipse.etrice-39d6bf6fae099927b009e4b82589dff0f6887de7.tar.gz
org.eclipse.etrice-39d6bf6fae099927b009e4b82589dff0f6887de7.tar.xz
org.eclipse.etrice-39d6bf6fae099927b009e4b82589dff0f6887de7.zip
Bug 550217 - [room.ui] restricted import quickfix to RoomClasses only
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/quickfix/RoomQuickFixProviderXtend.xtend3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/quickfix/RoomQuickFixProviderXtend.xtend b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/quickfix/RoomQuickFixProviderXtend.xtend
index a2654a381..cf7179eb4 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/quickfix/RoomQuickFixProviderXtend.xtend
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/quickfix/RoomQuickFixProviderXtend.xtend
@@ -22,6 +22,7 @@ import org.eclipse.xtext.EcoreUtil2
import org.eclipse.xtext.resource.XtextResource
import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionAcceptor
import org.eclipse.xtext.validation.Issue
+import org.eclipse.etrice.core.room.RoomPackage
class RoomQuickFixProviderXtend extends RoomQuickfixProvider {
@@ -46,7 +47,7 @@ class RoomQuickFixProviderXtend extends RoomQuickfixProvider {
val target = resource.getEObject(issue.uriToProblem.fragment)
val reference = getUnresolvedEReference(issue, target)
- if(reference !== null) {
+ if(reference !== null && RoomPackage.Literals.ROOM_CLASS.isSuperTypeOf(reference.EReferenceType)) {
createLinkingImports(issue, issueString, resource, reference.EReferenceType, false, acceptor);
}
}

Back to the top