727 |
727 |
728 !ProjectProblem::ClassListedButDoesNotExist methodsFor:'accessing-description'! |
728 !ProjectProblem::ClassListedButDoesNotExist methodsFor:'accessing-description'! |
729 |
729 |
730 description |
730 description |
731 "Return a (HTML) describing the problem." |
731 "Return a (HTML) describing the problem." |
732 ^ |
732 |
733 'A class (<code>%1</code>) is listed in the project definition but |
733 |msg| |
734 not present in the system. |
734 |
735 |
735 self klass isNil ifTrue:[ |
|
736 msg := |
|
737 'Class "<code>%1</code>" is listed in the project definition but not present in the system. |
|
738 <br> |
736 You should either create it or remove it from %2.' |
739 You should either create it or remove it from %2.' |
737 bindWith: className with: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes) |
740 ] ifFalse:[ |
|
741 msg := |
|
742 'Class "<code>%1</code>" is listed in the project definition but is located in another package ("',self klass package,'") |
|
743 <br> |
|
744 You should either move the class to this package it or remove it from the list in %2.' |
|
745 ]. |
|
746 ^ msg |
|
747 bindWith: className |
|
748 with: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes) |
738 |
749 |
739 "Modified: / 28-02-2012 / 22:23:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
750 "Modified: / 28-02-2012 / 22:23:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
740 ! |
751 ! |
741 |
752 |
742 label |
753 label |
743 ^'Missing class: ', className allBold |
754 ^'Missing class: ', className allBold |
744 |
755 |
745 "Modified: / 23-02-2012 / 13:20:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
756 "Modified: / 23-02-2012 / 13:20:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
757 ! ! |
|
758 |
|
759 !ProjectProblem::ClassListedButDoesNotExist methodsFor:'fixing'! |
|
760 |
|
761 alreadyFixed |
|
762 | cls def | |
|
763 |
|
764 def := self packageDefinitionClass. |
|
765 def isNil ifTrue:[ ^ false ]. "/ ouch - can this happen? |
|
766 |
|
767 (def compiled_classNames includes:className) ifFalse:[^ true]. |
|
768 |
|
769 cls := self klass. |
|
770 cls isNil ifTrue:[^ false]. |
|
771 |
|
772 ^ cls package = self package |
|
773 ! |
|
774 |
|
775 doMoveClassToPackage |
|
776 | cls | |
|
777 |
|
778 cls := self klass. |
|
779 cls isNil ifTrue:[ ^ false ]. |
|
780 cls package:(cls package). |
|
781 UserNotification notify: ('Do not forget to check in the class into the appropriate repository!!'). |
|
782 ^true |
|
783 ! |
|
784 |
|
785 doRemoveClassFromProjectDefinition |
|
786 | def cls | |
|
787 |
|
788 def := self packageDefinitionClass. |
|
789 def isNil ifTrue:[ ^ false ]. |
|
790 cls := self klass. |
|
791 cls isNil ifTrue:[ ^ false ]. |
|
792 def excludeClasses:{ cls } usingCompiler:nil. |
|
793 UserNotification notify: ('Class removed from project. Do not forget to check in build support files!!' bindWith: className). |
|
794 ^true |
|
795 ! |
|
796 |
|
797 fixes |
|
798 |allFixes| |
|
799 |
|
800 allFixes := OrderedCollection new. |
|
801 allFixes add:{ |
|
802 'Remove from project definition' . |
|
803 [ self doRemoveClassFromProjectDefinition ] |
|
804 }. |
|
805 self klass notNil ifTrue:[ |
|
806 allFixes add:{ |
|
807 'Move class to package' . |
|
808 [ self doMoveClassToPackage ] |
|
809 }. |
|
810 ]. |
|
811 allFixes addAll:super fixes. |
|
812 ^ allFixes |
746 ! ! |
813 ! ! |
747 |
814 |
748 !ProjectProblem::ClassListedMultipleTimes methodsFor:'accessing-description'! |
815 !ProjectProblem::ClassListedMultipleTimes methodsFor:'accessing-description'! |
749 |
816 |
750 description |
817 description |
1827 ! ! |
1894 ! ! |
1828 |
1895 |
1829 !ProjectProblem class methodsFor:'documentation'! |
1896 !ProjectProblem class methodsFor:'documentation'! |
1830 |
1897 |
1831 version |
1898 version |
1832 ^ '$Header: /cvs/stx/stx/libbasic3/ProjectProblem.st,v 1.30 2014-04-26 08:47:01 cg Exp $' |
1899 ^ '$Header: /cvs/stx/stx/libbasic3/ProjectProblem.st,v 1.31 2014-04-26 09:46:13 cg Exp $' |
1833 ! |
1900 ! |
1834 |
1901 |
1835 version_CVS |
1902 version_CVS |
1836 ^ '$Header: /cvs/stx/stx/libbasic3/ProjectProblem.st,v 1.30 2014-04-26 08:47:01 cg Exp $' |
1903 ^ '$Header: /cvs/stx/stx/libbasic3/ProjectProblem.st,v 1.31 2014-04-26 09:46:13 cg Exp $' |
1837 ! |
1904 ! |
1838 |
1905 |
1839 version_SVN |
1906 version_SVN |
1840 ^ '$Id: ProjectProblem.st,v 1.30 2014-04-26 08:47:01 cg Exp $' |
1907 ^ '$Id: ProjectProblem.st,v 1.31 2014-04-26 09:46:13 cg Exp $' |
1841 ! ! |
1908 ! ! |
1842 |
1909 |