File tree Expand file tree Collapse file tree 2 files changed +40
-2
lines changed
xtext-gradle-builder/src/main/java/org/xtext/gradle/builder Expand file tree Collapse file tree 2 files changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import org.eclipse.xtext.util.UriUtil
7
7
import org.eclipse.xtext.workspace.IProjectConfig
8
8
import org.eclipse.xtext.workspace.ISourceFolder
9
9
import org.xtext.gradle.protocol.GradleBuildRequest
10
- import org.eclipse.xtext.workspace.SingleProjectWorkspaceConfig
11
10
12
11
@FinalFieldsConstructor
13
12
class GradleProjectConfig implements IProjectConfig {
@@ -34,7 +33,7 @@ class GradleProjectConfig implements IProjectConfig {
34
33
}
35
34
36
35
override getWorkspaceConfig () {
37
- new SingleProjectWorkspaceConfig (this )
36
+ new GradleWorkspaceConfig (this )
38
37
}
39
38
40
39
}
Original file line number Diff line number Diff line change
1
+ /* ******************************************************************************
2
+ * Copyright (c) 2018 itemis AG (http://www.itemis.eu) and others.
3
+ * All rights reserved. This program and the accompanying materials
4
+ * are made available under the terms of the Eclipse Public License v1.0
5
+ * which accompanies this distribution, and is available at
6
+ * http://www.eclipse.org/legal/epl-v10.html
7
+ *******************************************************************************/
8
+ package org.xtext.gradle.builder
9
+
10
+
11
+ import org.eclipse.emf.common.util.URI
12
+ import org.eclipse.xtend.lib.annotations.Data
13
+ import org.eclipse.xtext.workspace.IProjectConfig
14
+ import org.eclipse.xtext.workspace.IWorkspaceConfig
15
+ import static extension org.eclipse.xtext.util.UriUtil.*
16
+
17
+ /**
18
+ * @author dietrich - Initial contribution and API
19
+ */
20
+ @Data
21
+ class GradleWorkspaceConfig implements IWorkspaceConfig {
22
+
23
+ IProjectConfig projectConfig
24
+
25
+ override findProjectByName (String name ) {
26
+ if (projectConfig. name == name)
27
+ return projectConfig
28
+ }
29
+
30
+ override findProjectContaining (URI member ) {
31
+ if (projectConfig. path. isPrefixOf(member))
32
+ return projectConfig
33
+ }
34
+
35
+ override getProjects () {
36
+ return #{projectConfig}
37
+ }
38
+
39
+ }
You can’t perform that action at this time.
0 commit comments