tarlog / tarlog-plugins

Automatically exported from code.google.com/p/tarlog-plugins
10 stars 5 forks source link

Tarlog doesn't work together with IBM's Jazz source control #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Eclipse 3.5 with ibm team configuration c.q. jazz source control 
plugins.
2. Add tarlog plugin in Eclipse.
3. Try 'Open in Windows explorer' or 'Opem in Command prompt'.

What is the expected output? What do you see instead?
Instead of the explorer/prompt you will notice an 'Unhandled event loop 
exeption' in the error log.

What version of the product are you using? On what operating system?
OS windows, tarlog version 1.3.2 or 1.3.0.

Please provide any additional information below.

The error only occurs when a file/folder is under source control. When not 
the excplorer or prompt is shown.

The following lines in the error event details may be relevant:
java.lang.IllegalArgumentException: URI scheme is not "file"
    at java.io.File.<init>(File.java:366)
    at 
tarlog.eclipse.plugins.openwe.TreeSelectionAction.handleResource(TreeSelect
ionAction.java:66)
    at 
tarlog.eclipse.plugins.openwe.TreeSelectionAction.run(TreeSelectionAction.j
ava:45)

Original issue reported on code.google.com by hermans....@gmail.com on 14 Dec 2009 at 11:32

GoogleCodeExporter commented 9 years ago
Please, write 'tarlog-plugins' instead of 'Tarlog' next time :)

Unfortunately (or may be fortunately) I'm not using jazz source control, so I 
won't
be able to validate, test and fix this Issue.

If you can contribute a fix, I'll be happy to apply it.

Original comment by tarlog on 14 Dec 2009 at 12:01

GoogleCodeExporter commented 9 years ago
The issue is with handling of authority URIs. Below change in 
TreeSelectionAction.handleResource should fix the issue

    protected void handleResource(IResource resource) {
        URI locationURI = resource.getLocationURI();
        if(locationURI.getAuthority()!=null)
        {
            try {
                locationURI = new URI(locationURI.getQuery());
            } catch (URISyntaxException e) {
                //raise a NPE
                int i = 100/0;
            }
        }
        File file = new File(locationURI);
        String absolutePath = file.getAbsolutePath();
        doAction(absolutePath);
    }

Not sure how can I contribute to trunk :( how I can become a contributing 
member?

Original comment by rajanika...@gmail.com on 18 Feb 2011 at 7:18

GoogleCodeExporter commented 9 years ago
Hi... I tried what rajanika had but it didn't fix the issue.
My change is

     protected void handleResource(IResource resource) {
        IPath iFilePath = resource.getLocation();
        File file = iFilePath.toFile();
        String absolutePath = file.getAbsolutePath();
        doAction(absolutePath);
    }

This worked for me

Original comment by wingy3...@gmail.com on 20 Mar 2012 at 6:42