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 253338 - Support/helper APIs for Project Convertors
Summary: Support/helper APIs for Project Convertors
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks: 253339
  Show dependency tree
 
Reported: 2015-07-07 14:17 UTC by Tomas Mysik
Modified: 2015-07-23 01:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diff file (14.48 KB, patch)
2015-07-20 15:50 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2015-07-07 14:17:42 UTC
Currently, to avoid several issues, all the project convertors need to implement/provide their own lookup which is nearly the same for all these implementations. It would be great if there could be some support/helper APIs for it. This issue could be likely solved together with issue #250232.

Thanks.
Comment 1 Tomas Zezula 2015-07-20 15:50:47 UTC
Created attachment 154736 [details]
Diff file
Comment 2 Tomas Zezula 2015-07-20 15:56:45 UTC
Created the SPI support providing:
1st) Method finding the nearest enclosing non artificial project
2nd) Delegating implementation of the FileEncodingQueryImplementation
3rd) Implementation of the Convertor's Project Lookup

The support for ClassPathProvider is not included as projectuiapi does not depend on api.java.classpath, this support has to be added to some other place (java.api.common?). However the support has the 1st) getNonConvertorOwner. With this method writing the ClassPathProvider is trivial.
Comment 3 Tomas Mysik 2015-07-21 07:38:59 UTC
(In reply to Tomas Zezula from comment #2)
> The support for ClassPathProvider is not included as projectuiapi does not
> depend on api.java.classpath, this support has to be added to some other
> place (java.api.common?).

Just a note: module java.api.common is in java cluster so unfortunately not suitable for PHP build.

Thanks.
Comment 4 Tomas Zezula 2015-07-21 08:16:31 UTC
Right, this is the reason why I postponed the ClassPathProvider support.
Ideally it should be done after the java.api.common is split to real apis.
Comment 5 Tomas Stupka 2015-07-21 12:47:39 UTC
patch looks ok
thanks
Comment 6 Tomas Zezula 2015-07-21 13:25:10 UTC
Fixed jet-main 39ad0b5393bb
Comment 7 Quality Engineering 2015-07-23 01:14:29 UTC
Integrated into 'main-silver', will be available in build *201507230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/39ad0b5393bb
User: Tomas Zezula <tzezula@netbeans.org>
Log: #253338:Support/helper APIs for Project Convertors