make me an eclipse view (with less plumbing): the ptp external tools framework feedback view

11
EclipseCon 2010: Beth Tibbitts Make Me an Eclipse View … the PTP ETFw Feedback view Copyright © IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. 1 Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framework Feedback View Beth R. Tibbitts IBM Corp. [email protected] March, 2010 EclipseCon 2010, Santa Clara This material is partly based upon work supported by the Defense Advanced Research Projects Agency under its Agreement No. HR0011-07-9-0002

Upload: bethtib

Post on 22-Jan-2015

1.443 views

Category:

Technology


0 download

DESCRIPTION

eclipsecon 2010

TRANSCRIPT

  • 1. Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framework Feedback ViewBeth R. Tibbitts IBM [email protected] March, 2010EclipseCon 2010, Santa ClaraThis material is partly based upon work supported by the Defense Advanced Research Projects Agency underits Agreement No. HR0011-07-9-0002 EclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 1 Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license.

2. Background/Motivation You have a tool that generates information about a (source code)file, including line numbers You want to display the information to the end-user is a way thatmakes it easy to navigate to that src code line Like the Problems view You dont want to write a lot of Eclipse plumbing code Problems view shows error Double-click on errorto go to src line EclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 2Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentationis licensed under Creative Commons Att. Nc Nd 2.5 license. 3. ToolETFw Feedback view? FilePTP External Tools Framework (ETFw) Provides simple way to integrate execution of existing(command-line?) tools into eclipse workbench But if your tool (launched from ETFw or not) has results, how toshow user src lines that are relevant? Answer: ETFw Feedback view You provide:output file (e.g. xml file with info about src files and line numbers)A simple Parser that creates IFeedback items from your file(xml parser basics are in the sample) ETFw Feedback view provides:View with your items in a TreeTable view, mapped to src linesEclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 3 Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. 4. ETFw Feedback view What it looks like Select sidefile Select feedbackaction Show view Double-clickline in viewto highlightline of src EclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 4 Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. 5. ETFw Feedback view how to use See sample project:dev.eclipse.org / tools / org.eclipse.ptp / toolsProject: org.eclipse.ptp.feedback.sample Add menus/actions, as desired to invoke Name your parserrecognized by initial nodein side file (e.g. root XML node) Name your view Implement the actionMost of the above classes are simple extensions of the base classes. Except..EclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 5 Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. 6. ETFw Feedback view parser you implementExcept for the parser that interprets your side file and createsobjects that can be shown in the view etc.EclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 6Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentationis licensed under Creative Commons Att. Nc Nd 2.5 license. 7. Sample XML file Root XML node identifies type of file Parent node can beused to group itemsin Feedback viewTreeEclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 7 Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. 8. ETFw Feedback view with compiler reports Compilerattemptsat inliningetc. Action canbe attached.Refactoring?EclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 8Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentationis licensed under Creative Commons Att. Nc Nd 2.5 license. 9. ETFw Feedback view with Bottleneck reportsEclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 9Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentationis licensed under Creative Commons Att. Nc Nd 2.5 license. 10. Summary Feedback view provides simple/easy way to view results of external tools Good reviews from users Can attach other actions to leverage data from the tools PTP 3.0.x contains framework/abstract code for Feedback view PTP 4.0 in Helios too No concrete views; Sample project in CVS Simple Implementation now Some limitations now Open to suggestions on extensions / other usesEclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 10Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. 11. References Parallel Tools Platform: http://eclipse.org/ptp ETFw wiki page: http://wiki.eclipse.org/PTP/ETFw/PTP_External_Tools_Framework ETFw Feedback view specifically:http://wiki.eclipse.org/PTP/ETFw/PTP_External_Tools_Framework_Feedback_View EclipseCon 2010: Beth TibbittsMake Me an Eclipse View the PTP ETFw Feedback view 11Copyright IBM Corp. 2010. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license.