Composant base loading
This commit is contained in:
parent
8f2e7cffe9
commit
6cb8ecec84
1 changed files with 21 additions and 3 deletions
|
@ -43,8 +43,17 @@ public class ParserComposantGenerator {
|
|||
public void generate() throws Exception{
|
||||
SynthaxeComposant synthax = load();
|
||||
Map<String, Set<String>> dependency = synthax.dependency();
|
||||
for(Entry<String, Set<String>> entry : dependency.entrySet()){
|
||||
System.out.println(entry.getKey()+" - "+entry.getValue());
|
||||
|
||||
while(!dependency.isEmpty()){
|
||||
for(Entry<String, Set<String>> composant : dependency.entrySet()){
|
||||
if(composant.getValue().isEmpty()){
|
||||
synthax.composants.get(composant.getKey()).build();
|
||||
|
||||
dependency.remove(composant.getKey());
|
||||
for(Entry<String, Set<String>> entry : dependency.entrySet()) entry.getValue().remove(composant.getKey());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -381,7 +390,11 @@ public class ParserComposantGenerator {
|
|||
private Map<String, Set<String>> dependency(){
|
||||
Map<String, Set<String>> map = new HashMap<>();
|
||||
|
||||
for(Entry<String, Composant> entry : this.composants.entrySet()) map.put(entry.getKey(), entry.getValue().dependency());
|
||||
for(Entry<String, Composant> entry : this.composants.entrySet()){
|
||||
Set<String> set = entry.getValue().dependency();
|
||||
set.remove(entry.getKey());
|
||||
map.put(entry.getKey(), set);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
@ -428,6 +441,11 @@ public class ParserComposantGenerator {
|
|||
return result;
|
||||
}
|
||||
|
||||
public void build(){
|
||||
System.out.println("build "+title);
|
||||
|
||||
}
|
||||
|
||||
public void include(){
|
||||
if(path == null){
|
||||
path = current;
|
||||
|
|
Loading…
Add table
Reference in a new issue