Code Completion on library class

I appologize if I have posted this to the wrong forum, I am very new to Java and don't usually post to forums.
I have created class and then added it to the Libraries in a second project from within NetBeans. When I call the method, it doesn't complete the code. Is there any way to do this? I have tried creating a JavaDoc and then I went to Tools|Java Platform Manager| Javadoc tab and added the folder of the javadoc, and it still doesn't do anything.
Code
//library class
public class arrArray {
public static Object addToArray(Object objOldArray) {
Class objElementType = objOldArray.getClass().getComponentType();
int intNewLength = (java.lang.reflect.Array.getLength(objOldArray) + 1);
Object objNewArray = java.lang.reflect.Array.newInstance(objElementType, intNewLength);
System.arraycopy(objOldArray, 0, objNewArray, 0, intNewLength);
return objNewArray;
//Project class trying to reference
import arrArray.*;
private void GetDatabases(JComboBox objCombo, JTextField objTextTnsFile) {
Object objConnect = new DBConnectionInfo[0];
File objTnsFile = new File(objTextTnsFile.getText());
String strFile = "";
String strLine = "";
BufferedReader inputStream = null;
try {
inputStream = new BufferedReader(new FileReader(objTnsFile));
while ((strLine = inputStream.readLine()) != null){
strFile = strFile + strLine;
objConnect = arrArray.addToArray(objConnect);
} catch (java.io.FileNotFoundException ex) {
JOptionPane.showInternalMessageDialog(this,"File " + objTnsFile.getPath() + " not found.","File Not Found", JOptionPane.ERROR_MESSAGE);
} catch (java.io.IOException ex1) {
JOptionPane.showInternalMessageDialog(this,"Could not read file: " + objTnsFile.getPath(),"File Read Error", JOptionPane.ERROR_MESSAGE);
}

I appologize if I have posted this to the wrong forum, I am very new to Java and don't usually post to forums.
I have created class and then added it to the Libraries in a second project from within NetBeans. When I call the method, it doesn't complete the code. Is there any way to do this? I have tried creating a JavaDoc and then I went to Tools|Java Platform Manager| Javadoc tab and added the folder of the javadoc, and it still doesn't do anything.
Code
//library class
public class arrArray {
public static Object addToArray(Object objOldArray) {
Class objElementType = objOldArray.getClass().getComponentType();
int intNewLength = (java.lang.reflect.Array.getLength(objOldArray) + 1);
Object objNewArray = java.lang.reflect.Array.newInstance(objElementType, intNewLength);
System.arraycopy(objOldArray, 0, objNewArray, 0, intNewLength);
return objNewArray;
//Project class trying to reference
import arrArray.*;
private void GetDatabases(JComboBox objCombo, JTextField objTextTnsFile) {
Object objConnect = new DBConnectionInfo[0];
File objTnsFile = new File(objTextTnsFile.getText());
String strFile = "";
String strLine = "";
BufferedReader inputStream = null;
try {
inputStream = new BufferedReader(new FileReader(objTnsFile));
while ((strLine = inputStream.readLine()) != null){
strFile = strFile + strLine;
objConnect = arrArray.addToArray(objConnect);
} catch (java.io.FileNotFoundException ex) {
JOptionPane.showInternalMessageDialog(this,"File " + objTnsFile.getPath() + " not found.","File Not Found", JOptionPane.ERROR_MESSAGE);
} catch (java.io.IOException ex1) {
JOptionPane.showInternalMessageDialog(this,"Could not read file: " + objTnsFile.getPath(),"File Read Error", JOptionPane.ERROR_MESSAGE);
}

Similar Messages

  • Java Library classes source code

    Hi all,
    Does anyone know where I could find source codes for java library classes. The ones that i am especially interested in finding are the inputStream, inputStreamReader, and BuferedReader classes.
    Thanks and regards,
    Green

    Does anyone know where I could find source codes for
    java library classes. The ones that i am especially
    interested in finding are the inputStream,
    inputStreamReader, and BuferedReader classes.http://java.sun.com/j2se/downloads/index.html

  • Flash Builder flash pro project doesnt show code hintings for library assets exported for AS ?

    Flash Builder flash pro project doesnt show code hintings for library classes exported for AS ? So is there any way I can fix this ? Only way I could think of is export a swc from the fla... is there a more convenient way to do this ?

    anyone ?

  • Missing BitmapData class in code completion - Flex(FP10)

    I’ve setup my Flex Builder for Flex 3.3 SDK and Flash Player 10 as described in this article. I noticed that BitmapData class doesn’t show anymore. Is this a bug?
    I took a snapshot of my flex builder code completion.
    Any thoughts on this?
    Thanks for your help.
    Mariush T.

    Thanks Michael, it works now.
    For anybody who has the same problem:
    1. Download Flex SDK zip file.
    2. Uninstall current Flash Player.
    3. Install Flash Player from /runtimes/player/10/win/
    Mariush T.

  • ERROR [code=1] Running adjopy.class

    Hi DBA's
    When i am applying patch 5903765 i got the following error.
    i checked the write permission and owner permission, it seems everyting is fine and I run manually following script, i got the same error.
    adjava -mx512m -nojit oracle.apps.ad.jri.adjcopy @/s03/CLONE/clnappl/admin/CLN/out/apps.cmd
    Kindly help me to resolve the issue.
    =============ERROR=============================
    About to Write undo archive : Mon Mar 16 2009 14:22:33
    Writing undo archive /s03/CLONE/kiranpatches/5903765/backup/CLN/aqherptestdb/java
    ERROR: I/O or zip error while attempting to read entry meta-inf/jdev-ext.xml in zip file /s03/CLONE/clncomn/java
    Error(s) have occurred; exiting with status 1
    AD Run Java Command is complete.
    Copyright (c) 2002 Oracle Corporation
    Redwood Shores, California, USA
    AD Java
    Version 11.5.0
    NOTE: You may not use this utility for custom development
    unless you have written permission from Oracle Corporation.
    AutoPatch error:
    ERROR [code=1] Running adjopy.class
    AutoPatch error:
    Error updating master archive
    Best Regards,
    SG

    SG,
    Please review the following note:
    Note: 376096.1 - I/O or ZIP Error While Attempting To Read Entry meta-inf/jdev-ext.xml
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=376096.1
    Regards,
    Hussein

  • Code completion particular not working

    Hello,
    in my program there are serveral internal classes. Each class has its own include file. Code completion seems not working for internal classes in other include files.
    example:
    lcl_class1 in includec01   (first included)
         class-methods static1_1
         methods method1_1
    lcl_class2 in includec02   (second included)
         class-methods static1_1
         methods method1_1
    problem:
    While development in lcl_class2 there are no code completion for lcl_class1.
    No code completation for lcl_class1=>static1_1
    but if you declarate "data lo_myclass type ref to lcl_class1." code completion is working fine for public member methods and attributes in the same file.
    In Functiongroups all working fine.
    Best Regards
    Markus Bauernschmitt
    Und da hier eh die meisten deutschsprachig sind und mein Englisch grausam ist, nachfolgend die Erklärung nochmal auf deutsch.... ;-)
    In meinen Programmen findet die Codevervollständigung keine interne Klassen aus vorangegangenen include Dateien. Dadurch werden weder die Klassen selbst noch die statischen Methoden angezeigt. Gebe ich eine statische Methode ein und möchte die Hilfe anzeigen (F2) erscheint die Fehlermeldung "Codeinformationen sind nicht verfügbar".
    Dieses Problem tritt nicht auf, falls die Deklaration einer Variablen in der gleichen Include Datei erfolgt.
    Deklaration einer Variablen in der aktuellen Include Datei -> Dokumentation der öffentlichen (nicht statische) Methoden und Attribute funktioniert
    Zugriff auf öffentliche (statische oder nicht statische) Methoden und Attribute von globalen Variablen (deklariert in einer anderen Datei) funktioniert dagegen nicht.
    Es sind nur anscheinend nur Programme betroffen. Bei Funktionsgruppen (getestet am Beispiel "ldemo_cr_car_rental_screen") trat der Fehler nicht auf.

    Hi Dominik,
    thank you for your answer. The internal classes are already simple and lightweight. In my understanding of OO I keep classes private as possible and so I create this specific "one program helper classes" in the smallest reasonable scope.
    However, this is a architektur decission. But the pivotal question is: Why working this kind of code completion in function groups but not in programs.
    Some additional information.
    - Code completion working in "START-OF-SELECTION."
    - In Functiongroup includes (Testcase lcl_class1 show as public type and lcl_class2 show as local public class.
    Best regards
    Markus

  • Kdevelop and code completion

    hi all, i'm trying to resolve a trouble... i use kdevelop for write c++ code and i cannot use code completion... in kdevelop faq there's wrote that i can activate code completion in the projects options' section named "Specific c++", i ativate it but i cannot use always the code completion. i've read that i must disable the abbreviation part, and i disable it, (in plugin settings) and i try to add the persistent class store on my projects dir, but i cannot use code completion. so, what can i do? anyone can help me?
    thanks

    i'm sorry, now i can use code completion, i must activate the c++ parser.
    thanks

  • Flash builder 4.5 code completion doesn't show public function

    Hi,
    I am migrating from flex3 to flash builder 4.5 and it shows a question mark at one of my lines.
    No errors, and the code works fine when i run it.. only there is no code completion in flash builder.
    My code:
    //i use a custom component like this:
    <generalmenu:menu x="59" y="58" id="mymenu"/>
    //this component loads its functions from a separate as(no class just simple as code) file (so i don't have all code in the file with visual components)
    <fx:Script source="menusource.as"/>
    //inside menusource.as there is a function that takes care of closing my app.
    public function closeprogram():void
         //closing window goes here
    my problem..
    when i type inside my function at application level:
    mymenu.closeprogram();
    i get a question mark in front of it: Call to a possibly undefined method closeprogram
    code completion doesn't recognize my public functions inside the mymenu component, it does see mymenu but when i hit .(dot) it doesn't give me a list of functions.
    How can i get code completion to work? Are there changes in the way you call as files in flash builder 4.5? Please some help.. code completion makes life much better.

    I found why the nasty behavior above was happening ::- D.
    I usually design my classes in Enterprise Architect. Since this is a rather large project, started from of about 30 classes, I did the entire architecture in EA, then, generated the code.
    But, EA has poor AS3 support. And as a consequence, it has a few issues, such as the way it generates CONSTRUCTORS:
    public function G3Widget (name: String, parent: IG3Parent = null): void
    Spot the mistake ::- D.

  • Missing flash.utils.* in code complete upgrade from 3.3 to 3.5 framework

    Hi All,
    I upgraded my 3.3 framework to 3.5 today, and for some strange and inexplicable reason, I've lost all code completion in Flex Builder 3 for flash.utils.* classes. I am thus missing Dictionary Timer and a few other important classes.
    I'm hoping that someone out there might have come across this before, or be able to give me a bit of a clue as to how to fix this issue. This is a tooling problem with Flex Builder rather than the code itself, so anyone with any insight, I would really greatly appreciate the help.
    Bayani

    Hi Sudheer,
    Its a Unicode problem.. Check this..
    unicode problem: the data object cannot be converted to character type
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Intellisense and code completion

    Hi all,
    this is maybe not WDA question, but I think all WDA developers have to deal with this problem and I want to know your opinions. The problem is something like intellisense and code completion in abap editor. I'm coming from .NET and Visual Studio world, where this features are implemented and they are very very useful.
    Now when I'm programming something in SE80 I type some_class_instance-> and I want to from editor to show me all methods with description, then I choose some method and editor fill in all method parameters. Now I have to memorize methods and parameters or search for them, which cost a lot of time.
    Example: http://www.fileguru.com/images/b/editor_net_development_microsoft_net-8526.gif
    Best regards Jiri

    Hi
    Check this video
    http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/90db53c4-812d-2c10-0789-dc18f6c9c725&overridelayout=true
    Regards
    Manas Dua

  • LCCS rtc Code Completion

    Hi,
    I have downloaded version 1.2.5 of the LCCS SDK. I am using Flash Builder 4 (4.1 SDK) and attempting to create a spark LCCS application.
    I have copied script into the project and can get the tutorial web app to run okay. However I am not getting code generation when I type rtc specific components.
    I have added the Flash Player 10 swc and source in the project library.
    I am using the new xmlns:rtc="http://ns.adobe.com/rtc".
    I am missing something obvious, but can't see it.
    Anyone got any ideas why code completion is not working?
    Thanks,
    Niall

    Thanks Hironmay,
    Code hinting works fine for all Flex components (Halo and Spark). So starting off with any of the following worked before loading the LCCS swc and continue to work after loading the LCCS swc:
    <fx:
    <s:
    <vg(roup)
    <lab(el)
    In addition code hinting continues to work fine for other swc libraries that I use: Flexicious, AlivePDF, Yahoo Astra, etc.
    So, hinting is working for all other components, just not LCCS components. The following do not give hinting:
    <rtc
    <conn(ectSessionContainer)
    <aut(henticator)
    I don't think it is a FB4 issue, but I will post to the forum in case anyone has a similar issue.
    Thanks,
    Niall

  • Code completion

    Hello,
    Since upgrading to java 1.4 where JCE has been included in the SDK I'm missing codecompletion in for the JCE classes. The sunjce.jar is in my classpath, and my java files compiles just fine. The compiler also finds javax.crypto.*
    What am I missing to get the code completion work. I'm using JCreator 3.10
    Code completion works in any other case. It is only JCE classes that is making the problem.

    If I choose properties for my project I see the path to the sunjce.jar Shouldn't that be it.

  • Code completion user commands helplink

    Hello
    I am currently working on code completion for user commands in version 2012.  I have an XML file in which I have the descriptions for all the hover text and associated help links.  Everything is working correctly except for the help links.  They seem to be always looking to go to the diadem.chm help file.  I was wondering if there was any way to redirect where they point or am I missing something?  Thanks. 
    Ben

    Hi Carmen
    Actually I'm really not using an external program per se.  I guess I need to clarify what I am doing better.  Sorry about that.    
    Look at the help file for ScriptCmdRegister here for an example.  A shorter version without an example is spelled out below if you wish.  
    I am creating a VBS user command script containing classes of objects that I add using scriptcmdadd.  I am then registering the TLB file using scriptcmdregister resulting from compiling an ODL file.  After compilation, the ODL file is no longer needed.  I have a third/fourth file to go along with these which is an XML file that I got from a coworker.  The XML file contains the descriptions, helplinks, and datatypes that appear when code completion comes up, just as there is in DIAdem when you type View.ActiveSheet.etc.  
    However, you notice in DIAdem that there is a help link, which is what I cannot get working because when I insert anything into the xml file where the help link would go, it throws an error because it is trying to point to the DIAdem.chm help file no matter what.  This is what I wish to redirect so it can go to my own chm/html help file, if it is possible or supported that is.  Thanks
    Ben

  • Where are C++ Standard Library Classes for Unicode RFC SDK?

    I have the Unicode RFC SDK and there is a document (sapucdoc.htm) that explains that the C++ standard library classes have SAP_ equivalents. For example:
        string --> SAP_string
    It then says that header files for these classes are named SAP<standard lib name>.hpp. So for the string class:
        string.h --> SAPstring.hpp
    The rfcsdk/include directory does not contain any of the header files.  Where can I find these header files and possibly libraries I need to use the standard C++ libraries with this version of the RFC SDK?
    Thanks.

    Those icons are not accessible directly.
    Try setting the appropriate button type, like following code uses "info light" type to show the "i" icon.
    {cod}
    UIButton *aboutButton=[UIButton buttonWithType: UIButtonTypeInfoLight];
    {code}

  • CND problem with code-completion

    Hi,
    First of all I don't really know where to put this post about C++ Pack in NetBeans. I've read one post in which someone suggests that this section will be pretty close...
    Maybe someone here would be so kind and try to help me...
    I'm using Ubuntu 7.04 and I have a problem with code completion in NetBeans 5.5.1 CND and I'm a little bit frustrated right now....
    I installed Netbeans, then CND, Created new C++ Project. Added new source file, with #include <GL/glut.h> directive.
    Whole code was compiled without errors, and that's fine.
    There were some problems with linking but I've added "glut", "GL", "GLU" string to linker parameters in Project Properties.
    The main problem is the code assistant. When I'm hitting "glut" and press ctrl+space it shows functions from glut library but when I type "gl" (to type "glColor3ub...") and try to show the code completion pop-up it shows "No suggestions". The same thing is with GLU library.
    I've installed GL, GLU, glut libraries (they all sit calmly in /usr/include/GL).
    I've added the /usr/include and /usr/include/GL to C++ section.
    I think that the Netbeans is able to find those *.h files because, as I said before, the glut (and the glX) functions are shown properly but there is no sign of "gl" and "glu" FUNCTIONS in code completion (the #define values specified in gl.h and glu.h are on the list, but the functions aren't)...
    I don't have idea why glut and glX are working fine, and gl and glu aren't... If anyone have similar problem, know where to look for an answer or have some suggestions I would be much obliged...
    I've seen Eclipse CDT, Anjuta, kDevelop, Code::Blocks, VIM + icomplete... after checking them all there is only one decision - I want to use NetBeans CND. It's user-friendly, fast and I just like it. That's why I would really like to know why the code-completion isn't working in 100%...

    Vladimir,
    The glColor3ub function declaration is in gl.h file (which along with glu.h is included in glut.h).
    Thanks Maxim,
    In the matter of fact since yesterday I've been looking for the reason why the GL and GLU aren't indexed properly by the Netbeans CC and I've found something.
    The GLU library was indexed after deleting
    #include <GL/gl.h>directive. So it means that the gl.h library is messing up.
    I've checked whole file (gl.h) and noticed that the only part which is in conflict with NetBeans is this one:
    #elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
    #  define GLAPI __attribute__((visibility("default")))
    #  define GLAPIENTRYI'm using GCC 4.1 so the expression value is 401, so the GLAPI define looks like the line above.
    gl.h is indexed properly by NetBeans when it is representing "extern", so it should look like
    #  define GLAPI externIt is working fine if you delete this part of gl.h or for example (which I've done) add predefined macro (or change the existing one)
    __GNUC_MINOR__=-200I know that it isn't very clean solution... I'm not happy with cheating NetBeans about the version of installed GCC but unfortunately I am not a specialist in GNU C so maybe someone would find more elegant solution.
    As far as I know the __attribute__ feature makes the GCC more verbose (warnings, errors) but I don't know how much functionality am I loosing in fact...
    Edit: Why the code tags aren't working? :/
    Message was edited by:
    Makula

Maybe you are looking for

  • Problems setting up an NFS server

    Hi everybody, I just completed my first arch install. :-) I have a desktop and a laptop, and I installed Arch on the desktop (the laptop runs Ubuntu 9.10). I had a few difficulties here and there, but I now have the system up and running, and I'm ver

  • ITunes Update for Windows Vista 64 bit

    Does anybody know when this is going to be released. I got an iPhone and can't sync it with the latest version of Windows Vista. The friendly staff at AT&T forgot to tell me that I would not be able to use my iPhone until iTunes came out with an upda

  • Oracle automatic statistics optimizer job is not running after full import

    Hi All, I did a full import in our QA database, import was successful, however GATHER_STATS_JOB is not running after sep 18 2010 though its enable and scheduled, i did query last_analyzed table to check and its confirmed that it didnt ran after sep18

  • How do I remove programs or add-ons?

    I use Firefox as a secondary browser. I installed "Bring me Sports" by Mindspark Interactive and I want to remove it. I installed it through Firefox and it is not showing up in my start menu. I use Windows Vista and my primary browser is Internet Exp

  • ITunes could not back up...unknown error  (-20)

    Things were working just peachy until July 30th when the last successful back up happened. Now everytime I try to sync with iTunes I get that error message. I've deleted iTunes and every apple app/software on my PC; cleared the registry files, reboot