Skip to content
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

599 - Action to add Edges to the Architecture Graph to solve Divergences #629

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
ad2048e
add Action and NetAction to accept Divergences into Architecture
m4xxed May 25, 2023
19bad11
add ActionStateType for AcceptDivergenceAction
m4xxed May 25, 2023
a2eb3e9
add correct implementation next to current workaround
m4xxed May 25, 2023
2ffd5a9
add convenience method to check for divergence
m4xxed May 25, 2023
f556b92
switch from "dirty hack" to actual solution - works
m4xxed May 25, 2023
55566a6
fix grammar of documentation
m4xxed Jul 20, 2023
28c9e41
remove unused import #599
m4xxed Jul 27, 2023
a50db64
remove unneccesary workaround #599
m4xxed Jul 27, 2023
64c5691
disable networkaction temporarily #599
m4xxed Jul 27, 2023
0d36940
update documentation #599
m4xxed Jul 27, 2023
169b7b6
add functionality to create edges #599
m4xxed Jul 27, 2023
c562db2
fix imports #599
m4xxed Jul 27, 2023
d128490
start adding basic redo functionality #599
m4xxed Jul 27, 2023
7de3d45
Merge branch 'master' into 599-reflexion-sync-edges-from-implementati…
m4xxed Jul 29, 2023
e63c849
something went wrong while merging - reverted to master state #599
m4xxed Jul 29, 2023
1c153b8
use GameEdgeAdder to add Edge to Game
m4xxed Aug 5, 2023
9f56502
add DrawEdge method that accepts an existing Edge as parameter
m4xxed Aug 5, 2023
dd9155c
add DrawEdge because it is required in GraphRenderer
m4xxed Aug 5, 2023
6180133
overload DrawEdge to accept an existing DataModel.Edge as parameter
m4xxed Aug 5, 2023
4c7a097
fixed formatting
m4xxed Aug 5, 2023
1850bdf
add new Draw() method to GameEdgeAdder
m4xxed Aug 5, 2023
fed7e6f
temporary placeholder until we figure out a better way
m4xxed Aug 5, 2023
ca8e634
Automatic changes by Unity
falko17 Aug 6, 2023
3941a48
Use new new in EdgeRenderer
falko17 Aug 6, 2023
2826904
Pass correct source object to Renderer.DrawEdge
falko17 Aug 6, 2023
9a60c00
add audio and a networkaction to edge creation
m4xxed Aug 8, 2023
72c8a3f
reorder Class to fit order convention and add undo / redo
m4xxed Aug 8, 2023
25ae3a3
add NetAction to accept divergences
m4xxed Aug 8, 2023
07c4283
completed undo- and redo functionality
m4xxed Aug 8, 2023
4373f92
complete overhaul of the docstrings and inline documentation
m4xxed Aug 8, 2023
b7b8701
fixed order of actions - AcceptDivergence now before MetricBoard
m4xxed Aug 8, 2023
2160453
rename method to a less blame-y name and adjust documentation
m4xxed Aug 8, 2023
4b7a95a
fix and / or add documentation
m4xxed Aug 8, 2023
bf8fbba
passing GUID to clients to have matching GUID
m4xxed Aug 9, 2023
5d1d558
corrected, appended and adjusted documentation
m4xxed Aug 9, 2023
5066546
removed unused function (AddEdge(Edge) works better)
m4xxed Aug 9, 2023
b352259
check whether both GameObject and Node can be found
m4xxed Aug 9, 2023
36ac009
improve documentation
m4xxed Aug 9, 2023
756e437
Merge branch 'master' into 599-reflexion-sync-edges-from-implementati…
m4xxed Aug 9, 2023
ce1fd9f
remove extraneous newlines and dead code
m4xxed Aug 11, 2023
362f28e
add assertion, that the new edge is actually in architecture
m4xxed Aug 11, 2023
f8579f0
ensure edge is in archticture to avoid exceptions
m4xxed Aug 11, 2023
abc12dc
renamed variable to be more descriptive
m4xxed Aug 11, 2023
7513994
remove old comments and add missing documentation
m4xxed Aug 11, 2023
eaa02b2
remove comment that should've been removed before commit
m4xxed Aug 11, 2023
7e3cb0a
add "missing" braces
m4xxed Aug 11, 2023
aa14af6
refactor code to make it look smoother
m4xxed Aug 11, 2023
8d57202
remove unneccessary lookups
m4xxed Aug 11, 2023
ba361ff
update documentation
m4xxed Aug 11, 2023
1ffa907
simplify documentation
m4xxed Aug 11, 2023
375f2fe
update documentation
m4xxed Aug 11, 2023
6e099fa
remove variable and nesting complexity
m4xxed Aug 11, 2023
00a5e64
remove redundancy in documentation
m4xxed Aug 11, 2023
f2ac554
fixed checking in wrong graph
m4xxed Aug 11, 2023
ad2429c
fixed check for wrong graph
m4xxed Aug 11, 2023
0f93c7f
fixed documentation
m4xxed Aug 13, 2023
a94a752
Merge remote-tracking branch 'origin/master' into 599-reflexion-sync-…
koschke Aug 16, 2023
08bd443
#599 Fixed copy&paste error in documentation.
koschke Aug 16, 2023
abac963
#599 GlobalHistoryEntry can be readonly.
koschke Aug 16, 2023
9f2f358
#599 Replaced magic strings by edge-type declarations in Edge.
koschke Aug 16, 2023
1e09e7c
#599 Simplified new operator.
koschke Aug 16, 2023
c417919
#599 Architecture does not need to be capitalized.
koschke Aug 16, 2023
10fa2f3
#599 Removed obsolete implementation hint.
koschke Aug 16, 2023
8e60295
#599 Added missing import.
koschke Aug 16, 2023
735a67b
#599 We can use Find. Fixed misleading error message.
koschke Aug 16, 2023
d27b8d5
fix documentation - change check to catch propagated edges too
m4xxed Aug 16, 2023
63b8b36
#599 Removed obsolete class that was once created only for video reco…
koschke Aug 17, 2023
9df862b
#599 Created namespace for classes manipulating game objects in the s…
koschke Aug 17, 2023
7aa9390
Merge branch '599-reflexion-sync-edges-from-implementation-to-archite…
koschke Aug 17, 2023
832b437
#599 Removed obsolete class.
koschke Aug 17, 2023
2a69e52
#599 Removed obsolete class.
koschke Aug 17, 2023
a8e1b6b
#599 Use simplified new operator.
koschke Aug 17, 2023
eba4451
#599 Extracted class for code shared among AcceptDivergenceAction and…
koschke Aug 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions Assets/SEE/Game/GameEdgeAdder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,33 +55,26 @@ public static GameObject Add(GameObject source, GameObject target, string edgeTy
}

/// <summary>
/// (Re)draws an edge in those cases where the
/// ReflexionAnalysis isn't run after adding it, and so it
/// will not be drawn before after the next change.
/// Simply (re)draws an edge.
/// </summary>
/// <param name="edge">the edge that should be (re)drawn</param>
/// <returns>the GameObject of the drawn edge</returns>
public static GameObject Draw(Edge edge)
{
GameObject source = GraphElementIDMap.Find(edge.Source.ID);
Transform cityObject = SceneQueries.GetCodeCity(source.transform);
GameObject result;
if (cityObject != null)

if (!cityObject)
{
if (cityObject.TryGetComponent(out AbstractSEECity city))
{
result = city.Renderer.DrawEdge(edge, source: source);
}
else
{
throw new Exception($"The code city for the new edge {edge.ToShortString()} cannot be determined.\n");
}
throw new Exception($"The code city for the new edge {edge.ToShortString()} cannot be determined.\n");
}
else

if (!cityObject.TryGetComponent(out AbstractSEECity city))
{
throw new Exception($"Could not determine the code city for the new edge {edge.ToShortString()}.\n");
}
return result;

return city.Renderer.DrawEdge(edge, source: source);
}

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions Assets/SEE/Net/Actions/AcceptDivergenceNetAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
namespace SEE.Net.Actions
{
/// <summary>
/// This class is responsible for adding a node via network from
/// one client to all others and to the server.
/// This class is responsible for adding a specific edge via
/// network from one client to all others and to the server, in
/// order to solve an occuring divergence.
m4xxed marked this conversation as resolved.
Show resolved Hide resolved
/// </summary>
public class AcceptDivergenceNetAction : AbstractNetAction
{
Expand Down