Why does some files not show up in Eclipse? - eclipse

I started Eclipse and opened a project that is in a Git repo. However, a folder with some files does not show. Why is that?
The files are committed, and I am on the right branch so it is not that.
$ git status
On branch feat57
nothing to commit, working tree clean
The files exists:
$ ls -d html/catalogue/*/
html/catalogue/article/ html/catalogue/backup/ html/catalogue/projects/ html/catalogue/reports/
$ ls html/catalogue/projects/
projects_edit.php projects_list.php projects_new.php projects.php projects_view.php
Apache finds the files when I access it through a browser.
Two icons seems to show that something is wrong. However, I don't know what they mean.
As you can see, there's something fishy with folders html and catalogue. The folder that is not showing is in catalogue. You can also see that projects does not show.

I guess you are locking at your project from the "Package Explorer" view. This is a special view that doesn't represent the file system. It focuses on source and ressource folders, which you can identify by the little brownish symbol inside the "folder" icon. I suspect your catalogue folder is excluded from the build path somehow.
If it's not, try refreshing the project (mark the project and hit F5).
Finally, if you want a view showing the file system, go to Window->Show View->Navigator.

Related

How to remove or modify a repository from vscode

I just added my repository to vscode source control (using the Initialize repository button) and it now says I have 1800 changes. In Github Desktop it correctly shows two changed files. What should I do?
Should I remove the repository from vscode and how and then readd it back in? Is there a way to check where vscode is getting the repository? Maybe it is checking the wrong directory? Or maybe it is correct and github Desktop is incorrect?
vscode:
github desktop:
Note:
My folder that is open in vscode is a subfolder of the main repository.
Example:
/mygitproject
/mygitproject/workingfolderinvscode
Before:
Update:
Restarting vscode popped up this message:
Closed the project and opened the parent folder and got the same message mentioned above. This time some folders and files are unchanged and others are untracked. Adding right side of file explorer (screenshot below). Actually, on opening the folders I see that all the files all untracked and now the folders show untracked.
Update:
I've opened the source control view now, after opening up the parent branch and I see two repositories listed. The top one shows the correct number of changes and the bottom one the incorrect.
UPDATE:
It looks like if I right click on the name of the repository I get a few options including, "Close Repository".
I'm going to close the repository that shows as the subdirectory and keep the repository that includes the projectd from it's root directory.
Great success!
It is showing up correctly.
My guess is, your VSCODE is showing all the files in the main directory that has changed. Not only the ones in your subdirectory. Gis status can give more details about.
But in the source control tab of VSCode you can select the files you want to commit and push if necessary.
Apparently, vscode did not like that I had a sub folder open instead of the root folder (the one with git folder).
I then opened the folder that had the git folder in it.
It then showed two repositories.
To remove the first repository, I right clicked on the repository name in the source control panel and chose, "Close repository".
It now shows the correct information.

Git ignore won't work, but eclipse ignore works?

I have a dynamic web project in eclipse. I used the Git GUI tool to place it under source control.
Then, suddenly my project icons were decorated with git related images. Anyway, after that
I wanted to keep the content of the images folder (inside WebContetnt folder) out of source control.
So, I went into my project folder and modified the .gitignore file adding /WebContent/img/*.
This does not change anything in eclipse.
So, I used an alternate approach. Project > Team > Git > Ignore. This works and the question
mark image on the img folder icon vanishes.
I am not able to understand why my manual change does not work and also how eclipse suddenly
put it into source control. Please help me to understand.
Thanks.
To ignore contents of the folder you have to have a folder name + forward slash and no asterisk: WebContent/img/
And, as #janos noted, don't forget to refresh your project/repository after manual change of your .gitignore file

How to add to git index with JBoss Tools

I've created a new project on OpenShift and cloned it locally. But now i'm having problems adding new files and folders to git index. Right click on the new folder (with files and subfolders) in project explorer and choosing Team -> Add to Index, changes nothing. And if i try to commit, Eclipse says that there aren't any changes... (If i only update existing files, everything seems to be fine).
What could be the problem?
Make sure that you have the "Git Staging" view open, and right click on the file in your Unstaged Changes and Select "Add to Index", also make sure that the file is not empty, it did not show up as a staged file until after i added some content to it, even after I had added the file. (Can't add empty files or directories to git with EGit maybe?)
this sounds like EGit missing new files. I'd love to know a bit more about your setup:
Where did you clone to, where is your Eclipse workspace?
To make sure your git setup is right I suggest that you do the same with the git command line:
cd [git-repo]
git status
Git status should list the new files and tell us that they're not added yet. If they get listed, then we know that your git is set up right and we can get back to Eclipse to try to figure out what's wrong with it.
Found out what the problem was (kind of stupid though). The folder that contained new content was listed in .gitignore ... but that file isn't accessible through eclipse, i had to look it up on filesystem. I also don't have a clue, how that line came to .gitignore...
Well, that's it...

.so files are not committing to SVN

Possible duplicate
I fail to commit a .so library file using subclipse
I am developing an android application and in that I am trying to add some .so files from UlraliteJ framework. When I googled, I could see that .so files are ignored by SVN by default. So, I uncomment the line global-ignores in the config file of /.subversion folder as per this example
http://blog.keksrolle.de/2010/03/01/svn-ignores-file-extension-so-by-default-which-corrupted-my-build.html.
But, even then I was not able to commit them.
After that, I found the above post, so following that, I manually added .so files to version control and they have been added now.
But, now my problem is that they are not getting committed to SVN still. It fails with the following message,
svn: Commit failed (details follow):
svn: File not found: transaction '1635-1c5', path '/SVNfolder/trunk/OS_Android/SVNProject/libs/armeabi/libmlcrsa12.so'
If any body knows the answer, can you please share it with me
Here is my solution to this annoying problem using Eclipse and SVN
select the "SVN Repository Exploring" perspective.
choose the right folder where the .so files should be in the "SVN Repositories" view.
right click and choose the "import" menu
in the pop out dialog, choose a local path which containing the .so files, input the commit comment and hit OK button.
now the .so file are at the correct position.
Finally, I am able to commit after a day of effort. Thanks to this guy,
SVN: Folder already under version control but not comitting?
All you need to do is, take a back up of your project. Go to the problematic folder. In my case it was armeabi folder inside /lib of my project. View hidden files. There will be a .svn folder. Delete that.
Then revert back the .so files, clean the project. Add them back to the version control. Now along with the files, one more file named svn-commit.tmp.save is also created. Don't worry. Just commit the whole folder. Thus it is committed now.
How ever, I din't exactly know the need for deleting .svn folder.

Get eclipse CVS to forget about removed directory

I'm looking for a way to convince Eclipse that a directory has indeed been removed from the CVS repository, permanently?
With regular command line CVS I would just edit CVS/Entries in the directory's former parent. With Eclipse, I've tried removing the directory from the Project Explorer view, removing the appropriate line in CVS/Entries, recreating the directory in PE so that it might be removed on update or synchronization, synchronize without recreating the directory, and probably other things that I've since forgotten, and nothing worked.
The directory has been entirely removed from the CVS repository, so I'm not talking about just pruning empty directories here. The error I am seeing is:
The server reported an error while performing the "cvs update" command.
Project: cvs update: cannot open directory /usr/local/cvsroot/one/two/three/removed_directory: No such file or directory
My project contains all of the contents from /usr/local/cvsroot/one/two. I do not get this error when I navigate to "three" and update from there. I only get it when I update from the project root.
One (quite imperfect) solution for this problem is, beside to check-out the project again, to remove CVS information stored by Eclipse.
Go in the right-menu under the project > Team > Disconnect, and check the radiobutton "Also delete the CVS meta information from the file system". Now your project is unshared and has no more CVS information into it. Then you just have to do Team > Share project, select the previous repository location, and you're done (CVS will detect by itself that the project is up-to-date and won't update nor commit anything, of course).
A folder that has been deleted in the cvs repository by hand won't then be proposed anymore by CVS under Eclipse to be commited.
Beware that on a big project with many files, depending on the speed of your network, the re-share may take some time.
Sometimes it may indeed be easier to delete the project and pull it off again from CVS.
I fought this same thing for several hours a couple of separate times. I just gave in and re-checked out the project. That seemed to work like a charm
Handling of directories in CVS is not perfect. This and many other reasons caused in creating more complete SCM tool subversion.
CVS can create directory, but can not remove it. From CVS point of view, to remove directory you need to remove (cvs rm) all files in directory. But directory is still present in CVS and there's no way to remove it. Hovewer, CVS propose a "hack" to hide such "deleted"/empty directories by executing "cvs up -P" (see here).
So, for CVS command line, I wouldn't mess with parent directory CVS/Entries file, but rather use "cvs up -P" described above.
The directory will be listed in the CVS/Entries file under the parent directory. Remove the entry in the Entres file and the directory. Eclipse should recognize the directory has been removed.
Refactoring directories in CVS is problematic. Due to the way CVS handles history one of the following usually applies:
The history of files moved to new locations appears to disappear. (It is located in the history of the old location.)
The history of files is retained, but files appear moved when checking out versions prior to the move. (Files were moved in the repository, rather than in a sandbox.)
Removing or moving directories in the repository generally creates problems for clients. It helps to retain directories and only move or remove files. Normal processing moves deleted files to an Attic sub-directory.
In the Eclipse CVS synchronization perspective, did you try the 'Override and update' option?
If the files/folders are already deleted on the repository, from the Eclipse project perspective, "replace with"->"latest from HEAD" on the folder containing deleted elements