/// <summary>
            /// Checks if annotated functions were added or deleted and manage connectionn
            /// </summary>
            /// <param name="pr"></param>
            public void CheckForGlobalChanges(Project pr, String eventString, IEnumerable<Function> selectedFunctions)
            {
                Debug.WriteLine("#### Project: " + pr.ProjectName + " -- WSName: " + workspace.getIdentifier());

                IEnumerable<Cloud.Artifact> functionArtifacts = workspace.getArtifacts(functionType); //+ package; getArtifacts(Type) noch nicht implementiert (server wie client seitig)
                List<Cloud.Artifact> artifactList = functionArtifacts.ToList<Cloud.Artifact>();
                List<Function> functionList = FunctionUtils.GetAnnotatedFunctions(pr);

                List<Function> tempList = FunctionUtils.CalcTempFunctionList(artifactList, functionList);

                // These Artifacts should be deleted in Designspace
                List<Cloud.Artifact> deletedFunctions = FunctionUtils.GetDeletedFunctionsAsArtifacts(artifactList, tempList);
                DeleteArtifacts(deletedFunctions);

                //// These Functions should be added in Designspace
                List<Function> addedFunctions = FunctionUtils.GetAddedArtifactsAsFunctions(functionList, tempList);
                CreateFunctionArtifacts(addedFunctions);

                //Update Function Names TODO
                IEnumerable<Function> updateFunctions = functionList.Except<Function>(addedFunctions);
                UpdateFunctions(updateFunctions);


                //Manage Connections
                IEnumerable<Cloud.Artifact> connectionArtifacts = workspace.getArtifacts(connectionType);
                List<Cloud.Artifact> connectionArtifactList = connectionArtifacts.ToList<Cloud.Artifact>();
                List<Connection> connectionList = ConnectionUtils.GetAnnotatedConnections(pr);

                //tempList => welche connections sind sowohl auf Server wie Client existent/gleich
                List<Connection> tempConnList = ConnectionUtils.CalcTempConnectionList(connectionArtifactList, connectionList);

                //Debug.WriteLine("#Connections: " + connectionList.Count);

                IEnumerable<Cloud.Artifact> deletedConnections = ConnectionUtils.GetDeletedConnectionsAsArtifacts(connectionArtifactList, tempConnList);
                UpdateConnections(deletedConnections, selectedFunctions);


                //DeleteArtifacts(deletedConnections);


                HashSet<Tuple<Function, Function>> existingConnectedFunctions = ConnectedFunctions(functionList);

                List<Connection> addedConnections = ConnectionUtils.GetAddedConnectionsAsFunctions(connectionList, tempConnList);
                CreateConnections(addedConnections);

            }