Repository navigation
Conversation
|
Something is broken here. There files with name |
those paths are no projects atm + the first commit was mostly meant for testing purposes (got inspired by #9624). |
|
Thanks for starting the initiative on this. It's definitely going in the right direction in my opinion. Need more time to review properly, but few initial comments.
|
2ff1289 to
cfe7c53
Compare
|
points 1-3 implemented: as mentioned back when we chatted about this. I agreed in principle but said that this is tricky due to chicken-egg problems (e.g you can't store aux config for a project without a project). But I think I found a solution. Config impl is properties based, initial marker is an empty file which happens to be a valid properties file -> marker becomes dual purpose as config too.
this actually uses the default impl. Dialog has a check box with "also delete project files" which is unchecked by default. So forget is default.
i did some archeology to find the bugzilla numbers (put them in the code comments). It didn't seem to be a big concern back then. What would be good would be a test which actually fails in a way which makes sense for the dev. Failures for this were completely obscure and it was difficult to figure out why the checks were there in the first place. I don't have the full picture of this so I can't do much unfortunately. added new-project context menu action but i just noticed that it doesn't infer the relative location of the selected node for the project wizard. So we might want to remove it again - kept it to play around with it. will add screenshots |
Thanks! Will take a deeper dive as soon as I can.
Yes, that was one solution I thought we'd discussed. The other is storing the initial request in a Still, what you have looks good, and for user editable configuration, a properties file probably beats the default XML. I know someone on dev@ mentioned YAML, but anything that doesn't need dependencies is a plus.
Ah, yes, forgot the default behaviour. Our naming here sucks! 😄
👍 |
Tbh i would see the in-memory approach as an optimization + if i see this correctly there probably isn't anything what would prevent improving this later if needed. But I think it probably isn't a big issue to store a property when a folder was "mounted" -> opted for simplicity. |
|
file filter settings + open as generic project action. Since the review started lets call this PR feature complete, additional features would be added via followups unless something essential is still missing. |
| </test-dependency> | ||
| </test-type> | ||
| </test-dependencies> | ||
| <public-packages/> |
There was a problem hiding this comment.
- less API is more ...
- e.g. I am glad to see there are no
public-packagesin thisgeneric.projectmodule
- e.g. I am glad to see there are no
- on the other hand, there are the
group="layer"andgroup="java.io.File"APIs- we should document them and expose them at javadoc area
- however
ant javadocis likely to fail with any package/class being public - maybe exposing a single API package with for example
MARKER_FILEvalue?
|
While I agree with @jtulach comment on it being good that there is no API in I'm not in favour of adding the folder action inside Assuming you want to keep this decoupled from #9737 then can we remove the action from this PR? Or alternatively agree it's a placeholder pending replacement on that PR. |
4bf280d to
7f3ac0b
Compare
|
rebase + license fix to get a fresh dev build. Refreshed #9737 too which has now an API. next on my todo list is to check if non-shared projects are imported on NB version update. The generic project dir seems to work well (using it while working on other projects for about three weeks by now - it is a convenient way to have multiple separate work trees in the same project group -> agents see only part of the project group). File filter is working too, its refreshing the tree etc. Majority of followup features would use the API entry point so they would have to get into #9737 or later PRs. I will likely move the open-folder-as-generic-project action to the other PR too as originally planned. But it is here for now since it makes testing easy. |
jtulach
left a comment
There was a problem hiding this comment.
Suggestions:
- make the module an autoload and remove its UI elements
- move the UI elements out of the autoload into dependant modules
- preferrably by accepting this commit: 1eef00d into this PR
- use more of
<api >tag - thanks for filling the
arch.xmlquestionnaire!
| <code>java.util.Properties</code> file named <code>.nbgp</code> by default, | ||
| brandable) or when the | ||
| <code>org.netbeans.modules.generic.project</code> FileObject attribute is | ||
| set on it (a marker-less "local" project). A generic project is just its |
There was a problem hiding this comment.
The attribute would probably fall into <api group="property" .../>
| <p> | ||
| A generic project is a plain directory the user wants to manage as a | ||
| project (no build system, no specific language): a collection of documents, | ||
| scripts or data files with a folder view and per-project settings. |
There was a problem hiding this comment.
f projectui depended on this module, it would hardly be disable-able or replaceable! My understanding of @mbien intention is that this is the default implementation of the API/SPI.
- I don't see any use-case to make this [support optional(https://github.com/New project type for "generic" projects #9736/changes#r4411010109)
- that's OK from my perspective
- in fact I would find it very bad if differently configured versions of the IDE supported different marker files
There was a problem hiding this comment.
I don't see any use-case to make this support optional
I remain -1 on having this required to use projectui, or not allowing platform applications to exclude or reimplement generic project support. I also think the API level and the generic project type are two separate things that overlap only in part, and each address other use cases.
I'm -0.9 to making this generic project support not disable-able in the IDE, or not allowing plugins to hook into the API layer.
in fact I would find it very bad if differently configured versions of the IDE supported different marker files
Is that in regard to the branding of shareable marker files? Because my aim in requesting that was that different applications can support different marker files. A generic project configured in one should not automatically be picked up as a project in the other. Yes, reimplementing the whole module could work around that, but the most obvious option in most cases is to re-use the module and brand it.
| </api> | ||
| </li> | ||
| <li> | ||
| <api group="java.io.File" name=".nbgp.private" type="export" category="private"> |
There was a problem hiding this comment.
- the
.ngp.privateis only useful when using theFileObjectattribute, right? - why not put the property values as
FileObject.setAttributewith some prefix then? - then it all be collocated without needing the layer API
There was a problem hiding this comment.
Yes, most project types and the default aux conf use attributes. This was suggested earlier. Not sure if there's a reason not to here? Also these attributes have only been imported on upgrade since #9449 - would need naming carefully or adding to that.
There was a problem hiding this comment.
finally found this comment ;)
rewritten: the non-shared settings no longer live in a separate file but in the project's private auxiliary configuration - the same mechanism as all the other project types, so the #9449 upgrader filter already carries them through the import, no new code needed on this side.
however, one edge case remained: a local (marker-less) project that was never customized has only the marker attribute in var/attributes.xml, no auxiliary configuration - the filter drops it and the project is lost after the import. that is why the small change in o.n.upgrader was needed.
| <answer id="lookup-lookup"> | ||
| <p> | ||
| Yes. Each project's lookup is a composite rooted at | ||
| <code>Projects/org-netbeans-modules-generic-project/Lookup</code>, so the |
|
dear reviewers, one comment per change request is enough ;). You do not have to mention the exact same thing on 5 different places and link to it. Also please. If I close 4 of the 5 sections, I still see your request - don't worry - there is a reason i left that one section open. You don't have to reopen the sections again so that i can see all 5 duplicates which link to each other. This is horrible to get through. Like whack a mole. This is also an apache project, and most of the actual discussion should happen on the mailing list. I opened a discussion thread long ago and it still has 0 replies. As initially said I wanted to help with NB 32, and do mvn and jdk28 update right afterwards before getting back to this. Give me one or two days and I update this PR since those tasks are done. |
7f3ac0b to
567eb2b
Compare
|
new update for the generic project type which resolves most comments (hard to tell, please check if you commented)
additionally:
as sidenote: i tested this together with other PRs (e.g mvn 3.10, jdk28, jgit etc) for weeks, basically all agent work has been using generic projects as workspaces in some form or another. So there is at least some confidence that the common use cases work. |
- the same file is used for both: marker and config storage - initial marker is an empty properties file (which is valid) - mode switch from marker to private moves properties on access - file name is brandable note: NB's auxiliary config storage has a 5s IO flush delay
- global file filters are enabled by default - optional per-project filter added - both configurable via project properties
567eb2b to
6e9c08d
Compare
| /** | ||
| * The name of the shared auxiliary data file, brandable via the | ||
| * module bundle, defaults to {@code .nbgp.properties} (the | ||
| * {@code .properties} suffix, so that tools recognize the file | ||
| * type): identical to the name of the marker file | ||
| * ({@link GenericProject#MARKER_FILE}). | ||
| */ | ||
| @Messages({ | ||
| "LBL_aux_data_file_name=.nbgp.properties", | ||
| }) | ||
| static String dataFileName() { | ||
| return Bundle.LBL_aux_data_file_name(); | ||
| } |
There was a problem hiding this comment.
should I remove the dot? kinda forgot about it
There was a problem hiding this comment.
Probably. If people want to share it, why make it "hidden"?
A new project type which can be used to work with arbitrary directories on your system. It integrates with project groups and other features like a regular project.
the repo was seeded with.nbgpmarkers for testing purposestargets NB 33 but there is no hurry (other PRs like mvn 3.10 and jdk28 support have priority for the next release)
todo:
ctrl+shift 1does not select the file in ProjectsAssisted-by: qwen3.8-27b + granite4.2:8bscreenshots
wizard

context menu

all clusters opened as generic project without the IDE exploding
