Adding existing project folders to the project explorer in eclipse - eclipse

Probably a very straight forward solution here, but can't seem to find an answer. I recently changed my eclipse workspace to my dropbox folder, so I can work on my netbook when in college and on my desktop when at home. I copied and pasted all my project folders from the old workspace into the dropbox workspace, changed the workspace location in eclipse, but none of the projects are showing up in the project explorer now. Having refreshed the project explorer many times now to no avail, is there any way to add these projects into the project explorer? Thanks

From the main menu bar, select File > Import. The Import wizard opens.
Collapse or click + in General > Existing Project into Workspace and click Next.
Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects.
Under Projects select the project or projects which you would like to import.
Click Finish to start the import.

I have had this problem in many versions of Eclipse and followed the process outlined by #vijin-paulraj, but frustratingly kept failing...
Until I noticed that the checkbox at the bottom of the wizard "Copy projects into workspace" is checked by default, and does not have an eventhandler attached to it. So if you do not clear this box before selecting the directory it will tell you that "Some projects cannot be imported because they already exist in the workspace." Clearing the checkbox after this will not trigger a form refresh and the Finish button will remain disabled.
TIP: once the checkbox is cleared, select the directory again will trigger form validation and allow you to proceed.

Try importing existing project:
http://publib.boulder.ibm.com/infocenter/wf/v2r7m0/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-importproject.htm

The answer for me was to make sure that I was in the correct working set.
I was in the working set from training and had not placed my new project into a working set at all.
While the above answers will most likely place your project into Eclipse, a working set will exclude you from seeing any project that is not placed in it from the package explorer.
My personal answer was to create a new working set to keep it separate from work, via the context menu from the upside down triangle at the top left of the package explorer.
Yours may be to modify your current set by adding the new project to it. This option is also located in the same menu.
My circumstance could have been avoided in the "new project" wizard, if I had placed it in a set from there.
I hope this has been useful. Please, feel free to ask for clarification.

Related

Script to do delete and creation in Eclipse

I'm wondering if anyone can recommend any scripting plugins for Eclipse that would allow me to delete a file from one project and add it to another project as well as change any references from the old location to point to the new one.
Locate the file in Package Explorer. Right click on it. Go to Refactor > Move then select the destination and update reference option. All references will be update automatically. You can also preview changes by clicking on the Preview button.

Beginner programmer using eclipse. Error: Could not find or load main class.

I have read the other posts asking the same question but was unable to get my code to work. I have deleted my meta data and imported my files back in to no avail.
I have my workspace inside my dropbox folder to allow me to code from home or while away. Currently I am using my laptop which is not my primary coding machine. The project worked yesterday on this laptop however.
any help would be much obliged, I will provide any information that is required
First go to the Project menu and select "Clean...". That might solve it right off the bat.
If not, next you should right click on your "src" folder and select "Build Path" -> "Use as Source Folder". Then Clean again.
Try those two things and then report back with results.

How can I tell what dependencies a project has in Eclipse

I had a folder that contained a lot of projects, and imported them into Flash Builder/Eclipse.
I want one of these projects, and I'd like to remove the irrelevant projects from the workspace.
If I remove everything but the project I want, I get errors in the one I want, so it must have been dependent on something.
However, I have no idea what this project is dependent on. How do I find out?
First, close all your projects (select all, right click and then close). Then, select the project you are interested in and open it. You will be asked if you want to also open the dependencies. This will allow you to see what's needed. You can then delete the projects that weren't opened.
Flash Builder and Eclipse both give the option to close unrelated projects. Simply right click and select "Close Unrelated Projects". Delete those that were closed.

Developing an Eclipse Plugin and adding a submenu item to navigator

This is my first attempt at an Eclipse plugin- the plugin architecture is vast and a little overwhelming, but I've found a number of tutorials and how-to's online which is helping, but trying to do the following is driving me nuts:
I want to add a submenu item that is available in the navigator context menu when you right click on an Eclipse project.
I can get a submenu to appear on a project file or folder, but absolutely no idea how to have it appear on a project.
Would someone be so kind as to provide me with step by step instructions, starting with creating a new plugin-project? This is probably a lot to ask, but I can't seem to find an online guide that has just the right amount of detail. I specifically want to use the plugin-project wizard rather than hand code a plugin.xml file as I am not very familiar with the Eclipse plugin architecture.
Ok- I got it- it was simple, but I got lost in the noise of the API-
Create a new Plug-in Project using the Plugin-Project Wizard and when the wizard has launched...
1.
On the Plug-in Project page, use anything as the project name and 3.5 as target platform eclipse version
2.
On the Content page, skip ahead and just press next
3.
On the Templates page, select "plug-in with a popup menu" and press next
4.
On the Sample Popup Menu page, you will see that eclipse has prefilled the field
"Target Object's Class" with a value of "org.eclipse.core.resources.IFile".
This means that when your popup menu will only appear when you right-click on a file in
a project. As we want the menu to appear when we right click on a Project when
we are using the Navigator view, simply use "org.eclipse.core.resources.IProject" instead
5.
Finish
You can validate that your pop-up will appear as expected by right-clicking the MF file
and "Run-as" > Eclipse Application
Now to refactor the resulting code to use menuContributions and commands rather than objectContributions and actions :)
I think you have a similar question (menu in the package explorer) here:
Renaming packages in Eclipse (thanks to Rich Seller)
This could be a good start, and is a complete plugin project.
You should look into the Eclipse Common Navigator Framework there are a few tutorials on this side that tell you what to do in detail The Project Explorer is an implementation of the CNF. You should also consider using the Platform Commands to add your commands (and popup menu item) to the popup menu associated with the project explorer. It's somewhat easier to use commands than actions. You should be able to do it with by adding a Command in your plugin extensions. Unfortunately off the top of my head I don't know the right incantation to have the command appear in the project explorer. But you will be able to find it in these resources.

How to change settings for a Visual Studio 2005 Deployment Project

I have a project containing at least one DLL along with the executable output. I have added a Deployment Project to this solution, which asked me for a name and working directory upon creation like all projects.
I named this "MyProduc_Installer" and have been able to modify all aspects of the installation process except for changing the name of the installer itself. Throughout the install process, the user sees messages like "Welcome to the MyProduct_Installer Installer." Even in the Add/Remove Programs list, this is the application's ill conceived title.
How do I change this setting? I have tried right click/properties, as well as all the View options. I couldn't find anything in the assembly information for the executable project, or solution properties.
I have tried right-clicking on the project in the Explorer to change the properties, but here is what I see:
There is no setting here to change the project title.
If you haven't found the answer to this yet, here is the answer.
Visual Studio has 2 sets of properties for Projects -
1 which you can accesss by selecting the Project in Solution Explorer and then right clicking and selecting 'Properties'.
2nd set of properties is in the 'Properies' window which shows up below the Solution explorer. This is the same property window which is displayed for any of the Form property settings or any other control settings.
The 'Product Name' and other project properties for 'Setup' project can be found in the second property window.
Hope this helps.
AC
The easy way to get to the properties you are interested in is to use the F4 shortcut when the project is highlighted. As stated in previous posts this is a very different list to the one you get by right click and selecting properties.
If you mean a Setup project like for winforms, it's the ProductName property. In Studio, I just click on the project name in the Explorer and I get the property window typical to other projects, and it's right there. Other properties include the AddRemoveProgramsIcon, InstallAllUsers, and RemovePreviousVersions.
I happened across this post, where I was having trouble renaming the Product as well.. In regards to using Click Once Publishing.
Since updating all the old names I couldn't get the Publishing to correct itself.
It was found notepading the project file xyz.vbproj in my case and updating the <ProductName>xyz wrong name</ProductName> element that was still wrong.
It was the only place I could find to update it, since the publishing or any property window didn't expose this.