I'm new to eclipse. I was having a problem with one of my classes so instead of commenting the whole thing out, I right-clicked and clicked exclude. Now I don't know how to bring it back into the project. Wouldn't it make sense for there to be an "include" button right next to exclude? Thanks.
To see everything that is excluded, examine the whole build path in the UI with Project Properties' Build Path.
To access, Right-click on project, Choose Properties and select Java Build Path. You can now browse and remove any exclusions you no longer desire.
See this screenshot if it helps.
Related
I have copied my src package structure from eclipse to intellij and it makes this structure within src folder:
How do I make it dz1.drugi so I can one click expand all to my classes?
Another question is how to select default project folder as it is "workspace" at \Users\{Name} for eclipse. Right now, when I create new project like this:
it saves it without workspace (or projects folder) at \Users\{Name}.
Click on the cog icon at the top-right of the explorer view, and check the "Flatten packages" option.
That said, If you get used to keyboard shortcuts top open classes and files, and navigate through recently opened files, you'll quickly see that you'll amost never use the explorer view anymore.
Project view has an option to compact empty middle packages, enable it. You can also use Flatten packages option. Actually, your question is a duplicate of this one.
IntelliJ IDEA remembers the last location you've used when creating a new project. Once you want to create another project, the location one level upper of the previous project directory would be suggested. So, create a project in C:\Users\someuser\workspace\myproject1 and IDE will suggest C:\Users\someuser\workspace\myproject2 for your new myproject2.
I am using IntelliJ IDEA for scala development, and I find it really annoying that whenever I try and search in the project it returns results from compiled files like things in my target folder or compiled twirl templates etc.
Is there a way to remove this from my search index?
Should they even be visible at all in my "Project" pane?
Right-click the directory in the project tool window and select Mark Directory as -> Excluded, then the find in path action will not show any results from it.
Then, you can deselect the "Show excluded files" option of the project tool window to completely hide the directory.
Is there a way in eclipse to filter/hide empty directory trees in the package explorer view?
This is different than filtering directories like '.svn' or maven's target, or filtering empty packages. It's more trying to clean up empty directories trees that show up as a result of filter rules.
Context- We have a generic project in our workspace that uses filters to ignore non text based files(mp3s, jpgs, etc). It allows us to quickly edit our files in eclipse. The problem is because of the filters there are a lot of empty folders present. If eclipse can ignore any empty folders due to filters it would make the project cleaner.
Update- I filed a bug report in eclipse's buzilla system for those that wish to have this feature:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334052
In Eclipse SDK (I use 3.6.2), to hide empty folders in the "Package Explorer":
At the top-right of the Package Explorer view, there's a downward-pointing triangle. If you hover your mouse pointer over it you'll see "View Menu".
Click the "View Menu"
Selected "Filters"
Put a check next to "Empty Packages"
Click OK
now your empty folders don't show any more.
This doesn't seem to be possible and could make for a good bug report.
As bug 157336 (build output contains unnecessary empty directories) comments:
"foo/bar/" is treated as "foo/bar/**".
So, as I understand it foo/bar/** should exclude the content of the directory and foo/bar should additionally exclude the directory itself.
Meaning you might have to add every empty directory yourself to the Exclude list, which is not practical.
Another solution would be to give Mylyn a try and see if its task context switching could hide any folder you don't need in the current task for you.
can anyone help me solve the issue that I have ?
in fact when I create a project on eclipse, the bin folder doesn't display and I am able to create a javadoc for my project. I need help please.
I don't know what the reason for your question but you can see the bin directory in Project Explorer (not Package Explorer). Here you click the triangle and select Customize View... and remove the click on Java output folders
To change this behaviour and hide the “.class” files you need to do the following.
Find your class output folder in the “Project explorer” window. This is usually called “bin” or “target” for Maven projects
Right-click this folder and click “Properties”
Tick the “Derived” checkbox and click “OK”
“.class” files will now be hidden in future.
Source: http://ayubmalik.co.uk/2011/12/hide-class-files-when-opening-a-type-or-resource-in-eclipse-ide/
If your Eclipse version doesn't allow you to show "Java Output Folders" as mentioned by nanda, then try the Navigator View (From the main menu: Window > Show View > Navigator). The Navigator View shows the bin folder.
Your question is a bit vague but try right clicking on the project and choosing build path, and see if the output directory for your java classes is set to bin. It may not appear in your unless you add some Java source code
Eclipse currently shows the task tags (// TODO) from all open projects. I would be grateful if anyone could point out the preference, where I could restrict the scope of tasks displayed (e.g. only tasks from current project).
In Eclipse Helios (3.6) you can configure the scope.
Down arrow at the top right -> Configure Contents:
Select a configuration on the left (or create a new one) and on the right in the Scope section select "On any element in same project".
There should be a down arrow in the top-right with several options in it. For the old Eclipse the option you want is Filters... And for the newer Eclipse the option is now Configure Contents. At the top of the Configure Contents dialog is a scope selection with options you want, I think.. If not check preferences and search for tasks, or scope. It should be in there somewhere.
Close projects that you aren't working on. Tasks show for any part of the workspace, so remove projects that you arent working on by doing a close operation. (right click on the project in the project explorer and then "close project")
Configure Contents... can be used to filter to things like working sets (if you're not already using working sets, you should), but yet another way is to use Mylyn to filter out any UI elements not relevant for what you're currently working on.
In Eclipse 2019-06:
1- Open the Tasks window.
2- Click on the arrow pointing down ▽.
3- Click on Filters...
4- In the Configurations panel on the left select TODOs (or any configuration that you have saved).
5- Under Scope select On elements in selected projects
6- Click on Apply and Close
Now the task view will only show the tasks of the project where you are at the moment.
Simply close the projects you are not working on.
You can leave them in the workspace, too.
In Eclipse Juno 4.2.1, I found that it's possible to disable specific projects TODO tasks.
In the projects properties open:
Java Compiler > Task Tags
From that page check the option "Enable project specific settings" and remove the TODO entry from the list below, after that the TODO comments from that project won't be shown in Tasks.
You could also remove other tags from the list.
Filtering by working sets works fine, but I had to put the packages into a working set, rather than the whole project.
AFAIK the Eclipse task list is workspace-based and cannot really be filtered by default.