mbien commented on code in PR #9736: URL: https://github.com/apache/netbeans/pull/9736#discussion_r4388437750
########## ide/generic.project/src/org/netbeans/modules/generic/project/GpAuxiliaryProperties.java: ########## @@ -0,0 +1,242 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.netbeans.modules.generic.project; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.netbeans.spi.project.AuxiliaryProperties; +import org.openide.filesystems.FileObject; +import org.openide.filesystems.FileUtil; +import org.openide.util.NbBundle.Messages; + +/** + * The {@link AuxiliaryProperties} of a generic project, stored in a + * single {@link Properties} file per project (name brandable via the + * module bundle, defaults to {@code .nbgp}). + * + * <p>The file's location depends on the project's nature: for a + * project with the marker file the marker + * ({@link GenericProject#MARKER_FILE}) <em>is</em> the data file, so + * the data is versioned along with the project; for a local + * (marker-less) project it lives in the user configuration + * (see {@link #dataFolder}), so that nothing auxiliary is written + * into the working tree. Shared and private settings are + * distinguished by a {@code shared} / {@code private} key prefix. + * + * <p>The location is re-evaluated on every access: if the marker + * file is created or deleted while the project is open, the data is + * moved to the new location on the next access (the file at the old + * one is removed); if it is deleted while no instance of the project + * is open, the data is lost with it. + */ +final class GpAuxiliaryProperties implements AuxiliaryProperties { Review Comment: > And non-shared properties should remain non-shared. Not completely sure If I understand the request but if this is about trying to merge IDE settings with project settings I don't think it is at all useful. And how would this even be communicated to the user? If you take a look at the "use custom hint settings" panel of a maven project. As soon you check that it becomes a mess. You can't tell what is enable or disabled by looking at the xml. It is a merged state between the IDE settings of your current installation and the project config. Nobody in the industry uses something like that, custom project settings means you pinned them down and they are in the repo. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
