-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add startVisit and endVisit methods to add handling of FileredView #285
Changes from 6 commits
26bc99f
24a7fdb
4a9e5f1
4530907
38b4823
8068939
8e5ff18
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ workspace "aadarchi-documentation-system" { | |
model { | ||
person_architect = person "Architect" "The architect as team scribe is the writer of this kind of documentation." | ||
person_stakeholder = person "Stakeholder" "All project stakeholders are readers of this kind of documentation." | ||
aadarchi = softwareSystem "Aadarchi" { | ||
aadarchi = softwareSystem "Aadarchi" "auto-include" { | ||
properties { | ||
"aadarchi.tickets.project" "aadarchi-documentation-system" | ||
"aadarchi.issue.manager" "https://github.com/Riduidel/aadarchi-documentation-system" | ||
|
@@ -16,7 +16,7 @@ workspace "aadarchi-documentation-system" { | |
} | ||
maven -> this "Invokes this plugin during build to generate data" | ||
} | ||
aadarchi_base = container "base" "" "Java, CDI" { | ||
aadarchi_base = container "base" "" "Java, CDI" "auto-include" { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Le tag auto-include ne se met qu'au niveau de la vue, pas du modèle |
||
properties { | ||
"aadarchi.sequence.generator.with" "true" | ||
} | ||
|
@@ -47,11 +47,13 @@ workspace "aadarchi-documentation-system" { | |
systemContext "aadarchi" "SystemContext" "Illustration of aadarchi-documentation usage" { | ||
include * | ||
} | ||
container "aadarchi" "system_containers" "Agile architecture containers" { | ||
container "aadarchi" "system_containers_source" "Agile architecture containers" { | ||
include * | ||
} | ||
component "aadarchi_base" "base_components" "Agile architecture base components view" { | ||
component "aadarchi_base" "base_components_source" "Agile architecture base components view" { | ||
include * | ||
} | ||
filtered "system_containers_source" include "Element,Relationship,auto-include" "system_containers" "Agile architecture containers" | ||
filtered "base_components_source" include "Element,Relationship,auto-include" "base_components" "Agile architecture base components view" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
== base components | ||
|
||
[plantuml, {plantumldir}base_components, svg, opts="inline"] | ||
[plantuml, {plantumldir}base_components_source, svg, opts="inline"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Il faut utiliser la vue générée, et pas la vue source |
||
---- | ||
include::{structurizrdir}/base_components.plantuml[] | ||
include::{structurizrdir}/base_components_source.plantuml[] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Il faut utiliser la vue générée, et pas la vue source |
||
---- | ||
|
||
== base interface | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
:chapter: Software%20Architecture | ||
include::_notify-bug-admonition.adoc[] | ||
|
||
[plantuml, {plantumldir}system_containers, svg, opts="inline"] | ||
[plantuml, {plantumldir}system_containers_source, svg, opts="inline"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Il faut utiliser la vue générée, et pas la vue source |
||
---- | ||
include::{structurizrdir}/system_containers.plantuml[] | ||
include::{structurizrdir}/system_containers_source.plantuml[] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Il faut utiliser la vue générée, et pas la vue source |
||
---- | ||
|
||
**TODO** | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package org.ndx.aadarchi.base.enhancers.graph; | ||
|
||
import java.util.logging.Logger; | ||
|
||
import javax.inject.Inject; | ||
|
||
import org.ndx.aadarchi.base.OutputBuilder; | ||
import org.ndx.aadarchi.base.enhancers.ViewEnhancerAdapter; | ||
|
||
import com.structurizr.view.ComponentView; | ||
import com.structurizr.view.ContainerView; | ||
import com.structurizr.view.FilteredView; | ||
import com.structurizr.view.View; | ||
import com.structurizr.view.ViewSet; | ||
|
||
|
||
public class ViewUpdater extends ViewEnhancerAdapter { | ||
private static final String INCLUDE_TAG = "auto-include"; | ||
@Inject Logger logger; | ||
@Override | ||
public boolean isParallel() { | ||
// TODO Auto-generated method stub | ||
return false; | ||
} | ||
|
||
@Override | ||
public int priority() { | ||
return TOP_PRIORITY_FOR_INTERNAL_ENHANCERS+1; | ||
} | ||
|
||
@Override | ||
public boolean startVisit(FilteredView filteredView) { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void endVisit(FilteredView filteredView, OutputBuilder builder) { | ||
if(filteredView.getTags().contains(INCLUDE_TAG)) { | ||
View source = filteredView.getView(); | ||
if(source instanceof ComponentView) { | ||
((ComponentView) source).addAllComponents(); | ||
} else if(source instanceof ContainerView) { | ||
((ContainerView) source).addAllContainersAndInfluencers(); | ||
} | ||
} | ||
super.endVisit(filteredView, builder); | ||
} | ||
|
||
public void endVisit(ViewSet v, OutputBuilder b) { | ||
if(v.getFilteredViews().isEmpty()) { | ||
logger.warning("There are no filtered views in viewset, so we don't add any discovered container/component"); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le tag auto-include ne se met qu'au niveau de la vue, pas du modèle