1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 import model
::module_compound
18 var graph
= new ProjectGraph("foo")
19 var file
= new FileCompound(graph
)
20 var file_2
= new FileCompound(graph
)
21 var bar_class
= new ClassCompound(graph
)
22 var c_ns
= new Namespace(graph
)
23 var buffer
= new RopeBuffer
25 file
.full_name
= "Bar.java"
26 file
.model_id
= "_Bar_8java"
27 file
.declare_class
("classa_b_bar", "a::b::Bar")
28 file
.declare_namespace
("", "a::b")
31 file_2
.full_name
= "Bar.java"
32 file_2
.model_id
= "_Bar_8java_2"
33 file_2
.declare_namespace
("namespacec", "c")
34 file_2
.declare_namespace
("", "d")
37 bar_class
.model_id
= "classa_b_bar"
38 bar_class
.full_name
= "a::b::Bar"
39 bar_class
.put_in_graph
41 c_ns
.model_id
= "namespacec"