Why are Eclipse project folders marked Derived still showing up in the Synchronization view? - eclipse

How can I get the Sync view to ignore my Derived folders in Eclipse?
In the past, I recall that marking my Ant build output folders as Derived (right-click on folder, select properties, check the Derived checkbox) would:
keep them from showing up in the Open Resource dialog
correctly ignore them as not being legitimate outgoing changes in my CVS Sync view
When I mark the Ant build folder as Derived now, the contents are still showing up in my Sync view as outgoing changes.
What am I doing wrong? Has something changed with Eclipse?
I have tried cleaning, rebuilding, opening and closing the project, re-importing the project, and launching Eclipse with the -clean option.
Eclipse Version: 3.6.2, Build id: M20110210-1200

Eclipse has changes on this indeed. Now you have to either use Preferences/Team/Ignore Resources or add files/path to exclude from version control into local .cvsignore or per-repository CVSROOT/cvsignore
Cheers,
Max

Related

One of my project subdirectories has disappeared from Eclipse PHP Explorer and refuses to reappear

The subfolder myproject/wp-content has dissapeared from the project explorer (of course the files are still there, I can see them on windows explorer).
All the other folders and files are still showing up.
I tried deleting the project files (.settings .buildpath .project) and deleting the project on eclipse and also deleting the index on .metadata/.plugins/org.eclipse.dltk.core.index.sql.h2
What else can I do?
I'm using stock Eclipse Kepler 4.3.1 SR1 64-bit with the following add-ons:
Aptana Studio 3 Plugin 3.4.2.201308081736-7W7I57boG98RAi489ctbvKi7VXbq com.aptana.feature.studio.feature.group Aptana
ChromeDevTools SDK 0.3.9.201309080643 org.chromium.sdk.feature.group The Chromium Authors
Chromium JavaScript Remote Debugger 0.3.9.201309080643 org.chromium.debug.feature.group The Chromium Authors
Eclipse Standard/SDK 2.0.1.20130919-0803 epp.package.standard null
Line Number Ruler Fix (Eclipse Kepler 4.3) 0.0.1 de.cdhq.eclipse.linenumberfix.kepler.feature.feature.group CDHQ.de
Markdown Editor 0.2.3 markdown.editor.feature.feature.group Winterwell
Nodeclipse 0.5.0.201309080643 org.nodeclipse.feature.group Nodeclipse organization
PHP Development Tools (PDT) 3.2.0.201306051924 org.eclipse.php.feature.group Eclipse.org
Show Window in Fullscreen 1.1.0.200906152252 gr.scharf.fullscreen_feature.feature.group Michael Scharf http://michaelscharf.blogspot.com/
Word Wrap Feature 0.0.3 de.cdhq.eclipse.wordwrap.feature.feature.group CDHQ.de
[EDIT] I forgot to mention I've also tried to rebuild the project with the same results, and I've also checked explorer view filters in case something weird had happened but there are no filters set.
[EDIT 2] I deleted the Eclipse project files and the whole .metadata folder on the workspace and recreated the project. I had no problem at first, but it has happened again. I haven't touch any settings, just closed and reopened the project.
[EDIT 3] The less invasive fix by now seems to be a combination of deleting h2 database (.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2 workspace folder) and deleting also the project without deleting its files which doesn't delete .build or .settings or .buildpath either, so it can be recreated without much hussle. I can avoid the problem by not closing the project (I can still close Eclipse without loosing the folder), but I still don't know what's causing it.
[EDIT 4] I updated Eclipse and plugins today to their latest versions (Now runnning Kepler 4.3.2) and the problem persists (even if I delete org.eclipse.dltk.core.index.sql.h2 and .settings, .buildpath, .project before importing the project's folder contents as a new project): I just close the project after eclipse finishes indexing it and when I reopen it wp-content doesn't show up any more (unless I force reindexing by deleting org.eclipse.dltk.core.index.sql.h2 again). I do believe this is WordPress related, since it only happens when indexing this particular WordPress deployment (maybe it's one of the plugins/theme files installed inside wp-content or something related to one of the xml files in the root folder, like sitemap.xml?).
For me this happened multiple times, on different project and different folders. Opening+closing or refreshing the project yield no success.
In my case, I have found out that this is related to the Working sets. It seems by default new subfolders and files of a project are not marked belonging to the set, so the project has a mix of old folders (included) and new folders (excluded).
There are two fixes I am aware of:
disable the working sets
Moreover, on large projects, having this mixed state working set made opening the folder structure (and other operations) very slow (3-5 seconds per level). Turning off the working set filter made it instantaneous.
edit the active working set and check the project's checkbox (which will check all subfolders).
This happens to me all the time. I'm on OSX and my projects are accessed from a mounted samba volume. I've found that if I:
open the project in eclipse
eject the samba volume
refresh the project (it will say it cant find it and ask if you want to delete
it... click no)
remount the samba volume
refresh the eclipse project
And the missing files/folders show up. If your folders are local, maybe just moving the project folder would do the same. Unfortunately, this happens very often, and seemingly more often for wordpress projects for some reason.
I'm working with a UI project (Dynamic Web Project) and my web folder keeps dissapearing too. I didn't knew what causes that.
The only thing I knew was how to reset my projet; deleting it from workpsace and reimporting it.
I know now what causes that but I have no answer on why it actually does it. I keep refreshing my workspace because I have some compressing that is done outside eclipse and for my workspace to update them I need to refresh... somehow, the freaking Close Project option is right under the Refresh option, without prompting... and this is when my folder dissapear; when I reopen it.
Try the Import Existing Project would be my guess!
Maybe that can help you find the how of it !
Hi i solve this problem by unchecking "Group by Namespaces" in the little triangle on the top-right of the php explorer.
Issue:
My app directory in my cake php application became invisible after some time. This is bad since all of my non-cakephp framework files reside therein!
My environment:
Macosx
Eclipse Kepler
WebServer: built in macosx in Library/WebServer/Documents which is symlinked to a dir in my home directory.
PHP plugin
What I tried first:
Deleted old project from UI ( retaining files on the file system )
cd'ed to root project directory and deleted eclipse artifacts like .settings, .project, etc
Recreated php project to find that the app directory is still missing!
What worked for me:
I renamed the directory from app to app_back using the terminal/linux command rn.
Eclipse immediate saw the new dir after a clean rebuild.
I renamed the dir back to app and performed another clean rebuild.
Et Voila
It seems that by upgrading Eclipse to last version (Luna), removing the project files (.settings, .classpath and .project) and creating a new project on a new workspace, I can close and reopen the project without having the folder missing from the project explorer.
It's not the solution I wanted (and don't need any more) but it's also a solution, so I'm posting it :-)

Subclipse: How to add the default output folder to version control (*.class files)?

I am using eclipse 4.2 and Subclipse 1.8.20.
I am trying to add the contents of /WebContent/WEB-INF/classes to version control (this is also the default output folder of my project).
First let me state that this is possible with TortoiseSVN. I do understand why by default Subclipse ignores this directory, and I tried to change the Team settings, but I am not seeing a relevant entry for *.class files:
Is this at all possible with Subclipse?
More info:
Old an unanswered similar question: http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=473163
Same topic but opposite question: How can I ignore build directory in Subclipse?
It is a horribly bad idea to version your build directory. Every time Eclipse does an auto-build it will cause all of the files to need to be committed again.
To answer your question, all Eclipse team providers automatically ignore any resource that is marked as "Derived" by Eclipse. The Derived flag is set on files that are created by the Eclipse builders. If you select one of these files that are ignored in Eclipse, right click and choose Properties. Navigate to the Eclipse Resource page. There will be a bunch of checkboxes. You should see that one of these is labelled Derived and will likely be checked.
Do not try to change the checkbox value. I am just pointing out where you can see and confirm this.

Files externally added to working directory not showing up in Eclipse

When I make changes to my working directory outside of Eclipse, in particular when I update my project under version control, newly added files will frequently not show up in the package explorer. Usually they'll show up after about 5 or so minutes (no idea why) but today it's been an hour and I kind of need these files so it's getting to be a problem. I tried:
restarting eclipse
cleaning and building the project
opening one of the missing files using File > Open File
The last of these opened the file but didn't get it to show up in the package explorer, and the type represented by that class was still invisible to other classes. Any thoughts?
As discovered, you need to refresh your workspace or project to see changes made to the filesystem outside of eclipse.
The eclipse workspace manages access to the files it controls, fires deltas on file changes to allow incremental builders to operate, etc.
The way to refresh the workspace is to select your project name in Package Explorer and press F5.

Can't save project preferences in Eclipse

All I am trying to do is to set the Java compiler for my project as 5.0. It is 1.4 by default. When I try to save by pressing OK button I get the following error.
Preferences Save Failed:
Reason:
Exception Occured while saving project preferences:
/com.myproj.reqmanager.ui/.settings/org.eclipse.jdt.ui.prefs.
I never got this error earlier. I mean I have imported this project before and saved preference settings without any problem. Out of nowhere I am getting this problem now.
Like Liam I store my project on Dropbox and use it on two different machines and also got the same error. A simple refresh (select the project and press F5, or rightclick on the project and choose Refresh) did the trick for me, as the resource was out of sync. This is usually displayed (e.g. in the editor when trying to edit a source file), but in the case of preferences you'll have to find that message in eclipse's log:
!MESSAGE Exception occurred while saving project preferences: /Utils/.settings/org.eclipse.jdt.core.prefs.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Resource is out of sync with the file system: '/Utils/.settings/org.eclipse.jdt.core.prefs'.
This might actually be the issue for both of you, as any external modification to a project will cause this out of sync error, and creating a new workspace or using another eclipse version likely purges eclipse's cache, resulting in an automatic refresh.
If you follow this thread, this can be:
because of the use of Eclipse with a workspace on a network drive (not necessarily your case, but worth mentioning just in case)
because the file is somehow locked (either by another process or by a Version Control System with pessimistic locking). See also bug 130266:
Read-only project files come up a lot when dealing with source control systems (like Perforce) that make the local files read-only until they are "checked out".
Five years later and this still occurs. In my case I moved the .settings folder, saved again (.settings is created automatically) and merged the files manually.
Happens on Android Developer Tools Build: v22.6.2.
Check the project's Properties -> Java Compiler, and make sure the 'Compiler compliance level' is 1.8 or 1.7 instead of 1.4.
If this still fails to remove the error, deleting the .settings folder certainly works.
I had this problem also. I had used two versions of eclipse, one on my home machine (juno) and one on my work machine (indigo). Both shared the same folder using a Dropbox folder. All worked fine until I wanted to make some editor style changes, the settings would not save.
The solution in my case was to update the indigo version to juno on my work machine.
Delete the eclipse project files:
.settings (directory)
.project
.classpath
File -> Import... -> Maven -> Existing Maven Projects

Why is eclipse trying to compile files not in my build path?

I have a rather large project which contains a number of third-party dependencies which are linked via svn:externals. These include tomcat and blazeDS, which are packaged by our installer via ant. The problem is that these projects contain dozens of sample JSP pages, and eclipse chokes on them when trying to build the project, producing hundreds of errors.
Our project setup is something like this:
src/
main/
test/
third-party/
blazeDS/
tomcat/
etc.
Now, in eclipse, my project's build path is set to only include subfolders in src/main and src/test. Yet, for some reason, it still tries to build everything beneath third-party. I have clicked on third-party and selected "remove from build path", but this had no effect. I even tried adding the third-party folder to the build path, and then excluding "", "/*", and "**/*.jsp", but again, to no effect.
What is going on here?
Edit: Thanks for the suggestions, though unfortunately, they don't seem to fix the issue. I don't have the CheckStyle plugin installed (I'm using Eclipse 3.4.1 with the only custom plugins being subclipse and flex builder), and I tried disabling all extra builders except for Java, but the errors are still being thrown.
I usually have this kind of issue with CheckStyle plugin, where you need to specify in its properties (right-click on project -> Properties -> CheckStyle):
"Exclude from check Files non located in a source directory"
Otherwise it does analyze (and reports warning/errors on) files which are not candidate to be compiled in the first place.
Couple of other suggestions:
try restarting your eclipse with the -clean option (eclipse software version of 'did you reboot it ?' ;) ). Beware it can reset your workspace perspectives, so you may want to try that with a copy of your workspace instead.
try deleting your project (your workspace reference of your project, not its actual content), and reimporting it (beware of your custom launchers, they may get removed in the process).
check if you do not have any linked directory within src or test, which would point to thirdparty(/**): that would explain the unwanted compilation.
It could be that your eclipse project is configured to have extra Builders. You can check that in the project's properties (right-click on project -> Properties -> Builders).
In my case it was because there was a reference to the file (which I had excluded from the build path) in another file which was in the build path. I wanted to exclude SegModel.hpp from the build path, but in another file, I had specified template short K::KEstimate<SegModel>(SegModel& m, short stepCode);