Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:37 pm
by cnwjhp1 >> Mon, 4 Mar 2002 23:29:05 GMT
Michael,
Below is a script I threw together (and it looks like it) yesterday to find a similar sort of thing. (In my case, properties with a certain naming convention that are not explicit inverses.) You'll need to start from a collection of translatable strings, and check if getMethodRefs returns a collection of size 0. Don't know if I'd attempt to delete them this way tho. Hope this helps.
Cheers,
John P
jhpUnusedMyGlobals();
vars
threshold,i,j,k,l:Integer;
s,t,u,v:String;
startClas,clas:Class;
classColl:ClassColl;
property:Property;
methodSet:MethodSet;begin
create classColl transient;
LINCOBJECT.allSubclassesInSubschemas(classColl);
// classColl.add(currentSchema.findClassInSubschema("R_Admr050")); // for an individual class
write CrLf&"Starting...";
create methodSet transient;
foreach clas in classColl do
// write clas.name;
foreach property in clas.getProperties where property.name[1:3]="myG" do
s:=(clas.name&"::"&property.name).padBlanks(40)&property.name; // write s;
// methodSet.clear;
// if property.name="myGlobal_Adm98" then property.inspect; endif;
// property.getMethodRefs(methodSet);
if not property.isKindOf(ExplicitInverseRef) then
write s;
i:=i+1;
endif;
endforeach;
endforeach;
write i;
write CrLf&"Finished";
epilog
delete classColl;
delete methodSet;
end;