Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » PDE/API Tools : Exclude List with Regular Expressions
PDE/API Tools : Exclude List with Regular Expressions [message #527763] Fri, 16 April 2010 12:09 Go to next message
Wolfgang Rieger is currently offline Wolfgang RiegerFriend
Messages: 4
Registered: July 2009
Location: Vienna
Junior Member
I am using PDE/API Tools, especially the Ant Task "APIFreezeTask" (org.eclipse.pde.api.tools.internal.tasks.APIFreezeTask)

I want to use regular expressions in the ant task as described in the documentation

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-ant- task.htm
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .pde.doc.user/reference/api-tooling/ant-tasks/apiuse-ant-tas k.htm

for example :

# exclude list
R:at.allianz.external.Tool*


The regular expression does not work. So I debugged the APIFreezeTask, and found out the following in
org.eclipse.pde.api.tools.internal.util.Util :

    public static Set initializeRegexExcludeList(String location, IApiBaseline baseline) {
        ...
        while ((line = reader.readLine()) != null) {
            if(line.startsWith(REGULAR_EXPRESSION_START)) {
                if(baseline != null) {
                    Util.collectRegexIds(line, list, baseline.getApiComponents());
                }
        ...
    }


So if baseline is null, the regex will not be evaluated.

The only reference to this method is in org.eclipse.pde.api.tools.internal.tasks.CommonUtilsTask :

    protected static Set initializeExcludedElement(String excludeListLocation) {
        return Util.initializeRegexExcludeList(excludeListLocation, null);
    }


So, baseline is null for sure. So the regex will not work for sure.

How was this intended to work ?
Will this work in any future version ?
Am I wrong in my analysis ?
Did I oversee something ?
Is there a workaround ?




Re: PDE/API Tools : Exclude List with Regular Expressions [message #527802 is a reply to message #527763] Fri, 16 April 2010 14:30 Go to previous messageGo to next message
Michael Rennie is currently offline Michael RennieFriend
Messages: 67
Registered: July 2009
Location: Canada
Member


> So, baseline is null for sure. So the regex will not work for sure.

This is indeed a bug. I opened a new report here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=309481

> How was this intended to work ?

As the doc states the baseline is required, and it should be passed in to compute the exclude list entries

> Will this work in any future version ?

We will fix the issue for 3.6M7

> Am I wrong in my analysis ?
> Did I oversee something ?

Nope, you are correct, this is broken and will be fixed

> Is there a workaround ?

Sort of - you would have to explicitly exclude every entry, and not use the R:<pattern> style expression
Re: PDE/API Tools : Exclude List with Regular Expressions [message #527806 is a reply to message #527802] Fri, 16 April 2010 14:44 Go to previous messageGo to next message
Wolfgang Rieger is currently offline Wolfgang RiegerFriend
Messages: 4
Registered: July 2009
Location: Vienna
Junior Member

Thank you for the fast response.
Re: PDE/API Tools : Exclude List with Regular Expressions [message #527860 is a reply to message #527806] Fri, 16 April 2010 17:10 Go to previous messageGo to next message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
The documentation should also be updated as it doesn't talk about regular expressions for the api freeze task.

Olivier
Re: PDE/API Tools : Exclude List with Regular Expressions [message #527883 is a reply to message #527860] Fri, 16 April 2010 18:47 Go to previous messageGo to next message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
For:

R:at.allianz.external.Tool*

do you mean any bundle that starts with R:at.allianz.external.Tool ?

If yes, this is not a valid regular expression if you want to match what I just describe.

Olivier
Re: PDE/API Tools : Exclude List with Regular Expressions [message #605607 is a reply to message #527860] Fri, 16 April 2010 18:47 Go to previous message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
For:

R:at.allianz.external.Tool*

do you mean any bundle that starts with R:at.allianz.external.Tool ?

If yes, this is not a valid regular expression if you want to match what I just describe.

Olivier
Previous Topic:PDE/API Tools : Exclude List with Regular Expressions
Next Topic:Accessing classes from plugin
Goto Forum:
  


Current Time: Fri Apr 26 08:13:30 GMT 2024

Powered by FUDForum. Page generated in 0.03079 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top