Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dash-dev] File Compare - How to?

Hi there, I just joined the list and have a scripting question.

Please let me know if there is a better forum for this, and also if
there
are archives for looking at already-submitted questions and answers.

I have two text files, same name, in different directories.
I have written a Dash script that can locate both of them using:

   files = resources.filesMatching( reg-expression )
   if( files.length == 2 ) { // expect 2 files to match
      f0 = files[0].getEclipseObject() ;
      f1 = files[1].getEclipseObject() ;
      // How do I do a "Compare with each other" here???
   } // end if

Given these two files, I want to use the Eclipse "Compare with each
other"
capability. I can do this manually by selecting one file, then finding
the
second file and <CTRL>-clicking on it, the right-click-menu -> Compare
->
Each Other. Since these two files live in different directories
(projects)
the manual navigation to find them is tedious--- I want to automate this
with Dash.

Please help me understand how to drill into the Eclipse capabilities 
from Dash. I have not yet been able to find a good reference on this, or
how to find the various capabilities available. I also do not understand
the Dash DOMs and what is available there. My script is using:
 * DOM:
http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemo
nkey.lang.javascript

Thanks for any help you can provide as I learn Dash.

Notes: Why would I want to do this?
I am testing a large SW system in Eclipse. I have one project that is
the baseline
code for the project (let's call that project B). I also have an
experimental version
of the code (let's call that project A). I have a lot of automated
validation cases
that I can run; I run these on both projects A and B. I want all of my
validation cases
to successfully run before I merge A back into B. These validation
results generate
text validation log files in directories A/validation and B/validation,
named caseN.log
or coverageN.log, etc. These projects are large, and navigating into the
each of the
validation directories and locating the specific validation log file,
among hundreds
of log files, is tedious. In validating my experimental version I need
to compare these
log files quite often. I want a Dash script to help me locate and
compare the desired
log files quickly and easily.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Tom Dickens -- Boeing Associate Technical Fellow --
thomas.p.dickens@xxxxxxxxxx




Back to the top