When using Mylyn in Eclipse, why do task context elements not show up in the navigator view? - eclipse

I've been using Eclipse for many years. I'm trying to switch into using Mylyn. I've configured a task and it's automatically added a number of files to the context. So far, so good.
However, when the "Focus on Active Task" button is enabled/depressed (in the Navigator View), many of the files in the task context are hidden -- I cannot find them unless I turn off "Focus on Active Task" -- which sort of defeats the purpose.
Why are items listed in the Context not being shown in the Navigator View?

I don't know if you found a solution for your problem, since this question is quite old, but here is what i just found out. For me the problem only occurs if the "Package Presentation" is set to "Hierarchical". Setting it to "Flat" helps. Sounds like a bug to me and unfortunately i prefer the hierarchical view.

It sounds like there are two questions here:
Why are only some files in my context showing when I select "Focus on Active Task"?
How can I view files not in my context when I've selected "Focus on Active Task"?
For item one, Mylyn records every file you touch when working on a task and stores it as part of the task context (see note at end). For large tasks it quickly becomes useless to see every file that you've touched and so Mylyn uses an algorithm to decide which files are most relevant to your task, based on how many times you've viewed and edited them. Thus, when you select "Focus on Active Task" only the most relevant files are shown.
For item two, it is often the case that you'd want to view files that are not shown as part of your context while "Focus on Active Task" is selected, and Mylyn provides a way of doing this. You can view all children files of a visible node by holding down ALT while clicking on that node. The files will become visible temporarily. Similarly, if you do not have any files showing in context you can hold ALT and click in the Package Explorer (or other view of the project) and it will show all files. ALT + clicking is an essential action for anyone who wants to work with their PackageExplorer focused.
The 2.5 minute video Get Task-Focused will help you better understand how focusing the Package Explorer is intended to be used.
David Shepherd Tasktop Technologies, Inc.
Note: You can see every file that is in your context by opening the task editor, selecting the "Context" tab (at the bottom), and then sliding the "Actions" slider to the left.

Even in Eclipse Luna 4.4 the described limitation exists: project explorer package presentation has to be set to flat.
"Known limitations - Bug 106678: The Project Explorer’s Hierarchical Java package presentation layout is not supported on Eclipse 3.3Mx, and interesting elements will be hidden if enabled. Work-around is to use the default Flat package presentation."
(replace "Eclipse 3.3Mx" by "Eclipse >= 3.3Mx" and then it makes sense)
Yes, this bug is getting 10 years old ;-)

Related

show code modification overview in ecplise IDE

i am using an eclipse based IDE and have a library with some files that i need to make additions/changes to. what is the best way to quickly see the all the modifications of all files in a list/tab in eclipse IDE?
i know there is the useful "#TODO" tag that shows all tasks in a nice view/tab. as im using this quite heavily, i would like to have a special view/tab that just shows the modifications and separates them from the todos.
EDIT:
thx for the suggestions and the local history tipp.
sorry for not making myself clearer. ive added a screenshot.
when i add "TODO" the tasks show up in the tab marked in red - i dont mind setting manually something (like a bookmark) as im not going to make a lot of changes, but ideally they show up like the tasks or another simple overview.
It's could depend of your version control system.
For each, eclipse purpose an associated plugin with a specific view.
Instead that, you could use the History view (Team/ Show local History after a right clic on a file).
Eclipse keeps a history of your changes for a limited number of days (configured in 'Preferences > General > Workspace > Local History'). You can right click on a file and choose 'Compare With > Local History' to see the changes between revisions.
To track all your changes you need to use one of the source control systems (such as SVN, GIT, ...). Eclipse has plugins to support these systems. Once you have installed one of these you can use the 'Team' menu to commit changes and look at the history.
found it!
by clicking "window" - "Show view" - "other" one needs to select the "bookmarks". the bookmarks then show up as a tab next to tasks.
by clicking the right small arrow the bookmark view menu pops up (similiar to the screenshot above with the task menu). the bookmark view can then be configured/filtered by clicking the "Configure contents..." menu link.

how to remove google sign in button in eclipse

I'm facing a wierd problem. My eclipse, has a google signin button which is occupying some of the space which I do not want to happen. Initially it had "Sign-in to Google" text along with it. I've followed some blog post and set accordingly to show just the icon (I don't remember that blog post link).
But now, the icon is getting replicating .. it is being shown 12 times. It is actually creating childs :P
I've gone through all the options present in Customize Perspective menu, none of them had this button listed. Can someone help me in removing that google sign button from my perspective? One possible suspect is- my eclipse crashes when I suspend and wakeup my machine.
You can use the Window > Reset Perspective... menu command to reset the perspective to its default state, which might eliminate that toolbar and buttons. If that fails, I would create a new workspace and import the projects into it using File > Import > Existing Projects into Workspace.
If you want to try to salvage your existing workspace, it's possible to do so my manually editing Eclipse's internal file that stores your Workbench layout, but it's a bit tricky. Here are the steps I've followed to eliminate a similar repeated toolbar item:
Exit Eclipse.
Find the Workbench layout file, it's path is <workbench>\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi. Make a backup of this file before you touch it - this is essential because it's easy to corrupt the file if you change the wrong things.
Open the file in your favorite XML-aware editor - most packages of Eclipse include the XML editor that works just fine1, but be aware that if you use Eclipse to edit the file you can't have Eclipse open on the workspace that contains the workbench.xmi you want to edit.
Find the section of <trimBars> nodes in the XML; from there you have to determine which <trimBars> node you need to edit. In your case it looks like a vertical one, probably with a side="Right" attribute.
Under the correct <trimBars> node you'll find multiple <chlidren> nodes, each with an elementId attribute that should help you identify it; you're looking for <children> nodes that are identified as something related to the Google plugin.
Delete the <children> nodes that seem related to the unwanted toolbar buttons. In your case, it appears that there is an entire toolbar that you might want to eliminate, so you might want to delete the entire containing <trimBars> node.
Save the file and start Eclipse on that workspace.
1Some packages of Eclipse include EMF tools that will open it in a special XMI editor that does not provide a view of the source, only a structural tree view. Depending on how you like to work with XML, this might be easier than editing raw XML.
This is not a perspective but a view. You can hover over that bar with the buttons and click Alt+Shift+F1 to check where this View comes from. Then you can either disable/uninstall the contributing feature (Help -> Installation Details) or check where the feature came from.
If it comes from the IDE, you can open a bug for it. If it is contributed from a third party plugin, contact the developers of that plugin.
There is an eclipse bug concerning duplicate view toolbar buttons in Luna that has recently closed as well. Maybe this solves your problem as well.
Edit: Taken from this bug:
root cause is that in Luna 4.4M5 WorkbenchWindowControlContribution.createControl is called twice, the
first time with a null value for
WorkbenchWindowControlContribution.getWorkbenchWindow() while it is
still being created. This is related to what has been reported here
https://bugs.eclipse.org/bugs/show_bug.cgi?id=427452
second cause is that my createControl(Composite parent) method was calling PlatformUI.getWorkbench().getActiveWorkbenchWindow() instead
of WorkbenchWindowControlContribution.getWorkbenchWindow(). This
resulted in an attempt to create a new Workbench Window, which
recursively calls createControl() again. This has already been
reported here https://bugs.eclipse.org/bugs/show_bug.cgi?id=366708

Eclipse tasks from specific files

In Eclipse (Galileo) is it possible to filter the list of TODO and FIXME tasks by a specific file, or several files? Instead of having the whole list for the entire project.
You can select through the upper right arrow of the Task View the option "Configure Content"
From there, you should select a narrower filter like:
"On selected element only"
Steve Chambers mentions in the comments:
To get this to work in Kepler (Eclipse 4.3), I had to tick the checkbox on the "TODOs" configuration in the top left (rather than "Show all items", which is ticked by default).
I am not running Galileo, but slightly older version of Eclipse. However, you can at least filter the task list by task description, if not the file name. Open the menu of the Tasks view and from there choose Configure Filters... Configure Contents.... From there, you can set up a filter that filters data based on the content of task description. Perhaps you can use this to achieve what you want.
(Plus I'm sure that in case new functionality has been added to the filter configuration in Galileo, it will be obvious from the Configure Contents window.)
Hope this helps.
A better approach for your problem would likely be to chose "On working set" from that dialog, "Select...". Then create a working set, it will ask you what files are part of the working set and only display tasks from those files.
I use this to exclude the "vendors" directory in Symfony2, and the "Zend" directory in Zend Framework, which are full of TODOs and errors that pollute these views.
I couldn't see a way to do exactly what you wanted.
In a single file you can open the file and locate the TODO items by the icons in the margin.
You can also open the Tasks view (Window->Show View->Tasks) and sort the tasks by clicking on the column headings. Sorting by "Resource" or "Path" might give you some part of the functionality that you are looking for.
You might also look at the Mylin task management plugin. You can create Mylin tasks from TODO items, and you might be able to to more with Mylin's Task List view than you can with TODO's Tasks view.

How do I limit task tags to current project in Eclipse?

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.

Source Editor Tab order in Netbeans 6.5

I recently switched to Netbeans from Eclipse, and the one thing that I liked about Eclipse I'd like to get in Netbeans:
The order of the tabs at the top of the Source Editor in Eclipse seems to be related to most recently used, so if I have a group of 5 files I'm working on at one time, they are all likely to be visible in the tab list, no matter how many tabs I have open.
In Netbeans, this isn't the case - I don't know what the order is, but it isn't useful for switching between my active files quickly - its usually faster to re-open the file to switch to the correct tab than to actually use the tab system.
Is there an option setting or a plugin that can change this behavior to something more like Eclipse?
By default the tabs in NetBeans are ordered acording to when they were opened. I don't think there's a way how to change it right in NetBeans and don't know about any plugin neither. I think this behaviour is just a matter of taste - I was used to NetBeans behaviour and when I'm using Eclipse, I always get confused about shuffled tabs. But as Kevin said you can drag the tabs to change their order.
When you press CTRL + TAB, the documents in the popup window are ordered acording to last used. This might be usefull for you.
Another (partial) solution might be docking a documents window (Window -> Documents) which contains opened documents and where documents are ordered alphabetically. It's better than re-openenig the files (as you wrote) especially if youre files are spread in different packages and you can't see them in projects/files view on one screen.
I don't think it does. However, you can drag the tabs to the positions you want them in. I would suggest just ordering by your liking manually.