Tracking file in Netbeans IDE Projects window - eclipse

Just getting hands on with NetBeans 8.0.2. Wondering if the IDE has similar features as Eclipse or Visual Studio like
Track current file in Projects explorer - When working with large projects, with lots of files open, if I want to navigate to current file in projects window it is getting difficult.
On top of it, the project explorer is showing the folders/files in a case sensitive manner resulting difficult to locate the exact file/folder.
Is there a settings or two to control this behavior?

For the first part:
use the option "View -> Synchronized Editor with views" to automatically select the current file in the editor in the project window.
Alternatively (what I prefer) use "Navigate -> Select in Projects" to manually select the current editor file in the project window .
You can find more information about navigating in the IDE in the manual:
http://docs.oracle.com/cd/E50453_01/doc.80/e50452/work_java_code.htm#CIAGADFI
Regarding the second part: Java is case sensitive. MyClass is something different than MyCLASS so it has to treat the file names as case sensitive.

Related

Eclipse: Is it Possible to Open Files that are in a Workspace But Not in a Project?

I have a folder hierarchy that looks like this:
- workspace
- some_folder
+ eclipse_project
Is it possible to open and view the hierarchy in the project explorer of Eclipse beginning at "some_folder," instead of at "eclipse_project?" If so, how is this accomplished? When I try importing, Eclipse obviously refuses to because the files in the outer folder are already in the workspace.
Or does this contradict the principle behind Eclipse and projects?
Thanks.
Or does this contradict the principle behind Eclipse and projects?
Yes, it does. The File menu does offer to let you Open File..., but whether it's supported by an editor and how much functionality is retained is entirely up to that editor. Some will flat-out fail.
As a workaround, you can create a New General->File, expand the Advanced section of the wizard, and set the new in-workspace file to link to the real file's physical on-disk location, as long as that location is not in some way under the workspace's location. Note that even this may not always be supported by extremely old editors.

unsolved inclusion #include <bb/cascades/Application>

The momentics IDe for BB10 has encountered a problem or at least I believe that al my inclusions appears as unsolved. when I compile the app it compile correctly and everything works pretty well. But the problem is that I need to import some libraryes like #include and as long as this libreries are shown as insolved inclusion I cannot declare any object of those types.
Does any one know what can be this and how to solve it.
Things done berofe:
I've tried cleaning the workspace and creating a new project and also the new project works perfectly, also I've tried going to configure add and and some libraries. this works but only works for specific libraries, not at all for libraries.
Edit 1: As I saw on other posts, I've reinstalled the 10.1 sdk that is the one I need, but no luck
In the Workspace's Project Explorer pane, right click the project, and then select Build Configurations -> Set Active -> Simulator-Debug (Just to be sure.)
From menus, Window -> Preferences. In the Preferences dialog's left pane choose C/C++ -> Indexer.
To get intellisense to work when authoring well before making builds, under Indexer options, check boxes Index source files not included in the build, index unused headers, index source and header files opened in editor. And under indexing strategy check both boxes, automatic update and update after every file save.
Finally, under Build configuration for the indexer select the Use active build configuration option (Just to be sure.).
For class declaration in header file, the erratic feedback from IDE will disappear (as of Momentics 2.1.2) only after cpp file for implementation, that includes the header is saved.
If modifying header, after setting up as above, right-clicking on the project in Workspace pane -> Index -> Rebuild should work.

How to debug Eclipse source code

I am having tough time to figure out debugging UI parts of Eclipse. I couldn't find any information on google (or) Eclipse web site.
All I wanted to do is to find out the code that gets executed when we double-click a file in project explorer to open the file in Editor.
I tried to bring up Eclipse source code from Plug-ins view -> right click on the plugins -> import as Source Project. But, I am unsure what are all the components that constitutes to the UI part. I get some weird errors when I try to import everything that's found in plug-ins view.
Where can I find the information related to debugging Eclipse source code?
Instead of using Plug-ins->Import as Source Project, I would recommend opening the Plug-ins view, selecting all plug-ins, right click, and Add to Java Search.
Then you can use Open Type Ctrl-Shift-t to search for class names and the source will be attached so you can read it, set breakpoints, and debug.
In your case, I think you want to investigate IWorkbench, IWorkbenchWindow, and IWorkbenchPage. The openEditor(*) methods on IWorkbenchPage will be of particular interest.
You may also want to take a look at the org.eclipse.ui.editors and org.eclipse.core.contenttype.contentTypes extension points.

Is there a way to sort projects in Eclipse GGTS?

I am using the Groovy-Grails Tool Suite (GGTS) which is basically just Eclipse with some Groovy/Grails specific stuff on top of it.
I added a new source folder (Properties > Java Build Path) but it is appearing in a weird order. Is there any way I can manually order the source folders in Project Explorer?
You can see in this image that the "test/functional" source folder is not next to the other test folders. At a minimum I'd like to have them all together, and ideally I'd like to choose the order. There are some other folders I'd like to move around too if I could.
I also want to keep using this Project Explorer view since it puts a Grails specific spin on things, like the "domain," "controllers," "views," and others.
I am using GGTS 3.1.0.RELEASE which looks like it is built on Eclipse 4.2.1.
Not sure how I missed it, but under Preferences > Grails > Project Explorer you can order the default set of objects (domain, controllers, etc). That would help with part of my problem of wanting to order all the objects.
After I did that, I exported the preferences (File > Export > Preferences > All) to a file. In that file I found a String like this:
/instance/org.grails.ide.eclipse.explorer/org.grails.ide.eclipse.explorer.ordering
I updated that, adding "Stest/functional;" after "Stest/integration;", imported the preferences (File > Import > Preferences), and restarted the workspace.
I wish the plugin's preferences (where you can change the default ordering) allowed you to add new objects right in the preference editor, but at least there is some way to do it.

Opening a temporary buffer / scratchpad in Netbeans?

I often have to open a secondary editor outside of Netbeans in order to work on temporary bits of text outside of my project files. Is there a way to create temporary files in Netbeans without adding them to a project?
File -> New expects every file to be part of a project.
I know this has already been answered successfully, but there is now a proper Netbeans plugin for this requirement: http://code.google.com/p/netbeans-scratchpad-plugin/ It works nicely for me and allows multiple scratchpads which can be handy.
Also note that the Copy/Paste History plugin which is available by default (with NB7 at least) is handy for this too.
HTH,
JD
By default, there is no such feature yet (I'm using 6.5).
You could include a folder in the Favorites window, and right click > New > Empty File from the folder, it won't be part of the project.