Is it possible to group projects in Eclipse? - eclipse

Is it possible to group projects in Eclipse? Or maybe have a project with sub-projects?

Eclipse offers working sets. You can reduce the projects shown in the Package Explorer and other places to whichever projects you defined into the working set. You can also show the union of various sets, and similar gymnastics.
You can define/edit/delete working sets from the little triangle dropdown menu on the Package Explorer and similar directory views.

You have two options, as far as I know:
use the already suggested Working Set option: you can create custom groups, use them to focus on a particular area of a project, activate them through Mylin; a really powerful tool indeed
use the basic concept of workspace which allows you to work on many projects and relate them (via the Build path "Projects" tab, and "Java EE Module Dependencies") so that when you need resources from other projects or you need to deploy them along with your main web application Eclipse will do that for you

Using Working Sets, you can add and organize them as shown in the picture :
As you can see my Java projects are in Working sets like Sem1 and TPs.
When you create an all new Project, just add the project to your working set, like this :

What about eclipse working sets? You define a working set and then add some projects to it. Later you could select a working set and only the projects you selected earlier are shown in project explorer.
Simpl grouping to reduce clutter.
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.user/concepts/cworkset.htm

Since Eclipse Mars M5, you can see a hierarchical view of nested projects in the Project Explorer view. In the view menu, click "Projects Layout > Hierarchical". https://www.eclipse.org/mars/noteworthy/#_nested_hierarchical_view_of_projects

Working sets are great, but they don't work if the projects in one working set has the same name as in another, and such occurs in some TI C2000 chip examples that are in different directories.

Related

How to configure a General Working Set in Eclipse?

Use case:
I need to search strings (variable, methods...) in some specific project folders.
Usually for this I'm creating a working set for that project.
If I'm importing another project in the workspace I need to manually redefine a working set for that project.
In my specific case, every imported project has the same folder structure so that it's anoying to define a working set each time I
import another project. I need to add a general working set to the
selected resource so that the result will be: search for a string in
the selected resource using the general defined folder structure in
the working set.
I've searched on the internet and I couldn't find a way to avoid creating a working set for every new imported project.
Question: Is this posibility available in Eclipse?
Since you said that all your project have the same structure(hope the same nature to) you can use this plugin for eclipse and select
Nature Working Set: Projects are automatically added to/removed from
the working set based on their natures
https://code.google.com/p/javadude/wiki/DynamicWorkingSets
Yes is posible: first import all projects in workspace then when you create the working space at the menu where you write the name of working set, you also have to define the working set content, check all projects that you want to be part of that working set. See tutorial here:
http://eclipse.dzone.com/articles/eclipse-working-sets-explained

How to show shortened project names in the Eclipse package explorer?

I work for a big company that has standards on Java project names. Long standards:
com.company.department.subdepartment.stream.project
Rather than let the package explorer take up a sizable portion of my screen, I'm looking for a way to shorten the project names. Mousing over project names shows the full name, but it's still very slow to determine which project I want to look at next with the incredibly long names. As has been answered before, package names can be shortened. I've got a rule set up, but it only works for packages:
com.company.department.subdepartment={department}
Is there a way to do an analogous thing for project names in Eclipse?
Package explorer uses the org.eclipse.jdt.internal.ui.packageview.PackageExplorerLabelProvider class to provide the view labels. Going through the source of this I don't see any support for shortening the project names.
The following ideas depend on how your eclipse workspaces are setup. If you're lucky and you just import project from your VCS, these could work for you.
If you're using maven, Eclipse project names are usually derived from your GAV. The Import as Maven project wizard has options for what pattern to use for the project name based on your maven GAV.
Otherwise, you can sometimes just right click the project -> rename. YMMV if you have any scripts or such that have the project name hardcoded. If you have these constraints, find those scripts and use variables rather than hardcoding.

How do I combine projects in eclipse?

I have a lot of projects in Eclipse and I'm trying to tidy it up with something simple like a folder. Is there any way to do this so i can have, for example all projects for a particular client in one collapsable folder?
You can achieve this organization within eclipse without actually changing the filesystem structure of your projects. The feature, to cut to the chase, is called Eclipse Working Sets.
The gist is working sets are groups of projects or resources, and most of the eclipse views (package view, enterprise explorer, navigator, etc) can honor and switch between working sets.
Create a working set of type Resource, select the projects you want, then in the package explorer carat drop down (I'm looking at eclipse Kepler) you can either have the top-level elements be the working sets (e.g. a folder-like view per client) or you can filter out stuff one working set at a time.
Some other uses for working sets might be projects of certain types, Java vs. C++ projects, etc. as outlined in this older tutorial.

Eclipse plugin to colorize/visually flag entries in the Package Explorer?

I am looking for a way to colorize entries in Eclipse' Package Explorer:
In bigger projects you have dozens of files in a package all listed underneath each other. This makes it hard to find the file you look for (e.g. for right-click operations). So it would be nice if I could manually colorize some entries.
Does a plugin for this exist?
This is one that I was using before. It lets you set rules and tints icons accordingly:
Label Decorator
One way to have Eclipse filter the classes you see is to use Eclipse Mylyn. You create tasks that you work on and Mylyn will remember the packages and classes associated with a certain task. It will then filter out all other classes/packages. This gives you an editor that only shows the information relevant to a specific task.
I suggested Mylyn for a different problem aswell and in that answer I gave a bit more information.

Grouping Files in Project Explorer in Eclipse

I am newbie to Eclipse, I am planning to use it for AVR development with WinAVR and gcc.
The feature I am looking for is the grouping of different files in the project, like all headers together, all source files together and all files excluded from the build together etc.
I tried AVR Studio from Atmel, it has this grouping feature but it lacks several other features which Eclipse supports. Any help to configure Eclipse Project explorer to display the project files in this way would be appreciated and helpful for me to decide the IDE to use.
Note: I know that I can manually add different folders for each of these groups and move the files, but that moves the physical files, and breaks the relative path in the code, and other comilers/IDE's. I am looking for logical grouping of files.
Unfortunately there is no general way for a user to configure the grouping in the Project Explorer, the grouping is setup based on the code that controls the content (i.e. CDT, JDT, etc). I think it would be interesting to have this feature, but it's not clear the UI that can be used to specify it. You are welcome to submit an enhancement request to add this to the Eclipse Platform UI project. And giving an example of how it's done in another product would be helpful.
Thanks Francis, looking at your profile I think I found the right person to solve my issue :)
I have opened it as a bug (as I could not find a feature request in bugzila) Bug 296514 - Logical Grouping Files in Project Explorer in Eclipse
I have attcahed screenshots of both AVR Studio and Eclipse project explorer. That should give you an idea of what kind of UI features I am requesting. I can difinetely provide more information if you want.
I think what you are looking for can be done with Working Sets.