How to implement edit time help like Eclipse, IntelliJ in Swing

Hi,
I am developing an DataBase query tool. In my application, there is a area for writing SQL command like select etc. I want to show the names of tables or fields when the user write a select keyword or give a dot(.) after giving a table name like Ecilpse shows the field names of particular class when we give the class name.

Hi,
You would need to add keyListener to the text component into which you are entering the query and listen for a particular keystroke. In your case it would just be a space character.
However I would you are going about this the wrong way. How do you plan to handle the fact that in a sql query the column names come first before the table names. I would suggest you have a wizard type gui where you first get the tables involves so you can fetch and display the column names.
Hope this helps.
cheers,
vidyut
http://www.bonanzasoft.com

Similar Messages

  • How to implement multiple Value Helps within the same Application ??

    Dear Experts,
    I want to implement multiple value helps in the same view.For that I have declared exporting parameters of type 'wdy_key_value_table.' within the component controller for each of the value helps.While I do activate and test the application I get the following error :
    The following error text was processed in the system HE6 : A row with the same key already exists.
    The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 4 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: IF_PO_VIEW1~VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: WDDOINIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
    Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
    I dont know how to implement multiple value helps.Need your help on this.
    Regards,
    Mamai.

    Hi
    Hint is : A row with the same key already exists it means , It is assigning the same value/Key to row and you are calling it at WDDOINIT  so it giving error at the time of initialization .
    Better way to do the coding at some event in view OR if not possible than just execute the first value help in wddoinit later clear all the value before gettig the other Value help. Code it at WdDoModify View to get its run time behaviour.
    BR
    Satish Kumar

  • How do i edit a picture like this

    Hey i was wondering how do i edit a picture like this? With the effect or whatever its called

    Image like that can be achieved many different ways there is no right or wrong no one way to do things in Photoshop.  There are also many third Add-Ons developed for Photoshop. Prices range from free to very expensive.  Several third party add on have been developed to process images and help produce image like your example.

  • How can i edit a picture like these?

    How can i edit a picture like these? (i mean the text) Please write me a program or a tutorial. Thanks!  http://wallpiph.com/wallpaper/2013-pain-gain-hd-wallpaper.html

    Image like that can be achieved many different ways there is no right or wrong no one way to do things in Photoshop.  There are also many third Add-Ons developed for Photoshop. Prices range from free to very expensive.  Several third party add on have been developed to process images and help produce image like your example.

  • How to implement the search help exit to MM01 for Material by product hiera

    Hi,
    How to implement the search help exit to MM01 T-code for Material by product hierarchy,
    but system default it gives the data from MVKE table, my client wants from MARA table,
    i created the one Function Module, write this code in that FM.
    IF CALLCONTROL-STEP EQ 'DISP'.
    REFRESH RECORD_TAB.
    SELECT * FROM MARA INTO TABLE RECORD_TAB
    WHERE PRDHA = 
    ENDIF.
    I Face the problem what variable i have to pass in WHERE CONDITION, FROM THE MM01 T-code.
    is't require to IMPORT variable from MM01 program, what is that import variable, please give me the solution.
    thanks to all.

    Hi there..
    check my web blog on search help exit...
    [Search help exit code|https://wiki.sdn.sap.com/wiki/x/du0]

  • How to Implement a Time Limit Feature in an Online Test Application ?

    I am creating an Online Test application. The time limit can be stored for a Test in the database.
    How to implement a time limit such that when the test is started (user clicks on the Start button to go to the fragment containing the Questions) the time left is shown and the test ends (goes to home page) when the timer reaches zero.
    Thanks

    Hi,
    timestamp is a date and thus cannot be used directly to determine seconds passed. So what you need to do is to build the difference between a saved time stamp and the current time.
    http://docs.oracle.com/javase/1.4.2/docs/api/java/sql/Timestamp.html
    So if you have two time stamps, then calling getTime() on each and building the difference gives you a value, which is millisecond. So to get this to an int value you divide it by 1000
    Frank

  • How to implement a back functionally like the back of the browser

    Hi, I have a commandImageLink("go back") in a template jspx. How to implement the back functionally like the back of the browser with a managed bean method??. For know I m not using task flows.

    I think you can use a javascript method to go back to the previous browser page.
    http://javascript.about.com/library/blback.htm
    http://www.pageresource.com/jscript/jhist.htm
    http://www.w3schools.com/jsref/met_his_back.asp
    Perhaps you find something useful and related to backing beans here:
    http://adfdevelopers.blogspot.com/2009/04/some-handy-code-for-backing-beans-adf.html
    NA
    http://nickaiva.blogspot.com

  • How to implement real-time refresh datas in obiee?

    How to implement real-time refresh datas in obiee?

    Can you elaborate more...
    If you want to see refreshed data in OBIEE Reports, you need to implement Caching mechanism based on how you often refresh warehouse..
    [http://download.oracle.com/docs/cd/E05553_01/books/admintool/admintool_QueryCaching6.html]

  • How to implement Edit Shared Settings (EDIT_DEFAULTS) mode in Struts jsr

    Could anybody tell me How to implement Edit Shared Settings (EDIT_DEFAULTS) mode in Struts JSr168 portlet?

    Could anybody tell me How to implement Edit Shared Settings (EDIT_DEFAULTS) mode in Struts JSr168 portlet?

  • How to implement the input help at web for the input ready query?

    Dear all,
    As you konw when we create the input ready query for Planning, we can insert the new record for plan with Analyzer tool. We also can use input help(double clike the space) for input the master data.
    I want to konw when I use Web Appliaction Designer to run the query at the web, How can I use the input help for planning data.
    My customer request me must implement the input help function at web.
    Thanks a lot
    best regards,
    Leon
    Message was edited by: Leon Wang
    Message was edited by: Leon Wang

    Hello,
    It seems Input Help is not possible with WEB.
    Check out the link below -
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/f234619e3c4c5de10000000a155369/frameset.htm<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/43/f234619e3c4c5de10000000a155369/frameset.htm">Input Help - with Web application designer</a>
    <b>Bex Analyzer -</b> You access input help for a cell by double clicking on it or choosing the F4 button.
    <b>Web Appln Designer</b> - Input help is not available
    Hope it Helps
    Chetan
    @CP..

  • How to implement 'Context Sensitive Help' for Workforce Performance Build Tool.

    Hi Gurus,
    We have a requirement to implement ‘Context Sensitive Help’ for Workforce Performance Build Tool. Please let me know how to go about implementing the "Context Sensitive Help".
    It will be great if you can share some links to the documents and screenshots.
    Thanks,
    Sanjiv Karmakar

    Hi Sanjiv,
    do you you mean expand the Help Menu => Pull Help or do you mean
    EPSS => push Help?
    in case pull help please tell me exactly which system GUI or EP and version you are using.
    many different scenarios are possible.
    Tom
    P.S. Please take care of  the name is Workforce Performance Builder or maybe in-official WPB.
    many people ask in the HCM area for help, this is the reason why we do not observe all discussion.
    The name in the title will help us to find your questions on time.

  • How to implement countdown timer in apex

    Hi all,
    I want to implement timer in my application.i am working on apex 4.0 version.I am developing online test application,so for this i want to display timer for test.
    can anyone suggest me how can i implement countdown timer in my application.
    thanks
    jitu

    Hi,
    You can refer "Martin Giffy D'Souza's" Enhanced APEX Session Timeouts example
    http://www.talkapex.com/2009/09/enhanced-apex-session-timeouts.html
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • How to implement this need help

    I created a datacontrol for a named query which (using Ejb entity beans) which accepted a employee id and click on find show me the respected employee details in a table.
    case 1: In one single page
    when i added the form consisting of a single text box , button and the table to show the result of the find method in one single page it worked out perfectly,,,
    case 2 : using 2 different pages
    But then i tried adding only the form in one page named page1 and and the table to show the result in another page i.e page2 , Also in the command action of find button of page1 i asked it to redirect to page 2 and show result . But it never showed me any results..
    Question :
    1) How to implement case2 i.e to have a form on one page and the resultant table to be show on another page i.e When users sees first page he adds the employee id in text box and clicks find .The user then needs to be redirected to page2 and the result of search should be shown in table...
    Can anyone guide me over this... ???

    Hi,
    you use a method on the EJB that takes a argument (e.g. the employee ID). You then put the method result set on page 2 (the method argument shall be pointed to a request or session attribute using EL : #{sessionScope.EmployeeId}
    On the search page - when the user hits the search button - you set the attribute "EmployeeId" in the session before navigating to the next page
    Frank

  • How to implement a time watch for an object

    Greetings!
    I have a container called TupleSpace which consists of elements of type Tuple. Among the attributes, the Tuple also has a "time to live" (the maximum amount of time its presence is allowed on the TupleSpace). After this amount of time passes it should be automatically deleted from the TupleSpace. My question is: what is the best mechanism to implement this ?
    My solution so far looks like this:
    public void removeExpiredTuple(){
    // ts = instance of TupleSpace class
              for (int i = 0; i < ts.size(); i++){
                   ITuple currentTuple = (ITuple) ts.elementAt(i);
                   long tupleAge = System.currentTimeMillis() - currentTuple.getTimeSubmitted();
    // currentTuple.getTtl() = retrieves the Tuple's "time to live"
                   if (tupleAge > currentTuple.getTtl())
                        ts.remove(i);
         }but I am not at all satisfied with it
    Thanks in advance for your answers
    Edited by: OctavianS on Jan 18, 2008 12:10 PM

    ok, I'll give it a try and come back with a reply
    LE: problem solved. thx again
    Edited by: OctavianS on Jan 22, 2008 3:56 PM

  • How to Implement simple Timer in this code

    Hi there guys,
    This is a small ftp client that i wrote. It has encryption and all bulit into it. I want to initiate the sendfile function every 5 minutes.
    The program starts with the displaymenu function wherein a menu with various options is displayed.
    How Do i Do that? I went online and tried doing it myself but cud not possibly think of a reason as to why my changes were not working.
    Here is the basic code. I earnestly hope that some of you guys out there will help me. This is a very simple problem and sometimes it is the finer point that eludes us. any help will be deeply appreciated
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import javax.crypto.*;
    import java.util.regex.*;
    import javax.crypto.spec.PBEKeySpec;
    import javax.crypto.spec.PBEParameterSpec;
    import java.security.spec.AlgorithmParameterSpec;
    import java.security.spec.KeySpec;
    class FTPClient
         public static void main(String args[]) throws Exception
              Socket soc=new Socket("127.0.0.1",5217);
              transferfileClient t=new transferfileClient(soc);
              t.displayMenu();          
    class transferfileClient
         Socket ClientSoc;
         DataInputStream din;
         DataOutputStream dout;
         BufferedReader br;
         transferfileClient(Socket soc)
              try
                   ClientSoc=soc;
                   din=new DataInputStream(ClientSoc.getInputStream());
                   dout=new DataOutputStream(ClientSoc.getOutputStream());
                   br=new BufferedReader(new InputStreamReader(System.in));
              catch(Exception ex)
         //encrypto routine starts
    class DesEncrypter {
           Cipher ecipher;
            Cipher dcipher;   
            // 8-byte Salt
            byte[] salt = {
                (byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
                (byte)0x56, (byte)0x35, (byte)0xE3, (byte)0x03
            // Iteration count
            int iterationCount = 19;   
            DesEncrypter(String passPhrase) {
                try {
                             // Create the key
                             KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
                             SecretKey key = SecretKeyFactory.getInstance(
                             "PBEWithMD5AndDES").generateSecret(keySpec);
                             ecipher = Cipher.getInstance(key.getAlgorithm());
                             dcipher = Cipher.getInstance(key.getAlgorithm());   
                             // Prepare the parameter to the ciphers
                             AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);   
                             // Create the ciphers
                             ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec);
                             dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);
                } catch (java.security.InvalidAlgorithmParameterException e) {
                } catch (java.security.spec.InvalidKeySpecException e) {
                } catch (javax.crypto.NoSuchPaddingException e) {
                } catch (java.security.NoSuchAlgorithmException e) {
                } catch (java.security.InvalidKeyException e) {
            // Buffer used to transport the bytes from one stream to another
            byte[] buf = new byte[1024];   
            public void encrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes written to out will be encrypted
                    out = new CipherOutputStream(out, ecipher);   
                    // Read in the cleartext bytes and write to out to encrypt
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                    out.close();
                } catch (java.io.IOException e) {
            public void decrypt(InputStream in, OutputStream out) {
                try {
                    // Bytes read from in will be decrypted
                    in = new CipherInputStream(in, dcipher);   
                    // Read in the decrypted bytes and write the cleartext to out
                    int numRead = 0;
                    while ((numRead = in.read(buf)) >= 0) {
                        out.write(buf, 0, numRead);
                    out.close();
                } catch (java.io.IOException e) {
    }     //encryptor routine ends          
         void SendFile() throws Exception
                             String directoryName;  // Directory name entered by the user.
                             File directory;        // File object referring to the directory.
                             String[] files;        // Array of file names in the directory.        
                             //TextIO.put("Enter a directory name: ");
                             //directoryName = TextIO.getln().trim();
                             directory = new File ( "E:\\FTP-encrypted\\FTPClient" ) ;           
                        if (directory.isDirectory() == false) {
                        if (directory.exists() == false)
                        System.out.println("There is no such directory!");
                        else
                        System.out.println("That file is not a directory.");
                else {
                    files = directory.list();
                    System.out.println("Files in directory \"" + directory + "\":");
                    for (int i = 0; i < files.length; i++)
                             String patternStr = "xml";
                             Pattern pattern = Pattern.compile(patternStr);
                             Matcher matcher = pattern.matcher(files);
                             boolean matchFound = matcher.find();
                                       if (matchFound) {
                                       dout.writeUTF("SEND");
                                       System.out.println(" " + files[i]);                                        
                                       String filename;
                                       filename=files[i];
                                       File f=new File(filename);
                                       dout.writeUTF(filename);
              String msgFromServer=din.readUTF();
              if(msgFromServer.compareTo("File Already Exists")==0)
                   String Option;
                   System.out.println("File Already Exists. Want to OverWrite (Y/N) ?");
                   Option=br.readLine();               
                   if(Option=="Y")     
                        dout.writeUTF("Y");
                   else
                        dout.writeUTF("N");
                        return;
              System.out.println("Sending File ...");
                   // Generate a temporary key. In practice, you would save this key.
                   // See also e464 Encrypting with DES Using a Pass Phrase.
                   System.out.println("Secret key generated ...");
                   // Create encrypter/decrypter class
                   DesEncrypter encrypter = new DesEncrypter("My Pass Phrase!");
                   // Encrypt
                   FileInputStream fino=new FileInputStream(f);
                   System.out.println("Initialised ...");
                   encrypter.encrypt(fino,
                   new FileOutputStream("ciphertext.txt"));
                   System.out.println("generated ...");
                   fino.close();
                   FileInputStream fin=new FileInputStream("ciphertext.txt");
              int ch;
              do
                   ch=fin.read();
                   dout.writeUTF(String.valueOf(ch));
              while(ch!=-1);
              fin.close();          
              boolean success = (new File("ciphertext.txt")).delete();
                   if (success) {
                                  System.out.println("temp file deleted .../n/n");
              for (int j = 0; j < 999999999; j++){}
    }//pattermatch loop ends here
    else
                             { System.out.println("   " + "Not an XML file-------->" +files[i]); }
              }// for loop ends here for files in directory
                   }//else loop ends for directory files listing
         System.out.println(din.readUTF());                    
         }//sendfile ends here
         void ReceiveFile() throws Exception
              String fileName;
              System.out.print("Enter File Name :");
              fileName=br.readLine();
              dout.writeUTF(fileName);
              String msgFromServer=din.readUTF();
              if(msgFromServer.compareTo("File Not Found")==0)
                   System.out.println("File not found on Server ...");
                   return;
              else if(msgFromServer.compareTo("READY")==0)
                   System.out.println("Receiving File ...");
                   File f=new File(fileName);
                   if(f.exists())
                        String Option;
                        System.out.println("File Already Exists. Want to OverWrite (Y/N) ?");
                        Option=br.readLine();               
                        if(Option=="N")     
                             dout.flush();
                             return;     
                   FileOutputStream fout=new FileOutputStream(f);
                   int ch;
                   String temp;
                   do
                        temp=din.readUTF();
                        ch=Integer.parseInt(temp);
                        if(ch!=-1)
                             fout.write(ch);                         
                   }while(ch!=-1);
                   fout.close();
                   System.out.println(din.readUTF());
         public void displayMenu() throws Exception
              while(true)
                   System.out.println("[ MENU ]");
                   System.out.println("1. Send File");
                   System.out.println("2. Receive File");
                   System.out.println("3. Exit");
                   System.out.print("\nEnter Choice :");
                   int choice;
                   choice=Integer.parseInt(br.readLine());
                   if(choice==1)
                        SendFile();
                   else if(choice==2)
                        dout.writeUTF("GET");
                        ReceiveFile();
                   else
                        dout.writeUTF("DISCONNECT");
                        System.exit(1);

    here is a simple demo of a Timer usage.
    public class Scheduler{
        private Timer timer = null;
        private FTPClient client = null;
        public static void main(String args[]){
            new Scheduler(5000); 
        public Scheduler(int seconds) {
            client = new FTPClient();
            timer = new Timer();
            timer.schedule(new fileTransferTask(), seconds*1000);
            timer.scheduleAtFixedRate(new FileTransferTask(client), seconds, seconds);  
    public class FileTransferTask extends TimerTask{
        private FTPClient client = null;
        public FileTransferTask(FTPClient client){
            this.client = client;
        public void run(){
            client.sendFile();
    public class FTPClient{
        public void sendFile(){
             // code to send the file by FTP
    }the timer will will schedule the "task": scheduleAtFixRate( TimerTask, long delay, long interval)
    It basically spawn a thread (this thread is the class that you
    implements TimerTask..which in this example is the FileTransferTask)
    The thread will then sleep until the time specified and once it wake..it
    will execute the code in the the run() method. This is why you want to
    pass a reference of any class that this TimerTask will use (that's why
    we pass the FTPClient reference..so we can invoke the object's
    sendFile method).

Maybe you are looking for

  • Can you still buy Robohelp 8?

    I am currently using RH8 and won't have time to upgrade all of my projects to RH9 until after we complete our spring s/w release at the end of May. In the meantime, we just hired a new writer and I need to purchase a new copy of Robohelp. I wanted to

  • How to add Icon in Tree View in Forms 6.0 (URGENT..!)

    Hello All, I want to add icons in tree view (hierarchical tree) by using forms 6.0. So pls. help me to find out the solution for the same. thanks Pradeep null

  • Keeping data on phone

    When I sync with my Sony W850i all the calender information is deleted prior to one month ago (or whatever period is selected). Is there any way that I can perform a sync that does not delete old data? I want the two calenders to look at each other,

  • Has anyone else noticed how slow iTunes has been to browse music previews?

    This has been going on for a handfull of days so far. Kind of reminds me of the after Christmas rush of 06. Does anyone think that this has anything to do with the iPhone factor and an overload of new customers for the servers to deal with? I would l

  • Adobe Word Help

    When in Word and I click Insert->Object->Adobe Document, if the pdf is more than one page, Word only dispalys the first page. When I double click on that page, I get the rest of my pdf in a reader window. Does anyone know if there is a way to insert