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

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.

Related

Why do projects that I add to my 'workspace' folder don't show up? [ECLIPSE]

I am using Eclipse Indigo, and after having successfully extracted my project folder into my Eclipse workspace, it does not show up in the package explorer. I tried refreshing eclipse and restarting it, to no avail. I am 100% certain my eclipse is using the right directory and the project is in it.
What could be the problem? Thank you.
EDIT: "import projects into workspace" worked for me, but why was that necessary?
Files in the directory are not automatically picked up by the package explorer. You need to import them.
Try using the File > import, then choose
Existing Projects into workspace.
There is a checkbox that says "Copy projects into workspace" which copies it to your workspace if it happens to be in a different folder. If you start with your files in another folder, you'll see how it's copied and set up with configuration files in your workspace directory.
To answer the question, "why is it necessary to import?" you have to realize that the Eclipse workspace is just a logical container for projects, not necessarily the physical container for them.
Also realize that a directory of project-related files does not make an Eclipse Project; Eclipse must be given or generate it's own set of configuration in order to understand a project (minimally, for Java projects, .project and .classpath). Without those, Eclipse has no idea what to do with an arbitrary folder that you call a "project." That's what the Import or Create Project wizards are doing under the covers, generating those config files.

Select all modified files in Eclipse

I want to run a plugin on only the modified files in my Eclipse Workspace. I didn't find any shortcut in eclipse to select only modified files (changed after svn checkout) in the package explorer.
I was hoping there would be an option since Eclipse already shows changed packages with a > symbol.
Note: I want to choose only the changed files and not other files... The Plugin options are not available in the Team Synchronize window for SVN.

No HTTP Preview server for Eclipse Juno in Ubuntu 12.04

I just installed Eclipse Juno on Ubuntu 12.04 (32-bit) and downloaded the Eclipse Web Developer Tools. I created a new Static Web Project but cannot create/use HTTP Preview for the Target runtime to test/run my project. Does anybody know whether this is possible? If so, how would I do this?
You can create the patch and make it work for the Eclipse Juno version you have in the following four phases. Its a bit lengthy but it works
Phase 1: Create a plug-in project for the plug-in you need to patch.
Create a new workspace (recommended) or open an existing one.
Select File -> Import
Expand Plug-in Development, select Plug-ins and Fragments, then click Next
In the Import As section, select Projects with source folders
and then click Next.
Enter (or copy & paste, no quotes)
org.eclipse.wst.server.preview.adapter into ID field at the top and
click Add All. This should move this one plug-in to the right pane.
Click Finish to import the "org.eclipse.wst.server.preview.adapter"
plug-in source into a project.
Expand the root of the project and ensure it contains a folder named
"src". You will only get the "src" folder if you have the "WST Server
Adapter Plug-in Developer Resources" installed.
Phase 2: Apply the changes needed to update the plug-in. Since there is a bug with a patch attached that can be used to apply the changes, the following steps will take advantage of that.
Open Bug 402848 in a browser.
Click on the Patch v1.0 for 3.4.2p attachment link to open the patch.
Starting with the second occurrence of a line starting with ---,
select this line through the end of the text and copy it to the clipboard. This contains the changes to the PreviewLaunchConfigurationDelegate.java file which is where the fix is
needed. You don't want the upper portion of the patch as that would change the version of the plug-in, and that would complicate things.
Back in Eclipse, right-click on the "org.eclipse.wst.server.preview.adapter" project. Select Team and click on Apply Patch.
Leave Clipboard selected and click Next.
Ensure the "org.eclipse.wst.server.preview.adapter" project is
selected, and click Next.
Set the Ignore leading path name segments to 3. The "Patch
Contents" window should change to have a blue left pointing arrow
instead of red x indicators.
Click Finish to apply the changes.
Phase 3: Create the replacement jar. Due to the approach in Phase 1, the name of this jar will be identical to your current jar, which simplifies updating the Eclipse installation.
Right-click on the org.eclipse.wst.server.preview.adapter project in the Project Explorer or other navigator view and select Export
Expand Plug-in Development, select Deployable plug-ins and
fragments, then click Next
Click the Browse button next to the Directory selection in the Destination tab followed by OK. This will set the output directory to be the same as your workspace.
Click Finish to build the replacement plug-in jar. It will appear in
a "plugins" folder under the root of your workspace.
Phase 4: Replace the installed plug-in jar with the fixed version.
Exit Eclipse if it is running.
Under the "plugins" folder of your Eclipse installation, move or
rename the org.eclipse.wst.server.preview.adapter_1.1.101.v20121107_1651.jar if you
don't want to overwrite it with the patched version (mentioned in step 3 below). If you have a different version, it means you aren't using Juno SR2 and hopefully you installed the "WST Server Adapter Plug-in Developer Resources" that matched your version.
Copy the org.eclipse.wst.server.preview.adapter_1.1.101.v20121107_1651.jar from
the "plugins" folder under your workspace and paste it to the "plugins" folder of your Eclipse installation.
You should be able to run Eclipse now with the fixed plug-in. Because the patched jar had the same version number, no additional changes are needed.
I'm not familiar with the tooling you're using, but I had big problems with eclipse's internal browser on 12.04 as it was trying to use mozilla's XULRunner. The packaging of XULRunner has changed in 12.04 due to mozilla's release cycle, and isn't included in the repo independently. I forced my eclipse to use WebKit, by setting the following property in the vmargs section of my config.ini
-Dorg.eclipse.swt.browser.DefaultType=webkit
This sorted my issues out - hope this helps with yours.

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.

eclipse -restore missing projects

For some unknown reason the projects that I created in a workspace are no longer listed in the package explorer tab. The actual files of the programs still exist on the flash drive which was the designated workspace. How do I correct this problem so that I can access the projects in this workspace?
Are you in a different workspace? Try File > Switch Workspace or if you are in the right workspace already, you could try File > Import > General > Existing Projects into Workspace and re-import the projects.
Create new project on the menu, then select the button "Create project from existing source" and select your project directory on disk.
If you are working with Android projects, the straight import does not work. The fastest way I've found to deal with this issue is to move (not copy) the projects to a different location, then import them back into the workspace, making sure copying the files into the original workspace.
At this time, the Android eclipse plugin has a bug in it which will rename your projects to the package names, rather than using the "friendly" names you intended for the projects. Since eclipse quite often seems to drop projects in this way, this can lead to a great deal of frustration. If this bug is fixed, or you know of a workaround, I would appreciate hearing about it.
I had a case where my project disappeared from the workspace and when I tried to import the existing project into workspace, Eclipse reported the project was already in the workspace! So I simply created a new project with the same name/location as the folder in which the project was located. This brought the project back to life in my worskpace. This worked in Kepler version of Eclipse.
I found a way to resolve this issue without creating a new project.
My projects disappeared from the Package Explorer view when I was in the Java EE perspective. When I switched to the Java perspective, they reappeared in Package Explorer.
Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600
Not sure what caused this issue out of the blue and how long this solution will hold.
A simple solution that requires deleting the affected projects from your workspace, then importing them again:
Delete the affected projects from your workspace (do not delete from disk)
Open the files. File >> Open Project from File System >> Select location of files >> Select projects to open.
After you import them, it should work.
Try a refresh (F5) of the workspace.