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.
|
- each cluster becomes a generic project so that it can be opened - .github receives one too
- 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
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! 😄
👍 |
| new GpActionProvider(this), | ||
| new GpAuxiliaryProperties(this), | ||
| this | ||
| ), "Projects/" + PROJECT_KEY + "/Lookup"); // NOI18N |
There was a problem hiding this comment.
This is a "layer" API that shall be documented in arch.xml.
| if (markerFile) { | ||
| createMarker(dir); | ||
| if (isAttributeProject(dir)) { | ||
| dir.setAttribute(MARKER_ATTRIBUTE, null); |
There was a problem hiding this comment.
- Marker is an API that shall be documented in
arch.xml - when I was designing
FileObject.get/setAttributeI was hoping it will be used exactly for these "marking" purposes - it has never flied...
- ... probably because we never integrated with underlying Ext4 or MacFS attributes...
There was a problem hiding this comment.
probably because we never integrated with underlying Ext4 or MacFS attributes...
Funnily enough I think persistent changes are good for this as long as they are userdir specific by default. Having attributes that are stored outside of the userdir would actually change my perspective on whether this is the right approach. I would then prefer something like CPPLite that stores its projects in Preferences - https://github.com/apache/netbeans/blob/master/cpplite/cpplite.project/src/org/netbeans/modules/cpplite/project/CPPLiteProject.java
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. |
- global file filters are enabled by default - optional per-project filter added - both configurable via project properties
inverse of the open project action, this action can convert any non-project to a generic project
|
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?
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.
.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)
Assisted-by: qwen3.8-27b + granite4.2:8bscreenshots
Details
Open as Generic Project (active on all folders which aren't projects yet)
wizard

context menu

all clusters opened as generic project without the IDE exploding
