You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/09/16 07:23:22 UTC
[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2359: commit-validation fixes: code improvements
JaroslavTulach commented on a change in pull request #2359:
URL: https://github.com/apache/netbeans/pull/2359#discussion_r489214743
##########
File path: ide/gsf.testrunner/src/org/netbeans/modules/gsf/testrunner/TestCreatorProviderProcessor.java
##########
@@ -47,11 +47,11 @@ protected boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnv
if(registration == null) {
continue;
}
- File f = layer(e).instanceFile("Services", null);
+ File f = layer(e).instanceFile("Services/TestCreatorProviders", null);
Review comment:
Right. It is.
##########
File path: platform/openide.filesystems/src/org/openide/filesystems/Ordering.java
##########
@@ -158,7 +164,8 @@ public int compareTo(ChildAndPosition o) {
previousChild = subsequentChild;
}
}
- if (logWarnings && /* #201893*/ !parent.getPath().matches("Projects/.+/Lookup") && !childrenByPosition.isEmpty() && childrenByPosition.size() < children.size()) {
+ if (logWarnings && /* #201893*/ !parent.getPath().matches("Projects/.+/Lookup") && !childrenByPosition.isEmpty() && childrenByPosition.size() < children.size() &&
Review comment:
Couldn't, by a chance, the check for `Projects/.+/Lookup` be removed by using the same trick with autogenerating the position? No need to solve it in this PR however.
##########
File path: java/java.project.ui/src/org/netbeans/modules/java/project/ui/NewJavaFileWizardIterator.java
##########
@@ -241,17 +242,28 @@ private void addRequires(FileObject createdFile, Set<String> requiredModuleNames
final JavaSource src = JavaSource.forFileObject(createdFile);
if (src != null) {
final Set<String> mNames = requiredModuleNames;
- src.runModificationTask((WorkingCopy copy) -> {
- copy.toPhase(JavaSource.Phase.RESOLVED);
Review comment:
Fine.
##########
File path: platform/editor.mimelookup/src/org/netbeans/modules/editor/mimelookup/CreateRegistrationProcessor.java
##########
@@ -145,7 +147,17 @@ private void process(Element toRegister, AnnotationMirror mimeRegistration) thro
}
instantiableClassOrMethod(toRegister, apiTE);
- layer(toRegister).instanceFile("Editors" + mimeType + folder, null, null).position(position).stringvalue("instanceOf", processingEnv.getElementUtils().getBinaryName(apiTE).toString()).write(); //NOI18N
+ File f = layer(toRegister).instanceFile("Editors" + mimeType + folder, null, null);
+ if (position == Integer.MAX_VALUE && !"".equals(folder)) {
Review comment:
Right, generate some positions always.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists