iTrace-Dev / iTrace-Eclipse

Eclipse plugin to identify textual and interface elements based on iTrace Core gaze data
GNU General Public License v3.0
5 stars 2 forks source link

write eclipse plugin data to file #1

Closed sahaz closed 5 years ago

sahaz commented 6 years ago

See https://github.com/SERESLab/iTrace-Core/issues/1 for format.

dtg3 commented 6 years ago

Current plugin xml output format does not meet format described in issue1 for iTrace-Core (see original issue post link).

dtg3 commented 6 years ago
and children tags should be removed. We only need line/col
dtg3 commented 6 years ago

XML now has correct attribute names and we have dropped the data.

Additionally, the plugin does not make the calls to the AST manager to create SCES. Presently AST Manager is used for the open file path. This might be able to be refactored out. We can then examine the need for the AST Manager class all together.

dtg3 commented 6 years ago

I have dropped line information all together from the plugin side. The line information isn't just the line from the file, the eclipse AST thing gets the entire subtree, which from working more closely with the srcml, I understand why that is much easier.

If it isn't possible to extract the a line of raw text from the editor, my suggestion for acquiring lines (if we need that now or later) might be easier just to literally take them right from the raw source code files since the line information should be a one to one mapping. This would alleviate additionally processing by the plugins and could be performed in post. Thoughts?

Here is what we have so far (abbreviated example). @shbonita @ashwin9999 Does this seem sufficient?

<?xml version="1.0" ?>
<plugin>
<environment>
<screen-size width="1366" height="768"/>
<application type="eclipse"/>
</environment>
<gazes>
<response object_name="Project Explorer" type="view_part" x="5.0" y="603.0" timestamp="2018-05-08T12:55:03.463-05:00" event_time="51959451225343"></response>
<response object_name="AbstractColorSlidersModel.java" type="java" x="371.0" y="168.0" timestamp="2018-05-08T12:55:22.232-05:00" event_time="51978219531897" path="C:\JHotDraw7\src\main\java\org\jhotdraw\color\AbstractColorSlidersModel.java" line_height="15" font_height="10" line="5" col="7" line_base_x="325" line_base_y="163"></response>
<response object_name="AbstractColorSlidersModel.java" type="java" x="371.0" y="168.0" timestamp="2018-05-08T12:55:22.248-05:00" event_time="51978235766773" path="C:\JHotDraw7\src\main\java\org\jhotdraw\color\AbstractColorSlidersModel.java" line_height="15" font_height="10" line="5" col="7" line_base_x="325" line_base_y="163"></response>
</gazes>
</plugin>

If this is enough data for the demo, then we should be able to close the issue.

shbonita commented 6 years ago

Short answer: For ETRA demo, we don't need to have line info from plugin.

Here is my thoughts on the subject Even if you get the entire subtree, could we just prune to the most specific element which should be the line it was on?

I believe we were getting a line of raw text from the editor before in Archive. I think it would be best if we could save the line of text on the fly. Yes it should be a one to one mapping but when thinking about supporting editing in the future, it would be a nice sanity check to have it recorded in real time.

The data looks good so far. We would have many more of those object_names in the future such as "Search Dialog", "Search Results", "Put view name here".