diff options
Diffstat (limited to 'language-web/src/main/java')
-rw-r--r-- | language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java | 6 | ||||
-rw-r--r-- | language-web/src/main/java/tools/refinery/language/web/occurrences/ProblemOccurrencesService.java | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java b/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java index ac8934ed..ec55036f 100644 --- a/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java +++ b/language-web/src/main/java/tools/refinery/language/web/ProblemWebModule.java | |||
@@ -6,7 +6,9 @@ package tools.refinery.language.web; | |||
6 | import org.eclipse.xtext.web.server.XtextServiceDispatcher; | 6 | import org.eclipse.xtext.web.server.XtextServiceDispatcher; |
7 | import org.eclipse.xtext.web.server.model.IWebDocumentProvider; | 7 | import org.eclipse.xtext.web.server.model.IWebDocumentProvider; |
8 | import org.eclipse.xtext.web.server.model.XtextWebDocumentAccess; | 8 | import org.eclipse.xtext.web.server.model.XtextWebDocumentAccess; |
9 | import org.eclipse.xtext.web.server.occurrences.OccurrencesService; | ||
9 | 10 | ||
11 | import tools.refinery.language.web.occurrences.ProblemOccurrencesService; | ||
10 | import tools.refinery.language.web.xtext.server.push.PushServiceDispatcher; | 12 | import tools.refinery.language.web.xtext.server.push.PushServiceDispatcher; |
11 | import tools.refinery.language.web.xtext.server.push.PushWebDocumentAccess; | 13 | import tools.refinery.language.web.xtext.server.push.PushWebDocumentAccess; |
12 | import tools.refinery.language.web.xtext.server.push.PushWebDocumentProvider; | 14 | import tools.refinery.language.web.xtext.server.push.PushWebDocumentProvider; |
@@ -26,4 +28,8 @@ public class ProblemWebModule extends AbstractProblemWebModule { | |||
26 | public Class<? extends XtextServiceDispatcher> bindXtextServiceDispatcher() { | 28 | public Class<? extends XtextServiceDispatcher> bindXtextServiceDispatcher() { |
27 | return PushServiceDispatcher.class; | 29 | return PushServiceDispatcher.class; |
28 | } | 30 | } |
31 | |||
32 | public Class<? extends OccurrencesService> bindOccurrencesService() { | ||
33 | return ProblemOccurrencesService.class; | ||
34 | } | ||
29 | } | 35 | } |
diff --git a/language-web/src/main/java/tools/refinery/language/web/occurrences/ProblemOccurrencesService.java b/language-web/src/main/java/tools/refinery/language/web/occurrences/ProblemOccurrencesService.java new file mode 100644 index 00000000..d32bbb54 --- /dev/null +++ b/language-web/src/main/java/tools/refinery/language/web/occurrences/ProblemOccurrencesService.java | |||
@@ -0,0 +1,16 @@ | |||
1 | package tools.refinery.language.web.occurrences; | ||
2 | |||
3 | import org.eclipse.emf.ecore.EObject; | ||
4 | import org.eclipse.xtext.web.server.occurrences.OccurrencesService; | ||
5 | |||
6 | import com.google.inject.Singleton; | ||
7 | |||
8 | import tools.refinery.language.model.problem.NamedElement; | ||
9 | |||
10 | @Singleton | ||
11 | public class ProblemOccurrencesService extends OccurrencesService { | ||
12 | @Override | ||
13 | protected boolean filter(EObject element) { | ||
14 | return super.filter(element) && element instanceof NamedElement; | ||
15 | } | ||
16 | } | ||