PyDev Package Explorer doesn't retain directories expanded states between sessions - pydev

For Eclipse Neon 4.6.1 and PyDev 5.3.1.201610311318 (i.e. everything fully updated as of today).
Is there a way to help PyDev Package Explorer remember the state of expanded directories between sessions?
This problem began only after I upgraded to Neon. Eclipse Mars and PyDev retained folder states between sessions.
My PyDev project contains a nested directories structure. No level is deeper than four levels below the project's root.
I expand one or another portions of that dirs structure as I work. After I close and restart Eclipse, all the project directories and files are present and accessible but the Package Explorer hasn't retained the dirs' expanded state from the previous session.
Sometimes some dirs may be expanded to two of four levels, but sometimes not at all.
Eclipse Neon remembers all other view settings. The size of the Eclipse window, the workspace's tools, and the files that were open in the editor are all where they were at the end of the preceding session.
Not sure it's pertinent, but because Eclipse Neon implements a different projects structure than preceding versions, when I upgraded from Mars to Neon I made a full copy of my Mars project (in case I needed to revert), then pointed Neon to that copy. I then archived my Mars project so that I'm certain I'm not accidentally accessing two different Python projects.
When I created the copy of the project might I have left something behind that affects the PyDev Package Explorer's ability to remember project directory settings between sessions?

I believe I've fixed my own problem.
As mentioned, the problem arose after I upgraded from Eclipse Mars to Eclipse Neon. As part of doing that I tried to re-use my Mars-level projects. When I did, Neon told me it needed to "upgrade" those projects to the newer Neon format. But that process evidently brings a lot of problems along with it.
So I did the following:
I of course had all my Mars projects' source files backed up.
I completely deleted my new Neon installation and reinstalled from scratch: No Mars projects, no inherited settings, no anything else.
In Eclipse Neon, I created new, empty projects (Python, Java, and Java EE).
I copied ONLY my Mars projects' source files -- and nothing else -- into the clean Neon installation's new project directories.
Because the Neon-level projects now contained only source files and nothing else, Neon no longer perceived a need to "upgrade" those projects. Now when I re-open a "Neon-pure" project, that project's folders have retained the expansion levels they had when I closed that project.
Another pleasant by-product of performing the preceding steps was that I also fixed a problem wherein Window -> Show View -> Other displayed a long list of red icons under org.eclipse.e4.secondaryDataStack:
Those red icons no longer appear.
Hope this helps...

Related

Convert project in existing workspace from ADT to Andmore

I have just updated from Eclipse Luna to Eclipse Oxygen and installed Andmore. I have a bunch of project workspaces which were created with Eclipse Luna and ADT.
Eclipse automatically upgrades workspaces to the newer version on import, but it doesn’t convert from ADT to Andmore (which, although sharing much of the same code, is a different plugin).
Is there a way I can migrate an existing Eclipse workspace from ADT to Andmore without having to delete and re-import every single Android project?
There is an official way, see here. This needs to be done for each project in the workspace (also for library projects, if any):
Right-click the project, then select Configure > Convert to Andmore Project (wording of the last menu item may differ slightly).
In my case I had to restart Eclipse before it would pick up everything.
You may also need to clean your project.
If you had any tabs with ADT-specific views open (which includes all ADT files and potentially anything which is not a Java source file), you will need to close and reopen them, as they still refer to ADT components which are no longer available. Closing and reopening them will bring up the corresponding Andmore view.
I still get an error message when I try to build the app, but that may be unrelated. The first build failed with an error but that was due to a separate, unrelated issue.

How to make Eclipse show packages?

I recently upgraded my Eclipse and the workspace stopped working.
So I made a new one, copied all my projects over to it, then imported them.
However, now it shows them as folders instead of the actual packages like it used to:
How can I get the packages back?
Are you sure, you are using the Eclipse perspective Java or Java EE and within one of those perspectives, are using the view Package Explorer ?
Most of the times this happening because the Eclipse view Navigator is used, as show here.

my workspace doesn't show up in Luna (updated from Helios)

Windows 7 SP1, Eclipse 3.6 (Helios) updated to Luna.
I downloaded the recent Eclipse dstribution (Luna). Doesn't have an installer for Windows?
It seems just to be a .zip (eclipse-java-luna-SR1-win32-x86_64.zip) which has an eclipse root.
Do I just put it into C:\Program Files (no difference between x86 or x64 ?). I moved away the old eclipse directory to avoid a mixing up.
Now, when I start Luna, the project sidebar is empty and I do not see my old (Helios) projects.
I also see no way to invoke any of the projects. The workspace is
c:\Users\me\workspace.
Clueless at the moment.
You have to import the projects into your existing workspace.
Go to File --> Import --> Select the type of project you want to import (for eg, select General --> import existing code into workspace) --> browse to the directory where your old projects exists --> Next and Finish. Now you can see your projects in the sidebar.
And as far as I know many eclipse versions do not have an installer, they are just copy paste.
Eclipse distribution is mostly a compressed (zip) file. Just unzipping it to a folder is sufficient for Eclipse installation.
You can copy it to any folder you want, but I (personally) prefer a non-whitespace folder name, and unzip to look like C:\Dev\Luna\eclipse
Open your Helios and note down your workspace (mostly you can find it here: File > Switch Workspace > Other...
Now create a shortcut of Luna eclipse.exe in Desktop
Right click the shortcut, select Properties and append the following in the Target location: -data C:\path\of\helios\workspace (You need to give the workspace you previously noted down)
Launch the shortcut, accept the warning Eclipse shows you to update your workspace, and now you should be able to see your existing projects.
And one more point of advice is that do not create projects in the Eclipse workspace, because it ties your projects to the workspace, it can go messy, when the workspace gets corrupted and you need a fresh workspace.

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 :-)

Does Eclipse store any information out of its directory?

I have used Eclipse Indigo (C/C++) for sometime along with PyDev Plugin (for Python). As I messed up with the IDE (tried to tweak some core files, for fun!), I thought to install a fresh one and this time I downloaded Eclipse Indigo (for Java).
Eclipse (C/C++) was placed in C:/
Eclipse (Java) was even placed in C:/
Now when I opened Eclipse (Java), I observed two things:
The Eclipse's title bar still showing <C/C++ Eclipse>
There was a python's project file still opened up which I worked on Eclipse C/C++ IDE. Also, there was an PyDev's error popped up (mentioning it wasn't installed).
I have verified "Installed Plugins" list and didn't find any plugin related to C/C++ or python.
Now, I have got one question:
As I searched over google and found that Eclipse doesn't store anything beyond its directory, How does this above things are showing up??
There might be some Temp/ Cache files stored. However, I searched my drive with "Eclipse" and "PyDev" as keywords and found nothing.
I even searched for registry keys but couldn't find anything.
What exactly is happening and how do remove Eclipse completely?
TL;DR: using the new Eclipse (Java), select "File > Switch Workspace... > Other...", and create a new directory (e.g. java-wks) for all projects you will do using the new Eclipse.
The long explanantion is that Eclipse stores data in two locations:
The eclipse installation directory itself: contains the plug-ins you install (including the ones already installed in the package you downloaded) and some runtime configuration parameters (see eclipse/config.ini) related to how Eclipse itself should run (e.g. where to find the JRE to execute Eclipse itself, how much memory to allocate etc.)
The workspace(s), where your data (projects and source code) and all personal configuration parameters are stored. This is where Eclipse remembers where your source code is, which file(s) where opened when you last exited, which perspective was active (in your case C/C++ Eclipse), your preferences, launch configurations, breakpoints, etc.
For each Eclipse installation on your system (eclipse folder), you can have as many workspaces as you want (it helps to isolate work). There are various ways to select the workspace location: using the -data <path-to-workspace> option on the command-line, using the popup Eclipse normally shows when starting up (but you may have disabled it), or using "File > Switch Workspace...".
You can also use the same workspace from different Eclipse installations (though not at the same time), but things will not work well if you have different plug-ins installed in each: if one installation stores in the workspace "this is a Python project, and the current perspective is C/++", and the other installation does not have the Python and/or C++ plug-ins installed, it will not known what to do with these info. This is why you see the errors you reported.
For your case, my guess is that under Windows the default workspace location is somewhere in your home directory, and the new (Java) Eclipse is using that, but failing to make sense of the Python and C++ related preferences and projects the previous Eclipse stored there. You need to use a fresh workspace not "polluted" with Python and C++ stuff if you want the Java Eclipse to work without errors (or install the Python and C++ plug-ins in the new Eclipse). You may want to enable the Prompt for workspace on startup preference (in "General > Startup and Shutdown > Workspaces") if it is not to control this easily each time Eclipse starts.