Is there a way to make NetBeans hide specific files/folders? - netbeans

I'm working on a joomla project and for debugging/type hinting/auto-complete have my whole joomla install as a project. Is there a way I can hide the folders I don't need in file or project view?
Ideally I would have a project that scans all of the folders but simply displays this:
administrator
components
com_myproject
(display all files under this)
components
com_myproject
(display all files under this)

You can hide any directories you'd like in Netbeans 6.9.1. Right click on the project, select properties, and select the "Ignored Folders" category. In this section you can add all the directories you don't want to see.

No, you cannot do it with NetBeans like this.
However, you can do it little differently... this is going to be component development.
Basically for every custom component you will need to have a separate project.
Create project with folder structure like Joomla
|
|-administrator
|-componnets
|-my_component
|
|-componnets
|-my_component
After this step, right click the project and go into properties. In the properties go to PHP Include Path, map path to Joomla directory, this is what is going to give you autocomplete feature for Joomla code.
Also, to improve auto-complete for Joomla, go to Tools->Properteis->Editor->Code Copletion
Select PHP from language drop down.
Check Also Non-Static methods after ::, this will give your auto-complete for methods like JFactory::getDBO(), etc...
Obviously it makes it hard to test right now, because component is not inside of Joomla... and copying it manually makes it a hassle. Go to project properties (right click project->properties) and enabled "copy files from Sources Folder to another location" and math the path. NetBeans will no allow you to setup copy into existing directory, workaround is simple.
Setup copy support into temp direcotry /tmp
In NetBeans windows, go to Files of your component project
Expand the nbproject node
Open project.properties
Manually modify the copy path
If you want something more advanced and runt test's, you can use Ant and create build.xml files. Read more about it on Sun's blog about NetBeans PHP and Ant.

Heres a video that will help u to do the same using netbeans IDE. Keeping yout component file into a seperate directory and do the development making full use of IDE features using the Apache ANt build procedures.
The Ant build file.
http://docs.joomla.org/Building_Joomla_Extensions_with_Apache_Ant
The video to help you setup netbeans for component development.
http://www.vimeo.com/13167176

Related

Eclipse IDE -- how do I put my external .jar files into a lib folder?

Eclipse IDE - Can someone please tell me how I can group my external .jar files into a C:\lib folder? I'd really like have them all in a lib folder and not taking up vertical space in the root of my project (see attachment).
I have read some of the similar posts here and tried them but my projects still are not 'seeing' the needed .jar files! It's very frustrating.
I know how to add a Folder but how do I tell Eclipse my .jar folders are in c:\lib so my projects will execute? I'm not even sure if making a lib folder in my project is even related to the fact that my jar files happen to be in c:\lib.
Thanks...
(source: msgVault.com)
From your description it sounds to me like you want the jars to stop taking up space in the root of your project. I am not sure how you initially added them but if I am adding external jars this is what I usually do:
Right click on your project, select properties, then Java Build Path, and then click the libraries tab, click on add external jars and then you can select each one individually (which would be a pain) or you can select them all at once if they are in the same folder (hence the c:/lib). Click OK and it should add them into a Referenced Libraries folder like so:
Also, when you open the libraries tab initially, if all of your jars show there, remove them before proceeding as you don't want to import them twice into your application (If that's even posssible, not sure).
Edit
Switch to Package explorer:
Click on Window > Show View > Package Explorer
Update
If you want to add c:\lib to your project do this:
Right click on your project, highlight build path, click Add Libraries..., in the list select User Library, click Next, click User Libraries... on the right. A new window will open. Click New... and then give the library a name such as "clibs". Click OK and then highlight the new library and click add external jars. Select the jars you want from c:/lib and then click OK. Now you can add that User library to any application you want and it will not "pile" up in the root directory under Project View.
That is just eclipse's way of displaying what libraries are on the build path of the project. It doesn't mean that they are on the root of the project, those are just references to those jars ( that maybe any-where on the system ).
A good practice is to get all the jars required by your project and put them in a folder. Next, you can either declare that folder as a library from eclipse and add that library on your build-path or you can just add the jars directly. But they will still be displayed like you are seeing them already. The true path of where these jars are located will be written next to them (like you can see in the attachment C:\selenium....).

Best way to open phonegap project created with CLI in eclipse

When I create a phonegap folder structure via the CLI (3.0), how do I open this in Eclipse?
When I choose project [New] - [Android project from existing code], the assets are taken from the platforms/android folder. But I need to change the html and js of the top folder (www). These are the files that are being used when I build the project to other platforms (via CLI or build.phonegap).
Now I change the assets in the editor of the eclipse environment and then manually copy paste the content to the files under www.
Actually PhoneGap project structure and Eclipse project structure are somewhat different. But they work in a similar way. If you want to create phonegap project in eclipse then you have to create html,js,css within asset/www folder. The java source files will be within src folder(as usual).
If you want to create project without eclipse like with command phonegap/cordova create MyApp, then you will get all java source file within project/platform/android folder and html,js,css in www folder which is auto-created. On the other hand in eclipse you have to create this www folder manually.
But project is compiled in a same way whether it is created in eclipse(IDE) or in other text editor.
I have experience in both Eclipse and Text Editor(SublimeText,Vim). I prefer Text Editor because Eclipse sometime creates problem and it needs some extra things like creating www folder and place all scripts,templates,css etc manually.
If anyone whan to go with CLI, then I think SublimeText,Vim,gEdit etc are the best choice for coding.

how to create a general project only containing one folder in netbeans 6.9

how to create a general project only containing one folder in netbeans 6.9? In eclipse i can do it, but in netbeans sometime i just want to organize some files related to some category, so i want to create a single project just only containing folder and files, but now it seems that it's not possible.
if someone has the same problem, and can share your experience, thank u.
When I need to have access to a collection of files located in a folder or group of sub-folders, and I don't need much IDE support, then I add the top-level folder to the "Favorites" tab. From there I can open any file in an editor, and perform other file system commands that NetBeans makes available. If you are using a version control system supported by NetBeans with that collection of files, then those commands should be available to you too. What is not available are things like "Build" and "Debug", etc. (obviously).
If you cannot see the "Favorites" tab (it would be in with "Projects", "Files", "Services", etc.), then open the Window menu and click on Favorites.
As #lepe suggests, if your files all tend to be of a particular type, then you can create a project of that type, and then have access to the files on the "Projects" tab. Just ignore the "extra" stuff that NetBeans is giving you.
Finally, "Freeform" project types exist for certain types of projects, and Java also has an "Automatic" project type (if you install the appropriate plugin from the Update Center). These types of projects more closely resemble NetBeans-generated projects insofar as they are designed to be used with existing Ant build.xml scripts and whatnot (Automatic projects are a bit looser on that), but they still assume that the project is intended for builds, etc.
If you have a "generic" project that uses Ant to "do stuff" kind of like a build, then you might be able to subvert one of the "Freeform" project types, cajoling it into what you need.
In the end, I find just having the folder in "Favorites" works the best for me when I don't need all the extra stuff.
The benefit of Projects as opposed to Favorites is that each project remembers the files you had open when you last switched away from that project.
I use NetBeans just for editing web stuff (HTML, CSS and JavaScript files) within the context of a larger Java project (for which I use Eclipse). I use the PHP version of NetBeans, since it's the most light weight version that handles these web resources. To create a new NetBeans project for my existing Java web app I do: File > New Project > PHP > PHP Application with Existing Sources. On the next wizard screen, in "Sources Folder" browse for the folder that is the parent of all your web stuff (e.g. src/main/webapp). Leave all the other fields with their default values, just to humour NetBeans that we're dealing with a PHP project. Click Finish. No PHP specific stuff gets created. A "nbproject" folder is the only thing that gets created in your chosen folder. (There is the option of locating this outside of the project but I find it convenient to have it located with the project itself, and I just configure my source control system to ignore this folder.)

How To Manually Add Project To Eclipse Without Using Eclipse

I'd like to manually create the folders/files on the file system that create a new project in a workspace in eclipse, and show up in the Project Explorer when eclipse is started and the workspace is selected.
What files would need to be created to do this and where would they need to be?
Please understand that I do not want to open eclipse and make a new project using eclipse. I want to make a new project without using eclipse.
I think you will need to do the following
create a .project file and whatever other files needed by your specific type of project (for example java projects need .classpath) in the project folder, you can find out what you need by looking at those files for another project.
In your workspace .metadata folder, this is where eclipse keeps information about the current workspace, I think the plugin responsible for project definition is .metadata/.plugins/org.eclipse.core.resources , you will need to create those files yourself, some of them are binary, so you will need to open up the source of that plugin to see exactly how it writes them. Depending on your project, you will need to write more .metadata plugin information (for maven for example).
There is no easy way of doing this. Each new project modifies many scattered files throughout the eclipse structure (if you want a list, make a new project and find files created/modified most recently, and/or search for the project name.)
Short of writing the files by hand, there's not much you can do. I found these links in my reseach, but they're both pretty old and seem to be dead ends:
http://www.eclipsezone.com/eclipse/forums/t107019.html
http://dev.eclipse.org/newslists/news.eclipse.tools/msg36546.html
Based on the answers of #shipmaster I think this will work.
Go the workspace and create a new folder as your new required project name.
Copy the contents like .project, .classpath, .includepath etc from any existing project and modify the same like project name, source folder, build folder etc in .project. Do the similar changes in .classpath etc as per the new project requirements.
Unfortunately this is not enough to create a project by just doing eclipse restart so we need to do an import project and point it to this folder and we are ready to use the same now and we see the new project created in eclipse!
try archiving the file .. right click on project ---> export --->archive file(in General section) ..after you archive it as a zip you can import it after.
IF you want to manually copy a pre-existing project to a new workspace,
I have a solution for you:
Copy the project folder.
Paste it into the new work space.
File > Import > General > Existing Project Into Workspace
Eclipse will now see the project you cut+pasted manually.
Why I am doing this:
I am doing this so I can build upon my scrum stories while keeping documentation via working files that each successive step was built upon.
E.g. Story #2 is built upon story#1 code. But I don't want to version them because I want to be able to open them up one after another to do a presentation on my work flow.

Eclipse plugin that shows the META-INF of a jar library

Currently in eclipse when you open a library jar, it shows all the packages and classes, but if you want to see the META-INF content (e.g. manifest.mf), you have to open the file externally (e.g. using winrar)
Is there a simple way buit-in in eclipse to do so, or a plugin that does this?
you can use the Project Explorer view (part of Eclipse Java EE) instead of the Package Explorer view, and view everything inside the jar, including properties files, xmls, etc.
Jar-Plug will do the trick
http://jar-plug.sourceforge.net/
Under Linux, I simply associate (inside Eclipse) the jar extension with the file-roller application, which lets you browse the innards of packed files. Works fine for me. This doesn't directly display META-INF, of course, but I can go there and click on the file (e.g. manifest.mf). This is very convenient.
Under Windows, I suppose you could similarly link out to something like 7Zip. I have no experience to contribute there, alas.