I have a customized view. I basically Move an element from one folder to another.
After Move i am setting the selection on the new element. Still the Eclipse Undo is not enabled. I expect it to come as "Undo Move Resources" as it happens in Project Explorer.
Could anyone please tell what basically needs to be done for the "undo move resources" to be enabled? how does it work?
Regards,
Pavitra
Undo seems not to be implemented in your customized view so there is no chance to enable it. You might ask the author to build this feature for you.
You can use the org.eclipse.ui.ide.undo.MoveResourcesOperation class to perform a resource move operation with Undo. You use something like:
AbstractWorkspaceOperation op = new MoveResourcesOperation(resources, destinationPath, "label");
PlatformUI.getWorkbench().getOperationSupport()
.getOperationHistory().execute(op, monitor,
WorkspaceUndoUtil.getUIInfoAdapter(messageShell));
You might be able to use org.eclipse.ui.actions.MoveResourceAction which does all the work for this. See also org.eclipse.ui.actions.MoveFilesAndFoldersOperation and org.eclipse.ui.actions.CopyFilesAndFoldersOperation
Related
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
I know there are about a million questions on this topic, I have read them and they have been unhelpful so far. I am very new to eclipse so forgive me if I get things a bit wrong.
I have an eclipse project with some Lua files. I am using Luaeclipse to provide a Lua perspective and syntax highlighting.
I simply want to be able to do this:
-- TODO Implement this thing
And have it show up in the Tasks view. I know this is possible, but it just won't work for me.
Under Project > Properties, I have gone in to Lua settings and set the "Enable searching for Task Tags" checkbox, and I have double checked the the tags I am searching for are correct.
I don't know what else to do, this should be easy.
Edit
Here is what my workspace looks like, with the relevant settings shown.
Adding task tag in Lua editor didn't trigger adding task into "Tasks" view. I think it may be a bug of the eclipse plugin in Luaeclipse.
Declare that, i haven't used Luaeclipse. So, maybe you should check whether it support tasks tag in Lua editor firstly. The way to check follows:
You can open menu "Window" -> "Preferences", then filter by text "Task Tags".
If there is no "Task Tags" under "Lua"(Or something else), maybe you can't use tasks tag in Lua editor.
If there is, maybe you can try to trigger adding task manually.
You can set "Case sensitive task tag names" to be checked and "Apply". Then there will be a dialog to let you decide whether rebuild project to scan task tag, and select "No" (we don't want to change it really, just let its state change.)
Select "Restore Defaults" and "Apply", the dialog would pop up again. In this time, you can select "Yes" to let it scan tasks tag in your project to trigger adding tasks into "Tasks" view.
Hope what I supposed works.
Edit: Maybe, you can try LDT(Lua Development Tools), it works well.
Turns out my project wasn't in the build path... Adding it fixed everything.
Try to "touch" or "tickle" the lua file in question: Make any little edit (add and remove a space) then save it. If your scenario matches mine, the TODOs will magically appear.
I want to remove this toolbar shown in the image. I have tried disabling all other items in the toolbar but this one doesn't seem to go. This toolbar is blocking my editor's space and I want to get rid of it. Please tell me a way to remove this.
Thanks
I think you could try writing your own WorbenchWindow or WorkbenchPage (not sure exactly which right now) and overwrite maybe createWindowContents.
See this from here (i got this quote from there, but maybe you can find a book or better reference for this):
There are limitations as to when you can override the Workbench
window. The Workbench's default implementation of
createWindowContents() creates controls that are not available to
clients, such as the job progress area, the trim that docks fast
views, and the perspective bar. When you override
createWindowContents(), you lose these areas.
There's no way of removing it. I have tried finding solutions but it isn't customizable
Hey looks like they solved this issue in eclipse juno .. just download juno and life is good !
Which version of eclipse you are using?You can toggle the toolbar visibility by clicking Window->Hide Toolbar or Window->Show toolbar
In Eclipse you can show CVS annotations (which user changed which line in which commit) for a file by choosing Team->Show annotations... from it's context menu. However, I want to enable this for all files in my CVS projects by default. Is there a way to do so?
Found the same problem in svn in eclipse. To avoid clicking, which is slow, I set a hotkey for show annotations. It is not the full solution but faster than clicking every time, you want to use show annotations function.
Short answer: no. Unfortunately not. This is not a preference.
I use an older plugin called Veloeclipse for editing Velocity templates in Eclipse. There's been no development on this since 2009, which isn't a problem because it's mainly just for syntax highlighting and format validation. The really annoying thing about it, however, is that when I try to do Show In to view the current Velocity template within my Package Explorer or Project Explorer, the only available option is Properties. That's not really useful. I really need to be able to get to the file in one of the regular explorer views.
So I have sort of two questions:
Is there a way to configure this without having to monkey with any code? A configuration file or something? I've grepped through my Eclipse installation and haven't seen anything, but I'm hoping that there's something I'm missing.
So assuming that the answer to my first question is no, how do I go about modifying the plugin code so that it will show more than the Properties view in the Show In menu? Most of what I found on the plugin development wiki comes from the other direction: how to make your view or perspective appear in the Show In menu.
Any help with this would be hugely appreciated!
Try to check the plugin source code. it might do something different than other editors. What I mean is that the show in menu item that you have there is not the usual extension point but a hard coded context menu option.