Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Listing Views and Labels in a Project

12 views
Skip to first unread message

Rob Evans

unread,
Mar 30, 2005, 1:07:01 AM3/30/05
to
One of our users asks about generating a report that gives the
following information:
- the list of views and their properties available in a project
- the list of labels and their properties for each view in a project

In brief, he's looking for a way of generating a report which may look
like the following:

Project PPP

- View 1 (Date+ time, Description)
- Label 1 (Date+ time, Description)
- Label 2 (Date+ time, Description)

- View 2 (Date+ time, Description)
- Label 3 (Date+ time, Description)
- Label 4 (Date+ time, Description)

- View 3 (Date+ time, Description)
- Label 5 (Date+ time, Description)
- Label 6 (Date+ time, Description)

Can anyone assist please?

--

Regards,
Rob Evans

Fujitsu Australia Software Technology
Address: 14 Rodborough Road, Frenchs Forest NSW 2086
Tel: +61 2 9452 9129
Fax: +61 2 9975 2899
Email: ro...@fast.fujitsu.com.au
Web site: www.fastware.com


Steve

unread,
Mar 30, 2005, 11:36:55 PM3/30/05
to
Hi Rob,

I just posted a script which might be pretty close to what you're asking
for. It prints out an HTML report for each project/view on the server,
listing all the active labels for each view (including description &
configuration).

URL: http://blogs.borland.com/slange/archive/2005/03/30/3575.aspx

I hope this is helpful.


"Rob Evans" <ro...@fast.fujitsu.com.au> wrote in message
news:424a...@newsgroups.borland.com...

Rob Evans

unread,
Apr 11, 2005, 8:27:23 PM4/11/05
to
Thank you, Steve, for that script - it produces all the information
that was requested.

One refinement I'd like to be able to make is to have the projects
processed in alphabetical order rather than what appears to be
date-of-creation order. This means modifying the basic controlling
loop:

for each oProject in oServer.Projects
ProcessProject oProject
next

Is this an easy task? Are there interfaces in the COM API for sorting
the Projects in Project.Name order so that they can be passed to
ProcessProject in that order? Or, is there another way of doing it?

"Steve" <st...@nospam-thanks.com> wrote in message
news:424b7e6d$1...@newsgroups.borland.com...

Steve

unread,
Apr 11, 2005, 10:19:20 PM4/11/05
to
In the SDK, there isn't a mechanism for sorting the .Projects collection.
You'll probably need to create your own StCollection and push a sorted project
list into that collection.

David Hegland

unread,
Apr 12, 2005, 5:15:13 PM4/12/05
to
Rob,

I can help out with an example of sorting, not just projects, but also
views, types, properties, and other stuff. So this answer may be much more
generic than you were hoping for, but it will prove useful for other stuff
too.

In the StarTeamNavigator (latest upload from a month ago) I've added a handy
class called "StarTeamComboBox" which extends jComboBox. The
StarTeamComboBox is, of course, wise to the ways of StarTeam. You can tell
it to load a list of projects from a server, load a list of views from a
project, load a list of properties for a type, etc etc.

The part that you will like is that it sorts alphabetically and it also
filters out disabled/deleted objects. For example, it filters out deleted
projects when loading the list of projects from a server and also sorts the
projects by name. Likewise, if the STCombo is loading a list of properties,
it only loads the active properties and sorts them by the display name.

Source code is included. StarTeamNavigator has a bunch of source files, but
the StarTeamComboBox is, I think, only one file, and so you can use it as an
example.

Good luck
:) dave

"Rob Evans" <ro...@fast.fujitsu.com.au> wrote in message

news:425b15ed$1...@newsgroups.borland.com...

Campbell Kerrington

unread,
Apr 27, 2005, 2:44:49 PM4/27/05
to

The example is in VB. Might as well written it in crayon. Any real programmers have an example in java. I use item.getAttachedLabels() but it seems to give me all the labels for all versions. I just want the labels attached to this version. Any help. Again highschoolers need not reply
Campbell

Jonathan Cochran, Sr (TeamB)

unread,
Apr 27, 2005, 3:23:48 PM4/27/05
to
Campbell,

First and foremost, bashing another's advice or their methods is not
an acceptable practice on these boards. Please refrain from future postings
of this type.

Jonathan Cochran, Sr.
TeamB

"Campbell Kerrington" <cke...@mywaypoints.net> wrote in message
news:426fdda1$1...@newsgroups.borland.com...

David Hegland

unread,
Apr 27, 2005, 3:37:52 PM4/27/05
to
Campbell,

Believe me, if I could write this post in crayon I bloody well would.

Despite your unkind attitude, I will give you some help, because that's what
helping friendly people do, and I want to be a helping friendly person. (To
any "highschoolers" reading this, yes that is an intentional Phish-ism.)

...and REAL programmers know that all languages have their uses,
particularly when it comes to demonstrating object models, as Steve tried to
do here..

So, you've brought up a tricky part of the StarTeam object model. It's
oh-so easy to get all the labels attached to an item, but not so easy to
determine what _revisions_ of items are attached, or vice-versa as you are
trying to do.

Here is a snippet. As it happens, I already wrote it in java. Alas I
haven't time to translate it into Smalltalk for you.

public PILabel[] GetLabels() {
PILabel[] returnLabels = new PILabel[0];
Label[] itemLabels = myRealItem.getAttachedLabels();
for (int x=0;x<itemLabels.length;x++) {
Item testItem =
myRealItem.getFromHistoryByLabelID(itemLabels[x].getID());
if (testItem.getDotNotation().equals(myRealItem.getDotNotation())) {
returnLabels = ExpandLabelArray(returnLabels,new
PILabel(itemLabels[x]));
}
}
return returnLabels;
}

Some of this snippet references other functions, but I'm sure a real
programmer like you will understand them without me having to work my pretty
little fingers including them here. Now be nice next time.
:) dave

"Campbell Kerrington" <cke...@mywaypoints.net> wrote in message
news:426fdda1$1...@newsgroups.borland.com...
>

Craig Stuntz [TeamB]

unread,
Apr 27, 2005, 4:17:42 PM4/27/05
to

I cancelled campbell's post due to the personal attack.

http://info.borland.com/newsgroups/guide.html

--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Useful articles about InterBase development:
http://blogs.teamb.com/craigstuntz/category/21.aspx

Tucker Armstrong Bennet III

unread,
Apr 27, 2005, 4:51:53 PM4/27/05
to

Back in the good old days — the "Golden Era" of computers, it was easy to separate the men from the boys (sometimes called "Real Men" and "Quiche Eaters" in the literature). During this period, the Real Men were the ones that understood computer programming, and the Quiche Eaters were the ones that didn't. A real computer programmer said things like "fgets(inbuf,BUFSIZE,inf)" and "if (i%2==0)" (they actually talked in capital letters sometimes), and the rest of the world said things like "computers are too complicated for me" and "I can't relate to computers -- they're so impersonal."

But, as usual, times change. We are faced today with a world in which little old ladies can get computerized television remote controls, 12 year old kids can blow Real Men out of the water playing Sony Play Stations and X-Boxs, and anyone can buy and even understand their very own Personal Computer. The Real Programmer is in danger of becoming extinct, of being replaced by business-school students with Windows running drag and drop programming languages like Visual Basic! Some companies don't even understand the difference between some network-weenie with a Microsoft or Cisco certification and a real programmer.

There is a clear need to point out the differences between the typical business-school Visual Basic user or network-weenie and a Real Programmer. Understanding these differences will give these kids something to aspire to -- a role model, a Father Figure. It will also help employers of Real Programmers to realize why it would be a mistake to replace the Real Programmers on their staff with 12 year script kiddies (at a considerable salary savings). Moreover, they might keep the network kiddies out of sight and out of the real programmers machines.

The same goes for those self-proclaimed Hackers running warez websites... mere code kittens who end up running cable with an A+ certification. Real programmers hack out eloquent solutions, not email scripts.



Real Programmers Today

Real Programmers don't write specs -- users should consider themselves lucky to get any programs at all, and take what they get.

Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.

Real Programmers disdain structured programming. Structured programming is for compulsive neurotics who were permanently toilet trained. They wear neckties and carefully line up sharp pencils on an otherwise clear desk.

Real Programmers can write five page long DO loops without getting confused.

Real Programmers enjoy Arithmetic IF statements because they make the code more interesting.

Real Programmers write self-modifying code, especially if it saves them 20 nanoseconds in the middle of a tight loop.

Real Programmers don't use Visual programs, they program right down on the bare metal. Visual programming is for feebs who can't do system programming.

Real Programmers don't read manuals. Reliance on a reference manual is the hallmark of the novice and the coward.

Real Programmers don't write in RPG. RPG is for gum-chewing dimwits who maintain ancient payroll programs.

Real Programmers don't eat quiche. They eat Twinkies. And Szechwan food. (Do not go to eat Szechwan food with a group of Real Programmers unless you are prepared to argue bitterly over the last spring roll.)

Real Programmers aren't scared of GOTOs... but they really prefer branches to absolute locations.

Real Programmers don't write COBOL. COBOL is for wimpy application programmers.

Real Programmers don't write in PL/1. PL/1 is for insecure anal-retentives who can't choose between COBOL and FORTRAN.

Real Programmers' programs never work right the first time. But if you throw them on the machine they can be patched into working in "only a few" 30-hour debugging sessions.

Real Programmers don't write in FORTRAN. FORTRAN is for pipe stress freaks and crystallography weenies.

Real Programmers never work 9 to 5. If they are around at 9 AM, it's because they were up all night.

Real Programmers don't write in BASIC. Actually, no programmers write in BASIC... after age twelve.

Real Programmers cook their microwave pop-corn on the CPU. They can tell when it's done by watching the running processes.

Real Programmers have no use for managers. Managers are a necessary evil. They exist only to deal with personnel bozos, bean counters, senior planners, and other mental defectives.

Real Programmers scorn floating point arithmetic. The decimal point was invented for pansy bedwetters who are unable to "think big."

Real Programmers don't believe in schedules. Planners make up schedules. Managers "firm up" schedules. Frightened coders strive to meet schedules. Real Programmers ignore schedules.

Real Programmers don't play tennis, or any other sport which requires you to change clothes. Mountain climbing is OK, and Real Programmers wear their climbing boots to work in case a mountain should suddenly spring up in the middle of the computer room.

Real Programmers don't do documentation. Documentation is for simps who can't figure out the listing.

Real Programmers don't write in PASCAL, or BLISS, or ADA, or any of those pinko computer science languages. Strong typing is for people with weak memories.


Real Programmers at Play

At a party, the Real Programmers are the ones in the corner talking about operating system security and how to get around it.

At a football game, the Real Programmer is the one comparing the plays against his simulations printed on 11 by 14 fanfold paper.

At the beach, the Real Programmer is the one drawing flowcharts in the sand.

A Real Programmer goes to a club to watch the light show.

At a funeral, the Real Programmer is the one saying "Poor George. And he almost had the sort routine working before the coronary."

In a grocery store, the Real Programmer is the one who insists on running the cans past the laser checkout scanner himself, because he never could trust keypunch operators to get it right the first time.


Real Programmers Natural Habitat

Listings of all programs the Real Programmer has ever worked on, piled in roughly chronological order on every flat surface in the office.

Some half-dozen or so partly filled cups of cold coffee. Occasionally, there will be cigarette butts floating in the coffee. In some cases, the cups will contain Diet Pepsi.

Strewn about the floor are several wrappers for peanut butter filled cheese bars (the type that are made stale at the bakery so they can't get any worse while waiting in the vending machine).

Hiding in the top left-hand drawer of the desk is a stash of double stuff Oreos for special occasions.

Underneath the Oreos is a flow-charting template, left there by the previous occupant of the office. (Real Programmers write programs, not documentation. Leave that to the maintainence people.)

Real Programmers don't wear neckties.

Real Programmers don't wear high heeled shoes.

Real Programmers arrive at work in time for lunch.

A Real Programmer might or might not know his wife's name. He does, however, know the entire ASCII (or EBCDIC) code table.

Real Programmers don't know how to cook. Grocery stores aren't often open at 3 a.m., so they survive on peanut crackers and coffee.


Craig Stuntz [TeamB]

unread,
Apr 27, 2005, 5:11:36 PM4/27/05
to
Tucker / campbell / whatever your actual name is, I cancelled that,
too, as it's off-topic. Please read and follow the newsgroup guidelines
I posted in my previous message if you'd care for your posts to remain
in this newsgroup for longer than a few minutes.

Freddy G.

unread,
Apr 29, 2005, 12:28:44 PM4/29/05
to
Wow, what a fun response to a reply for assistance!

I couldn't help but chuckle in reading the a reply the "crayon" code post..
I guess rather than firing insults back and forth, we can use this as a
learning tool for requesting assistance in the future in these forums..

If you ask for help, especially a code snippet, it's probably best if you
ask for it written in a specific language. If you don't specify what
language you're using, you can't predict what languages people will use when
posting responses. I bet if Java was specified in the first place, a Java
example would have been provided more readily.

You also bring up an interesting point with regard to VB being basically a
chimp-simple language. One could argue that, when a request is made for
code and no language is specified, it might be most helpful to provide a
sample that is in a "simple" language, so that a wider audience could
understand and benefit from it. And it certainly sounds like you could have
translated it into Java, but rather you wanted a turnkey method to absolve
yourself of as much work as possible.

As David mentioned, every language has its place. Of course, any "REAL
PROGRAMMER" will have his/her language preference, which is fine. Just be
clear about what you want next time (it's funny that the first line in "REAL
PROGRAMMERS Today" mentions: "Real Programmers don't write specs -- users

should consider themselves lucky to get any programs at all, and take what

they get." No specs for help were specified, yet, you didn't seem to want
to "take what you got"..), and there should be no problems..

L8R

"David Hegland" <dheg...@fieldglass.com> wrote in message
news:426fea0e$1...@newsgroups.borland.com...

Rob Evans

unread,
May 2, 2005, 5:25:15 AM5/2/05
to
I was the one who put the original request and was very happy to
receive the VB script that Steve supplied. I have done some dabbling
in VB scripts, principally VBA with Word and Excel and looked at some
of the other scripts that come with StarTeam, but I have no experience
with Java.

I am what some classify as a "REAL" dinosaur, being a mainframe (IBM &
Fujitsu) Assembler programmer - with which I have been able and still
am able to do "REAL" things! I've also programmed in Fortran and APL
(now there's a high level language, which has been labelled 7th
generation!)

--

Regards, Rob E.

"Freddy G." <f...@hijk.com> wrote in message
news:427260bc$1...@newsgroups.borland.com...

David Hegland

unread,
May 3, 2005, 2:07:04 PM5/3/05
to
>blush<

I am a big fan of Rexx myself.


"Freddy G." <f...@hijk.com> wrote in message
news:427260bc$1...@newsgroups.borland.com...

barryi...@gmail.com

unread,
Nov 30, 2015, 2:27:25 PM11/30/15
to
I bet you're still waiting for your first kiss from a girl too...at 40 or something. Real men do nothing you mention above, after being a real man is covered, they think about being programming, when they're not building a shed, or fixing their cars. Oh, and they make sure they have a life...the binary world doesn't count in any shape or form.


On Wednesday, 27 April 2005 16:51:53 UTC-4, Tucker Armstrong Bennet III wrote:
> Back in the good old days -- the "Golden Era" of computers, it was easy to separate the men from the boys (sometimes called "Real Men" and "Quiche Eaters" in the literature). During this period, the Real Men were the ones that understood computer programming, and the Quiche Eaters were the ones that didn't. A real computer programmer said things like "fgets(inbuf,BUFSIZE,inf)" and "if (i%2==0)" (they actually talked in capital letters sometimes), and the rest of the world said things like "computers are too complicated for me" and "I can't relate to computers -- they're so impersonal."
0 new messages