This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 63267 - Review of Using relative paths in projects.
Summary: Review of Using relative paths in projects.
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: API_REVIEW_FAST
Depends on: 63401
Blocks:
  Show dependency tree
 
Reported: 2005-08-29 17:36 UTC by Tomas Zezula
Modified: 2006-01-16 15:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diff file (28.05 KB, patch)
2005-08-29 17:38 UTC, Tomas Zezula
Details | Diff
CHanged diff of ReferenceHelper, the relativization to external base dirs has precedence, the rest of original diff is unchanged (4.58 KB, patch)
2005-08-30 15:11 UTC, Tomas Zezula
Details | Diff
New complete diff (29.17 KB, patch)
2005-08-30 18:08 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2005-08-29 17:36:22 UTC
The behavior of the BrokenReferenceModel and ReferenceSupport was changed to
improve the shareability. By this change projects are using relative paths if
possible, not possible when the referenced resources are on the different disks
on Windows.

This API change does not influence the signatures but it influences the behavior
of the ReferenceSupport and BrokenReferencesModel.
Comment 1 Tomas Zezula 2005-08-29 17:38:10 UTC
Created attachment 24319 [details]
Diff file
Comment 2 Tomas Zezula 2005-08-30 15:11:45 UTC
Created attachment 24363 [details]
CHanged diff of ReferenceHelper, the relativization to external base dirs has precedence, the rest of original diff is unchanged
Comment 3 Tomas Zezula 2005-08-30 18:08:47 UTC
Created attachment 24375 [details]
New complete diff
Comment 4 Jesse Glick 2005-08-31 00:52:20 UTC
apichanges.xml: typo "collocalted"; also is "ReferenceHelper.addReference" a
descriptive (and unique) ID?; and don't forget <issue>.


Doesn't ARCQ supersede PCCQ? I.e. there is no case where PCCQ would return true
where ARCQ would not also return true. In that case PCCQ can simply be deleted.


Tip: for

for (int i=0; i<roots.length; i++) {
    if (roots[i].equals(f)) {
        return true;
    }
}
return false;

just write

return Arrays.asList(roots).contains(f);


I don't see anything wrong with the patch as such, so I guess it is mainly about
carefully testing each known scenario in a real IDE build and making sure the
behavior is sane.
Comment 5 Jan Lahoda 2005-08-31 07:06:26 UTC
Agreed, the patch looks OK, but it should be tested carefully.
Comment 6 Miloslav Metelka 2005-08-31 09:10:49 UTC
I agree with the proposed change.
Comment 7 Radko Najman 2005-08-31 12:04:27 UTC
I agree, I don't see any problems for web, ejbjar and ear project types.
Comment 8 Tomas Zezula 2005-08-31 12:35:51 UTC
Checking in ant/project/apichanges.xml;
/cvs/ant/project/apichanges.xml,v  <--  apichanges.xml
new revision: 1.9; previous revision: 1.8
done
Checking in ant/project/manifest.mf;
/cvs/ant/project/manifest.mf,v  <--  manifest.mf
new revision: 1.13; previous revision: 1.12
done
Checking in
ant/project/src/org/netbeans/spi/project/support/ant/ReferenceHelper.java;
/cvs/ant/project/src/org/netbeans/spi/project/support/ant/ReferenceHelper.java,v
 <--  ReferenceHelper.java
new revision: 1.28; previous revision: 1.27
done
Checking in
ant/project/test/unit/src/org/netbeans/spi/project/support/ant/ReferenceHelperTest.java;
/cvs/ant/project/test/unit/src/org/netbeans/spi/project/support/ant/ReferenceHelperTest.java,v
 <--  ReferenceHelperTest.java
new revision: 1.20; previous revision: 1.19
done
Checking in
projects/queries/src/META-INF/services/org.netbeans.spi.queries.CollocationQueryImplementation;
/cvs/projects/queries/src/META-INF/services/org.netbeans.spi.queries.CollocationQueryImplementation,v
 <--  org.netbeans.spi.queries.CollocationQueryImplementation
new revision: 1.5; previous revision: 1.4
done
RCS file:
/cvs/projects/queries/src/org/netbeans/modules/queries/AlwaysRelativeCollocationQuery.java,v
done
Checking in
projects/queries/src/org/netbeans/modules/queries/AlwaysRelativeCollocationQuery.java;
/cvs/projects/queries/src/org/netbeans/modules/queries/AlwaysRelativeCollocationQuery.java,v
 <--  AlwaysRelativeCollocationQuery.java
initial revision: 1.1
done
RCS file:
/cvs/projects/queries/test/unit/src/org/netbeans/modules/queries/AlwaysRelativeCollocationQueryTest.java,v
done
Checking in
projects/queries/test/unit/src/org/netbeans/modules/queries/AlwaysRelativeCollocationQueryTest.java;
/cvs/projects/queries/test/unit/src/org/netbeans/modules/queries/AlwaysRelativeCollocationQueryTest.java,v
 <--  AlwaysRelativeCollocationQueryTest.java
initial revision: 1.1
done
Checking in java/project/apichanges.xml;
/cvs/java/project/apichanges.xml,v  <--  apichanges.xml
new revision: 1.12; previous revision: 1.11
done
Checking in java/project/manifest.mf;
/cvs/java/project/manifest.mf,v  <--  manifest.mf
new revision: 1.15; previous revision: 1.14
done
Checking in
java/project/src/org/netbeans/modules/java/project/BrokenReferencesModel.java;
/cvs/java/project/src/org/netbeans/modules/java/project/BrokenReferencesModel.java,v
 <--  BrokenReferencesModel.java
new revision: 1.19; previous revision: 1.18
done
Comment 9 Jaromir Uhrik 2006-01-16 15:44:40 UTC
Marking this issue as VERIFIED since the issue reporter == issue owner.