sdedic commented on a change in pull request #2948:
URL: https://github.com/apache/netbeans/pull/2948#discussion_r631815652



##########
File path: 
java/maven/src/org/netbeans/modules/maven/configurations/M2Configuration.java
##########
@@ -44,54 +47,73 @@
 import org.netbeans.modules.maven.execute.model.NetbeansActionReader;
 import 
org.netbeans.modules.maven.execute.model.io.xpp3.NetbeansBuildActionXpp3Writer;
 import org.netbeans.modules.maven.spi.actions.AbstractMavenActionsProvider;
+import org.netbeans.modules.maven.spi.actions.MavenActionsProvider;
 import org.openide.filesystems.FileChangeAdapter;
 import org.openide.filesystems.FileChangeListener;
 import org.openide.filesystems.FileEvent;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileRenameEvent;
 import org.openide.filesystems.FileUtil;
-import org.openide.util.Exceptions;
 import org.openide.util.NbBundle.Messages;
 
 /**
+ * Represents a configuration, Properties defined by {@link 
MavenConfiguration} plus list of action descriptions
+ * for that configuration. This class is used to represent:
+ * <ul>
+ * <li>default configurations, provided by Maven project.
+ * <li>profile-based configurations
+ * <li>user-customized configurations, that loads action configs from the 
project directory.
+ * </ul>
  *
  * @author mkleint
  */
 public class M2Configuration extends AbstractMavenActionsProvider implements 
MavenConfiguration, Comparable<M2Configuration> {
     private static final Logger LOG = 
Logger.getLogger(M2Configuration.class.getName());
 
     public static final String DEFAULT = "%%DEFAULT%%"; //NOI18N
+    public static final String FILENAME = "nbactions.xml"; //NOI18N
+    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
+    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     
     public static M2Configuration createDefault(FileObject projectDirectory) {
         return new M2Configuration(DEFAULT, projectDirectory);
     }
-    
+
+    /**
+     * True, if the M2Configuration comes from a customized project storage.
+     */
+    private boolean customized;
     private @NonNull final String id;
     private List<String> profiles;
-    public static final String FILENAME = "nbactions.xml"; //NOI18N
-    public static final String FILENAME_PREFIX = "nbactions-"; //NOI18N
-    public static final String FILENAME_SUFFIX = ".xml"; //NOI18N
     private final Map<String,String> properties = new HashMap<String,String>();
     private final FileObject projectDirectory;
     
     private final AtomicBoolean resetCache = new AtomicBoolean(false);
     private FileChangeListener listener = null;
+    private String displayName;
     
     public M2Configuration(String id, FileObject projectDirectory) {

Review comment:
       I did that. But `M2Configuration` gets instantiated (indirectly) from 
[MavenFileOwnerQueryImpl](https://github.com/apache/netbeans/blob/master/java/maven/src/org/netbeans/modules/maven/queries/MavenFileOwnerQueryImpl.java#L385)
 code that tries quite hard to avoid Project references.
   
   But looking further, I can scrap the whole `Delegate` - thanks !




-- 
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.

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

Reply via email to