Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average
Thread Closed 


[Doubt]Working With Threads : MultiProcess Java Application filter_list
Author
Message
[Doubt]Working With Threads : MultiProcess Java Application #1
Hello [username],

I am making a simple IDE for programming and text editing works. I have problems understanding how to automate various tasks in background. In am using a JTextPane for writing purposes for a reason that they are able to embed JComponents, I intend to make an intellisence feature or auto suggesting of class and methods as we type. Its very easy to get all the names of classes and methods and details, I simply have to use the reflection API for that and we have methods that does the job. To make the intellisence I will simple get the methods and will use an iterator to add them to the JList. Now when typing the name of any class it will show the methods. Note that this will work for Java only and for other languages I haven't still figured out what to do.

Since there will be a lot of processes going on I have to use threads to make it happen. There are various process running in any IDE like :- error checking, line counter, key listener, intellisence, spell checker and various other things. Threads are important. But I came to know that Multithreaded Swing Applications are not efficient and doesn't work well. So, If anyone can provide me some examples of Multithreaded applications or simply to say that I want some code that does some work like these, even a simple example can work its charm.

I have read this already :- http://docs.oracle.com/javase/tutorial/e...index.html and have understood the concepts before the Executor begins, http://docs.oracle.com/javase/tutorial/e...utors.html I haven't yet been quite able to grasp this concept.

I will provide a bit more details ;-

1. I have to make a syntax highlighting feature as well which hasn't yet been implemented. I hope using Caret Listener, and document listener It can be made, So this will be working in the background as well.

2. Suppose I am writing any thing and if it is a keyword or method then there will be an auto appended suggesting feature. (This is easy).

3. I intend to implement various algorithms working in the background like sorting, pattern matching, mathematical analysis,DFA and regex etc. Now I wanna make it work as @Deque had made a game PipCo Stategy if I remember where you need to implement the algorithms to complete the game. I will do the same as I said her. I want to design it such that you implement the algorithms and new features are added and you don't need to explicitly write the code according to the GUI.

Here's a simple snapshot :-

Note the empty sides you see on right and left side are panels where we can add new components or tools. the "+" image that you see is for expanding and collapsing the panel. I know the theme is like HC I hope @bluedog.tar.gz doesn't warns me for that. This IDE isn't complete as I have just got started. I have used BorderLayout for simplicity.

[Image: stupIDE_zps1ec3075c.png]


I need some code examples of multiprocess applications that use threads d do the job. Also, I need to ask that Can the above requirements be fulfilled using SwingWorker. On the web I didn't find good examples.


Thank you for time reading it patiently.


Sincerely,
Psycho_Coder.
[Image: OilyCostlyEwe.gif]








Users browsing this thread: 1 Guest(s)