Showing posts with label WTP. Show all posts
Showing posts with label WTP. Show all posts

Mar 6, 2008

Eclipse CVS

The CVS Repositories view in Eclipse allows you to paste a CVS URL in the "New Repository Location" Wizard. (If you are on 3.3, you can directly paste on the view without the Wizard) In case you want to browse thru the Eclipse CVS repository, here are the URLs you can copy and paste into the wizard.

Platform, SWT, JFace, Equinox, JDT, launcher, UI, update, search, debug, team, etc) are available here:
:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
Mylyn, GEF, CDT, COBOL, VE:
:pserver:anonymous@dev.eclipse.org:/cvsroot/tools
AspectJ, Nebula, EPP:
:pserver:anonymous@dev.eclipse.org:/cvsroot/technology
EMF, GMF, MDT:
:pserver:anonymous@dev.eclipse.org:/cvsroot/modeling
WTP:
:pserver:anonymous@dev.eclipse.org:/cvsroot/webtools
Data Tools:
:pserver:anonymous@dev.eclipse.org:/cvsroot/datatools


If you want to browse thru the CVS, you can use the web based viewer also: http://dev.eclipse.org/viewcvs/
More info on connecting to Eclipse CVS: http://wiki.eclipse.org/index.php/CVS_Howto

Related:
Searching Eclipse Sources

Feb 19, 2008

EMF Packing changes in 2.4

EMF has changed the packaging in 2.4. You need to download an additional jar for docs and source for EMF and XSD. While this might be a good news for those who are bundling EMF in RCP apps, not for the early adopters of WTP. If you are an early adopter, then probably you may want to do vote for the all-in-one package for the milestone builds.

Related:
How does EMF finds the right parser?
Converting EMF Resource to Platform Resource (IFile)
EMF Packing changes in 2.4
Using EMF with XML Catalog

Feb 15, 2008

Using EMF with XML Catalog

When you try to load an XML document using EMF, you might have noticed that the XML Catalog is not respected and might throw parse exceptions. First I thought I had made a mistake in extending org.eclipse.wst.xml.core.catalogContributions and was debugging that. Only after a while I realized that the XML Catalog is contributed by WTP and EMF is not depending on that. So there is no way for EMF to know the existence of such catalog. I found a quick solution using some internal classes. I'm not sure whether its the best, but it works (at least for my requirement)

The idea is when EMF fails to resolve when loading an XML we should get the WTP Catalog and try to resolve with that:


loadOptions.put(XMLResource.OPTION_USE_PARSER_POOL, new XMLParserPoolImpl() {

@Override
public synchronized XMLDefaultHandler getDefaultHandler(XMLResource resource, XMLLoad xmlLoad, XMLHelper helper, Map options) {
return
new SAXXMLHandler(resource, helper, options)
{
@Override
public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
InputSource result;
try {
result = super.resolveEntity(publicId, systemId);
}catch(SAXException e) {
try {
ICatalog catalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
String resolvePublic = catalog.resolvePublic(publicId, systemId).substring(5);
InputStream inputStream = getURIConverter().createInputStream(URI.createFileURI(resolvePublic));
result = new InputSource(inputStream);
result.setPublicId(publicId);
result.setSystemId(systemId);
return result;
} catch (Exception exception) {
throw new SAXException(exception);
}
}
return result;
}
};

}

});

There are many cases where this code will fail (like if you had added the catalog entry by uri/systemId) and there might be a much better way of doing that without using any internal classes. Till I find that, I'm going to live with this hack.

Feb 8, 2008

All WTP early adopters, please stand up

If you are an early adopter of WTP like me, probably you would have gone thru the pain of downloading & installing all the prerequisites of WTP, that too for every milestone build. Of course, EPP has downloads for the milestone builds, but those are not enough. If you compare the versions, JEE version doesn't have source, which I quite often refer for how-tos or as sample implementations of an extension point) and the RCP version doesn't have JST. Recently I found that there is a bug already opened for providing all-in-one version for milestone builds, but its not been done because the PMC is not sure of how many people need it. If you are one of the guys who are in need of such build, do vote here.

Rest of us can download the EPP's Milestone builds here.