Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-patch] Patch for org.eclipse.cdt.ui.tests

> 
> This is a multi-part message in MIME format.
> --------------070209050101010100000103
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Content-Transfer-Encoding: 7bit
> 
> Attached is a patch I am about to commit into org.eclipse.cdt.ui.tests. 
> There are no new tests there, but I have changed all the QNX specific pr 
> numbers to the equivalent bugzilla pr number. The patch also includes 
> some general cleanups (removed unused imports/variables etc.)
> 

Few comments:
- There is a need to rewrite the parser that is constructing the model
  but that should not affect you(testing) at all, since the API should not change.

- I see that you are using org.eclipse.cdt.internal.model.*, in theory
  this is the implementation and they are not visible.   The only thing
  visible is the interfaces.  For example, if I want to see all the
  objects in an archive:

  import org.eclipse.cdt.model.*

  IFile file = ResourcePlugin.getResourcePlugin().getFileForLocation("project/library/libfoo.a");
  ICElement celement = CoreModel.create(file);
  if (celement instanceof IArchive) {
     IBinary[] bins = ((IArchive)celement).getBinaries();
     for (int i = 0; i < bins.length; i++) {
	// What we expect:
        System.out.println("Archive contains object " + bins[i].getElementName());
     }
  }

...

The only entry points are in CoreModel.  One can not create an Archive, like this
   IArchive ar = new Archive("foobar.a");




Back to the top