Re: Giving an application a window icon in a sensible way



RedGrittyBrick wrote:
It's not just Patricia, I find it only takes a couple of minutes to
write a 30-line Swing app to illustrate some problem or it's solution.

I use Eclipse. I'm surprised you find using Eclipse to be so difficult
that you'd not attempt this!

I find using Eclipse to be much easier than using either text editors +
command line or any other IDE I've ever tried.

But I certainly do not find that what you describe takes "a couple of
minutes".

Really, I wonder why it is that I am so much more productive? Oh well.

Likely, because you know of some shortcut that I don't. (Eclipse seems
to include a whole damn continent worth of just shortcuts alone, the
exploring of which would take any single person decades. So you can't
fault me for not knowing some specific one. :))

Care to divulge it? (I'm guessing it creates a new stub Swing-app
project in a couple of mouse clicks and one typed-in project name, but
does not solve the 10,000-projects clutter problem I've pointed out
such usage would lead to in a relatively short span of time.)

I have a Project called Testing, so I don't need to create a new one
each time. I just click the "testing" project then click the "new class"
button. These two button clicks take only a second or two of the "couple
of minutes".

Hrm. But then you still have a 10,000-class clutter in the package
explorer...

For me, it's never a waste to learn something new about an interesting
topic. I keep them around so I can go back and remind myself of a
solution or to use them as a basis for another test case.

As a rule, I prefer to work on one thing at a time. Regardless of its
merits, creating whole new applications at the drop of a hat will
necessitate tons of context-switching and workflow disruption...

There's lots I'm not telling you about, but that is because you haven't
asked or because it is not apparent that you don't know.

It's not because (as you imply) that I am deliberately withholding any
information. Not that you've any right to demand info from me, you're
perhaps lucky that I, and others, are happy to give it.

This is uncalled for -- I implied nothing of the sort. I did suggest
that there might be a shortcut that you assumed falsely that I already
knew, and meant for you to question that assumption.

I use Ctrl-C and Ctrl-V to save a lot of typing. I really don't
understand why you think this is hard or time-consuming?

Eh what? I don't see how cut and paste helps. If I've got a broken
behavior involving my use of, say, the Foo class, in a threaded context
with various accesses, I'd need to copy and paste several chunks of
code (and each chunk means switching projects *twice*) and then write a
whole lot of glue code before it will even *compile*, likely including
a new thread subclass or two. Then I need to tweak it until it
reproduces the behavior seen in the original app...

The alternative would seem to be to copy the original project in its
entirety (all potentially however-many class source files worth) and
then pare it down, which might take an insane amount of time (and if
one important bit is deleted by mistake, the result either won't work
or won't reproduce the original problem, and then it all has to be done
again *from scratch*...)

I don't see either of these as being anything like as quick as you make
out. Unfortunately, the bugs (mine or otherwise) that would be isolated
with the least effort by this method are exactly the bugs that are so
localized to one or two lines of code that they rapidly succumb to
debugging tools such as breakpoints and added System.out.println
statements. The more complex problems are the very ones that will
require an effort to reproduce this way comparable to making a
substantial new project in its own right.

There's also the issue that the stripped-down copy produced (by either
method) will, for more complex situations, still potentially reveal way
too much about the nature and architecture of my project. I had one
reason to avoid doing so in the past; lately I've added a second,
namely that every fact that is exposed about what I'm doing is another
potential target for someone to latch onto to criticize for no apparent
reason beyond the sheer joy of criticizing someone. If I mention that
I'm doing X, in other words, then anyone who for whatever reason thinks
doing X is dumb is liable to go and open their big mouth and I'll be
forced to defend my use of X. Multiply that by however many details are
revealed, and before long that's a lot of defending and not much actual
work getting done. In the worst case, enough implementation details are
exposed, and enough of those become the focus of some dweeb's pointless
attacks, that defending them actually requires 300 GG accounts and over
24 hours a day of defending. At that point, it becomes impossible to
avoid letting at least one criticism a day slide, with the devastating
consequence of bad beliefs about me beginning to circulate unopposed.
And the number circulating then growing with every passing day until,
presumably, all 6 billion people in the world believe something bad
about me and nobody will want anything to do with me again. Needless to
say, that would then put a crimp in my lifestyle...

So I hope you'll forgive me if I'm sparing with details, and if I react
somewhat negatively to any and all attempts to pry beyond the narrow
confines of the specific areas about which I've asked questions, as
well as to all suggestions that would involve exposing lots of such
details in one fell swoop.

then by all means,
don't let some stupid NDA stop you from sharing it. ;)

What NDA?

It was a joke. I must have forgotten that nobody else here has a sense
of humor; sorry, momentary lapse.

Incidentally, you don't happen to know any fix for this
tangentially-related issue do you? In Eclipse I've gotten around to
creating three or four projects of various sorts. When started, Eclipse
*always* starts with the first of these as the "current" project (no
matter which was the last edited) and a blank package explorer, whose
active "up arrow" button needs to be used a couple times to get the
full project and package listing.

I don't have that problem with Eclipse 3.1, so I can't offer any certain
solutions.

3.1.1 here.

Have you tried creating a "Working set" (see menu under
down-arrow to right of title in Package Explorer). At start-up Eclipse
remembers my last-selected working set. They are also a great way to
eliminate clutter (I don't see any Testing classes in Project Explorer
when working on my main project).

Well that would be one clutter-related shortcut I can now use; thank
you.

I'll check it out.

Worse, folding shut some of the projects causes weird side effects; on
one occasion the package explorer got stuck blank with the "up arrow"
button disabled and Eclipse had to be restarted to make it useful again
(closing and recreating the package explorer "window" did not suffice).

I've not experienced that.

I don't know yet that it wasn't a one-off. It was nonetheless
disturbing.

That is what I see too. I don't find it a problem, so I've no experience
of trying to tailor this characteristic. I sometimes find it useful to
have java files form several projects open for the following reasons:
- I can cut & paste between projects more easily (e.g. real to testing)

Sounds like you need version control and branching -- or at least so
some other people here would probably jump at suggesting. ;) (I'd say
it depends on the complexity of what you're doing. If you're
maintaining parallel versions of something over a significant span of
time, it may very well be warranted. If you're just forking a quick
copy to experiment in, it might be a waste of time instead.)

Did you know that you can right-click a source tab and select "close
others"? It might ameliorate the issue you have with this behaviour.

Clutter in the source view area I can manage (although any kind of
significant debugging activity tends to result in windows open on
either standard library class sources or "No source code available"
messages regarding same; I don't suppose you can limit it to only
opening a window at the site of a thread suspension if it's inside code
you wrote?)

When I select a project in Package Explorer, then choose Properties from
the Project menu, it is the selected project whose properties are
displayed.

Maybe I was unclear, because that's the properties I see too. But they
differ from the one indicated by the titlebar. That might not matter,
except that the package explorer always seems to start in the latter,
and being able to change it would be useful...

You can tailor this, I did so. Select the "Problems" pane, at the right
of the title is a set of icons, one is "filters" click it, there are
radio-buttons for "On any resource", "On any resource in same project"
and so on. I suggest you select one of the narrower scopes.

Ah. The 100 item limit seems to be tunable there also. Thanks. (Have
yet to get around to clicking on every icon or button I see in the
interface. :))

Seems to work. (I have prompt access to eclipse at this time, unlike a
couple days ago, and I just checked it on the project the icon
controversy erupted about. The 100+ warnings and errors in the
incomplete project disappeared, leaving only some warnings from the
XImageSource. I'm now seriously considering retrofitting the icon with
getResource purely because of those; having compile warnings bugs me
even if everything works. Apparently, half the stuff XImageSource uses
has been deprecated since it was written, and all of it was written
before generics...my own code may have only an extra couple of lines
and no extra I/O or error recovery to worry about, but the bolted-on
mini-library it uses is itself something of a mess. Of course, I could
have made it some kind of proper library instead of dropping the class
files into my own project and changing the package statements, but I
couldn't be arsed to learn all about how just to make one lousy icon
work...)

Yes it is possible. Position the cursor over any Java Class name and
press Shift+F2. You'll need to download the Javadocs (if you have not
already) and tell Eclipse where to find them.

Shift+F2? You don't mean just the little scrollable box with an
abbreviated, un-hyperlinked version? (Which I'm fairly sure was just
regular-F2...)

Testing it, it doesn't seem to work. It's looking for the project
javadocs, which I've not built at this time, rather than the standard
library javadocs, and that's while pointing at the identifier
PriorityQueue and seeing in the regular-F2 window the PriorityQueue
class docs' preamble (before the method list etc.) without hyperlinks.

It does at least seem to be able to find the standard library javadocs
to provide the latter functionality, even if shift-F2 is misfiring.

http://tinyurl.com/avqq8 Has more detail including screenshots.

The last tinyurl I ran across led directly to goatse, so I hope you'll
forgive me if I at least save this one for later. :)

N.B. If this is at all useful, a simple thanks would go a *long* way.

See above.

P.S. I found the "Select working set..." option and it produces a blank
selection box with a "new..." button. A bit of tinkering reveals that I
don't know what the bleep I'm doing, so it seems to be an area where
reading the docs will be needed (which is unlike a lot of Eclipse,
where it's been second nature how to just use the thing).

P.P.S. foobarbazqux's attack post, with its sneaky header tricks,
evidently did its damage after all. :P What an arsehole. I'm guessing
that whatever it looked like, it made the first followup count for far
more than just 2. Since midnight I've posted maybe a grand total of 10
posts, and in the last 24 hours maybe twice that. Google apparently
sees a significantly larger number. I wonder where the hell they are
all going? The one I definitely caught being copied elsewhere went to a
newsgroup whose very name suggests an insult, so I'm somewhat concerned
now about where the copies are going as well as how many there are. The
jerk may have made several newsgroups think I'm spamming them
deliberately with offtopic posts, and if so, I expect the hate mail to
start rolling in any day now, unless of course it's already coming and
my spam filters are stopping it all. And a longer-lived block at Google
might be in the offing if I get complained about, which I don't have
confidence I'll even be given the chance to appeal. My experience with
Internet justice so far has been that the only two options are
"totalitarian" or "rough" in most places...

.