Is there a way to maintain a text (comment) file in eclipse? - eclipse

I know I could just create a dummy module and stick all my comments in there
void do_nothing() {return;}
// Lots of comments here
// More comments here ....
But I'd like to have just a plane old text file in each of my Eclipse projects to ,track personal notes on the project. Stuff that dosen't belong in the final project
- Like OR Example -
. Still need spec for SomeSmallPart of project from Sally, it was promised to me 2 weeks ago.
. 2/4/11 Dave said he found bug with the text handling, but he can't duplicate it. Need to see him.
. Remember I'm (suppose to be on) vacation from April 1st to April 10th
That kind of stuff. Is there something I'm missing in eclipse that would just let me have a totally ignored, plain old text file to help me track the world spining around a specific project?

Um... right-click project or folder -> New -> File, enter filename with .txt extension?
But it sounds like you should instead be using Eclipse's tasks, since those can be sorted, filtered, prioritized, and attached to a specific location in a source code file.
For even more powerful features, take a look at Mylyn.

Related

Eclipse Ctrl+Shift+R not showing all files in the project

When i press Ctrl+Shift+R to open the Open Resource Dialog box, the filter box does not show most of the other resource files for example.. jsp, xml etc. it works fine with all the java files.. This is happening for only this particular java project. i have refreshed the project multiple times but still no-go. I have also rebuilt the index for eclipse under workspace/.metadata/.plugins/org.eclipse.jdt.core by deleting the index files but to no avail.
I am using eclipse Kepler version. Any help would be great..
Thanks All. Yes i had closed and opened the project many times. I have also not set any Resource filter exclusions. What i noticed was that opening any of these files for edit would set off an alert saying file was derived and would i like to edit? But on the properties for these file they were not ticked as derived but rather as Archived. So had to manually hunt for the parent folder which was making these files as derived. Also noticed that the Open Resource Dialog box has option for including Resource files "Show Derived Resources"...
This one helped me solve the problem
Eclipse treating all the files in a project as Derived
This is going to sound ridiculous...but maybe this'll help others too: make sure your file search string is correct! You may need to begin it with a wildcard (*).
I lost about 45 minutes on this as the result of user error.
I was looking for some local files named eRCaGuy_PPM_Writer.h and eRCaGuy_PPM_Writer.cpp (from my repo here). So, I pressed Ctrl + Shift + R and searched for ppm_writer, as shown here:
Nothing! It would not find those files! No matter what I did to the files it couldn't seem to find them. I tried all sorts of things. Then, I realized Eclipse doesn't have a fancy fuzzy search like Sublime Text 3, so I simply added an asterisk (*) to the front of the search, and voila! It works perfectly. Since the "PPM_Writer" part of those two file names is NOT at the beginning, I must start the search with a wildcard (*).
Now it works fine, as you can see here:
I've just added a note about this to my personal Eclipse setup and configuration instructions here: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/tree/master/eclipse (for my full documentation, see also the PDF and Google Drive links at the top of that page).

Is there a tool to explicitly organize files in Eclipse into groups without moving them into different packages?

Is there a plugin that lets you manually add files to lists/categories? Something like Mylyn but manual and more files--kind of the way Gmail manages mail--a tagging system.
If I let mylyn manage my windows it actually closes them without any way to shut off (Something I absolutely cannot tolerate, I use my open windows to remind me of what I'm working on--my memory absolutely NEEDS the help)--on top of that it automatically adds files to lists just because that list happens to be open when I start doing something else.
I guess I'm thinking of a plugin that offers a different version of the "Package Explorer", one that is organized by task instead of by package hierarchy, and allows you to move files around at will.
...or is there a way to adapt an existing tool to do this (without actually moving the files around, of course!) Bookmarks don't seem to offer a "Grouping" but using a common first word for the description in my bookmarks may work... Any other ideas?
After messing with it a bit more, it looks like bookmarks might do what I want. It is possible to filter bookmarks by searching the subject string, so as long as I put tags in the subject string I can select a sub-filter and have it bring up all the relevant files for a given task.
I won't accept this for a while in case someone has a better answer (a plugin perhaps?)

XCode file naming

OK, this is in the pet peeve department. Not terribly important but sometimes annoying.
I am creating a series of test projects to experiment with various ideas. The projects are named "Test 1" through whatever.
When the project is created by XCode I get file names like "Test_1AppDelegate.h" and "Test_1ViewController.h".
What I want is: "Test_1_AppDelegate.h" and "Test_1_ViewController.h", which is far more readable and "civilized", if you will.
Is there a way to make this happen?
What I've resorted to now is a really messy process:
I name the project with a trailing space: "Test 1 "
This gives me the file names I want within the project.
I then have to go and use Project>Rename to remove the trailing space from the project name
At this point, close the project and rename the directory to remove the trailing space.
OK, it works, but it is convoluted and hopefully not necessary. This also produces a couple of "casualties" with weird naming that I simply have to live with:
"Test_1__Prefix.pch" // Double underscores
"Test_1_-Info.plist" // Underscore prior to hyphen
Again, not a huge deal, but it'd sure be nice to clean-up the naming as a part of the automagic project creation process.
Like many things XCode, it's a love-hate relationship.
Thanks,
-Martin
While I haven't done it, you can define your own custom project template. I would start first by examining the supplied project templates at:
(Xcode folder)/Library/Xcode/Project Templates/
to see the overall structure. The most difficult part is finding documentation on this topic, because I could not find any documentation supplied by Apple. This likely means that it is subject to change at any time and the work you put into defining your own template may need to be tossed.
I was able to find some instructions with a simple google search: Xcode custom project template
For example:
Cocoa dev: Design your own Xcode
project templates
Xcode: How to customize the existing
project templates

Insert template into every source file in an Eclipse project?

Is there a tool, option or script to insert a custom template into the header of every existing source file within an Eclipse project?`
Some background information
I have very recently open-sourced a small application written for a university assignment. Initially the source files did not require any explicit license or author information. But now I am releasing the code I would like to place this information in the header of each Java source file.
I know Eclipse has the capability of inserting a custom template in each new file, and I will be doing this from now on. But there is around 60 existing .java files within which I wish to place this header. While that is not a huge number, I really don't fancy repeating the same cut and paste operation 60 times if there's a lazier way to do it.
P.S. I couldn't think up any better tags for this question, suggestions welcome.
You may want to check out JAutodoc on sourceforge. http://jautodoc.sourceforge.net/
Specifically, check out the section entitled File Header
Hope this helps.

How to Change Netbeans Fonts and Colors Preview Document?

Within the Netbeans 6.5's Tools -> Options -> Fonts & Colors -> Syntax dialog, you have the ability to change the look and feel of the Netbeans text editor. When you select a language, you are presented with a preview of your font/color scheme. However, when I preview Java, there are far more options for syntax changes than are being displayed in that preview window. If I were able to view a more robust piece of code, I'd be able to see the immediate effect of more of the options.
How can I supply a preview document to view my font/color changes?
UPDATE:
After looking into this some more, I've been able to narrow down the problem a bit. From what I can tell, everything in Netbeans is considered a plugin. The GUI editor is a plugin, and even the text editor is a plugin. This means that what ever piece of Netbeans that actually analyzes Java code and does syntax highlights is also a plugin (since Java is just one of many languages Netbeans highlights, it makes sense this is a plugin).
I think fromvega is on the right track with his suggestion. The tutorial for creating a manifest file editing plugin pointed me in the right direction. The tutorial eludes to a file used as a sample document used for font/color previews. It tells you how to create one inside this new plugin project. (Located in "Registering the Options in the NetBeans System Filesystem", part 4. About 4/5 of the way down the page.)
My next line of thought was to look for the Java syntax editing mode plugin and find this file and update it with a richer example file. I looked in the installation directory and came up empty, but I found what looks like the appropriate files within my user settings directory. There is a config directory with a lot of subfolders within my user directory (Windows: C:\Documents and Settings\saterus.netbeans\config).
I've been poking around inside this directory a bit, but have only found the xml files the manifest tutorial talks about. I have been unable to find the extensionless sample file for the Java plugin that I believe should be there.
Since I've hit a brick wall for the moment, I thought I'd toss it back to the SO community and see if you guys might make the last leap and find the solution.
Just for anyone who wants to alter this themselves it is possible on a unix machine to use grep to locate the file i.e.
grep -lr "some part of the current sample code" /path/to/netbeans
I used this method to locate the ruby example filename and from that identified that it is kept in org-netbeans-modules-ruby.jar as a file called RubyExample. By simply altering that file I was able to construct a better sample file for my own use.
Hope this helps someone!
The document which is displayed (for each mime type) is specified in a particular folder in the "system file system" (which is a NetBeans concept which is a virtual file system composed from contributions from individual modules; this is how functionality is dynamically registered in NetBeans).
Modules typically specify their system file system contributions in a file named "layer.xml" in the plugin. The create plugin templates typically offer to create this for you.
For example, here's how the Python example is registered:
<filesystem>
...
<folder name="OptionsDialog">
<folder name="PreviewExamples">
<folder name="text">
<file name="x-python" url="PythonExample.py"/>
</folder>
</folder>
...
Here, PythonExample.py is a sample file in the same directory as the layer file.
Therefore, what you need to do is create a plugin which overrides the existing registration(s) for the mime type(s) you care about and provide alternate sample documents. You may need to hide the existing registration first (see the _hidden
part from http://doc.javanb.com/netbeans-api-javadoc-5-0-0/org-openide-filesystems/org/openide/filesystems/MultiFileSystem.html ).
Hopefully this guides you in the right direction.
However, in thinking about it, we probably ought to make the preview area editable - so people can cut & paste whatever codefragment they care about right in there. This wouldn't be persistent, so whenever you change languages you get the original samples back - but it provides a quick way to see your own code. This shouldn't be just for the Fonts & Colors customization, but for the Formatting preview panels as well.
I've filed an issue against NetBeans for this:
http://www.netbeans.org/issues/show_bug.cgi?id=155964
-- Tor
I think you can only accomplish that with a new plugin, since you need somekind of parsing to define what is what.
Give a look a these tutorials, I haven't read them in details but they seem to show you how to do what you want:
http://platform.netbeans.org/tutorials/nbm-mfsyntax.html
http://www.antonioshome.net/kitchen/netbeans/nbms-coloring.php