EGit opening .java files as plain text - java

So I've finally figured out how to use Git. (thanks to all the users here :)) And so I installed EGit on Eclipse. But now I have yet another problem:
So EGit works awesomely in Eclipse, and I can push/pull/commit/whatever else, but there's an annoyance: The whole reason I used EGit was so that I could edit the Java source code of a repository. But whenever I try to open a .java file from the repo, it just shows it like a text document. I've tried clicking "Java Perspective" but that just made the screen larger.
Is there any way to directly edit/save Java source files inside of Eclipse's Java editor if the source files come from EGit?

If you're editing files in Eclipse that are java files but are handled as text files instead this could mean that the project's nature or facet settings are not set to be Java.
To avoid the natures/facets mess in eclipse you can "clone" the repository into eclipse. You do this through the import dialog. Here are some instructions on how:
http://www.vogella.de/articles/EGit/article.html

Related

Enable IndentGuide Eclipse plugin in java files

To install indentation in Eclipse I dropped this IndentGuide jar in the dropins folder (I couldn't install it in the "Install Software..." option as it's not available any longer).
I restarted Eclipse and I see the IndentGuide customization screen, but java does not show in available content types:
The indentation works fine in text extensions, but does not work for java. I looked at the eclipse/configuration folder but couldn't find anything. Any ideas?
UPDATE
This is what I see under Text > Java:
Update preferences to make it work with Java files

Trying to run decompiler in Eclipse Luna

I am trying to debug a jar file I don't have source for, in Eclipse Luna
I have tried various decompilers, and can't get things to run.
The most recent seems to be JDEclipse-Realign at http://mchr3k.github.io/jdeclipse-realign/
It installs without any trouble. I have set set the default file association for "class without source" to be "Class File Editor" like this
I added the jar file to be debugged as an external jar to my project. And when I expand that and right click on a .class file I get what is shown on the web page for JDEclipse-Realign, with Decompiled Source as the default.
And I am getting the blue and white icons for JDEclipse-Realign when I select a class file.
But no decompiled source :( And clicking the blue icon for Attach Decompiled Source does nothing.
I feel like I must be missing one basic thing, but can't figure it out. No errors, just no source.
Or should I be using a different decompiler?
Are any known to work in Luna?
Faced the same problem on Luna and did the following:-
Open Eclipse Luna
Go to HELP -> Eclipse Marketplace
In the find box, type "jad". [stands for Java Decompiler]
You will get a single result titles something as "JadClipse for Eclipse ".
Click on Install and restart eclipse when prompted. Your issue will be fixed.

Downloading Eclipse Platform Source Code

Before this question is blocked for duplication, I would like to say that it is more specific than Downloading Eclipse's Source Code and Downloading Eclipse Source Code and Eclipse source code download , as well as they do not provide I clear way to download the code.
I need to analyse the eclipse source code through metrics more specifically the platform source code. First of all, I would like to know which are the packages that composes the Eclipse platform. Next, I need to download the platform source code, however I already tried different approach with no success. The ways that I already tried:
1) First, I tried to download the RCP SDK from (archive.eclipse.org/eclipse/downloads/), however, there is only a set of .jar files inside.
2) When I select the package related to platform (git.eclipse.org/c/?ofs=350), and next select the branch (for example, R2_0_1 ), the tree tab shows that it has only one .java file in the src folder (for example: http://git.eclipse.org/c/platform/eclipse.platform.git/tree/platform/org.eclipse.platform/src/org/eclipse/core/launcher?h=R2_0_1).
3) I also tried to get it by cloning the git repository as suggested by eclipse website (http://projects.eclipse.org/projects/eclipse.platform/developer), the same problems happens, there is only one .java file when you select src folder.
4) I tried to identify the packages which compose the eclipse platform by analyzing the Bug repository (http://bugs.eclipse.org/bugs/buglist.cgi?bug_status=all&content=platform&limit=0&list_id=10384608&product=Platform&query_format=specific). However, there are some components listed in the bug repository(such as,
eclipse.platform.common.git, eclipse.platform.git and eclipse.platform.news.git) that are not listed here (git.eclipse.org/c/?ofs=350). This way, I`m not able to identify which components compose the platform.
This way, I would like to know if is there any way to download the Eclipse Platform source code and identify its packages.
Thanks in advance.

intelliJ not freshing file

I have a Spring Maven based project, its running fine. I just updated my svn from directly right click > Update. Now I have new files in my folder but in intelliJ IDE its still showing the old files.
How can I refresh my project in intelliJ so it have the latest files from folder.
I am using intelliJ 12 ultimate edition.
You can do Synchronize from the project window, but you shouldn't need to. I would check the old copies are not in a different place to where you expect. Try using the (><) button in the project windows to see where they come from.
Make sure all the files are local and there are no symlinks. If you are using remote file system or symlinks, deleting bin/fsnotifier binary can help. In any case it's a bug that should be reported.

How to include NetBeans Platform Source code into module dependencies

I am debugging a NetBeans Platform application.
I have downloaded the NetBeans Platform source code .zip file.
I would really really like to attach the source code to the debugger so that I can seamlessly jump to internal NB source code.
Normally I would edit the Library configuration to tell NB where to find the source code, and it would just work.
However this is not possible for NetBeans Modules; when I look at the Utilities API module dependency it does not look like a normal NB library and there is nowhere to add in the source code.
I suspect that if I were to rebuild my project using Maven this would work automatically.
But thats a terrible reason to switch to maven.
How can I get the NB Platform Source code included into my Module Dependencies ?
You can add the zip to the 'Source' window.
To open the Sources window
Select the 'Debugging->Sources' item
from the Windows menu
To add the zip file to the sources...
right click somewhere in the window.
select 'Add Source Root' from the menu that appears
alt text http://www.freeimagehosting.net/uploads/87c4e3fc8c.png

Categories