There was a library issue in a file and after fixing it, the red error mark in the line disappears. But the file, package and the project shows with red error mark.
I refreshed but still get the red mark. How to get those marks removed.
Thanks.
There are two different mechanisms for displaying problems in Eclipse. Annotations are a lightweight mechanism that are bound to an editor, and markers are used for displaying the problems anywhere else (e.g. Package explorer).
If the in-line annotation disappears, but the project error mark does not, it means, the annotations and markers became inconsistent. First you should try to save the files (sometimes the annotations gets removed during editing, while markers are only refreshed on save). Of course, you have already saved (else the refresh would not make any sense), so I guess, some markers got stuck.
To remove that marker, open the Problems view (Window/Open view), and find there the corresponding error marker, then remove it (Delete in the pop-up menu).
Related
I have to deal with this problem periodically. Somehow I'm able to fix it but then it comes back and I forget what I did, so I am putting this out there so that others who have this issue can have some relief and I can find the solution to it next time it happens. Eclipse will lose icons for certain things (right now it is the icon for .jar files) and this causes a Java null-pointer exception dialog box to pop-up if you click on it or Eclipse accesses that resource. It will also lose icons for other things. Here I click on the "one-jar" jar file. It results in the dialog box shown.
Something else occasionally occurs with the list of editors when you click on "Open With". This time it is not causing any problems except loss of hair on my end. Right now I am using Oxygen Release Milestone 2 (4.7.0 M2). It happens with prior releases as well. Closing and restarting does not help any.
In Chrome's developer tools, the console displays clickable links pointing to specific lines in JavaScript source files, such as where an exception was thrown.
Upon clicking such a link, the respective file is automatically opened and the line in question is scrolled into view. Furthermore, this line is highlighted with a yellow background ... for a moment. This highlighting quickly fades away. I am working with huge bundled files, and by the time the bundled file is displayed, the highlight sometimes has already completely disappeared.
How can I prevent this fade-out effect, in order to gain more time to do something with the line while it's still conveniently highlighted?
Does Eclipse adjust the position attributes of custom markers when a file is edited?
I have many Eclipse plugins in which I successfully create and delete markers, create quick fixes, and apply edits to the active editor programmatically. When text is inserted or deleted from the buffer all the text in the editor shifts, of course, and Eclipse's markers and my custom markers stay in synch with the text.
The problem is that when the file is edited, whether by regular typing or programmatically by changing the IBuffer, the attributes (e.g. CHAR_START) are not modified - they report the values when the marker was created and first made visible. So when one goes to do a QuickFix on the marker, for example, the reported position is incorrect. (This is an info marker, in CDT, if that matters.)
How are these marker positions supposed to be updated when edits happen?
Is there an Eclipse way to do this, but I need to implement some setting or notification or listener?
One possibility is to implement a ResourceChangeReporter - but it is not triggered for me when text edits happen, just when, for example, a save is invoked. And, if it were, I don't see information about how the file is actually altered.
I suppose I could require that a dirty file be saved before the quick fix is applied, but I still don't see where to obtain information about the file's edits. If I apply the edit programmatically, I know this information, but it does not help when the edit happens by typing.
Marker positions can be updated during editing using an updater declared using the org.eclipse.ui.editors.markerUpdaters extension point and implementing the IMarkerUpdater interface.
However there is a default updater org.eclipse.ui.texteditor.BasicMarkerUpdater which is already active for all markers which should be doing basic position updating for you.
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 am using Eclipse to work on a large Flex project. Whenever I have an error in an actionscript file, it shows nothing in the "Flex Errors" section of Markers but when I open the file that has the error it shows a question mark next to the line where the error actually is.
Is there a way to show these questions marks in the markers section of Eclipse?
Let me know if you need more information!
If you roll your mouse over the question mark, it should show details. Question marks were introduced in Flash Builder 4.5, I believe. They are a kind of "highlight problems as you type."
Often these question marks will turn into yellow exclamations (AKA Warnings) or red Xs (AKA Errors) on saving the file.
However, if you using the include directive to include one ActionScript file inside another, it may show these question marks in the include file, even though there isn't actually a problem.