landon manning

Ranch Hand
+ Follow
since Nov 20, 2000
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by landon manning

Hi all,

I'm looking for a way to import a set of projects into Eclipse similar to how MS Visual Studio (C++)v6 handles workspaces (.dsw).

I've looked into Eclipse's Project Sets, however, they require the project to be "shared" - which requires a CVS repository.

Unfortunately, my team and I are using Perforce.

Ideally, I would like a way to import and export a set of projects independant of the source code control that I am using.

Any ideas?
I'm looking for a component that behaves like the "Back" button in the tool bar of Internet Explorer or the "Run ..." button in the tool bar of Eclipse.
The component has 2 parts, the first part behaves like a normal button in a toolbar (in that if you click on it, you get the action associated with it). The second part is like a menu (JMenu) with a down arrow icon that would pop up a list of options (which would be a bunch of JMenuItems, if we were doing menus).
Adding a JMenuBar (next to a JButton) to a JToolbar doesn't quite work too well (the layout of the components is all misalligned).
This component is going to be on a JToolbar.
Any ideas or does someone know where code to do this is?
20 years ago
A user executes a (c++) program that calls my java program which displays a JFrame for user interaction. Since the java program only gets executed after a serveral tasks are completed by the c++ program, the user may alt+tab to other applications. When the c++ calls my java program, the window that it displays is hidden behind some other application window.
How do I make my java window (currently a JFrame) appear in front of any other applications that are running?
20 years ago
I do have concrete implementations. 2, actually, and they both work perfectly well, executing both their specific methods and the ones that they inherit from the AbstractMyClassTest. (Of course, this is when I execute them separately (I'm using Eclipse's junit plugin for this). )
It's when I try to run my ant build (that executes all of my test cases) that my AbstractMyClassTest.testMyMethod() fails.
One possible solution: Since the problem shows up when I do an ant build and execute the junt ant task, exclude the AbstractMyClassTest file from the fileset of tests in my build.xml. - Since none of the web sites have mentioned this step, I'm inclined to believe that I'm doing something else wrong, and would rather fix the problem than hack around it.
20 years ago
(sorry about the confusion on what I'm trying to accomplish) What I'm trying to do is test an abstract class of mine, as well as all of the subclasses of my abstract class (without having to duplicate the tests defined in the abstract class's test class). The link above (I've corrected the link), explains abstract tests fairly well, as does JUnit even refers to this last link so I am under the impression that JUnit supports abstract test cases. ... however, upon looking at the source code for JUnit, I haven't found any code that suggests that JUnit actually does support abstract test cases.
So, at this point, I'm wondering if JUnit allows abstract test cases, and, if so, what am I doing wrong.
20 years ago
I'm trying to create an AbstractTestCase (see: and I am getting the following error (and, as far as I can tell, I shouldn't be getting this error):
[junit] Running AbstractMyTest
[junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.016 sec
[junit] Testsuite: AbstractMyClassTest
[junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.016 sec
[junit] Testcase: warning took 0 sec
[junit] FAILED
[junit] Cannot instantiate test case: testGetPolicies (java.lang.InstantiationException: AbstractMyClassTest
[junit] at java.lang.reflect.Constructor.newInstance(Native Method)
[junit] at junit.framework.TestSuite.addTestMethod(
[junit] at junit.framework.TestSuite.<init>(
[junit] at<init>(
[junit] at<init>(
[junit] at
[junit] )
[junit] junit.framework.AssertionFailedError: Cannot instantiate test case: testMyMethod(java.lang.Instantiation
Exception: AbstractMyClassTest
[junit] at java.lang.reflect.Constructor.newInstance(Native Method)
[junit] )
[junit] Testcase: warning
file :/src/build.xml:410: Test AbstractMyClassTest failed

My test class looks like this
import junit.framework.TestCase;
public abstract class AbstractMyClassTest extends TestCase

public abstract void setUp() throws IOException;

public AbstractMyClassTest(String arg0)

public final void testMyMethod() throws IOException
//testing stuff


I'm using ant (version 1.5.1) with the following options:
<junit printsummary="yes" haltonfailure="yes" fork="yes" maxmemory="128M">
I'm using junit version 3.7 (as per the Version.class file in the junit.jar).

Anyone have any ideas/solutions?
[ June 19, 2003: Message edited by: landon manning ]
20 years ago
Normally the way that I do a pseudo random number is by setting the seed to the system time.
For example: (Like Grant Crofton suggested)
Random myRandom = new Random( System.currentTimeMillis() );
Since your system time is *somewhat* hard to guess correctly to the millisecond, this works as a good seed for randomizing.
Hope this helps.
23 years ago
I have read that one. I've also looked at the other essay, "The Cathedral and the Bazaar" (also by E. Raymond). In fact, those articles are what caused me to post in the first place.
Could you expand on the "too much democracy and bickering"?
I have several reasons for asking:
1. I have a game that I developed last year that:
a. I would (eventually) like to "trial run" the open source project idea
b. I want to port the project to Java
c. I want to add several features (networking, AI)
2. The company I'm working for has a product that may benefit from being open source and I'm doing research on open source projects.
Post relevant code. (ie. all code that a message is supposed to run through when you press send, both client and server side)
Some common errors that I had when doing something similar when I ran into a similar error:
1. Event handling (however you are doing it) was not set up properly.
2. Didn't actually write to the socket.
3. Code for reading on the server side not set up properly.
4. Code on server side doesn't broadcast the message back to the clients.
5. Client side not reading the socket.
6. Client side reads socket but doesn't post to disply.
Hope this helps.
23 years ago
Has anyone had the chance to work on an open source software project? If so, what role did you play in it (ie. where you in charge of maintaining the main branch, releasing the software every-so-often, or just as a programmer) and what were your thoughts about it in general.
Also, do you think open source projects are commercially viable?
This piece of the code is used to call 100+ different methods (and this number will grow, consider it potentially infinite). Each of these methods do their own specific task and some are only superficially related. Currently, we store a Integer/String (method name) combo in a hash table. When the doMethod( Integer i ) is called, it takes the Integer, looks up the method name in the hash table and then uses reflection to call that function.
23 years ago
Here are several of the forces that are pushing us in the direction of refactoring out the reflection.
(not in order of importance)
* While debugging, the stack trace is practically useless. Methods that we call via reflection all have basically the same stack trace.
* Performance issues. (Please correct me if I'm wrong, but reflection is rather cumbersome when it comes to performance, no?)
* The piece using reflection is inellegant. Adding new methods to be called via our reflection methods is somewhat cumbersome.
23 years ago
If XP is concerned with writing only a little documentation, where do users get their documentation? (I'm imagining something along the lines of a project like JProbe, where there is alot of functionality but it's not immediately intuitive; MS Word can be like that too )
I've been looking at the XP stuff lately (haven't had a chance to use it however) and I have a question. In XP, a large piece of responsibility lies on the customer (writing Stories, Test, providing answers to Programmers, etc...). Now, what about when a project is not designed for a specific customer? (for example, MS Word) What about new technologies for which there are no customers as yet. How/Who fills the Customer role?
"The new XP stuff makes some strong cases for not using a crystal ball."
Could you expand on this, or point me to some information pertaining to this?

[This message has been edited by landon manning (edited January 22, 2001).]
23 years ago