I have a java project I'm assessing using Fortify. Some of the issues need to be suppressed and if so, a comment needs to be made describing why the issue is being suppressed.
How can I see this comment in the generated application report? I'm using the web interface, not workbench.
The suppressed issue appears, I just want to be able to see the comment along with it.
Thank you in advance.
EDIT:
I am able to work in the workbench if needed.
After awhile of searching I was able to figure out how to go about this.
For starters, I should mention that our Fortify scan was initiated by a Jenkins build. In the web interface, or SSC, I had to navigate to the artifacts tap. From there, I pressed the "Download Application File With Sources" button, which gave me an updated FPR that contained all of the suppressions and comments.
After that I had to use the Audit WorkBench to open that .fpr file. Then I chose not to override the default filter (not sure if that will pop up for everyone) and clicked the "Reports" tab.
I then selected the "Developer Workbook" template from the dropdown then clicked Issue Filter Settings. I checked "Suppressed" and deselected Collapse Issues (only Suppressed should be checked).
Next, I added a filter for only high's and criticals by selecting advanced to the right of filter and choosing "fortify priority order", "does not contain", "low" or "medium". There's an "||" to the top right you can click to have an additional filter.
Then I selected generate and it worked! The comments for suppressed issues will appear under "Audit Comments" in the report for each issue. Hope this helps others in the future.
Related
Ctrl+Space is not showing proposals. e.g sysout or arr. is not working. I tried to restore default from Content Assist-> Advanced.
But, the changes which I make does not get saved and it reverts back to the original settings in preferences. Has anyone encountered this before? Any help will be much appreciated.
This is actually kind of common in eclipse.
Although this link doesn't describe the exact symptoms you have stated, the solution it proposes may be able to solve your issue:
http://mschrag.blogspot.co.nz/2009/01/open-type-cant-find-your-class.html
Quit Eclipse
Go to workspace/.metadata/.plugins/org.eclipse.jdt.core
Remove *.index and savedIndexNames.txt
Restart Eclipse and search Ctrl+T for the offending type. The indexes will be rebuilt.
Try doing that. If it still doesn't work, try to delete the class itself, and re make it. Just copy and paste. Again, you mentioned the default preferences:
Windows > Preferences > Java > Editor > Content Assist > Advanced
The Eclipse help page tells to restore:
Select the proposal kinds contained in the 'default' content assist list:
Other Java Proposals,
SWT Template Proposals,
Template Proposals,
Type Proposals
Now, also go in here:
Window > Preferences > Java > Appearance > Type Filters
And make sure that you didn't filter out random stuff that you don't want to filter out. Also try to just disable everything there.
Let me know if it helped!
I have the same problem on Eclipse Neon.
It may be linked to Code Recommenders because only the "Java Proposals (Code Recommenders)" item will be saved when checked.
But when you uncheck this item it will allow you to save some other items. I don't understand why but some items will still remained unsaved.
I have the problem that with merchandise where there multiple options (t-shirt sizes, etc) that the 'add to cart' button is missing. It is OK where there there is only one option - a cd for example. I have entered all the info, stock numbers, prices, etc.
The problem persists if I turn off all other plugins. I can't see an error in the Java console (I tried a plugin that is supposed to fix java errors anyway) and the add to cart button is visible if I switch to another theme. Be great of someone who has been down this path can get me started on finding a solution.
Thanks for you help!
http://5.133.182.68/~knifewor/product/knifeworld-gold-logo-t-shirt/
Update
Turning debugging on I can see the following error:
Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/knifewor/public_html/wp-includes/functions.php on line 3245
Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/knifewor/public_html/wp-includes/functions.php on line 3245
Notice: Cookie cannot be set - headers already sent in /home/knifewor/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 375
Notice: Cookie cannot be set - headers already sent in /home/knifewor/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 375
Notice: Cookie cannot be set - headers already sent in /home/knifewor/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 375
And I now notice on the shop page the footer fails to load.
There is a php error in the page. You need to turn on the WP_DEBUG to see the error.
Normally, if the problem goes away when you switch themes, especially if there's no JS error, then we can assume the problem is in your theme's WooCommerce templates. They are probably out of date. I fixed a lot of themes that "broke" when WooCommerce updated to 2.0/2.1.
In the admin, under WooCommerce go to System Settings and at the bottom of the page you should see any templates that are being overridden in the theme. I think it should also say which templates are out of date.
If you view source you will see the page is incompletely loaded. This means wp_footer() is never run and therefore all the scripts that belong in the footer are never loaded... including WooCommerce's add to cart scripts.
Therefore, I second #sabanix's answer to turn on WP_DEBUG. The problem may or may not be in your theme's WooCommerce templates, or a more generic error in your theme.
If I had to guess, it is probably single-product/add-to-cart/variable.php template. I would suggest renaming it (or deleting it) so that WooCommerce will use its default template and see if that resolves it.
I just discovered that my NetBeans suddenly stops importing classes that are found in the Java API but can still import classes from my external libraries. Take a look at the image below:
As you can see, List and ArrayList are classes from the java.util package but the usual suggestions for importing them are not shown here, instead it is asking me to create class. I know that I can type import java.util.List; on the top of the code but life was better before! Please I need help thanks.
I had the same problem a couple minutes ago... Terrible. The same problem has been reported here:
Bug 235712
The solution which I've found there was sufficient - simply delete the Netbeans cache...
In order to do this, go to Help ==> About . Then go to the directory with cache and delete all you find in the "index" catalog.
After restarting the NB, everything was cool.
Today I came across the same problem. It happens that it actually is very easy to exclude a class from code completion if you click in the wrong place while working.
To solve it (netbeans 8.2) go to
Tools - Options -> Editor tab
Then select Code Completion Tab
In the drop Down select JAVA (in my case it was Java)
You will find a box bellow titled Package/Classes
In the EXCLUDE tab you probably will find the packages marked to be excluded from code completion. Just remove the ones you want back.
Check under Preferences->Editor->Code Completion to make sure auto complete is on, though by your screen shot I assume that it is.
Also try Preferences->Editor->Formatting and set your Language to Java
In my case, NetBeans was refusing to suggest Scanner. As it turned out, all I had to do was remove java.util.Scanner from Options » Editor » Code Completion » Packages/classes: » Exclude. Then the autocompletion for Scanner returned.
I have several different processes within a single project that I work on. I am constantly opening and closing tabs(java files) in the code editor for that particular process. Each process almost always uses the same java files.
I was wondering if it is possible to save what files are opened as part of the working set so I can select what working set I want and have all the java files open that I will need to work with. Currently the working set just sets the tree to these files, but I am looking to also have it open the files I need.
I hope this makes sense...
Mylyn should be your answer here.
Mylyn is a task-focused interface for Eclipse that makes working with very large workspaces as easy as working with small ones.
Mylyn extends Eclipse with mechanisms for keeping track of the tasks that you work on.
Mylyn monitors your work activity on those tasks to identify information relevant to the task-at-hand. Mylyn monitors Eclipse and captures your interaction in a task context.
System artifacts such as files, types, methods, and fields get assigned a degree-of-interest based on how recently and frequently you interact with them.
This results in uninteresting elements being filtered from view within Eclipse, allowing you to focus in on what is important.
Following Saheed's answer, don't miss CodeKiller's comment:
You can
Activate the task to reopen all files and
Deactivate the task to close all the files.
Bookmarks (mentioned here by user1039663) is a valable alternative.
Eclipse provides multiple ways of structuring the IDE desktop:
Perspectives: Customization of the positions of open and closed views and editors. You can copy and rename existing perspectives like the Java perspective and suit them to your needs by customizing them. See the Window menu or right-click on the perspective icon in the upper right corner
Task Management Tools like Mylyn: see answer by VonC
Multiple Windows: You can open new windows and move them to your second monitor. Select Window > New Window to open a new window. Each window keeps track of its own open editors.
Multiple Instances of Eclipse: You can always use multiple workspaces and multiple instances of Eclipse. However, this is only recommended when working on different projects, as both instances would overwrite each others files when rebuilding.
Hotkeys: By using shortcuts like Ctrl-T and Alt-Left/Alt-Right and Ctrl-Q you can quickly jump to previous locations where you have edited source files. This is a great help in navigating the open workspace.
Extended VS Presentation provides capabilities to save sessions.
Unluckily, it only works with Eclipse 3.1 to 3.8:
Project page at Eclipse Marketplace
The accepted answer tells us which tool could be used but does not provide a quick and dirty explanation on how to use it.
In my case, I hadn't finished researching a large code base but I needed to save my progress so I could return to it later hence the need to save all open tabs using Mylyn.
If you already have Mylyn installed, navigate to Window -> Show View -> Task List to view the list of tasks. If you've never used it before, the list will be empty.
Right-click inside the Task List view then New -> Category to create a new category. Right-click again New -> Task to create a new task.
Double-click on the task you just created then click on the Context tab at the bottom left of the view.
Now navigate to each tab which you would like Mylyn to save by clicking on the tab name. Notice how an entry for the source file for that tab is added in Context tab of the Task List view.
Once you've cycled through all the tabs you'd like to save, you can confirm they were saved by closing each one and double-clicking the source file in the Task List to restore the tab.
I've edited this answer as per below comment (include essential parts of answer in this post).
Yes, you can save off groups of tabs in Eclipse by installing this Session Manager plug-in.
I've wanted this functionality in Eclipse as well. I recently wrote a feature and have been successfully using it for a few months now. It is a new OSGi type extension and works with Eclipse Neon and above.
Here's how to install it.
In Eclipse, go to Help → Install New Software
Click “Add”, enter a name like “Editor Sessions” and the following URL.
http://spillikinaerospace.com/eclipseInstall/
Unckeck “Group items by category” to see the feature.
Check the box that says “Editor Sessions Manager” and click Next.
Read and agree to the short license agreement.
Click the remaining install buttons.
Allow Eclipse to restart.
Full set of instructions are here: http://chrishull.com/projects/eclipse/
Please give it a try and send comments. I've found it a very useful tool as I work with several Eclipse projects at once and need to recall file groups.
Hope you enjoy it;
-Chris
In addition to all mentioned... Did you try Bookmarks? You can save multiple bookmarks into one set, there are bookmark sets management option and you can add descriptions with prefixes to group bookmarks on the same set. Finally and more important: you can select multiple bookmarks, select goto and multiple editors will be opened at once.
You need a Macro. Searching using this term at Eclipse plugin sites like eclipseplugincentral.com and so on must yield enough suggestions, for example Practically Macro. Good luck.
Lately I've been getting these 2 strange error messages in Eclipse. These happen the first time i press . , such as in MyClass.myMethod(), pressing the . causes these messages to popup. They show up only the first time after Eclipse is started and don't show up again until next restart.
First error:
Second error:
These might be related to some new updates that I installed on Eclipse. Any ideas how to get rid of them?
Any Eclipse errors should be logged, so see if you can see them in the Error Log view. Open it either by pressing Ctrl+Shift+Q, L or using the menu Window > Show View > Error Log.
As Yuval A suggests, either find the existing bug (and read any workarounds) or report a new one in bugzilla - you'll be helping out Eclipse developers and users (not to mention yourself) by reporting the problem.
I get those as well from time to time. Bug in Eclipse, I believe.
Check out the content assist bug list. If nothing there is relevant to your specific situation you can open a bug.