30 classVariableNames:'' |
30 classVariableNames:'' |
31 poolDictionaries:'' |
31 poolDictionaries:'' |
32 privateIn:ProjectProblem |
32 privateIn:ProjectProblem |
33 ! |
33 ! |
34 |
34 |
|
35 ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedBeforeItsPool |
|
36 instanceVariableNames:'poolName' |
|
37 classVariableNames:'' |
|
38 poolDictionaries:'' |
|
39 privateIn:ProjectProblem |
|
40 ! |
|
41 |
|
42 ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedBeforeItsSuperclass |
|
43 instanceVariableNames:'superClassName' |
|
44 classVariableNames:'' |
|
45 poolDictionaries:'' |
|
46 privateIn:ProjectProblem |
|
47 ! |
|
48 |
35 ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedButDoesNotExist |
49 ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedButDoesNotExist |
36 instanceVariableNames:'' |
50 instanceVariableNames:'' |
37 classVariableNames:'' |
51 classVariableNames:'' |
38 poolDictionaries:'' |
52 poolDictionaries:'' |
39 privateIn:ProjectProblem |
53 privateIn:ProjectProblem |
206 ProjectChecker ProjectDefinition |
220 ProjectChecker ProjectDefinition |
207 " |
221 " |
208 ! ! |
222 ! ! |
209 |
223 |
210 !ProjectProblem class methodsFor:'instance creation'! |
224 !ProjectProblem class methodsFor:'instance creation'! |
|
225 |
|
226 newClassIsCompiledButSuperclassIsAutoloaded |
|
227 |
|
228 ^ClassIsCompiledButSuperclassIsAutoloaded new |
|
229 |
|
230 "Created: / 20-09-2013 / 11:18:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
231 ! |
|
232 |
|
233 newClassIsCompiledButSuperclassProjectDefinitionIsMissing |
|
234 |
|
235 ^ClassIsCompiledButSuperclassProjectDefinitionIsMissing new |
|
236 |
|
237 "Created: / 05-10-2013 / 12:43:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
238 ! |
211 |
239 |
212 newClassListedBeforeItsPool |
240 newClassListedBeforeItsPool |
213 |
241 |
214 ^ClassListedBeforeItsPool new |
242 ^ClassListedBeforeItsPool new |
215 |
243 |
577 |
605 |
578 ^Array |
606 ^Array |
579 with: (Array with: 'Full update of the project definitions (rescan)' with: [ self doUpdateAllProjectDefinitions ]) |
607 with: (Array with: 'Full update of the project definitions (rescan)' with: [ self doUpdateAllProjectDefinitions ]) |
580 ! ! |
608 ! ! |
581 |
609 |
|
610 !ProjectProblem::ClassListedBeforeItsPool methodsFor:'accessing'! |
|
611 |
|
612 poolName |
|
613 ^ poolName |
|
614 ! |
|
615 |
|
616 poolName:something |
|
617 poolName := something. |
|
618 ! ! |
|
619 |
|
620 !ProjectProblem::ClassListedBeforeItsPool methodsFor:'accessing-description'! |
|
621 |
|
622 description |
|
623 "Return a (HTML) describing the problem." |
|
624 |
|
625 ^ |
|
626 'Class %2 is listed in project definition (%1) before one of its pools (%3). |
|
627 <br>Such class will fail to compile (if the package is being stc-compiled) |
|
628 and load (if the package is being loaded from source). |
|
629 <br>Make sure class (%3) is listed before (%2). |
|
630 |
|
631 ' |
|
632 bindWith: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
|
633 with: (self linkToClass: className) |
|
634 with: (self linkToClass: poolName) |
|
635 |
|
636 "Modified: / 13-09-2012 / 18:29:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
637 ! |
|
638 |
|
639 label |
|
640 "Return the label (possibly instance if a Text) shortly describing the problem" |
|
641 |
|
642 ^'Class %1 listed in project definition "%2" before one of its pools' bindWith: className allBold with:self packageDefinitionClass |
|
643 |
|
644 "Modified: / 13-09-2012 / 17:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
645 ! ! |
|
646 |
|
647 !ProjectProblem::ClassListedBeforeItsSuperclass methodsFor:'accessing'! |
|
648 |
|
649 superClassName |
|
650 ^ superClassName |
|
651 ! |
|
652 |
|
653 superClassName:something |
|
654 superClassName := something. |
|
655 ! ! |
|
656 |
|
657 !ProjectProblem::ClassListedBeforeItsSuperclass methodsFor:'accessing-description'! |
|
658 |
|
659 description |
|
660 "Return a (HTML) describing the problem." |
|
661 |
|
662 ^ |
|
663 'Class %2 is listed in project definition (%1) before its superclass %3. |
|
664 <br>The package can be stc-compiled |
|
665 (because the generated makefile compiles in correct order) |
|
666 but the class may fail to load from source. |
|
667 <br>Make sure %3 is listed before %2. |
|
668 |
|
669 ' |
|
670 bindWith: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
|
671 with: (self linkToClass: className) |
|
672 with: (self linkToClass: superClassName) |
|
673 |
|
674 "Modified: / 13-09-2012 / 18:29:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
675 ! |
|
676 |
|
677 label |
|
678 "Return the label (possibly instance if a Text) shortly describing the problem" |
|
679 |
|
680 ^'Class %1 listed in project definition "%2" before its superclass' bindWith: className allBold with:self packageDefinitionClass |
|
681 |
|
682 "Modified: / 13-09-2012 / 17:36:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
683 ! ! |
|
684 |
582 !ProjectProblem::ClassListedButDoesNotExist methodsFor:'accessing'! |
685 !ProjectProblem::ClassListedButDoesNotExist methodsFor:'accessing'! |
583 |
686 |
584 severity |
687 severity |
585 "Return a severity - one of #error, #warning, #info" |
688 "Return a severity - one of #error, #warning, #info" |
586 |
689 |
703 with: (Array with: 'Full update of the project definitions (rescan)' with: [ self doUpdateAllProjectDefinitions ]) |
806 with: (Array with: 'Full update of the project definitions (rescan)' with: [ self doUpdateAllProjectDefinitions ]) |
704 |
807 |
705 "Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
808 "Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
706 ! ! |
809 ! ! |
707 |
810 |
708 !ProjectProblem::ClassListedBeforeItsPool methodsFor:'accessing'! |
811 !ProjectProblem::ClassIsCompiledButSuperclassIsAutoloaded methodsFor:'accessing'! |
709 |
|
710 poolName |
|
711 ^ poolName |
|
712 ! |
|
713 |
|
714 poolName:something |
|
715 poolName := something. |
|
716 ! ! |
|
717 |
|
718 !ProjectProblem::ClassListedBeforeItsPool methodsFor:'accessing-description'! |
|
719 |
812 |
720 description |
813 description |
721 "Return a (HTML) describing the problem." |
814 "Return a (HTML) describing the problem." |
722 |
815 |
723 ^ |
816 ^ |
724 'Class %2 is listed in project definition (%1) before one of its pools (%3). |
817 'Class %1 is compiled (i.e., not autoloaded) but its superclass %1 is |
725 <br>Such class will fail to compile (if the package is being stc-compiled) |
818 is autoloaded. Such class won''t compile because of missing superclass .H/.STH file. |
726 and load (if the package is being loaded from source). |
819 To fix it, either make %1 autoloaded ot make %2 compiled.' |
727 <br>Make sure class (%3) is listed before (%2). |
820 bindWith: (self linkToClass: className) |
728 |
821 with: (self linkToClass: (Smalltalk at: className) superclass name) |
729 ' |
822 |
730 bindWith: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
823 "Modified: / 20-09-2013 / 11:04:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
731 with: (self linkToClass: className) |
|
732 with: (self linkToClass: poolName) |
|
733 |
|
734 "Modified: / 13-09-2012 / 18:29:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
735 ! |
824 ! |
736 |
825 |
737 label |
826 label |
738 "Return the label (possibly instance if a Text) shortly describing the problem" |
827 "Return the label (possibly instance if a Text) shortly describing the problem" |
739 |
828 |
740 ^'Class %1 listed in project definition "%2" before one of its pools' bindWith: className allBold with:self packageDefinitionClass |
829 ^ 'Class ', className , ' is compiled but its superclass is autoloaded' |
741 |
830 |
742 "Modified: / 13-09-2012 / 17:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
831 "Modified: / 20-09-2013 / 11:00:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
832 ! ! |
|
833 |
|
834 !ProjectProblem::ClassIsCompiledButSuperclassIsAutoloaded methodsFor:'fixing'! |
|
835 |
|
836 doIncludeInProjectAsAutoloaded |
|
837 "Include subject class in project definition. Return false if |
|
838 fix fails, true otherwise" |
|
839 |
|
840 ^ self doIncludeInProjectAsAutoloaded:true |
|
841 ! |
|
842 |
|
843 doIncludeInProjectAsAutoloaded:asAutoloaded |
|
844 "Include subject class in project definition. Return false if |
|
845 fix fails, true otherwise" |
|
846 |
|
847 | def cls | |
|
848 |
|
849 def := self packageDefinitionClass. |
|
850 def isNil ifTrue:[ ^ false ]. |
|
851 cls := self klass. |
|
852 cls isNil ifTrue:[ ^ false ]. |
|
853 asAutoloaded ifTrue:[ |
|
854 def makeClassesAutoloaded:(Array with: cls) usingCompiler: nil. |
|
855 ] ifFalse:[ |
|
856 def includeClasses:(Array with: cls) usingCompiler: nil. |
|
857 ]. |
|
858 UserNotification notify: ('Class added. Do not forget to check in build support files!!' bindWith: className). |
|
859 ^true |
|
860 |
|
861 "Created: / 26-07-2012 / 10:41:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
862 ! |
|
863 |
|
864 fixes |
|
865 |
|
866 ^Array |
|
867 with: (Array with: 'Add class ', className , ' to project as autoloaded' with: [ self doIncludeInProjectAsAutoloaded ]) |
|
868 |
|
869 "Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
870 "Modified: / 20-09-2013 / 11:06:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
743 ! ! |
871 ! ! |
744 |
872 |
745 !ProjectProblem::ClassUsesPoolProblem methodsFor:'accessing'! |
873 !ProjectProblem::ClassUsesPoolProblem methodsFor:'accessing'! |
746 |
874 |
747 poolName |
875 poolName |
1076 with: (Array with: 'Remove from the extensionMethodNames list' with: [ self doRemoveNamedMethodFromExtensionsList ]) |
1204 with: (Array with: 'Remove from the extensionMethodNames list' with: [ self doRemoveNamedMethodFromExtensionsList ]) |
1077 |
1205 |
1078 "Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1206 "Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1079 ! ! |
1207 ! ! |
1080 |
1208 |
1081 !ProjectProblem::ClassListedBeforeItsSuperclass methodsFor:'accessing'! |
1209 !ProjectProblem::ClassIsCompiledButSuperclassProjectDefinitionIsMissing methodsFor:'accessing'! |
1082 |
|
1083 superClassName |
|
1084 ^ superClassName |
|
1085 ! |
|
1086 |
|
1087 superClassName:something |
|
1088 superClassName := something. |
|
1089 ! ! |
|
1090 |
|
1091 !ProjectProblem::ClassListedBeforeItsSuperclass methodsFor:'accessing-description'! |
|
1092 |
1210 |
1093 description |
1211 description |
1094 "Return a (HTML) describing the problem." |
1212 "Return a (HTML) describing the problem." |
1095 |
1213 |
1096 ^ |
1214 ^ |
1097 'Class %2 is listed in project definition (%1) before its superclass %3. |
1215 'Class %1 is compiled (i.e., not autoloaded) but its superclass''s package |
1098 <br>The package can be stc-compiled |
1216 definition is missing. Such class won''t compile because superclass''s package |
1099 (because the generated makefile compiles in correct order) |
1217 will be likely missing.' |
1100 but the class may fail to load from source. |
1218 bindWith: (self linkToClass: className) |
1101 <br>Make sure %3 is listed before %2. |
1219 with: (self linkToClass: (Smalltalk at: className) superclass name) |
1102 |
1220 |
1103 ' |
1221 "Modified: / 05-10-2013 / 12:43:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1104 bindWith: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
|
1105 with: (self linkToClass: className) |
|
1106 with: (self linkToClass: superClassName) |
|
1107 |
|
1108 "Modified: / 13-09-2012 / 18:29:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1109 ! |
1222 ! |
1110 |
1223 |
1111 label |
1224 label |
1112 "Return the label (possibly instance if a Text) shortly describing the problem" |
1225 "Return the label (possibly instance if a Text) shortly describing the problem" |
1113 |
1226 |
1114 ^'Class %1 listed in project definition "%2" before its superclass' bindWith: className allBold with:self packageDefinitionClass |
1227 ^ 'Class ', className , ' is compiled but its superclass''s package definition is missing' |
1115 |
1228 |
1116 "Modified: / 13-09-2012 / 17:36:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1229 "Modified: / 05-10-2013 / 12:41:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1117 ! ! |
1230 ! ! |
1118 |
1231 |
1119 !ProjectProblem::MethodCompilabilityIssue methodsFor:'accessing'! |
1232 !ProjectProblem::MethodCompilabilityIssue methodsFor:'accessing'! |
1120 |
1233 |
1121 severity |
1234 severity |