Hi sara, I had a quick look at your program. I seem to be missing one of your ECLiPSe files. :-include (contrattoValidoEdEfficace). If you can send this it will help me figure out what is going on. Thanks, josh singer Developer, Parc Technologies Limited josh.singer@parc-technologies.com http://www.parc-technologies.com <http://www.parc-technologies.com/> This e-mail message is for the sole use of the intended recipient(s) -its contents are the property of Parc Technologies Limited (or its licensors) and are confidential. Please do not copy, review, use (except for the intended purposes), disclose or distribute the e-mail or its contents (or allow anyone else to do so) without our prior permission. Parc Technologies Limited does not guarantee that this e-mail has not been intercepted and amended nor that it is virus-free. You should carry out your own virus checks before opening any attachment. Any opinions expressed in this e-mail message are those of the author and not necessarily Parc Technologies Limited. -----Original Message----- From: Sara Bernardini [mailto:sarabern@tiscalinet.it] Sent: Monday, December 10, 2001 12:10 AM To: josh singer Subject: Java-Eclipse interface Dear Josh, I am using Java-Eclipse interface but I have a problem. Trying to be as clear as possible, the problem is the following. First, I have a java program that shows a frame with a button "Start", a JTextArea that is editable, a JTextField also editable and a button"Enter". Then, I have an Eclipse program that can make its elaboration solely by putting questions to the user and by receiving relative answers. I would like getting the above-mentioned questions be displayed in the java-frame as well as getting the user be able to answer in the java-frame itself. In more accurate words, at a first stage - after the user has pressed the "start" button - I would like getting the question (coming from Eclipse) be displayed in the JTextArea. At the second stage I would like the user be able to aswer the question by writing his answer in the JTextField. Finally I would like the answer come back to Eclipse when the user presses the "Enter" button. This question-answer exchange between Java and Eclipse should - sigh! - be reiterated more and more times. I have tryed to perform this by putting the instructions for the creation of two queues ("java_to_eclipse" and "eclipse_to_java") in the actionPerformed method of the Start button, and by adding 1) a TermProducer as listener to the java_to_eclipse queue and 2)a TermConsumer as listener to the eclipse_to_java queue. Afterwards, again within the actionPerformed method of the Start button, I call the rpc method in order to send the goal to Eclipse. I have put two instructions within the dataAvailable method of the TermConsumer class : the reading from the Eclipse_to_java queue and the setting of the JTextArea. I have put the following instructions within the dataRequest method of the TermProducer class : the picking up of the text written in the JTextField and the writting of this string in the java_to_eclipse queue. The communication from eclipse to Java works well and in fact the question sent by Eclipse appears in the JTextArea . Conversely the communication from Java to Eclipse does not work since I do not succeed in synchronizing Eclipse reading on the queue with the user writing on the JTextField. Eclipse, indeed, does read from the queue before the user has time to write anything and this provoke problems (unexpected token error). Although my problem is quite complex I kindly request you to help me solve it. Should you decide to have a look at them, I enclose the relevant files. Thanks a lot. Sara BernardiniReceived on Mon Dec 10 10:19:02 2001
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:12 PM GMT GMT