blob: 696d91e00a9ced84f21607547e1c18ade3baadf3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/**
* Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* 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:
* Florian Pirchner - Initial implementation
*/
package org.eclipse.osbp.ecview.uisemantics.scoping;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.naming.IQualifiedNameConverter;
import org.eclipse.xtext.scoping.impl.ImportNormalizer;
import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider;
import com.google.inject.Inject;
public class UiImportedNamespaceAwareLocalScopeProvider extends
ImportedNamespaceAwareLocalScopeProvider {
@Inject
private IQualifiedNameConverter qualifiedNameConverter;
@Override
protected List<ImportNormalizer> getImplicitImports(boolean ignoreCase) {
List<ImportNormalizer> temp = new ArrayList<ImportNormalizer>();
temp.add(new ImportNormalizer(qualifiedNameConverter
.toQualifiedName("java.lang"), true, ignoreCase));
temp.add(new ImportNormalizer(qualifiedNameConverter
.toQualifiedName("java.util"), true, ignoreCase));
return temp;
}
@Override
protected List<ImportNormalizer> internalGetImportedNamespaceResolvers(
EObject context, boolean ignoreCase) {
return super.internalGetImportedNamespaceResolvers(context, ignoreCase);
}
}
|