Bug 281161 - VPG Problems View Addition
Summary: VPG Problems View Addition
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.For Internal Use (show other bugs)
Version: 4.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 287762
  Show dependency tree
 
Reported: 2009-06-22 19:01 EDT by Timofey Yuvashev CLA
Modified: 2011-01-31 07:58 EST (History)
2 users (show)

See Also:


Attachments
Initial implementation of VPG Problems View (63.36 KB, patch)
2009-06-22 19:01 EDT, Timofey Yuvashev CLA
g.watson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timofey Yuvashev CLA 2009-06-22 19:01:53 EDT
Created attachment 139822 [details]
Initial implementation of VPG Problems View

An intial implementation of VPG Problems View
Comment 1 Jeffrey Overbey CLA 2009-06-23 14:26:13 EDT
For the record...

The goal here was to create a view that is similar to the regular Problems view (similar layout, icons, options, behavior, etc.), but logs (only) VPG error and warning messages.

The VPG is (in essence) Photran's internal database that keeps track of where modules, subroutines, etc. are defined and where they are referenced.  It's used for refactoring, Open Declaration, Find References, etc.  It's populated using our own parser, not the user's compiler.  A lot of the VPG errors will be similar to those from a compiler: syntax errors, undefined references, etc.  But there are other ones as well.

In contrast, the ordinary Problems view is populated by (CDT) error parsers, which scan the compiler's output for error messages and turns those into problem markers.

The biggest issue is that the VPG error log will probably contain a lot of errors that the user wants to ignore, or at least postpone dealing with.  Our parser has a few known bugs; it doesn't support C preprocessor directives (yet); it has to be configured separately from the compiler to look for include files and modules; etc.  On the other hand, compiler errors need to be dealt with immediately.

So, basically, the VPG Problems View often has similar content to the Problems view, but we want to make it separate.  If the Problems view contains errors, the user has to fix them before his code will compile and run, because the errors actually came from the compiler.  If the VPG Problems view has errors, the only thing they limit is what can be refactored, or when Open Declaration will work, etc.  (Actually, "VPG Problems" is meaningless to the end-user... we need a more descriptive name for that view, but I'm not sure what that should be yet...)

In Photran now, if you click on Refactor > (Debugging) > Show VPG Error Log, it will dump the error log as a bunch of text.  It also shows up when you try to refactor a Fortran problem: one of the wizard pages is a list of errors and warnings. 
Comment 2 Jeffrey Overbey CLA 2009-06-23 14:26:41 EDT
Tim,

Can you please confirm that

1. you wrote 100% of the code without incorporating content from elsewhere or
relying on the intellectual property of others,

2. you have the right to contribute the code to Eclipse, and

3. you have included the EPL license header in all source files?

For #1, if you borrowed code from either Photran or CDT, that is fine, as long
as you state that explicitly.

Thanks.
Jeff
Comment 3 Timofey Yuvashev CLA 2009-06-25 17:23:44 EDT
Jeff,
1. I certify that I wrote my own code to implement that view. I relied on some examples from "The Java Developer's Guide to Eclipse" second edition and "Eclipse: Building Commercial-Quality Plug-ins" second edition.

2. I have the right to contribute the code to Eclipse

3. I have encluded EPL license headers in all files that I created
Comment 4 Jeffrey Overbey CLA 2009-07-08 10:28:05 EDT
This is entered as CQ3401 and is waiting on approval.

http://dev.eclipse.org/ipzilla/show_bug.cgi?id=3401
Comment 5 Jeffrey Overbey CLA 2009-08-12 14:31:02 EDT
Sharon Corbett suggested the following changes to attribution notices during the IP review:

1.  VPG ProblemLabelProvider.java and VPGProblemContentProvidder.java

Current -
 * Most of the code was copied from Java Developer's Guide to Eclipse, Chapter 18.
 * (http://www.jdg2e.com/jdg2e_CD_for_eclipse321/plug-in_development/examples/com.ibm.jdg2e.view.marker/src-marker/com/ibm/jdg2e/view/marker/MarkerLabelProvider.java)

Suggestion - “Based on samples provided in Java Developer’s Guide to Eclipse, Chapter 18 (http://www.jdg2e.com/ch18.views/doc/index.htm);
© Copyright International Business Machines Corporation, 2003, 2004, 2006. All Rights Reserved.
Code or samples provided herein are provided without warranty of any kind.

------------------------------

2.  OpenMarkedFileAction.java

 
Current -
 * This class is roughly copied from OpenAction in CDT package (org.eclipse.cdt.internal.ui.actions.OpenAction)
 * @author Timofey Yuvashev

Suggestion - Based on OpenAction in CDT package (org.eclipse.cdt.internal.ui.actions.OpenAction)

---------------------

3.  TableSorter.java and MarkerFilter.java

Current -
 * Most of the code was copied from Eclipse JFace TableView Tutorial
 * (http://www.vogella.de/articles/EclipseJFaceTable/aritcle.html)

Suggestion – Based on Eclipse JFace TableView Tutorial; Thanks to Lars Vogel for posting the tutorial (http://www.vogella.de/articles/EclipseJFaceTable/aritcle.html)
Comment 6 Jeffrey Overbey CLA 2009-08-12 15:46:34 EDT
CQ approved subject to modification of attribution notices; patch and modifications committed to CVS

Classes moved to org.eclipse.photran.internal.ui.views.vpgproblems