diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index e62911258..000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/../../../../../:\Dev\USE\use\.idea/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/encodings.xml b/.idea/encodings.xml deleted file mode 100644 index 882bb50c6..000000000 --- a/.idea/encodings.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 40155f00c..000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 136227842..000000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfb..000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/docs/archunit-results/README b/docs/archunit-results/README index ee9f54695..76d974a6e 100644 --- a/docs/archunit-results/README +++ b/docs/archunit-results/README @@ -1,2 +1,2 @@ -This file needs to stay here, because the directory is needed during test runs. +This file needs to stay here, because the directory is needed during test runs. If the file is removed, the directory would be "deleted" from the git repository. \ No newline at end of file diff --git a/docs/archunit-results/cycles-current-failure-report.txt b/docs/archunit-results/cycles-current-failure-report.txt new file mode 100644 index 000000000..d79830d15 --- /dev/null +++ b/docs/archunit-results/cycles-current-failure-report.txt @@ -0,0 +1,4234 @@ +Cycle detected: Slice analysis -> + Slice uml -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Method calls constructor (boolean)> in (DerivedAttributeController.java:93) + - Method calls method in (DerivedAttributeController.java:96) +Cycle detected: Slice analysis -> + Slice uml -> + Slice api -> + Slice config -> + Slice util -> + Slice parser -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) + 3. Dependencies of Slice api + - Method calls method in (UseSystemApi.java:629) + - Method calls method in (UseSystemApi.java:630) + - Method calls method in (UseSystemApi.java:632) + - Method gets field in (UseSystemApi.java:632) + - Method calls method in (UseSystemApi.java:633) + - Method gets field in (UseSystemApi.java:633) + - Method calls method in (UseSystemApi.java:638) + - Method calls method in (UseSystemApi.java:639) + 4. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 5. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 6. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 7. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice analysis -> + Slice uml -> + Slice api -> + Slice main -> + Slice config -> + Slice util -> + Slice parser -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) + 3. Dependencies of Slice api + - Constructor (org.tzi.use.main.Session)> has parameter of type in (UseSystemApiUndoable.java:0) + - Method has parameter of type in (UseSystemApi.java:0) + - Constructor (org.tzi.use.main.Session)> calls method in (UseSystemApiUndoable.java:65) + 4. Dependencies of Slice main + - Method gets field in (MonitorAspectGenerator.java:73) + 5. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 6. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 7. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 8. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice analysis -> + Slice uml -> + Slice api -> + Slice parser -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) + 3. Dependencies of Slice api + - Method calls constructor ()> in (UseModelApi.java:443) + - Method calls method in (UseModelApi.java:445) + - Method calls method in (UseModelApi.java:450) + - Method calls method in (UseModelApi.java:499) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:505) + - Method calls method in (UseModelApi.java:506) + - Method calls method in (UseModelApi.java:510) + - Method calls constructor (java.lang.String, java.io.PrintWriter)> in (UseModelApi.java:548) + - Method calls constructor (org.antlr.runtime.CharStream)> in (UseModelApi.java:557) + - Method calls constructor (org.antlr.runtime.TokenStream)> in (UseModelApi.java:559) + - Method calls method in (UseModelApi.java:561) + - Method calls method in (UseModelApi.java:562) + - Method calls method in (UseModelApi.java:565) + - Method calls method in (UseModelApi.java:567) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:569) + - Method calls method in (UseModelApi.java:573) + - Method calls method in (UseModelApi.java:575) + - Method calls method in (UseModelApi.java:578) + - Method calls method in (UseModelApi.java:579) + - Method calls method in (UseModelApi.java:579) + (10 further dependencies have been omitted...) + 4. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 5. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice analysis -> + Slice uml -> + Slice api -> + Slice util -> + Slice parser -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) + 3. Dependencies of Slice api + - Method calls method in (UseSystemApiNative.java:69) + - Method calls method in (UseSystemApiUndoable.java:101) + - Method calls method in (UseSystemApiUndoable.java:129) + - Method calls method in (UseSystemApi.java:141) + - Method calls method in (UseModelApi.java:150) + - Method calls method in (UseSystemApiUndoable.java:155) + - Method calls method in (UseModelApi.java:178) + - Method calls method in (UseSystemApi.java:262) + - Method calls method in (UseModelApi.java:311) + - Method calls method in (UseModelApi.java:512) + - Method calls method in (UseModelApi.java:541) + - Method calls method in (UseSystemApi.java:594) + - Method calls method in (UseSystemApi.java:643) + - Method calls method in (UseSystemApi.java:652) + - Method calls method in (UseModelApi.java:750) + - Method calls method in (UseModelApi.java:1014) + - Method calls method in (UseModelApi.java:1056) + - Method calls method in (UseModelApi.java:1072) + - Method calls method in (UseModelApi.java:1076) + 4. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 5. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 6. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice analysis -> + Slice uml -> + Slice config -> + Slice util -> + Slice parser -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Method has parameter of type in (ExpStdOp.java:0) + - Method calls method in (ExpStdOp.java:135) + - Method calls method in (ExpStdOp.java:135) + - Method gets field in (ExpStdOp.java:135) + - Method calls method in (ExpStdOp.java:136) + - Method calls method in (ExpStdOp.java:138) + - Method calls method in (ExpStdOp.java:138) + - Method gets field in (ExpStdOp.java:138) + - Method calls method in (ExpStdOp.java:142) + - Method calls method in (ExpStdOp.java:142) + - Method gets field in (ExpStdOp.java:142) + - Method calls method in (ExpStdOp.java:197) + - Method gets field in (ExpStdOp.java:197) + - Method calls method in (MSystem.java:540) + - Method calls method in (MSystem.java:671) + - Method gets field in (MSystemState.java:1565) + - Method gets field in (MSystemState.java:1566) + - Method gets field in (MSystemState.java:1618) + - Method gets field in (MSystemState.java:1680) + - Method gets field in (MSystemState.java:1817) + 3. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 4. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 5. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 6. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice analysis -> + Slice uml -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) + 3. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice analysis -> + Slice uml -> + Slice graph -> + Slice util -> + Slice parser -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Class implements interface in (MGeneralization.java:0) + - Field has type in (MModel.java:0) + - Field has type in (MSystemState.java:0) + - Interface extends interface in (MWholePartLink.java:0) + - Method has return type in (MModel.java:0) + - Method has return type in (MSystemState.java:0) + - Constructor (java.lang.String)> calls constructor ()> in (MModel.java:84) + - Method calls method in (MModel.java:123) + - Method calls method in (MModel.java:160) + - Method calls method in (MDataTypeImpl.java:233) + - Method calls method in (MDataTypeImpl.java:245) + - Method calls method in (MDataTypeImpl.java:256) + - Method calls method in (MDataTypeImpl.java:266) + - Method calls method in (MMInstanceGenerator.java:274) + - Method calls method in (MClassImpl.java:304) + - Method calls method in (MAssociationImpl.java:307) + - Method calls method in (MClassImpl.java:316) + - Method calls method in (MClassImpl.java:327) + - Method calls method in (MAssociationClassImpl.java:331) + - Method calls method in (MAssociationClassImpl.java:337) + (35 further dependencies have been omitted...) + 3. Dependencies of Slice graph + - Constructor (java.lang.Object)> calls method in (NodeDoesNotExistException.java:40) + 4. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 5. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 6. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice analysis -> + Slice uml -> + Slice parser -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MProtocolStateMachine.java:0) + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MStateMachine.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByKind.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByType.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssert.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClass)> has parameter of type in (MAssertClassInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertGlobalInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (MAssertOclExpression.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertPost.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.mm.MOperation, [Lorg.tzi.use.uml.ocl.expr.Expression;)> has parameter of type in (MAssertPre.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (MAssertSingleInvariant.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.tzi.use.parser.SrcPos)> has parameter of type in (MVariation.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationEnd.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationStart.java:0) + - Field has type in (MStateMachine.java:0) + - Field has type in (Expression.java:0) + - Field has type in (VarDecl.java:0) + - Field has type in (MStatement.java:0) + (42 further dependencies have been omitted...) + 3. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 4. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice analysis -> + Slice uml -> + Slice util -> + Slice parser -> + Slice gen -> + Slice analysis + 1. Dependencies of Slice analysis + - Class implements interface in (AbstractCoverageVisitor.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Constructor (org.tzi.use.uml.mm.MClassifier, org.tzi.use.uml.mm.MAttribute)> has parameter of type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (AbstractCoverageVisitor.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has type in (AttributeAccessInfo.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (BasicCoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Field has generic type > with type argument depending on in (CoverageData.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + - Method has parameter of type in (AbstractCoverageVisitor.java:0) + (253 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Class implements interface in (ExpTupleLiteral.java:0) + - Class implements interface in (Expression.java:0) + - Class implements interface in (TupleType.java:0) + - Class implements interface in (TupleValue.java:0) + - Class implements interface in (Value.java:0) + - Class implements interface in (MSystemState.java:0) + - Class implements interface in (MSystemState.java:0) + - Class implements interface in (MLinkDeletionStatement.java:0) + - Constructor (int, org.tzi.use.util.collections.Queue, java.util.ArrayList, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (ThreadedEvaluator.java:0) + - Constructor (org.tzi.use.uml.sys.events.tags.EventContext, org.tzi.use.uml.sys.soil.MStatement, org.tzi.use.util.soil.StateDifference)> has parameter of type in (StatementExecutedEvent.java:0) + - Field has type in (ThreadedEvaluator.java:0) + - Field has type in (BagValue.java:0) + - Field has type in (MSystem.java:0) + - Field has type in (MSystem.java:0) + - Field has generic type > with type argument depending on in (MSystem.java:0) + - Field has type in (StatementEvaluationResult.java:0) + - Field has type in (StatementEvaluationResult.java:0) + - Field has type in (StatementExecutedEvent.java:0) + - Interface extends interface in (Type.java:0) + - Method has return type in (Evaluator.java:0) + (464 further dependencies have been omitted...) + 3. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 4. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 5. Dependencies of Slice gen + - Field has type in (BasicInstructionCoverageCalulator.java:0) + - Method has return type in (BasicInstructionCoverageCalulator.java:0) + - Method calls constructor ()> in (BasicInstructionCoverageCalulator.java:45) + - Method calls method in (BasicInstructionCoverageCalulator.java:59) + - Method calls method in (BasicInstructionCoverageCalulator.java:108) + - Method calls constructor (boolean)> in (GProcedure.java:119) + - Method calls method in (GProcedure.java:123) + - Method calls method in (BasicInstructionCoverageCalulator.java:125) + - Method calls method in (GProcedure.java:144) + - Method calls method in (BasicInstructionCoverageCalulator.java:158) + - Method calls method in (BasicInstructionCoverageCalulator.java:225) + - Method calls method in (BasicInstructionCoverageCalulator.java:233) + - Method calls method in (BasicInstructionCoverageCalulator.java:235) + - Method calls method in (BasicInstructionCoverageCalulator.java:260) + - Method calls method in (BasicInstructionCoverageCalulator.java:276) +Cycle detected: Slice api -> + Slice config -> + Slice util -> + Slice parser -> + Slice gen -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls method in (UseSystemApi.java:629) + - Method calls method in (UseSystemApi.java:630) + - Method calls method in (UseSystemApi.java:632) + - Method gets field in (UseSystemApi.java:632) + - Method calls method in (UseSystemApi.java:633) + - Method gets field in (UseSystemApi.java:633) + - Method calls method in (UseSystemApi.java:638) + - Method calls method in (UseSystemApi.java:639) + 2. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 3. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 4. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 5. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 6. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice config -> + Slice util -> + Slice parser -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls method in (UseSystemApi.java:629) + - Method calls method in (UseSystemApi.java:630) + - Method calls method in (UseSystemApi.java:632) + - Method gets field in (UseSystemApi.java:632) + - Method calls method in (UseSystemApi.java:633) + - Method gets field in (UseSystemApi.java:633) + - Method calls method in (UseSystemApi.java:638) + - Method calls method in (UseSystemApi.java:639) + 2. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 3. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 4. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 5. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice config -> + Slice util -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls method in (UseSystemApi.java:629) + - Method calls method in (UseSystemApi.java:630) + - Method calls method in (UseSystemApi.java:632) + - Method gets field in (UseSystemApi.java:632) + - Method calls method in (UseSystemApi.java:633) + - Method gets field in (UseSystemApi.java:633) + - Method calls method in (UseSystemApi.java:638) + - Method calls method in (UseSystemApi.java:639) + 2. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 3. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice main -> + Slice config -> + Slice util -> + Slice parser -> + Slice gen -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Constructor (org.tzi.use.main.Session)> has parameter of type in (UseSystemApiUndoable.java:0) + - Method has parameter of type in (UseSystemApi.java:0) + - Constructor (org.tzi.use.main.Session)> calls method in (UseSystemApiUndoable.java:65) + 2. Dependencies of Slice main + - Method gets field in (MonitorAspectGenerator.java:73) + 3. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 4. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 5. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 6. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 7. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice main -> + Slice config -> + Slice util -> + Slice parser -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Constructor (org.tzi.use.main.Session)> has parameter of type in (UseSystemApiUndoable.java:0) + - Method has parameter of type in (UseSystemApi.java:0) + - Constructor (org.tzi.use.main.Session)> calls method in (UseSystemApiUndoable.java:65) + 2. Dependencies of Slice main + - Method gets field in (MonitorAspectGenerator.java:73) + 3. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 4. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 5. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 6. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice main -> + Slice config -> + Slice util -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Constructor (org.tzi.use.main.Session)> has parameter of type in (UseSystemApiUndoable.java:0) + - Method has parameter of type in (UseSystemApi.java:0) + - Constructor (org.tzi.use.main.Session)> calls method in (UseSystemApiUndoable.java:65) + 2. Dependencies of Slice main + - Method gets field in (MonitorAspectGenerator.java:73) + 3. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 4. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 5. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice main -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Constructor (org.tzi.use.main.Session)> has parameter of type in (UseSystemApiUndoable.java:0) + - Method has parameter of type in (UseSystemApi.java:0) + - Constructor (org.tzi.use.main.Session)> calls method in (UseSystemApiUndoable.java:65) + 2. Dependencies of Slice main + - Constructor (java.io.PrintWriter, org.tzi.use.uml.mm.MModel)> has parameter of type in (MonitorAspectGenerator.java:0) + - Field has type in (MonitorAspectGenerator.java:0) + - Field has type in (Session.java:0) + - Method has parameter of type in (Session.java:0) + - Method has parameter of type in (Session.java:0) + - Method has parameter of type in (Session.java:0) + - Method has return type in (Session.java:0) + - Method calls method in (Session.java:86) + - Method calls method in (MonitorAspectGenerator.java:116) + - Method calls method in (MonitorAspectGenerator.java:118) + - Method calls method in (MonitorAspectGenerator.java:124) + - Method calls method in (MonitorAspectGenerator.java:124) + - Method calls method in (MonitorAspectGenerator.java:125) + - Method calls method in (MonitorAspectGenerator.java:136) + - Method calls method in (MonitorAspectGenerator.java:138) + - Method calls method in (MonitorAspectGenerator.java:145) + - Method calls method in (MonitorAspectGenerator.java:145) + - Method calls method in (MonitorAspectGenerator.java:146) + - Method calls method in (MonitorAspectGenerator.java:155) + - Method calls method in (MonitorAspectGenerator.java:158) + (2 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice parser -> + Slice config -> + Slice util -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls constructor ()> in (UseModelApi.java:443) + - Method calls method in (UseModelApi.java:445) + - Method calls method in (UseModelApi.java:450) + - Method calls method in (UseModelApi.java:499) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:505) + - Method calls method in (UseModelApi.java:506) + - Method calls method in (UseModelApi.java:510) + - Method calls constructor (java.lang.String, java.io.PrintWriter)> in (UseModelApi.java:548) + - Method calls constructor (org.antlr.runtime.CharStream)> in (UseModelApi.java:557) + - Method calls constructor (org.antlr.runtime.TokenStream)> in (UseModelApi.java:559) + - Method calls method in (UseModelApi.java:561) + - Method calls method in (UseModelApi.java:562) + - Method calls method in (UseModelApi.java:565) + - Method calls method in (UseModelApi.java:567) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:569) + - Method calls method in (UseModelApi.java:573) + - Method calls method in (UseModelApi.java:575) + - Method calls method in (UseModelApi.java:578) + - Method calls method in (UseModelApi.java:579) + - Method calls method in (UseModelApi.java:579) + (10 further dependencies have been omitted...) + 2. Dependencies of Slice parser + - Method gets field in (ASTInStateExpression.java:97) + - Method gets field in (ASTTypeArgExpression.java:101) + - Method gets field in (Symtable.java:105) + - Method gets field in (ASTStatement.java:287) + - Method gets field in (ASTStatement.java:292) + - Method gets field in (ASTOperationExpression.java:401) + - Method gets field in (ASTOperationExpression.java:408) + - Method gets field in (SoilParser.java:1295) + - Method gets field in (ShellCommandParser.java:6177) + - Method gets field in (TestSuiteParser.java:6888) + - Method gets field in (USEParser.java:8549) + - Method gets field in (GeneratorParser.java:9880) + 3. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 4. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 5. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice parser -> + Slice gen -> + Slice config -> + Slice util -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls constructor ()> in (UseModelApi.java:443) + - Method calls method in (UseModelApi.java:445) + - Method calls method in (UseModelApi.java:450) + - Method calls method in (UseModelApi.java:499) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:505) + - Method calls method in (UseModelApi.java:506) + - Method calls method in (UseModelApi.java:510) + - Method calls constructor (java.lang.String, java.io.PrintWriter)> in (UseModelApi.java:548) + - Method calls constructor (org.antlr.runtime.CharStream)> in (UseModelApi.java:557) + - Method calls constructor (org.antlr.runtime.TokenStream)> in (UseModelApi.java:559) + - Method calls method in (UseModelApi.java:561) + - Method calls method in (UseModelApi.java:562) + - Method calls method in (UseModelApi.java:565) + - Method calls method in (UseModelApi.java:567) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:569) + - Method calls method in (UseModelApi.java:573) + - Method calls method in (UseModelApi.java:575) + - Method calls method in (UseModelApi.java:578) + - Method calls method in (UseModelApi.java:579) + - Method calls method in (UseModelApi.java:579) + (10 further dependencies have been omitted...) + 2. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 3. Dependencies of Slice gen + - Constructor (boolean)> gets field in (GEvalInstrTry.java:37) + - Method gets field in (GGenerator.java:77) + 4. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 5. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 6. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice parser -> + Slice gen -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls constructor ()> in (UseModelApi.java:443) + - Method calls method in (UseModelApi.java:445) + - Method calls method in (UseModelApi.java:450) + - Method calls method in (UseModelApi.java:499) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:505) + - Method calls method in (UseModelApi.java:506) + - Method calls method in (UseModelApi.java:510) + - Method calls constructor (java.lang.String, java.io.PrintWriter)> in (UseModelApi.java:548) + - Method calls constructor (org.antlr.runtime.CharStream)> in (UseModelApi.java:557) + - Method calls constructor (org.antlr.runtime.TokenStream)> in (UseModelApi.java:559) + - Method calls method in (UseModelApi.java:561) + - Method calls method in (UseModelApi.java:562) + - Method calls method in (UseModelApi.java:565) + - Method calls method in (UseModelApi.java:567) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:569) + - Method calls method in (UseModelApi.java:573) + - Method calls method in (UseModelApi.java:575) + - Method calls method in (UseModelApi.java:578) + - Method calls method in (UseModelApi.java:579) + - Method calls method in (UseModelApi.java:579) + (10 further dependencies have been omitted...) + 2. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 3. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice parser -> + Slice gen -> + Slice util -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls constructor ()> in (UseModelApi.java:443) + - Method calls method in (UseModelApi.java:445) + - Method calls method in (UseModelApi.java:450) + - Method calls method in (UseModelApi.java:499) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:505) + - Method calls method in (UseModelApi.java:506) + - Method calls method in (UseModelApi.java:510) + - Method calls constructor (java.lang.String, java.io.PrintWriter)> in (UseModelApi.java:548) + - Method calls constructor (org.antlr.runtime.CharStream)> in (UseModelApi.java:557) + - Method calls constructor (org.antlr.runtime.TokenStream)> in (UseModelApi.java:559) + - Method calls method in (UseModelApi.java:561) + - Method calls method in (UseModelApi.java:562) + - Method calls method in (UseModelApi.java:565) + - Method calls method in (UseModelApi.java:567) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:569) + - Method calls method in (UseModelApi.java:573) + - Method calls method in (UseModelApi.java:575) + - Method calls method in (UseModelApi.java:578) + - Method calls method in (UseModelApi.java:579) + - Method calls method in (UseModelApi.java:579) + (10 further dependencies have been omitted...) + 2. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 3. Dependencies of Slice gen + - Method calls method in (GInstrASSLCall.java:30) + - Method calls method in (GInstrInsert_Assoc_Linkends.java:60) + - Method calls method in (GInstrTry_Assoc_LinkendSeqs.java:61) + - Method calls method in (GSignature.java:61) + - Method calls method in (GEvalInstrCreate_C.java:63) + - Method calls method in (GInstrDelete_Assoc_Linkends.java:63) + - Method calls method in (GInstrTry_AssocClass_LinkendSeqs.java:64) + - Method calls method in (GInstrCreate_AC.java:69) + - Method calls method in (GEvalInstrTry.java:73) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:91) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:92) + - Method calls method in (GEvalInstrCreate_C.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:94) + - Method calls method in (GGenerator.java:102) + - Method calls method in (GGenerator.java:103) + - Method calls method in (GEvalInstrCreate_C.java:109) + - Method calls method in (GEvalInstrCreate_C.java:110) + - Method calls method in (GGenerator.java:112) + - Method calls method in (GGenerator.java:119) + (58 further dependencies have been omitted...) + 4. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 5. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice parser -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls constructor ()> in (UseModelApi.java:443) + - Method calls method in (UseModelApi.java:445) + - Method calls method in (UseModelApi.java:450) + - Method calls method in (UseModelApi.java:499) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:505) + - Method calls method in (UseModelApi.java:506) + - Method calls method in (UseModelApi.java:510) + - Method calls constructor (java.lang.String, java.io.PrintWriter)> in (UseModelApi.java:548) + - Method calls constructor (org.antlr.runtime.CharStream)> in (UseModelApi.java:557) + - Method calls constructor (org.antlr.runtime.TokenStream)> in (UseModelApi.java:559) + - Method calls method in (UseModelApi.java:561) + - Method calls method in (UseModelApi.java:562) + - Method calls method in (UseModelApi.java:565) + - Method calls method in (UseModelApi.java:567) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:569) + - Method calls method in (UseModelApi.java:573) + - Method calls method in (UseModelApi.java:575) + - Method calls method in (UseModelApi.java:578) + - Method calls method in (UseModelApi.java:579) + - Method calls method in (UseModelApi.java:579) + (10 further dependencies have been omitted...) + 2. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice parser -> + Slice util -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls constructor ()> in (UseModelApi.java:443) + - Method calls method in (UseModelApi.java:445) + - Method calls method in (UseModelApi.java:450) + - Method calls method in (UseModelApi.java:499) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:505) + - Method calls method in (UseModelApi.java:506) + - Method calls method in (UseModelApi.java:510) + - Method calls constructor (java.lang.String, java.io.PrintWriter)> in (UseModelApi.java:548) + - Method calls constructor (org.antlr.runtime.CharStream)> in (UseModelApi.java:557) + - Method calls constructor (org.antlr.runtime.TokenStream)> in (UseModelApi.java:559) + - Method calls method in (UseModelApi.java:561) + - Method calls method in (UseModelApi.java:562) + - Method calls method in (UseModelApi.java:565) + - Method calls method in (UseModelApi.java:567) + - Method calls constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> in (UseModelApi.java:569) + - Method calls method in (UseModelApi.java:573) + - Method calls method in (UseModelApi.java:575) + - Method calls method in (UseModelApi.java:578) + - Method calls method in (UseModelApi.java:579) + - Method calls method in (UseModelApi.java:579) + (10 further dependencies have been omitted...) + 2. Dependencies of Slice parser + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTStatement.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method throws type in (ASTAttributeAssignmentStatement.java:0) + - Method throws type in (ASTBlockStatement.java:0) + - Method throws type in (ASTConditionalExecutionStatement.java:0) + - Method throws type in (ASTEmptyStatement.java:0) + - Method throws type in (ASTEnterOperationStatement.java:0) + - Method throws type in (ASTExitOperationStatement.java:0) + - Method throws type in (ASTIterationStatement.java:0) + - Method throws type in (ASTLinkDeletionStatement.java:0) + - Method throws type in (ASTLinkInsertionStatement.java:0) + - Method throws type in (ASTNewLinkObjectStatement.java:0) + - Method throws type in (ASTNewObjectStatement.java:0) + (240 further dependencies have been omitted...) + 3. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Constructor (org.tzi.use.uml.mm.MModel)> has parameter of type in (UseModelApi.java:0) + - Constructor (org.tzi.use.uml.mm.MModel)> has parameter of type in (UseSystemApi.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (UseSystemApi.java:0) + - Constructor (org.tzi.use.uml.mm.MModel)> has parameter of type in (UseSystemApiNative.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (UseSystemApiNative.java:0) + - Constructor (org.tzi.use.uml.mm.MModel)> has parameter of type in (UseSystemApiUndoable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (UseSystemApiUndoable.java:0) + - Field has type in (UseModelApi.java:0) + - Field has type in (UseModelApi.java:0) + - Field has type in (UseSystemApi.java:0) + - Method has return type in (UseModelApi.java:0) + - Method has return type in (UseModelApi.java:0) + - Method has return type in (UseModelApi.java:0) + - Method has return type in (UseModelApi.java:0) + - Method has return type in (UseModelApi.java:0) + - Method has return type in (UseModelApi.java:0) + - Method has return type in (UseModelApi.java:0) + - Method depends on component type in (UseModelApi.java:0) + - Method has return type in (UseModelApi.java:0) + - Method has return type in (UseModelApi.java:0) + (258 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice util -> + Slice parser -> + Slice gen -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls method in (UseSystemApiNative.java:69) + - Method calls method in (UseSystemApiUndoable.java:101) + - Method calls method in (UseSystemApiUndoable.java:129) + - Method calls method in (UseSystemApi.java:141) + - Method calls method in (UseModelApi.java:150) + - Method calls method in (UseSystemApiUndoable.java:155) + - Method calls method in (UseModelApi.java:178) + - Method calls method in (UseSystemApi.java:262) + - Method calls method in (UseModelApi.java:311) + - Method calls method in (UseModelApi.java:512) + - Method calls method in (UseModelApi.java:541) + - Method calls method in (UseSystemApi.java:594) + - Method calls method in (UseSystemApi.java:643) + - Method calls method in (UseSystemApi.java:652) + - Method calls method in (UseModelApi.java:750) + - Method calls method in (UseModelApi.java:1014) + - Method calls method in (UseModelApi.java:1056) + - Method calls method in (UseModelApi.java:1072) + - Method calls method in (UseModelApi.java:1076) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 4. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 5. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice util -> + Slice parser -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls method in (UseSystemApiNative.java:69) + - Method calls method in (UseSystemApiUndoable.java:101) + - Method calls method in (UseSystemApiUndoable.java:129) + - Method calls method in (UseSystemApi.java:141) + - Method calls method in (UseModelApi.java:150) + - Method calls method in (UseSystemApiUndoable.java:155) + - Method calls method in (UseModelApi.java:178) + - Method calls method in (UseSystemApi.java:262) + - Method calls method in (UseModelApi.java:311) + - Method calls method in (UseModelApi.java:512) + - Method calls method in (UseModelApi.java:541) + - Method calls method in (UseSystemApi.java:594) + - Method calls method in (UseSystemApi.java:643) + - Method calls method in (UseSystemApi.java:652) + - Method calls method in (UseModelApi.java:750) + - Method calls method in (UseModelApi.java:1014) + - Method calls method in (UseModelApi.java:1056) + - Method calls method in (UseModelApi.java:1072) + - Method calls method in (UseModelApi.java:1076) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice api -> + Slice util -> + Slice uml -> + Slice api + 1. Dependencies of Slice api + - Method calls method in (UseSystemApiNative.java:69) + - Method calls method in (UseSystemApiUndoable.java:101) + - Method calls method in (UseSystemApiUndoable.java:129) + - Method calls method in (UseSystemApi.java:141) + - Method calls method in (UseModelApi.java:150) + - Method calls method in (UseSystemApiUndoable.java:155) + - Method calls method in (UseModelApi.java:178) + - Method calls method in (UseSystemApi.java:262) + - Method calls method in (UseModelApi.java:311) + - Method calls method in (UseModelApi.java:512) + - Method calls method in (UseModelApi.java:541) + - Method calls method in (UseSystemApi.java:594) + - Method calls method in (UseSystemApi.java:643) + - Method calls method in (UseSystemApi.java:652) + - Method calls method in (UseModelApi.java:750) + - Method calls method in (UseModelApi.java:1014) + - Method calls method in (UseModelApi.java:1056) + - Method calls method in (UseModelApi.java:1072) + - Method calls method in (UseModelApi.java:1076) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:55) + - Method calls method in (TestModelUtil.java:56) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:64) + - Method calls method in (TestModelUtil.java:65) + - Method calls method in (TestModelUtil.java:72) + - Method calls method in (TestModelUtil.java:74) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:87) + - Method calls method in (TestModelUtil.java:88) + - Method calls method in (TestModelUtil.java:89) + - Method calls method in (TestModelUtil.java:90) + - Method calls method in (TestModelUtil.java:91) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:100) + - Method calls method in (TestModelUtil.java:101) + - Method calls method in (TestModelUtil.java:102) + - Method calls method in (TestModelUtil.java:103) + - Method calls method in (TestModelUtil.java:104) + - Method calls constructor (java.lang.String)> in (TestModelUtil.java:116) + - Method calls method in (TestModelUtil.java:117) + - Method calls method in (TestModelUtil.java:118) + - Method calls method in (TestModelUtil.java:119) + (80 further dependencies have been omitted...) +Cycle detected: Slice config -> + Slice util -> + Slice parser -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Method gets field in (ASTInStateExpression.java:97) + - Method gets field in (ASTTypeArgExpression.java:101) + - Method gets field in (Symtable.java:105) + - Method gets field in (ASTStatement.java:287) + - Method gets field in (ASTStatement.java:292) + - Method gets field in (ASTOperationExpression.java:401) + - Method gets field in (ASTOperationExpression.java:408) + - Method gets field in (SoilParser.java:1295) + - Method gets field in (ShellCommandParser.java:6177) + - Method gets field in (TestSuiteParser.java:6888) + - Method gets field in (USEParser.java:8549) + - Method gets field in (GeneratorParser.java:9880) +Cycle detected: Slice config -> + Slice util -> + Slice parser -> + Slice gen -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 4. Dependencies of Slice gen + - Constructor (boolean)> gets field in (GEvalInstrTry.java:37) + - Method gets field in (GGenerator.java:77) +Cycle detected: Slice config -> + Slice util -> + Slice parser -> + Slice gen -> + Slice uml -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 4. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 5. Dependencies of Slice uml + - Method has parameter of type in (ExpStdOp.java:0) + - Method calls method in (ExpStdOp.java:135) + - Method calls method in (ExpStdOp.java:135) + - Method gets field in (ExpStdOp.java:135) + - Method calls method in (ExpStdOp.java:136) + - Method calls method in (ExpStdOp.java:138) + - Method calls method in (ExpStdOp.java:138) + - Method gets field in (ExpStdOp.java:138) + - Method calls method in (ExpStdOp.java:142) + - Method calls method in (ExpStdOp.java:142) + - Method gets field in (ExpStdOp.java:142) + - Method calls method in (ExpStdOp.java:197) + - Method gets field in (ExpStdOp.java:197) + - Method calls method in (MSystem.java:540) + - Method calls method in (MSystem.java:671) + - Method gets field in (MSystemState.java:1565) + - Method gets field in (MSystemState.java:1566) + - Method gets field in (MSystemState.java:1618) + - Method gets field in (MSystemState.java:1680) + - Method gets field in (MSystemState.java:1817) +Cycle detected: Slice config -> + Slice util -> + Slice parser -> + Slice uml -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Method has parameter of type in (ExpStdOp.java:0) + - Method calls method in (ExpStdOp.java:135) + - Method calls method in (ExpStdOp.java:135) + - Method gets field in (ExpStdOp.java:135) + - Method calls method in (ExpStdOp.java:136) + - Method calls method in (ExpStdOp.java:138) + - Method calls method in (ExpStdOp.java:138) + - Method gets field in (ExpStdOp.java:138) + - Method calls method in (ExpStdOp.java:142) + - Method calls method in (ExpStdOp.java:142) + - Method gets field in (ExpStdOp.java:142) + - Method calls method in (ExpStdOp.java:197) + - Method gets field in (ExpStdOp.java:197) + - Method calls method in (MSystem.java:540) + - Method calls method in (MSystem.java:671) + - Method gets field in (MSystemState.java:1565) + - Method gets field in (MSystemState.java:1566) + - Method gets field in (MSystemState.java:1618) + - Method gets field in (MSystemState.java:1680) + - Method gets field in (MSystemState.java:1817) +Cycle detected: Slice config -> + Slice util -> + Slice parser -> + Slice uml -> + Slice gen -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) + 5. Dependencies of Slice gen + - Constructor (boolean)> gets field in (GEvalInstrTry.java:37) + - Method gets field in (GGenerator.java:77) +Cycle detected: Slice config -> + Slice util -> + Slice uml -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Method has parameter of type in (ExpStdOp.java:0) + - Method calls method in (ExpStdOp.java:135) + - Method calls method in (ExpStdOp.java:135) + - Method gets field in (ExpStdOp.java:135) + - Method calls method in (ExpStdOp.java:136) + - Method calls method in (ExpStdOp.java:138) + - Method calls method in (ExpStdOp.java:138) + - Method gets field in (ExpStdOp.java:138) + - Method calls method in (ExpStdOp.java:142) + - Method calls method in (ExpStdOp.java:142) + - Method gets field in (ExpStdOp.java:142) + - Method calls method in (ExpStdOp.java:197) + - Method gets field in (ExpStdOp.java:197) + - Method calls method in (MSystem.java:540) + - Method calls method in (MSystem.java:671) + - Method gets field in (MSystemState.java:1565) + - Method gets field in (MSystemState.java:1566) + - Method gets field in (MSystemState.java:1618) + - Method gets field in (MSystemState.java:1680) + - Method gets field in (MSystemState.java:1817) +Cycle detected: Slice config -> + Slice util -> + Slice uml -> + Slice gen -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) + 4. Dependencies of Slice gen + - Constructor (boolean)> gets field in (GEvalInstrTry.java:37) + - Method gets field in (GGenerator.java:77) +Cycle detected: Slice config -> + Slice util -> + Slice uml -> + Slice gen -> + Slice parser -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) + 4. Dependencies of Slice gen + - Method calls method in (GGenerator.java:113) + - Method calls method in (GGenerator.java:120) + 5. Dependencies of Slice parser + - Method gets field in (ASTInStateExpression.java:97) + - Method gets field in (ASTTypeArgExpression.java:101) + - Method gets field in (Symtable.java:105) + - Method gets field in (ASTStatement.java:287) + - Method gets field in (ASTStatement.java:292) + - Method gets field in (ASTOperationExpression.java:401) + - Method gets field in (ASTOperationExpression.java:408) + - Method gets field in (SoilParser.java:1295) + - Method gets field in (ShellCommandParser.java:6177) + - Method gets field in (TestSuiteParser.java:6888) + - Method gets field in (USEParser.java:8549) + - Method gets field in (GeneratorParser.java:9880) +Cycle detected: Slice config -> + Slice util -> + Slice uml -> + Slice parser -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MProtocolStateMachine.java:0) + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MStateMachine.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByKind.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByType.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssert.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClass)> has parameter of type in (MAssertClassInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertGlobalInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (MAssertOclExpression.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertPost.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.mm.MOperation, [Lorg.tzi.use.uml.ocl.expr.Expression;)> has parameter of type in (MAssertPre.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (MAssertSingleInvariant.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.tzi.use.parser.SrcPos)> has parameter of type in (MVariation.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationEnd.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationStart.java:0) + - Field has type in (MStateMachine.java:0) + - Field has type in (Expression.java:0) + - Field has type in (VarDecl.java:0) + - Field has type in (MStatement.java:0) + (42 further dependencies have been omitted...) + 4. Dependencies of Slice parser + - Method gets field in (ASTInStateExpression.java:97) + - Method gets field in (ASTTypeArgExpression.java:101) + - Method gets field in (Symtable.java:105) + - Method gets field in (ASTStatement.java:287) + - Method gets field in (ASTStatement.java:292) + - Method gets field in (ASTOperationExpression.java:401) + - Method gets field in (ASTOperationExpression.java:408) + - Method gets field in (SoilParser.java:1295) + - Method gets field in (ShellCommandParser.java:6177) + - Method gets field in (TestSuiteParser.java:6888) + - Method gets field in (USEParser.java:8549) + - Method gets field in (GeneratorParser.java:9880) +Cycle detected: Slice config -> + Slice util -> + Slice uml -> + Slice parser -> + Slice gen -> + Slice config + 1. Dependencies of Slice config + - Field has type in (Options.java:0) + - Method calls method in (Options.java:356) + - Method calls method in (Options.java:374) + - Method calls method in (Options.java:376) + - Method calls method in (Options.java:377) + - Method calls method in (Options.java:386) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:421) + - Method calls method in (Options.java:458) + - Method calls method in (Options.java:469) + - Method calls method in (Options.java:470) + - Method calls method in (Options.java:471) + - Method calls method in (Options.java:472) + - Method calls constructor (java.util.Properties)> in (Options.java:485) + - Method calls method in (Options.java:501) + - Method calls method in (Options.java:509) + - Method calls method in (Options.java:519) + - Method calls method in (Options.java:521) + - Method calls method in (Options.java:524) + - Method calls method in (Options.java:526) + (6 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MProtocolStateMachine.java:0) + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MStateMachine.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByKind.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByType.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssert.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClass)> has parameter of type in (MAssertClassInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertGlobalInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (MAssertOclExpression.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertPost.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.mm.MOperation, [Lorg.tzi.use.uml.ocl.expr.Expression;)> has parameter of type in (MAssertPre.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (MAssertSingleInvariant.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.tzi.use.parser.SrcPos)> has parameter of type in (MVariation.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationEnd.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationStart.java:0) + - Field has type in (MStateMachine.java:0) + - Field has type in (Expression.java:0) + - Field has type in (VarDecl.java:0) + - Field has type in (MStatement.java:0) + (42 further dependencies have been omitted...) + 4. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) + 5. Dependencies of Slice gen + - Constructor (boolean)> gets field in (GEvalInstrTry.java:37) + - Method gets field in (GGenerator.java:77) +Cycle detected: Slice gen -> + Slice parser -> + Slice gen + 1. Dependencies of Slice gen + - Method calls method in (GGenerator.java:113) + - Method calls method in (GGenerator.java:120) + 2. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) +Cycle detected: Slice gen -> + Slice parser -> + Slice uml -> + Slice gen + 1. Dependencies of Slice gen + - Method calls method in (GGenerator.java:113) + - Method calls method in (GGenerator.java:120) + 2. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) +Cycle detected: Slice gen -> + Slice parser -> + Slice util -> + Slice uml -> + Slice gen + 1. Dependencies of Slice gen + - Method calls method in (GGenerator.java:113) + - Method calls method in (GGenerator.java:120) + 2. Dependencies of Slice parser + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTStatement.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method throws type in (ASTAttributeAssignmentStatement.java:0) + - Method throws type in (ASTBlockStatement.java:0) + - Method throws type in (ASTConditionalExecutionStatement.java:0) + - Method throws type in (ASTEmptyStatement.java:0) + - Method throws type in (ASTEnterOperationStatement.java:0) + - Method throws type in (ASTExitOperationStatement.java:0) + - Method throws type in (ASTIterationStatement.java:0) + - Method throws type in (ASTLinkDeletionStatement.java:0) + - Method throws type in (ASTLinkInsertionStatement.java:0) + - Method throws type in (ASTNewLinkObjectStatement.java:0) + - Method throws type in (ASTNewObjectStatement.java:0) + (240 further dependencies have been omitted...) + 3. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) +Cycle detected: Slice gen -> + Slice uml -> + Slice gen + 1. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) +Cycle detected: Slice gen -> + Slice uml -> + Slice graph -> + Slice util -> + Slice parser -> + Slice gen + 1. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Class implements interface in (MGeneralization.java:0) + - Field has type in (MModel.java:0) + - Field has type in (MSystemState.java:0) + - Interface extends interface in (MWholePartLink.java:0) + - Method has return type in (MModel.java:0) + - Method has return type in (MSystemState.java:0) + - Constructor (java.lang.String)> calls constructor ()> in (MModel.java:84) + - Method calls method in (MModel.java:123) + - Method calls method in (MModel.java:160) + - Method calls method in (MDataTypeImpl.java:233) + - Method calls method in (MDataTypeImpl.java:245) + - Method calls method in (MDataTypeImpl.java:256) + - Method calls method in (MDataTypeImpl.java:266) + - Method calls method in (MMInstanceGenerator.java:274) + - Method calls method in (MClassImpl.java:304) + - Method calls method in (MAssociationImpl.java:307) + - Method calls method in (MClassImpl.java:316) + - Method calls method in (MClassImpl.java:327) + - Method calls method in (MAssociationClassImpl.java:331) + - Method calls method in (MAssociationClassImpl.java:337) + (35 further dependencies have been omitted...) + 3. Dependencies of Slice graph + - Constructor (java.lang.Object)> calls method in (NodeDoesNotExistException.java:40) + 4. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 5. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) +Cycle detected: Slice gen -> + Slice uml -> + Slice parser -> + Slice gen + 1. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MProtocolStateMachine.java:0) + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MStateMachine.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByKind.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByType.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssert.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClass)> has parameter of type in (MAssertClassInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertGlobalInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (MAssertOclExpression.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertPost.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.mm.MOperation, [Lorg.tzi.use.uml.ocl.expr.Expression;)> has parameter of type in (MAssertPre.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (MAssertSingleInvariant.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.tzi.use.parser.SrcPos)> has parameter of type in (MVariation.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationEnd.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationStart.java:0) + - Field has type in (MStateMachine.java:0) + - Field has type in (Expression.java:0) + - Field has type in (VarDecl.java:0) + - Field has type in (MStatement.java:0) + (42 further dependencies have been omitted...) + 3. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) +Cycle detected: Slice gen -> + Slice uml -> + Slice util -> + Slice parser -> + Slice gen + 1. Dependencies of Slice gen + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GConfiguration.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GValueInstruction, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GAttributeAssignment.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GInstrBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInstrCalculatedBarrier.java:0) + - Constructor (org.tzi.use.uml.mm.MClass, org.tzi.use.gen.assl.statics.GValueInstruction)> has parameter of type in (GInstrCreateN_C_Integer.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrCreate_AC.java:0) + - Constructor (org.tzi.use.uml.mm.MClass)> has parameter of type in (GInstrCreate_C.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrDelete_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrInsert_Assoc_Linkends.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociationClass, java.util.List)> has parameter of type in (GInstrTry_AssocClass_LinkendSeqs.java:0) + - Constructor (org.tzi.use.uml.mm.MAssociation, java.util.List)> has parameter of type in (GInstrTry_Assoc_LinkendSeqs.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GOCLExpression, org.tzi.use.uml.mm.MAttribute, org.tzi.use.gen.assl.statics.GOCLExpression)> has parameter of type in (GInstrTry_Attribute.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (GOCLExpression.java:0) + - Constructor (org.tzi.use.uml.mm.MModel, org.tzi.use.gen.tool.GGeneratorArguments)> has parameter of type in (GChecker.java:0) + - Constructor (org.tzi.use.uml.sys.MSystem)> has parameter of type in (GGenerator.java:0) + - Constructor (org.tzi.use.gen.assl.statics.GProcedure, java.util.List)> has generic parameter type > with type argument depending on in (GProcedureCall.java:0) + - Constructor (java.lang.String, java.util.List)> has generic parameter type > with type argument depending on in (GSignature.java:0) + - Constructor (org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (GInvariantStatistic.java:0) + - Field has type in (GConfiguration.java:0) + (527 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Class implements interface in (ExpTupleLiteral.java:0) + - Class implements interface in (Expression.java:0) + - Class implements interface in (TupleType.java:0) + - Class implements interface in (TupleValue.java:0) + - Class implements interface in (Value.java:0) + - Class implements interface in (MSystemState.java:0) + - Class implements interface in (MSystemState.java:0) + - Class implements interface in (MLinkDeletionStatement.java:0) + - Constructor (int, org.tzi.use.util.collections.Queue, java.util.ArrayList, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (ThreadedEvaluator.java:0) + - Constructor (org.tzi.use.uml.sys.events.tags.EventContext, org.tzi.use.uml.sys.soil.MStatement, org.tzi.use.util.soil.StateDifference)> has parameter of type in (StatementExecutedEvent.java:0) + - Field has type in (ThreadedEvaluator.java:0) + - Field has type in (BagValue.java:0) + - Field has type in (MSystem.java:0) + - Field has type in (MSystem.java:0) + - Field has generic type > with type argument depending on in (MSystem.java:0) + - Field has type in (StatementEvaluationResult.java:0) + - Field has type in (StatementEvaluationResult.java:0) + - Field has type in (StatementExecutedEvent.java:0) + - Interface extends interface in (Type.java:0) + - Method has return type in (Evaluator.java:0) + (464 further dependencies have been omitted...) + 3. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 4. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) +Cycle detected: Slice gen -> + Slice util -> + Slice parser -> + Slice gen + 1. Dependencies of Slice gen + - Method calls method in (GInstrASSLCall.java:30) + - Method calls method in (GInstrInsert_Assoc_Linkends.java:60) + - Method calls method in (GInstrTry_Assoc_LinkendSeqs.java:61) + - Method calls method in (GSignature.java:61) + - Method calls method in (GEvalInstrCreate_C.java:63) + - Method calls method in (GInstrDelete_Assoc_Linkends.java:63) + - Method calls method in (GInstrTry_AssocClass_LinkendSeqs.java:64) + - Method calls method in (GInstrCreate_AC.java:69) + - Method calls method in (GEvalInstrTry.java:73) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:91) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:92) + - Method calls method in (GEvalInstrCreate_C.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:94) + - Method calls method in (GGenerator.java:102) + - Method calls method in (GGenerator.java:103) + - Method calls method in (GEvalInstrCreate_C.java:109) + - Method calls method in (GEvalInstrCreate_C.java:110) + - Method calls method in (GGenerator.java:112) + - Method calls method in (GGenerator.java:119) + (58 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) +Cycle detected: Slice gen -> + Slice util -> + Slice parser -> + Slice uml -> + Slice gen + 1. Dependencies of Slice gen + - Method calls method in (GInstrASSLCall.java:30) + - Method calls method in (GInstrInsert_Assoc_Linkends.java:60) + - Method calls method in (GInstrTry_Assoc_LinkendSeqs.java:61) + - Method calls method in (GSignature.java:61) + - Method calls method in (GEvalInstrCreate_C.java:63) + - Method calls method in (GInstrDelete_Assoc_Linkends.java:63) + - Method calls method in (GInstrTry_AssocClass_LinkendSeqs.java:64) + - Method calls method in (GInstrCreate_AC.java:69) + - Method calls method in (GEvalInstrTry.java:73) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:91) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:92) + - Method calls method in (GEvalInstrCreate_C.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:94) + - Method calls method in (GGenerator.java:102) + - Method calls method in (GGenerator.java:103) + - Method calls method in (GEvalInstrCreate_C.java:109) + - Method calls method in (GEvalInstrCreate_C.java:110) + - Method calls method in (GGenerator.java:112) + - Method calls method in (GGenerator.java:119) + (58 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) +Cycle detected: Slice gen -> + Slice util -> + Slice uml -> + Slice gen + 1. Dependencies of Slice gen + - Method calls method in (GInstrASSLCall.java:30) + - Method calls method in (GInstrInsert_Assoc_Linkends.java:60) + - Method calls method in (GInstrTry_Assoc_LinkendSeqs.java:61) + - Method calls method in (GSignature.java:61) + - Method calls method in (GEvalInstrCreate_C.java:63) + - Method calls method in (GInstrDelete_Assoc_Linkends.java:63) + - Method calls method in (GInstrTry_AssocClass_LinkendSeqs.java:64) + - Method calls method in (GInstrCreate_AC.java:69) + - Method calls method in (GEvalInstrTry.java:73) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:91) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:92) + - Method calls method in (GEvalInstrCreate_C.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:94) + - Method calls method in (GGenerator.java:102) + - Method calls method in (GGenerator.java:103) + - Method calls method in (GEvalInstrCreate_C.java:109) + - Method calls method in (GEvalInstrCreate_C.java:110) + - Method calls method in (GGenerator.java:112) + - Method calls method in (GGenerator.java:119) + (58 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Field has type in (MSystem.java:0) + - Method has return type in (MSystem.java:0) + - Method calls constructor (org.tzi.use.uml.sys.MSystem)> in (MSystem.java:157) +Cycle detected: Slice gen -> + Slice util -> + Slice uml -> + Slice parser -> + Slice gen + 1. Dependencies of Slice gen + - Method calls method in (GInstrASSLCall.java:30) + - Method calls method in (GInstrInsert_Assoc_Linkends.java:60) + - Method calls method in (GInstrTry_Assoc_LinkendSeqs.java:61) + - Method calls method in (GSignature.java:61) + - Method calls method in (GEvalInstrCreate_C.java:63) + - Method calls method in (GInstrDelete_Assoc_Linkends.java:63) + - Method calls method in (GInstrTry_AssocClass_LinkendSeqs.java:64) + - Method calls method in (GInstrCreate_AC.java:69) + - Method calls method in (GEvalInstrTry.java:73) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:91) + - Constructor (boolean, boolean)> calls method in (GCollectorImpl.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:92) + - Method calls method in (GEvalInstrCreate_C.java:92) + - Method calls method in (GEvalInstrCreateN_C_Integer.java:94) + - Method calls method in (GGenerator.java:102) + - Method calls method in (GGenerator.java:103) + - Method calls method in (GEvalInstrCreate_C.java:109) + - Method calls method in (GEvalInstrCreate_C.java:110) + - Method calls method in (GGenerator.java:112) + - Method calls method in (GGenerator.java:119) + (58 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MProtocolStateMachine.java:0) + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MStateMachine.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByKind.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByType.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssert.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClass)> has parameter of type in (MAssertClassInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertGlobalInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (MAssertOclExpression.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertPost.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.mm.MOperation, [Lorg.tzi.use.uml.ocl.expr.Expression;)> has parameter of type in (MAssertPre.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (MAssertSingleInvariant.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.tzi.use.parser.SrcPos)> has parameter of type in (MVariation.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationEnd.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationStart.java:0) + - Field has type in (MStateMachine.java:0) + - Field has type in (Expression.java:0) + - Field has type in (VarDecl.java:0) + - Field has type in (MStatement.java:0) + (42 further dependencies have been omitted...) + 4. Dependencies of Slice parser + - Field has generic type > with type argument depending on in (Context.java:0) + - Field has type in (ASTGProcedure.java:0) + - Method has generic return type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (Context.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic parameter type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASSLCompiler.java:0) + - Method has generic return type > with type argument depending on in (ASSLCompiler.java:0) + - Method has return type in (ASTGAsslCall.java:0) + - Method has return type in (ASTGAtomicInstruction.java:0) + - Method has return type in (ASTGAttributeAssignment.java:0) + - Method has return type in (ASTGBarrier.java:0) + - Method has return type in (ASTGIfThenElse.java:0) + - Method has return type in (ASTGInstruction.java:0) + - Method has return type in (ASTGLoop.java:0) + - Method has return type in (ASTGOpEnter.java:0) + - Method has return type in (ASTGOpExit.java:0) + - Method has return type in (ASTGProcedure.java:0) + - Method has return type in (ASTGProcedureCall.java:0) + (49 further dependencies have been omitted...) +Cycle detected: Slice graph -> + Slice util -> + Slice parser -> + Slice uml -> + Slice graph + 1. Dependencies of Slice graph + - Constructor (java.lang.Object)> calls method in (NodeDoesNotExistException.java:40) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) + 3. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 4. Dependencies of Slice uml + - Class implements interface in (MGeneralization.java:0) + - Field has type in (MModel.java:0) + - Field has type in (MSystemState.java:0) + - Interface extends interface in (MWholePartLink.java:0) + - Method has return type in (MModel.java:0) + - Method has return type in (MSystemState.java:0) + - Constructor (java.lang.String)> calls constructor ()> in (MModel.java:84) + - Method calls method in (MModel.java:123) + - Method calls method in (MModel.java:160) + - Method calls method in (MDataTypeImpl.java:233) + - Method calls method in (MDataTypeImpl.java:245) + - Method calls method in (MDataTypeImpl.java:256) + - Method calls method in (MDataTypeImpl.java:266) + - Method calls method in (MMInstanceGenerator.java:274) + - Method calls method in (MClassImpl.java:304) + - Method calls method in (MAssociationImpl.java:307) + - Method calls method in (MClassImpl.java:316) + - Method calls method in (MClassImpl.java:327) + - Method calls method in (MAssociationClassImpl.java:331) + - Method calls method in (MAssociationClassImpl.java:337) + (35 further dependencies have been omitted...) +Cycle detected: Slice graph -> + Slice util -> + Slice uml -> + Slice graph + 1. Dependencies of Slice graph + - Constructor (java.lang.Object)> calls method in (NodeDoesNotExistException.java:40) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Class implements interface in (MGeneralization.java:0) + - Field has type in (MModel.java:0) + - Field has type in (MSystemState.java:0) + - Interface extends interface in (MWholePartLink.java:0) + - Method has return type in (MModel.java:0) + - Method has return type in (MSystemState.java:0) + - Constructor (java.lang.String)> calls constructor ()> in (MModel.java:84) + - Method calls method in (MModel.java:123) + - Method calls method in (MModel.java:160) + - Method calls method in (MDataTypeImpl.java:233) + - Method calls method in (MDataTypeImpl.java:245) + - Method calls method in (MDataTypeImpl.java:256) + - Method calls method in (MDataTypeImpl.java:266) + - Method calls method in (MMInstanceGenerator.java:274) + - Method calls method in (MClassImpl.java:304) + - Method calls method in (MAssociationImpl.java:307) + - Method calls method in (MClassImpl.java:316) + - Method calls method in (MClassImpl.java:327) + - Method calls method in (MAssociationClassImpl.java:331) + - Method calls method in (MAssociationClassImpl.java:337) + (35 further dependencies have been omitted...) +Cycle detected: Slice parser -> + Slice uml -> + Slice parser + 1. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MProtocolStateMachine.java:0) + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MStateMachine.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByKind.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByType.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssert.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClass)> has parameter of type in (MAssertClassInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertGlobalInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (MAssertOclExpression.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertPost.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.mm.MOperation, [Lorg.tzi.use.uml.ocl.expr.Expression;)> has parameter of type in (MAssertPre.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (MAssertSingleInvariant.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.tzi.use.parser.SrcPos)> has parameter of type in (MVariation.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationEnd.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationStart.java:0) + - Field has type in (MStateMachine.java:0) + - Field has type in (Expression.java:0) + - Field has type in (VarDecl.java:0) + - Field has type in (MStatement.java:0) + (42 further dependencies have been omitted...) +Cycle detected: Slice parser -> + Slice uml -> + Slice util -> + Slice parser + 1. Dependencies of Slice parser + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (java.lang.String, java.net.URI, java.io.PrintWriter, org.tzi.use.uml.ocl.value.VarBindings, org.tzi.use.uml.mm.ModelFactory)> has parameter of type in (Context.java:0) + - Constructor (org.tzi.use.parser.ExprContext, java.lang.String, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (ExprContext.java:0) + - Constructor (org.tzi.use.parser.Symtable, java.lang.String, org.tzi.use.uml.ocl.type.Type, org.tzi.use.parser.SrcPos)> has parameter of type in (Symtable.java:0) + - Constructor (org.tzi.use.uml.ocl.value.VarBindings)> has parameter of type in (Symtable.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (Context.java:0) + - Field has type in (ExprContext.java:0) + - Field has generic type > with type argument depending on in (ImportContext.java:0) + - Field has type in (Symtable.java:0) + - Field has type in (Symtable.java:0) + - Field depends on component type in (ASTOperationExpression.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociation.java:0) + - Field has type in (ASTAssociationClass.java:0) + (1060 further dependencies have been omitted...) + 2. Dependencies of Slice uml + - Class implements interface in (ExpTupleLiteral.java:0) + - Class implements interface in (Expression.java:0) + - Class implements interface in (TupleType.java:0) + - Class implements interface in (TupleValue.java:0) + - Class implements interface in (Value.java:0) + - Class implements interface in (MSystemState.java:0) + - Class implements interface in (MSystemState.java:0) + - Class implements interface in (MLinkDeletionStatement.java:0) + - Constructor (int, org.tzi.use.util.collections.Queue, java.util.ArrayList, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (ThreadedEvaluator.java:0) + - Constructor (org.tzi.use.uml.sys.events.tags.EventContext, org.tzi.use.uml.sys.soil.MStatement, org.tzi.use.util.soil.StateDifference)> has parameter of type in (StatementExecutedEvent.java:0) + - Field has type in (ThreadedEvaluator.java:0) + - Field has type in (BagValue.java:0) + - Field has type in (MSystem.java:0) + - Field has type in (MSystem.java:0) + - Field has generic type > with type argument depending on in (MSystem.java:0) + - Field has type in (StatementEvaluationResult.java:0) + - Field has type in (StatementEvaluationResult.java:0) + - Field has type in (StatementExecutedEvent.java:0) + - Interface extends interface in (Type.java:0) + - Method has return type in (Evaluator.java:0) + (464 further dependencies have been omitted...) + 3. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) +Cycle detected: Slice parser -> + Slice util -> + Slice parser + 1. Dependencies of Slice parser + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTStatement.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method throws type in (ASTAttributeAssignmentStatement.java:0) + - Method throws type in (ASTBlockStatement.java:0) + - Method throws type in (ASTConditionalExecutionStatement.java:0) + - Method throws type in (ASTEmptyStatement.java:0) + - Method throws type in (ASTEnterOperationStatement.java:0) + - Method throws type in (ASTExitOperationStatement.java:0) + - Method throws type in (ASTIterationStatement.java:0) + - Method throws type in (ASTLinkDeletionStatement.java:0) + - Method throws type in (ASTLinkInsertionStatement.java:0) + - Method throws type in (ASTNewLinkObjectStatement.java:0) + - Method throws type in (ASTNewObjectStatement.java:0) + (240 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> has parameter of type in (CompilationFailedException.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> has parameter of type in (CompilationFailedException.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (CompilationFailedException.java:0) + - Method has return type in (SymbolTable.java:0) + - Method has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String)> calls method in (CompilationFailedException.java:48) + - Constructor (org.tzi.use.parser.soil.ast.ASTStatement, java.lang.String, java.lang.Throwable)> calls method in (CompilationFailedException.java:64) + - Method calls method in (CompilationFailedException.java:77) +Cycle detected: Slice parser -> + Slice util -> + Slice uml -> + Slice parser + 1. Dependencies of Slice parser + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTStatement.java:0) + - Field has type in (ASTStatement.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (ShellCommandCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method has parameter of type in (SoilCompiler.java:0) + - Method throws type in (ASTAttributeAssignmentStatement.java:0) + - Method throws type in (ASTBlockStatement.java:0) + - Method throws type in (ASTConditionalExecutionStatement.java:0) + - Method throws type in (ASTEmptyStatement.java:0) + - Method throws type in (ASTEnterOperationStatement.java:0) + - Method throws type in (ASTExitOperationStatement.java:0) + - Method throws type in (ASTIterationStatement.java:0) + - Method throws type in (ASTLinkDeletionStatement.java:0) + - Method throws type in (ASTLinkInsertionStatement.java:0) + - Method throws type in (ASTNewLinkObjectStatement.java:0) + - Method throws type in (ASTNewObjectStatement.java:0) + (240 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + 3. Dependencies of Slice uml + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MProtocolStateMachine.java:0) + - Constructor (java.lang.String, org.tzi.use.parser.SrcPos, org.tzi.use.uml.mm.MClassifier)> has parameter of type in (MStateMachine.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByKind.java:0) + - Constructor (org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.ocl.type.Type)> throws type in (ExpSelectByType.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssert.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClass)> has parameter of type in (MAssertClassInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertGlobalInvariants.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression)> has parameter of type in (MAssertOclExpression.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean)> has parameter of type in (MAssertPost.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.ocl.expr.Expression, org.tzi.use.uml.mm.MOperation, [Lorg.tzi.use.uml.ocl.expr.Expression;)> has parameter of type in (MAssertPre.java:0) + - Constructor (org.tzi.use.parser.SrcPos, java.lang.String, java.lang.String, boolean, org.tzi.use.uml.mm.MClassInvariant)> has parameter of type in (MAssertSingleInvariant.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.antlr.runtime.Token, org.tzi.use.uml.mm.MModel, java.util.List, java.util.List)> has generic parameter type > with type argument depending on in (MTestSuite.java:0) + - Constructor (org.tzi.use.parser.SrcPos)> has parameter of type in (MVariation.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationEnd.java:0) + - Constructor (org.tzi.use.parser.SrcPos, org.tzi.use.uml.sys.MSystem)> has parameter of type in (MVariationStart.java:0) + - Field has type in (MStateMachine.java:0) + - Field has type in (Expression.java:0) + - Field has type in (VarDecl.java:0) + - Field has type in (MStatement.java:0) + (42 further dependencies have been omitted...) +Cycle detected: Slice uml -> + Slice util -> + Slice uml + 1. Dependencies of Slice uml + - Class implements interface in (ExpTupleLiteral.java:0) + - Class implements interface in (Expression.java:0) + - Class implements interface in (TupleType.java:0) + - Class implements interface in (TupleValue.java:0) + - Class implements interface in (Value.java:0) + - Class implements interface in (MSystemState.java:0) + - Class implements interface in (MSystemState.java:0) + - Class implements interface in (MLinkDeletionStatement.java:0) + - Constructor (int, org.tzi.use.util.collections.Queue, java.util.ArrayList, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (ThreadedEvaluator.java:0) + - Constructor (org.tzi.use.uml.sys.events.tags.EventContext, org.tzi.use.uml.sys.soil.MStatement, org.tzi.use.util.soil.StateDifference)> has parameter of type in (StatementExecutedEvent.java:0) + - Field has type in (ThreadedEvaluator.java:0) + - Field has type in (BagValue.java:0) + - Field has type in (MSystem.java:0) + - Field has type in (MSystem.java:0) + - Field has generic type > with type argument depending on in (MSystem.java:0) + - Field has type in (StatementEvaluationResult.java:0) + - Field has type in (StatementEvaluationResult.java:0) + - Field has type in (StatementExecutedEvent.java:0) + - Interface extends interface in (Type.java:0) + - Method has return type in (Evaluator.java:0) + (464 further dependencies have been omitted...) + 2. Dependencies of Slice util + - Class has generic interface > with type argument depending on in (AlphabeticalConditionByNameComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalConditionComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalInvariantComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalNamedElementComparator.java:0) + - Class has generic interface > with type argument depending on in (AlphabeticalOperationComparator.java:0) + - Class has generic interface > with type argument depending on in (UseFileOrderComparator.java:0) + - Class has generic interface > with type argument depending on in (UseModelElementFileOrderComparator.java:0) + - Constructor (org.tzi.use.util.soil.SymbolTable, org.tzi.use.uml.ocl.type.Type)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (SymbolTable.java:0) + - Constructor (org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Constructor (org.tzi.use.util.soil.VariableEnvironment, org.tzi.use.uml.sys.MSystemState)> has parameter of type in (VariableEnvironment.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has generic type > with type argument depending on in (StateDifference.java:0) + - Field has type in (SymbolTable.java:0) + - Field has type in (SymbolTable.java:0) + - Field has generic type > with type argument depending on in (VariableEnvironment.java:0) + - Field has generic type >> with type argument depending on in (VariableEnvironment.java:0) + (151 further dependencies have been omitted...) + +Cycle count: 55 diff --git a/docs/archunit-results/layers-current-failure-report.txt b/docs/archunit-results/layers-current-failure-report.txt new file mode 100644 index 000000000..960729122 --- /dev/null +++ b/docs/archunit-results/layers-current-failure-report.txt @@ -0,0 +1 @@ +No violations - failure report does not exist. \ No newline at end of file diff --git a/documentation/objectdiagram-mvp-migration.md b/documentation/objectdiagram-mvp-migration.md new file mode 100644 index 000000000..1976da504 --- /dev/null +++ b/documentation/objectdiagram-mvp-migration.md @@ -0,0 +1,178 @@ +# Object Diagram — MVP Migration Plan + +This document describes a practical, incremental migration path from the current larger monolithic object-diagram implementation toward a clean MVP (Model–View–Presenter) architecture. It focuses on the `org.tzi.use.gui.views.diagrams.objectdiagram` package and outlines which classes / interfaces to keep, which to simplify or remove, and how to reduce class count while preserving compatibility. + +Goals +- Reduce unnecessary classes and duplicate interfaces. +- Make responsibilities explicit and small (Presenter vs View vs Application Controller vs Model). +- Keep backward compatibility where possible; perform breaking removals only in major releases. +- Improve testability and reduce cognitive complexity of large classes (especially `DefaultContextMenuProvider` and `NewObjectDiagram`). + +Scope +- Files directly analysed: the `objectdiagram` package in `use-gui` (see package contents). +- Focus on API shapes (interfaces) and the primary presenter/view boundaries. + +Summary of the current state +- View / UI classes: `NewObjectDiagram`, `NewObjectDiagramView`, `DiagramCanvas` (placeholder) +- Presenter: `NewObjectDiagramPresenter` + `NewObjectDiagramPresenterImpl` +- Model: `NewObjectDiagramModel` +- Controllers / Bridges: `ApplicationController`, `DefaultApplicationController` +- Menu builder: `ContextMenuProvider`, `DefaultContextMenuProvider` (very large) +- Placement persistence: `PlacementRepository`, `DefaultPlacementRepository` +- `ShowHideCropMenuBuilder` moved into `ContextMenuProvider` as nested interface (deprecated alias preserved) + +Design principles and decisions +- Keep Presenter small and focused: it should translate UI actions into domain operations and update the View via `ObjectDiagramInteractor`. +- `ApplicationController` is the boundary for executing domain operations that affect the `MSystem`; keep it separate from `ObjectDiagramInteractor` (which manipulates the UI/graph only). +- The `ContextMenuProvider` is a UI-building component. Large monolithic providers should be split into small builders (e.g. InsertItemsBuilder, LinksByKindBuilder, HideShowBuilder). +- Avoid duplicate small view interfaces — keep `NewObjectDiagramUI` as the canonical minimal UI contract. + +Proposed target architecture (MVP simplified) +- Model: `NewObjectDiagramModel` — holds application state (visible/hidden data, selection, caches). +- Presenter: `NewObjectDiagramPresenter` (interface) + `NewObjectDiagramPresenterImpl` (impl) — subscribes to system events, coordinates model & view. +- View / Interactor: `ObjectDiagramInteractor` — operations the presenter can invoke on the view. +- UI contract: `NewObjectDiagramUI` — minimal UI surface for hosting view. +- Application boundary: `ApplicationController` — executes domain-level commands against `MSystem`. +- Menu factories: `ContextMenuProvider` and small builder components. + +High-level Component Diagram (PlantUML) + +```plantuml +@startuml +package "objectdiagram" { + [NewObjectDiagramView] --> [NewObjectDiagram] : contains + [NewObjectDiagram] ..> [NewObjectDiagramModel] : uses + [NewObjectDiagramPresenterImpl] --> [NewObjectDiagramModel] : reads/writes + [NewObjectDiagramPresenterImpl] --> [ObjectDiagramInteractor] : updates view + [NewObjectDiagramPresenterImpl] --> [ApplicationController] : executes commands + [ContextMenuProvider] --> [NewObjectDiagramPresenterImpl] : builds menus +} +@enduml +``` + +## Complete class & interface diagram + +Below is a complete PlantUML diagram that lists the main classes and interfaces in the +`org.tzi.use.gui.views.diagrams.objectdiagram` package and their primary relationships +(implementation, composition and usage). Use this diagram to get a single-picture overview +of responsibilities and dependencies. + +```plantuml +@startuml +skinparam classAttributeIconSize 0 + +package "org.tzi.use.gui.views.diagrams.objectdiagram" { + + interface NewObjectDiagramPresenter + class NewObjectDiagramPresenterImpl + NewObjectDiagramPresenterImpl ..|> NewObjectDiagramPresenter : implements + + interface ApplicationController + class DefaultApplicationController + DefaultApplicationController ..|> ApplicationController : implements + + interface ContextMenuProvider + class DefaultContextMenuProvider + DefaultContextMenuProvider ..|> ContextMenuProvider : implements + ContextMenuProvider .. ShowHideCropMenuBuilder : contains + interface ShowHideCropMenuBuilder + + interface PlacementRepository + class DefaultPlacementRepository + DefaultPlacementRepository ..|> PlacementRepository : implements + + interface ObjectDiagramInteractor + class NewObjectDiagram + NewObjectDiagram ..|> ObjectDiagramInteractor : implements + NewObjectDiagram "1" *-- "1" NewObjectDiagram::ObjectDiagramData : contains + + class NewObjectDiagramView + NewObjectDiagramView ..|> NewObjectDiagramUI : implements + NewObjectDiagramView ..|> DiagramContext : implements + NewObjectDiagramView "1" *-- "1" NewObjectDiagram : contains + + interface NewObjectDiagramUI + interface IObjectDiagramView + IObjectDiagramView ..|> NewObjectDiagramUI : "deprecated alias" + class DiagramCanvas + DiagramCanvas ..|> NewObjectDiagramUI : implements + interface DiagramContext + + class NewObjectDiagramModel + class ObjectDiagramModel + class ObjectNode + + class PresenterFileLogger + class PresenterFileLoggerTestMain + class QualifierInputView + class ObjDiagramOptions + + ' high-level usage edges + NewObjectDiagramPresenterImpl --> NewObjectDiagramModel : reads/writes + NewObjectDiagramPresenterImpl --> ObjectDiagramInteractor : updates view + NewObjectDiagramPresenterImpl --> ApplicationController : delegates commands + NewObjectDiagramPresenterImpl --> ContextMenuProvider : asks to build menu + NewObjectDiagramPresenterImpl --> PlacementRepository : persist/restore layout + + NewObjectDiagram --> NewObjectDiagramModel : uses + NewObjectDiagram --> ObjectNode : creates/owns + NewObjectDiagram --> NewObjectDiagramPresenterImpl : wired-to (optional) + + NewObjectDiagramView --> NewObjectDiagram : contains (UI) + DefaultContextMenuProvider --> NewObjectDiagram : queries visible/hidden data + + ' mark deprecated / aliases + IObjectDiagramView : <> + ShowHideCropMenuBuilder : <> + +} + +@enduml +``` + +Sequence Diagram: User opens context menu & deletes a link + +```plantuml +@startuml +actor User +User -> NewObjectDiagram : right-click +NewObjectDiagram -> ContextMenuProvider : request menu +ContextMenuProvider -> NewObjectDiagramPresenterImpl : onPopupMenuPrepared(menu,...) +User -> ContextMenu : click "Delete link" +ContextMenu -> NewObjectDiagramPresenterImpl : onDeleteLink(link) +NewObjectDiagramPresenterImpl -> ApplicationController : deleteLink(link) +ApplicationController -> MSystem : execute(MLinkDeletionStatement) +NewObjectDiagramPresenterImpl -> ObjectDiagramInteractor : clearSelection() +NewObjectDiagramPresenterImpl -> NewObjectDiagram : refresh +@enduml +``` + +## Rationale for the refactoring (why these changes make sense) + +This refactoring was performed to make the codebase more maintainable, testable and easier to understand over the long term. The main reasons and the direct impact on our implementation are summarized below. + +- Separation of concerns: + - Before: UI logic, placement/persistence logic and domain commands were mixed inside the same classes (for example `NewObjectDiagram`, `DefaultContextMenuProvider`). + - After: `ApplicationController` is responsible for domain/system commands, `ObjectDiagramInteractor` provides view/rendering APIs only, and `NewObjectDiagramModel` holds diagram state. This reduces the risk that UI changes accidentally affect domain behavior. + +- Reduced duplication and improved cohesion: + - Duplicate small interfaces were consolidated (for example `IObjectDiagramView` is now an alias of `NewObjectDiagramUI`) and the `ShowHideCropMenuBuilder` was grouped under `ContextMenuProvider`. Related concepts are now collected in a single place. + +- Safe, incremental migration: + - Instead of deleting types immediately we introduced deprecations (for example in `DiagramContext`) and kept compatibility aliases. This allows downstream code to migrate in small steps without breaking the build. + +- Better testability and lower cognitive load: + - By splitting large classes into focused builders and utilities we reduce per-class cognitive complexity which makes unit testing easier and quicker to write. + +- Preparing for quality tools (SonarQube): + - Many Sonar issues are caused by duplicated code, public static fields, overly long methods or high cognitive complexity. The applied changes are targeted at reducing those metrics. + +Implemented, concrete changes and refinements + +- `ShowHideCropMenuBuilder` was moved into `ContextMenuProvider` as a nested interface; the old file was deleted. +- `IObjectDiagramView` was consolidated to `NewObjectDiagramUI` and 'IObjectDiagramView' is now deleted. +- `DiagramContext` now marks application-level command methods as deprecated and points callers to `ApplicationController`. +- `NewObjectDiagramPresenter` and `NewObjectDiagramPresenterImpl` were updated to use the relocated nested builder type. + +These steps are intentionally small to preserve compatibility while steering the architecture towards a clear MVP structure. + diff --git a/use-core/src/main/resources/examples/Documentation/AssociationClass/Info.txt b/use-core/src/main/resources/examples/Documentation/AssociationClass/Info.txt index 9fad6e4e2..6db88f6c8 100644 --- a/use-core/src/main/resources/examples/Documentation/AssociationClass/Info.txt +++ b/use-core/src/main/resources/examples/Documentation/AssociationClass/Info.txt @@ -1,15 +1,15 @@ -An example with persons working for a company. -Salary and employee ranking are represented by -association classes. - -This example is part of -"Improvements in USE 2.2.0" - -AssociationClass.use: -two classes Company and Person -two association classes WorksFor, EmployeeRanking -no Constraints - -AssociationClass.cmd: -creates objects for classes and -association classes +An example with persons working for a company. +Salary and employee ranking are represented by +association classes. + +This example is part of +"Improvements in USE 2.2.0" + +AssociationClass.use: +two classes Company and Person +two association classes WorksFor, EmployeeRanking +no Constraints + +AssociationClass.cmd: +creates objects for classes and +association classes diff --git a/use-core/src/main/resources/examples/Documentation/Demo/Info.txt b/use-core/src/main/resources/examples/Documentation/Demo/Info.txt index 106672c4e..bc1266a70 100644 --- a/use-core/src/main/resources/examples/Documentation/Demo/Info.txt +++ b/use-core/src/main/resources/examples/Documentation/Demo/Info.txt @@ -1,35 +1,35 @@ -An example with employees working in different departments -on projects, which are controlled by a department. -After executing Demo.cmd one invariant evaluates to false -because one project has a higher budged than its department. - -This example is part of the "USE Quick Tour". - -Demo.use: -three classes Employee, Department and Project -three associations -at least one invariant for each class - -Demo.cmd: -== the sequence of Demo0.cmd to Demo4.cmd - -SplitCommands/Demo0.cmd: -creates one object of type Department - -SplitCommands/Demo1.cmd: -assigns the attribute values in the new object - -SplitCommands/Demo2.cmd: -creates two objects of type Employee and assigns -attribute values - -SplitCommands/Demo3.cmd: -creates two links between the department and the employees - -SplitCommands/Demo4.cmd: -creates two projects, assigns attribute values and -creates two links between the projects and the -department -creates links between the employees and the new projects - -Classdiagram/Demo-UML.eps: Class diagram for this example +An example with employees working in different departments +on projects, which are controlled by a department. +After executing Demo.cmd one invariant evaluates to false +because one project has a higher budged than its department. + +This example is part of the "USE Quick Tour". + +Demo.use: +three classes Employee, Department and Project +three associations +at least one invariant for each class + +Demo.cmd: +== the sequence of Demo0.cmd to Demo4.cmd + +SplitCommands/Demo0.cmd: +creates one object of type Department + +SplitCommands/Demo1.cmd: +assigns the attribute values in the new object + +SplitCommands/Demo2.cmd: +creates two objects of type Employee and assigns +attribute values + +SplitCommands/Demo3.cmd: +creates two links between the department and the employees + +SplitCommands/Demo4.cmd: +creates two projects, assigns attribute values and +creates two links between the projects and the +department +creates links between the employees and the new projects + +Classdiagram/Demo-UML.eps: Class diagram for this example diff --git a/use-core/src/main/resources/examples/Documentation/Employee/Info.txt b/use-core/src/main/resources/examples/Documentation/Employee/Info.txt index bea733b07..78ad523af 100644 --- a/use-core/src/main/resources/examples/Documentation/Employee/Info.txt +++ b/use-core/src/main/resources/examples/Documentation/Employee/Info.txt @@ -1,25 +1,25 @@ -This example shows companies and persons working -for them. - -The example corresponds to the example -model in the section `Validating Pre- and Postconditions -with USE´ - -Employee.use: -Corresponds to examples/monitoring/Employee.use, -but the invariant context Person inv: age >= 18 -is missing here - -two classes Person and Company with at least -one operation with side effects -one association WorksFor -no invariants, but one constraint for every operation - -Employee.cmd: -creates one Company and one Person -the operation hire is executed to create a link -between both objects -after that, the raiseSalary operation with return value -is executed -finally the new link is destroyed by executing the -operation fire +This example shows companies and persons working +for them. + +The example corresponds to the example +model in the section `Validating Pre- and Postconditions +with USE´ + +Employee.use: +Corresponds to examples/monitoring/Employee.use, +but the invariant context Person inv: age >= 18 +is missing here + +two classes Person and Company with at least +one operation with side effects +one association WorksFor +no invariants, but one constraint for every operation + +Employee.cmd: +creates one Company and one Person +the operation hire is executed to create a link +between both objects +after that, the raiseSalary operation with return value +is executed +finally the new link is destroyed by executing the +operation fire diff --git a/use-core/src/main/resources/examples/Documentation/Graph/Info.txt b/use-core/src/main/resources/examples/Documentation/Graph/Info.txt index 1f7ed5ea9..e07981246 100644 --- a/use-core/src/main/resources/examples/Documentation/Graph/Info.txt +++ b/use-core/src/main/resources/examples/Documentation/Graph/Info.txt @@ -1,21 +1,21 @@ -This example describes a graph with nodes and edges. -The operation -newTarget creates a new link (edge) between a -source node and exactly one new node. -This operation uses the operation oclIsNew. - -The example corresponds to -the section `Validating Pre- and Postconditions -with USE - -Graph.use: -one class Node and one association Edge -one operation newTarget with two postconditions - -Graph.cmd: -three calls of newTarget -both postconditions evaluate to true after the first call -the first postcondition evaluates to false and the -second to true after the second call -and the first postcondition evaluates to true -and the second to false after the last call +This example describes a graph with nodes and edges. +The operation +newTarget creates a new link (edge) between a +source node and exactly one new node. +This operation uses the operation oclIsNew. + +The example corresponds to +the section `Validating Pre- and Postconditions +with USE + +Graph.use: +one class Node and one association Edge +one operation newTarget with two postconditions + +Graph.cmd: +three calls of newTarget +both postconditions evaluate to true after the first call +the first postcondition evaluates to false and the +second to true after the second call +and the first postcondition evaluates to true +and the second to false after the last call diff --git a/use-core/src/main/resources/examples/Documentation/HowToCheckUMLAndOCLModelsWithUSE/00readme.txt b/use-core/src/main/resources/examples/Documentation/HowToCheckUMLAndOCLModelsWithUSE/00readme.txt index c5b44c893..b58942ad4 100644 --- a/use-core/src/main/resources/examples/Documentation/HowToCheckUMLAndOCLModelsWithUSE/00readme.txt +++ b/use-core/src/main/resources/examples/Documentation/HowToCheckUMLAndOCLModelsWithUSE/00readme.txt @@ -1,199 +1,199 @@ - How to Check UML and OCL Models with USE - Martin Gogolla - July 2010 - -Abstract: This note contains practical hints on how to define UML and -OCL models and how to check such models with the tool USE (UML-based -Specification Environment) developed at the University of Bremen. One -should obtain a link to the tool USE by searching Google with the terms -'use ocl bremen'. This note explains most of the USE functionality by a -simple example describing civil status properties of persons. - -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -1. WHAT IS CONTAINED IN THE FILES? - -In order to work with the civil status example easily, all files should -be placed in the directory 'c:/use/civstat/'. In your directory -'c:/use/civstat/' there should be 56 files which are partitioned into 9 -groups. - ------------------------------------------ files documenting this note -- -- 00readme.pdf -- 00readme.sxw -- 00readme.txt ------------------------------------------ files for the abcd scenario -- -- abcd_assl.cmd -- abcd_assl.olt -+ abcd_assl.pro -- abcd_cmd.cmd -- abcd_cmd.olt -+ abcd_cmd.pro -+ abcd_seqDiaDetail1.gif -+ abcd_seqDiaDetail2.gif -+ abcd_useScreenshot.gif ---------------------------------------- files for the bigamy scenario -- -- bigamy.cmd -- bigamy.invs -+ bigamy.pro -------------------------------------- central files showing the model -- -+ civstat.assl -+ civstat.use -+ civstat_classDia.gif ----------------------------------------- files for the crowd scenario -- -- crowd.cmd -- crowd.olt -+ crowd.pro -+ crowd_classExtent.gif -+ crowd_useScreenshot.gif ----------------------------------- papers explaining underlying ideas -- -- Gogolla_2005_SOSYM.pdf -- Gogolla_2005_SOSYM.ps -- Gogolla_2007_SCP.pdf -- Gogolla_2007_SCP.ps -- Gogolla_2009_TAP.pdf -- Gogolla_2009_TAP.ps ---------------------------------- files for the independence scenario -- -- independence_allInvariants.gif -- independence_attributesDefined.cmd -+ independence_attributesDefined.gif -- independence_attributesDefined.pro -- independence_femaleHasNoWife.cmd -+ independence_femaleHasNoWife.gif -- independence_femaleHasNoWife.pro -- independence_maleHasNoHusband.cmd -+ independence_maleHasNoHusband.gif -- independence_maleHasNoHusband.pro -- independence_nameCapitalThenSmallLetters.cmd -+ independence_nameCapitalThenSmallLetters.gif -- independence_nameCapitalThenSmallLetters.pro -- independence_nameIsUnique.cmd -+ independence_nameIsUnique.gif -- independence_nameIsUnique.pro ---------------------------------- cmd files defining model operations -- -+ Person_birth.cmd -+ Person_death_married.cmd -+ Person_death_unmarried.cmd -+ Person_divorce.cmd -+ Person_marry.cmd ----------------------------------------- files for the world scenario -- -- world.cmd -- world.olt -+ world.pro -+ world_objDia.gif -- world_query.cmd -+ world_query.pro ------------------------------------------------------------------------- - -Files ending with 'use', 'assl', 'cmd', 'invs', or 'olt' can be -processed by the USE tool. All files with other suffixes ('pdf', -'sxw', 'txt', 'pro', 'gif', or 'ps') are the result of documenting the -work ('gif', 'pro', ...) with USE or explain basic ideas ('ps', -'pdf'). The file suffixes indicate the file content as follows. - -use - definition of the UML and OCL model (classes, invariants, etc.) -assl - definition of parametrized scripts for manipulating the model -cmd - scripts or script calls realizing scenarios -invs - additional invariants to be loaded dynamically -olt - object diagram layout - -pdf - pdf file for documentation -txt - plain text files for documentation -pro - protocol file (plain text) documenting execution of a cmd file -gif - graphic file containing a UML diagram or something similar -ps - ps file for documentation - -All files enumerated above with '+' are shown in the file -'00readme.pdf'. - -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -2. HOW CAN I RUN USE AND EXECUTE SCENARIOS? - -Download, install and start USE. Consult the USE documentation if -needed. USE will show up with a GUI window and a COMMAND LINE -window. Open the file 'c:/use/civstat/abcd_cmd.cmd' with a text -editor. The first line of that file looks as follows: - --- read c:/use/civstat/abcd_cmd.cmd - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -A cmd file contains a sequence of commands which can be processed by -USE. The characters '--' indicate that the rest of the line is a -comment. Copy that part of this first line into your clipboard which -is marked above with the character '^'. Paste the command which you -have copied from your clipboard into the COMMAND LINE window and press -return. USE will execute all commands in the file -'c:/use/civstat/abcd_cmd.cmd' and will build up an object diagram. USE -has constructed several object diagrams before reaching the final -one. All executed operations can be traced in the sequence diagram -view. - -Execution of all above mentioned scenarios can be done in the same way -as for the first scenario, i.e., by loading the respective cmd file into -a text editor, by copying from the first line the read command together -with the respective file name and by pasting this command into the -COMMAND LINE window. This will work for the following cmd files: - -abcd_assl.{cmd|pro} -abcd_cmd.{cmd|pro} -bigamy.{cmd|pro} -crowd.{cmd|pro} -independence_attributesDefined.{cmd|pro} -independence_femaleHasNoWife.{cmd|pro} -independence_maleHasNoHusband.{cmd|pro} -independence_nameCapitalThenSmallLetters.{cmd|pro} -independence_nameIsUnique.{cmd|pro} -world.{cmd|pro} -world_query.{cmd|pro} - -These scenarios are documented with a protocol file having the same name -as the cmd file but possessing the suffix pro. These pro files are -ordinary text files. They are edited versions (long files names are -shortened) of the output given by USE in the COMMAND LINE window. - -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -3. WHAT DO THE DIFFERENT SCENARIOS SHOW? - -Scenario 'abcd': A simple object diagram with four persons (ada, bob, - cyd, dan) is built up. The persons are created, partly get married or - divorced or die. This scenario is expressed in two versions, namely - one version realizing the operations with cmd files (abcd_cmd.cmd) - and one version realizing the operations using the assl file - (abcd_assl.cmd). - -Scenario 'bigamy': This scenario (bigamy.cmd) checks whether a bigamy - situation can be constructed under the stated invariants. A large - number of possible bigamy situations is tried with the script - attemptBigamy() from the civstat.assl file, but none is found. This - proves that at least in the enumerated search space, the UML and OCL - model is bigamy free. - -Scenario 'crowd': The cmd file crowd.cmd builds up an invalid object - diagram where one model-inherent multiplicity constraint and two - explicit invariants are violated. This scenario may be regarded as a - negative test case which has to lead to a constraint violation. - -Scenario 'independence': This scenario considers the relationship - between the five invariants and consists of five cmd files - (independence_attributesDefined.cmd, - independence_femaleHasNoWife.cmd, independence_maleHasNoHusband.cmd, - independence_nameCapitalThenSmallLetters.cmd, - independence_nameIsUnique.cmd). It builds up five object diagrams - where each single object diagram violates exactly one invariant and - satisfies the other four invariants. The construction of these five - object diagrams proves that the five invariants are independent from - each other, i.e., no single invariant is a consequence of the other - invariants. In other words, the five invariants are non-redundant and - express independent requirements. - -Scenario 'world': Here a larger object diagram is constructed with the - cmd file world.cmd that shows that the invariants are consistent, - i.e., the invariants are not contradictory to each other. The object - diagram is constructed by the script world() which is parametrized - with the number of expected female and male persons and the number of - expected mariages. Person attributes like name or gender are filled - with values representing real-world situations. - -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + How to Check UML and OCL Models with USE + Martin Gogolla + July 2010 + +Abstract: This note contains practical hints on how to define UML and +OCL models and how to check such models with the tool USE (UML-based +Specification Environment) developed at the University of Bremen. One +should obtain a link to the tool USE by searching Google with the terms +'use ocl bremen'. This note explains most of the USE functionality by a +simple example describing civil status properties of persons. + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +1. WHAT IS CONTAINED IN THE FILES? + +In order to work with the civil status example easily, all files should +be placed in the directory 'c:/use/civstat/'. In your directory +'c:/use/civstat/' there should be 56 files which are partitioned into 9 +groups. + +----------------------------------------- files documenting this note -- +- 00readme.pdf +- 00readme.sxw +- 00readme.txt +----------------------------------------- files for the abcd scenario -- +- abcd_assl.cmd +- abcd_assl.olt ++ abcd_assl.pro +- abcd_cmd.cmd +- abcd_cmd.olt ++ abcd_cmd.pro ++ abcd_seqDiaDetail1.gif ++ abcd_seqDiaDetail2.gif ++ abcd_useScreenshot.gif +--------------------------------------- files for the bigamy scenario -- +- bigamy.cmd +- bigamy.invs ++ bigamy.pro +------------------------------------- central files showing the model -- ++ civstat.assl ++ civstat.use ++ civstat_classDia.gif +---------------------------------------- files for the crowd scenario -- +- crowd.cmd +- crowd.olt ++ crowd.pro ++ crowd_classExtent.gif ++ crowd_useScreenshot.gif +---------------------------------- papers explaining underlying ideas -- +- Gogolla_2005_SOSYM.pdf +- Gogolla_2005_SOSYM.ps +- Gogolla_2007_SCP.pdf +- Gogolla_2007_SCP.ps +- Gogolla_2009_TAP.pdf +- Gogolla_2009_TAP.ps +--------------------------------- files for the independence scenario -- +- independence_allInvariants.gif +- independence_attributesDefined.cmd ++ independence_attributesDefined.gif +- independence_attributesDefined.pro +- independence_femaleHasNoWife.cmd ++ independence_femaleHasNoWife.gif +- independence_femaleHasNoWife.pro +- independence_maleHasNoHusband.cmd ++ independence_maleHasNoHusband.gif +- independence_maleHasNoHusband.pro +- independence_nameCapitalThenSmallLetters.cmd ++ independence_nameCapitalThenSmallLetters.gif +- independence_nameCapitalThenSmallLetters.pro +- independence_nameIsUnique.cmd ++ independence_nameIsUnique.gif +- independence_nameIsUnique.pro +--------------------------------- cmd files defining model operations -- ++ Person_birth.cmd ++ Person_death_married.cmd ++ Person_death_unmarried.cmd ++ Person_divorce.cmd ++ Person_marry.cmd +---------------------------------------- files for the world scenario -- +- world.cmd +- world.olt ++ world.pro ++ world_objDia.gif +- world_query.cmd ++ world_query.pro +------------------------------------------------------------------------ + +Files ending with 'use', 'assl', 'cmd', 'invs', or 'olt' can be +processed by the USE tool. All files with other suffixes ('pdf', +'sxw', 'txt', 'pro', 'gif', or 'ps') are the result of documenting the +work ('gif', 'pro', ...) with USE or explain basic ideas ('ps', +'pdf'). The file suffixes indicate the file content as follows. + +use - definition of the UML and OCL model (classes, invariants, etc.) +assl - definition of parametrized scripts for manipulating the model +cmd - scripts or script calls realizing scenarios +invs - additional invariants to be loaded dynamically +olt - object diagram layout + +pdf - pdf file for documentation +txt - plain text files for documentation +pro - protocol file (plain text) documenting execution of a cmd file +gif - graphic file containing a UML diagram or something similar +ps - ps file for documentation + +All files enumerated above with '+' are shown in the file +'00readme.pdf'. + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +2. HOW CAN I RUN USE AND EXECUTE SCENARIOS? + +Download, install and start USE. Consult the USE documentation if +needed. USE will show up with a GUI window and a COMMAND LINE +window. Open the file 'c:/use/civstat/abcd_cmd.cmd' with a text +editor. The first line of that file looks as follows: + +-- read c:/use/civstat/abcd_cmd.cmd + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A cmd file contains a sequence of commands which can be processed by +USE. The characters '--' indicate that the rest of the line is a +comment. Copy that part of this first line into your clipboard which +is marked above with the character '^'. Paste the command which you +have copied from your clipboard into the COMMAND LINE window and press +return. USE will execute all commands in the file +'c:/use/civstat/abcd_cmd.cmd' and will build up an object diagram. USE +has constructed several object diagrams before reaching the final +one. All executed operations can be traced in the sequence diagram +view. + +Execution of all above mentioned scenarios can be done in the same way +as for the first scenario, i.e., by loading the respective cmd file into +a text editor, by copying from the first line the read command together +with the respective file name and by pasting this command into the +COMMAND LINE window. This will work for the following cmd files: + +abcd_assl.{cmd|pro} +abcd_cmd.{cmd|pro} +bigamy.{cmd|pro} +crowd.{cmd|pro} +independence_attributesDefined.{cmd|pro} +independence_femaleHasNoWife.{cmd|pro} +independence_maleHasNoHusband.{cmd|pro} +independence_nameCapitalThenSmallLetters.{cmd|pro} +independence_nameIsUnique.{cmd|pro} +world.{cmd|pro} +world_query.{cmd|pro} + +These scenarios are documented with a protocol file having the same name +as the cmd file but possessing the suffix pro. These pro files are +ordinary text files. They are edited versions (long files names are +shortened) of the output given by USE in the COMMAND LINE window. + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +3. WHAT DO THE DIFFERENT SCENARIOS SHOW? + +Scenario 'abcd': A simple object diagram with four persons (ada, bob, + cyd, dan) is built up. The persons are created, partly get married or + divorced or die. This scenario is expressed in two versions, namely + one version realizing the operations with cmd files (abcd_cmd.cmd) + and one version realizing the operations using the assl file + (abcd_assl.cmd). + +Scenario 'bigamy': This scenario (bigamy.cmd) checks whether a bigamy + situation can be constructed under the stated invariants. A large + number of possible bigamy situations is tried with the script + attemptBigamy() from the civstat.assl file, but none is found. This + proves that at least in the enumerated search space, the UML and OCL + model is bigamy free. + +Scenario 'crowd': The cmd file crowd.cmd builds up an invalid object + diagram where one model-inherent multiplicity constraint and two + explicit invariants are violated. This scenario may be regarded as a + negative test case which has to lead to a constraint violation. + +Scenario 'independence': This scenario considers the relationship + between the five invariants and consists of five cmd files + (independence_attributesDefined.cmd, + independence_femaleHasNoWife.cmd, independence_maleHasNoHusband.cmd, + independence_nameCapitalThenSmallLetters.cmd, + independence_nameIsUnique.cmd). It builds up five object diagrams + where each single object diagram violates exactly one invariant and + satisfies the other four invariants. The construction of these five + object diagrams proves that the five invariants are independent from + each other, i.e., no single invariant is a consequence of the other + invariants. In other words, the five invariants are non-redundant and + express independent requirements. + +Scenario 'world': Here a larger object diagram is constructed with the + cmd file world.cmd that shows that the invariants are consistent, + i.e., the invariants are not contradictory to each other. The object + diagram is constructed by the script world() which is parametrized + with the number of expected female and male persons and the number of + expected mariages. Person attributes like name or gender are filled + with values representing real-world situations. + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/use-core/src/main/resources/examples/Documentation/NestedOperationCalls/Info.txt b/use-core/src/main/resources/examples/Documentation/NestedOperationCalls/Info.txt index af88e606b..14342d196 100644 --- a/use-core/src/main/resources/examples/Documentation/NestedOperationCalls/Info.txt +++ b/use-core/src/main/resources/examples/Documentation/NestedOperationCalls/Info.txt @@ -1,19 +1,19 @@ -This example shows the handling of nested operation -calls. It is based on the factorial function -with return type Integer. -The operation can be used as query operation and -with openter and opexit, too. - -NestedOperationCalls.use: -one Class Rec -one operation fac, computing and returning the factorial -of the functions argument -this operation is defined as query and has -pre- and postconditions - - -NestedOperationCalls.cmd: -calls the Function three times with different -arguments (not as query) -and it ends the calls in the same order -all pre- and postconditions evaluate to true +This example shows the handling of nested operation +calls. It is based on the factorial function +with return type Integer. +The operation can be used as query operation and +with openter and opexit, too. + +NestedOperationCalls.use: +one Class Rec +one operation fac, computing and returning the factorial +of the functions argument +this operation is defined as query and has +pre- and postconditions + + +NestedOperationCalls.cmd: +calls the Function three times with different +arguments (not as query) +and it ends the calls in the same order +all pre- and postconditions evaluate to true diff --git a/use-core/src/main/resources/examples/Metamodels/OCL2MM/Info.txt b/use-core/src/main/resources/examples/Metamodels/OCL2MM/Info.txt index 14310f6d5..0c529c71f 100644 --- a/use-core/src/main/resources/examples/Metamodels/OCL2MM/Info.txt +++ b/use-core/src/main/resources/examples/Metamodels/OCL2MM/Info.txt @@ -1,7 +1,7 @@ -Specification of a metamodel for OCL expressions -classifiers, association ends and attributes. - -OCL2MM.use: - -OCL2MM.cmd: +Specification of a metamodel for OCL expressions +classifiers, association ends and attributes. + +OCL2MM.use: + +OCL2MM.cmd: empty \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Metamodels/UML13All/Info.txt b/use-core/src/main/resources/examples/Metamodels/UML13All/Info.txt index 595d0ad94..24a69dd33 100644 --- a/use-core/src/main/resources/examples/Metamodels/UML13All/Info.txt +++ b/use-core/src/main/resources/examples/Metamodels/UML13All/Info.txt @@ -1,11 +1,11 @@ -Specifies UML 1.3 in USE - -UML13All.use: -- - -UML13All.cmd: -leer - -Demo-meta.cmd: -Represents a part of the metamodel of the /Documentation/ +Specifies UML 1.3 in USE + +UML13All.use: +- + +UML13All.cmd: +leer + +Demo-meta.cmd: +Represents a part of the metamodel of the /Documentation/ Demo example. (classes and attributes) \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Metamodels/UML13Core/Info.txt b/use-core/src/main/resources/examples/Metamodels/UML13Core/Info.txt index d5fb47fea..76150bb0a 100644 --- a/use-core/src/main/resources/examples/Metamodels/UML13Core/Info.txt +++ b/use-core/src/main/resources/examples/Metamodels/UML13Core/Info.txt @@ -1,8 +1,8 @@ -Specifies the UML 1.3 Core -the definition is also a part of /Specifications/ -UML13All - -UML13Core.use: - -UML13Core.cmd: +Specifies the UML 1.3 Core +the definition is also a part of /Specifications/ +UML13All + +UML13Core.use: + +UML13Core.cmd: empty \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Metamodels/UML23/Info.txt b/use-core/src/main/resources/examples/Metamodels/UML23/Info.txt index 0f1dd373e..e626a550f 100644 --- a/use-core/src/main/resources/examples/Metamodels/UML23/Info.txt +++ b/use-core/src/main/resources/examples/Metamodels/UML23/Info.txt @@ -1,7 +1,7 @@ -Specification of a metamodel for OCL expressions -(structured-)classifiers, association ends and attributes. - -OCL2MM.use: - -OCL2MM.cmd: +Specification of a metamodel for OCL expressions +(structured-)classifiers, association ends and attributes. + +OCL2MM.use: + +OCL2MM.cmd: empty \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Metamodels/actionsemantics/Info.txt b/use-core/src/main/resources/examples/Metamodels/actionsemantics/Info.txt index f5fd7d4cb..3ae75daba 100644 --- a/use-core/src/main/resources/examples/Metamodels/actionsemantics/Info.txt +++ b/use-core/src/main/resources/examples/Metamodels/actionsemantics/Info.txt @@ -1,2 +1,2 @@ -Specification of the actionsemantics model +Specification of the actionsemantics model -> OMG RFP ad/98-11-01 \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Others/AB/Info.txt b/use-core/src/main/resources/examples/Others/AB/Info.txt index 43a25fdaf..2ae2c8172 100644 --- a/use-core/src/main/resources/examples/Others/AB/Info.txt +++ b/use-core/src/main/resources/examples/Others/AB/Info.txt @@ -1,21 +1,21 @@ -This Example shows the use of openter and opexit -for an operation with side effects. -With four postconditions different expressions using -@pre are presented. - -AB.use: -two classes A,B and one association R - -AB.cmd: -creates state 1 with two objects and one link -calls the operation with openter -creates state 2 by chancing attribute values, -changing links and creating a new object -then opexit - -AB1.cmd: -creates state 1 - -AB2.cmd: -creates state 2 - +This Example shows the use of openter and opexit +for an operation with side effects. +With four postconditions different expressions using +@pre are presented. + +AB.use: +two classes A,B and one association R + +AB.cmd: +creates state 1 with two objects and one link +calls the operation with openter +creates state 2 by chancing attribute values, +changing links and creating a new object +then opexit + +AB1.cmd: +creates state 1 + +AB2.cmd: +creates state 2 + diff --git a/use-core/src/main/resources/examples/Others/CallSequence/Info.txt b/use-core/src/main/resources/examples/Others/CallSequence/Info.txt index 5c7db4fd3..f1a420cde 100644 --- a/use-core/src/main/resources/examples/Others/CallSequence/Info.txt +++ b/use-core/src/main/resources/examples/Others/CallSequence/Info.txt @@ -1,12 +1,12 @@ -This example shows nested operation calls with different -objects. - -CallSequence.use: -two classes with one operation (without parameters -and definition) -each - -CallSequence.cmd: -creates two objects with differen types -it follows a sequence of alternating openter and -opexit commands +This example shows nested operation calls with different +objects. + +CallSequence.use: +two classes with one operation (without parameters +and definition) +each + +CallSequence.cmd: +creates two objects with differen types +it follows a sequence of alternating openter and +opexit commands diff --git a/use-core/src/main/resources/examples/Others/CarRental/Info.txt b/use-core/src/main/resources/examples/Others/CarRental/Info.txt index ee40aac9c..f189e755d 100644 --- a/use-core/src/main/resources/examples/Others/CarRental/Info.txt +++ b/use-core/src/main/resources/examples/Others/CarRental/Info.txt @@ -1,21 +1,21 @@ -This is a complex version of the -examples/Papers/1998/RichtersAndGogolla example -with simple invariants to ensure object diagrams -which make sense and pre-/postconditions -for every operation with side effects. - -CarRental2.use: -more classes and associations than the simple example -there is a 3-ary association - -many attributes (with primitive and complex types) -there are queries and operations changing the system -state - -CarRental2.cmd: -creates a state with at least -one object per class and assigned attribute values -not all constraints evaluate to true -there are inconsistent invariants - -CarRental2.olt: +This is a complex version of the +examples/Papers/1998/RichtersAndGogolla example +with simple invariants to ensure object diagrams +which make sense and pre-/postconditions +for every operation with side effects. + +CarRental2.use: +more classes and associations than the simple example +there is a 3-ary association + +many attributes (with primitive and complex types) +there are queries and operations changing the system +state + +CarRental2.cmd: +creates a state with at least +one object per class and assigned attribute values +not all constraints evaluate to true +there are inconsistent invariants + +CarRental2.olt: diff --git a/use-core/src/main/resources/examples/Others/Empty/Info.txt b/use-core/src/main/resources/examples/Others/Empty/Info.txt index 5e8870056..f54ab9bf5 100644 --- a/use-core/src/main/resources/examples/Others/Empty/Info.txt +++ b/use-core/src/main/resources/examples/Others/Empty/Info.txt @@ -1,7 +1,7 @@ -An empty class and object diagram. - -Empty.use: -empty model - -Empty.cmd: +An empty class and object diagram. + +Empty.use: +empty model + +Empty.cmd: empty \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Others/Ex/Info.txt b/use-core/src/main/resources/examples/Others/Ex/Info.txt index dcf727eea..f6cb9058d 100644 --- a/use-core/src/main/resources/examples/Others/Ex/Info.txt +++ b/use-core/src/main/resources/examples/Others/Ex/Info.txt @@ -1,13 +1,13 @@ -This example is the same as Example/Documentation/Demo. -But there is an invariant added and absent comments -in the Ex.use file. - -Ex*.cmd == Demo*.cmd - -e.cmd: -== Ex.cmd and a creation of three -more projects controlled by the department - -After executing e.cmd one more invariant evaluates to -false, because there are more projects controlled by the +This example is the same as Example/Documentation/Demo. +But there is an invariant added and absent comments +in the Ex.use file. + +Ex*.cmd == Demo*.cmd + +e.cmd: +== Ex.cmd and a creation of three +more projects controlled by the department + +After executing e.cmd one more invariant evaluates to +false, because there are more projects controlled by the department than there are employees working for it. \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Others/Grammar/Info.txt b/use-core/src/main/resources/examples/Others/Grammar/Info.txt index 49a22b496..4290c80ea 100644 --- a/use-core/src/main/resources/examples/Others/Grammar/Info.txt +++ b/use-core/src/main/resources/examples/Others/Grammar/Info.txt @@ -1,25 +1,25 @@ -This example describes a grammar with terminal -and non terminal symbols (composition) -and production rules describing how the symbols -can be replaced. - -Grammar.use: -several classes with generalization -and compositions compositions -for every class at least one simple invariant -with iterate and nested operations - -Grammar.cmd: -a simple grammar is created -four terminal symbols +, -, 0 and 1 -two non terminal symbols expr and operator -five production rules - -> - -> '0' - -> '1' - -> '+' - -> '-' - -Grammar.fig: - -Grammar.olt: +This example describes a grammar with terminal +and non terminal symbols (composition) +and production rules describing how the symbols +can be replaced. + +Grammar.use: +several classes with generalization +and compositions compositions +for every class at least one simple invariant +with iterate and nested operations + +Grammar.cmd: +a simple grammar is created +four terminal symbols +, -, 0 and 1 +two non terminal symbols expr and operator +five production rules + -> + -> '0' + -> '1' + -> '+' + -> '-' + +Grammar.fig: + +Grammar.olt: diff --git a/use-core/src/main/resources/examples/Others/Job/Info.txt b/use-core/src/main/resources/examples/Others/Job/Info.txt index 4a109e7b1..1d5577ca9 100644 --- a/use-core/src/main/resources/examples/Others/Job/Info.txt +++ b/use-core/src/main/resources/examples/Others/Job/Info.txt @@ -1,13 +1,13 @@ -This example describes Jobs and Persons who have Jobs. -Students and employees are persons. - -Job.use: -four classes Person, Student (subclass of Person), -Employee (subclass of Person) and Job -one association Works between Job and Person -no constraints - -Job.cmd: -one object is created for every class -one link between a student and a job is created -then two objects are destroyed and the link deleted +This example describes Jobs and Persons who have Jobs. +Students and employees are persons. + +Job.use: +four classes Person, Student (subclass of Person), +Employee (subclass of Person) and Job +one association Works between Job and Person +no constraints + +Job.cmd: +one object is created for every class +one link between a student and a job is created +then two objects are destroyed and the link deleted diff --git a/use-core/src/main/resources/examples/Others/Lists/Info.txt b/use-core/src/main/resources/examples/Others/Lists/Info.txt index 560825f8a..4ce6a900f 100644 --- a/use-core/src/main/resources/examples/Others/Lists/Info.txt +++ b/use-core/src/main/resources/examples/Others/Lists/Info.txt @@ -1,14 +1,14 @@ -This example shows a representation of lists. -They can belong to maps and include object pairs. - -Lists.use: -several classes with generalization and associations -many constraints - -Lists.cmd: -one list is created with three not empty lists and -one empty list -then a Map with a not empty list containing a pair -is created - -Lists.olt: +This example shows a representation of lists. +They can belong to maps and include object pairs. + +Lists.use: +several classes with generalization and associations +many constraints + +Lists.cmd: +one list is created with three not empty lists and +one empty list +then a Map with a not empty list containing a pair +is created + +Lists.olt: diff --git a/use-core/src/main/resources/examples/Others/Math/Info.txt b/use-core/src/main/resources/examples/Others/Math/Info.txt index e2dc2979e..c74a1c041 100644 --- a/use-core/src/main/resources/examples/Others/Math/Info.txt +++ b/use-core/src/main/resources/examples/Others/Math/Info.txt @@ -1,14 +1,14 @@ -This example contains only one class with an operation -not free from side effects with return type Integer. -Its not defined as query, but with a postcondition -and result inside the class definition (not as an -explicit constraint). -The operation computes the greatest common divisor -of the arguments (two Integers). - -Math.use: -one class Math with an operation gcd - -Math.cmd: -gdc is called with different arguments +This example contains only one class with an operation +not free from side effects with return type Integer. +Its not defined as query, but with a postcondition +and result inside the class definition (not as an +explicit constraint). +The operation computes the greatest common divisor +of the arguments (two Integers). + +Math.use: +one class Math with an operation gcd + +Math.cmd: +gdc is called with different arguments the result values satisfy the postcondition \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Others/MultipleInheritance/Info.txt b/use-core/src/main/resources/examples/Others/MultipleInheritance/Info.txt index 57e8696dc..3e6834595 100644 --- a/use-core/src/main/resources/examples/Others/MultipleInheritance/Info.txt +++ b/use-core/src/main/resources/examples/Others/MultipleInheritance/Info.txt @@ -1,9 +1,9 @@ -This example shows generalization between several -classes without attributes, operations and associations. - -MultipleInheritance.use: -five classes A, B (subclass of A), C (subclass of A), -D (subclass of B, C and E), E - -MultipleInheritance.cmd: +This example shows generalization between several +classes without attributes, operations and associations. + +MultipleInheritance.use: +five classes A, B (subclass of A), C (subclass of A), +D (subclass of B, C and E), E + +MultipleInheritance.cmd: creates an object for every class \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Others/Person/Info.txt b/use-core/src/main/resources/examples/Others/Person/Info.txt index 1848fc7ea..31a4edb43 100644 --- a/use-core/src/main/resources/examples/Others/Person/Info.txt +++ b/use-core/src/main/resources/examples/Others/Person/Info.txt @@ -1,12 +1,12 @@ -This example shows the connection of father, mother -and children with the aid of a class and a 3-ary -association Family. -Every child has exactly one father and one mother. -Fathers and mothers may have more than one child. - -Person.use: -one class Person -one association Family - -Person.cmd: +This example shows the connection of father, mother +and children with the aid of a class and a 3-ary +association Family. +Every child has exactly one father and one mother. +Fathers and mothers may have more than one child. + +Person.use: +one class Person +one association Family + +Person.cmd: empty \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Others/Polygon/Info.txt b/use-core/src/main/resources/examples/Others/Polygon/Info.txt index 49f260b01..44aeb51e9 100644 --- a/use-core/src/main/resources/examples/Others/Polygon/Info.txt +++ b/use-core/src/main/resources/examples/Others/Polygon/Info.txt @@ -1,21 +1,21 @@ -Points and polygons are represented in this example. -Ordered points can belong to polygons. A single -point and a set of points representing -a polygon can be moved. There are also colored -points. - -Polygon.use: -three classes Point, ColorPoint (subclass of Point) and -Polygon -one association (with stereotype ordered) -Polygon_Point between points and polygons -for each class, there is an operation -with side effects for moving the points resp. -polygons and the corresponding constraints -(postconditions) defined - -Polygon.cmd: -creates a polygon and three points -one of it is colored -then the polygon, a point and the colored point -are moved +Points and polygons are represented in this example. +Ordered points can belong to polygons. A single +point and a set of points representing +a polygon can be moved. There are also colored +points. + +Polygon.use: +three classes Point, ColorPoint (subclass of Point) and +Polygon +one association (with stereotype ordered) +Polygon_Point between points and polygons +for each class, there is an operation +with side effects for moving the points resp. +polygons and the corresponding constraints +(postconditions) defined + +Polygon.cmd: +creates a polygon and three points +one of it is colored +then the polygon, a point and the colored point +are moved diff --git a/use-core/src/main/resources/examples/Others/Project/Info.txt b/use-core/src/main/resources/examples/Others/Project/Info.txt index e686c1945..548743836 100644 --- a/use-core/src/main/resources/examples/Others/Project/Info.txt +++ b/use-core/src/main/resources/examples/Others/Project/Info.txt @@ -1,13 +1,13 @@ -Example from exercises of the lecture -Object-oriented Software Design. - -This example equals /Documentation/Demo, but the -invariants are ordered differently. -In this example the constraints are defined in the -class definition. - -Project.use: -~Demo.use - -Project.cmd: -empty +Example from exercises of the lecture +Object-oriented Software Design. + +This example equals /Documentation/Demo, but the +invariants are ordered differently. +In this example the constraints are defined in the +class definition. + +Project.use: +~Demo.use + +Project.cmd: +empty diff --git a/use-core/src/main/resources/examples/Others/RecursiveOperations/Info.txt b/use-core/src/main/resources/examples/Others/RecursiveOperations/Info.txt index 68eb35ec4..f8ea6366b 100644 --- a/use-core/src/main/resources/examples/Others/RecursiveOperations/Info.txt +++ b/use-core/src/main/resources/examples/Others/RecursiveOperations/Info.txt @@ -1,11 +1,11 @@ -This example shows the use of two different recursive -operations. One of it does not terminate. -Like /Documentation/NestedOperationCalls the factorial -function is defined here, but without constraints. - -RecursiveOperations.use: -one class Rec with two operations - -RecursiveOperations.cmd: -one object is created -two operation calls with different arguments +This example shows the use of two different recursive +operations. One of it does not terminate. +Like /Documentation/NestedOperationCalls the factorial +function is defined here, but without constraints. + +RecursiveOperations.use: +one class Rec with two operations + +RecursiveOperations.cmd: +one object is created +two operation calls with different arguments diff --git a/use-core/src/main/resources/examples/Others/ReflexiveAssociation/Info.txt b/use-core/src/main/resources/examples/Others/ReflexiveAssociation/Info.txt index 237ba661e..ad9fc6986 100644 --- a/use-core/src/main/resources/examples/Others/ReflexiveAssociation/Info.txt +++ b/use-core/src/main/resources/examples/Others/ReflexiveAssociation/Info.txt @@ -1,12 +1,12 @@ -This example is the simple version of /Others/Person. -There are nodes and connections between them. -The role of a node can be parent or child. - -ReflexiveAssociation.use: -one class Node with one attribute num -one association - -ReflexiveAssociation.cmd: -creates two objects -both are connected with two links and changed roles -a third link connects an object with itself +This example is the simple version of /Others/Person. +There are nodes and connections between them. +The role of a node can be parent or child. + +ReflexiveAssociation.use: +one class Node with one attribute num +one association + +ReflexiveAssociation.cmd: +creates two objects +both are connected with two links and changed roles +a third link connects an object with itself diff --git a/use-core/src/main/resources/examples/Others/Student/Info.txt b/use-core/src/main/resources/examples/Others/Student/Info.txt index bdefbb68c..8b5ee33f7 100644 --- a/use-core/src/main/resources/examples/Others/Student/Info.txt +++ b/use-core/src/main/resources/examples/Others/Student/Info.txt @@ -1,10 +1,10 @@ -This example is a part of /Others/Job. -There are persons, students and employees with -generalization. - -Student.use: -three classes Person, Student (subclass of Person) -and Employee (subclass of Person) - -Student.cmd: -empty +This example is a part of /Others/Job. +There are persons, students and employees with +generalization. + +Student.use: +three classes Person, Student (subclass of Person) +and Employee (subclass of Person) + +Student.cmd: +empty diff --git a/use-core/src/main/resources/examples/Others/Sudoku/sudoku_lh_Result_V1_no_constraints.txt b/use-core/src/main/resources/examples/Others/Sudoku/sudoku_lh_Result_V1_no_constraints.txt index 8ec4ad8c4..850ef4a57 100644 --- a/use-core/src/main/resources/examples/Others/Sudoku/sudoku_lh_Result_V1_no_constraints.txt +++ b/use-core/src/main/resources/examples/Others/Sudoku/sudoku_lh_Result_V1_no_constraints.txt @@ -1,157 +1,157 @@ -(all c: one Column | one (BoardColumns . c)) ----OUTCOME--- -TRIVIALLY_SATISFIABLE - ----INSTANCE--- -relations: { - -Integer=[[I_1], [I_2], [I_3], [I_4], [I_5], [I_6], [I_7], [I_8], [I_9]], - -Board=[[board]], - -Row=[[Row1], [Row2], [Row3], [Row4], [Row5], [Row6], [Row7], [Row8], [Row9]], -Column=[[Column1], [Column2], [Column3], [Column4], [Column5], [Column6], [Column7], [Column8], [Column9]], -Square=[[Square1], [Square2], [Square3], [Square4], [Square5], [Square6], [Square7], [Square8], [Square9]], -Field=[[Field1], [Field2], [Field3], [Field4], [Field5], [Field6], [Field7], [Field8], [Field9], - [Field10], [Field11], [Field12], [Field13], [Field14], [Field15], [Field16], [Field17], [Field18], - [Field19], [Field20], [Field21], [Field22], [Field23], [Field24], [Field25], [Field26], [Field27], - [Field28], [Field29], [Field30], [Field31], [Field32], [Field33], [Field34], [Field35], [Field36], - [Field37], [Field38], [Field39], [Field40], [Field41], [Field42], [Field43], [Field44], [Field45], - [Field46], [Field47], [Field48], [Field49], [Field50], [Field51], [Field52], [Field53], [Field54], - [Field55], [Field56], [Field57], [Field58], [Field59], [Field60], [Field61], [Field62], [Field63], - [Field64], [Field65], [Field66], [Field67], [Field68], [Field69], [Field70], [Field71], [Field72], - [Field73], [Field74], [Field75], [Field76], [Field77], [Field78], [Field79], [Field80], [Field81]], - -BoardFields=[[board, Field1], [board, Field2], [board, Field3], - [board, Field4], [board, Field5], [board, Field6], - [board, Field7], [board, Field8], [board, Field9], - [board, Field10], [board, Field11], [board, Field12], - [board, Field13], [board, Field14], [board, Field15], - [board, Field16], [board, Field17], [board, Field18], - [board, Field19], [board, Field20], [board, Field21], - [board, Field22], [board, Field23], [board, Field24], - [board, Field25], [board, Field26], [board, Field27], - [board, Field28], [board, Field29], [board, Field30], - [board, Field31], [board, Field32], [board, Field33], - [board, Field34], [board, Field35], [board, Field36], - [board, Field37], [board, Field38], [board, Field39], - [board, Field40], [board, Field41], [board, Field42], - [board, Field43], [board, Field44], [board, Field45], - [board, Field46], [board, Field47], [board, Field48], - [board, Field49], [board, Field50], [board, Field51], - [board, Field52], [board, Field53], [board, Field54], - [board, Field55], [board, Field56], [board, Field57], - [board, Field58], [board, Field59], [board, Field60], - [board, Field61], [board, Field62], [board, Field63], - [board, Field64], [board, Field65], [board, Field66], - [board, Field67], [board, Field68], [board, Field69], - [board, Field70], [board, Field71], [board, Field72], - [board, Field73], [board, Field74], [board, Field75], - [board, Field76], [board, Field77], [board, Field78], - [board, Field79], [board, Field80], [board, Field81]], - -ColumnFields=[[Column1, Field1], [Column1, Field10], [Column1, Field19], - [Column1, Field28], [Column1, Field37], [Column1, Field46], - [Column1, Field55], [Column1, Field64], [Column1, Field73], - [Column2, Field2], [Column2, Field11], [Column2, Field20], - [Column2, Field29], [Column2, Field38], [Column2, Field47], - [Column2, Field56], [Column2, Field65], [Column2, Field74], - [Column3, Field3], [Column3, Field12], [Column3, Field21], - [Column3, Field30], [Column3, Field39], [Column3, Field48], - [Column3, Field57], [Column3, Field66], [Column3, Field75], - [Column4, Field4], [Column4, Field13], [Column4, Field22], - [Column4, Field31], [Column4, Field40], [Column4, Field49], - [Column4, Field58], [Column4, Field67], [Column4, Field76], - [Column5, Field5], [Column5, Field14], [Column5, Field23], - [Column5, Field32], [Column5, Field41], [Column5, Field50], - [Column5, Field59], [Column5, Field68], [Column5, Field77], - [Column6, Field6], [Column6, Field15], [Column6, Field24], - [Column6, Field33], [Column6, Field42], [Column6, Field51], - [Column6, Field60], [Column6, Field69], [Column6, Field78], - [Column7, Field7], [Column7, Field16], [Column7, Field25], - [Column7, Field34], [Column7, Field43], [Column7, Field52], - [Column7, Field61], [Column7, Field70], [Column7, Field79], - [Column8, Field8], [Column8, Field17], [Column8, Field26], - [Column8, Field35], [Column8, Field44], [Column8, Field53], - [Column8, Field62], [Column8, Field71], [Column8, Field80], - [Column9, Field9], [Column9, Field18], [Column9, Field27], - [Column9, Field36], [Column9, Field45], [Column9, Field54], - [Column9, Field63], [Column9, Field72], [Column9, Field81]], - -RowFields=[[Row1, Field1], [Row1, Field2], [Row1, Field3], - [Row1, Field4], [Row1, Field5], [Row1, Field6], - [Row1, Field7], [Row1, Field8], [Row1, Field9], - [Row2, Field10], [Row2, Field11], [Row2, Field12], - [Row2, Field13], [Row2, Field14], [Row2, Field15], - [Row2, Field16], [Row2, Field17], [Row2, Field18], - [Row3, Field19], [Row3, Field20], [Row3, Field21], - [Row3, Field22], [Row3, Field23], [Row3, Field24], - [Row3, Field25], [Row3, Field26], [Row3, Field27], - [Row4, Field28], [Row4, Field29], [Row4, Field30], - [Row4, Field31], [Row4, Field32], [Row4, Field33], - [Row4, Field34], [Row4, Field35], [Row4, Field36], - [Row5, Field37], [Row5, Field38], [Row5, Field39], - [Row5, Field40], [Row5, Field41], [Row5, Field42], - [Row5, Field43], [Row5, Field44], [Row5, Field45], - [Row6, Field46], [Row6, Field47], [Row6, Field48], - [Row6, Field49], [Row6, Field50], [Row6, Field51], - [Row6, Field52], [Row6, Field53], [Row6, Field54], - [Row7, Field55], [Row7, Field56], [Row7, Field57], - [Row7, Field58], [Row7, Field59], [Row7, Field60], - [Row7, Field61], [Row7, Field62], [Row7, Field63], - [Row8, Field64], [Row8, Field65], [Row8, Field66], - [Row8, Field67], [Row8, Field68], [Row8, Field69], - [Row8, Field70], [Row8, Field71], [Row8, Field72], - [Row9, Field73], [Row9, Field74], [Row9, Field75], - [Row9, Field76], [Row9, Field77], [Row9, Field78], - [Row9, Field79], [Row9, Field80], [Row9, Field81]], - -SquareFields=[[Square1, Field1], [Square1,Field2], [Square1, Field3], - [Square1, Field10], [Square1, Field11],[Square1, Field12], - [Square1, Field19], [Square1, Field20], [Square1,Field21], - [Square2, Field4], [Square2, Field5], [Square2, Field6], - [Square2, Field13], [Square2, Field14], [Square2, Field15], - [Square2,Field22], [Square2, Field23], [Square2, Field24], - [Square3, Field7],[Square3, Field8], [Square3, Field9], - [Square3, Field16], [Square3,Field17], [Square3, Field18], - [Square3, Field25], [Square3, Field26],[Square3, Field27], - [Square4, Field28], [Square4, Field29], [Square4,Field30], - [Square4, Field37], [Square4, Field38], [Square4, Field39], - [Square4, Field46], [Square4, Field47], [Square4, Field48], - [Square5,Field31], [Square5, Field32], [Square5, Field33], - [Square5, Field40],[Square5, Field41], [Square5, Field42], - [Square5, Field49], [Square5,Field50], [Square5, Field51], - [Square6, Field34], [Square6, Field35],[Square6, Field36], - [Square6, Field43], [Square6, Field44], [Square6,Field45], - [Square6, Field52], [Square6, Field53], [Square6, Field54], - [Square7, Field55], [Square7, Field56], [Square7, Field57], - [Square7,Field64], [Square7, Field65], [Square7, Field66], - [Square7, Field73],[Square7, Field74], [Square7, Field75], - [Square8, Field58], [Square8,Field59], [Square8, Field60], - [Square8, Field67], [Square8, Field68],[Square8, Field69], - [Square8, Field76], [Square8, Field77], [Square8,Field78], - [Square9, Field61], [Square9, Field62], [Square9, Field63], - [Square9, Field70], [Square9, Field71], [Square9, Field72], - [Square9,Field79], [Square9, Field80], [Square9, Field81]] - -BoardRows=[[board, Row1], [board, Row2], [board, Row3], - [board, Row4], [board, Row5], [board, Row6], - [board, Row7], [board, Row8], [board, Row9]], - -BoardColumns=[[board, Column1], [board, Column2], [board, Column3], - [board, Column4], [board, Column5], [board, Column6], - [board, Column7], [board, Column8], [board, Column9]], - -BoardSquares=[[board, Square1], [board, Square2], [board, Square3], [board, Square4], [board, Square5], [board, Square6], [board, Square7], [board, Square8], [board, Square9]], - - - -value=[], - -ints: [] - ----STATS--- -p cnf 0 0 -primary variables: 0 -translation time: 63 ms -solving time: 0 ms +(all c: one Column | one (BoardColumns . c)) +---OUTCOME--- +TRIVIALLY_SATISFIABLE + +---INSTANCE--- +relations: { + +Integer=[[I_1], [I_2], [I_3], [I_4], [I_5], [I_6], [I_7], [I_8], [I_9]], + +Board=[[board]], + +Row=[[Row1], [Row2], [Row3], [Row4], [Row5], [Row6], [Row7], [Row8], [Row9]], +Column=[[Column1], [Column2], [Column3], [Column4], [Column5], [Column6], [Column7], [Column8], [Column9]], +Square=[[Square1], [Square2], [Square3], [Square4], [Square5], [Square6], [Square7], [Square8], [Square9]], +Field=[[Field1], [Field2], [Field3], [Field4], [Field5], [Field6], [Field7], [Field8], [Field9], + [Field10], [Field11], [Field12], [Field13], [Field14], [Field15], [Field16], [Field17], [Field18], + [Field19], [Field20], [Field21], [Field22], [Field23], [Field24], [Field25], [Field26], [Field27], + [Field28], [Field29], [Field30], [Field31], [Field32], [Field33], [Field34], [Field35], [Field36], + [Field37], [Field38], [Field39], [Field40], [Field41], [Field42], [Field43], [Field44], [Field45], + [Field46], [Field47], [Field48], [Field49], [Field50], [Field51], [Field52], [Field53], [Field54], + [Field55], [Field56], [Field57], [Field58], [Field59], [Field60], [Field61], [Field62], [Field63], + [Field64], [Field65], [Field66], [Field67], [Field68], [Field69], [Field70], [Field71], [Field72], + [Field73], [Field74], [Field75], [Field76], [Field77], [Field78], [Field79], [Field80], [Field81]], + +BoardFields=[[board, Field1], [board, Field2], [board, Field3], + [board, Field4], [board, Field5], [board, Field6], + [board, Field7], [board, Field8], [board, Field9], + [board, Field10], [board, Field11], [board, Field12], + [board, Field13], [board, Field14], [board, Field15], + [board, Field16], [board, Field17], [board, Field18], + [board, Field19], [board, Field20], [board, Field21], + [board, Field22], [board, Field23], [board, Field24], + [board, Field25], [board, Field26], [board, Field27], + [board, Field28], [board, Field29], [board, Field30], + [board, Field31], [board, Field32], [board, Field33], + [board, Field34], [board, Field35], [board, Field36], + [board, Field37], [board, Field38], [board, Field39], + [board, Field40], [board, Field41], [board, Field42], + [board, Field43], [board, Field44], [board, Field45], + [board, Field46], [board, Field47], [board, Field48], + [board, Field49], [board, Field50], [board, Field51], + [board, Field52], [board, Field53], [board, Field54], + [board, Field55], [board, Field56], [board, Field57], + [board, Field58], [board, Field59], [board, Field60], + [board, Field61], [board, Field62], [board, Field63], + [board, Field64], [board, Field65], [board, Field66], + [board, Field67], [board, Field68], [board, Field69], + [board, Field70], [board, Field71], [board, Field72], + [board, Field73], [board, Field74], [board, Field75], + [board, Field76], [board, Field77], [board, Field78], + [board, Field79], [board, Field80], [board, Field81]], + +ColumnFields=[[Column1, Field1], [Column1, Field10], [Column1, Field19], + [Column1, Field28], [Column1, Field37], [Column1, Field46], + [Column1, Field55], [Column1, Field64], [Column1, Field73], + [Column2, Field2], [Column2, Field11], [Column2, Field20], + [Column2, Field29], [Column2, Field38], [Column2, Field47], + [Column2, Field56], [Column2, Field65], [Column2, Field74], + [Column3, Field3], [Column3, Field12], [Column3, Field21], + [Column3, Field30], [Column3, Field39], [Column3, Field48], + [Column3, Field57], [Column3, Field66], [Column3, Field75], + [Column4, Field4], [Column4, Field13], [Column4, Field22], + [Column4, Field31], [Column4, Field40], [Column4, Field49], + [Column4, Field58], [Column4, Field67], [Column4, Field76], + [Column5, Field5], [Column5, Field14], [Column5, Field23], + [Column5, Field32], [Column5, Field41], [Column5, Field50], + [Column5, Field59], [Column5, Field68], [Column5, Field77], + [Column6, Field6], [Column6, Field15], [Column6, Field24], + [Column6, Field33], [Column6, Field42], [Column6, Field51], + [Column6, Field60], [Column6, Field69], [Column6, Field78], + [Column7, Field7], [Column7, Field16], [Column7, Field25], + [Column7, Field34], [Column7, Field43], [Column7, Field52], + [Column7, Field61], [Column7, Field70], [Column7, Field79], + [Column8, Field8], [Column8, Field17], [Column8, Field26], + [Column8, Field35], [Column8, Field44], [Column8, Field53], + [Column8, Field62], [Column8, Field71], [Column8, Field80], + [Column9, Field9], [Column9, Field18], [Column9, Field27], + [Column9, Field36], [Column9, Field45], [Column9, Field54], + [Column9, Field63], [Column9, Field72], [Column9, Field81]], + +RowFields=[[Row1, Field1], [Row1, Field2], [Row1, Field3], + [Row1, Field4], [Row1, Field5], [Row1, Field6], + [Row1, Field7], [Row1, Field8], [Row1, Field9], + [Row2, Field10], [Row2, Field11], [Row2, Field12], + [Row2, Field13], [Row2, Field14], [Row2, Field15], + [Row2, Field16], [Row2, Field17], [Row2, Field18], + [Row3, Field19], [Row3, Field20], [Row3, Field21], + [Row3, Field22], [Row3, Field23], [Row3, Field24], + [Row3, Field25], [Row3, Field26], [Row3, Field27], + [Row4, Field28], [Row4, Field29], [Row4, Field30], + [Row4, Field31], [Row4, Field32], [Row4, Field33], + [Row4, Field34], [Row4, Field35], [Row4, Field36], + [Row5, Field37], [Row5, Field38], [Row5, Field39], + [Row5, Field40], [Row5, Field41], [Row5, Field42], + [Row5, Field43], [Row5, Field44], [Row5, Field45], + [Row6, Field46], [Row6, Field47], [Row6, Field48], + [Row6, Field49], [Row6, Field50], [Row6, Field51], + [Row6, Field52], [Row6, Field53], [Row6, Field54], + [Row7, Field55], [Row7, Field56], [Row7, Field57], + [Row7, Field58], [Row7, Field59], [Row7, Field60], + [Row7, Field61], [Row7, Field62], [Row7, Field63], + [Row8, Field64], [Row8, Field65], [Row8, Field66], + [Row8, Field67], [Row8, Field68], [Row8, Field69], + [Row8, Field70], [Row8, Field71], [Row8, Field72], + [Row9, Field73], [Row9, Field74], [Row9, Field75], + [Row9, Field76], [Row9, Field77], [Row9, Field78], + [Row9, Field79], [Row9, Field80], [Row9, Field81]], + +SquareFields=[[Square1, Field1], [Square1,Field2], [Square1, Field3], + [Square1, Field10], [Square1, Field11],[Square1, Field12], + [Square1, Field19], [Square1, Field20], [Square1,Field21], + [Square2, Field4], [Square2, Field5], [Square2, Field6], + [Square2, Field13], [Square2, Field14], [Square2, Field15], + [Square2,Field22], [Square2, Field23], [Square2, Field24], + [Square3, Field7],[Square3, Field8], [Square3, Field9], + [Square3, Field16], [Square3,Field17], [Square3, Field18], + [Square3, Field25], [Square3, Field26],[Square3, Field27], + [Square4, Field28], [Square4, Field29], [Square4,Field30], + [Square4, Field37], [Square4, Field38], [Square4, Field39], + [Square4, Field46], [Square4, Field47], [Square4, Field48], + [Square5,Field31], [Square5, Field32], [Square5, Field33], + [Square5, Field40],[Square5, Field41], [Square5, Field42], + [Square5, Field49], [Square5,Field50], [Square5, Field51], + [Square6, Field34], [Square6, Field35],[Square6, Field36], + [Square6, Field43], [Square6, Field44], [Square6,Field45], + [Square6, Field52], [Square6, Field53], [Square6, Field54], + [Square7, Field55], [Square7, Field56], [Square7, Field57], + [Square7,Field64], [Square7, Field65], [Square7, Field66], + [Square7, Field73],[Square7, Field74], [Square7, Field75], + [Square8, Field58], [Square8,Field59], [Square8, Field60], + [Square8, Field67], [Square8, Field68],[Square8, Field69], + [Square8, Field76], [Square8, Field77], [Square8,Field78], + [Square9, Field61], [Square9, Field62], [Square9, Field63], + [Square9, Field70], [Square9, Field71], [Square9, Field72], + [Square9,Field79], [Square9, Field80], [Square9, Field81]] + +BoardRows=[[board, Row1], [board, Row2], [board, Row3], + [board, Row4], [board, Row5], [board, Row6], + [board, Row7], [board, Row8], [board, Row9]], + +BoardColumns=[[board, Column1], [board, Column2], [board, Column3], + [board, Column4], [board, Column5], [board, Column6], + [board, Column7], [board, Column8], [board, Column9]], + +BoardSquares=[[board, Square1], [board, Square2], [board, Square3], [board, Square4], [board, Square5], [board, Square6], [board, Square7], [board, Square8], [board, Square9]], + + + +value=[], + +ints: [] + +---STATS--- +p cnf 0 0 +primary variables: 0 +translation time: 63 ms +solving time: 0 ms diff --git a/use-core/src/main/resources/examples/Others/Sudoku/sudoku_lh_Result_V2_valid_solution.txt b/use-core/src/main/resources/examples/Others/Sudoku/sudoku_lh_Result_V2_valid_solution.txt index ea201fde5..17820800e 100644 --- a/use-core/src/main/resources/examples/Others/Sudoku/sudoku_lh_Result_V2_valid_solution.txt +++ b/use-core/src/main/resources/examples/Others/Sudoku/sudoku_lh_Result_V2_valid_solution.txt @@ -1,30 +1,30 @@ -((((((((((((((((((((((((((((((((((all c: one Column | one (BoardColumns . c)) && (all f: one Field | one (BoardFields . f))) && (all r: one Row | one (BoardRows . r))) && (all s: one Square | one (BoardSquares . s))) && ((BoardColumns . univ) in Board)) && ((BoardFields . univ) in Board)) && ((BoardRows . univ) in Board)) && ((BoardSquares . univ) in Board)) && (all f: one Field | one (ColumnFields . f))) && (all b: one Board | (#((b . BoardColumns)) = 9))) && ((univ . BoardColumns) in Column)) && ((ColumnFields . univ) in Column)) && (all b: one Board | (#((b . BoardFields)) = 81))) && (all c: one Column | (#((c . ColumnFields)) = 9))) && (all r: one Row | (#((r . RowFields)) = 9))) && (all s: one Square | (#((s . SquareFields)) = 9))) && ((univ . BoardFields) in Field)) && ((univ . ColumnFields) in Field)) && ((univ . RowFields) in Field)) && ((univ . SquareFields) in Field)) && (all f: one Field | one (RowFields . f))) && (all b: one Board | (#((b . BoardRows)) = 9))) && ((univ . BoardRows) in Row)) && ((RowFields . univ) in Row)) && (all f: one Field | one (SquareFields . f))) && (all b: one Board | (#((b . BoardSquares)) = 9))) && ((univ . BoardSquares) in Square)) && ((SquareFields . univ) in Square)) && ((value . univ) in Field)) && ((univ . value) in Integer)) && (all f: one Field | one (f . value))) && (all r: one Row | (#({ f1: one (r . RowFields) | (#({ f2: one (r . RowFields) | (!(f1 = f2) => !((f1 . value) = (f2 . value))) }) = #((r . RowFields))) }) = #((r . RowFields))))) && (all c: one Column | (#({ f1: one (c . ColumnFields) | (#({ f2: one (c . ColumnFields) | (!(f1 = f2) => !((f1 . value) = (f2 . value))) }) = #((c . ColumnFields))) }) = #((c . ColumnFields))))) && (all s: one Square | (#({ f1: one (s . SquareFields) | (#({ f2: one (s . SquareFields) | (!(f1 = f2) => !((f1 . value) = (f2 . value))) }) = #((s . SquareFields))) }) = #((s . SquareFields))))) ----OUTCOME--- -SATISFIABLE - ----INSTANCE--- -relations: {Board=[[board]], - -value=[ - -[I_4], [I_3], [I_9], [I_8], [I_2], [I_5], [I_7], [I_1], [I_6], -[I_2], [I_5], [I_7], [I_6], [I_1], [I_3], [I_4], [I_8], [I_9], -[I_1], [I_6], [I_8], [I_7], [I_4], [I_9], [I_2], [I_3], [I_5], -[I_3], [I_2], [I_1], [I_5], [I_9], [I_7], [I_6], [I_4], [I_8], -[I_7], [I_9], [I_4], [I_2], [I_8], [I_6], [I_1], [I_5], [I_3], -[I_5], [I_8], [I_6], [I_4], [I_3], [I_1], [I_9], [I_7], [I_2], -[I_9], [I_4], [I_3], [I_1], [I_6], [I_8], [I_5], [I_2], [I_7], -[I_8], [I_7], [I_2], [I_9], [I_5], [I_4], [I_3], [I_6], [I_1], -[I_6], [I_1], [I_5], [I_3], [I_7], [I_2], [I_8], [I_9], [I_4]], - - -Integer=[[I_1], [I_2], [I_3], [I_4], [I_5], [I_6], [I_7], [I_8], [I_9]], Row=[[Row1], [Row2], [Row3], [Row4], [Row5], [Row6], [Row7], [Row8], [Row9]], Column=[[Column1], [Column2], [Column3], [Column4], [Column5], [Column6], [Column7], [Column8], [Column9]], Square=[[Square1], [Square2], [Square3], [Square4], [Square5], [Square6], [Square7], [Square8], [Square9]], Field=[[[[[[[[[[[Field10], [Field11], [Field12], [Field13], [Field14], [Field15], [Field16], [Field17], [Field18], [Field19], [Field20], [Field21], [Field22], [Field23], [Field24], [Field25], [Field26], [Field27], [Field28], [Field29], [Field30], [Field31], [Field32], [Field33], [Field34], [Field35], [Field36], [Field37], [Field38], [Field39], [Field40], [Field41], [Field42], [Field43], [Field44], [Field45], [Field46], [Field47], [Field48], [Field49], [Field50], [Field51], [Field52], [Field53], [Field54], [Field55], [Field56], [Field57], [Field58], [Field59], [Field60], [Field61], [Field62], [Field63], [Field64], [Field65], [Field66], [Field67], [Field68], [Field69], [Field70], [Field71], [Field72], [Field73], [Field74], [Field75], [Field76], [Field77], [Field78], [Field79], [Field80], [Field81]], BoardRows=[[board, Row1], [board, Row2], [board, Row3], [board, Row4], [board, Row5], [board, Row6], [board, Row7], [board, Row8], [board, Row9]], BoardColumns=[[board, Column1], [board, Column2], [board, Column3], [board, Column4], [board, Column5], [board, Column6], [board, Column7], [board, Column8], [board, Column9]], BoardSquares=[[board, Square1], [board, Square2], [board, Square3], [board, Square4], [board, Square5], [board, Square6], [board, Square7], [board, Square8], [board, Square9]], BoardFields=[[board, [board, [board, [board, [board, [board, [board, [board, [board, [board, Field10], [board, Field11], [board, Field12], [board, Field13], [board, Field14], [board, Field15], [board, Field16], [board, Field17], [board, Field18], [board, Field19], [board, Field20], [board, Field21], [board, Field22], [board, Field23], [board, Field24], [board, Field25], [board, Field26], [board, Field27], [board, Field28], [board, Field29], [board, Field30], [board, Field31], [board, Field32], [board, Field33], [board, Field34], [board, Field35], [board, Field36], [board, Field37], [board, Field38], [board, Field39], [board, Field40], [board, Field41], [board, Field42], [board, Field43], [board, Field44], [board, Field45], [board, Field46], [board, Field47], [board, Field48], [board, Field49], [board, Field50], [board, Field51], [board, Field52], [board, Field53], [board, Field54], [board, Field55], [board, Field56], [board, Field57], [board, Field58], [board, Field59], [board, Field60], [board, Field61], [board, Field62], [board, Field63], [board, Field64], [board, Field65], [board, Field66], [board, Field67], [board, Field68], [board, Field69], [board, Field70], [board, Field71], [board, Field72], [board, Field73], [board, Field74], [board, Field75], [board, Field76], [board, Field77], [board, Field78], [board, Field79], [board, Field80], [board, Field81]], ColumnFields=[[Column1, [Column1, Field10], [Column1, Field19], [Column1, Field28], [Column1, Field37], [Column1, Field46], [Column1, Field55], [Column1, Field64], [Column1, Field73], [Column2, [Column2, Field11], [Column2, Field20], [Column2, Field29], [Column2, Field38], [Column2, Field47], [Column2, Field56], [Column2, Field65], [Column2, Field74], [Column3, [Column3, Field12], [Column3, Field21], [Column3, Field30], [Column3, Field39], [Column3, Field48], [Column3, Field57], [Column3, Field66], [Column3, Field75], [Column4, [Column4, Field13], [Column4, Field22], [Column4, Field31], [Column4, Field40], [Column4, Field49], [Column4, Field58], [Column4, Field67], [Column4, Field76], [Column5, [Column5, Field14], [Column5, Field23], [Column5, Field32], [Column5, Field41], [Column5, Field50], [Column5, Field59], [Column5, Field68], [Column5, Field77], [Column6, [Column6, Field15], [Column6, Field24], [Column6, Field33], [Column6, Field42], [Column6, Field51], [Column6, Field60], [Column6, Field69], [Column6, Field78], [Column7, [Column7, Field16], [Column7, Field25], [Column7, Field34], [Column7, Field43], [Column7, Field52], [Column7, Field61], [Column7, Field70], [Column7, Field79], [Column8, [Column8, Field17], [Column8, Field26], [Column8, Field35], [Column8, Field44], [Column8, Field53], [Column8, Field62], [Column8, Field71], [Column8, Field80], [Column9, [Column9, Field18], [Column9, Field27], [Column9, Field36], [Column9, Field45], [Column9, Field54], [Column9, Field63], [Column9, Field72], [Column9, Field81]], RowFields=[[Row1, [Row1, [Row1, [Row1, [Row1, [Row1, [Row1, [Row1, [Row1, [Row2, Field10], [Row2, Field11], [Row2, Field12], [Row2, Field13], [Row2, Field14], [Row2, Field15], [Row2, Field16], [Row2, Field17], [Row2, Field18], [Row3, Field19], [Row3, Field20], [Row3, Field21], [Row3, Field22], [Row3, Field23], [Row3, Field24], [Row3, Field25], [Row3, Field26], [Row3, Field27], [Row4, Field28], [Row4, Field29], [Row4, Field30], [Row4, Field31], [Row4, Field32], [Row4, Field33], [Row4, Field34], [Row4, Field35], [Row4, Field36], [Row5, Field37], [Row5, Field38], [Row5, Field39], [Row5, Field40], [Row5, Field41], [Row5, Field42], [Row5, Field43], [Row5, Field44], [Row5, Field45], [Row6, Field46], [Row6, Field47], [Row6, Field48], [Row6, Field49], [Row6, Field50], [Row6, Field51], [Row6, Field52], [Row6, Field53], [Row6, Field54], [Row7, Field55], [Row7, Field56], [Row7, Field57], [Row7, Field58], [Row7, Field59], [Row7, Field60], [Row7, Field61], [Row7, Field62], [Row7, Field63], [Row8, Field64], [Row8, Field65], [Row8, Field66], [Row8, Field67], [Row8, Field68], [Row8, Field69], [Row8, Field70], [Row8, Field71], [Row8, Field72], [Row9, Field73], [Row9, Field74], [Row9, Field75], [Row9, Field76], [Row9, Field77], [Row9, Field78], [Row9, Field79], [Row9, Field80], [Row9, Field81]], SquareFields=[[Square1, [Square1, [Square1, [Square1, Field10], [Square1, Field11], [Square1, Field12], [Square1, Field19], [Square1, Field20], [Square1, Field21], [Square2, [Square2, [Square2, [Square2, Field13], [Square2, Field14], [Square2, Field15], [Square2, Field22], [Square2, Field23], [Square2, Field24], [Square3, [Square3, [Square3, [Square3, Field16], [Square3, Field17], [Square3, Field18], [Square3, Field25], [Square3, Field26], [Square3, Field27], [Square4, Field28], [Square4, Field29], [Square4, Field30], [Square4, Field37], [Square4, Field38], [Square4, Field39], [Square4, Field46], [Square4, Field47], [Square4, Field48], [Square5, Field31], [Square5, Field32], [Square5, Field33], [Square5, Field40], [Square5, Field41], [Square5, Field42], [Square5, Field49], [Square5, Field50], [Square5, Field51], [Square6, Field34], [Square6, Field35], [Square6, Field36], [Square6, Field43], [Square6, Field44], [Square6, Field45], [Square6, Field52], [Square6, Field53], [Square6, Field54], [Square7, Field55], [Square7, Field56], [Square7, Field57], [Square7, Field64], [Square7, Field65], [Square7, Field66], [Square7, Field73], [Square7, Field74], [Square7, Field75], [Square8, Field58], [Square8, Field59], [Square8, Field60], [Square8, Field67], [Square8, Field68], [Square8, Field69], [Square8, Field76], [Square8, Field77], [Square8, Field78], [Square9, Field61], [Square9, Field62], [Square9, Field63], [Square9, Field70], [Square9, Field71], [Square9, Field72], [Square9, Field79], [Square9, Field80], [Square9, Field81]]} - - -ints: [] - ----STATS--- -p cnf 227878 858581 -primary variables: 13892 -translation time: 27097 ms -solving time: 827 ms +((((((((((((((((((((((((((((((((((all c: one Column | one (BoardColumns . c)) && (all f: one Field | one (BoardFields . f))) && (all r: one Row | one (BoardRows . r))) && (all s: one Square | one (BoardSquares . s))) && ((BoardColumns . univ) in Board)) && ((BoardFields . univ) in Board)) && ((BoardRows . univ) in Board)) && ((BoardSquares . univ) in Board)) && (all f: one Field | one (ColumnFields . f))) && (all b: one Board | (#((b . BoardColumns)) = 9))) && ((univ . BoardColumns) in Column)) && ((ColumnFields . univ) in Column)) && (all b: one Board | (#((b . BoardFields)) = 81))) && (all c: one Column | (#((c . ColumnFields)) = 9))) && (all r: one Row | (#((r . RowFields)) = 9))) && (all s: one Square | (#((s . SquareFields)) = 9))) && ((univ . BoardFields) in Field)) && ((univ . ColumnFields) in Field)) && ((univ . RowFields) in Field)) && ((univ . SquareFields) in Field)) && (all f: one Field | one (RowFields . f))) && (all b: one Board | (#((b . BoardRows)) = 9))) && ((univ . BoardRows) in Row)) && ((RowFields . univ) in Row)) && (all f: one Field | one (SquareFields . f))) && (all b: one Board | (#((b . BoardSquares)) = 9))) && ((univ . BoardSquares) in Square)) && ((SquareFields . univ) in Square)) && ((value . univ) in Field)) && ((univ . value) in Integer)) && (all f: one Field | one (f . value))) && (all r: one Row | (#({ f1: one (r . RowFields) | (#({ f2: one (r . RowFields) | (!(f1 = f2) => !((f1 . value) = (f2 . value))) }) = #((r . RowFields))) }) = #((r . RowFields))))) && (all c: one Column | (#({ f1: one (c . ColumnFields) | (#({ f2: one (c . ColumnFields) | (!(f1 = f2) => !((f1 . value) = (f2 . value))) }) = #((c . ColumnFields))) }) = #((c . ColumnFields))))) && (all s: one Square | (#({ f1: one (s . SquareFields) | (#({ f2: one (s . SquareFields) | (!(f1 = f2) => !((f1 . value) = (f2 . value))) }) = #((s . SquareFields))) }) = #((s . SquareFields))))) +---OUTCOME--- +SATISFIABLE + +---INSTANCE--- +relations: {Board=[[board]], + +value=[ + +[I_4], [I_3], [I_9], [I_8], [I_2], [I_5], [I_7], [I_1], [I_6], +[I_2], [I_5], [I_7], [I_6], [I_1], [I_3], [I_4], [I_8], [I_9], +[I_1], [I_6], [I_8], [I_7], [I_4], [I_9], [I_2], [I_3], [I_5], +[I_3], [I_2], [I_1], [I_5], [I_9], [I_7], [I_6], [I_4], [I_8], +[I_7], [I_9], [I_4], [I_2], [I_8], [I_6], [I_1], [I_5], [I_3], +[I_5], [I_8], [I_6], [I_4], [I_3], [I_1], [I_9], [I_7], [I_2], +[I_9], [I_4], [I_3], [I_1], [I_6], [I_8], [I_5], [I_2], [I_7], +[I_8], [I_7], [I_2], [I_9], [I_5], [I_4], [I_3], [I_6], [I_1], +[I_6], [I_1], [I_5], [I_3], [I_7], [I_2], [I_8], [I_9], [I_4]], + + +Integer=[[I_1], [I_2], [I_3], [I_4], [I_5], [I_6], [I_7], [I_8], [I_9]], Row=[[Row1], [Row2], [Row3], [Row4], [Row5], [Row6], [Row7], [Row8], [Row9]], Column=[[Column1], [Column2], [Column3], [Column4], [Column5], [Column6], [Column7], [Column8], [Column9]], Square=[[Square1], [Square2], [Square3], [Square4], [Square5], [Square6], [Square7], [Square8], [Square9]], Field=[[[[[[[[[[[Field10], [Field11], [Field12], [Field13], [Field14], [Field15], [Field16], [Field17], [Field18], [Field19], [Field20], [Field21], [Field22], [Field23], [Field24], [Field25], [Field26], [Field27], [Field28], [Field29], [Field30], [Field31], [Field32], [Field33], [Field34], [Field35], [Field36], [Field37], [Field38], [Field39], [Field40], [Field41], [Field42], [Field43], [Field44], [Field45], [Field46], [Field47], [Field48], [Field49], [Field50], [Field51], [Field52], [Field53], [Field54], [Field55], [Field56], [Field57], [Field58], [Field59], [Field60], [Field61], [Field62], [Field63], [Field64], [Field65], [Field66], [Field67], [Field68], [Field69], [Field70], [Field71], [Field72], [Field73], [Field74], [Field75], [Field76], [Field77], [Field78], [Field79], [Field80], [Field81]], BoardRows=[[board, Row1], [board, Row2], [board, Row3], [board, Row4], [board, Row5], [board, Row6], [board, Row7], [board, Row8], [board, Row9]], BoardColumns=[[board, Column1], [board, Column2], [board, Column3], [board, Column4], [board, Column5], [board, Column6], [board, Column7], [board, Column8], [board, Column9]], BoardSquares=[[board, Square1], [board, Square2], [board, Square3], [board, Square4], [board, Square5], [board, Square6], [board, Square7], [board, Square8], [board, Square9]], BoardFields=[[board, [board, [board, [board, [board, [board, [board, [board, [board, [board, Field10], [board, Field11], [board, Field12], [board, Field13], [board, Field14], [board, Field15], [board, Field16], [board, Field17], [board, Field18], [board, Field19], [board, Field20], [board, Field21], [board, Field22], [board, Field23], [board, Field24], [board, Field25], [board, Field26], [board, Field27], [board, Field28], [board, Field29], [board, Field30], [board, Field31], [board, Field32], [board, Field33], [board, Field34], [board, Field35], [board, Field36], [board, Field37], [board, Field38], [board, Field39], [board, Field40], [board, Field41], [board, Field42], [board, Field43], [board, Field44], [board, Field45], [board, Field46], [board, Field47], [board, Field48], [board, Field49], [board, Field50], [board, Field51], [board, Field52], [board, Field53], [board, Field54], [board, Field55], [board, Field56], [board, Field57], [board, Field58], [board, Field59], [board, Field60], [board, Field61], [board, Field62], [board, Field63], [board, Field64], [board, Field65], [board, Field66], [board, Field67], [board, Field68], [board, Field69], [board, Field70], [board, Field71], [board, Field72], [board, Field73], [board, Field74], [board, Field75], [board, Field76], [board, Field77], [board, Field78], [board, Field79], [board, Field80], [board, Field81]], ColumnFields=[[Column1, [Column1, Field10], [Column1, Field19], [Column1, Field28], [Column1, Field37], [Column1, Field46], [Column1, Field55], [Column1, Field64], [Column1, Field73], [Column2, [Column2, Field11], [Column2, Field20], [Column2, Field29], [Column2, Field38], [Column2, Field47], [Column2, Field56], [Column2, Field65], [Column2, Field74], [Column3, [Column3, Field12], [Column3, Field21], [Column3, Field30], [Column3, Field39], [Column3, Field48], [Column3, Field57], [Column3, Field66], [Column3, Field75], [Column4, [Column4, Field13], [Column4, Field22], [Column4, Field31], [Column4, Field40], [Column4, Field49], [Column4, Field58], [Column4, Field67], [Column4, Field76], [Column5, [Column5, Field14], [Column5, Field23], [Column5, Field32], [Column5, Field41], [Column5, Field50], [Column5, Field59], [Column5, Field68], [Column5, Field77], [Column6, [Column6, Field15], [Column6, Field24], [Column6, Field33], [Column6, Field42], [Column6, Field51], [Column6, Field60], [Column6, Field69], [Column6, Field78], [Column7, [Column7, Field16], [Column7, Field25], [Column7, Field34], [Column7, Field43], [Column7, Field52], [Column7, Field61], [Column7, Field70], [Column7, Field79], [Column8, [Column8, Field17], [Column8, Field26], [Column8, Field35], [Column8, Field44], [Column8, Field53], [Column8, Field62], [Column8, Field71], [Column8, Field80], [Column9, [Column9, Field18], [Column9, Field27], [Column9, Field36], [Column9, Field45], [Column9, Field54], [Column9, Field63], [Column9, Field72], [Column9, Field81]], RowFields=[[Row1, [Row1, [Row1, [Row1, [Row1, [Row1, [Row1, [Row1, [Row1, [Row2, Field10], [Row2, Field11], [Row2, Field12], [Row2, Field13], [Row2, Field14], [Row2, Field15], [Row2, Field16], [Row2, Field17], [Row2, Field18], [Row3, Field19], [Row3, Field20], [Row3, Field21], [Row3, Field22], [Row3, Field23], [Row3, Field24], [Row3, Field25], [Row3, Field26], [Row3, Field27], [Row4, Field28], [Row4, Field29], [Row4, Field30], [Row4, Field31], [Row4, Field32], [Row4, Field33], [Row4, Field34], [Row4, Field35], [Row4, Field36], [Row5, Field37], [Row5, Field38], [Row5, Field39], [Row5, Field40], [Row5, Field41], [Row5, Field42], [Row5, Field43], [Row5, Field44], [Row5, Field45], [Row6, Field46], [Row6, Field47], [Row6, Field48], [Row6, Field49], [Row6, Field50], [Row6, Field51], [Row6, Field52], [Row6, Field53], [Row6, Field54], [Row7, Field55], [Row7, Field56], [Row7, Field57], [Row7, Field58], [Row7, Field59], [Row7, Field60], [Row7, Field61], [Row7, Field62], [Row7, Field63], [Row8, Field64], [Row8, Field65], [Row8, Field66], [Row8, Field67], [Row8, Field68], [Row8, Field69], [Row8, Field70], [Row8, Field71], [Row8, Field72], [Row9, Field73], [Row9, Field74], [Row9, Field75], [Row9, Field76], [Row9, Field77], [Row9, Field78], [Row9, Field79], [Row9, Field80], [Row9, Field81]], SquareFields=[[Square1, [Square1, [Square1, [Square1, Field10], [Square1, Field11], [Square1, Field12], [Square1, Field19], [Square1, Field20], [Square1, Field21], [Square2, [Square2, [Square2, [Square2, Field13], [Square2, Field14], [Square2, Field15], [Square2, Field22], [Square2, Field23], [Square2, Field24], [Square3, [Square3, [Square3, [Square3, Field16], [Square3, Field17], [Square3, Field18], [Square3, Field25], [Square3, Field26], [Square3, Field27], [Square4, Field28], [Square4, Field29], [Square4, Field30], [Square4, Field37], [Square4, Field38], [Square4, Field39], [Square4, Field46], [Square4, Field47], [Square4, Field48], [Square5, Field31], [Square5, Field32], [Square5, Field33], [Square5, Field40], [Square5, Field41], [Square5, Field42], [Square5, Field49], [Square5, Field50], [Square5, Field51], [Square6, Field34], [Square6, Field35], [Square6, Field36], [Square6, Field43], [Square6, Field44], [Square6, Field45], [Square6, Field52], [Square6, Field53], [Square6, Field54], [Square7, Field55], [Square7, Field56], [Square7, Field57], [Square7, Field64], [Square7, Field65], [Square7, Field66], [Square7, Field73], [Square7, Field74], [Square7, Field75], [Square8, Field58], [Square8, Field59], [Square8, Field60], [Square8, Field67], [Square8, Field68], [Square8, Field69], [Square8, Field76], [Square8, Field77], [Square8, Field78], [Square9, Field61], [Square9, Field62], [Square9, Field63], [Square9, Field70], [Square9, Field71], [Square9, Field72], [Square9, Field79], [Square9, Field80], [Square9, Field81]]} + + +ints: [] + +---STATS--- +p cnf 227878 858581 +primary variables: 13892 +translation time: 27097 ms +solving time: 827 ms diff --git a/use-core/src/main/resources/examples/Others/SwapLinks/Info.txt b/use-core/src/main/resources/examples/Others/SwapLinks/Info.txt index 710c35f5d..9dda14dc6 100644 --- a/use-core/src/main/resources/examples/Others/SwapLinks/Info.txt +++ b/use-core/src/main/resources/examples/Others/SwapLinks/Info.txt @@ -1,23 +1,23 @@ -This model contains two classes A and B with -associations R1 and R2 between them. -The operation swap_b swaps the two R1 and R2 links -for an A object. The expected state resulting from the -operation is asserted by a postcondition. -The command file uses features introduced in -USE 2.1.0: note the expressions in the insert and -delete commands, and the new let command. - -SwapLinks.use: -two classes A (with one Operation) and B -two associations between A and B -one object of type A has to be connected with -exactly one object of type B for each association -pre- and postconditions for the operation - -SwapLinks.cmd: -two objects of type B and one Object a of type A -are created -a is connected with the other objects -with two links from the different associations -then the operation is called and the objects -swap (let is used) +This model contains two classes A and B with +associations R1 and R2 between them. +The operation swap_b swaps the two R1 and R2 links +for an A object. The expected state resulting from the +operation is asserted by a postcondition. +The command file uses features introduced in +USE 2.1.0: note the expressions in the insert and +delete commands, and the new let command. + +SwapLinks.use: +two classes A (with one Operation) and B +two associations between A and B +one object of type A has to be connected with +exactly one object of type B for each association +pre- and postconditions for the operation + +SwapLinks.cmd: +two objects of type B and one Object a of type A +are created +a is connected with the other objects +with two links from the different associations +then the operation is called and the objects +swap (let is used) diff --git a/use-core/src/main/resources/examples/Others/Test/Info.txt b/use-core/src/main/resources/examples/Others/Test/Info.txt index 4d55253a3..0df235d4e 100644 --- a/use-core/src/main/resources/examples/Others/Test/Info.txt +++ b/use-core/src/main/resources/examples/Others/Test/Info.txt @@ -1,6 +1,6 @@ -This test file was automatically generated. -It contains 50 classes and 2450 (= 50 * 49) -associations connecting each class with each other. - -Test.cmd: +This test file was automatically generated. +It contains 50 classes and 2450 (= 50 * 49) +associations connecting each class with each other. + +Test.cmd: empty \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Others/Tree/Info.txt b/use-core/src/main/resources/examples/Others/Tree/Info.txt index c26b6bbec..3bacd629a 100644 --- a/use-core/src/main/resources/examples/Others/Tree/Info.txt +++ b/use-core/src/main/resources/examples/Others/Tree/Info.txt @@ -1,35 +1,35 @@ -Trees can be created with this model. -There is a class, which represents the nodes of a tree. -A link of the association Parentship can be created -between two nodes. -A parent may have several children -but only one parent or no parent, -if it is the root node. - -Tree.use: -one class TreeNode -one association Parantship -one invariant (does not allow cycles) -four complex operations: - - childPlus1 (recursive) returns all objects - the calling object is connected with (transitive). - The union of sets, collect and flatten is used. - Does not terminate if there are cycles in the graph. - - childPlus2 like childPlus2; it uses the operation - childPlusOnNodeSet - - childPlusOnNodeSet (recursive) collects all - objects the objects in the set (argument) - are connected with (transitive) and checks for all - elements if all directly connected children are - also element of the set (termination condition). - With this check, cycles are no problem. - - childPlus3 can handle cycles - because the search depth equals the maximum depth - of the tree. - -Tree.cmd: -creates a graph with cycles - -Tree2.cmd: -creates a graph with two nodes -the invariant evaluates to false +Trees can be created with this model. +There is a class, which represents the nodes of a tree. +A link of the association Parentship can be created +between two nodes. +A parent may have several children +but only one parent or no parent, +if it is the root node. + +Tree.use: +one class TreeNode +one association Parantship +one invariant (does not allow cycles) +four complex operations: + - childPlus1 (recursive) returns all objects + the calling object is connected with (transitive). + The union of sets, collect and flatten is used. + Does not terminate if there are cycles in the graph. + - childPlus2 like childPlus2; it uses the operation + childPlusOnNodeSet + - childPlusOnNodeSet (recursive) collects all + objects the objects in the set (argument) + are connected with (transitive) and checks for all + elements if all directly connected children are + also element of the set (termination condition). + With this check, cycles are no problem. + - childPlus3 can handle cycles + because the search depth equals the maximum depth + of the tree. + +Tree.cmd: +creates a graph with cycles + +Tree2.cmd: +creates a graph with two nodes +the invariant evaluates to false diff --git a/use-core/src/main/resources/examples/Papers/1998/RichtersAndGogolla/Info.txt b/use-core/src/main/resources/examples/Papers/1998/RichtersAndGogolla/Info.txt index 16a5b4283..fca777a9c 100644 --- a/use-core/src/main/resources/examples/Papers/1998/RichtersAndGogolla/Info.txt +++ b/use-core/src/main/resources/examples/Papers/1998/RichtersAndGogolla/Info.txt @@ -1,22 +1,22 @@ -An example with generalization. There are -vehicles (abstract class) and cars resp. motorcycles -(subclasses). -Vehicles belong to companies, which -have a branch RentalStation (aggregation). -Persons work for rental stations or manage them. - -The example corresponds to the paper: -Mark Richters and Martin Gogolla, -"On Formalizing the UML Object Constraint Language OCL", -Figure 1 - -CarRental.use: -six classes Company, RentalStation, Person, -Vehicle (abstract class), Car, Motorcycle -with generalization -attributes and queries -four associations Owns, hasBranch (aggregation), -managedBy, WorksFor and some explicit role names - -CarRental.cmd: -empty +An example with generalization. There are +vehicles (abstract class) and cars resp. motorcycles +(subclasses). +Vehicles belong to companies, which +have a branch RentalStation (aggregation). +Persons work for rental stations or manage them. + +The example corresponds to the paper: +Mark Richters and Martin Gogolla, +"On Formalizing the UML Object Constraint Language OCL", +Figure 1 + +CarRental.use: +six classes Company, RentalStation, Person, +Vehicle (abstract class), Car, Motorcycle +with generalization +attributes and queries +four associations Owns, hasBranch (aggregation), +managedBy, WorksFor and some explicit role names + +CarRental.cmd: +empty diff --git a/use-core/src/main/resources/examples/Papers/1998/WarmerAndKleppe/Info.txt b/use-core/src/main/resources/examples/Papers/1998/WarmerAndKleppe/Info.txt index 2a115590b..204b8f288 100644 --- a/use-core/src/main/resources/examples/Papers/1998/WarmerAndKleppe/Info.txt +++ b/use-core/src/main/resources/examples/Papers/1998/WarmerAndKleppe/Info.txt @@ -1,12 +1,12 @@ -Modeled after an example taken from: -Jos Warmer and Anneke Kleppe, -"The Object Constraint Language: -Precise Modeling with UML", Addison-Wesley, 1998. (p. 12) - -RoyalAndLoyal.use: -several classes and attributes -no operations and constraints -several associations - -RoyalAndLoyal.cmd: -empty +Modeled after an example taken from: +Jos Warmer and Anneke Kleppe, +"The Object Constraint Language: +Precise Modeling with UML", Addison-Wesley, 1998. (p. 12) + +RoyalAndLoyal.use: +several classes and attributes +no operations and constraints +several associations + +RoyalAndLoyal.cmd: +empty diff --git a/use-core/src/main/resources/examples/Papers/1999/RichtersAndGogolla/Info.txt b/use-core/src/main/resources/examples/Papers/1999/RichtersAndGogolla/Info.txt index 19d8775c9..c2f26661d 100644 --- a/use-core/src/main/resources/examples/Papers/1999/RichtersAndGogolla/Info.txt +++ b/use-core/src/main/resources/examples/Papers/1999/RichtersAndGogolla/Info.txt @@ -1,12 +1,12 @@ -This example corresponds to Fig. 4 Metamodel -for OCL Types in "A Metamodel for OCL" - -see also: Phd thesis of Mark Richters -Figure 6.5 - -OCLmetamodel.use: -contains a class with generalization and associations -for each OCL type - -OCLmetamodel.cmd: +This example corresponds to Fig. 4 Metamodel +for OCL Types in "A Metamodel for OCL" + +see also: Phd thesis of Mark Richters +Figure 6.5 + +OCLmetamodel.use: +contains a class with generalization and associations +for each OCL type + +OCLmetamodel.cmd: empty \ No newline at end of file diff --git a/use-core/src/main/resources/examples/Papers/2001/RichtersPhDThesis/EmployeeExtended/Info.txt b/use-core/src/main/resources/examples/Papers/2001/RichtersPhDThesis/EmployeeExtended/Info.txt index 6f754dd5f..4c4fe17f2 100644 --- a/use-core/src/main/resources/examples/Papers/2001/RichtersPhDThesis/EmployeeExtended/Info.txt +++ b/use-core/src/main/resources/examples/Papers/2001/RichtersPhDThesis/EmployeeExtended/Info.txt @@ -1,23 +1,23 @@ -This example corresponds to -the case study of Mark Richters in his PhD Thesis: -"A Precise Approach to Validating UML Models and OCL -Constraints" - -EmployeeExtended.use: -Classes from /Others/Ex/Ex.use -Person renamed into Employee -Employee extended by attribute age : Integer -Employee extended by operation raiseSalary from -/Documentation/Employee.use -Invariants from /Others/Ex/Ex.use -Constraint for raiseSalary from Employee, extended -by the postcondition amount > 0 and changed -from rate to amount - -EmployeeExtended.cmd: -==EmployeeExtended0.cmd,EmployeeExtended1.cmd, -EmployeeExtended2.cmd,EmployeeExtended3.cmd, -EmployeeExtended4.cmd,EmployeeExtendedRaiseSalary.cmd - -Builds up on /Others/Ex/Ex.cmd and is extended -by an operation call from /Documentation/Employee.cmd +This example corresponds to +the case study of Mark Richters in his PhD Thesis: +"A Precise Approach to Validating UML Models and OCL +Constraints" + +EmployeeExtended.use: +Classes from /Others/Ex/Ex.use +Person renamed into Employee +Employee extended by attribute age : Integer +Employee extended by operation raiseSalary from +/Documentation/Employee.use +Invariants from /Others/Ex/Ex.use +Constraint for raiseSalary from Employee, extended +by the postcondition amount > 0 and changed +from rate to amount + +EmployeeExtended.cmd: +==EmployeeExtended0.cmd,EmployeeExtended1.cmd, +EmployeeExtended2.cmd,EmployeeExtended3.cmd, +EmployeeExtended4.cmd,EmployeeExtendedRaiseSalary.cmd + +Builds up on /Others/Ex/Ex.cmd and is extended +by an operation call from /Documentation/Employee.cmd diff --git a/use-core/src/main/resources/examples/Papers/2005/GogollaBohlingRichters/info.txt b/use-core/src/main/resources/examples/Papers/2005/GogollaBohlingRichters/info.txt index 1de4afd0a..51c540a5f 100644 --- a/use-core/src/main/resources/examples/Papers/2005/GogollaBohlingRichters/info.txt +++ b/use-core/src/main/resources/examples/Papers/2005/GogollaBohlingRichters/info.txt @@ -1,39 +1,39 @@ -bossBossBetterPaidThanWorker.invs bossBoss better paid than worker invariant -companyHasEmployee.invs company has employee invariant -hierarchyBinTree.ins hierarchy is binary tree (worker size =0 or =2) -jobsAtMost.invs person has at most 2 jobs invariant -percom-1.cmd 7 persons, 1 company, 7 jobs, 6 BossWorker -percom-130.cmd 10 persons, 26 company, 130 jobs, 120 BossWorker -percom-2.cmd 4 persons, 1 company, 4 jobs, 3 BossWorker -percom-3.cmd twoRoleTC (2 persons, 3 company, 6 jobs, 4 BossWorker) -percom-3b.cmd 3 persons, 2 company, 5 jobs, 3 BossWorker -percom-3c.cmd 2 persons, 3 company, 2 jobs, 2 BossWorker -percom-3d.cmd 26 persons, 7 company, 182 jobs, 175 BossWorker / no success -percom-3e.cmd 26 persons, 4 company, 28 jobs, 24 BossWorker -percom-4.cmd 4 persons, 3 company, 8 jobs, 5 BossWorker -percom-5.cmd twoBossesTC (7 persons, 1 company, 7 jobs, 6 BossWorker) -percom-5b.cmd 7 persons, 1 company, 7 jobs, genBW2 -percom-5c.cmd 8 persons, 1 company, 8 jobs, 7 BossWorker -percom-6.cmd genPersons versus genPersonsNaive -percom-7.cmd bossBossVC (3 persons, 1 company, 3 jobs, bB better paid) -percom-8.cmd generatePersonWith2Jobs[0|1]Companies -percom-9.cmd generatePersonWith3Jobs[0|1|2]Companies -percom-10.cmd generate binary tree hierarchy -percom-10-X.cmd generated by 10.cmd (7P,1C,7J,6BW) -percom-10-X.olt layout for percom-10-X.cmd -percom-11.cmd attempt to automatically calculate reject from invs -percom-12.cmd realistic snapshot (15P, 3C, 18J, 15BW) -percom-13.cmd chain snapshot (7P, 1C, 7J, 6BW) -percom-14.cmd 'bohling' snapshot -percom.assl assl file -percom.use use file -personEmployeeInverseCompEmployer.invs invariant following from operation definition (VC ToDo) -personWith2JobsIn0Or1Company.invs invariant not satisfiable -personWith3JobsIn0Or1Or2Companies.invs invariant not satisfiable -threeLevelHierarchy.cmd three level hierarchy query -threeLevelHierarchy.invs three level hierarchy invariant -twoBossesWithDisjointWorkers.cmd two bosses with existing disjoint workers query -twoBossesWithDisjointWorkers.invs two bosses with existing disjoint workers invariant -twoBossesWithDisjointWorkers2.invs two bosses with 2 disjoint workers invariant -twoRoleEmployee.cmd two role employee query -twoRoleEmployee.invs two role employee invariant +bossBossBetterPaidThanWorker.invs bossBoss better paid than worker invariant +companyHasEmployee.invs company has employee invariant +hierarchyBinTree.ins hierarchy is binary tree (worker size =0 or =2) +jobsAtMost.invs person has at most 2 jobs invariant +percom-1.cmd 7 persons, 1 company, 7 jobs, 6 BossWorker +percom-130.cmd 10 persons, 26 company, 130 jobs, 120 BossWorker +percom-2.cmd 4 persons, 1 company, 4 jobs, 3 BossWorker +percom-3.cmd twoRoleTC (2 persons, 3 company, 6 jobs, 4 BossWorker) +percom-3b.cmd 3 persons, 2 company, 5 jobs, 3 BossWorker +percom-3c.cmd 2 persons, 3 company, 2 jobs, 2 BossWorker +percom-3d.cmd 26 persons, 7 company, 182 jobs, 175 BossWorker / no success +percom-3e.cmd 26 persons, 4 company, 28 jobs, 24 BossWorker +percom-4.cmd 4 persons, 3 company, 8 jobs, 5 BossWorker +percom-5.cmd twoBossesTC (7 persons, 1 company, 7 jobs, 6 BossWorker) +percom-5b.cmd 7 persons, 1 company, 7 jobs, genBW2 +percom-5c.cmd 8 persons, 1 company, 8 jobs, 7 BossWorker +percom-6.cmd genPersons versus genPersonsNaive +percom-7.cmd bossBossVC (3 persons, 1 company, 3 jobs, bB better paid) +percom-8.cmd generatePersonWith2Jobs[0|1]Companies +percom-9.cmd generatePersonWith3Jobs[0|1|2]Companies +percom-10.cmd generate binary tree hierarchy +percom-10-X.cmd generated by 10.cmd (7P,1C,7J,6BW) +percom-10-X.olt layout for percom-10-X.cmd +percom-11.cmd attempt to automatically calculate reject from invs +percom-12.cmd realistic snapshot (15P, 3C, 18J, 15BW) +percom-13.cmd chain snapshot (7P, 1C, 7J, 6BW) +percom-14.cmd 'bohling' snapshot +percom.assl assl file +percom.use use file +personEmployeeInverseCompEmployer.invs invariant following from operation definition (VC ToDo) +personWith2JobsIn0Or1Company.invs invariant not satisfiable +personWith3JobsIn0Or1Or2Companies.invs invariant not satisfiable +threeLevelHierarchy.cmd three level hierarchy query +threeLevelHierarchy.invs three level hierarchy invariant +twoBossesWithDisjointWorkers.cmd two bosses with existing disjoint workers query +twoBossesWithDisjointWorkers.invs two bosses with existing disjoint workers invariant +twoBossesWithDisjointWorkers2.invs two bosses with 2 disjoint workers invariant +twoRoleEmployee.cmd two role employee query +twoRoleEmployee.invs two role employee invariant diff --git a/use-core/src/main/resources/examples/Papers/2006/GogollaBuettnerRichters/sample_output.txt b/use-core/src/main/resources/examples/Papers/2006/GogollaBuettnerRichters/sample_output.txt index 254d44875..b868e9e4e 100644 --- a/use-core/src/main/resources/examples/Papers/2006/GogollaBuettnerRichters/sample_output.txt +++ b/use-core/src/main/resources/examples/Papers/2006/GogollaBuettnerRichters/sample_output.txt @@ -1,10 +1,10 @@ -Test suite 'CivilStatus' with 3 test cases -Executing test 1/3 `testSetUp'... success -Executing test 2/3 `uniqueNames'... success -Executing test 3/3 `excludeBigamie'... success - -Test suite 'CivilStatus' with 3 test cases -Executing test 1/3 `testSetUp'... success -Executing test 2/3 `uniqueNames'... success -Executing test 3/3 `excludeBigamie'... failure +Test suite 'CivilStatus' with 3 test cases +Executing test 1/3 `testSetUp'... success +Executing test 2/3 `uniqueNames'... success +Executing test 3/3 `excludeBigamie'... success + +Test suite 'CivilStatus' with 3 test cases +Executing test 1/3 `testSetUp'... success +Executing test 2/3 `uniqueNames'... success +Executing test 3/3 `excludeBigamie'... failure Assertion failure in line 59. \ No newline at end of file diff --git a/use-gui/src/main/java/module-info.java b/use-gui/src/main/java/module-info.java index 454e2590e..06d7efda6 100644 --- a/use-gui/src/main/java/module-info.java +++ b/use-gui/src/main/java/module-info.java @@ -31,4 +31,8 @@ exports org.tzi.use.gui.views.diagrams.behavior.shared to com.google.common; exports org.tzi.use.gui.views.selection to com.google.common; exports org.tzi.use.gui.views.diagrams.statemachine to com.google.common; + exports org.tzi.use.gui.views.diagrams.elements; + exports org.tzi.use.gui.views.diagrams.elements.edges; + exports org.tzi.use.gui.views.diagrams.event; + exports org.tzi.use.gui.views.selection.objectselection to com.google.common; } \ No newline at end of file diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/elements/edges/AssociationOrLinkPartEdge.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/elements/edges/AssociationOrLinkPartEdge.java index 67d7a579a..3b35485a1 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/elements/edges/AssociationOrLinkPartEdge.java +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/elements/edges/AssociationOrLinkPartEdge.java @@ -230,8 +230,8 @@ public boolean adjacentObjectNodeGreyed() { List adjacentObjects = getLink().linkedObjects(); for (MObject adjacentObject : adjacentObjects) { - ObjectNode node = visibleData.fObjectToNodeMap.get(adjacentObject); - if(node.isGreyed()) { + ObjectNode node = visibleData.getObjectToNodeMap().get(adjacentObject); + if (node != null && node.isGreyed()) { return true; } } @@ -365,8 +365,7 @@ public void drawProperties(Graphics2D g) { public static AssociationOrLinkPartEdge create(PlaceableNode source, PlaceableNode target, MAssociationEnd targetEnd, DiagramView diagram, MAssociation assoc, MLink link) { - AssociationOrLinkPartEdge edge = new AssociationOrLinkPartEdge(source, target, targetEnd, diagram, assoc, link); - return edge; + return new AssociationOrLinkPartEdge(source, target, targetEnd, diagram, assoc, link); } /** @@ -375,8 +374,7 @@ public static AssociationOrLinkPartEdge create(PlaceableNode source, public static AssociationOrLinkPartEdge create(PlaceableNode source, PlaceableNode target, String name, MAssociationEnd targetEnd, DiagramView diagram, MAssociation assoc, MLink link) { - AssociationOrLinkPartEdge edge = new AssociationOrLinkPartEdge(source, target, name, targetEnd, diagram, assoc, link); - return edge; + return new AssociationOrLinkPartEdge(source, target, name, targetEnd, diagram, assoc, link); } @Override diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/event/DiagramInputHandling.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/event/DiagramInputHandling.java index 73886e94c..2c9a2fdbb 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/event/DiagramInputHandling.java +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/event/DiagramInputHandling.java @@ -155,7 +155,7 @@ public void mousePressed(MouseEvent e) { // add this component as the only selected item fNodeSelection.add(pickedObjectNode); fDiagram.repaint(); - } + } // subsequent dragging events will move selected items if (pickedObjectNode instanceof ResizeNode) { resizeNode = (ResizeNode)pickedObjectNode; @@ -165,22 +165,22 @@ public void mousePressed(MouseEvent e) { fDragMode = DragMode.DRAG_ITEMS; resizeNode = null; } - + fDragStart = e.getPoint(); } else if (pickedEdge != null) { if (!fEdgeSelection.isSelected(pickedEdge)) { // clear selection - fNodeSelection.clear(); - fEdgeSelection.clear(); + fNodeSelection.clear(); + fEdgeSelection.clear(); // add this component as the only selected item - fEdgeSelection.add(pickedEdge); - fDiagram.repaint(); - } - } else { + fEdgeSelection.add(pickedEdge); + fDiagram.repaint(); + } + } else { // click in background, clear selection fNodeSelection.clear(); fEdgeSelection.clear(); - + // init selection rectangle selectionRectangle = fDiagram.createSelectionBox(e.getPoint()); fDiagram.add(selectionRectangle); @@ -196,7 +196,7 @@ public void mousePressed(MouseEvent e) { fNodeSelection.remove( pickedObjectNode ); else fNodeSelection.add( pickedObjectNode ); - + fDiagram.repaint(); } else if (pickedEdge != null) { @@ -205,14 +205,14 @@ else if (pickedEdge != null) { fEdgeSelection.remove(pickedEdge); else fEdgeSelection.add( pickedEdge ); - + fDiagram.repaint(); } else { // additive selection rectangle selectionRectangle = fDiagram.createSelectionBox(e.getPoint()); fDiagram.add(selectionRectangle); - + fDiagram.repaint(); } break; @@ -270,8 +270,11 @@ public void mouseEntered(MouseEvent e) { @Override public void mouseExited(MouseEvent e) { - if (fDiagram.getStatusBar() != null) - fDiagram.getStatusBar().clearMessage(); + if (fDiagram instanceof NewObjectDiagram objDiag) { + objDiag.onPointerExited(); + } else if (fDiagram.getStatusBar() != null) { + fDiagram.getStatusBar().clearMessage(); + } } @Override @@ -299,10 +302,10 @@ public synchronized void mouseDragged(MouseEvent e) { int dy = p.y - fDragStart.y; moveSelectedObjects(dx, dy); - - fDragStart = p; - } - + + fDragStart = p; + } + if (fDragMode == DragMode.RESIZE_ITEM) { resizeSelectedObjects(e.getPoint()); } @@ -311,9 +314,9 @@ public synchronized void mouseDragged(MouseEvent e) { } /** - * - * @param dx - * @param dy + * Resize the currently selected node(s) according to the pointer position. + * Only active when a ResizeNode was the initial drag handle. + * @param p current mouse position used to compute delta from fDragStart */ protected void resizeSelectedObjects(Point p) { // Just to be sure @@ -330,13 +333,15 @@ protected void resizeSelectedObjects(Point p) { resizeNode.setDraggedPosition(dx, dy); fDiagram.invalidateNode(theNode); fDragStart = p; - return; } } - + /** - * @param dx - * @param dy + * Move all selected objects by the given delta. + * Special-case: associated class/object nodes are not moved when multiple nodes are selected + * to avoid them being moved twice. + * @param dx horizontal delta to move selected nodes + * @param dy vertical delta to move selected nodes */ protected void moveSelectedObjects(int dx, int dy) { // move all selected components to new position, @@ -356,65 +361,6 @@ protected void moveSelectedObjects(int dx, int dy) { } @Override - public void mouseMoved(MouseEvent e) { - if (fDiagram.getStatusBar() != null) - fDiagram.getStatusBar().showMessage("[x=" + e.getPoint().getX() + ", y=" + e.getPoint().getY() + "] ", BorderLayout.EAST); - - PlaceableNode targetNode = null; - - // We allow selected nodes to change the mouse cursor - for (PlaceableNode n : fNodeSelection) { - if (n.occupies(e.getX(), e.getY())) { - targetNode = n; - } else { - targetNode = n.getRelatedNode(e.getX(), e.getY()); - } - - if (targetNode != null) { - fDiagram.setCursor(targetNode.getCursor()); - return; - } - } - - fDiagram.setCursor(Cursor.getDefaultCursor()); - } - - // implementation of interface DragTargetListener - @Override - public void dragEnter(DropTargetDragEvent dtde) { - //Log.trace(this, "dragEnter"); - dtde.acceptDrag(DnDConstants.ACTION_MOVE); - } - - @Override - public void dragOver(DropTargetDragEvent dtde) { - //Log.trace(this, "dragOver"); - dtde.acceptDrag(DnDConstants.ACTION_MOVE); - } - - @Override - public void dropActionChanged(DropTargetDragEvent dtde) { - //Log.trace(this, "dropActionChanged"); - dtde.acceptDrag(DnDConstants.ACTION_MOVE); - } - - @Override - public void dragExit(DropTargetEvent dte) { - //Log.trace(this, "dragExit"); - } - - /** - * Accepts a drag of a class from the ModelBrowser. A new object of this - * class will be created. - */ - @Override - public void drop(DropTargetDropEvent dtde) { - if ( fDiagram instanceof NewObjectDiagram ) { - ((NewObjectDiagram) fDiagram).dropObjectFromModelBrowser( dtde ); - } - } - - @Override public void keyTyped(KeyEvent e) { } @Override @@ -450,4 +396,53 @@ public void keyPressed(KeyEvent e) { @Override public void keyReleased(KeyEvent e) { } + + @Override + public void mouseMoved(MouseEvent e) { + if (fDiagram instanceof NewObjectDiagram objDiag) { + objDiag.onPointerMoved(e.getPoint()); + } else if (fDiagram.getStatusBar() != null) { + fDiagram.getStatusBar() + .showMessage("[x=" + e.getPoint().getX() + ", y=" + e.getPoint().getY() + "] ", BorderLayout.EAST); + } + + PlaceableNode targetNode; + for (PlaceableNode n : fNodeSelection) { + targetNode = n.occupies(e.getX(), e.getY()) ? n : n.getRelatedNode(e.getX(), e.getY()); + if (targetNode != null) { + fDiagram.setCursor(targetNode.getCursor()); + return; + } + } + fDiagram.setCursor(Cursor.getDefaultCursor()); + } + + @Override + public void dragEnter(DropTargetDragEvent dtde) { + dtde.acceptDrag(DnDConstants.ACTION_MOVE); + } + + @Override + public void dragOver(DropTargetDragEvent dtde) { + dtde.acceptDrag(DnDConstants.ACTION_MOVE); + } + + @Override + public void dropActionChanged(DropTargetDragEvent dtde) { + dtde.acceptDrag(DnDConstants.ACTION_MOVE); + } + + @Override + public void dragExit(DropTargetEvent dte) { + // no-op + } + + @Override + public void drop(DropTargetDropEvent dtde) { + if (fDiagram instanceof NewObjectDiagram objDiag) { + objDiag.dropObjectFromModelBrowser(dtde); + } else { + dtde.rejectDrop(); + } + } } diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ApplicationController.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ApplicationController.java new file mode 100644 index 000000000..23c220fda --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ApplicationController.java @@ -0,0 +1,22 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import org.tzi.use.uml.sys.MObject; +import org.tzi.use.uml.mm.MAssociation; +import org.tzi.use.uml.sys.MLink; +import java.util.List; +import java.util.Set; + + +/** + * Boundary for executing application/system commands. + * Methods are minimal and will be expanded during migration. + */ +public interface ApplicationController { + void createObject(String className); + void insertLink(MAssociation association, List participants); + void deleteLink(MLink link); + void deleteObjects(Set objects); + void resetDiagram(ObjDiagramOptions options); + /** Open object properties UI for the given object. */ + void showObjectProperties(String objectName); +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ContextMenuProvider.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ContextMenuProvider.java new file mode 100644 index 000000000..31c87ae10 --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ContextMenuProvider.java @@ -0,0 +1,32 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import javax.swing.JPopupMenu; +import java.awt.Point; +import java.util.Set; +import org.tzi.use.uml.sys.MObject; +import org.tzi.use.uml.sys.MLink; + +/** + * Builds context menus and routes callbacks to the presenter. + */ +public interface ContextMenuProvider { + void enhanceMenu(JPopupMenu popupMenu, + ObjectDiagramInteractor diagram, + NewObjectDiagramPresenter presenter, + Point popupPosition, + Set selectedObjects, + Set selectedLinks, + Set selectedAssocObjects); + + /** + * Helper interface to contribute show/hide/crop submenu entries without + * exposing Swing types to the presenter. This logically belongs to the + * context menu provider since it is used to build parts of the context + * menu; keeping it nested helps grouping related APIs. + */ + interface ShowHideCropMenuBuilder { + void addSelectedObjectPathView(Set selectedObjects); + void addSelectionWithOCLViewAction(); + void addSelectionObjectView(); + } +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultApplicationController.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultApplicationController.java new file mode 100644 index 000000000..d1c7f5823 --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultApplicationController.java @@ -0,0 +1,100 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import org.tzi.use.gui.main.MainWindow; +import org.tzi.use.uml.mm.MAssociation; +import org.tzi.use.uml.ocl.value.Value; +import org.tzi.use.uml.sys.MLink; +import org.tzi.use.uml.sys.MObject; +import org.tzi.use.uml.sys.MSystem; +import org.tzi.use.uml.sys.MSystemException; +import org.tzi.use.uml.sys.soil.MLinkDeletionStatement; +import org.tzi.use.uml.sys.soil.MLinkInsertionStatement; +import org.tzi.use.uml.sys.soil.MObjectDestructionStatement; +import org.tzi.use.uml.sys.soil.MSequenceStatement; + +import javax.swing.JOptionPane; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +import org.tzi.use.gui.views.ObjectPropertiesView; + +/** + * Default bridge to execute domain commands against the USE system. + * Keeps UI concerns (dialogs) minimal and delegates heavy UI (qualifier input) to QualifierInputView when needed. + */ +class DefaultApplicationController implements ApplicationController { + private final MainWindow mainWindow; + private final MSystem system; + private final DiagramContext diagramContext; + /** + * Dialog title used for error dialogs. Extracted to avoid duplicated string literal (Sonar S1192). + */ + private static final String DLG_TITLE_ERROR = "Error"; + + DefaultApplicationController(MainWindow mainWindow, MSystem system, DiagramContext diagramContext) { + this.mainWindow = mainWindow; + this.system = system; + this.diagramContext = diagramContext; + } + + @Override + public void createObject(String className) { + MainWindow.instance().createObject(className); + } + + @Override + public void insertLink(MAssociation association, List participants) { + MObject[] objects = participants.toArray(new MObject[0]); + if (association.hasQualifiedEnds()) { + QualifierInputView input = new QualifierInputView(mainWindow, system, association, objects); + input.setLocationRelativeTo(mainWindow); + input.setVisible(true); + return; + } + + try { + system.execute(new MLinkInsertionStatement(association, objects, Collections.>emptyList())); + } catch (MSystemException e) { + JOptionPane.showMessageDialog(mainWindow, e.getMessage(), DLG_TITLE_ERROR, JOptionPane.ERROR_MESSAGE); + } + } + + @Override + public void deleteLink(MLink link) { + try { + system.execute(new MLinkDeletionStatement(link)); + } catch (MSystemException e) { + JOptionPane.showMessageDialog(mainWindow, e.getMessage(), DLG_TITLE_ERROR, JOptionPane.ERROR_MESSAGE); + } + } + + @Override + public void deleteObjects(Set objects) { + MSequenceStatement sequence = new MSequenceStatement(); + for (MObject obj : objects) { + sequence.appendStatement(new MObjectDestructionStatement(obj.value())); + } + if (sequence.isEmpty()) { + return; + } + try { + system.execute(sequence.simplify()); + } catch (MSystemException e) { + JOptionPane.showMessageDialog(mainWindow, e.getMessage(), DLG_TITLE_ERROR, JOptionPane.ERROR_MESSAGE); + } + } + + @Override + public void resetDiagram(ObjDiagramOptions options) { + if (diagramContext != null) { + diagramContext.resetDiagram(options); + } + } + + @Override + public void showObjectProperties(String objectName) { + ObjectPropertiesView v = MainWindow.instance().showObjectPropertiesView(); + v.selectObject(objectName); + } +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultContextMenuProvider.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultContextMenuProvider.java new file mode 100644 index 000000000..a955ed01f --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultContextMenuProvider.java @@ -0,0 +1,1417 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import org.tzi.use.gui.views.diagrams.ObjectNodeActivity; +import org.tzi.use.gui.views.diagrams.elements.CommentNode; +import org.tzi.use.gui.views.diagrams.elements.PlaceableNode; +import org.tzi.use.gui.views.diagrams.elements.edges.EdgeBase; +import org.tzi.use.gui.views.diagrams.util.MenuScroller; +import org.tzi.use.gui.views.selection.objectselection.ObjectSelection; +import org.tzi.use.uml.mm.MAssociation; +import org.tzi.use.uml.mm.MAssociationEnd; +import org.tzi.use.uml.mm.MAssociationClassImpl; +import org.tzi.use.uml.mm.MClass; +import org.tzi.use.uml.mm.MNamedElementComparator; +import org.tzi.use.uml.mm.statemachines.MProtocolStateMachine; +import org.tzi.use.uml.sys.MLink; +import org.tzi.use.uml.sys.MObject; +import org.tzi.use.util.collections.CollectionUtil; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.util.*; +import java.util.List; +import java.util.function.Consumer; +import java.util.function.Supplier; + +public class DefaultContextMenuProvider implements ContextMenuProvider { + // common UI label constants to avoid duplicated string literals (Sonar S1192) + private static final String LABEL_HIDE = "Hide "; + private static final String LABEL_SHOW = "Show "; + private static final String LABEL_HIDE_ALL = "Hide all"; + private static final String LABEL_SHOW_ALL = "Show all"; + private static final String LABEL_CLASS_PREFIX = "Class "; + private static final String LABEL_LINKS_SUFFIX = " links"; + // link kind labels + private static final String KIND_DERIVED = "Derived links"; + private static final String KIND_ASSOCIATION_CLASS = "Association class links"; + private static final String KIND_NARY = "N-ary links"; + private static final String KIND_REFLEXIVE = "Reflexive links"; + private static final String KIND_BINARY = "Binary links"; + private static final String KIND_AGGREGATION = "Aggregation links"; + private static final String KIND_COMPOSITION = "Composition links"; + + @Override + + public void enhanceMenu(JPopupMenu popupMenu, + + ObjectDiagramInteractor diagram, + + NewObjectDiagramPresenter presenter, + + Point popupPosition, + + Set selectedObjects, + + Set selectedLinks, + + Set selectedAssocObjects) { + + if (popupMenu == null || presenter == null) { + + return; + + } + + List baseItems = new ArrayList<>(Arrays.asList(popupMenu.getComponents())); + popupMenu.removeAll(); + + Set safeObjects = selectedObjects == null ? Set.of() : selectedObjects; + + Set safeLinks = selectedLinks == null ? Set.of() : selectedLinks; + + Set safeAssocObjects = selectedAssocObjects == null ? Set.of() : selectedAssocObjects; + + boolean hasSelectedObjects = !safeObjects.isEmpty(); + + boolean hasSelectedLinks = !safeLinks.isEmpty(); + + boolean blankCanvas = !hasSelectedObjects && !hasSelectedLinks && safeAssocObjects.isEmpty(); + + List ordered = new ArrayList<>(); + + if (diagram instanceof NewObjectDiagram newDiagram + + && hasHiddenElements(newDiagram) + + && (blankCanvas || hasSelectedLinks)) { + + addComponent(ordered, buildMenuItem("Show Hidden Elements", ev -> presenter.onShowHiddenElements())); + + } + + if (hasSelectedObjects) { + + addComponent(ordered, buildEditPropertiesItem(presenter, safeObjects)); + + addComponent(ordered, buildDestroyItem(presenter, safeObjects)); + + addSeparator(ordered); + + } + + if (hasSelectedObjects) { + + addComponents(ordered, buildInsertItems(presenter, safeObjects)); + + addSeparator(ordered); + + } + + if (hasSelectedObjects) { + + addComponent(ordered, buildHideSelectedItem(presenter, safeObjects)); + + addComponent(ordered, buildCropSelectedItem(presenter, safeObjects)); + + addComponent(ordered, buildGreyOutItem(diagram, presenter, safeObjects)); + + addSeparator(ordered); + + } + + if (hasSelectedLinks) { + + addComponent(ordered, buildHideSelectedLinksItem(presenter, safeLinks)); + + addComponent(ordered, buildCropSelectedLinksItem(diagram, presenter, safeLinks, safeAssocObjects)); + + addSeparator(ordered); + + } + + addComponent(ordered, buildShowHideCropMenu(diagram, presenter, safeObjects)); + + addComponent(ordered, buildHideObjectsMenu(diagram, presenter)); + + addComponent(ordered, buildHideLinksMenu(diagram, presenter)); + + addComponent(ordered, buildShowObjectsMenu(diagram, presenter)); + + addComponent(ordered, buildShowLinksMenu(diagram, presenter)); + + addSeparator(ordered); + + addComponent(ordered, buildLinksByKindMenu(diagram, presenter)); + + addSeparator(ordered); + + if (hasSelectedObjects && safeObjects.size() == 1 && !hasSelectedLinks) { + + addComponent(ordered, buildProtocolStateMachineMenu(presenter, safeObjects)); + + addSeparator(ordered); + + } + + addComponent(ordered, buildCommentNode(diagram, presenter, popupPosition)); + + addSeparator(ordered); + + buildViewAndLayoutOptions(ordered, baseItems, diagram, presenter); + + ordered.stream().filter(Objects::nonNull).forEach(popupMenu::add); + + } + + private void addComponent(List target, Component component) { + + if (component != null) { + + target.add(component); + + } + + } + + private void addComponents(List target, List components) { + + components.stream().filter(Objects::nonNull).forEach(target::add); + + } + + private void addSeparator(List target) { + + if (target.isEmpty() || target.getLast() instanceof JSeparator) { + + return; + + } + + target.add(new JSeparator()); + + } + + private Component extractOrFallback(List baseItems, String text, Supplier fallback) { + + Component extracted = takeAndRemove(baseItems, text); + + if (extracted != null) { + + return extracted; + + } + + return fallback == null ? null : fallback.get(); + + } + + private Component takeAndRemove(List components, String text) { + + for (Iterator it = components.iterator(); it.hasNext(); ) { + + Component candidate = it.next(); + + if (candidate instanceof JMenuItem item && text.equals(item.getText())) { + + it.remove(); + + return item; + + } + + if (candidate instanceof JMenu menu && text.equals(menu.getText())) { + + it.remove(); + + return menu; + + } + + } + + return null; + + } + + private JMenuItem buildEditPropertiesItem(NewObjectDiagramPresenter presenter, Set selectedObjects) { + + MObject first = selectedObjects == null || selectedObjects.isEmpty() ? null : selectedObjects.iterator().next(); + + return buildMenuItem("Edit properties of '" + safeName(first) + "'", ev -> { + + if (first == null) { + + presenter.onStatusMessage("Select an object to edit its properties."); + + } else { + + presenter.onShowObjectProperties(first); + + } + + }); + + } + + private JMenuItem buildDestroyItem(NewObjectDiagramPresenter presenter, Set selectedObjects) { + + MObject first = selectedObjects == null || selectedObjects.isEmpty() ? null : selectedObjects.iterator().next(); + + return buildMenuItem("Destroy '" + safeName(first) + "'", ev -> { + + if (selectedObjects == null || selectedObjects.isEmpty()) { + + presenter.onStatusMessage("Select at least one object to destroy."); + + } else { + + presenter.onDeleteObjects(selectedObjects); + + } + + }); + + } + + private List buildInsertItems(NewObjectDiagramPresenter presenter, Set selectedObjects) { + + List items = new ArrayList<>(); + + if (presenter == null) { + + return items; + + } + + List associations = prepareAssociations(presenter); + List selList = prepareSelectedList(selectedObjects); + + if (selList.isEmpty() || associations.isEmpty()) { + return items; + } + + for (MAssociation assoc : associations) { + addInsertItemsForAssociation(assoc, selList, presenter, items); + } + + return items; + + } + + private List prepareAssociations(NewObjectDiagramPresenter presenter) { + Collection assocCollection = presenter.fetchAllAssociations(); + List associations = assocCollection == null ? new ArrayList<>() : new ArrayList<>(assocCollection); + associations.removeIf(Objects::isNull); + associations.sort(Comparator.comparing( + MAssociation::name, + Comparator.nullsLast(String.CASE_INSENSITIVE_ORDER))); + return associations; + } + + private List prepareSelectedList(Set selectedObjects) { + if (selectedObjects == null || selectedObjects.isEmpty()) { + return List.of(); + } + List selList = new ArrayList<>(selectedObjects); + selList.removeIf(Objects::isNull); + selList.sort(Comparator.comparing(this::safeName, String.CASE_INSENSITIVE_ORDER)); + return selList; + } + + private JMenuItem buildHideSelectedItem(NewObjectDiagramPresenter presenter, Set selectedObjects) { + + return buildMenuItem(LABEL_HIDE + describeSelection(selectedObjects), + ev -> hideOrWarn(presenter, selectedObjects, presenter::onHideObjects)); + + } + + private JMenuItem buildCropSelectedItem(NewObjectDiagramPresenter presenter, Set selectedObjects) { + + return buildMenuItem("Crop " + describeSelection(selectedObjects), ev -> { + + if (selectedObjects.isEmpty()) { + + presenter.onStatusMessage("Select objects before cropping."); + + } else { + + presenter.onCropSelection(new HashSet<>(selectedObjects)); + + } + + }); + + } + + private JMenuItem buildGreyOutItem(ObjectDiagramInteractor diagram, + + NewObjectDiagramPresenter presenter, + + Set selectedObjects) { + + boolean allGreyed = areAllSelectedObjectsGreyed(diagram, selectedObjects); + + String label = (allGreyed ? "Grey in " : "Grey out ") + describeSelection(selectedObjects); + + return buildMenuItem(label, ev -> hideOrWarn(presenter, selectedObjects, + + objs -> { + + if (areAllSelectedObjectsGreyed(diagram, objs)) { + + presenter.onGrayIn(objs); + + } else { + + presenter.onGrayOut(objs); + + } + + })); + + } + + private JMenu buildHideObjectsMenu(ObjectDiagramInteractor diagram, NewObjectDiagramPresenter presenter) { + + JMenu menu = new JMenu("Hide objects"); + + MenuScroller.setScrollerFor(menu, 15, 125, 0, 0); + + if (!(diagram instanceof NewObjectDiagram newDiagram)) { + + return menu; + + } + + Set visibleObjects = new LinkedHashSet<>(newDiagram.getVisibleData().getObjectToNodeMap().keySet()); + + if (visibleObjects.isEmpty()) { + + return null; + + } + + JMenuItem hideAllObjects = new JMenuItem("Hide all objects"); + + hideAllObjects.setEnabled(!visibleObjects.isEmpty()); + + hideAllObjects.addActionListener(ev -> presenter.onHideObjects(new LinkedHashSet<>(visibleObjects))); + + menu.add(hideAllObjects); + + menu.addSeparator(); + + Map> objectsByClass = new HashMap<>(); + + for (MObject obj : visibleObjects) { + + objectsByClass.computeIfAbsent(obj.cls(), key -> new ArrayList<>()).add(obj); + + } + + List classes = new ArrayList<>(objectsByClass.keySet()); + + classes.sort(new MNamedElementComparator()); + + for (MClass cls : classes) { + + JMenu classMenu = new JMenu(LABEL_CLASS_PREFIX + cls.name()); + + MenuScroller.setScrollerFor(classMenu, 15, 125, 0, 0); + + List classObjects = new ArrayList<>(objectsByClass.getOrDefault(cls, List.of())); + + classObjects.sort(Comparator.comparing(this::safeName, String.CASE_INSENSITIVE_ORDER)); + + JMenuItem hideClassAll = new JMenuItem(LABEL_HIDE_ALL); + + hideClassAll.addActionListener(ev -> presenter.onHideObjects(new LinkedHashSet<>(classObjects))); + + classMenu.add(hideClassAll); + + classMenu.addSeparator(); + + for (MObject obj : classObjects) { + + classMenu.add(buildMenuItem(LABEL_HIDE + obj.name(), ev -> presenter.onHideObjects(Set.of(obj)))); + + } + + menu.add(classMenu); + + } + + return menu; + + } + + private JMenu buildHideLinksMenu(ObjectDiagramInteractor diagram, NewObjectDiagramPresenter presenter) { + + JMenu menu = new JMenu("Hide links"); + + MenuScroller.setScrollerFor(menu, 20, 125, 0, 0); + + if (!(diagram instanceof NewObjectDiagram newDiagram)) { + + return null; + + } + + List links = collectUniqueLinks(new LinkedHashSet<>(newDiagram.getVisibleData().getEdges())); + + if (links.isEmpty()) { + + return null; + + } + + JMenuItem hideAllLinks = new JMenuItem(LABEL_HIDE_ALL + LABEL_LINKS_SUFFIX); + + hideAllLinks.setEnabled(!newDiagram.getVisibleData().getEdges().isEmpty()); + + hideAllLinks.addActionListener(ev -> presenter.onHideAllLinks()); + + menu.add(hideAllLinks); + + menu.addSeparator(); + + Map> grouped = groupLinksByAssociation(links); + + for (Map.Entry> entry : grouped.entrySet()) { + + JMenu assocMenu = new JMenu(entry.getKey()); + + MenuScroller.setScrollerFor(assocMenu, 20, 125, 0, 0); + + List assocLinks = entry.getValue(); + + assocMenu.add(buildMenuItem(LABEL_HIDE_ALL, ev -> presenter.onHideLinks(assocLinks))); + + assocMenu.addSeparator(); + + assocLinks.sort(linkComparator()); + + for (MLink link : assocLinks) { + assocMenu.add(buildMenuItem(LABEL_HIDE + formatLinkName(link), ev -> presenter.onHideLinks(List.of(link)))); + } + + menu.add(assocMenu); + + } + + return menu; + + } + + private JMenu buildShowLinksMenu(ObjectDiagramInteractor diagram, NewObjectDiagramPresenter presenter) { + + JMenu menu = new JMenu("Show links"); + + MenuScroller.setScrollerFor(menu, 20, 125, 0, 0); + + if (!(diagram instanceof NewObjectDiagram newDiagram)) { + + return null; + + } + + List links = collectUniqueLinks(new LinkedHashSet<>(newDiagram.getHiddenData().getEdges())); + + if (links.isEmpty()) { + + return null; + + } + + JMenuItem showAllLinks = new JMenuItem(LABEL_SHOW_ALL + LABEL_LINKS_SUFFIX); + + showAllLinks.setEnabled(!newDiagram.getHiddenData().getEdges().isEmpty()); + + showAllLinks.addActionListener(ev -> presenter.onShowAllLinks()); + + menu.add(showAllLinks); + + menu.addSeparator(); + + Map> grouped = groupLinksByAssociation(links); + + for (Map.Entry> entry : grouped.entrySet()) { + + JMenu assocMenu = new JMenu(entry.getKey()); + + MenuScroller.setScrollerFor(assocMenu, 20, 125, 0, 0); + + List assocLinks = entry.getValue(); + + assocMenu.add(buildMenuItem(LABEL_SHOW_ALL, ev -> presenter.onShowLinks(assocLinks))); + + assocMenu.addSeparator(); + + assocLinks.sort(linkComparator()); + + for (MLink link : assocLinks) { + assocMenu.add(buildMenuItem(LABEL_SHOW + formatLinkName(link), ev -> presenter.onShowLinks(List.of(link)))); + } + + menu.add(assocMenu); + + } + + return menu; + + } + + private JMenu buildShowObjectsMenu(ObjectDiagramInteractor diagram, NewObjectDiagramPresenter presenter) { + + JMenu menu = new JMenu("Show objects"); + + MenuScroller.setScrollerFor(menu, 15, 125, 0, 0); + + if (!(diagram instanceof NewObjectDiagram newDiagram)) { + + return null; + + } + + Set hiddenNodes = newDiagram.getHiddenNodes(); + + Set hiddenObjectNodes = CollectionUtil.filterByType(hiddenNodes, ObjectNodeActivity.class); + + if (hiddenObjectNodes.isEmpty()) { + + return null; + + } + + JMenuItem showAllObjects = new JMenuItem(LABEL_SHOW_ALL + " hidden objects"); + + showAllObjects.setEnabled(true); + + showAllObjects.addActionListener(ev -> presenter.onShowHiddenElements()); + + menu.add(showAllObjects); + + menu.addSeparator(); + + TreeSet sortedNodes = new TreeSet<>(Comparator.comparing((ObjectNodeActivity n) -> n.object().name(), new org.tzi.use.gui.util.AlphanumComparator())); + + sortedNodes.addAll(hiddenObjectNodes); + + Map classMenus = new HashMap<>(); + + for (ObjectNodeActivity node : sortedNodes) { + + MClass cls = node.cls(); + + MObject obj = node.object(); + + JMenu parent = classMenus.computeIfAbsent(cls, k -> { + JMenu subm = new JMenu(LABEL_CLASS_PREFIX + k.name()); + MenuScroller.setScrollerFor(subm, 15, 125, 0, 0); + JMenuItem showAll = new JMenuItem(LABEL_SHOW_ALL); + showAll.addActionListener(e -> presenter.onShowHiddenElements()); + subm.add(showAll); + subm.addSeparator(); + return subm; + }); + + parent.add(buildMenuItem(LABEL_SHOW + obj.name(), ev -> presenter.onShowHiddenElements())); + + } + + List classes = new ArrayList<>(classMenus.keySet()); + + classes.sort(new MNamedElementComparator()); + + for (MClass cls : classes) { + + menu.add(classMenus.get(cls)); + + } + + return menu; + + } + + private JMenu buildShowHideCropMenu(ObjectDiagramInteractor diagram, + + NewObjectDiagramPresenter presenter, + + Set selectedObjects) { + + JMenu menu = new JMenu("Show/hide/crop objects"); + + if (presenter == null) { + + return menu; + + } + + ObjectSelection selection = diagram != null ? diagram.getObjectSelection() : null; + + presenter.onBuildShowHideCropMenu(new ContextMenuProvider.ShowHideCropMenuBuilder() { + + @Override + + public void addSelectedObjectPathView(Set selectedObjects) { + + if (selection != null && selectedObjects != null && !selectedObjects.isEmpty()) { + + menu.add(selection.getSelectedObjectPathView("By path length...", selectedObjects)); + + } + + } + + @Override + + public void addSelectionWithOCLViewAction() { + + if (selection != null) { + + menu.add(selection.getSelectionWithOCLViewAction()); + + } + + } + + @Override + + public void addSelectionObjectView() { + + if (selection != null) { + + menu.add(selection.getSelectionObjectView()); + + } + + } + + }, selectedObjects); + + return menu; + + } + + private JMenuItem buildHideSelectedLinksItem(NewObjectDiagramPresenter presenter, + + Set selectedLinks) { + + List links = sortedSelectedLinks(selectedLinks); + + if (presenter == null || links.isEmpty()) { + + return null; + + } + + String label = links.size() == 1 ? formatLinkName(links.getFirst()) : links.size() + LABEL_LINKS_SUFFIX; + + return buildMenuItem(LABEL_HIDE + label, ev -> presenter.onHideLinks(links)); + + } + + private JMenuItem buildCropSelectedLinksItem(ObjectDiagramInteractor diagram, + + NewObjectDiagramPresenter presenter, + + Set selectedLinks, + + Set selectedAssocObjects) { + + List links = sortedSelectedLinks(selectedLinks); + + if (presenter == null || links.isEmpty() || !(diagram instanceof NewObjectDiagram newDiagram)) { + + return null; + + } + + String label = links.size() == 1 ? formatLinkName(links.getFirst()) : links.size() + LABEL_LINKS_SUFFIX; + + Set keepObjects = selectedAssocObjects == null ? Set.of() : new LinkedHashSet<>(selectedAssocObjects); + + return buildMenuItem("Crop " + label, ev -> cropSelectedLinks(presenter, newDiagram, links, keepObjects)); + + } + + private void cropSelectedLinks(NewObjectDiagramPresenter presenter, + + NewObjectDiagram newDiagram, + + Collection selectedLinks, + + Set keepObjects) { + + Set selected = new LinkedHashSet<>(selectedLinks); + + Set visibleObjects = new LinkedHashSet<>(newDiagram.getVisibleData().getObjectToNodeMap().keySet()); + + visibleObjects.removeAll(keepObjects); + + List visibleLinks = collectUniqueLinks(new LinkedHashSet<>(newDiagram.getVisibleData().getEdges())); + + visibleLinks.removeIf(selected::contains); + + if (!visibleObjects.isEmpty()) { + + presenter.onHideObjects(visibleObjects); + + } + + if (!visibleLinks.isEmpty()) { + + presenter.onHideLinks(visibleLinks); + + } + + } + + private List sortedSelectedLinks(Set selectedLinks) { + + List links = new ArrayList<>(selectedLinks == null ? Set.of() : selectedLinks); + + links.removeIf(Objects::isNull); + + links.sort(linkComparator()); + + return links; + + } + + private JMenu buildLinksByKindMenu(ObjectDiagramInteractor diagram, NewObjectDiagramPresenter presenter) { + + JMenu menu = new JMenu("Show/hide links-by-kind"); + + if (!(diagram instanceof NewObjectDiagram newDiagram) || presenter == null) { + + return null; + + } + + TreeMap> grouped = mapLinksToKindOfAssociation(presenter); + + if (grouped.isEmpty()) { + + return null; + + } + + MenuScroller.setScrollerFor(menu, 15, 125, 0, 0); + + List allLinks = grouped.values().stream().flatMap(Collection::stream).distinct().toList(); + addGlobalLinksShowHide(menu, newDiagram, presenter, allLinks); + menu.addSeparator(); + for (Map.Entry> entry : grouped.entrySet()) { + addLinksByKindAssocMenu(menu, entry.getKey(), entry.getValue(), presenter, newDiagram); + } + + return menu; + + } + + private TreeMap> mapLinksToKindOfAssociation(NewObjectDiagramPresenter presenter) { + + TreeMap> assocs = new TreeMap<>(); + + List associations = prepareAssociations(presenter); + if (associations.isEmpty()) { + return assocs; + } + for (MAssociation assoc : associations) { + Set links = presenter.fetchLinksOfAssociation(assoc); + if (links == null || links.isEmpty()) { + continue; + } + for (MLink link : links) { + String kind = computeLinkKind(assoc, link); + if (kind != null) { + assocs.computeIfAbsent(kind, k -> new ArrayList<>()).add(link); + } + } + } + + return assocs; + + } + + // formatLinkLabel removed: unused helper removed to reduce noise + + /** + * Helper to add insert items for a single association. Extracted from buildInsertItems to reduce complexity. + */ + private void addInsertItemsForAssociation(MAssociation assoc, + List selList, + NewObjectDiagramPresenter presenter, + List items) { + if (assoc == null || assoc.isReadOnly()) { + return; + } + + List ends = assoc.associationEnds(); + int n = ends == null ? 0 : ends.size(); + if (n == 0) { + return; + } + + Collection associationLinks = presenter.fetchLinksOfAssociation(assoc); + if (associationLinks == null) { + associationLinks = List.of(); + } + + int m = selList.size(); + + List tuples = computeValidTuples(m, n); + for (int[] digits : tuples) { + MObject[] tuple = new MObject[n]; + MClass[] types = new MClass[n]; + for (int idx = 0; idx < n; idx++) { + tuple[idx] = selList.get(digits[idx]); + types[idx] = tuple[idx].cls(); + } + if (!assoc.isAssignableFrom(types)) { + continue; + } + processTupleForAssociation(assoc, tuple, associationLinks, presenter, items); + } + } + private List computeValidTuples(int m, int n) { + List result = new ArrayList<>(); + if (m <= 0 || n <= 0) { + return result; + } + int pow = 1; + for (int i = 0; i < n; i++) { + pow *= m; + } + for (int value = 0; value < pow; value++) { + int[] digits = radixConversion(value, m, n); + if (isCompleteObjectCombination(digits, m)) { + result.add(digits); + } + } + return result; + } + + private void processTupleForAssociation(MAssociation assoc, + MObject[] tuple, + Collection associationLinks, + NewObjectDiagramPresenter presenter, + List items) { + StringBuilder joined = new StringBuilder(); + for (int idx = 0; idx < tuple.length; idx++) { + if (idx > 0) { + joined.append(','); + } + joined.append(safeName(tuple[idx])); + } + + List matchingLinks = findMatchingLinks(tuple, associationLinks); + + if (matchingLinks.isEmpty()) { + List tupleList = Arrays.asList(tuple.clone()); + items.add(buildMenuItem("insert (" + joined + ") into " + assoc.name(), ev -> presenter.onInsertLink(assoc, tupleList))); + } else { + for (MLink link : matchingLinks) { + String deleteLabel = buildDeleteLabel(tuple, castQualifiers(link.getQualifier()), assoc.name()); + items.add(buildMenuItem(deleteLabel, ev -> presenter.onDeleteLink(link))); + } + } + } + + private List findMatchingLinks(MObject[] tuple, Collection associationLinks) { + List matchingLinks = new ArrayList<>(); + for (MLink link : associationLinks) { + List linkObjects = link.linkedObjects(); + if (linkObjects == null || linkObjects.size() != tuple.length) { + continue; + } + boolean sameTuple = true; + for (int idx = 0; idx < tuple.length; idx++) { + if (linkObjects.get(idx) != tuple[idx]) { + sameTuple = false; + break; + } + } + if (sameTuple) { + matchingLinks.add(link); + } + } + return matchingLinks; + } + + private String buildDeleteLabel(MObject[] tuple, List> qualifiers, String assocName) { + StringBuilder deleteLabel = new StringBuilder("delete ("); + for (int idx = 0; idx < tuple.length; idx++) { + if (idx > 0) { + deleteLabel.append(','); + } + deleteLabel.append(safeName(tuple[idx])); + if (idx < qualifiers.size()) { + deleteLabel.append(formatQualifierList(qualifiers.get(idx))); + } + } + deleteLabel.append(") from ").append(assocName); + return deleteLabel.toString(); + } + + private String formatQualifierList(List qualifierForEnd) { + if (qualifierForEnd == null || qualifierForEnd.isEmpty()) { + return ""; + } + StringBuilder sb = new StringBuilder(); + sb.append('{'); + for (int q = 0; q < qualifierForEnd.size(); q++) { + if (q > 0) { + sb.append(','); + } + sb.append(qualifierForEnd.get(q)); + } + sb.append('}'); + return sb.toString(); + } + + /** + * Helper to build and add the submenu for a grouped association entry in the links-by-kind menu. + */ + private void addLinksByKindAssocMenu(JMenu parentMenu, String key, List links, NewObjectDiagramPresenter presenter, NewObjectDiagram newDiagram) { + if (links == null || links.isEmpty()) { + return; + } + JMenu assocMenu = new JMenu(key); + MenuScroller.setScrollerFor(assocMenu, 20, 125, 0, 0); + List assocLinks = new ArrayList<>(links); + int assocLinkState = newDiagram.isHidden(assocLinks); + if (assocLinkState == 1 || assocLinkState == 2) { + assocMenu.add(buildMenuItem(LABEL_SHOW_ALL, ev -> presenter.onShowLinks(assocLinks))); + } + if (assocLinkState == 0 || assocLinkState == 2) { + assocMenu.add(buildMenuItem(LABEL_HIDE_ALL, ev -> presenter.onHideLinks(assocLinks))); + } + assocMenu.addSeparator(); + List sortedLinks = new ArrayList<>(links); + sortedLinks.sort(linkComparator()); + for (MLink link : sortedLinks) { + if (newDiagram.isHidden(link)) { + assocMenu.add(buildMenuItem(LABEL_SHOW + formatLinkName(link), ev -> presenter.onShowLinks(List.of(link)))); + } else { + assocMenu.add(buildMenuItem(LABEL_HIDE + formatLinkName(link), ev -> presenter.onHideLinks(List.of(link)))); + } + } + parentMenu.add(assocMenu); + } + + private void addGlobalLinksShowHide(JMenu menu, NewObjectDiagram newDiagram, NewObjectDiagramPresenter presenter, List allLinks) { + int linkState = newDiagram.isHidden(allLinks); + if (linkState == 1 || linkState == 2) { + menu.add(buildMenuItem(LABEL_SHOW_ALL + LABEL_LINKS_SUFFIX, ev -> presenter.onShowAllLinks())); + } + if (linkState == 0 || linkState == 2) { + menu.add(buildMenuItem(LABEL_HIDE_ALL + LABEL_LINKS_SUFFIX, ev -> presenter.onHideAllLinks())); + } + } + + private String formatLinkName(MLink link) { + + if (link == null) { + + return "()"; + + } + + StringBuilder label = new StringBuilder("("); + + if (link.association().associatedClasses().size() == 1) { + + label.append(link.getLinkEnd(0).associationEnd().nameAsRolename()).append(":"); + + } + + label.append(link.linkedObjects().get(0).toString()); + + if (link.getLinkEnd(0).hasQualifiers()) { + + label.append(",").append(link.getLinkEnd(0).getQualifierValues()); + + } + + label.append(", "); + + if (link.association().associatedClasses().size() == 1) { + + label.append(link.getLinkEnd(1).associationEnd().nameAsRolename()).append(":"); + + } + + label.append(link.linkedObjects().get(1).toString()); + + if (link.getLinkEnd(1).hasQualifiers()) { + + label.append(",").append(link.getLinkEnd(1).getQualifierValues()); + + } + + label.append(")"); + + return label.toString(); + + } + + private void buildViewAndLayoutOptions(List ordered, List baseItems, ObjectDiagramInteractor diagram, NewObjectDiagramPresenter presenter) { + addComponent(ordered, extractOrFallback(baseItems, "Show attributes", () -> buildStatusItem("Show attributes", presenter))); + addComponent(ordered, buildShowStatesToggle(diagram, presenter)); + addComponent(ordered, extractOrFallback(baseItems, "Show association names", () -> buildStatusItem("Show association names", presenter))); + addComponent(ordered, extractOrFallback(baseItems, "Show role names", () -> buildStatusItem("Show role names", presenter))); + addSeparator(ordered); + addComponent(ordered, extractOrFallback(baseItems, "Align elements", () -> new JMenu("Align elements"))); + addComponent(ordered, extractOrFallback(baseItems, "Anti-aliasing", () -> buildStatusItem("Anti-aliasing", presenter))); + addComponent(ordered, extractOrFallback(baseItems, "Show grid", () -> buildStatusItem("Show grid", presenter))); + addComponent(ordered, extractOrFallback(baseItems, "Grayscale view", () -> buildStatusItem("Grayscale view", presenter))); + addSeparator(ordered); + addComponent(ordered, extractOrFallback(baseItems, "Auto-Layout", () -> buildStatusItem("Auto-Layout", presenter))); + addComponent(ordered, extractOrFallback(baseItems, "Layouts", () -> new JMenu("Layouts"))); + addComponent(ordered, extractOrFallback(baseItems, "Reset layout", () -> buildStatusItem("Reset layout", presenter))); + addComponent(ordered, extractOrFallback(baseItems, "Load layout...", () -> buildStatusItem("Load layout...", presenter))); + addComponent(ordered, extractOrFallback(baseItems, "Save layout...", () -> buildStatusItem("Save layout...", presenter))); + if (diagram instanceof NewObjectDiagram newDiagram && newDiagram.getVisibleData() != null && newDiagram.getVisibleData().hasNodes()) { + addSeparator(ordered); + addComponent(ordered, extractOrFallback(baseItems, "Select all nodes", () -> buildStatusItem("Select all nodes", presenter))); + addComponent(ordered, extractOrFallback(baseItems, "Select all edges", () -> buildStatusItem("Select all edges", presenter))); + } + } + + private String computeLinkKind(MAssociation assoc, MLink link) { + if (assoc == null || link == null) { + return null; + } + + switch (assoc.aggregationKind()) { + case 0: + if (link.association().isDerived() || link.association().isUnion()) { + return KIND_DERIVED; + } + if (link.association() instanceof MAssociationClassImpl) { + return KIND_ASSOCIATION_CLASS; + } + if (link.linkEnds().size() > 2) { + return KIND_NARY; + } + if (link.association().associatedClasses().size() == 1) { + return KIND_REFLEXIVE; + } + if (link.linkedObjects().size() == 2 && !link.linkedObjects().get(0).equals(link.linkedObjects().get(1))) { + return KIND_BINARY; + } + break; + case 1: + return KIND_AGGREGATION; + case 2: + return KIND_COMPOSITION; + default: + break; + } + + return null; + } + + private List collectUniqueLinks(Set edges) { + + List links = new ArrayList<>(); + + for (EdgeBase edge : edges) { + + if (edge instanceof org.tzi.use.gui.views.diagrams.elements.edges.LinkEdge aEdge) { + + MLink link = aEdge.getLink(); + + if (!links.contains(link)) { + + links.add(link); + + } + + } + + } + + return links; + + } + + private Map> groupLinksByAssociation(List links) { + + Map> grouped = new TreeMap<>(); + + for (MLink link : links) { + + grouped.computeIfAbsent(link.association().toString(), key -> new ArrayList<>()).add(link); + + } + + return grouped; + + } + + private Comparator linkComparator() { + + return Comparator + + .comparing((MLink link) -> link.linkedObjects().get(0).toString(), new org.tzi.use.gui.util.AlphanumComparator()) + + .thenComparing(link -> link.linkedObjects().get(1).toString(), new org.tzi.use.gui.util.AlphanumComparator()); + + } + + private JMenu buildProtocolStateMachineMenu(NewObjectDiagramPresenter presenter, Set selectedObjects) { + + JMenu menu = new JMenu("Show protocol state machine..."); + + menu.setEnabled(false); + + if (presenter == null || selectedObjects == null || selectedObjects.size() != 1) { + + return menu; + + } + + MObject obj = selectedObjects.iterator().next(); + + List sortedPSMs = new LinkedList<>(presenter.fetchProtocolStateMachines(obj)); + + sortedPSMs.removeIf(Objects::isNull); + + sortedPSMs.sort(new MNamedElementComparator()); + + for (MProtocolStateMachine psm : sortedPSMs) { + + menu.setEnabled(true); + + final JMenuItem showGivenPSM = new JMenuItem(psm.name()); + + showGivenPSM.addActionListener(ev -> presenter.onShowProtocolStateMachine(psm, obj)); + + menu.add(showGivenPSM); + + } + + return menu; + + } + + private JMenuItem buildCommentNode(ObjectDiagramInteractor diagram, + + NewObjectDiagramPresenter presenter, + + Point popupPosition) { + + return buildMenuItem("Add comment node", ev -> { + + if (!(diagram instanceof NewObjectDiagram newDiagram)) { + + if (presenter != null) { + + presenter.onStatusMessage("Add comment node requires the object diagram."); + + } + + return; + + } + + Point position = popupPosition != null ? popupPosition : new Point(); + + CommentNode commentNode = new CommentNode(position.x, position.y, newDiagram); + + newDiagram.getGraph().add(commentNode); + + newDiagram.invalidateContent(true); + + }); + + } + + private JMenuItem buildShowStatesToggle(ObjectDiagramInteractor diagram, NewObjectDiagramPresenter presenter) { + + boolean initial = diagram != null && diagram.isShowStates(); + + JCheckBoxMenuItem item = new JCheckBoxMenuItem("Show states", initial); + + item.addItemListener(ev -> { + + boolean selected = ev.getStateChange() == ItemEvent.SELECTED; + + presenter.onToggleShowStates(selected); + + if (diagram != null) { + + diagram.setShowStates(selected); + + diagram.invalidateContent(true); + + } + + }); + + return item; + + } + + private JMenuItem buildStatusItem(String label, NewObjectDiagramPresenter presenter) { + + return buildMenuItem(label, ev -> presenter.onStatusMessage(label + " is managed by the base view.")); + + } + + private JMenuItem buildMenuItem(String label, ActionListener listener) { + + JMenuItem item = new JMenuItem(label); + + item.addActionListener(listener); + + return item; + + } + + private boolean hasHiddenElements(NewObjectDiagram diagram) { + + return diagram != null + + && (diagram.getHiddenNodes() != null && !diagram.getHiddenNodes().isEmpty() + + || diagram.getHiddenData() != null && !diagram.getHiddenData().getEdges().isEmpty()); + + } + + private boolean areAllSelectedObjectsGreyed(ObjectDiagramInteractor diagram, Set selectedObjects) { + + if (diagram == null || selectedObjects == null || selectedObjects.isEmpty()) { + + return false; + + } + + for (MObject obj : selectedObjects) { + + if (!diagram.isGreyed(obj)) { + + return false; + + } + + } + + return true; + + } + + private String safeName(MObject obj) { + + try { + + return obj == null ? "" : obj.name(); + + } catch (Exception e) { + + return ""; + + } + + } + + private String describeSelection(Set selectedObjects) { + + if (selectedObjects.isEmpty()) { + + return ""; + + } + + if (selectedObjects.size() == 1) { + + return safeName(selectedObjects.iterator().next()); + + } + + return selectedObjects.size() + " objects"; + + } + + private void hideOrWarn(NewObjectDiagramPresenter presenter, + + Set selectedObjects, + + Consumer> action) { + + if (selectedObjects.isEmpty()) { + + presenter.onStatusMessage("Select at least one object to perform this action."); + + return; + + } + + action.accept(selectedObjects); + + } + + private int[] radixConversion(int value, int radix, int length) { + + int[] digits = new int[length]; + + for (int i = 0; i < length; i++) { + + digits[i] = value % radix; + + value /= radix; + + } + + return digits; + + } + + private List> castQualifiers(List qualifiers) { + + if (qualifiers == null) { + // return empty list instead of null to simplify callers + return List.of(); + } + + List> casted = new ArrayList<>(qualifiers.size()); + + for (Object qualifier : qualifiers) { + if (qualifier instanceof List list) { + casted.add(list); + } else { + casted.add(List.of()); + + } + + } + + return casted; + + } + + private boolean isCompleteObjectCombination(int[] digits, int m) { + + boolean[] used = new boolean[m]; + + int usedCount = 0; + + for (int d : digits) { + + if (!used[d]) { + + used[d] = true; + + usedCount++; + } + } + return usedCount == m; + + } + +} \ No newline at end of file diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultPlacementRepository.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultPlacementRepository.java new file mode 100644 index 000000000..c04d2e18c --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DefaultPlacementRepository.java @@ -0,0 +1,271 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import com.ximpleware.AutoPilot; +import com.ximpleware.NavException; +import com.ximpleware.XPathEvalException; +import com.ximpleware.XPathParseException; +import org.tzi.use.gui.util.PersistHelper; +import org.tzi.use.gui.views.diagrams.elements.PlaceableNode; +import org.tzi.use.gui.views.diagrams.elements.edges.BinaryAssociationClassOrObject; +import org.tzi.use.gui.views.diagrams.elements.edges.BinaryAssociationOrLinkEdge; +import org.tzi.use.gui.views.diagrams.elements.edges.EdgeBase; +import org.tzi.use.uml.mm.MAssociation; +// removed unused imports +import org.tzi.use.uml.sys.*; +import org.w3c.dom.Element; + +import java.util.*; + +class DefaultPlacementRepository implements PlacementRepository { + + @Override + public void storeLayout(NewObjectDiagramModel model, + PersistHelper helper, + Element root) { + storePlacementInfos(helper, root, model.getVisibleData(), true); + storePlacementInfos(helper, root, model.getHiddenData(), false); + } + + private void storePlacementInfos(PersistHelper helper, Element root, NewObjectDiagram.ObjectDiagramData data, boolean visible) { + for (ObjectNode n : data.getObjectToNodeMap().values()) { + n.storePlacementInfo(helper, root, !visible); + } + + for (PlaceableNode n : data.getNaryLinkToDiamondNodeMap().values()) { + n.storePlacementInfo(helper, root, !visible); + } + + for (EdgeBase e : data.getBinaryLinkToEdgeMap().values()) { + e.storePlacementInfo(helper, root, !visible); + } + + for (EdgeBase e : data.getLinkObjectToNodeEdge().values()) { + e.storePlacementInfo(helper, root, !visible); + } + } + + @Override + public Set restoreLayout(NewObjectDiagramModel model, + PersistHelper helper, + int version, + MSystem system) { + Set hiddenObjects = new HashSet<>(); + if (version < 12) return hiddenObjects; + restoreBinaryEdges(helper, version, system, model.getVisibleData()); + restoreNodeEdges(helper, version, system, model.getVisibleData()); + restoreDiamondNodes(helper, version, system, model.getVisibleData(), hiddenObjects); + return hiddenObjects; + } + + private void restoreBinaryEdges(PersistHelper helper, int version, MSystem system, NewObjectDiagram.ObjectDiagramData visibleData) { + AutoPilot ap = new AutoPilot(helper.getNav()); + helper.getNav().push(); + try { + ap.selectXPath("./edge[@type='BinaryEdge']"); + while (ap.evalXPath() != -1) { + String name = helper.getElementStringValue("name"); + MAssociation assoc = system.model().getAssociation(name); + String sourceObjectName = helper.getElementStringValue("source"); + String targetObjectName = helper.getElementStringValue("target"); + + MObject sourceObject = system.state().objectByName(sourceObjectName); + MObject targetObject = system.state().objectByName(targetObjectName); + + if (assoc != null && sourceObject != null && targetObject != null) { + MLink link = resolveLink(helper, assoc, sourceObject, targetObject, system); + if (link != null) { + BinaryAssociationOrLinkEdge edge = visibleData.getBinaryLinkToEdgeMap().get(link); + if (edge != null) { + edge.restorePlacementInfo(helper, version); + } + } + } + } + } catch (XPathEvalException | NavException | XPathParseException e) { + // ignore layout restore issues to keep robust + } finally { + ap.resetXPath(); + helper.getNav().pop(); + } + } + + private void restoreNodeEdges(PersistHelper helper, int version, MSystem system, NewObjectDiagram.ObjectDiagramData visibleData) { + AutoPilot ap = new AutoPilot(helper.getNav()); + helper.getNav().push(); + try { + ap.selectXPath("./edge[@type='NodeEdge']"); + while (ap.evalXPath() != -1) { + String name = helper.getElementStringValue("name"); + MAssociation assoc = system.model().getAssociation(name); + String sourceObjectName = helper.getElementStringValue("source"); + String targetObjectName = helper.getElementStringValue("target"); + + MObject sourceObject = system.state().objectByName(sourceObjectName); + MObject targetObject = system.state().objectByName(targetObjectName); + + if (assoc != null && sourceObject != null && targetObject != null) { + MLink link = resolveLink(helper, assoc, sourceObject, targetObject, system); + if (link instanceof MLinkObject linkObj) { + EdgeBase tmp = visibleData.getLinkObjectToNodeEdge().get(linkObj); + if (tmp instanceof BinaryAssociationClassOrObject edge) { + edge.restorePlacementInfo(helper, version); + } + } + } + } + } catch (XPathEvalException | NavException | XPathParseException e) { + // ignore layout restore issues to keep robust + } finally { + ap.resetXPath(); + helper.getNav().pop(); + } + } + + private void restoreDiamondNodes(PersistHelper helper, int version, MSystem system, + NewObjectDiagram.ObjectDiagramData visibleData, + Set hiddenObjects) { + restoreObjectNodes(helper, version, system, visibleData, hiddenObjects); + restoreDiamondNodesForAssociations(helper, version, system, visibleData); + } + + private void restoreObjectNodes(PersistHelper helper, int version, MSystem system, + NewObjectDiagram.ObjectDiagramData visibleData, + Set hiddenObjects) { + AutoPilot ap = new AutoPilot(helper.getNav()); + helper.getNav().push(); + try { + ap.selectXPath("./node[@type='Object']"); + while (ap.evalXPath() != -1) { + String name = helper.getElementStringValue("name"); + MObject obj = system.state().objectByName(name); + if (obj != null) { + ObjectNode node = visibleData.getObjectToNodeMap().get(obj); + if (node != null) { + node.restorePlacementInfo(helper, version); + if (helper.getElementBooleanValue(org.tzi.use.gui.xmlparser.LayoutTags.HIDDEN)) { + hiddenObjects.add(obj); + } + } + } + } + } catch (XPathEvalException | NavException | XPathParseException e) { + // ignore + } finally { + ap.resetXPath(); + helper.getNav().pop(); + } + } + + private void restoreDiamondNodesForAssociations(PersistHelper helper, int version, MSystem system, + NewObjectDiagram.ObjectDiagramData visibleData) { + AutoPilot ap = new AutoPilot(helper.getNav()); + helper.getNav().push(); + try { + ap.selectXPath("./node[@type='DiamondNode']"); + while (ap.evalXPath() != -1) { + processDiamondNode(helper, version, system, visibleData); + } + } catch (XPathEvalException | NavException | XPathParseException e) { + // ignore + } finally { + ap.resetXPath(); + helper.getNav().pop(); + } + } + + private void processDiamondNode(PersistHelper helper, int version, MSystem system, + NewObjectDiagram.ObjectDiagramData visibleData) { + String name = helper.getElementStringValue("name"); + MAssociation assoc = system.model().getAssociation(name); + // Only proceed if association exists and there is at least one connectedNode child + if (assoc == null || !helper.toFirstChild("connectedNode")) { + return; + } + + List connectedObjects = new LinkedList<>(); + // collect all connectedNode children + do { + String objectName = helper.getElementStringValue(); + MObject obj = system.state().objectByName(objectName); + if (obj != null) { + connectedObjects.add(obj); + } + } while (helper.toNextSibling("connectedNode")); + + // only restore if number of connected objects matches association arity + if (assoc.associationEnds().size() == connectedObjects.size()) { + MLink link = system.state().linkBetweenObjects(assoc, connectedObjects, Collections.emptyList()); + if (link != null) { + var node = visibleData.getNaryLinkToDiamondNodeMap().get(link); + if (node != null) { + helper.toParent(); + node.restorePlacementInfo(helper, version); + } + } + } + } + + private MLink resolveLink(PersistHelper helper, MAssociation assoc, MObject source, MObject target, MSystem system) { + if (assoc.hasQualifiedEnds()) { + String linkValue = helper.getElementStringValue("linkValue"); + return getLinkByValue(assoc, Arrays.asList(source, target), linkValue, system); + } + return system.state().linkBetweenObjects(assoc, Arrays.asList(source, target), Collections.emptyList()); + } + + private MLink getLinkByValue(MAssociation assoc, List objects, String linkValue, MSystem system) { + if (assoc == null || objects == null) { + return null; + } + Set allLinks; + try { + allLinks = system.state().linksOfAssociation(assoc).links(); + } catch (Exception ex) { + return null; + } + if (allLinks == null || allLinks.isEmpty()) { + return null; + } + List matchingLinks = allLinks.stream() + .filter(Objects::nonNull) + .filter(l -> isMatchingLink(l, objects)) + .collect(java.util.stream.Collectors.toCollection(java.util.LinkedList::new)); + if (matchingLinks.isEmpty()) { + return null; + } + if (matchingLinks.size() == 1) { + return matchingLinks.getFirst(); + } + if (linkValue == null) { + return null; + } + for (MLink l : matchingLinks) { + String s = null; + try { + s = l.toString(); + } catch (Exception ignored) { + // toString may throw for certain link implementations; ignore and continue + } + if (Objects.equals(linkValue, s)) { + return l; + } + } + return null; + } + + /** + * Helper: checks whether link's linkedObjects equal given objects (by position). + */ + private boolean isMatchingLink(MLink l, List objects) { + List linked = l.linkedObjects(); + if (linked == null || linked.size() != objects.size()) { + return false; + } + for (int i = 0; i < linked.size(); i++) { + if (!Objects.equals(linked.get(i), objects.get(i))) { + return false; + } + } + return true; + } +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DiagramCanvas.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DiagramCanvas.java new file mode 100644 index 000000000..a80abec67 --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DiagramCanvas.java @@ -0,0 +1,29 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import javax.swing.JComponent; +import javax.swing.JPopupMenu; + + +/** + * Placeholder canvas implementing the view interface. Rendering will be migrated later. + */ +public class DiagramCanvas extends JComponent implements NewObjectDiagramUI { + + // Intentionally inherit default paintComponent implementation. + + @Override + public void showPopup(JPopupMenu popup) { + popup.show(this, getWidth() / 2, getHeight() / 2); + } + + @Override + public void refresh() { + revalidate(); + repaint(); + } + + @Override + public void setStatus(String status) { + // status handling will be delegated by the higher-level view + } +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DiagramContext.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DiagramContext.java new file mode 100644 index 000000000..b4b155159 --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/DiagramContext.java @@ -0,0 +1,28 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import org.tzi.use.gui.main.ModelBrowser; +import org.tzi.use.uml.mm.MAssociation; +import org.tzi.use.uml.sys.MLink; +import org.tzi.use.uml.sys.MObject; +import org.tzi.use.uml.sys.MSystem; + +import java.awt.event.KeyListener; +import java.awt.Font; +import java.util.Set; + +/** + * Minimal host context for the object diagram to reduce direct coupling to the view. + */ +public interface DiagramContext { + MSystem system(); + ModelBrowser getModelBrowser(); + boolean isSelectedView(); + void addKeyListener(KeyListener listener); + Font getFont(); + void setFont(Font font); + void createObject(String className); + void insertLink(MAssociation association, MObject[] objects); + void deleteLink(MLink link); + void deleteObjects(Set objects); + void resetDiagram(ObjDiagramOptions options); +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagram.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagram.java index c45416f98..3bc120efc 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagram.java +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagram.java @@ -19,7 +19,6 @@ package org.tzi.use.gui.views.diagrams.objectdiagram; -import static org.tzi.use.util.collections.CollectionUtil.exactlyOne; import java.awt.*; import java.awt.datatransfer.DataFlavor; @@ -27,56 +26,41 @@ import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.dnd.DnDConstants; import java.awt.dnd.DropTargetDropEvent; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; +// removed unused ActionEvent import import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; -import java.awt.event.ItemEvent; -import java.awt.event.ItemListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.geom.Point2D; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; +import java.security.SecureRandom; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; -import java.util.WeakHashMap; -import javax.swing.AbstractAction; -import javax.swing.Action; +// action helper classes were moved to context menu provider import javax.swing.BorderFactory; import javax.swing.Box; -import javax.swing.JCheckBoxMenuItem; import javax.swing.JComponent; import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JPopupMenu; -import javax.swing.JSeparator; import javax.swing.JWindow; import javax.swing.SwingUtilities; import javax.swing.border.Border; -import javafx.application.Platform; -import javafx.embed.swing.SwingNode; import org.tzi.use.gui.main.MainWindow; +// ModelBrowser is accessed via constructor parameter now import org.tzi.use.gui.main.ModelBrowserSorting; -import org.tzi.use.gui.main.ModelBrowserSorting.SortChangeEvent; import org.tzi.use.gui.main.ModelBrowserSorting.SortChangeListener; -import org.tzi.use.gui.main.ViewFrame; import org.tzi.use.gui.util.PersistHelper; import org.tzi.use.gui.views.ObjectPropertiesView; -import org.tzi.use.gui.views.diagrams.DiagramType; import org.tzi.use.gui.views.diagrams.DiagramViewWithObjectNode; import org.tzi.use.gui.views.diagrams.elements.AssociationName; import org.tzi.use.gui.views.diagrams.elements.DiamondNode; @@ -88,96 +72,73 @@ import org.tzi.use.gui.views.diagrams.elements.edges.LinkEdge; import org.tzi.use.gui.views.diagrams.elements.edges.NAryAssociationClassOrObjectEdge; import org.tzi.use.gui.views.diagrams.elements.positioning.PositionStrategy; -import org.tzi.use.gui.views.diagrams.elements.positioning.StrategyFixed; import org.tzi.use.gui.views.diagrams.event.ActionLoadLayout; import org.tzi.use.gui.views.diagrams.event.ActionSaveLayout; import org.tzi.use.gui.views.diagrams.event.DiagramInputHandling; import org.tzi.use.gui.views.diagrams.event.HighlightChangeEvent; import org.tzi.use.gui.views.diagrams.event.HighlightChangeListener; import org.tzi.use.gui.views.selection.objectselection.ObjectSelection; -import org.tzi.use.gui.xmlparser.LayoutTags; import org.tzi.use.uml.mm.MAssociation; -import org.tzi.use.uml.mm.MAssociationClass; -import org.tzi.use.uml.mm.MAssociationClassImpl; import org.tzi.use.uml.mm.MAttribute; import org.tzi.use.uml.mm.MClass; import org.tzi.use.uml.mm.MModelElement; -import org.tzi.use.uml.mm.MNamedElementComparator; -import org.tzi.use.uml.mm.statemachines.MProtocolStateMachine; import org.tzi.use.uml.ocl.value.Value; import org.tzi.use.uml.sys.*; -import org.tzi.use.util.StringUtil; -import org.tzi.use.util.StringUtil.IElementFormatter; +// StringUtil usages moved/removed with context-menu refactor import org.w3c.dom.Element; -import com.ximpleware.AutoPilot; -import com.ximpleware.NavException; -import com.ximpleware.XPathEvalException; -import com.ximpleware.XPathParseException; - /** * A panel drawing UML object diagrams. * * @author Mark Richters * @author Lars Hamann */ -@SuppressWarnings("serial") -public class NewObjectDiagram extends DiagramViewWithObjectNode implements HighlightChangeListener, SortChangeListener { +public class NewObjectDiagram extends DiagramViewWithObjectNode implements HighlightChangeListener, SortChangeListener, ObjectDiagramInteractor { /** * This class saves needed information about visible or hidden nodes and * edges. When hiding or showing objects the data is moved between the * fields {@link NewObjectDiagram#visibleData} and * {@link NewObjectDiagram#hiddenData}. - * + * * @author Lars Hamann */ public static class ObjectDiagramData implements DiagramData { - /** - * Map from object instances to object nodes. It also includes link - * objects. - */ - public Map fObjectToNodeMap; - /** - * - */ - public Map fBinaryLinkToEdgeMap; - /** - * - */ - public Map fNaryLinkToDiamondNodeMap; - /** - * - */ - public Map> fHalfLinkToEdgeMap; - /** - * - */ - public Map fLinkObjectToNodeEdge; + // internal maps; keep them private and provide accessors + private final Map fObjectToNodeMap; + private final Map fBinaryLinkToEdgeMap; + private final Map fNaryLinkToDiamondNodeMap; + private final Map> fHalfLinkToEdgeMap; + private final Map fLinkObjectToNodeEdge; /** - * + * Creates an empty set of diagram data */ public ObjectDiagramData() { - fObjectToNodeMap = new HashMap(); - fBinaryLinkToEdgeMap = new HashMap(); - fNaryLinkToDiamondNodeMap = new HashMap(); - fHalfLinkToEdgeMap = new HashMap>(); - fLinkObjectToNodeEdge = new HashMap(); + fObjectToNodeMap = new HashMap<>(); + fBinaryLinkToEdgeMap = new HashMap<>(); + fNaryLinkToDiamondNodeMap = new HashMap<>(); + fHalfLinkToEdgeMap = new HashMap<>(); + fLinkObjectToNodeEdge = new HashMap<>(); } /** - * @param link - * @return + * Checks whether this diagram data contains the given link. + * + * @param link the link to test + * @return true if this data contains an edge or node representing the link */ public boolean containsLink(MLink link) { - return fBinaryLinkToEdgeMap.containsKey(link) || fNaryLinkToDiamondNodeMap.containsKey(link) - || fLinkObjectToNodeEdge.containsKey(link); + boolean has = fBinaryLinkToEdgeMap.containsKey(link) || fNaryLinkToDiamondNodeMap.containsKey(link); + if (!has && link instanceof MLinkObject ml) { + has = fLinkObjectToNodeEdge.containsKey(ml); + } + return has; } @Override public Set getNodes() { - Set result = new HashSet(); + Set result = new HashSet<>(); result.addAll(this.fNaryLinkToDiamondNodeMap.values()); result.addAll(this.fObjectToNodeMap.values()); @@ -192,7 +153,7 @@ public boolean hasNodes() { @Override public Set getEdges() { - Set result = new HashSet(fBinaryLinkToEdgeMap.values()); + Set result = new HashSet<>(fBinaryLinkToEdgeMap.values()); result.addAll(fLinkObjectToNodeEdge.values()); for (Map.Entry> entry : fHalfLinkToEdgeMap.entrySet()) { result.addAll(entry.getValue()); @@ -202,9 +163,10 @@ public Set getEdges() { /** * Copies all data to the target object - * - * @param hiddenData + * + * @param target the target ObjectDiagramData to copy the data into */ + @SuppressWarnings("unused") public void copyTo(ObjectDiagramData target) { target.fBinaryLinkToEdgeMap.putAll(this.fBinaryLinkToEdgeMap); target.fHalfLinkToEdgeMap.putAll(this.fHalfLinkToEdgeMap); @@ -223,52 +185,97 @@ public void clear() { this.fNaryLinkToDiamondNodeMap.clear(); this.fObjectToNodeMap.clear(); } + + // Accessors to preserve encapsulation + public Map getObjectToNodeMap() { + return fObjectToNodeMap; + } + + public Map getBinaryLinkToEdgeMap() { + return fBinaryLinkToEdgeMap; + } + + public Map getNaryLinkToDiamondNodeMap() { + return fNaryLinkToDiamondNodeMap; + } + + public Map> getHalfLinkToEdgeMap() { + return fHalfLinkToEdgeMap; + } + + public Map getLinkObjectToNodeEdge() { + return fLinkObjectToNodeEdge; + } } - protected ObjectDiagramData visibleData = new ObjectDiagramData(); + private transient ObjectDiagramData visibleData = new ObjectDiagramData(); - private ObjectDiagramData hiddenData = new ObjectDiagramData(); + private transient ObjectDiagramData hiddenData = new ObjectDiagramData(); - private NewObjectDiagramView fParent; + private final transient DiagramContext context; + private final transient NewObjectDiagramView view; + private transient NewObjectDiagramModel model; + private transient MSystem system; + private final transient java.util.function.BooleanSupplier isSelectedView; /** * The position of the next object node. This is either set to a random * value or to a specific position when an object is created by drag & drop. */ - protected Point2D.Double nextNodePosition = new Point2D.Double(); + protected transient Point2D.Double nextNodePosition = new Point2D.Double(); - /** - * Last position of deleted nodes and links. In case of restoration, the - * nodes (object nodes, linkobject nodes) are positioned as they were - * before. Objects use {@link StrategyFixed}, so we just save the position. - */ - private Map lastKnownNodePositions = new WeakHashMap<>(); - private Map lastKnownLinkPositions = new WeakHashMap<>(); + // show object properties listener is attached inline in constructor (no field required) - protected ShowObjectPropertiesViewMouseListener showObjectPropertiesViewMouseListener = new ShowObjectPropertiesViewMouseListener(); + private final transient ObjectSelection fSelection; - private ObjectSelection fSelection; + protected final transient DiagramInputHandling inputHandling; - protected DiagramInputHandling inputHandling; + // JavaFX mode is tracked in MainWindow; delegate setter to central place. - private static Boolean javaFxCall = false; + /** Presenter reference for incremental MVP refactor. */ + private transient NewObjectDiagramPresenter presenter; + + /** Secure random used for non-security-sensitive random layout choices. Replaces ThreadLocalRandom to satisfy Sonar rule S2245. */ + private static final SecureRandom SECURE_RANDOM = new SecureRandom(); + + private MSystem system() { + return system; + } + + public void setPresenter(NewObjectDiagramPresenter presenter) { + this.presenter = presenter; + if (presenter instanceof NewObjectDiagramPresenterImpl p) { + this.model = p.getModel(); + this.system = p.getSystem(); + } + rebindModelData(); + } + + public NewObjectDiagramPresenter getPresenter() { + return presenter; + } /** * Creates a new empty diagram. */ - NewObjectDiagram(NewObjectDiagramView parent, PrintWriter log) { + NewObjectDiagram(DiagramContext parent, PrintWriter log) { this(parent, log, new ObjDiagramOptions()); } - protected NewObjectDiagram(NewObjectDiagramView parent, PrintWriter log, ObjDiagramOptions options) { + protected NewObjectDiagram(DiagramContext parent, PrintWriter log, ObjDiagramOptions options) { super(options, log); this.getRandomNextPosition(); - fParent = parent; - // FIXME: Handle fonts! - parent.setFont(getFont()); + context = parent; + view = (parent instanceof NewObjectDiagramView v) ? v : null; + this.system = parent.system(); + this.isSelectedView = parent::isSelectedView; + this.model = new NewObjectDiagramModel(); + rebindModelData(); - fSelection = new ObjectSelection(this, parent.system()); + // Font is component-local; no context propagation needed + + fSelection = new ObjectSelection(this, system()); fActionSaveLayout = new ActionSaveLayout("USE object diagram layout", "olt", this); @@ -276,14 +283,26 @@ protected NewObjectDiagram(NewObjectDiagramView parent, PrintWriter log, ObjDiag inputHandling = new DiagramInputHandling(fNodeSelection, fEdgeSelection, this); - fParent.getModelBrowser().addHighlightChangeListener(this); + parent.getModelBrowser().addHighlightChangeListener(this); ModelBrowserSorting.getInstance().addSortChangeListener(this); - fParent.addKeyListener(inputHandling); + addKeyListener(inputHandling); addMouseListener(inputHandling); - addMouseListener(showObjectPropertiesViewMouseListener); + addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() == 2) { + PlaceableNode pickedObjectNode = findNode(e.getX(), e.getY()); + if (pickedObjectNode instanceof ObjectNode on) { + ObjectPropertiesView v = MainWindow.instance().showObjectPropertiesView(); + v.selectObject(on.object().name()); + } + } + } + }); addComponentListener(new ComponentAdapter() { + @Override public void componentResized(ComponentEvent e) { // need a new layouter to adapt to new window size fLayouter = null; @@ -298,109 +317,94 @@ public ObjDiagramOptions getOptions() { return (ObjDiagramOptions) super.getOptions(); } - public ObjectSelection getObjectSelection() { - return this.fSelection; + @Override + public void setShowStates(boolean show) { + getOptions().setShowStates(show); + invalidateContent(true); + } + + @Override + public boolean isShowStates() { + return getOptions().isShowStates(); + } + + @Override + public void setGreyed(MObject obj, boolean greyed) { + ObjectNode node = visibleData.getObjectToNodeMap().get(obj); + if (node != null) { + node.setGreyed(greyed); + repaint(); + } + } + + @Override + public boolean isGreyed(MObject obj) { + ObjectNode node = visibleData.getObjectToNodeMap().get(obj); + return node != null && node.isGreyed(); } /** * Displays objects of the selected class in the modelbrowser. */ public void stateChanged(HighlightChangeEvent e) { - if (!fParent.isSelectedView()) { + if (presenter != null) { + presenter.onHighlightChange(e); return; } + handleHighlightChange(e); + } - MModelElement elem = e.getModelElement(); - List edges = new ArrayList(); - boolean allEdgesSelected = true; - - // elem is an association - if (elem != null && elem instanceof MAssociation) { - MAssociation assoc = (MAssociation) elem; - int size = assoc.associationEnds().size(); - - Set links = fParent.system().state().linksOfAssociation(assoc).links(); - EdgeBase eb = null; + /** Shared highlight handler used by presenter or direct fallback. */ + public void handleHighlightChange(HighlightChangeEvent e) { + if (e == null || !isSelectedView.getAsBoolean()) { + return; + } - if (size == 2) { - for (MLink link : links) { - eb = visibleData.fBinaryLinkToEdgeMap.get(link); - if (elem instanceof MAssociationClass) { - eb = visibleData.fLinkObjectToNodeEdge.get(link); - } - edges.add(eb); - } - } else { - for (MLink link : links) { - edges.addAll(visibleData.fHalfLinkToEdgeMap.get(link)); + MModelElement elem = e.getModelElement(); + Set selectedObjects = new HashSet<>(); + Set selectedLinks = new HashSet<>(); - if (elem instanceof MAssociationClass) { - eb = visibleData.fLinkObjectToNodeEdge.get(link); - edges.add(eb); - } - } - } + if (elem instanceof MAssociation assoc) { + Set links = presenter != null ? presenter.fetchLinksOfAssociation(assoc) + : system().state().linksOfAssociation(assoc).links(); + selectedLinks.addAll(links); + } - // check all edges in the list if they are suppose to be selected - // or deselected. - for (EdgeBase edge : edges) { - if (edge != null) { - if (e.getHighlight()) { - fEdgeSelection.add(edge); - allEdgesSelected = true; - } else { - fEdgeSelection.remove(edge); - allEdgesSelected = false; - } - } - } + if (elem instanceof MClass mclass) { + Set objs = presenter != null ? presenter.fetchObjectsOfClass(mclass) + : system().state().objectsOfClass(mclass); + selectedObjects.addAll(objs); } - // elem is a class - if (elem != null && elem instanceof MClass) { - for (MObject obj : fParent.system().state().objectsOfClass((MClass) elem)) { - PlaceableNode node = visibleData.fObjectToNodeMap.get(obj); - if (elem instanceof MAssociationClass) { - if (e.getHighlight() && allEdgesSelected) { - fNodeSelection.add(node); - } else { - fNodeSelection.remove(node); - } - } else { - if (e.getHighlight()) { - fNodeSelection.add(node); - } else { - fNodeSelection.remove(node); - } - } - } - } + if (!e.getHighlight()) { + selectedObjects.clear(); + selectedLinks.clear(); + } - invalidateContent(true); + model.replaceSelection(selectedObjects, selectedLinks); + applySelectionFromModel(); + invalidateContent(true); } /** * Shows all hidden elements again */ public void showAll() { - while (!hiddenData.fObjectToNodeMap.isEmpty()) { - showObject(hiddenData.fObjectToNodeMap.keySet().iterator().next()); + while (!hiddenData.getObjectToNodeMap().isEmpty()) { + showObject(hiddenData.getObjectToNodeMap().keySet().iterator().next()); } } - /** - * Hides all currently visible elements. The diagram is not repainted! - */ public void hideAll() { - Set objects = new HashSet<>(this.visibleData.fObjectToNodeMap.keySet()); - objects.forEach(obj -> hideObject(obj)); + Set objects = new HashSet<>(this.visibleData.getObjectToNodeMap().keySet()); + objects.forEach(this::hideObject); } /** * Hides all currently visible links. The diagram is not repainted! */ public void hideAllLinks() { - Set links = new HashSet<>(this.visibleData.fBinaryLinkToEdgeMap.keySet()); + Set links = new HashSet<>(this.visibleData.getBinaryLinkToEdgeMap().keySet()); for (MLink e : links) { hideBinaryLink(e); @@ -410,10 +414,10 @@ public void hideAllLinks() { // Hide HalfLinks // HalfLinks used by TernaryAssoc - links.addAll(this.visibleData.fHalfLinkToEdgeMap.keySet()); + links.addAll(this.visibleData.getHalfLinkToEdgeMap().keySet()); // Hide LinkObject - links.addAll(this.visibleData.fLinkObjectToNodeEdge.keySet()); + links.addAll(this.visibleData.getLinkObjectToNodeEdge().keySet()); for (MLink e : links) { hideLink(e); } @@ -421,7 +425,7 @@ public void hideAllLinks() { links.clear(); // Hide NaryLinks - links.addAll(this.visibleData.fNaryLinkToDiamondNodeMap.keySet()); + links.addAll(this.visibleData.getNaryLinkToDiamondNodeMap().keySet()); for (MLink e : links) { hideNAryLink(e); } @@ -433,81 +437,91 @@ public void hideAllLinks() { * Shows all currently invisible links. The diagram is not repainted! */ public void showAllLinks() { - for (MAssociation assoc : fParent.system().model().associations()) { - showLink(new ArrayList<>(fParent.system().state().linksOfAssociation(assoc).links())); - } + Collection assocs = presenter != null ? presenter.fetchAllAssociations() + : system().model().associations(); + for (MAssociation assoc : assocs) { + Set links = presenter != null ? presenter.fetchLinksOfAssociation(assoc) + : system().state().linksOfAssociation(assoc).links(); + for (MLink link : links) { + showLink(link); + } + } } /** * Adds an object to the diagram. */ + @Override public void addObject(MObject obj) { - ObjectNode n = new ObjectNode(obj, fParent, getOptions()); + ObjectNode n = new ObjectNode(obj, view, getOptions()); n.setMinWidth(minClassNodeWidth); n.setMinHeight(minClassNodeHeight); - if (lastKnownNodePositions.containsKey(obj)) { - n.moveToPosition(lastKnownNodePositions.get(obj)); - lastKnownNodePositions.remove(obj); + Map nodeCache = nodePositionCache(); + if (nodeCache.containsKey(obj)) { + n.moveToPosition(nodeCache.get(obj)); + nodeCache.remove(obj); } else { n.setPosition(nextNodePosition); getRandomNextPosition(); } fGraph.add(n); - visibleData.fObjectToNodeMap.put(obj, n); + visibleData.getObjectToNodeMap().put(obj, n); + // state stored in model via visibleData reference fLayouter = null; } /** * Shows an already hidden object again - * - * @param obj - * The object to show + * + * @param obj The object to show */ public void showObject(MObject obj) { - if (visibleData.fObjectToNodeMap.containsKey(obj)) + if (visibleData.getObjectToNodeMap().containsKey(obj)) return; showOrHideObjectNode(obj, true); - boolean isLinkObject = false; + boolean isLinkObject = obj instanceof MLinkObject; Set assocs = obj.cls().allAssociations(); - if (obj instanceof MLinkObject) { + if (isLinkObject) { assocs.add((MAssociation) obj.cls()); - isLinkObject = true; } - // Show all links the object participates in, - // when all other objects are visible, too. for (MAssociation assoc : assocs) { - MLinkSet links = fParent.system().state().linksOfAssociation(assoc); - // TODO: Not very fast! - for (MLink link : links.links()) { - if (link.linkedObjects().contains(obj) || (isLinkObject && link.equals(obj))) { - boolean allVisible = true; - for (MObject linkedO : link.linkedObjects()) { - if (!visibleData.fObjectToNodeMap.containsKey(linkedO)) { - allVisible = false; - break; - } - } + showLinksForAssociation(obj, assoc, isLinkObject); + } + } - if (allVisible && (!isLinkObject || visibleData.fObjectToNodeMap.containsKey(obj))) - showLink(link); + private void showLinksForAssociation(MObject obj, MAssociation assoc, boolean isLinkObject) { + Set links = presenter != null ? presenter.fetchLinksOfAssociation(assoc) + : system().state().linksOfAssociation(assoc).links(); + for (MLink link : links) { + if (!link.linkedObjects().contains(obj) && !(isLinkObject && link.equals(obj))) { + continue; + } + boolean allVisible = true; + for (MObject linkedO : link.linkedObjects()) { + if (!visibleData.getObjectToNodeMap().containsKey(linkedO)) { + allVisible = false; + break; } } + if (allVisible && (!isLinkObject || visibleData.getObjectToNodeMap().containsKey(obj))) { + showLink(link); + } } } @Override public void moveObjectNode(MObject obj, int x, int y) { PlaceableNode node = null; - if (visibleData.fObjectToNodeMap.containsKey(obj)) { - node = visibleData.fObjectToNodeMap.get(obj); - } else if (hiddenData.fObjectToNodeMap.containsKey(obj)) { - node = hiddenData.fObjectToNodeMap.get(obj); + if (visibleData.getObjectToNodeMap().containsKey(obj)) { + node = visibleData.getObjectToNodeMap().get(obj); + } else if (hiddenData.getObjectToNodeMap().containsKey(obj)) { + node = hiddenData.getObjectToNodeMap().get(obj); } if (node != null) { node.moveToPosition(x, y); @@ -516,32 +530,30 @@ public void moveObjectNode(MObject obj, int x, int y) { /** * Hides an object in the diagram - * - * @param obj - * The MObject to hide + * + * @param obj The MObject to hide */ public void hideObject(MObject obj) { // a hidden object should no longer be selected - ObjectNode removedNode = visibleData.fObjectToNodeMap.get(obj); - if(removedNode!=null) { - fNodeSelection.remove(removedNode); + ObjectNode removedNode = visibleData.getObjectToNodeMap().get(obj); + if (removedNode != null) { + Set remainingObjects = new HashSet<>(model.getSelectedObjects()); + remainingObjects.remove(obj); + model.replaceSelection(remainingObjects, model.getSelectedLinks()); + applySelectionFromModel(); } - - showOrHideObjectNode(obj, false); + showOrHideObjectNode(obj, false); // Hide all links the object participates in Set assocs = obj.cls().allAssociations(); - if (obj instanceof MLinkObject) { assocs.add((MAssociation) obj.cls()); } - for (MAssociation assoc : assocs) { - MLinkSet links = fParent.system().state().linksOfAssociation(assoc); - // TODO: Not very fast! - for (MLink link : links.links()) { - if (link.linkedObjects().contains(obj) - || (link instanceof MLinkObject && ((MLinkObject) link).equals(obj))) { + Set links = presenter != null ? presenter.fetchLinksOfAssociation(assoc) + : system().state().linksOfAssociation(assoc).links(); + for (MLink link : links) { + if (link.linkedObjects().contains(obj) || (link instanceof MLinkObject && link.equals(obj))) { hideLink(link); } } @@ -554,47 +566,42 @@ public void hideObject(MObject obj) { * Shows an already hidden class. */ protected void showOrHideObjectNode(MObject obj, boolean show) { - ObjectDiagramData source = (show ? hiddenData : visibleData); - ObjectDiagramData target = (show ? visibleData : hiddenData); - - ObjectNode n = source.fObjectToNodeMap.get(obj); - + ObjectNode n = (show ? hiddenData : visibleData).getObjectToNodeMap().get(obj); if (n != null) { - if (show) + if (show) { fGraph.add(n); - else + } else { fGraph.remove(n); - - source.fObjectToNodeMap.remove(obj); - target.fObjectToNodeMap.put(obj, n); - - fLayouter = null; + } + model.moveObject(obj, show); } } /** * Deletes an object from the diagram. */ + @Override public void deleteObject(MObject obj) { + ObjectNode n; boolean isVisible; - if (visibleData.fObjectToNodeMap.containsKey(obj)) { - n = visibleData.fObjectToNodeMap.get(obj); + if (visibleData.getObjectToNodeMap().containsKey(obj)) { + n = visibleData.getObjectToNodeMap().get(obj); isVisible = true; } else { - n = hiddenData.fObjectToNodeMap.get(obj); + n = hiddenData.getObjectToNodeMap().get(obj); isVisible = false; } if (n != null) { - lastKnownNodePositions.put(obj, n.getPosition()); + nodePositionCache().put(obj, n.getPosition()); if (isVisible) { fGraph.remove(n); - visibleData.fObjectToNodeMap.remove(obj); + visibleData.getObjectToNodeMap().remove(obj); fLayouter = null; } else { - hiddenData.fObjectToNodeMap.remove(obj); + hiddenData.getObjectToNodeMap().remove(obj); } n.dispose(); } @@ -603,6 +610,7 @@ public void deleteObject(MObject obj) { /** * Adds a link to the diagram. */ + @Override public void addLink(MLink link) { if (link.linkEnds().size() == 2) { addBinaryLink(link); @@ -611,86 +619,12 @@ public void addLink(MLink link) { } } - protected void addBinaryLink(MLink link) { - MAssociation assoc = link.association(); - - MLinkEnd linkEnd1 = link.linkEnd(assoc.associationEnds().get(0)); - MLinkEnd linkEnd2 = link.linkEnd(assoc.associationEnds().get(1)); - - MObject obj1 = linkEnd1.object(); - MObject obj2 = linkEnd2.object(); - // TODO: Create link edge factory. - - // object link - if (link instanceof MLinkObject) { - BinaryAssociationClassOrObject e = BinaryAssociationClassOrObject.create( - visibleData.fObjectToNodeMap.get(obj1), visibleData.fObjectToNodeMap.get(obj2), - linkEnd1, linkEnd2, visibleData.fObjectToNodeMap.get(link), this, - link); - - if (lastKnownLinkPositions.containsKey(link)) { - e.initialize(); - visibleData.fObjectToNodeMap.get(link).setStrategy(lastKnownLinkPositions.get(link)); - lastKnownLinkPositions.remove(link); - fGraph.addInitializedEdge(e); - } else { - fGraph.addEdge(e); - } - visibleData.fLinkObjectToNodeEdge.put((MLinkObject) link, e); - fLayouter = null; - } else { - // binary link - boolean isHidden = false; - ObjectNode node1; - ObjectNode node2; - - if (visibleData.fObjectToNodeMap.containsKey(obj1)) { - node1 = visibleData.fObjectToNodeMap.get(obj1); - } else { - node1 = hiddenData.fObjectToNodeMap.get(obj1); - isHidden = true; - } - - if (visibleData.fObjectToNodeMap.containsKey(obj2)) { - node2 = visibleData.fObjectToNodeMap.get(obj2); - } else { - node2 = hiddenData.fObjectToNodeMap.get(obj2); - isHidden = true; - } - - BinaryAssociationOrLinkEdge e = createBinaryAssociationOrLinkEdge(node1, node2, linkEnd1, - linkEnd2, this, link); - - if (link.isVirtual()) { - e.setDashed(true); - } - - if (isHidden) { - hiddenData.fBinaryLinkToEdgeMap.put(link, e); - } else { - fGraph.addEdge(e); - visibleData.fBinaryLinkToEdgeMap.put(link, e); - fLayouter = null; - } - } - } - - /** - * This part is a separate method for easier inheritance. - * - * @author Andreas Kaestner - */ - protected BinaryAssociationOrLinkEdge createBinaryAssociationOrLinkEdge(PlaceableNode source, PlaceableNode target, - MLinkEnd sourceEnd, MLinkEnd targetEnd, NewObjectDiagram diagram, MLink link) { - return BinaryAssociationOrLinkEdge.create(source, target, sourceEnd, targetEnd, diagram, link); - } - protected void addNAryLink(MLink link) { getRandomNextPosition(); - - List linkedObjectNodes = new ArrayList(); - for(MObject linkedObject : link.linkedObjects()) { - linkedObjectNodes.add(visibleData.fObjectToNodeMap.get(linkedObject)); + + List linkedObjectNodes = new ArrayList<>(); + for (MObject linkedObject : link.linkedObjects()) { + linkedObjectNodes.add(visibleData.getObjectToNodeMap().get(linkedObject)); } // n-ary link: create a diamond node and n edges to objects @@ -699,22 +633,22 @@ protected void addNAryLink(MLink link) { fGraph.add(node); // connected to an "object link" - if (link instanceof MLinkObject) { + if (link instanceof MLinkObject ml) { NAryAssociationClassOrObjectEdge e = NAryAssociationClassOrObjectEdge.create(node, - visibleData.fObjectToNodeMap.get(link), this, link.association(), true); + visibleData.getObjectToNodeMap().get(ml), this, link.association(), true); fGraph.addEdge(e); - visibleData.fLinkObjectToNodeEdge.put((MLinkObject) link, e); + visibleData.getLinkObjectToNodeEdge().put(ml, e); fLayouter = null; } // connected to a "normal" link - visibleData.fNaryLinkToDiamondNodeMap.put(link, node); + visibleData.getNaryLinkToDiamondNodeMap().put(link, node); List halfEdges = new ArrayList<>(); List edgeIds = new ArrayList<>(); for (MLinkEnd linkEnd : link.linkEnds()) { MObject obj = linkEnd.object(); - AssociationOrLinkPartEdge e = AssociationOrLinkPartEdge.create(node, visibleData.fObjectToNodeMap.get(obj), + AssociationOrLinkPartEdge e = AssociationOrLinkPartEdge.create(node, visibleData.getObjectToNodeMap().get(obj), linkEnd.associationEnd(), this, link.association(), link); if (link.isVirtual()) { @@ -726,28 +660,35 @@ protected void addNAryLink(MLink link) { edgeIds.add(linkEnd.associationEnd().nameAsRolename()); } - if (visibleData.fLinkObjectToNodeEdge.get(link) != null) { - halfEdges.add(visibleData.fLinkObjectToNodeEdge.get(link)); - edgeIds.add(((MLinkObject) link).name()); + // If there is an associated link-object edge, add it once (avoid duplicate map access) + EdgeBase linkObjEdge = null; + String linkObjName = null; + if (link instanceof MLinkObject ml) { + linkObjEdge = visibleData.getLinkObjectToNodeEdge().get(ml); + linkObjName = ml.name(); + } + if (linkObjEdge != null) { + halfEdges.add(linkObjEdge); + edgeIds.add(linkObjName); } node.setHalfEdges(halfEdges, edgeIds); - visibleData.fHalfLinkToEdgeMap.put(link, halfEdges); + visibleData.getHalfLinkToEdgeMap().put(link, halfEdges); fLayouter = null; } /** * Show one link. The diagram is not repainted! - * - * @param link + * + * @param link the link to show */ public void showLink(MLink link) { if (visibleData.containsLink(link)) return; - if (link instanceof MLinkObject) { - showObject((MObject) link); + if (link instanceof MLinkObject ml) { + showObject(ml); } if (visibleData.containsLink(link)) @@ -766,8 +707,8 @@ public void showLink(MLink link) { /** * Hide one link. The diagram is not repainted! - * - * @param link + * + * @param link the link to hide */ public void hideLink(MLink link) { if (hiddenData.containsLink(link)) @@ -780,8 +721,8 @@ public void hideLink(MLink link) { } // Hide Linkobject, if link has a linkobject - if (link instanceof MLinkObject && visibleData.fObjectToNodeMap.containsKey(link)) { - hideObject((MObject) link); + if (link instanceof MLinkObject ml && visibleData.getObjectToNodeMap().containsKey(ml)) { + hideObject(ml); } } @@ -802,654 +743,213 @@ protected void hideNAryLink(MLink link) { } protected void showOrHideBinaryLink(MLink link, boolean show) { - ObjectDiagramData source = (show ? hiddenData : visibleData); - ObjectDiagramData target = (show ? visibleData : hiddenData); - // object link - if (link instanceof MLinkObject) { - EdgeBase e = source.fLinkObjectToNodeEdge.get(link); - if (show && e != null) - fGraph.addInitializedEdge(e); - else if (e != null) - fGraph.removeEdge(e); - - source.fLinkObjectToNodeEdge.remove(link); - target.fLinkObjectToNodeEdge.put((MLinkObject) link, e); - fLayouter = null; + if (link instanceof MLinkObject ml) { + EdgeBase e = model.moveLinkObjectEdge(ml, show); + if (e != null) { + if (show) { + fGraph.addInitializedEdge(e); + } else { + fGraph.removeEdge(e); + } + fLayouter = null; + } } else { - // binary link - BinaryAssociationOrLinkEdge e = source.fBinaryLinkToEdgeMap.get(link); - - if (show && e != null) { - fGraph.addEdge(e); - } else if (e != null) { - fGraph.removeEdge(e); + BinaryAssociationOrLinkEdge e = model.moveBinaryLink(link, show); + if (e != null) { + if (show) { + fGraph.addEdge(e); + } else { + fGraph.removeEdge(e); + } + fLayouter = null; } - source.fBinaryLinkToEdgeMap.remove(link); - target.fBinaryLinkToEdgeMap.put(link, e); } } protected void showOrHideNAryLink(MLink link, boolean show) { - ObjectDiagramData source = (show ? hiddenData : visibleData); - ObjectDiagramData target = (show ? visibleData : hiddenData); - - DiamondNode node = source.fNaryLinkToDiamondNodeMap.get(link); - if (show){ - if (node == null){ - node = target.fNaryLinkToDiamondNodeMap.get(link); - } - fGraph.add(node); - } else { - fGraph.remove(node); + DiamondNode node = model.moveNaryLinkNode(link, show); + if (node != null) { + if (show) { + fGraph.add(node); + } else { + fGraph.remove(node); + } } - target.fNaryLinkToDiamondNodeMap.put(link, node); - source.fNaryLinkToDiamondNodeMap.remove(link); - - - // connected to an "object link" - if (link instanceof MLinkObject) { - EdgeBase e = source.fLinkObjectToNodeEdge.get(link); + if (link instanceof MLinkObject ml) { + EdgeBase e = model.moveLinkObjectEdge(ml, show); if (e != null) { - if (show) - fGraph.addEdge(e); - else - fGraph.removeEdge(e); - - source.fLinkObjectToNodeEdge.remove(link); - target.fLinkObjectToNodeEdge.put((MLinkObject) link, e); - fLayouter = null; + adjustGraphForEdge(e, show); } } - List halfEdges = source.fHalfLinkToEdgeMap.get(link); - + List halfEdges = model.moveHalfEdges(link, show); if (halfEdges != null) { for (EdgeBase edge : halfEdges) { - if (show) - fGraph.addEdge(edge); - else - fGraph.removeEdge(edge); + adjustGraphForEdge(edge, show); } + } + } - source.fHalfLinkToEdgeMap.remove(link); - target.fHalfLinkToEdgeMap.put(link, halfEdges); + /** Small helper to add/remove an edge to the graph and mark layout dirty. */ + private void adjustGraphForEdge(EdgeBase e, boolean show) { + if (e == null) { + return; + } + if (show) { + fGraph.addEdge(e); + } else { + fGraph.removeEdge(e); } fLayouter = null; } /** - * Removes a link from the diagram. + * Deletes a link from the diagram. */ + @Override public void deleteLink(MLink link) { if (link.linkEnds().size() == 2) { - EdgeBase e = null; - boolean isVisible; - boolean isLinkObject = link instanceof MLinkObject; - ObjectDiagramData data; - - if (isLinkObject) { - isVisible = visibleData.fLinkObjectToNodeEdge.containsKey(link); - data = isVisible ? visibleData : hiddenData; - e = data.fLinkObjectToNodeEdge.get(link); - } else { - isVisible = visibleData.fBinaryLinkToEdgeMap.containsKey(link); - data = isVisible ? visibleData : hiddenData; - e = data.fBinaryLinkToEdgeMap.get(link); - } + deleteBinaryLinkInternal(link); + } else { + deleteNAryLinkInternal(link); + } + } - if (e == null) { - return; + private void deleteBinaryLinkInternal(MLink link) { + boolean wasVisible = visibleData.containsLink(link); + if (link instanceof MLinkObject ml) { + EdgeBase e = model.popLinkObjectEdge(ml); + if (e == null) return; + if (e instanceof BinaryAssociationClassOrObject edge) { + PlaceableNode objectNode = edge.getClassOrObjectNode(); + linkPositionCache().put(link, objectNode.getStrategy()); } - - if (isLinkObject) { - BinaryAssociationClassOrObject edge = (BinaryAssociationClassOrObject) data.fLinkObjectToNodeEdge - .get(link); - if (edge != null) { - PlaceableNode objectNode = edge.getClassOrObjectNode(); - lastKnownLinkPositions.put(link, objectNode.getStrategy()); - } - - data.fBinaryLinkToEdgeMap.remove(link); - data.fLinkObjectToNodeEdge.remove(link); - } else { - data.fBinaryLinkToEdgeMap.remove(link); + if (wasVisible) { + fGraph.removeEdge(e); + fLayouter = null; } - - if (isVisible) { + e.dispose(); + } else { + EdgeBase e = model.popBinaryLink(link); + if (e == null) return; + if (wasVisible) { fGraph.removeEdge(e); fLayouter = null; } e.dispose(); - } else { // n-ary association - boolean isVisible; - ObjectDiagramData data; + } + } - isVisible = visibleData.fNaryLinkToDiamondNodeMap.containsKey(link); - data = isVisible ? visibleData : hiddenData; - DiamondNode n = data.fNaryLinkToDiamondNodeMap.get(link); + private void deleteNAryLinkInternal(MLink link) { + boolean wasVisible = visibleData.getNaryLinkToDiamondNodeMap().containsKey(link); + DiamondNode n = model.popNaryLinkNode(link); + if (n == null) { + throw new IllegalStateException("no diamond node for n-ary link `" + link + "' in current state."); + } - if (n == null) { - throw new RuntimeException("no diamond node for n-ary link `" + link + "' in current state."); + model.popHalfEdges(link).forEach(edge -> { + if (wasVisible) { + fGraph.removeEdge(edge); } + edge.dispose(); + }); - data.fNaryLinkToDiamondNodeMap.remove(link); - data.fHalfLinkToEdgeMap.remove(link); - - if (isVisible) { - fGraph.remove(n); - fLayouter = null; - } + if (wasVisible) { + fGraph.remove(n); + fLayouter = null; + } - n.dispose(); + n.dispose(); - if (link instanceof MLinkObject) { - EdgeBase edge = data.fLinkObjectToNodeEdge.get(link); - if (edge != null) { - lastKnownLinkPositions.put(link, - ((NAryAssociationClassOrObjectEdge) edge).getClassOrLinkObjectNode().getStrategy()); + if (link instanceof MLinkObject ml) { + EdgeBase edge = model.popLinkObjectEdge(ml); + if (edge != null) { + linkPositionCache().put(link, + ((NAryAssociationClassOrObjectEdge) edge).getClassOrLinkObjectNode().getStrategy()); + if (wasVisible) { fGraph.removeEdge(edge); - data.fLinkObjectToNodeEdge.remove(link); - edge.dispose(); } + edge.dispose(); } } } /** * Forces the object node to update its content. - * - * @param obj + * + * @param obj the MInstance whose node should be refreshed */ public void updateObject(MInstance obj) { - ObjectNode node = visibleData.fObjectToNodeMap.get(obj); - if (node != null) + // Only update if the instance is actually an MObject to avoid ClassCastException + if (!(obj instanceof MObject mObj)) { + return; + } + + visibleData.getObjectToNodeMap().computeIfPresent(mObj, (k, node) -> { invalidateNode(node); + return node; // keep the existing mapping + }); } - /** - * Adds a new Link to the objectdiagram. - */ - class ActionInsertLink extends AbstractAction { - private MAssociation fAssociation; - private MObject[] fParticipants; - - ActionInsertLink(MAssociation association, MObject[] participants) { - fAssociation = association; - fParticipants = participants; - - StringBuilder txt = new StringBuilder("insert ("); - StringUtil.fmtSeq(txt, participants, ",", new IElementFormatter() { - @Override - public String format(MObject element) { - return element.name(); - } - }); - - txt.append(") into ").append(association.name()); - - putValue(Action.NAME, txt.toString()); - } - - public void actionPerformed(ActionEvent e) { - fParent.insertLink(fAssociation, fParticipants); + /** Clears the current node and edge selection. */ + public void clearSelection() { + if (model != null) { + model.replaceSelection(Set.of(), Set.of()); + applySelectionFromModel(); } + fNodeSelection.clear(); + fEdgeSelection.clear(); + invalidateContent(true); } - /** - * Deletes a Link from the object diagram. - */ - class ActionDeleteLink extends AbstractAction { - private MLink link; - - ActionDeleteLink(MLink link) { - this.link = link; - MObject[] participants = link.linkedObjectsAsArray(); - StringBuilder txt = new StringBuilder("delete ("); + public ObjectSelection getObjectSelection() { + return fSelection; + } - for (int i = 0; i < participants.length; ++i) { - if (i > 0) { - txt.append(","); - } - txt.append(participants[i].name()); - if (!link.getQualifier().isEmpty() && !link.getQualifier().get(i).isEmpty()) { - txt.append("{"); - StringUtil.fmtSeq(txt, link.getQualifier().get(i), ","); - txt.append("}"); - } - } - txt.append(") from ").append(link.association().name()); - putValue(Action.NAME, txt.toString()); - } + // helper action classes were moved to the context menu provider; removed here as unused. - public void actionPerformed(ActionEvent e) { - fParent.deleteLink(link); - fEdgeSelection.clear(); + // Creates and shows popup menu if mouse event is the trigger for popups. + @Override + protected PopupMenuInfo unionOfPopUpMenu() { + PopupMenuInfo popupInfo = super.unionOfPopUpMenu(); + if (presenter == null) { + return popupInfo; } - } - /** - * Deletes the selected objects. - */ - class ActionDelete extends AbstractAction { - private Set fObjects; + JPopupMenu popupMenu = popupInfo.popupMenu; + Set selectedObjectsOfAssociation = new HashSet<>(); + Set selectedLinks = new HashSet<>(); + Set selectedObjects = new HashSet<>(); - ActionDelete(String text, Set objects) { - super(text); - fObjects = objects; + // collect selections + for (PlaceableNode node : fNodeSelection) { + if (node instanceof ObjectNode on) { + selectedObjects.add(on.object()); + } else if (node instanceof AssociationName name) { + MLink link = name.getLink(); + selectedObjectsOfAssociation.addAll(link.linkedObjects()); + selectedLinks.add(link); + } } - - public void actionPerformed(ActionEvent e) { - fParent.deleteObjects(fObjects); - fNodeSelection.clear(); + for (EdgeBase selectedEdge : fEdgeSelection) { + if (selectedEdge instanceof LinkEdge aEdge) { + MLink link = aEdge.getLink(); + selectedLinks.add(link); + selectedObjectsOfAssociation.addAll(link.linkedObjects()); + } } - } - /** - * Show properties of objects - */ - class ActionShowProperties extends AbstractAction { - private MObject fObject; + presenter.onPopupMenuPrepared(popupMenu, popupInfo.position, selectedObjects, selectedLinks, selectedObjectsOfAssociation); + presenter.onStatusMessage("Object diagram context menu opened"); + return popupInfo; + } - ActionShowProperties(String text, MObject object) { - super(text); - fObject = object; - } + // getNoneSelectedNodes was removed; this logic moved to context menu provider where needed. - public void actionPerformed(ActionEvent e) { - if (MainWindow.getJavaFxCall()){ - Platform.runLater(()->{ - // to create an instance of a SwingNode, which is used to hold the Swing-Components - SwingNode swingNode = new SwingNode(); - - // Create the ClassInvariantView and the enclosing ViewFrame in the javaFX DesktopPane - ObjectPropertiesView opv = new ObjectPropertiesView(MainWindow.instance(), org.tzi.use.gui.mainFX.MainWindow.getInstance().getSession().system()); - opv.selectObject(fObject.name()); //selecting the focused Object - - ViewFrame f = new ViewFrame("Object properties", opv, "ObjectProperties.gif"); - - // Set up the SwingNode content - JComponent c = (JComponent) f.getContentPane(); - c.setLayout(new BorderLayout()); - c.add(opv, BorderLayout.CENTER); - - // Add the Swing component to the SwingNode - swingNode.setContent(c); - swingNode.setCache(false); //This helps ensure the image is re‐drawn more directly, often yielding a crisper result. - - // creating the new Window with the swingNode - org.tzi.use.gui.mainFX.MainWindow.getInstance().createNewWindow("Object properties", swingNode, DiagramType.OBJECT_PROPERTIES_VIEW); - }); - } else { - ObjectPropertiesView v = MainWindow.instance().showObjectPropertiesView(); - v.selectObject(fObject.name()); - } - } - } - - private class ShowObjectPropertiesViewMouseListener extends MouseAdapter { - - @Override - public void mouseClicked(MouseEvent e) { - if (e.getClickCount() == 2) { - // mouse over node? - PlaceableNode pickedObjectNode = findNode(e.getX(), e.getY()); - if (pickedObjectNode instanceof ObjectNode) { - ObjectNode obj = (ObjectNode) pickedObjectNode; - ObjectPropertiesView v = MainWindow.instance().showObjectPropertiesView(); - v.selectObject(obj.object().name()); - } - } - } - } - - /** - * Creates and shows popup menu if mouse event is the trigger for popups. - */ - protected PopupMenuInfo unionOfPopUpMenu() { - // create the popup menu - PopupMenuInfo popupInfo = super.unionOfPopUpMenu(); - JPopupMenu popupMenu = popupInfo.popupMenu; - - // position for the popupMenu items - int pos = 0; - final Set selectedObjectsOfAssociation = new HashSet(); - final Set selectedLinks = new HashSet(); - final List selectedObjects = new ArrayList(); - - // Split selected nodes into model elements - for (PlaceableNode node : fNodeSelection) { - if (node instanceof ObjectNode) { - selectedObjects.add(((ObjectNode) node).object()); - } else if (node instanceof AssociationName) { - MLink link = ((AssociationName) node).getLink(); - selectedObjectsOfAssociation.addAll(link.linkedObjects()); - selectedLinks.add(link); - } - } - - for (EdgeBase selectedEdge : fEdgeSelection) { - if (selectedEdge instanceof LinkEdge) { - LinkEdge aEdge = (LinkEdge) selectedEdge; - MLink link = aEdge.getLink(); - selectedLinks.add(link); - selectedObjectsOfAssociation.addAll(link.linkedObjects()); - } - } - - // Just to be sure to delete an object only once - Set selectedObjectsSet = new HashSet(selectedObjects); - - // This text is reused often - String selectedObjectsText = null; - if (selectedObjects.size() == 1) { - selectedObjectsText = "'" + selectedObjects.get(0).name() + "'"; - } else if (selectedObjects.size() > 1) { - selectedObjectsText = selectedObjects.size() + " objects"; - } - - if (!selectedObjects.isEmpty()) { - // A single object can be edited - if (selectedObjects.size() == 1) { - popupMenu.insert( - new ActionShowProperties("Edit properties of " + selectedObjectsText, selectedObjects.get(0)), - pos++); - } - - // A single object or multiple objects can be deleted. - popupMenu.insert(new ActionDelete("Destroy " + selectedObjectsText, selectedObjectsSet), pos++); - popupMenu.insert(new JSeparator(), pos++); - } - - // Possible links between objects - if (!selectedObjects.isEmpty()) { - int m = selectedObjects.size(); - boolean addedInsertLinkAction = false; - - for (MAssociation assoc : fParent.system().model().associations()) { - if (assoc.isReadOnly()) - continue; - - int n = assoc.associationEnds().size(); - // More objects then ends selected - if (m > n) - continue; - - int pow = 1; - for (int i = 0; i < n; ++i) - pow *= m; - - for (int i = 0; i < pow; ++i) { - MObject[] l = new MObject[n]; - MClass[] c = new MClass[n]; - int[] digits = radixConversion(i, m, n); - - if (!isCompleteObjectCombination(digits, m)) - continue; - - for (int j = 0; j < n; ++j) { - l[j] = selectedObjects.get(digits[j]); - c[j] = l[j].cls(); - } - - if (!assoc.isAssignableFrom(c)) - continue; - - Set links = fParent.linksBetweenObjects(assoc, l); - if (links.isEmpty() || assoc.hasQualifiedEnds()) { - popupMenu.insert(new ActionInsertLink(assoc, l), pos++); - addedInsertLinkAction = true; - } - - if (!links.isEmpty()) { - for (MLink link : links) { - popupMenu.insert(new ActionDeleteLink(link), pos++); - addedInsertLinkAction = true; - } - } - } - - } - - if (addedInsertLinkAction) - popupMenu.insert(new JSeparator(), pos++); - } - - if (!hiddenData.fObjectToNodeMap.isEmpty() || !hiddenData.fBinaryLinkToEdgeMap.isEmpty() - || !hiddenData.fNaryLinkToDiamondNodeMap.isEmpty() || !hiddenData.fHalfLinkToEdgeMap.isEmpty() - || !hiddenData.fLinkObjectToNodeEdge.isEmpty()) { - final JMenuItem showAllObjects = new JMenuItem("Show hidden elements"); - showAllObjects.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - showAll(); - showAllLinks(); - invalidateContent(true); - } - }); - - popupMenu.insert(showAllObjects, pos++); - popupMenu.insert(new JSeparator(), pos++); - } - - // Hide / crop / show links - if (!selectedLinks.isEmpty() || !selectedObjects.isEmpty() || !selectedObjectsOfAssociation.isEmpty()) { - String labelHide = ""; - String labelCrop = ""; - - int size = selectedLinks.size() + selectedObjects.size(); - - if (size > 1) { - labelHide = "Hide " + size + " elements"; - labelCrop = "Crop " + size + " elements"; - } else if (selectedLinks.size() == 1) { - labelHide = "Hide " + fSelection.formatLinkName(selectedLinks.iterator().next()); - labelCrop = "Crop " + fSelection.formatLinkName(selectedLinks.iterator().next()); - } else if (selectedObjects.size() == 1) { - labelHide = "Hide " + selectedObjects.listIterator().next().name(); - labelCrop = "Crop " + selectedObjects.listIterator().next().name(); - } - - // New Action for Hide - popupMenu.insert(new AbstractAction(labelHide) { - - @Override - public void actionPerformed(ActionEvent arg0) { - if (selectedLinks.size() > 0) { - selectedLinks.forEach(link -> hideLink(link)); - } - if (selectedObjects.size() > 0) { - selectedObjects.forEach(obj -> hideObject(obj)); - } - repaint(); - } - }, pos++); - - // new Action for crop - Set objectsToHide = new HashSet<>(selectedObjects); - selectedLinks.forEach(link -> { - if (link instanceof MLinkObject) { - objectsToHide.add((MLinkObject) link); - } else { - objectsToHide.addAll(link.linkedObjects()); - } - }); - - final String label = labelCrop; - popupMenu.insert(new AbstractAction(labelCrop) { - @Override - public void actionPerformed(ActionEvent e) { - getAction(label, getNoneSelectedNodes(objectsToHide)).actionPerformed(e); - } - }, pos++); - - // new Action for grey in/out - if (selectedObjects.size() == 1) { - MObject obj = selectedObjects.iterator().next(); - if (visibleData.fObjectToNodeMap.containsKey(obj)) { - ObjectNode node = visibleData.fObjectToNodeMap.get(obj); - String labelGreyed = node.isGreyed() ? "Grey in" : "Grey out"; - - popupMenu.insert(new AbstractAction(labelGreyed + " " + node.name()) { - @Override - public void actionPerformed(ActionEvent e) { - node.setGreyed(node.isGreyed() ? false : true); - repaint(); - } - }, pos++); - } - } else if (selectedObjects.size() > 1) { - Set objToGreyIn = new HashSet<>(); - selectedObjects.stream().filter(obj -> visibleData.fObjectToNodeMap.get(obj).isGreyed()) - .forEach(obj -> objToGreyIn.add(visibleData.fObjectToNodeMap.get(obj))); - - Set objToGreyOut = new HashSet<>(); - selectedObjects.stream().filter(obj -> !visibleData.fObjectToNodeMap.get(obj).isGreyed()) - .forEach(obj -> objToGreyOut.add(visibleData.fObjectToNodeMap.get(obj))); - - if (objToGreyIn.size() > 0) { - popupMenu.insert(new AbstractAction("Grey in " + objToGreyIn.size() + " elements") { - - @Override - public void actionPerformed(ActionEvent arg0) { - objToGreyIn.forEach(obj -> obj.setGreyed(false)); - repaint(); - } - }, pos++); - } - - // Action for grey out more elements - if (objToGreyOut.size() > 0) { - popupMenu.insert(new AbstractAction("Grey out " + objToGreyOut.size() + " elements") { - - @Override - public void actionPerformed(ActionEvent arg0) { - objToGreyOut.forEach(obj -> obj.setGreyed(true)); - repaint(); - } - }, pos++); - } - } - popupMenu.insert(new JSeparator(), pos++); - } - - final JMenu showHideCrop = new JMenu("Show/hide/crop objects"); - - if (!selectedObjects.isEmpty()) { - showHideCrop.add(fSelection.getSelectedObjectPathView("By path length...", selectedObjectsSet)); - } - - showHideCrop.add(fSelection.getSelectionWithOCLViewAction()); - showHideCrop.add(fSelection.getSelectionObjectView()); - - popupMenu.insert(showHideCrop, pos++); - - if (fGraph.size() > 0 || !hiddenData.fObjectToNodeMap.isEmpty()) { - if (fGraph.size() > 0) { - popupMenu.insert(fSelection.getSubMenuHideObject(), pos++); - } - - if (!hiddenData.fObjectToNodeMap.isEmpty()) { - popupMenu.insert(fSelection.getSubMenuShowObject(), pos++); - } - } - - if (!visibleData.fBinaryLinkToEdgeMap.isEmpty() || !visibleData.fHalfLinkToEdgeMap.isEmpty() - || !visibleData.fLinkObjectToNodeEdge.isEmpty() - || !visibleData.fNaryLinkToDiamondNodeMap.isEmpty()) { - popupMenu.insert(fSelection.getSubMenuHideLinks(), pos++); - } - - if (!hiddenData.fBinaryLinkToEdgeMap.isEmpty() || !hiddenData.fHalfLinkToEdgeMap.isEmpty() - || !hiddenData.fLinkObjectToNodeEdge.isEmpty() || !hiddenData.fNaryLinkToDiamondNodeMap.isEmpty()) { - popupMenu.insert(fSelection.getSubMenuShowLinks(), pos++); - } - - popupMenu.insert(new JSeparator(), pos++); - if (!visibleData.getEdges().isEmpty() || !hiddenData.getEdges().isEmpty()) { - popupMenu.insert(fSelection.getSubMenuLinksByKind(), pos++); - - popupMenu.insert(new JSeparator(), pos++); - } - - if (!selectedObjects.isEmpty()) { - final JMenu showProtocolStateMachine = new JMenu("Show protocol state machine..."); - showProtocolStateMachine.setEnabled(false); - popupMenu.insert(showProtocolStateMachine, pos++); - - if (selectedObjects.size() == 1) { - final MObject obj = exactlyOne(selectedObjects); - - List sortedPSMs = new LinkedList( - obj.cls().getAllOwnedProtocolStateMachines()); - Collections.sort(sortedPSMs, new MNamedElementComparator()); - - for (MProtocolStateMachine psm : sortedPSMs) { - showProtocolStateMachine.setEnabled(true); - final JMenuItem showGivenPSM = new JMenuItem(psm.name()); - showGivenPSM.addActionListener(new ActionListener() { - protected MProtocolStateMachine sm; - - public void actionPerformed(ActionEvent ev) { - MainWindow.instance().showStateMachineView(sm, obj); - } - - public ActionListener setStateMachine(MProtocolStateMachine sm, MObject instance) { - this.sm = sm; - return this; - } - }.setStateMachine(psm, obj)); - showProtocolStateMachine.add(showGivenPSM); - } - } - - popupMenu.insert(new JSeparator(), pos++); - } - - final JCheckBoxMenuItem showStates = new JCheckBoxMenuItem("Show states", getOptions().isShowStates()); - showStates.addItemListener(new ItemListener() { - @Override - public void itemStateChanged(ItemEvent ev) { - getOptions().setShowStates(ev.getStateChange() == ItemEvent.SELECTED); - invalidateContent(true); - } - }); - - popupMenu.insert(showStates, pos + 3); - - return popupInfo; - } - - /** - * Finds all nodes which are not selected. - * - * @param selectedNodes - * Nodes which are selected at this point in the diagram. - * @return A HashSet of the none selected objects in the diagram. - */ - private Set getNoneSelectedNodes(Set selectedNodes) { - Set noneSelectedNodes = new HashSet(); - Iterator it = fGraph.iterator(); - while (it.hasNext()) { - PlaceableNode o = it.next(); - if (o instanceof ObjectNode) { - MObject obj = ((ObjectNode) o).object(); - if (!selectedNodes.contains(obj)) { - noneSelectedNodes.add(obj); - } - } - } - - selectedNodes.forEach(elem -> { - if (elem instanceof MLinkObjectImpl) { - ((MLinkObjectImpl) elem).linkedObjects().forEach(noneSelectedNodes::remove); - } - }); - return noneSelectedNodes; - } - - private JWindow fObjectInfoWin = null; + private transient JWindow fObjectInfoWin = null; private void displayObjectInfo(MObject obj, MouseEvent e) { if (fObjectInfoWin != null) { @@ -1460,7 +960,7 @@ private void displayObjectInfo(MObject obj, MouseEvent e) { Box attrBox = Box.createVerticalBox(); Box valueBox = Box.createVerticalBox(); - MObjectState objState = obj.state(fParent.system().state()); + MObjectState objState = obj.state(system().state()); Map attributeValueMap = objState.attributeValueMap(); for (Map.Entry entry : attributeValueMap.entrySet()) { @@ -1484,63 +984,57 @@ private void displayObjectInfo(MObject obj, MouseEvent e) { Point p = e.getPoint(); SwingUtilities.convertPointToScreen(p, (JComponent) e.getSource()); - fObjectInfoWin.setLocation(p);// e.getPoint()); + fObjectInfoWin.setLocation(p); fObjectInfoWin.pack(); fObjectInfoWin.setVisible(true); } /** - * + * * Accepts a drag of a class from the ModelBrowser. A new object of this * class will be created. - * - * @param dtde + * + * @param dtde the drop event provided by the DnD subsystem */ public void dropObjectFromModelBrowser(DropTargetDropEvent dtde) { - - try { - dtde.acceptDrop(DnDConstants.ACTION_MOVE); - Transferable transferable = dtde.getTransferable(); - - // we accept only Strings - if (transferable.isDataFlavorSupported(DataFlavor.stringFlavor)) { - String s = (String) transferable.getTransferData(DataFlavor.stringFlavor); - - if (s.startsWith("CLASS-")) { - Point p = dtde.getLocation(); - if (isDoAutoLayout()) { - getRandomNextPosition(); - } else { - nextNodePosition.x = p.getX(); - nextNodePosition.y = p.getY(); - } - String clsName = s.substring(6); - fParent.createObject(clsName); - } - } - dtde.dropComplete(true); - } catch (IOException exception) { - exception.printStackTrace(); - System.err.println("Exception" + exception.getMessage()); - dtde.dropComplete(false); - } catch (UnsupportedFlavorException ufException) { - ufException.printStackTrace(); - System.err.println("Exception" + ufException.getMessage()); - dtde.dropComplete(false); - } + try { + dtde.acceptDrop(DnDConstants.ACTION_MOVE); + Transferable transferable = dtde.getTransferable(); + if (transferable.isDataFlavorSupported(DataFlavor.stringFlavor)) { + String s = (String) transferable.getTransferData(DataFlavor.stringFlavor); + if (s.startsWith("CLASS-")) { + Point p = dtde.getLocation(); + if (isDoAutoLayout()) { + getRandomNextPosition(); + } else { + nextNodePosition.x = p.getX(); + nextNodePosition.y = p.getY(); + } + String clsName = s.substring(6); + if (presenter != null) { + presenter.onCreateObject(clsName); + } + } + } + dtde.dropComplete(true); + } catch (IOException | UnsupportedFlavorException ex) { + if (fLog != null) { + fLog.println(ex.getClass().getSimpleName() + " in dropObjectFromModelBrowser: " + ex.getMessage()); + } + dtde.dropComplete(false); + } } /** * Checks if the object info window should be displayed. - * - * @param e - * MouseEvent + * + * @param e MouseEvent */ public void mayBeShowObjectInfo(MouseEvent e) { if (fNodeSelection.size() == 1) { PlaceableNode node = fNodeSelection.iterator().next(); - if (node instanceof ObjectNode) { - displayObjectInfo(((ObjectNode) node).object(), e); + if (node instanceof ObjectNode on) { + displayObjectInfo(on.object(), e); } } } @@ -1556,29 +1050,7 @@ public void mayBeDisposeObjectInfo() { } } - private int[] radixConversion(int number, int base, int maxDigits) { - int[] res = new int[maxDigits]; - for (int i = 0; i < maxDigits; ++i) { - res[i] = number % base; - number = number / base; - } - return res; - } - - private boolean isCompleteObjectCombination(int[] c, int base) { - for (int i = 0; i < base; ++i) { - boolean found = false; - for (int j = 0; j < c.length; ++j) { - if (c[j] == i) { - found = true; - break; - } - } - if (!found) - return false; - } - return true; - } + // Helper methods removed: moved to context menu provider where they are used. /** * Finds a random new position for the next object node. @@ -1586,515 +1058,275 @@ private boolean isCompleteObjectCombination(int[] c, int base) { protected void getRandomNextPosition() { // getWidth and getHeight return 0 // if we are called on a new diagram. - nextNodePosition.x = Math.random() * Math.max(100, getWidth() - 100); - nextNodePosition.y = Math.random() * Math.max(100, getHeight() - 100); + double w = Math.max(100, getWidth() - 100); + double h = Math.max(100, getHeight() - 100); + nextNodePosition.x = SECURE_RANDOM.nextDouble() * w; + nextNodePosition.y = SECURE_RANDOM.nextDouble() * h; } @Override public void resetLayout() { - fParent.initDiagram(false, (ObjDiagramOptions) fOpt); - fParent.validate(); + if (presenter != null) { + presenter.onResetDiagram((ObjDiagramOptions) fOpt); + } else { + context.resetDiagram((ObjDiagramOptions) fOpt); + } } @Override public void storePlacementInfos(PersistHelper helper, Element root) { - storePlacementInfos(helper, root, true); - storePlacementInfos(helper, root, false); - } + if (presenter != null) { + presenter.onStoreLayout(helper, root, model); + } + } + + @Override + public void restorePlacementInfos(PersistHelper helper, int version) { + if (presenter != null) { + Set hidden = presenter.onRestoreLayout(helper, version, model, system()); + if (hidden != null && !hidden.isEmpty()) { + hideElementsInDiagram(hidden); + } + } + } + + @Override + protected String getDefaultLayoutFileSuffix() { + // Object diagrams do not auto-load/save a default layout file. + return null; + } + + // helper Action factory removed as unused - protected void storePlacementInfos(PersistHelper helper, Element root, boolean visible) { - ObjectDiagramData data = (visible ? visibleData : hiddenData); - - for (ObjectNode n : data.fObjectToNodeMap.values()) { - n.storePlacementInfo(helper, root, !visible); - } + protected void addBinaryLink(MLink link) { + MAssociation assoc = link.association(); - for (PlaceableNode n : data.fNaryLinkToDiamondNodeMap.values()) { - n.storePlacementInfo(helper, root, !visible); - } + MLinkEnd linkEnd1 = link.linkEnd(assoc.associationEnds().get(0)); + MLinkEnd linkEnd2 = link.linkEnd(assoc.associationEnds().get(1)); - for (EdgeBase e : data.fBinaryLinkToEdgeMap.values()) { - e.storePlacementInfo(helper, root, !visible); - } + MObject obj1 = linkEnd1.object(); + MObject obj2 = linkEnd2.object(); - for (EdgeBase e : data.fLinkObjectToNodeEdge.values()) { - e.storePlacementInfo(helper, root, !visible); - } - } + // object link + if (link instanceof MLinkObject ml) { + BinaryAssociationClassOrObject e = BinaryAssociationClassOrObject.create( + visibleData.getObjectToNodeMap().get(obj1), visibleData.getObjectToNodeMap().get(obj2), + linkEnd1, linkEnd2, visibleData.getObjectToNodeMap().get(ml), this, + link); - @Override - public void restorePlacementInfos(PersistHelper helper, int version) { - if (version < 12) return; - - Set hiddenObjects = new HashSet(); - AutoPilot ap = new AutoPilot(helper.getNav()); - - // First restore edges to get possible new nodes, then nodes - helper.getNav().push(); - - try { - // Restore edges - ap.selectXPath("./edge[@type='BinaryEdge']"); - - try { - while (ap.evalXPath() != -1) { - String name = helper.getElementStringValue("name"); - MAssociation assoc = fParent.system().model().getAssociation(name); - String sourceObjectName = helper.getElementStringValue("source"); - String targetObjectName = helper.getElementStringValue("target"); - - MObject sourceObject = fParent.system().state().objectByName(sourceObjectName); - MObject targetObject = fParent.system().state().objectByName(targetObjectName); - - // Could be deleted - if (assoc != null && sourceObject != null && targetObject != null) { - MLink link; - - if (assoc.hasQualifiedEnds()) { - String linkValue = helper.getElementStringValue("linkValue"); - link = getLinkByValue(assoc, Arrays.asList(sourceObject, targetObject), linkValue); - } else { - // No qualifier values are present. - link = fParent - .system() - .state() - .linkBetweenObjects(assoc, - Arrays.asList(sourceObject, targetObject), - Collections.>emptyList()); - } - - if (link != null) { - BinaryAssociationOrLinkEdge edge = visibleData.fBinaryLinkToEdgeMap.get(link); - edge.restorePlacementInfo(helper, version); - } - } - } - } catch (XPathEvalException e) { - fLog.append(e.getMessage()); - } catch (NavException e) { - fLog.append(e.getMessage()); + BinaryAssociationClassOrObject edge = (BinaryAssociationClassOrObject) visibleData.getLinkObjectToNodeEdge().get(ml); + if (edge != null) { + PlaceableNode objectNode = edge.getClassOrObjectNode(); + linkPositionCache().put(link, objectNode.getStrategy()); } - } catch (XPathParseException e) { - fLog.append(e.getMessage()); - } - ap.resetXPath(); - helper.getNav().pop(); - - helper.getNav().push(); - try { - // Restore edges - ap.selectXPath("./edge[@type='NodeEdge']"); - - try { - while(ap.evalXPath() != -1) { - String name = helper.getElementStringValue("name"); - MAssociation assoc = fParent.system().model().getAssociation(name); - String sourceObjectName = helper.getElementStringValue("source"); - String targetObjectName = helper.getElementStringValue("target"); - - MObject sourceObject = fParent.system().state().objectByName(sourceObjectName); - MObject targetObject = fParent.system().state().objectByName(targetObjectName); - - // Could be deleted - if (assoc != null && sourceObject != null && targetObject != null) { - MLink link; - - if (assoc.hasQualifiedEnds()) { - String linkValue = helper.getElementStringValue("linkValue"); - link = getLinkByValue(assoc, Arrays.asList(sourceObject, targetObject), linkValue); - } else { - // No qualifier values are present. - link = fParent - .system() - .state() - .linkBetweenObjects(assoc, - Arrays.asList(sourceObject, targetObject), - Collections.> emptyList()); - } - - if (link != null) { - BinaryAssociationClassOrObject edge = (BinaryAssociationClassOrObject)visibleData.fLinkObjectToNodeEdge.get(link); - edge.restorePlacementInfo(helper, version); - } - } - } - } catch (XPathEvalException e) { - fLog.append(e.getMessage()); - } catch (NavException e) { - fLog.append(e.getMessage()); - } - } catch (XPathParseException e) { - fLog.append(e.getMessage()); - } - helper.getNav().pop(); - ap.resetXPath(); - - helper.getNav().push(); - try { - ap.selectXPath("./node[@type='Object']"); - - try { - while(ap.evalXPath() != -1) { - String name = helper.getElementStringValue("name"); - MObject obj = fParent.system().state().objectByName(name); - // Could be deleted - if (obj != null) { - ObjectNode node = visibleData.fObjectToNodeMap.get(obj); - node.restorePlacementInfo(helper, version); - if (isHidden(helper, version)) hiddenObjects.add(obj); - } - } - } catch (XPathEvalException e) { - fLog.append(e.getMessage()); - } catch (NavException e) { - fLog.append(e.getMessage()); - } - } catch (XPathParseException e) { - fLog.append(e.getMessage()); - } - - helper.getNav().pop(); - ap.resetXPath(); - - helper.getNav().push(); - try { - // Restore diamond nodes - ap.selectXPath("./node[@type='DiamondNode']"); - - try { - while (ap.evalXPath() != -1) { - String name = helper.getElementStringValue("name"); - MAssociation assoc = fParent.system().model().getAssociation(name); - - // Renamed or deleted - if (assoc == null) continue; - - // Get connected objects - List connectedObjects = new LinkedList(); - if (!helper.toFirstChild("connectedNode")) - break; - - String objectName = helper.getElementStringValue(); - MObject obj = fParent.system().state().objectByName(objectName); - - if (obj != null) - connectedObjects.add(obj); - - while (helper.toNextSibling("connectedNode")) { - objectName = helper.getElementStringValue(); - obj = fParent.system().state().objectByName(objectName); - - if (obj != null) { - connectedObjects.add(obj); - } - } - - // Modified - if (assoc.associationEnds().size() != connectedObjects.size()) - continue; - - // n-ary links cannot be qualified therefore an empty list for the qualifer values is provided - MLink link = fParent.system().state().linkBetweenObjects(assoc, connectedObjects, Collections.>emptyList()); - - // Could be deleted - if (link != null) { - DiamondNode node = visibleData.fNaryLinkToDiamondNodeMap.get(link); - helper.toParent(); - node.restorePlacementInfo(helper, version); - } - } - } catch (XPathEvalException e) { - fLog.append(e.getMessage()); - } catch (NavException e) { - fLog.append(e.getMessage()); - } - } catch (XPathParseException e) { - fLog.append(e.getMessage()); - } - helper.getNav().pop(); - ap.resetXPath(); - - // Hide elements - hideElementsInDiagram(hiddenObjects); - } - protected MLink getLinkByValue(MAssociation assoc, List objects, String linkValue) { - Set links = fParent.system().state().linkBetweenObjects(assoc, objects); - if (links.size() == 1) { - return links.iterator().next(); + fGraph.addEdge(e); + visibleData.getLinkObjectToNodeEdge().put(ml, e); + fLayouter = null; } else { - for (MLink aLink : links) { - if (aLink.toString().equals(linkValue)) { - return aLink; - } - } - } - return null; - } - - protected boolean isHidden(PersistHelper helper, int version) { - return helper.getElementBooleanValue(LayoutTags.HIDDEN); - } - - @Override - public Set getHiddenNodes() { - return new HashSet(hiddenData.fObjectToNodeMap.values()); - } - - @Override - public ObjectDiagramData getVisibleData() { - return visibleData; - } - - @Override - public DiagramData getHiddenData() { - return hiddenData; - } - - @Override - protected String getDefaultLayoutFileSuffix() { - // No default layout - return null; - } - - @Override - protected void onClosing() { - if (!javaFxCall) { - super.onClosing(); - } - fParent.getModelBrowser().removeHighlightChangeListener(this); - fParent.removeKeyListener(inputHandling); - ModelBrowserSorting.getInstance().removeSortChangeListener(this); - } - - @Override - public void stateChanged(SortChangeEvent e) { - for (ObjectNode n : this.visibleData.fObjectToNodeMap.values()) { - n.stateChanged(e); - } - } + // binary link + boolean isHidden = false; + ObjectNode node1; + ObjectNode node2; - /** - * Hide link using name of link - * - * @param linkName - * @param links - */ - public void hideLink(String linkName, List links) { - for (MLink link : links) { - if (linkName.equals(link.association().toString())) { - hideLink(link); + if (visibleData.getObjectToNodeMap().containsKey(obj1)) { + node1 = visibleData.getObjectToNodeMap().get(obj1); + } else { + node1 = hiddenData.getObjectToNodeMap().get(obj1); + isHidden = true; } - } - } - - /** - * Show link using name of link - * - * @param linkName - * @param links - */ - public void showLink(String linkName, List links) { - for (MLink link : links) { - if (linkName.equals(link.association().toString())) { - showLink(link); + if (visibleData.getObjectToNodeMap().containsKey(obj2)) { + node2 = visibleData.getObjectToNodeMap().get(obj2); + } else { + node2 = hiddenData.getObjectToNodeMap().get(obj2); + isHidden = true; } - } - } - /** - * Map links to kind of assoziation. Used for show/hide-links-by-kind - * - * @return - */ - public TreeMap> mapLinksToKindOfAssociation() { - HashMap> assocs = new HashMap<>(); - final String derrivedLinks = "Derrived links"; - final String associationClass = "Linkobjects"; - final String nAryLinks = "N-Ary links"; - final String reflexivLinks = "Reflexiv links"; - final String binaryLinks = "Binary links"; - final String aggregation = "Aggregations"; - final String compositon = "Compositons"; - - for (MAssociation assoc : fParent.system().model().associations()) { - - /* - * aggregationKind = 0, other - * aggregationKind = 1, aggreation - * aggregationKind = 2, composition - */ - int kind = assoc.aggregationKind(); - switch (kind) { - case 0: - Set links = fParent.system().state().linksOfAssociation(assoc).links(); - for (MLink link : links) { - if (link.association().isDerived() || link.association().isUnion()) { - if (!assocs.containsKey(derrivedLinks)) { - assocs.put(derrivedLinks, new ArrayList() { - { - add(link); - } - }); - } else { - assocs.get(derrivedLinks).add(link); - } - } else if (MAssociationClassImpl.class.isInstance(link.association())) { - if (!assocs.containsKey(associationClass)) { - assocs.put(associationClass, new ArrayList() { - { - add(link); - } - }); - } else { - assocs.get(associationClass).add(link); - } - } else if (MAssociation.class.isInstance(link.association()) && link.linkEnds().size() > 2) { - if (!assocs.containsKey(nAryLinks)) { - assocs.put(nAryLinks, new ArrayList() { - { - add(link); - } - }); - } else { - assocs.get(nAryLinks).add(link); - } - } else if (MAssociation.class.isInstance(link.association()) - && link.association().associatedClasses().size() == 1 ) { - if (!assocs.containsKey(reflexivLinks)) { - assocs.put(reflexivLinks, new ArrayList() { - { - add(link); - } - }); - } else { - assocs.get(reflexivLinks).add(link); - } - } else if (MAssociation.class.isInstance(link.association()) && link.linkedObjects().size() == 2 - && !link.linkedObjects().get(0).equals(link.linkedObjects().get(1))) { - if (!assocs.containsKey(binaryLinks)) { - assocs.put(binaryLinks, new ArrayList() { - { - add(link); - } - }); - } else { - assocs.get(binaryLinks).add(link); - } - } else { - System.err.println("ERROR: NO MATCH IN ASSOC-KIND"); - } + BinaryAssociationOrLinkEdge e = createBinaryAssociationOrLinkEdge(node1, node2, linkEnd1, + linkEnd2, this, link); - } - break; - case 1: // Aggregation - - // Get aggregations - Set aggregations = fParent.system().state().linksOfAssociation(assoc).links(); - - for (MLink agg : aggregations) { - if (!assocs.containsKey(aggregation)) { - assocs.put(aggregation, new ArrayList() { - { - add(agg); - } - }); - } else { - assocs.get(aggregation).add(agg); - } - } - break; - - case 2: // Compositon - - // Get Compositon - Set compositons = fParent.system().state().linksOfAssociation(assoc).links(); - - for (MLink comp : compositons) { - if (!assocs.containsKey(compositon)) { - assocs.put(compositon, new ArrayList() { - { - add(comp); - } - }); - } else { - assocs.get(compositon).add(comp); - } - } - break; + if (link.isVirtual()) { + e.setDashed(true); } - } - return new TreeMap>(assocs); - - } - - /** - * Hide all links of list links - * - * @param links - */ - public void hideLink(List links) { - for (MLink link : links) { - hideLink(link); - } - } - /** - * Show all links of list links - * - * @param links - */ - public void showLink(List links) { - for (MLink link : links) { - showLink(link); - } - } - - /** - * Check if a link is hidden - * - * @param link - * @return true, if link is hidden; else return false - */ - public boolean isHidden(MLink link) { - if (hiddenData.fBinaryLinkToEdgeMap.containsKey(link) || hiddenData.fHalfLinkToEdgeMap.containsKey(link) - || hiddenData.fLinkObjectToNodeEdge.containsKey(link) - || hiddenData.fNaryLinkToDiamondNodeMap.containsKey(link)) { - return true; - } else { - return false; - } - } - - /** - * - * @param links - * @return 0, if all Links are hidden 1, if all links are shown 2, if there - * are hidden and shown links - */ - public int isHidden(List links) { - boolean existHiddenLink = false; - boolean existShownLink = false; - for (MLink link : links) { - if (isHidden(link)) { - existHiddenLink = true; + if (isHidden) { + hiddenData.getBinaryLinkToEdgeMap().put(link, e); } else { - existShownLink = true; + fGraph.addEdge(e); + visibleData.getBinaryLinkToEdgeMap().put(link, e); + fLayouter = null; } } - if (existHiddenLink && existShownLink) { - return 2; - } else if (existShownLink) { - return 1; - } else if (existHiddenLink) { - return 0; - } - return -1; } - public static void setJavaFxCall(Boolean javaFxCall) { - NewObjectDiagram.javaFxCall = javaFxCall; + /** + * Factory hook for creating binary link edges. Kept as a protected method to allow easy overriding in subclasses. + */ + protected BinaryAssociationOrLinkEdge createBinaryAssociationOrLinkEdge(PlaceableNode source, PlaceableNode target, + MLinkEnd sourceEnd, MLinkEnd targetEnd, NewObjectDiagram diagram, MLink link) { + return BinaryAssociationOrLinkEdge.create(source, target, sourceEnd, targetEnd, diagram, link); } -} + @Override + public ObjectDiagramData getHiddenData() { + return hiddenData; + } + + @Override + public ObjectDiagramData getVisibleData() { + return visibleData; + } + + @Override + public Set getHiddenNodes() { + return hiddenData.getNodes(); + } + + /** Used by JavaFX caller to toggle FX-mode behavior. */ + public static void setJavaFxCall(boolean value) { + MainWindow.setJavaFxCall(value); + } + + /** Sort change from ModelBrowserSorting. */ + @Override + public void stateChanged(ModelBrowserSorting.SortChangeEvent e) { + for (ObjectNode n : this.visibleData.getObjectToNodeMap().values()) { + n.stateChanged(e); + } + } + + /** Check if a link is currently hidden. */ + public boolean isHidden(MLink link) { + return hiddenData.containsLink(link); + } + + /** + * Returns 0 if all links visible, 1 if all hidden, 2 if mixed. + */ + public int isHidden(List links) { + boolean anyVisible = false; + boolean anyHidden = false; + for (MLink l : links) { + if (isHidden(l)) { + anyHidden = true; + } else { + anyVisible = true; + } + if (anyHidden && anyVisible) { + return 2; + } + } + if (anyHidden) { + return 1; + } + return 0; + } + + /** Group links by association name for ObjectSelection needs. */ + @SuppressWarnings("unused") + public Map> mapLinksToKindOfAssociation(List links) { + Map> result = new HashMap<>(); + for (MLink link : links) { + String key = link.association().name(); + result.computeIfAbsent(key, k -> new ArrayList<>()).add(link); + } + return result; + } + + /** Legacy overload: collects all links grouped by association. */ + @SuppressWarnings("unused") + public Map> mapLinksToKindOfAssociation() { + Map> result = new TreeMap<>(); + Collection assocs = presenter != null ? presenter.fetchAllAssociations() + : system().model().associations(); + for (MAssociation assoc : assocs) { + Set links = presenter != null ? presenter.fetchLinksOfAssociation(assoc) + : system().state().linksOfAssociation(assoc).links(); + for (MLink link : links) { + result.computeIfAbsent(assoc.name(), k -> new ArrayList<>()).add(link); + } + } + return result; + } + + /** Hide all given links. */ + public void hideLink(List links) { + for (MLink link : links) { + hideLink(link); + } + } + + /** Show all given links. */ + public void showLink(List links) { + for (MLink link : links) { + showLink(link); + } + } + + private Map nodePositionCache() { + return model.getLastKnownNodePositions(); + } + + private Map linkPositionCache() { + return model.getLastKnownLinkPositions(); + } + + /** Ensure diagram uses the current model as single source of truth. */ + private void rebindModelData() { + if (this.model == null) { + this.model = new NewObjectDiagramModel(); + } + this.visibleData = model.getVisibleData(); + this.hiddenData = model.getHiddenData(); + applySelectionFromModel(); + } + + /** Apply selection from model to local selection sets for rendering. */ + private void applySelectionFromModel() { + fNodeSelection.clear(); + fEdgeSelection.clear(); + for (MObject obj : model.getSelectedObjects()) { + ObjectNode node = visibleData.getObjectToNodeMap().get(obj); + if (node != null) { + fNodeSelection.add(node); + } + } + for (MLink link : model.getSelectedLinks()) { + EdgeBase edge = visibleData.getBinaryLinkToEdgeMap().get(link); + if (edge != null) { + fEdgeSelection.add(edge); + } + if (link instanceof MLinkObject ml) { + EdgeBase linkObjEdge = visibleData.getLinkObjectToNodeEdge().get(ml); + if (linkObjEdge != null) { + fEdgeSelection.add(linkObjEdge); + } + } + List halfEdges = visibleData.getHalfLinkToEdgeMap().get(link); + if (halfEdges != null) { + fEdgeSelection.addAll(halfEdges); + } + DiamondNode node = visibleData.getNaryLinkToDiamondNodeMap().get(link); + if (node != null) { + fNodeSelection.add(node); + } + } + } + + public void onPointerMoved(Point p) { + if (presenter != null) { + presenter.onStatusMessage("[x=" + p.getX() + ", y=" + p.getY() + "]"); + } else if (getStatusBar() != null) { + getStatusBar().showMessage("[x=" + p.getX() + ", y=" + p.getY() + "] ", BorderLayout.EAST); + } + } + + public void onPointerExited() { + if (presenter != null) { + presenter.onStatusMessage(""); + } else if (getStatusBar() != null) { + getStatusBar().clearMessage(); + } + } + } diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramModel.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramModel.java new file mode 100644 index 000000000..faa5b254e --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramModel.java @@ -0,0 +1,230 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import java.awt.geom.Point2D; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.WeakHashMap; +import java.util.List; +import java.util.ArrayList; + +import org.tzi.use.gui.views.diagrams.elements.PlaceableNode; +import org.tzi.use.gui.views.diagrams.elements.edges.EdgeBase; +import org.tzi.use.gui.views.diagrams.elements.positioning.PositionStrategy; +import org.tzi.use.gui.views.diagrams.elements.edges.BinaryAssociationOrLinkEdge; +import org.tzi.use.gui.views.diagrams.elements.DiamondNode; +import org.tzi.use.gui.views.diagrams.objectdiagram.NewObjectDiagram.ObjectDiagramData; +import org.tzi.use.uml.sys.MLink; +import org.tzi.use.uml.sys.MLinkObject; +import org.tzi.use.uml.sys.MObject; + +/** + * Skeleton for the object diagram domain model. Holds visible/hidden graph data. + * This is intentionally minimal and not yet wired; follow-up steps will migrate + * state from {@link NewObjectDiagram} into this model. + */ +public class NewObjectDiagramModel { + + /** listeners for future change events */ + public interface Listener { + default void onNodeAdded(MObject obj, PlaceableNode node) {} + default void onNodeRemoved(MObject obj) {} + default void onLinkAdded(MLink link, EdgeBase edge) {} + default void onLinkRemoved(MLink link) {} + default void onStateChanged() {} + } + + private final Set listeners = new HashSet<>(); + + public void addListener(Listener listener) { + listeners.add(listener); + } + + public void removeListener(Listener listener) { + listeners.remove(listener); + } + + private final ObjectDiagramData visibleData = new ObjectDiagramData(); + private final ObjectDiagramData hiddenData = new ObjectDiagramData(); + + // caches for last known positions, moved from diagram into model + private final Map lastKnownNodePositions = new WeakHashMap<>(); + private final Map lastKnownLinkPositions = new WeakHashMap<>(); + + /** tracked selection/highlight state to centralize UI state */ + private final Set selectedObjects = new HashSet<>(); + private final Set selectedLinks = new HashSet<>(); + private final Map highlightedObjects = new HashMap<>(); + private final Map highlightedLinks = new HashMap<>(); + + public ObjectDiagramData getVisibleData() { + return visibleData; + } + + public ObjectDiagramData getHiddenData() { + return hiddenData; + } + + public Map getLastKnownNodePositions() { + return lastKnownNodePositions; + } + + public Map getLastKnownLinkPositions() { + return lastKnownLinkPositions; + } + + public Set getSelectedObjects() { + return Collections.unmodifiableSet(selectedObjects); + } + + public Set getSelectedLinks() { + return Collections.unmodifiableSet(selectedLinks); + } + + /** Clear all stored state (visible/hidden and caches). */ + public void reset() { + visibleData.clear(); + hiddenData.clear(); + lastKnownNodePositions.clear(); + lastKnownLinkPositions.clear(); + selectedObjects.clear(); + selectedLinks.clear(); + highlightedObjects.clear(); + highlightedLinks.clear(); + } + + public boolean isHidden(MLink link) { + return hiddenData.containsLink(link) + || (link instanceof MLinkObject ml && hiddenData.getObjectToNodeMap().containsKey(ml)); + } + + public boolean isHidden(MObject obj) { + return hiddenData.getObjectToNodeMap().containsKey(obj); + } + + /** Move object node from hidden to visible or vice versa. */ + public void moveObject(MObject obj, boolean toVisible) { + ObjectDiagramData source = toVisible ? hiddenData : visibleData; + ObjectDiagramData target = toVisible ? visibleData : hiddenData; + var node = source.getObjectToNodeMap().remove(obj); + if (node != null) { + target.getObjectToNodeMap().put(obj, node); + } + } + + public BinaryAssociationOrLinkEdge moveBinaryLink(MLink link, boolean toVisible) { + ObjectDiagramData source = toVisible ? hiddenData : visibleData; + ObjectDiagramData target = toVisible ? visibleData : hiddenData; + BinaryAssociationOrLinkEdge edge = source.getBinaryLinkToEdgeMap().remove(link); + if (edge != null) { + target.getBinaryLinkToEdgeMap().put(link, edge); + } + return edge; + } + + public EdgeBase moveLinkObjectEdge(MLinkObject link, boolean toVisible) { + ObjectDiagramData source = toVisible ? hiddenData : visibleData; + ObjectDiagramData target = toVisible ? visibleData : hiddenData; + EdgeBase edge = source.getLinkObjectToNodeEdge().remove(link); + if (edge != null) { + target.getLinkObjectToNodeEdge().put(link, edge); + } + return edge; + } + + public DiamondNode moveNaryLinkNode(MLink link, boolean toVisible) { + ObjectDiagramData source = toVisible ? hiddenData : visibleData; + ObjectDiagramData target = toVisible ? visibleData : hiddenData; + DiamondNode node = source.getNaryLinkToDiamondNodeMap().remove(link); + if (node != null) { + target.getNaryLinkToDiamondNodeMap().put(link, node); + } + return node; + } + + public List moveHalfEdges(MLink link, boolean toVisible) { + ObjectDiagramData source = toVisible ? hiddenData : visibleData; + ObjectDiagramData target = toVisible ? visibleData : hiddenData; + List edges = source.getHalfLinkToEdgeMap().remove(link); + if (edges != null) { + target.getHalfLinkToEdgeMap().put(link, edges); + } + return edges == null ? List.of() : edges; + } + + public BinaryAssociationOrLinkEdge popBinaryLink(MLink link) { + BinaryAssociationOrLinkEdge edge = visibleData.getBinaryLinkToEdgeMap().remove(link); + if (edge == null) { + edge = hiddenData.getBinaryLinkToEdgeMap().remove(link); + } + return edge; + } + + public EdgeBase popLinkObjectEdge(MLinkObject link) { + EdgeBase edge = visibleData.getLinkObjectToNodeEdge().remove(link); + if (edge == null) { + edge = hiddenData.getLinkObjectToNodeEdge().remove(link); + } + return edge; + } + + public DiamondNode popNaryLinkNode(MLink link) { + DiamondNode node = visibleData.getNaryLinkToDiamondNodeMap().remove(link); + if (node == null) { + node = hiddenData.getNaryLinkToDiamondNodeMap().remove(link); + } + return node; + } + + public List popHalfEdges(MLink link) { + List edges = visibleData.getHalfLinkToEdgeMap().remove(link); + if (edges == null) { + edges = hiddenData.getHalfLinkToEdgeMap().remove(link); + } + return edges == null ? new ArrayList<>() : edges; + } + + public ObjectNode popObject(MObject obj) { + ObjectNode node = visibleData.getObjectToNodeMap().remove(obj); + if (node == null) { + node = hiddenData.getObjectToNodeMap().remove(obj); + } + return node; + } + + public void replaceSelection(Set objects, Set links) { + selectedObjects.clear(); + selectedLinks.clear(); + if (objects != null) { + selectedObjects.addAll(objects); + } + if (links != null) { + selectedLinks.addAll(links); + } + notifyStateChanged(); + } + + public boolean isHighlighted(MObject obj) { + return highlightedObjects.getOrDefault(obj, Boolean.FALSE); + } + + public boolean isHighlighted(MLink link) { + return highlightedLinks.getOrDefault(link, Boolean.FALSE); + } + + public void setHighlighted(MObject obj, boolean value) { + highlightedObjects.put(obj, value); + notifyStateChanged(); + } + + public void setHighlighted(MLink link, boolean value) { + highlightedLinks.put(link, value); + notifyStateChanged(); + } + + private void notifyStateChanged() { + listeners.forEach(Listener::onStateChanged); + } +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramPresenter.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramPresenter.java new file mode 100644 index 000000000..46a9b661e --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramPresenter.java @@ -0,0 +1,101 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import org.tzi.use.gui.views.diagrams.event.HighlightChangeEvent; +import org.tzi.use.uml.ocl.value.Value; +import org.tzi.use.uml.sys.events.AttributeAssignedEvent; +import org.tzi.use.uml.sys.events.LinkDeletedEvent; +import org.tzi.use.uml.sys.events.LinkInsertedEvent; +import org.tzi.use.uml.sys.events.TransitionEvent; +import org.tzi.use.uml.sys.MObject; +import org.tzi.use.uml.sys.MLink; +import org.tzi.use.uml.mm.MAssociation; +import org.tzi.use.uml.mm.MClass; +import org.tzi.use.uml.mm.statemachines.MProtocolStateMachine; +import org.tzi.use.gui.util.PersistHelper; +import org.tzi.use.uml.sys.MSystem; +import org.w3c.dom.Element; +import javax.swing.JPopupMenu; +import java.awt.Point; +import java.util.Collection; +import java.util.List; +import java.util.Set; + +/** + * Presenter boundary for the object diagram (MVP, passive view). + * Responsibilities: translate UI/input into model/system mutations, listen to system events, + * and push UI updates via the view; keep UI components free of system logic. + */ +public interface NewObjectDiagramPresenter { + void onRequestPopup(); + void onAddObject(Value value); + void onRefreshRequested(); + void onCreateObject(String clsName); + void onResetDiagram(ObjDiagramOptions options); + void onHighlightChange(HighlightChangeEvent e); + + default void onTransition(TransitionEvent e) {} + default void onObjectCreated(MObject obj) {} + default void onObjectDestroyed(MObject obj) {} + default void onAttributeAssigned(AttributeAssignedEvent e) {} + default void onLinkInserted(LinkInsertedEvent e) {} + default void onLinkDeleted(LinkDeletedEvent e) {} + + default void onPopupMenuPrepared(JPopupMenu menu, + Point popupPosition, + Set selectedObjects, + Set selectedLinks, + Set selectedAssocObjects) {} + default void onStatusMessage(String status) {} + + default void onBuildShowHideCropMenu(ContextMenuProvider.ShowHideCropMenuBuilder builder, Set selectedObjects) {} + + default void onInsertLink(MAssociation association, List participants) {} + default void onDeleteLink(MLink link) {} + default void onDeleteObjects(Set objects) {} + + /** Notify presenter that selection changed in the diagram. */ + default void onSelectionChanged(Set selectedObjects, Set selectedLinks) {} + + /** Notify presenter that the current selection was dragged by the given delta. */ + default void onDragSelectionMoved(int dx, int dy) {} + + /** Show properties for the given object. */ + default void onShowObjectProperties(MObject object) {} + + /** Open the protocol state machine view for the given instance. */ + default void onShowProtocolStateMachine(MProtocolStateMachine stateMachine, MObject instance) {} + + /** Fetch links of an association from the model/state. */ + default Set fetchLinksOfAssociation(MAssociation association) { return Set.of(); } + + /** Fetch protocol state machines available for the given object. */ + default Set fetchProtocolStateMachines(MObject object) { return Set.of(); } + + /** Fetch all objects of the given class from the state. */ + default Set fetchObjectsOfClass(MClass cls) { return Set.of(); } + + /** Fetch all associations of the current model. */ + default Collection fetchAllAssociations() { return Set.of(); } + + default void onHideLinks(Collection links) {} + default void onShowLinks(Collection links) {} + default void onHideObjects(Collection objects) {} + default void onHideAllLinks() {} + default void onShowAllLinks() {} + default void onShowHiddenElements() {} + default void onCropSelection(Collection objectsToHide) {} + default void onGrayOut(Collection objects) {} + default void onGrayIn(Collection objects) {} + default void onToggleShowStates(boolean show) {} + + default void onStoreLayout(PersistHelper helper, + Element root, + NewObjectDiagramModel model) {} + default Set onRestoreLayout(PersistHelper helper, + int version, + NewObjectDiagramModel model, + MSystem system) { return Set.of(); } + + /** Lifecycle hook to release resources (e.g., event bus). */ + default void detach() {} +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramPresenterImpl.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramPresenterImpl.java new file mode 100644 index 000000000..0f3a1c2c3 --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramPresenterImpl.java @@ -0,0 +1,892 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import com.google.common.eventbus.Subscribe; +import org.tzi.use.gui.util.PersistHelper; +import org.tzi.use.gui.views.diagrams.event.HighlightChangeEvent; +import org.tzi.use.uml.mm.MAssociation; +import org.tzi.use.uml.mm.MClass; +import org.tzi.use.uml.ocl.value.Value; +import org.tzi.use.uml.sys.MLink; +import org.tzi.use.uml.sys.MLinkObject; +import org.tzi.use.uml.sys.MObject; +import org.tzi.use.uml.sys.MSystem; +import org.tzi.use.uml.sys.events.*; +import org.w3c.dom.Element; + +import javax.swing.*; +import java.awt.*; +import java.util.Collection; +import java.util.List; +import java.util.Set; + +/** + * MVP presenter for the object diagram. Currently a skeleton with no logic; wiring will be added incrementally. + */ + +public class NewObjectDiagramPresenterImpl implements NewObjectDiagramPresenter { + + private final NewObjectDiagramUI view; + + private final ObjectDiagramInteractor diagram; + + private final NewObjectDiagramModel model; + + private final ApplicationController applicationController; + + private final ContextMenuProvider contextMenuProvider; + + private final PlacementRepository placementRepository; + + private final MSystem system; + + // Common log message fragments extracted to constants to avoid duplicated literals (Sonar S1192) + private static final String PREFIX_EVENT = "event="; + private static final String PREFIX_OBJECT = "object="; + private static final String PREFIX_LINK = "link="; + private static final String PREFIX_COUNT = "count="; + private static final String PREFIX_ASSOCIATION = "association="; + private static final String PREFIX_CLASS = "class="; + private static final String MSG_REQUESTED = "requested"; + private static final String CONSTRUCTED_PREFIX = "constructed; view="; + private static final String COMMA_DIAGRAM = ", diagram="; + private static final String COMMA_MODEL = ", model="; + + public NewObjectDiagramPresenterImpl(NewObjectDiagramUI view, + + ObjectDiagramInteractor diagram, + + NewObjectDiagramModel model, + + ApplicationController applicationController, + + ContextMenuProvider contextMenuProvider, + + PlacementRepository placementRepository, + + MSystem system) { + + this.view = view; + + this.diagram = diagram; + + this.model = model; + + this.applicationController = applicationController; + + this.contextMenuProvider = contextMenuProvider; + + this.placementRepository = placementRepository; + + this.system = system; + + log("", CONSTRUCTED_PREFIX + (view == null ? "null" : view.getClass().getSimpleName()) + + COMMA_DIAGRAM + (diagram == null ? "null" : diagram.getClass().getSimpleName()) + + COMMA_MODEL + (model == null ? "null" : model.getClass().getSimpleName())); + + if (this.system != null) { + + this.system.getEventBus().register(this); + + } + + } + + private static int sizeOf(Collection values) { + + return values == null ? 0 : values.size(); + + } + + private static int sizeOf(Set values) { + + return values == null ? 0 : values.size(); + + } + + private static int sizeOf(List values) { + + return values == null ? 0 : values.size(); + + } + + private void log(String method, String message) { + + PresenterFileLogger.log(getClass(), method, message); + + } + + @Override + + public void onRequestPopup() { + + log("onRequestPopup", "requested popup menu"); + + // will be implemented when ContextMenuProvider is wired + + } + + @Override + + public void onAddObject(Value value) { + + log("onAddObject", "value=" + value); + + // will be implemented during migration + + } + + @Override + + public void onRefreshRequested() { + + log("onRefreshRequested", "refresh requested"); + + refreshDiagram(true); + + onStatusMessage("Diagram refreshed"); + + } + + @Override + + public void onCreateObject(String clsName) { + + log("onCreateObject", "clsName=" + clsName); + + if (applicationController != null) { + + applicationController.createObject(clsName); + + onStatusMessage("Create object: " + clsName); + + } + + } + + @Override + + public void onResetDiagram(ObjDiagramOptions options) { + + log("onResetDiagram", "options=" + options); + + if (applicationController != null) { + + applicationController.resetDiagram(options); + + } + + if (model != null) { + + model.reset(); + + } + + refreshDiagram(true); + + onStatusMessage("Diagram reset"); + + } + + @Override + + public void onHighlightChange(HighlightChangeEvent e) { + + log("onHighlightChange", PREFIX_EVENT + e); + + if (diagram instanceof NewObjectDiagram diag && e != null) { + + diag.handleHighlightChange(e); + + } + + } + + @Override + + @Subscribe + + public void onTransition(TransitionEvent e) { + + log("onTransition", PREFIX_EVENT + e); + + if (diagram == null || e == null) { + + return; + + } + + diagram.updateObject(e.getSource()); + + refreshDiagram(true); + + } + + private void refreshDiagram(boolean fullLayout) { + + if (diagram != null) { + + diagram.invalidateContent(fullLayout); + + } + + if (view != null) { + + view.refresh(); + + } + + } + + @Subscribe + + public void onObjectCreated(ObjectCreatedEvent e) { + + if (e == null) { + + return; + + } + + onObjectCreated(e.getCreatedObject()); + + } + + @Override + + public void onObjectCreated(MObject obj) { + + log("onObjectCreated", PREFIX_OBJECT + obj); + + if (diagram == null || obj == null || obj instanceof MLink) { + + return; + + } + + diagram.addObject(obj); + + refreshDiagram(true); + + } + + @Subscribe + + public void onObjectDestroyed(ObjectDestroyedEvent e) { + + if (e == null) { + + return; + + } + + onObjectDestroyed(e.getDestroyedObject()); + + } + + @Override + + public void onObjectDestroyed(MObject obj) { + + log("onObjectDestroyed", PREFIX_OBJECT + obj); + + if (diagram == null || obj == null || obj instanceof MLink) { + + return; + + } + + diagram.deleteObject(obj); + + refreshDiagram(true); + + } + + @Override + + @Subscribe + + public void onAttributeAssigned(AttributeAssignedEvent e) { + + log("onAttributeAssigned", PREFIX_EVENT + e); + + if (diagram == null || e == null || e.getObject() == null) { + + return; + + } + + diagram.updateObject(e.getObject()); + + refreshDiagram(true); + + } + + @Override + + @Subscribe + + public void onLinkInserted(LinkInsertedEvent e) { + + log("onLinkInserted", PREFIX_EVENT + e); + + if (diagram == null || e == null) { + + return; + + } + + MLink link = e.getLink(); + + if (link == null) { + + return; + + } + + if (link instanceof MLinkObject linkObject) { + + diagram.addObject(linkObject); + + } + + diagram.addLink(link); + + refreshDiagram(true); + + } + + @Override + + @Subscribe + + public void onLinkDeleted(LinkDeletedEvent e) { + + log("onLinkDeleted", PREFIX_EVENT + e); + + if (diagram == null || e == null) { + + return; + + } + + MLink link = e.getLink(); + + if (link == null) { + + return; + + } + + if (link instanceof MLinkObject linkObject) { + + diagram.deleteObject(linkObject); + + } + + diagram.deleteLink(link); + + refreshDiagram(true); + + } + + @Override + + public void onPopupMenuPrepared(JPopupMenu menu, + + Point popupPosition, + + Set selectedObjects, + + Set selectedLinks, + + Set selectedAssocObjects) { + + log("onPopupMenuPrepared", "popupPosition=" + popupPosition + ", selectedObjects=" + sizeOf(selectedObjects) + + + ", selectedLinks=" + sizeOf(selectedLinks) + ", selectedAssocObjects=" + sizeOf(selectedAssocObjects)); + + if (contextMenuProvider != null && menu != null) { + + contextMenuProvider.enhanceMenu(menu, diagram, this, popupPosition, + + selectedObjects, selectedLinks, selectedAssocObjects); + + } + + } + + @Override + + public void onStatusMessage(String status) { + + log("onStatusMessage", status); + + if (view != null && status != null) { + + view.setStatus(status); + + } + + } + + @Override + + public void onBuildShowHideCropMenu(ContextMenuProvider.ShowHideCropMenuBuilder builder, Set selectedObjects) { + + log("onBuildShowHideCropMenu", "selectedObjects=" + sizeOf(selectedObjects)); + + if (builder == null) { + + return; + + } + + if (selectedObjects != null && !selectedObjects.isEmpty()) { + + builder.addSelectedObjectPathView(selectedObjects); + + } + + builder.addSelectionWithOCLViewAction(); + + builder.addSelectionObjectView(); + + } + + @Override + + public void onInsertLink(MAssociation association, List participants) { + + log("onInsertLink", PREFIX_ASSOCIATION + association + ", participants=" + sizeOf(participants)); + + if (applicationController != null) { + + applicationController.insertLink(association, participants); + + } else if (view instanceof NewObjectDiagramView v) { + + v.insertLink(association, participants.toArray(new MObject[0])); + + } + + } + + @Override + + public void onDeleteLink(MLink link) { + + log("onDeleteLink", PREFIX_LINK + link); + + if (applicationController != null) { + + applicationController.deleteLink(link); + + } else if (view instanceof NewObjectDiagramView v) { + + v.deleteLink(link); + + } + + if (diagram != null) { + + diagram.clearSelection(); + + } + + } + + @Override + + public void onDeleteObjects(Set objects) { + + log("onDeleteObjects", PREFIX_COUNT + sizeOf(objects)); + + if (applicationController != null) { + + applicationController.deleteObjects(objects); + + } else if (view instanceof NewObjectDiagramView v) { + + v.deleteObjects(objects); + + } + + if (diagram != null) { + + diagram.clearSelection(); + + } + + } + + @Override + + public void onShowObjectProperties(MObject object) { + + log("onShowObjectProperties", PREFIX_OBJECT + object); + + if (applicationController != null && object != null) { + + applicationController.showObjectProperties(object.name()); + + } + + } + + @Override + + public Set fetchLinksOfAssociation(MAssociation association) { + + log("fetchLinksOfAssociation", PREFIX_ASSOCIATION + association); + + if (association == null || system == null) { + + return Set.of(); + + } + + return system.state().linksOfAssociation(association).links(); + + } + + @Override + + public Set fetchObjectsOfClass(MClass cls) { + + log("fetchObjectsOfClass", PREFIX_CLASS + cls); + + if (cls == null || system == null) { + + return Set.of(); + + } + + return system.state().objectsOfClass(cls); + + } + + @Override + + public Collection fetchAllAssociations() { + + log("fetchAllAssociations", MSG_REQUESTED); + + if (system == null) { + + return Set.of(); + + } + + return system.model().associations(); + + } + + @Override + + public void onHideLinks(Collection links) { + + log("onHideLinks", PREFIX_COUNT + sizeOf(links)); + + if (diagram == null || links == null) { + + return; + + } + + links.forEach(diagram::hideLink); + + refreshDiagram(true); + + } + + @Override + + public void onShowLinks(Collection links) { + + log("onShowLinks", PREFIX_COUNT + sizeOf(links)); + + if (diagram == null || links == null) { + + return; + + } + + if (diagram instanceof NewObjectDiagram newDiagram) { + + newDiagram.showLink(new java.util.ArrayList<>(links)); + + refreshDiagram(true); + + } + + } + + @Override + + public void onHideObjects(Collection objects) { + + log("onHideObjects", PREFIX_COUNT + sizeOf(objects)); + + if (diagram == null || objects == null) { + + return; + + } + + objects.forEach(diagram::hideObject); + + refreshDiagram(true); + + } + + @Override + + public void onHideAllLinks() { + + log("onHideAllLinks", MSG_REQUESTED); + + if (diagram == null) { + + return; + + } + + diagram.hideAllLinks(); + + refreshDiagram(true); + + } + + @Override + + public void onShowAllLinks() { + + log("onShowAllLinks", MSG_REQUESTED); + + if (diagram == null) { + + return; + + } + + diagram.showAllLinks(); + + refreshDiagram(true); + + } + + @Override + + public void onShowHiddenElements() { + + log("onShowHiddenElements", "requested; hiddenObjects=" + hiddenObjectCount() + ", hiddenLinks=" + hiddenLinkCount()); + + if (diagram == null) { + + return; + + } + + diagram.showAll(); + + diagram.showAllLinks(); + + refreshDiagram(true); + + } + + @Override + + public void onCropSelection(Collection objectsToHide) { + + log("onCropSelection", "keepCount=" + sizeOf(objectsToHide)); + + if (diagram == null || objectsToHide == null || objectsToHide.isEmpty()) { + + return; + + } + + if (diagram instanceof NewObjectDiagram newDiagram) { + + Set keepObjects = new java.util.LinkedHashSet<>(objectsToHide); + + Set visibleObjects = new java.util.LinkedHashSet<>(newDiagram.getVisibleData().getObjectToNodeMap().keySet()); + + visibleObjects.removeAll(keepObjects); + + visibleObjects.forEach(diagram::hideObject); + + } else { + + objectsToHide.forEach(diagram::hideObject); + + } + + diagram.clearSelection(); + + refreshDiagram(true); + + } + + @Override + + public void onGrayOut(Collection objects) { + + log("onGrayOut", PREFIX_COUNT + sizeOf(objects)); + + if (diagram == null || objects == null) { + + return; + + } + + objects.forEach(obj -> diagram.setGreyed(obj, true)); + + refreshDiagram(false); + + } + + @Override + + public void onGrayIn(Collection objects) { + + log("onGrayIn", PREFIX_COUNT + sizeOf(objects)); + + if (diagram == null || objects == null) { + + return; + + } + + objects.forEach(obj -> diagram.setGreyed(obj, false)); + + refreshDiagram(false); + + } + + @Override + + public void onToggleShowStates(boolean show) { + + log("onToggleShowStates", "show=" + show); + + if (diagram == null) { + + return; + + } + + diagram.setShowStates(show); + + refreshDiagram(true); + + } + + @Override + + public void onStoreLayout(PersistHelper helper, + + Element root, + + NewObjectDiagramModel model) { + + log("onStoreLayout", "helper=" + helper + ", root=" + root + COMMA_MODEL + model); + + if (placementRepository != null && helper != null && root != null) { + + placementRepository.storeLayout(model, helper, root); + + } + + } + + @Override + + public Set onRestoreLayout(PersistHelper helper, + + int version, + + NewObjectDiagramModel model, + + MSystem system) { + + log("onRestoreLayout", "version=" + version + ", helper=" + helper + COMMA_MODEL + model); + + if (placementRepository != null && helper != null) { + + return placementRepository.restoreLayout(model, helper, version, system); + + } + + return Set.of(); + + } + + public NewObjectDiagramModel getModel() { + + return model; + + } + + MSystem getSystem() { + + return system; + + } + + @Override + + public void detach() { + + log("detach", MSG_REQUESTED); + + if (system != null) { + + try { + + system.getEventBus().unregister(this); + + } catch (Exception ignored) { + + // ignore if already unregistered + + } + + } + + // ensure diagram refresh stops referencing this presenter + + refreshDiagram(false); + + } + + private int hiddenObjectCount() { + + if (!(diagram instanceof NewObjectDiagram newDiagram) || newDiagram.getHiddenNodes() == null) { + + return 0; + + } + + return newDiagram.getHiddenNodes().size(); + + } + + private int hiddenLinkCount() { + + if (!(diagram instanceof NewObjectDiagram newDiagram) + + || newDiagram.getHiddenData() == null + + || newDiagram.getHiddenData().getEdges() == null) { + + return 0; + + } + + return newDiagram.getHiddenData().getEdges().size(); + + } + +} \ No newline at end of file diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramUI.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramUI.java new file mode 100644 index 000000000..cd5f848b8 --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramUI.java @@ -0,0 +1,10 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import javax.swing.JPopupMenu; + +/** Minimal view contract for the object diagram MVP. */ +public interface NewObjectDiagramUI { + void showPopup(JPopupMenu popup); + void refresh(); + void setStatus(String status); +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramView.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramView.java index 6ea170aa3..303bfd731 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramView.java +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/NewObjectDiagramView.java @@ -21,17 +21,17 @@ import java.awt.BorderLayout; import java.awt.Graphics2D; +import java.awt.Font; +import java.awt.event.KeyListener; import java.awt.print.PageFormat; import java.util.Arrays; -import java.util.Collections; -import java.util.List; import java.util.Set; +import java.util.concurrent.atomic.AtomicInteger; import javax.swing.JComponent; -import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; - +import javax.swing.JPopupMenu; import org.tzi.use.gui.main.MainWindow; import org.tzi.use.gui.main.ModelBrowser; @@ -41,50 +41,40 @@ import org.tzi.use.gui.views.PrintableView; import org.tzi.use.gui.views.View; import org.tzi.use.uml.mm.MAssociation; -import org.tzi.use.uml.mm.MAssociationClass; -import org.tzi.use.uml.mm.MClass; -import org.tzi.use.uml.ocl.value.Value; import org.tzi.use.uml.sys.MLink; -import org.tzi.use.uml.sys.MLinkObject; import org.tzi.use.uml.sys.MObject; import org.tzi.use.uml.sys.MSystem; -import org.tzi.use.uml.sys.MSystemException; -import org.tzi.use.uml.sys.events.AttributeAssignedEvent; -import org.tzi.use.uml.sys.events.LinkDeletedEvent; -import org.tzi.use.uml.sys.events.LinkInsertedEvent; -import org.tzi.use.uml.sys.events.ObjectCreatedEvent; -import org.tzi.use.uml.sys.events.ObjectDestroyedEvent; -import org.tzi.use.uml.sys.events.TransitionEvent; -import org.tzi.use.uml.sys.soil.MLinkDeletionStatement; -import org.tzi.use.uml.sys.soil.MLinkInsertionStatement; -import org.tzi.use.uml.sys.soil.MObjectDestructionStatement; -import org.tzi.use.uml.sys.soil.MSequenceStatement; - -import com.google.common.eventbus.Subscribe; - -/** + +/** * A graph showing an object diagram with objects and links in the * current system state. * * @author Mark Richters */ -@SuppressWarnings("serial") -public class NewObjectDiagramView extends JPanel - implements View, PrintableView, SortChangeListener { +public class NewObjectDiagramView extends JPanel + implements View, PrintableView, SortChangeListener, NewObjectDiagramUI, DiagramContext { - protected final MSystem fSystem; - protected final MainWindow fMainWindow; + private static final long serialVersionUID = 1L; + + /** The system shown in this view. Marked transient because MSystem is not serializable. */ + protected final transient MSystem fSystem; + /** Reference to main window; transient because MainWindow is not serializable. */ + protected final transient MainWindow fMainWindow; + /** Controller used for commands; transient because controllers are not serializable. */ + private transient ApplicationController appController; + + /** The underlying diagram component. transient because Swing components are not serializable. */ + protected transient NewObjectDiagram fObjectDiagram; + + /** Number of active views. Use AtomicInteger to avoid instance methods writing plain static fields. */ + private static final AtomicInteger VIEW_COUNT = new AtomicInteger(0); - protected NewObjectDiagram fObjectDiagram; - public static int viewcount = 0; - public NewObjectDiagramView(MainWindow mainWindow, MSystem system) { fMainWindow = mainWindow; fSystem = system; fSystem.registerRequiresAllDerivedValues(); ModelBrowserSorting.getInstance().addSortChangeListener( this ); - fSystem.getEventBus().register(this); setLayout(new BorderLayout()); @@ -93,46 +83,40 @@ public NewObjectDiagramView(MainWindow mainWindow, MSystem system) { initDiagram(false, null); } + @SuppressWarnings("unused") public void initDiagram(boolean loadDefaultLayout, ObjDiagramOptions opt) { - if (opt == null) - fObjectDiagram = new NewObjectDiagram( this, fMainWindow.logWriter()); - else - fObjectDiagram = new NewObjectDiagram( this, fMainWindow.logWriter(), new ObjDiagramOptions(opt)); - - fObjectDiagram.setStatusBar(fMainWindow.statusBar()); - this.removeAll(); - add( new JScrollPane(fObjectDiagram) ); - initState(); - } - - /** - * Returns the model browser. - */ - public ModelBrowser getModelBrowser() { - return fMainWindow.getModelBrowser(); - } - - /** - * The managed diagram - * @return - */ + if (opt == null) + fObjectDiagram = new NewObjectDiagram( this, fMainWindow.logWriter()); + else + fObjectDiagram = new NewObjectDiagram( this, fMainWindow.logWriter(), new ObjDiagramOptions(opt)); + + // wire MVP skeleton with basic placement persistence + NewObjectDiagramModel model = new NewObjectDiagramModel(); + PlacementRepository placementRepository = new DefaultPlacementRepository(); + + // avoid assignment inside method invocation (Sonar S1121) + appController = new DefaultApplicationController(fMainWindow, fSystem, this); + NewObjectDiagramPresenterImpl presenter = new NewObjectDiagramPresenterImpl( + this, + fObjectDiagram, + model, + appController, + new DefaultContextMenuProvider(), + placementRepository, + fSystem); + fObjectDiagram.setPresenter(presenter); + + fObjectDiagram.setStatusBar(fMainWindow.statusBar()); + this.removeAll(); + add( new JScrollPane(fObjectDiagram) ); + initState(); + } + + /** The managed diagram. */ public NewObjectDiagram getDiagram() { - return this.fObjectDiagram; - } - - /** - * Determines if this is the selected view. - * @return true if it is the selected view, otherwise - * false - */ - public boolean isSelectedView() { - if ( fMainWindow.getSelectedView() != null ) { - return fMainWindow.getSelectedView().equals( this ); - } - return false; - } - - + return this.fObjectDiagram; + } + /** * Does a full update of the view. */ @@ -146,152 +130,79 @@ private void initState() { } fObjectDiagram.initialize(); - viewcount++; - } - - @Subscribe - public void onTransition(TransitionEvent e) { - fObjectDiagram.updateObject(e.getSource()); - fObjectDiagram.invalidateContent(true); - } - - @Subscribe - public void onObjectCeated(ObjectCreatedEvent e) { - if (e.getCreatedObject() instanceof MLink) { - return; - } - - fObjectDiagram.addObject(e.getCreatedObject()); - fObjectDiagram.invalidateContent(true); - } - - @Subscribe - public void onObjectDestroyed(ObjectDestroyedEvent e) { - if (e.getDestroyedObject() instanceof MLink) { - return; - } - - fObjectDiagram.deleteObject(e.getDestroyedObject()); - fObjectDiagram.invalidateContent(true); - } - - @Subscribe - public void onAttributeAssigned(AttributeAssignedEvent e) { - fObjectDiagram.updateObject(e.getObject()); - fObjectDiagram.invalidateContent(true); - } - - @Subscribe - public void onLinkCeated(LinkInsertedEvent e) { - if (e.getAssociation() instanceof MAssociationClass) { - fObjectDiagram.addObject((MLinkObject)e.getLink()); - } - fObjectDiagram.addLink(e.getLink()); - fObjectDiagram.invalidateContent(true); - } - - @Subscribe - public void onLinkDeleted(LinkDeletedEvent e) { - if (e.getAssociation() instanceof MAssociationClass) { - fObjectDiagram.deleteObject((MLinkObject)e.getLink()); - } - - fObjectDiagram.deleteLink(e.getLink()); - fObjectDiagram.invalidateContent(true); + VIEW_COUNT.incrementAndGet(); } + // legacy helpers removed; use public DiagramContext methods below + + @Override public MSystem system() { return fSystem; } + @Override public ModelBrowser getModelBrowser() { return fMainWindow.getModelBrowser(); } + @Override public boolean isSelectedView() { return fMainWindow.getSelectedView() != null && fMainWindow.getSelectedView().equals(this); } /** - * After the occurence of an event the view is updated. + * Adds a key listener and ensures the component is focusable so it can receive key events. */ @Override - public void stateChanged( SortChangeEvent e ) { - fObjectDiagram.invalidateContent(true); + public synchronized void addKeyListener(KeyListener l) { + super.addKeyListener(l); + // make sure the component can receive focus when a key listener is added + setFocusable(true); } /** - * Returns the set of all associations that exist between the - * specified classes. - * - * @return Set(MAssociation) + * Returns the font of this component. If no font is set, fall back to the main window font. */ - Set getAllAssociationsBetweenClasses(Set classes) { - return fSystem.model().getAllAssociationsBetweenClasses(classes); + @Override + public Font getFont() { + Font f = super.getFont(); + if (f == null && fMainWindow != null) { + return fMainWindow.getFont(); + } + return f; } /** - * Returns true if there is a link of the specified association - * connecting the given set of objects. + * Sets the font and triggers a revalidation/repaint to reflect the change. */ - Set linksBetweenObjects(MAssociation assoc, MObject[] objects) { - return fSystem.state().linkBetweenObjects(assoc, Arrays.asList(objects)); + @Override + public void setFont(Font font) { + super.setFont(font); + revalidate(); + repaint(); } - - /** - * Executes a command for deleting a link between selected - * objects. - */ - void deleteLink(MLink link) { - try { - fSystem.execute( - new MLinkDeletionStatement(link)); - } catch (MSystemException e) { - JOptionPane.showMessageDialog( - fMainWindow, - e.getMessage(), - "Error", - JOptionPane.ERROR_MESSAGE); - } + @Override public void createObject(String className) { + if (fObjectDiagram != null && fObjectDiagram.getPresenter() != null) { + fObjectDiagram.getPresenter().onCreateObject(className); + } else { + MainWindow.instance().createObject(className); + } } - - /** - * Executes a command for inserting a new link. - */ - void insertLink(MAssociation association, MObject[] objects) { - if (association.hasQualifiedEnds()) { - QualifierInputView input = new QualifierInputView(fMainWindow, fSystem, association, objects); - input.setLocationRelativeTo(this); - input.setVisible(true); - } else { - try { - fSystem.execute(new MLinkInsertionStatement(association, objects, Collections.>emptyList())); - } catch (MSystemException e) { - JOptionPane.showMessageDialog( - fMainWindow, - e.getMessage(), - "Error", - JOptionPane.ERROR_MESSAGE); - } - } + @Override public void insertLink(MAssociation association, MObject[] objects) { + if (fObjectDiagram != null && fObjectDiagram.getPresenter() != null) { + fObjectDiagram.getPresenter().onInsertLink(association, Arrays.asList(objects)); + } else if (appController != null) { + appController.insertLink(association, Arrays.asList(objects)); + } } - - - /** - * Executes a command for deleting selected objects. - */ - void deleteObjects(Set objects) { - MSequenceStatement sequence = new MSequenceStatement(); - - for (MObject obj : objects) { - sequence.appendStatement( - new MObjectDestructionStatement(obj.value())); + @Override public void deleteLink(MLink link) { + if (fObjectDiagram != null && fObjectDiagram.getPresenter() != null) { + fObjectDiagram.getPresenter().onDeleteLink(link); + } else if (appController != null) { + appController.deleteLink(link); } - - if (sequence.isEmpty()) { - return; + } + @Override public void deleteObjects(Set objects) { + if (fObjectDiagram != null && fObjectDiagram.getPresenter() != null) { + fObjectDiagram.getPresenter().onDeleteObjects(objects); + } else if (appController != null) { + appController.deleteObjects(objects); } - try { - fSystem.execute(sequence.simplify()); - } catch (MSystemException e) { - JOptionPane.showMessageDialog( - fMainWindow, - e.getMessage(), - "Error", - JOptionPane.ERROR_MESSAGE); - } } - - public MSystem system() { - return fSystem; + @Override public void resetDiagram(ObjDiagramOptions options) { + if (fObjectDiagram != null && fObjectDiagram.getPresenter() != null) { + fObjectDiagram.getPresenter().onResetDiagram(options); + } else { + initDiagram(false, options); + } } /** @@ -299,14 +210,21 @@ public MSystem system() { */ @Override public void detachModel() { - fSystem.getEventBus().unregister(this); + if (fObjectDiagram.getPresenter() != null) { + fObjectDiagram.getPresenter().detach(); + } ModelBrowserSorting.getInstance().removeSortChangeListener( this ); fSystem.unregisterRequiresAllDerivedValues(); - viewcount--; + VIEW_COUNT.decrementAndGet(); } - void createObject(String clsName) { - MainWindow.instance().createObject(clsName); + /** + * Returns the current number of active views. + * + * @return the view count + */ + public static int getViewcount() { + return VIEW_COUNT.get(); } @Override @@ -333,4 +251,40 @@ public float getContentHeight() { public float getContentWidth() { return fObjectDiagram.getPreferredSize().width; } + + @Override + public void showPopup(JPopupMenu popup) { + if (fObjectDiagram != null) { + popup.show(fObjectDiagram, fObjectDiagram.getWidth() / 2, fObjectDiagram.getHeight() / 2); + } else { + popup.show(this, getWidth() / 2, getHeight() / 2); + } + } + + @Override + public void refresh() { + if (fObjectDiagram != null) { + fObjectDiagram.invalidateContent(true); + fObjectDiagram.repaint(); + } else { + revalidate(); + repaint(); + } + } + + @Override + public void setStatus(String status) { + if (fMainWindow != null && fMainWindow.statusBar() != null) { + fMainWindow.statusBar().showTmpMessage(status); + } + } + + @Override + public void stateChanged(SortChangeEvent e) { + if (fObjectDiagram != null && fObjectDiagram.getPresenter() != null) { + fObjectDiagram.getPresenter().onRefreshRequested(); + } else if (fObjectDiagram != null) { + fObjectDiagram.invalidateContent(true); + } + } } diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjDiagramOptions.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjDiagramOptions.java index 8b493b25a..2063b9a30 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjDiagramOptions.java +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjDiagramOptions.java @@ -33,6 +33,7 @@ public final class ObjDiagramOptions extends DiagramOptions { private boolean isShowStates = false; + private boolean showMultiplicities = false; public ObjDiagramOptions() { } @@ -42,7 +43,9 @@ public ObjDiagramOptions() { */ public ObjDiagramOptions(ObjDiagramOptions opt) { super(opt); - } + this.isShowStates = opt.isShowStates; + this.showMultiplicities = opt.showMultiplicities; + } @Override protected void registerAdditionalColors() { @@ -59,10 +62,12 @@ protected void registerAdditionalColors() { } public boolean isShowMutliplicities() { - return false; + return showMultiplicities; } public void setShowMutliplicities(boolean showMutliplicities) { + this.showMultiplicities = showMutliplicities; + this.onOptionChanged("SHOWMULTIPLICITIES"); } /** @@ -85,11 +90,13 @@ public void setShowStates(boolean isShowStates) { public void saveOptions(PersistHelper helper, Element parent) { super.saveOptions(helper, parent); helper.appendChild(parent, "ShowStates", String.valueOf(this.isShowStates)); + helper.appendChild(parent, "ShowMultiplicities", String.valueOf(this.showMultiplicities)); } @Override public void loadOptions(PersistHelper helper, int version) { super.loadOptions(helper, version); this.isShowStates = helper.getElementBooleanValue("ShowStates"); + this.showMultiplicities = helper.getElementBooleanValue("ShowMultiplicities"); } } \ No newline at end of file diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectDiagramInteractor.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectDiagramInteractor.java new file mode 100644 index 000000000..cbeb6e9be --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectDiagramInteractor.java @@ -0,0 +1,30 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import org.tzi.use.uml.sys.MInstance; +import org.tzi.use.uml.sys.MLink; +import org.tzi.use.uml.sys.MObject; +import org.tzi.use.gui.views.selection.objectselection.ObjectSelection; + +/** + * Facade for diagram operations that the presenter can trigger without reaching + * into the view implementation. + */ +public interface ObjectDiagramInteractor { + void addObject(MObject obj); + void deleteObject(MObject obj); + void addLink(MLink link); + void deleteLink(MLink link); + void updateObject(MInstance obj); + void invalidateContent(boolean fullLayout); + void clearSelection(); + ObjectSelection getObjectSelection(); + void hideLink(MLink link); + void hideObject(MObject obj); + void hideAllLinks(); + void showAll(); + void showAllLinks(); + void setShowStates(boolean show); + boolean isShowStates(); + void setGreyed(MObject obj, boolean greyed); + boolean isGreyed(MObject obj); +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectDiagramModel.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectDiagramModel.java new file mode 100644 index 000000000..f57ecb376 --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectDiagramModel.java @@ -0,0 +1,174 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.Map; +import java.util.Set; + +import org.tzi.use.gui.views.diagrams.elements.PlaceableNode; +import org.tzi.use.gui.views.diagrams.elements.edges.EdgeBase; +import org.tzi.use.uml.mm.MAssociation; +import org.tzi.use.uml.sys.MLink; +import org.tzi.use.uml.sys.MLinkObject; +import org.tzi.use.uml.sys.MObject; + +/** + * Skeleton for the object diagram domain model. Holds visible/hidden graph data. + * This is intentionally minimal and not yet wired; follow-up steps will migrate + * state from {@link NewObjectDiagram} into this model. + */ +public class ObjectDiagramModel { + + /** listeners for future change events */ + public interface Listener { + @SuppressWarnings("unused") + default void onNodeAdded(MObject obj, PlaceableNode node) { + // no-op: parameterized callback for future implementations + } + + @SuppressWarnings("unused") + default void onNodeRemoved(MObject obj) { + // no-op: parameterized callback for future implementations + } + + @SuppressWarnings("unused") + default void onLinkAdded(MLink link, EdgeBase edge) { + // no-op: parameterized callback for future implementations + } + + @SuppressWarnings("unused") + default void onLinkRemoved(MLink link) { + // no-op: parameterized callback for future implementations + } + + @SuppressWarnings("unused") + default void onStateChanged() { + // no-op: state change notification placeholder + } + } + + private final Set listeners = new HashSet<>(); + + public void addListener(Listener listener) { + listeners.add(listener); + } + + public void removeListener(Listener listener) { + listeners.remove(listener); + } + + // Visible/hidden state mirrors existing ObjectDiagramData; to be populated incrementally + private final Map visibleNodes = new HashMap<>(); + private final Map visibleBinaryEdges = new HashMap<>(); + private final Map visibleNaryEdges = new HashMap<>(); + + private final Map hiddenNodes = new HashMap<>(); + private final Map hiddenBinaryEdges = new HashMap<>(); + private final Map hiddenNaryEdges = new HashMap<>(); + + // Accessors (read-only views for now) + public Map getVisibleNodes() { + return visibleNodes; + } + + public Map getVisibleBinaryEdges() { + return visibleBinaryEdges; + } + + public Map getVisibleNaryEdges() { + return visibleNaryEdges; + } + + public Map getHiddenNodes() { + return hiddenNodes; + } + + public Map getHiddenBinaryEdges() { + return hiddenBinaryEdges; + } + + public Map getHiddenNaryEdges() { + return hiddenNaryEdges; + } + + /** + * Placeholder query for later migration: map links to kind of association. + */ + public Map> mapLinksToKindOfAssociation(List associations, + Map> linksByAssoc) { + Map> result = new HashMap<>(); + // If no explicit linksByAssoc provided, fall back to association names only + if (linksByAssoc == null || linksByAssoc.isEmpty()) { + if (associations != null) { + for (MAssociation assoc : associations) { + if (assoc != null) { + result.put(assoc.name(), List.of()); + } + } + } + return result; + } + + populateFromLinksByAssoc(result, linksByAssoc); + return result; + } + + // helper removed — logic inlined to reduce cognitive complexity metric + + /** + * Populate result map from the provided linksByAssoc mapping. + */ + private void populateFromLinksByAssoc(Map> result, Map> linksByAssoc) { + if (linksByAssoc == null) { + return; + } + for (Map.Entry> e : linksByAssoc.entrySet()) { + MAssociation assoc = e.getKey(); + if (assoc == null) { + continue; + } + Set links = e.getValue(); + result.put(assoc.name(), links == null ? List.of() : List.copyOf(links)); + } + } + + /** + * Placeholder for later migration: resolve a link by value/class combination. + */ + public MLink getLinkByValue(MLink candidate, String value) { + if (candidate == null) { + return null; + } + if (value == null) { + return candidate; + } + try { + String s = candidate.toString(); + if (Objects.equals(s, value)) { + return candidate; + } + } catch (Exception ignored) { + // toString might fail on some implementations; fall through to null + } + return null; + } + + /** + * Placeholder for later migration: check hidden state of a link. + */ + public boolean isHidden(MLink link) { + return hiddenBinaryEdges.containsKey(link) + || hiddenNaryEdges.containsKey(link) + || (link instanceof MLinkObject ml) && hiddenNodes.containsKey(ml); + } + + /** + * Placeholder for later migration: check hidden state of a node. + */ + public boolean isHidden(MObject obj) { + return hiddenNodes.containsKey(obj); + } +} + diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectNode.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectNode.java index 8f835b0e7..660e77c5b 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectNode.java +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/ObjectNode.java @@ -77,12 +77,10 @@ public ObjectNode(MObject obj, NewObjectDiagramView parent, ObjDiagramOptions op fParent = parent; fOpt = opt; fIsGreyed = false; - fOptChaneListener = new DiagramOptionChangedListener() { - @Override - public void optionChanged(String optionname) { - if (optionname.equals("SHOWOPERATIONS") || optionname.equals("SHOWATTRIBUTES") - || optionname.equals("SHOWSTATES")) - calculateBounds(); + fOptChaneListener = optionname -> { + if ("SHOWOPERATIONS".equals(optionname) || "SHOWATTRIBUTES".equals(optionname) + || "SHOWSTATES".equals(optionname)) { + calculateBounds(); } }; @@ -153,13 +151,13 @@ public void doCalculateSize(Graphics2D g) { attributesRect.width = Math.max(attributesRect.width, fm.stringWidth(fValues[i])); } - attributesRect.height = fm.getHeight() * fAttributes.size() + 3; + attributesRect.height = ((double) fm.getHeight()) * fAttributes.size() + 3.0; statesRect.width = 0; for (int i = 0; i < fStateValues.length; ++i) { statesRect.width = Math.max(statesRect.width, fm.stringWidth(fStateValues[i])); } - statesRect.height = fm.getHeight() * fStateMachines.size() + 3; + statesRect.height = ((double) fm.getHeight()) * fStateMachines.size() + 3.0; calculateBounds(); } @@ -201,8 +199,8 @@ public void updateContent() { MAttribute attr = fAttributes.get(i); Value val = objState.attributeValue(attr); - if (val instanceof EnumValue) { - value = "#" + ((EnumValue) val).value(); + if (val instanceof EnumValue ev) { + value = "#" + ev.value(); } else { value = val.toString(); } @@ -229,8 +227,8 @@ protected void onDraw(Graphics2D g) { return; } - double x = currentBounds.getX(); - int y = (int) currentBounds.getY(); + double x; + int y; int labelWidth = g.getFontMetrics().stringWidth(fLabel); @@ -238,10 +236,8 @@ protected void onDraw(Graphics2D g) { Color fillColor = fOpt.getNODE_COLOR(); Color lineColor = fOpt.getNODE_FRAME_COLOR(); // change colors if needed - if(isSelected() && isGreyed()) { - //fillColor = fOpt.getGREYED_SELECTED_FILL_COLOR(); + if (isSelected() && isGreyed()) { fillColor = fOpt.getNODE_SELECTED_COLOR(); - //lineColor = fOpt.getGREYED_LINE_COLOR(); lineColor = fOpt.getGREYED_SELECTED_LINE_COLOR(); } else if (isSelected()) { fillColor = fOpt.getNODE_SELECTED_COLOR(); @@ -255,16 +251,16 @@ protected void onDraw(Graphics2D g) { g.setColor(lineColor); g.draw(currentBounds); - x = (currentBounds.getCenterX() - labelWidth / 2); + double halfLabel = labelWidth / 2.0; + x = (currentBounds.getCenterX() - halfLabel); y = (int) currentBounds.getY() + g.getFontMetrics().getAscent() + 2; - //g.setColor(fOpt.getColor(DiagramOptions.NODE_LABEL_COLOR)); g.drawString(fLabelA.getIterator(), Math.round(x), y); if (fOpt.isShowAttributes()) { // compartment divider - Line2D.Double lineAttrDivider = new Line2D.Double(currentBounds.getX(), y + 3, currentBounds.getMaxX(), - y + 3); + Line2D.Double lineAttrDivider = new Line2D.Double(currentBounds.getX(), y + 3.0, currentBounds.getMaxX(), + y + 3.0); g.draw(lineAttrDivider); x = currentBounds.getX() + 5; y += 3; @@ -276,8 +272,8 @@ protected void onDraw(Graphics2D g) { if (fOpt.isShowStates()) { // compartment divider - Line2D.Double lineAttrDivider = new Line2D.Double(currentBounds.getX(), y + 3, currentBounds.getMaxX(), - y + 3); + Line2D.Double lineAttrDivider = new Line2D.Double(currentBounds.getX(), y + 3.0, currentBounds.getMaxX(), + y + 3.0); g.draw(lineAttrDivider); x = currentBounds.getX() + 5; y += 3; diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PlacementRepository.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PlacementRepository.java new file mode 100644 index 000000000..ad79f5676 --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PlacementRepository.java @@ -0,0 +1,22 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import org.tzi.use.gui.util.PersistHelper; +import org.tzi.use.uml.sys.MSystem; +import org.w3c.dom.Element; +import java.util.Set; + +/** + * Persistence boundary for diagram layouts/placements. Concrete implementations + * decide how and where to persist. Kept small to align with the MVP target + * architecture. + */ +public interface PlacementRepository { + void storeLayout(NewObjectDiagramModel model, + PersistHelper helper, + Element root); + + Set restoreLayout(NewObjectDiagramModel model, + PersistHelper helper, + int version, + MSystem system); +} diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PresenterFileLogger.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PresenterFileLogger.java new file mode 100644 index 000000000..3e493ebdc --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PresenterFileLogger.java @@ -0,0 +1,238 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.time.Instant; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; + +/** + * Simple file logger used for collecting presenter/view event traces per test case. + * + *

+ *

+ * Usage: set system property TEST_NAME to separate logs per test, e.g. + *

+ * -DTEST_NAME=t01 + *

+ * or set environment variable TEST_NAME before starting the application. + *

+ * Default test name is "default". + */ + +public final class PresenterFileLogger { + + // store logs in a user-writable directory under the user's home so they are easy to find + + private static final Path LOG_DIR = Paths.get(System.getProperty("user.home"), "use_refactor_logs"); + + // also write a copy to the current working directory to make logs visible in the project tree + + private static final Path WORK_DIR_LOG = Paths.get(System.getProperty("user.dir"), "use_refactor_logs"); + private static final DateTimeFormatter TS_FORMAT = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSS").withZone(ZoneId.systemDefault()); + private static volatile String currentTest = System.getProperty("TEST_NAME", System.getenv().getOrDefault("TEST_NAME", "default")); + private static volatile boolean enabled = readEnabledFlag(); + + static { + + // Best-effort: create directories and write an initialization line into the test log. + + // Ensure directories exist (ignore failures) + safeCreateDirs(LOG_DIR); + safeCreateDirs(WORK_DIR_LOG); + + // write an init line into the current test log file (no stdout/stderr) using structured format + String initTs = TS_FORMAT.format(Instant.now()); + String initLine = initTs + " [PresenterFileLogger#init] initialized test=" + currentTest + System.lineSeparator(); + + Path p = LOG_DIR.resolve(currentTest + ".log"); + safeWriteString(p, initLine); + + Path pWork = WORK_DIR_LOG.resolve(currentTest + ".log"); + safeWriteString(pWork, initLine); + + } + + private PresenterFileLogger() { + + // utility + + } + + // Helper: create directories without nesting try-catch blocks at call sites + private static void safeCreateDirs(Path dir) { + try { + Files.createDirectories(dir); + } catch (IOException ignored) { + // best-effort: ignore + } + } + + // Helper: write string to file in append mode, ignore failures + private static void safeWriteString(Path file, String content) { + try { + Files.writeString(file, content, StandardOpenOption.CREATE, StandardOpenOption.APPEND); + } catch (IOException ignored) { + // best-effort: ignore + } + } + + private static boolean readEnabledFlag() { + + String value = System.getProperty("PRESENTER_LOGGING_ENABLED"); + + if (value == null) { + + value = System.getenv("PRESENTER_LOGGING_ENABLED"); + + } + + return Boolean.parseBoolean(value); + + } + + public static boolean isEnabled() { + + return enabled; + + } + + public static void setEnabled(boolean enabled) { + + PresenterFileLogger.enabled = enabled; + + } + + public static synchronized void setCurrentTest(String testName) { + + if (testName == null || testName.isEmpty()) { + + testName = "default"; + + } + + currentTest = testName; + + if (!enabled) { + return; + } + + // Ensure both directories exist when changing the test name so subsequent writes succeed + safeCreateDirs(LOG_DIR); + safeCreateDirs(WORK_DIR_LOG); + + // write an init line into the new current test log file (best-effort, no stdout/stderr) + String initTs = TS_FORMAT.format(Instant.now()); + String initLine = initTs + " [PresenterFileLogger#setCurrentTest] switched test=" + currentTest + System.lineSeparator(); + + Path p = LOG_DIR.resolve(currentTest + ".log"); + safeWriteString(p, initLine); + + Path pWork = WORK_DIR_LOG.resolve(currentTest + ".log"); + safeWriteString(pWork, initLine); + + } + + // Core write helper (best-effort) + + private static void writeLineToFiles(String line) { + + if (!enabled) { + + return; + + } + + String fileName = currentTest + ".log"; + + Path p = LOG_DIR.resolve(fileName); + + Path pWork = WORK_DIR_LOG.resolve(fileName); + + // ensure directories exist (in case setCurrentTest wasn't called since class init) + safeCreateDirs(LOG_DIR); + safeCreateDirs(WORK_DIR_LOG); + + safeWriteString(p, line); + safeWriteString(pWork, line); + + } + + /** + * Structured log entry: className and methodName are required to identify the call site. + */ + + public static synchronized void log(String className, String methodName, String message) { + + if (!enabled) { + + return; + + } + + if (className == null) className = ""; + + if (methodName == null) methodName = ""; + + if (message == null) message = ""; + + String ts = TS_FORMAT.format(Instant.now()); + + String line = ts + " [" + className + "#" + methodName + "] " + message + System.lineSeparator(); + + writeLineToFiles(line); + + } + + /** + * Convenience overload accepting a Class object. + */ + + public static synchronized void log(Class cls, String methodName, String message) { + + if (!enabled) { + + return; + + } + + String className = (cls == null) ? "" : cls.getSimpleName(); + + log(className, methodName, message); + + } + + /** + * Backwards-compatible single-string log; maps to GLOBAL#log for traceability. + */ + + public static synchronized void log(String message) { + + if (!enabled) { + + return; + + } + + log("GLOBAL", "log", message); + + } + + public static synchronized void log(String testName, String message) { + + if (!enabled) { + + return; + + } + + setCurrentTest(testName); + + log(message); + + } + +} \ No newline at end of file diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PresenterFileLoggerTestMain.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PresenterFileLoggerTestMain.java new file mode 100644 index 000000000..31153ae8e --- /dev/null +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/PresenterFileLoggerTestMain.java @@ -0,0 +1,21 @@ +package org.tzi.use.gui.views.diagrams.objectdiagram; + +/** + * Small test runner to validate PresenterFileLogger behaviour at runtime. + */ +public class PresenterFileLoggerTestMain { + public static void main(String[] args) { + // write a few entries using different overloads + PresenterFileLogger.log("Startup test: should appear in default.log"); + PresenterFileLogger.log(PresenterFileLoggerTestMain.class, "main", "class-based entry"); + + // switch test name and write more + PresenterFileLogger.setCurrentTest("t_test_manual"); + PresenterFileLogger.log("afterSwitch", "main", "entry after switching test name"); + PresenterFileLogger.log("t_test_manual", "explicit-message-after-switch"); + + // Do not write to standard output for logging — use the file logger instead. + PresenterFileLogger.log("PresenterFileLoggerTestMain finished — check use_refactor_logs in user home and working dir."); + } +} + diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/QualifierInputView.java b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/QualifierInputView.java index 10aa10223..8a6f4952f 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/QualifierInputView.java +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/QualifierInputView.java @@ -22,8 +22,7 @@ import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Frame; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; +// action events handled with lambdas; explicit listener imports removed import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; @@ -67,29 +66,30 @@ public class QualifierInputView extends JDialog { private static final long serialVersionUID = -6361281949862418261L; - + private static final String DLG_TITLE_ERROR = "Error"; + /** * The system to execute the insert link statement on. */ - private MSystem system; - + private final transient MSystem system; + /** * The association to insert the link into */ - private MAssociation association; - + private final transient MAssociation association; + /** * The objects participating in the link */ - private MObject[] participants; - + private final transient MObject[] participants; + /** * A table model for each end with qualifier */ - private TableModel[] tableModels; - - private JTable[] tables; - + private transient TableModel[] tableModels; + + private transient JTable[] tables; + public QualifierInputView(Frame owner, MSystem system, MAssociation association, MObject[] participants) { super(owner, "Enter qualifier values"); this.system = system; @@ -133,20 +133,12 @@ private void initGui() { JButton btnApply = new JButton("Insert"); btnApply.setMnemonic('I'); btnApply.setVerifyInputWhenFocusTarget(true); - btnApply.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - apply(); - } - }); - + btnApply.addActionListener(e -> apply()); + JButton btnReset = new JButton("Reset"); btnReset.setMnemonic('R'); btnReset.setVerifyInputWhenFocusTarget(false); - btnReset.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - reset(); - } - }); + btnReset.addActionListener(e -> reset()); // layout the buttons centered from left to right JPanel buttonPane = new JPanel(); @@ -172,15 +164,14 @@ private void apply() { } List> qualifier = new ArrayList<>(); - for (int i = 0; i < this.tableModels.length; ++i) { - TableModel model = this.tableModels[i]; + for (TableModel model : this.tableModels) { if (model == null) { - qualifier.add(Collections.emptyList()); + qualifier.add(Collections.emptyList()); } else { List endValues = getEndValues(model); - - if (endValues == null) return; - + if (endValues == null) { + return; + } qualifier.add(endValues); } } @@ -193,7 +184,7 @@ private void apply() { JOptionPane.showMessageDialog( getParent(), e.getMessage(), - "Error", + DLG_TITLE_ERROR, JOptionPane.ERROR_MESSAGE); } @@ -201,10 +192,15 @@ private void apply() { } /** - * @param model + * Parse and evaluate qualifier expressions from the provided table model. + * + * @param model the table model providing qualifier expression strings + * @return a list of evaluated {@link Value} objects or null if the user + * cancelled or input was invalid */ + @SuppressWarnings("squid:S1168") // null is used to signal user-cancel/invalid input to caller protected List getEndValues(TableModel model) { - List endValues = new ArrayList(); + List endValues = new ArrayList<>(); for (int i2 = 0; i2 < model.getValues().length; ++i2) { String value = model.getValues()[i2]; @@ -212,7 +208,7 @@ protected List getEndValues(TableModel model) { JOptionPane.showMessageDialog( this, "Please provide a value for the qualifier " + model.getQualifierNames()[i2], - "Error", + DLG_TITLE_ERROR, JOptionPane.ERROR_MESSAGE); return null; } @@ -231,9 +227,9 @@ protected List getEndValues(TableModel model) { JOptionPane.showMessageDialog( this, errorOutput, - "Error", + DLG_TITLE_ERROR, JOptionPane.ERROR_MESSAGE); - return null; + return null; // null indicates user-cancelled/invalid input } try { @@ -241,23 +237,23 @@ protected List getEndValues(TableModel model) { Evaluator evaluator = new Evaluator(true); Value val = evaluator.eval(valueAsExpression, system.state(), system.varBindings()); endValues.add(val); - } catch (MultiplicityViolationException e) { - JOptionPane.showMessageDialog( - this, + } catch (MultiplicityViolationException e) { + JOptionPane.showMessageDialog( + this, "Could not evaluate. " + e.getMessage(), - "Error", + DLG_TITLE_ERROR, JOptionPane.ERROR_MESSAGE); - return null; - } + return null; + } } return endValues; } private void reset() { - for (int i = 0; i < this.tableModels.length; ++i) { - if (this.tableModels[i] != null) { - this.tableModels[i].reset(); + for (TableModel tm : this.tableModels) { + if (tm != null) { + tm.reset(); } } } @@ -265,7 +261,7 @@ private void reset() { /** * The table model. */ - class TableModel extends AbstractTableModel { + static class TableModel extends AbstractTableModel { /** * */ @@ -273,17 +269,19 @@ class TableModel extends AbstractTableModel { final String[] columnNames = { "Qualifier", "Value" }; - private String[] qualifierNames; - - private String[] qualifierValues; - + private final String[] qualifierNames; + + private final String[] qualifierValues; + TableModel(String[] qualifierNames) { this.qualifierNames = qualifierNames; this.qualifierValues = new String[qualifierNames.length]; } - /** - * @return + /** + * Return the qualifier names for this table model. + * + * @return an array of qualifier names */ public String[] getQualifierNames() { return this.qualifierNames; @@ -299,29 +297,34 @@ public void reset() { this.fireTableDataChanged(); } + @Override public String getColumnName(int col) { return columnNames[col]; } - public int getColumnCount() { - return 2; + @Override + public int getColumnCount() { + return 2; } - public int getRowCount() { + @Override + public int getRowCount() { return qualifierNames.length; } - public Object getValueAt(int row, int col) { + @Override + public Object getValueAt(int row, int col) { if (col == 0 ) return qualifierNames[row]; else return qualifierValues[row]; } - public boolean isCellEditable(int row, int col) { + @Override + public boolean isCellEditable(int row, int col) { return col == 1; } - - public void setValueAt(Object value, int row, int col) { + @Override + public void setValueAt(Object value, int row, int col) { qualifierValues[row] = value.toString(); } diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/package.html b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/package.html index 9110fd150..37b27989e 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/package.html +++ b/use-gui/src/main/java/org/tzi/use/gui/views/diagrams/objectdiagram/package.html @@ -1,4 +1,9 @@ - + + + + + Object Diagram Package + This package provides classes for visualizing an objectdiagram. diff --git a/use-gui/src/main/java/org/tzi/use/gui/views/selection/objectselection/ObjectSelection.java b/use-gui/src/main/java/org/tzi/use/gui/views/selection/objectselection/ObjectSelection.java index 5348c308e..10d1c8e52 100644 --- a/use-gui/src/main/java/org/tzi/use/gui/views/selection/objectselection/ObjectSelection.java +++ b/use-gui/src/main/java/org/tzi/use/gui/views/selection/objectselection/ObjectSelection.java @@ -2,7 +2,6 @@ import java.awt.BorderLayout; import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -60,13 +59,25 @@ public class ObjectSelection { private final MSystem system; - // Conrols for ScrollMenu - private final int numOfElems = 20; - private final int interval = 125; - private final int topFixedCount = 0; - private final int bottomFixedCount = 0; + // Controls for ScrollMenu + private static final int NUM_OF_ELEMS = 20; + private static final int INTERVAL = 125; + private static final int TOP_FIXED_COUNT = 0; + private static final int BOTTOM_FIXED_COUNT = 0; + + // UI label constants to avoid duplicated string literals + private static final String LABEL_HIDE_OBJECTS = "Hide objects"; + private static final String LABEL_HIDE_ALL_OBJECTS = "Hide all objects"; + private static final String LABEL_HIDE = "Hide "; + private static final String LABEL_CLASS_PREFIX = "Class "; + private static final String LABEL_SHOW = "Show "; + private static final String LABEL_SHOW_ALL_HIDDEN_OBJECTS = "Show all hidden objects"; + private static final String LABEL_HIDE_ALL_LINKS = "Hide all links"; + private static final String LABEL_SHOW_ALL_LINKS = "Show all links"; + private static final String LABEL_HIDE_ALL = "Hide all"; + private static final String LABEL_SHOW_ALL = "Show all"; + private static final String OBJECT_PROPERTIES_ICON = "ObjectProperties.gif"; - private final AlphanumComparator keyComparator; private final Comparator linkComparator; private final Comparator objectComparator; @@ -76,7 +87,7 @@ public class ObjectSelection { public ObjectSelection(DiagramViewWithObjectNode diagram, MSystem system) { this.diagram = diagram; this.system = system; - this.keyComparator = new AlphanumComparator(); + AlphanumComparator keyComparator = new AlphanumComparator(); this.linkComparator = Comparator .comparing((MLink link) -> link.linkedObjects().get(0).toString(), keyComparator) .thenComparing(link -> link.linkedObjects().get(1).toString(), keyComparator); @@ -84,24 +95,23 @@ public ObjectSelection(DiagramViewWithObjectNode diagram, MSystem system) { } - @SuppressWarnings("serial") class ActionSelectedObjectPathView extends AbstractAction { - private Set selectedObjects; + private final transient Set selectedObjects; ActionSelectedObjectPathView(String text, Set sc) { super(text); - selectedObjects = sc; + this.selectedObjects = sc; } public void actionPerformed(ActionEvent e) { SelectedObjectPathView opv = new SelectedObjectPathView(MainWindow.instance(), system, diagram, selectedObjects); - ViewFrame f = new ViewFrame("Selection by path length", opv, "ObjectProperties.gif"); + ViewFrame f = new ViewFrame("Selection by path length", opv, OBJECT_PROPERTIES_ICON); JComponent c = (JComponent) f.getContentPane(); c.setLayout(new BorderLayout()); c.add(opv, BorderLayout.CENTER); - if (MainWindow.getJavaFxCall()){ + if (Boolean.TRUE.equals(MainWindow.getJavaFxCall())){ Platform.runLater(() -> { SwingNode swingNode = new SwingNode(); swingNode.setContent(opv); @@ -120,7 +130,6 @@ public ActionSelectedObjectPathView getSelectedObjectPathView(String text, Set { SwingNode swingNode = new SwingNode(); swingNode.setContent(opv); @@ -155,7 +164,6 @@ public ActionSelectionObjectView getSelectionObjectView() { /** * Show Selection OCL View */ - @SuppressWarnings("serial") class ActionSelectionOCLView extends AbstractAction { ActionSelectionOCLView() { super("With OCL..."); @@ -163,13 +171,13 @@ class ActionSelectionOCLView extends AbstractAction { public void actionPerformed(ActionEvent e) { SelectionOCLView opv = new SelectionOCLView(MainWindow.instance(), system, diagram); - ViewFrame f = new ViewFrame("Selection by OCL expression", opv, "ObjectProperties.gif"); + ViewFrame f = new ViewFrame("Selection by OCL expression", opv, OBJECT_PROPERTIES_ICON); JComponent c = (JComponent) f.getContentPane(); c.setLayout(new BorderLayout()); c.add(opv, BorderLayout.CENTER); - if (MainWindow.getJavaFxCall()){ + if (Boolean.TRUE.equals(MainWindow.getJavaFxCall())){ Platform.runLater(() -> { SwingNode swingNode = new SwingNode(); swingNode.setContent(opv); @@ -193,57 +201,133 @@ public ActionSelectionOCLView getSelectionWithOCLViewAction() { * which are connected with the Association selected by the user. */ public Set getSelectedObjectsofAssociation(MAssociation node, Set selectedObjectsOfAssociation) { - HashSet objects = new HashSet(); - Iterator it = this.diagram.getGraph().edgeIterator(); - String name = node.name(); + if (node == null) { + return Set.of(); + } - while (it.hasNext()) { - EdgeBase o = it.next(); + Set safeSelected = selectedObjectsOfAssociation == null ? Set.of() : selectedObjectsOfAssociation; - if (o instanceof BinaryAssociationOrLinkEdge) { - BinaryAssociationOrLinkEdge edge = (BinaryAssociationOrLinkEdge) o; + Set fromEdges = findObjectsFromEdges(node, safeSelected); + if (!fromEdges.isEmpty()) { + return fromEdges; + } - if (edge.getAssociation() != null && edge.getAssociation().equals(node)) { - MObject mo = ((ObjectNodeActivity) (edge.source())).object(); - if (!selectedObjectsOfAssociation.contains(mo)) { - objects.add(mo); + return findObjectsFromDiamonds(node.name(), safeSelected); + } + + private Set findObjectsFromEdges(MAssociation node, Set selectedObjectsOfAssociation) { + Set objects = new HashSet<>(); + return findMatchingEdge(node) + .map(edge -> { + MObject mo1 = ((ObjectNodeActivity) edge.source()).object(); + MObject mo2 = ((ObjectNodeActivity) edge.target()).object(); + if (!selectedObjectsOfAssociation.contains(mo1)) { + objects.add(mo1); } - mo = ((ObjectNodeActivity) (edge.target())).object(); - if (!selectedObjectsOfAssociation.contains(mo) && !objects.contains(mo)) { - objects.add(mo); + if (!selectedObjectsOfAssociation.contains(mo2)) { + objects.add(mo2); } return objects; - } + }) + .orElse(objects); + } + + private java.util.Optional findMatchingEdge(MAssociation node) { + Iterator it = this.diagram.getGraph().edgeIterator(); + while (it.hasNext()) { + EdgeBase o = it.next(); + if (o instanceof BinaryAssociationOrLinkEdge edge && edge.getAssociation() != null + && edge.getAssociation().equals(node)) { + return java.util.Optional.of(edge); } } + return java.util.Optional.empty(); + } - Iterator nodeIter = diagram.getGraph().iterator(); + private Set findObjectsFromDiamonds(String name, Set selectedObjectsOfAssociation) { + return findMatchingDiamond(name).map(dnode -> { + Set objects = new HashSet<>(); + for (MObject mo : dnode.link().linkedObjects()) { + if (!selectedObjectsOfAssociation.contains(mo)) { + objects.add(mo); + } + } + return objects; + }).orElse(Set.of()); + } - while (it.hasNext()) { + private java.util.Optional findMatchingDiamond(String name) { + Iterator nodeIter = diagram.getGraph().iterator(); + while (nodeIter.hasNext()) { PlaceableNode o = nodeIter.next(); - if (o instanceof DiamondNode) { - if (((DiamondNode) o).name().equalsIgnoreCase(name)) { - DiamondNode dnode = (DiamondNode) o; - - for (MObject mo : dnode.link().linkedObjects()) { - if (!selectedObjectsOfAssociation.contains(mo) && !objects.contains(mo)) { - objects.add(mo); - } - } - return objects; + if (o instanceof DiamondNode dnode && dnode.name().equalsIgnoreCase(name)) { + return java.util.Optional.of(dnode); + } + } + return java.util.Optional.empty(); + } + + /** + * Collect unique links and prepare association menus for the given edges. + */ + private void collectAssociationNamesAndLinks(Set edges, Map associationNames, + List links) { + for (EdgeBase edge : edges) { + if (edge instanceof LinkEdge aEdge) { + MLink link = aEdge.getLink(); + if (!links.contains(link)) { + JMenu menu = new JMenu(link.association().toString()); + MenuScroller.setScrollerFor(menu, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); + associationNames.put(link.association().toString(), menu); + links.add(link); } } } - return objects; } - private class ObjectNodeActivityComparator implements Comparator { - @Override - public int compare(ObjectNodeActivity o1, ObjectNodeActivity o2) { - return o1.object().name().compareTo(o2.object().name()); + private JMenuItem createMenuItem(String label, Runnable action) { + JMenuItem item = new JMenuItem(label); + item.addActionListener(e -> action.run()); + return item; + } + + /** + * Add menu entries (show or hide) for an association menu entry. + */ + private void addAssociationMenuItems(Entry menuEntry, List links, boolean showMode) { + JMenu assocMenu = menuEntry.getValue(); + String key = menuEntry.getKey(); + + String allLabel = showMode ? LABEL_SHOW_ALL : LABEL_HIDE_ALL; + assocMenu.add(createMenuItem(allLabel, () -> { + List matching = links.stream().filter(l -> key.equals(l.association().toString())).toList(); + if (showMode) { + ((NewObjectDiagram) diagram).showLink(matching); + } else { + ((NewObjectDiagram) diagram).hideLink(matching); + } + diagram.repaint(); + })); + + assocMenu.addSeparator(); + + for (MLink link : links) { + if (key.equals(link.association().toString())) { + String label = (showMode ? LABEL_SHOW : LABEL_HIDE) + formatLinkName(link); + assocMenu.add(createMenuItem(label, () -> { + if (showMode) { + ((NewObjectDiagram) diagram).showLink(link); + } else { + ((NewObjectDiagram) diagram).hideLink(link); + } + diagram.repaint(); + })); + } } } + // ObjectNodeActivityComparator removed — not used (S3985) + /** * Method getSubMenuHideObject supplies a list of the sorted objects in the * context menu. which are not hidden. @@ -255,59 +339,51 @@ public JMenu getSubMenuHideObject() { Set visibleObjectNodes = CollectionUtil.filterByType(visibleNodes, ObjectNodeActivity.class); - JMenu subMenuHideObject = new JMenu("Hide objects"); - MenuScroller.setScrollerFor(subMenuHideObject, numOfElems, interval, topFixedCount, bottomFixedCount); + JMenu subMenuHideObject = new JMenu(LABEL_HIDE_OBJECTS); + MenuScroller.setScrollerFor(subMenuHideObject, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); - final JMenuItem hideAllObjects = new JMenuItem("Hide all objects"); + final JMenuItem hideAllObjects = new JMenuItem(LABEL_HIDE_ALL_OBJECTS); hideAllObjects.setEnabled(diagram.getVisibleData().hasNodes()); - hideAllObjects.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - diagram.hideAll(); - diagram.repaint(); - } + hideAllObjects.addActionListener(ev -> { + diagram.hideAll(); + diagram.repaint(); }); subMenuHideObject.add(hideAllObjects); subMenuHideObject.addSeparator(); - TreeSet sortedObjectNodes = new TreeSet(objectComparator); + TreeSet sortedObjectNodes = new TreeSet<>(objectComparator); sortedObjectNodes.addAll(visibleObjectNodes); - Map classMenus = new HashMap(); + Map classMenus = new HashMap<>(); for (ObjectNodeActivity objNode : sortedObjectNodes) { final MClass cls = objNode.cls(); final MObject obj = objNode.object(); - if (!classMenus.containsKey(cls)) { - JMenu subm = new JMenu("Class " + cls.name()); - classMenus.put(cls, subm); - - // Add show all - JMenuItem showAll = new JMenuItem("Hide all"); - showAll.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - diagram.hideObjects(getVisibleObjects(cls)); - diagram.repaint(); - } + JMenu parent = classMenus.computeIfAbsent(cls, k -> { + JMenu subm = new JMenu(LABEL_CLASS_PREFIX + k.name()); + MenuScroller.setScrollerFor(subm, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); + JMenuItem showAll = new JMenuItem(LABEL_HIDE_ALL); + showAll.addActionListener(e -> { + diagram.hideObjects(getVisibleObjects(k)); + diagram.repaint(); }); subm.add(showAll); subm.addSeparator(); - } + return subm; + }); - JMenu parent = classMenus.get(cls); - final JMenuItem hideObject = new JMenuItem("Hide " + obj.name()); - hideObject.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - diagram.hideObject(obj); - diagram.repaint(); - } + final JMenuItem hideObject = new JMenuItem(LABEL_HIDE + obj.name()); + hideObject.addActionListener(ev -> { + diagram.hideObject(obj); + diagram.repaint(); }); parent.add(hideObject); } - List classes = new ArrayList(classMenus.keySet()); + + List classes = new ArrayList<>(classMenus.keySet()); Collections.sort(classes, new MNamedElementComparator()); for (JMenu m : classMenus.values()) { - MenuScroller.setScrollerFor(m, numOfElems, interval, topFixedCount, bottomFixedCount); + MenuScroller.setScrollerFor(m, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); } for (MClass cls : classes) { @@ -324,17 +400,14 @@ public void actionPerformed(ActionEvent ev) { * @return JMenu */ public JMenu getSubMenuHideLinks() { - JMenu subMenuHideAssoc = new JMenu("Hide links"); - MenuScroller.setScrollerFor(subMenuHideAssoc, numOfElems, interval, topFixedCount, bottomFixedCount); + JMenu subMenuHideAssoc = new JMenu(LABEL_HIDE + "links"); + MenuScroller.setScrollerFor(subMenuHideAssoc, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); - final JMenuItem hideAllAssoc = new JMenuItem("Hide all links"); + final JMenuItem hideAllAssoc = new JMenuItem(LABEL_HIDE_ALL_LINKS); hideAllAssoc.setEnabled(!diagram.getVisibleData().getEdges().isEmpty()); - hideAllAssoc.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - ((NewObjectDiagram) diagram).hideAllLinks(); - diagram.repaint(); - } + hideAllAssoc.addActionListener(e -> { + ((NewObjectDiagram) diagram).hideAllLinks(); + diagram.repaint(); }); subMenuHideAssoc.add(hideAllAssoc); subMenuHideAssoc.addSeparator(); @@ -345,49 +418,13 @@ public void actionPerformed(ActionEvent e) { final Map associationNames = new TreeMap<>(); final List links = new ArrayList<>(); - for (EdgeBase edge : edges) { - - if (edge instanceof LinkEdge) { - LinkEdge aEdge = (LinkEdge) edge; + collectAssociationNamesAndLinks(edges, associationNames, links); - MLink link = aEdge.getLink(); - if (!links.contains(link)) { - JMenu menu = new JMenu(link.association().toString()); - MenuScroller.setScrollerFor(menu, numOfElems, interval, topFixedCount, bottomFixedCount); - - associationNames.put(link.association().toString(), menu); - links.add(link); - } - } - } + links.sort(linkComparator); for (final Entry menu : associationNames.entrySet()) { subMenuHideAssoc.add(menu.getValue()); - JMenuItem hideAll = new JMenuItem("Hide all"); - hideAll.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - ((NewObjectDiagram) diagram).hideLink(menu.getKey(), links); - diagram.repaint(); - } - }); - menu.getValue().add(hideAll); - menu.getValue().addSeparator(); - - Collections.sort(links, linkComparator); - - for (final MLink link : links) { - if (menu.getKey().equals(link.association().toString())) { - - JMenuItem hideLink = new JMenuItem("Hide " + formatLinkName(link)); - hideLink.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - ((NewObjectDiagram) diagram).hideLink(link); - diagram.repaint(); - } - }); - menu.getValue().add(hideLink); - } - } + addAssociationMenuItems(menu, links, false); } return subMenuHideAssoc; } @@ -409,8 +446,8 @@ public String formatLinkName(MLink link) { label.append("("); // if linkobject - if (MLinkObjectImpl.class.isInstance(link)) { - label.append(((MLinkObjectImpl) link).name()); + if (link instanceof MLinkObjectImpl lom) { + label.append(lom.name()); label.append(" : "); } @@ -468,17 +505,14 @@ public String formatLinkName(MLink link) { */ public JMenu getSubMenuShowLinks() { - JMenu subMenuShowLinks = new JMenu("Show links"); - MenuScroller.setScrollerFor(subMenuShowLinks, numOfElems, interval, topFixedCount, bottomFixedCount); + JMenu subMenuShowLinks = new JMenu(LABEL_SHOW + "links"); + MenuScroller.setScrollerFor(subMenuShowLinks, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); - final JMenuItem showAllLinks = new JMenuItem("Show all links"); + final JMenuItem showAllLinks = new JMenuItem(LABEL_SHOW_ALL_LINKS); showAllLinks.setEnabled(!diagram.getHiddenData().getEdges().isEmpty()); - showAllLinks.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - ((NewObjectDiagram) diagram).showAllLinks(); - diagram.repaint(); - } + showAllLinks.addActionListener(e -> { + ((NewObjectDiagram) diagram).showAllLinks(); + diagram.repaint(); }); subMenuShowLinks.add(showAllLinks); subMenuShowLinks.addSeparator(); @@ -488,48 +522,13 @@ public void actionPerformed(ActionEvent e) { final Map associationNames = new TreeMap<>(); final List links = new ArrayList<>(); - for (EdgeBase edge : edges) { + collectAssociationNamesAndLinks(edges, associationNames, links); - if (edge instanceof LinkEdge) { - LinkEdge aEdge = (LinkEdge) edge; - - MLink link = aEdge.getLink(); - if (!links.contains(link)) { - JMenu menu = new JMenu(link.association().toString()); - MenuScroller.setScrollerFor(menu, numOfElems, interval, topFixedCount, bottomFixedCount); - - associationNames.put(link.association().toString(), menu); - links.add(link); - } - } - } + links.sort(linkComparator); for (final Entry menu : associationNames.entrySet()) { subMenuShowLinks.add(menu.getValue()); - JMenuItem showAll = new JMenuItem("Show all"); - showAll.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - ((NewObjectDiagram) diagram).showLink(menu.getKey(), links); - diagram.repaint(); - } - }); - menu.getValue().add(showAll); - menu.getValue().addSeparator(); - - Collections.sort(links, linkComparator); - - for (final MLink link : links) { - if (menu.getKey().equals(link.association().toString())) { - JMenuItem showLink = new JMenuItem("Show " + formatLinkName(link)); - showLink.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - ((NewObjectDiagram) diagram).showLink(link); - diagram.repaint(); - } - }); - menu.getValue().add(showLink); - } - } + addAssociationMenuItems(menu, links, true); } return subMenuShowLinks; @@ -543,100 +542,62 @@ public void actionPerformed(ActionEvent ev) { */ public JMenu getSubMenuLinksByKind() { JMenu subMenuAssociation = new JMenu("Show/hide links-by-kind"); - MenuScroller.setScrollerFor(subMenuAssociation, numOfElems, interval, topFixedCount, bottomFixedCount); + MenuScroller.setScrollerFor(subMenuAssociation, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); if (!diagram.getVisibleData().getEdges().isEmpty()) { - final JMenuItem hideAllAssoc = new JMenuItem("Hide all links"); - hideAllAssoc.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - ((NewObjectDiagram) diagram).hideAllLinks(); - diagram.repaint(); - } + final JMenuItem hideAllAssoc = new JMenuItem(LABEL_HIDE_ALL_LINKS); + hideAllAssoc.addActionListener(e -> { + ((NewObjectDiagram) diagram).hideAllLinks(); + diagram.repaint(); }); subMenuAssociation.add(hideAllAssoc); } if (!diagram.getHiddenData().getEdges().isEmpty()) { - final JMenuItem showAllAssoc = new JMenuItem("Show all links"); - showAllAssoc.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - ((NewObjectDiagram) diagram).showAllLinks(); - diagram.repaint(); - } + final JMenuItem showAllAssoc = new JMenuItem(LABEL_SHOW_ALL_LINKS); + showAllAssoc.addActionListener(e -> { + ((NewObjectDiagram) diagram).showAllLinks(); + diagram.repaint(); }); subMenuAssociation.add(showAllAssoc); } subMenuAssociation.addSeparator(); - TreeMap> assocs = ((NewObjectDiagram) diagram).mapLinksToKindOfAssociation(); + Map> assocs = ((NewObjectDiagram) diagram).mapLinksToKindOfAssociation(); for (Map.Entry> a : assocs.entrySet()) { + addLinksByKindEntry(subMenuAssociation, a.getKey(), a.getValue()); + } + return subMenuAssociation; + } - final JMenu assocMenu = new JMenu(a.getKey()); - MenuScroller.setScrollerFor(assocMenu, numOfElems, interval, topFixedCount, bottomFixedCount); - - if (((NewObjectDiagram) diagram).isHidden(a.getValue()) == 1 - || ((NewObjectDiagram) diagram).isHidden(a.getValue()) == 2) { - - JMenuItem hideAllLinksOfAssoc = new JMenuItem("Hide all " + a.getKey()); - hideAllLinksOfAssoc.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - ((NewObjectDiagram) diagram).hideLink(a.getValue()); - diagram.repaint(); - } - }); - assocMenu.add(hideAllLinksOfAssoc); - } + private void addLinksByKindEntry(JMenu parentMenu, String key, List assocLinks) { + if (assocLinks == null || assocLinks.isEmpty()) { + return; + } + JMenu assocMenu = new JMenu(key); + MenuScroller.setScrollerFor(assocMenu, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); - if (((NewObjectDiagram) diagram).isHidden(a.getValue()) == 0 - || ((NewObjectDiagram) diagram).isHidden(a.getValue()) == 2) { + List links = new ArrayList<>(assocLinks); + int assocLinkState = ((NewObjectDiagram) diagram).isHidden(links); + if (assocLinkState == 1 || assocLinkState == 2) { + assocMenu.add(createMenuItem(LABEL_SHOW_ALL, () -> ((NewObjectDiagram) diagram).showLink(links))); + } + if (assocLinkState == 0 || assocLinkState == 2) { + assocMenu.add(createMenuItem(LABEL_HIDE_ALL, () -> ((NewObjectDiagram) diagram).hideLink(links))); + } + assocMenu.addSeparator(); - JMenuItem showAllLinksOfAssoc = new JMenuItem("Show all " + a.getKey()); - showAllLinksOfAssoc.addActionListener(new ActionListener() { + links.sort(linkComparator); - @Override - public void actionPerformed(ActionEvent e) { - ((NewObjectDiagram) diagram).showLink(a.getValue()); - diagram.repaint(); - } - }); - assocMenu.add(showAllLinksOfAssoc); - } - assocMenu.addSeparator(); - - Collections.sort(a.getValue(), linkComparator); - - for (MLink link : a.getValue()) { - - if (((NewObjectDiagram) diagram).isHidden(link)) { - JMenuItem linkItem = new JMenuItem("Show " + formatLinkName(link)); - linkItem.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - ((NewObjectDiagram) diagram).showLink(link); - diagram.repaint(); - } - }); - assocMenu.add(linkItem); - } else { - JMenuItem linkItem = new JMenuItem("Hide " + formatLinkName(link)); - linkItem.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - ((NewObjectDiagram) diagram).hideLink(link); - diagram.repaint(); - } - }); - assocMenu.add(linkItem); - } + for (MLink link : links) { + if (((NewObjectDiagram) diagram).isHidden(link)) { + assocMenu.add(createMenuItem(LABEL_SHOW + formatLinkName(link), () -> ((NewObjectDiagram) diagram).showLink(link))); + } else { + assocMenu.add(createMenuItem(LABEL_HIDE + formatLinkName(link), () -> ((NewObjectDiagram) diagram).hideLink(link))); } - subMenuAssociation.add(assocMenu); } - return subMenuAssociation; + parentMenu.add(assocMenu); } /** @@ -646,70 +607,59 @@ public void actionPerformed(ActionEvent e) { * @return JMenu */ public JMenu getSubMenuShowObject() { - JMenu subMenuShowObject = new JMenu("Show objects"); - MenuScroller.setScrollerFor(subMenuShowObject, numOfElems, interval, topFixedCount, bottomFixedCount); + JMenu subMenuShowObject = new JMenu(LABEL_SHOW + "objects"); + MenuScroller.setScrollerFor(subMenuShowObject, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); Set hiddenNodes = diagram.getHiddenNodes(); Set hiddenObjectNodes = CollectionUtil.filterByType(hiddenNodes, ObjectNodeActivity.class); - final JMenuItem showAllObjects = new JMenuItem("Show all hidden objects"); + final JMenuItem showAllObjects = new JMenuItem(LABEL_SHOW_ALL_HIDDEN_OBJECTS); showAllObjects.setEnabled(!hiddenObjectNodes.isEmpty()); - showAllObjects.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - diagram.showAll(); - diagram.repaint(); - } + showAllObjects.addActionListener(ev -> { + diagram.showAll(); + diagram.repaint(); }); subMenuShowObject.add(showAllObjects); subMenuShowObject.addSeparator(); - TreeSet sortedNodes = new TreeSet(objectComparator); + TreeSet sortedNodes = new TreeSet<>(objectComparator); sortedNodes.addAll(hiddenObjectNodes); - Map classMenus = new HashMap(); + Map classMenus = new HashMap<>(); for (ObjectNodeActivity node : sortedNodes) { final ObjectNodeActivity objNode = node; final MClass cls = objNode.cls(); final MObject obj = objNode.object(); - if (!classMenus.containsKey(cls)) { - JMenu subm = new JMenu("Class " + cls.name()); - MenuScroller.setScrollerFor(subm, numOfElems, interval, topFixedCount, bottomFixedCount); - - classMenus.put(cls, subm); + JMenu parent = classMenus.computeIfAbsent(cls, k -> { + JMenu subm = new JMenu(LABEL_CLASS_PREFIX + k.name()); + MenuScroller.setScrollerFor(subm, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); - // Add show all - JMenuItem showAll = new JMenuItem("Show all"); - showAll.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - diagram.showObjects(getHiddenObjects(cls)); - diagram.repaint(); - } + JMenuItem showAll = new JMenuItem(LABEL_SHOW_ALL); + showAll.addActionListener(e -> { + diagram.showObjects(getHiddenObjects(k)); + diagram.repaint(); }); subm.add(showAll); subm.addSeparator(); - } - - JMenu parent = classMenus.get(cls); + return subm; + }); - final JMenuItem showObject = new JMenuItem("Show " + obj.name()); - showObject.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ev) { - diagram.showObject(obj); - diagram.repaint(); - } + final JMenuItem showObject = new JMenuItem(LABEL_SHOW + obj.name()); + showObject.addActionListener(ev -> { + diagram.showObject(obj); + diagram.repaint(); }); parent.add(showObject); } - List classes = new ArrayList(classMenus.keySet()); + List classes = new ArrayList<>(classMenus.keySet()); Collections.sort(classes, new MNamedElementComparator()); for (JMenu m : classMenus.values()) { - MenuScroller.setScrollerFor(m, numOfElems, interval, topFixedCount, bottomFixedCount); + MenuScroller.setScrollerFor(m, NUM_OF_ELEMS, INTERVAL, TOP_FIXED_COUNT, BOTTOM_FIXED_COUNT); } for (MClass cls : classes) { @@ -726,16 +676,13 @@ public void actionPerformed(ActionEvent ev) { * @return */ public Set getDisplayedObjectsForClasses(Set allClasses) { - Set objects = new HashSet(); + Set objects = new HashSet<>(); Iterator itobject = diagram.getVisibleData().getNodes().iterator(); while (itobject.hasNext()) { Object node = itobject.next(); - if (node instanceof ObjectNodeActivity) { - MObject mobj = ((ObjectNodeActivity) node).object(); - if (allClasses.contains(mobj.cls())) { - objects.add(mobj); - } + if (node instanceof ObjectNodeActivity ona && allClasses.contains(ona.object().cls())) { + objects.add(ona.object()); } } @@ -749,14 +696,11 @@ public Set getDisplayedObjectsForClasses(Set allClasses) { * @return */ public Set getVisibleObjects(MClass cls) { - Set objects = new HashSet(); + Set objects = new HashSet<>(); for (PlaceableNode node : diagram.getVisibleData().getNodes()) { - if (node instanceof ObjectNodeActivity) { - MObject mobj = ((ObjectNodeActivity) node).object(); - if (cls.equals(mobj.cls())) { - objects.add(mobj); - } + if (node instanceof ObjectNodeActivity ona && cls.equals(ona.object().cls())) { + objects.add(ona.object()); } } @@ -764,26 +708,19 @@ public Set getVisibleObjects(MClass cls) { } public Set getCropHideObjects(Set classes) { - Set classesToHide = new HashSet(); + Set classesToHide = new HashSet<>(); Iterator itg = diagram.getGraph().iterator(); while (itg.hasNext()) { Object node = itg.next(); - if (node instanceof ObjectNodeActivity) { - MObject mobj = ((ObjectNodeActivity) node).object(); - if (!classes.contains(mobj.cls())) { - classesToHide.add(mobj.cls()); - } + if (node instanceof ObjectNodeActivity ona && !classes.contains(ona.object().cls())) { + classesToHide.add(ona.object().cls()); } } for (Object node : diagram.getHiddenNodes()) { - if (node instanceof MObject) { - MObject mobj = (MObject) (node); - - if (!classes.contains(mobj.cls())) { - classesToHide.add(mobj.cls()); - } + if (node instanceof MObject mobj && !classes.contains(mobj.cls())) { + classesToHide.add(mobj.cls()); } } @@ -791,14 +728,11 @@ public Set getCropHideObjects(Set classes) { } public Set getHiddenObjects(Set classes) { - final Set objects = new HashSet(); + final Set objects = new HashSet<>(); for (PlaceableNode node : diagram.getHiddenNodes()) { - if (node instanceof ObjectNodeActivity) { - ObjectNodeActivity mobj = (ObjectNodeActivity) (node); - if (classes.contains(mobj.cls())) { - objects.add(mobj.object()); - } + if (node instanceof ObjectNodeActivity ona && classes.contains(ona.cls())) { + objects.add(ona.object()); } } @@ -806,17 +740,14 @@ public Set getHiddenObjects(Set classes) { } public Set getHiddenObjects(MClass cls) { - final Set objects = new HashSet(); + final Set objects = new HashSet<>(); for (PlaceableNode node : diagram.getHiddenNodes()) { - if (node instanceof ObjectNodeActivity) { - ObjectNodeActivity mobj = (ObjectNodeActivity) (node); - if (mobj.cls().equals(cls)) { - objects.add(mobj.object()); - } + if (node instanceof ObjectNodeActivity ona && ona.cls().equals(cls)) { + objects.add(ona.object()); } } return objects; } -} \ No newline at end of file +} diff --git a/use-gui/src/main/resources/images/_image_licenses.txt b/use-gui/src/main/resources/images/_image_licenses.txt index 640b8a908..0eba34437 100644 --- a/use-gui/src/main/resources/images/_image_licenses.txt +++ b/use-gui/src/main/resources/images/_image_licenses.txt @@ -1,20 +1,20 @@ -Image sources and licenses: - -Image name | Author | License | Source -------------------------------------------------------------------------------------------------------------------------- -export_pdf.png | AMAZIGH Aneglus | GNU/GPL | http://findicons.com/icon/188108/stock_save_pdf?id=189458# -invariant-view.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons -document-open.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 -document-print.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 -save.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 -undo.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 -redo.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 -line-chart.png | Oxygen Team | GNU/LGPL | http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/Actions-office-chart-line-icon.html -blue-chart-icon.png | Double-J Design | CC Attribution 3.0 | http://www.iconarchive.com/show/origami-colored-pencil-icons-by-double-j-design/blue-chart-icon.html -red-chart-icon.png | Double-J Design | CC Attribution 3.0 | http://www.iconarchive.com/show/origami-colored-pencil-icons-by-double-j-design/red-chart-icon.html -shape-align-left-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons -shape-align-right-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons -shape-align-center-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons -shape-align-top-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons -shape-align-middle-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons -shape-align-bottom-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons +Image sources and licenses: + +Image name | Author | License | Source +------------------------------------------------------------------------------------------------------------------------- +export_pdf.png | AMAZIGH Aneglus | GNU/GPL | http://findicons.com/icon/188108/stock_save_pdf?id=189458# +invariant-view.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons +document-open.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 +document-print.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 +save.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 +undo.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 +redo.png | Silvestre Herrera | GNU/GPL | http://art.gnome.org/download/themes/icon/1100/ICON-DroplineNeu.tar.bz2 +line-chart.png | Oxygen Team | GNU/LGPL | http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/Actions-office-chart-line-icon.html +blue-chart-icon.png | Double-J Design | CC Attribution 3.0 | http://www.iconarchive.com/show/origami-colored-pencil-icons-by-double-j-design/blue-chart-icon.html +red-chart-icon.png | Double-J Design | CC Attribution 3.0 | http://www.iconarchive.com/show/origami-colored-pencil-icons-by-double-j-design/red-chart-icon.html +shape-align-left-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons +shape-align-right-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons +shape-align-center-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons +shape-align-top-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons +shape-align-middle-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons +shape-align-bottom-icon.png | Fatcow Web Hosting | CC Attribution 3.0 | http://www.fatcow.com/free-icons