# HG changeset patch # User Claus Gittinger # Date 1487174184 -3600 # Node ID fab3dc7eb9bed5e4072cace38a215a463386eb8d # Parent 59c38b4d195adc2366f01d6f297432758c9cd2aa #FEATURE by cg class: ProjectDefinition added: #projectTags #superProject diff -r 59c38b4d195a -r fab3dc7eb9be ProjectDefinition.st --- a/ProjectDefinition.st Tue Feb 14 22:13:00 2017 +0100 +++ b/ProjectDefinition.st Wed Feb 15 16:56:24 2017 +0100 @@ -1,5 +1,3 @@ -"{ Encoding: utf8 }" - " COPYRIGHT (c) 2006 by eXept Software AG All Rights Reserved @@ -833,6 +831,17 @@ ]. ! +projectTags + "a list of resource-tags used in the project. + These are offered in the browser's methodList menu as 'Tag as' items. + Allowing convenient tagging for things like ''. + When redefined, a collection of useful tag-strings should be returned." + + ^ #() + + "Created: / 15-02-2017 / 16:42:48 / cg" +! + topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch "Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory" @@ -2305,6 +2314,38 @@ ^ #() "Modified: / 17-08-2006 / 19:57:46 / cg" +! + +superProject + "return the package which contains me as subProject, + or if not found, which contains me under its directory hierarchy, + or nil if none found" + + |p superPackage idx| + + ProjectDefinition allSubclassesDo:[:prjDef | + (prjDef subProjects includes:package) ifTrue:[^ prjDef]. + ]. + p := package. + [ + (idx := p lastIndexOf:$/) ~~ 0 + ] whileTrue:[ + |defClass| + + superPackage := p copyTo:idx-1. + (defClass := ProjectDefinition definitionClassForPackage:superPackage) notNil ifTrue:[ + ^ defClass + ]. + p := superPackage. + ]. + ^ nil + + " + stx_goodies_refactoryBrowser_lint superProject + exept_expecco_plugin_guiBrowser superProject + " + + "Created: / 15-02-2017 / 16:49:05 / cg" ! ! !ProjectDefinition class methodsFor:'description - actions'!