ec804460ad6f9f56e3727782c88a315bac170ba9
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 baz_class
= new ClassCompound(graph
)
23 var c_ns
= new Namespace(graph
)
24 var buffer
= new RopeBuffer
26 file
.full_name
= "Bar.java"
27 file
.model_id
= "_Bar_8java"
28 file
.declare_class
("classa_b_bar", "a::b::Bar")
29 file
.declare_class
("classbaz", "Baz")
30 file
.declare_namespace
("", "a::b")
33 file_2
.full_name
= "Bar.java"
34 file_2
.model_id
= "_Bar_8java_2"
35 file_2
.declare_namespace
("namespacec", "c")
36 file_2
.declare_namespace
("", "d")
39 bar_class
.model_id
= "classa_b_bar"
40 bar_class
.full_name
= "a::b::Bar"
41 bar_class
.put_in_graph
43 baz_class
.model_id
= "classbaz"
44 baz_class
.full_name
= "Baz"
45 baz_class
.put_in_graph
47 c_ns
.model_id
= "namespacec"