This is an automated email from the ASF dual-hosted git repository. mklaehn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git
commit a5373c006c562cce7a7c5913a2e71788af35c20d Author: Martin Klähn <[email protected]> AuthorDate: Fri Feb 18 11:08:59 2022 +0100 Use the blessed modifier order in projects located in php projects --- .../org/netbeans/modules/php/dbgp/SessionProgress.java | 2 +- .../modules/php/dbgp/breakpoints/LineBreakpoint.java | 6 +++--- .../src/org/netbeans/modules/php/dbgp/URIMapperTest.java | 2 +- .../modules/php/editor/parser/ASTPHP5Parser.java | 16 ++++++++-------- .../php/editor/parser/astnodes/FieldsDeclaration.java | 2 +- .../modules/php/editor/parser/astnodes/PHPDocTag.java | 4 ++-- .../php/editor/parser/astnodes/SimpleASTNode.java | 8 ++++---- .../editor/parser/astnodes/SingleFieldDeclaration.java | 2 +- .../qa-functional/src/org/netbeans/test/php/Commit.java | 10 +++++----- .../src/org/netbeans/test/php/GeneralPHP.java | 2 +- .../netbeans/modules/php/editor/csl/TestUtilities.java | 8 ++++---- .../modules/php/editor/parser/PrintASTVisitor.java | 4 ++-- .../smarty/editor/actions/ToggleBlockCommentAction.java | 4 ++-- .../smarty/editor/completion/TplCompletionProvider.java | 2 +- .../completion/entries/SmartyCodeCompletionOffer.java | 6 +++--- 15 files changed, 39 insertions(+), 39 deletions(-) diff --git a/php/php.dbgp/src/org/netbeans/modules/php/dbgp/SessionProgress.java b/php/php.dbgp/src/org/netbeans/modules/php/dbgp/SessionProgress.java index e20f6ea..5759059 100644 --- a/php/php.dbgp/src/org/netbeans/modules/php/dbgp/SessionProgress.java +++ b/php/php.dbgp/src/org/netbeans/modules/php/dbgp/SessionProgress.java @@ -31,7 +31,7 @@ import org.openide.util.NbBundle; * @author Radek Matous */ public final class SessionProgress implements Cancellable { - private final static ConcurrentMap<Session, SessionProgress> INSTANCE = new ConcurrentHashMap<>(); + private static final ConcurrentMap<Session, SessionProgress> INSTANCE = new ConcurrentHashMap<>(); private final ProgressHandle h; private volatile Session session; private volatile boolean isFinished; diff --git a/php/php.dbgp/src/org/netbeans/modules/php/dbgp/breakpoints/LineBreakpoint.java b/php/php.dbgp/src/org/netbeans/modules/php/dbgp/breakpoints/LineBreakpoint.java index 288586e..5021118 100644 --- a/php/php.dbgp/src/org/netbeans/modules/php/dbgp/breakpoints/LineBreakpoint.java +++ b/php/php.dbgp/src/org/netbeans/modules/php/dbgp/breakpoints/LineBreakpoint.java @@ -174,11 +174,11 @@ public class LineBreakpoint extends AbstractBreakpoint { return myFileUrl; } - public synchronized final String getCondition() { + public final synchronized String getCondition() { return condition; } - public synchronized final void setCondition(String condition) { + public final synchronized void setCondition(String condition) { String oldCondition = this.condition; if ((condition != null && condition.equals(oldCondition)) || (condition == null && oldCondition == null)) { @@ -188,7 +188,7 @@ public class LineBreakpoint extends AbstractBreakpoint { firePropertyChange(PROP_CONDITION, oldCondition, condition); } - public synchronized final boolean isConditional() { + public final synchronized boolean isConditional() { return condition != null && !condition.isEmpty(); } diff --git a/php/php.dbgp/test/unit/src/org/netbeans/modules/php/dbgp/URIMapperTest.java b/php/php.dbgp/test/unit/src/org/netbeans/modules/php/dbgp/URIMapperTest.java index 2436b29..9d74e4c 100644 --- a/php/php.dbgp/test/unit/src/org/netbeans/modules/php/dbgp/URIMapperTest.java +++ b/php/php.dbgp/test/unit/src/org/netbeans/modules/php/dbgp/URIMapperTest.java @@ -34,7 +34,7 @@ import org.openide.util.Pair; */ public class URIMapperTest extends NbTestCase { - final private URIMapper oneToOneMapper = URIMapper.createOneToOne(); + private final URIMapper oneToOneMapper = URIMapper.createOneToOne(); private URIMapper basesMapper; private URIMapper[] allMappers; private URI webServerURIBase; diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/parser/ASTPHP5Parser.java b/php/php.editor/src/org/netbeans/modules/php/editor/parser/ASTPHP5Parser.java index 3cd1832..07c0a43 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/parser/ASTPHP5Parser.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/parser/ASTPHP5Parser.java @@ -2294,14 +2294,14 @@ new EncodedActionTable17().getTableData() enum Access { NON_STATIC, STATIC, NULLSAFE } - protected final static Integer IMPLICIT_PUBLIC = Integer.valueOf(BodyDeclaration.Modifier.IMPLICIT_PUBLIC); - protected final static Integer PUBLIC = Integer.valueOf(BodyDeclaration.Modifier.PUBLIC); - protected final static Integer PRIVATE = Integer.valueOf(BodyDeclaration.Modifier.PRIVATE); - protected final static Integer PROTECTED = Integer.valueOf(BodyDeclaration.Modifier.PROTECTED); - protected final static Integer ABSTRACT = Integer.valueOf(BodyDeclaration.Modifier.ABSTRACT); - protected final static Integer FINAL = Integer.valueOf(BodyDeclaration.Modifier.FINAL); - protected final static Integer STATIC = Integer.valueOf(BodyDeclaration.Modifier.STATIC); - protected final static Integer READONLY = Integer.valueOf(BodyDeclaration.Modifier.READONLY); + protected static final Integer IMPLICIT_PUBLIC = Integer.valueOf(BodyDeclaration.Modifier.IMPLICIT_PUBLIC); + protected static final Integer PUBLIC = Integer.valueOf(BodyDeclaration.Modifier.PUBLIC); + protected static final Integer PRIVATE = Integer.valueOf(BodyDeclaration.Modifier.PRIVATE); + protected static final Integer PROTECTED = Integer.valueOf(BodyDeclaration.Modifier.PROTECTED); + protected static final Integer ABSTRACT = Integer.valueOf(BodyDeclaration.Modifier.ABSTRACT); + protected static final Integer FINAL = Integer.valueOf(BodyDeclaration.Modifier.FINAL); + protected static final Integer STATIC = Integer.valueOf(BodyDeclaration.Modifier.STATIC); + protected static final Integer READONLY = Integer.valueOf(BodyDeclaration.Modifier.READONLY); private ErrorStrategy defaultStrategy = new DefaultErrorStrategy();; private ErrorStrategy errorStrategy = defaultStrategy; diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/FieldsDeclaration.java b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/FieldsDeclaration.java index 0498d27..7550cdd 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/FieldsDeclaration.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/FieldsDeclaration.java @@ -30,7 +30,7 @@ import org.netbeans.api.annotations.common.CheckForNull; * e.g. * var $a, $b; * public $a = 3; - * final private static $var; + * private static final $var; * protected ?int $int = 0; // PHP 7.4 * </pre> */ diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/PHPDocTag.java b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/PHPDocTag.java index 5fa7a73..880f34c 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/PHPDocTag.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/PHPDocTag.java @@ -70,8 +70,8 @@ public class PHPDocTag extends ASTNode { } - final private AnnotationParsedLine type; - final private String value; + private final AnnotationParsedLine type; + private final String value; public PHPDocTag(int start, int end, AnnotationParsedLine kind, String value) { super(start, end); diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/SimpleASTNode.java b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/SimpleASTNode.java index 91afb8b..5f25e95 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/SimpleASTNode.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/SimpleASTNode.java @@ -27,10 +27,10 @@ import java.util.List; * @author petr */ public class SimpleASTNode { - final private int startOffset; - final private int endOffset; - final private String kind; - final private ArrayList<SimpleASTNode> children; + private final int startOffset; + private final int endOffset; + private final String kind; + private final ArrayList<SimpleASTNode> children; public SimpleASTNode (int start, int end, String kind){ this.startOffset = start; diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/SingleFieldDeclaration.java b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/SingleFieldDeclaration.java index dcf685e..870b075 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/SingleFieldDeclaration.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/parser/astnodes/SingleFieldDeclaration.java @@ -24,7 +24,7 @@ package org.netbeans.modules.php.editor.parser.astnodes; * e.g. * var $a, $b; * public $a = 3; - * final private static $var; + * private static final $var; * private int $int = 20; // PHP 7.4 * </pre> */ diff --git a/php/php.editor/test/qa-functional/src/org/netbeans/test/php/Commit.java b/php/php.editor/test/qa-functional/src/org/netbeans/test/php/Commit.java index 6153b7d..e941ef5 100644 --- a/php/php.editor/test/qa-functional/src/org/netbeans/test/php/Commit.java +++ b/php/php.editor/test/qa-functional/src/org/netbeans/test/php/Commit.java @@ -47,14 +47,14 @@ import org.openide.util.NbBundle; public class Commit extends GeneralPHP { static final String PROJECT_NAME = "LoginSample"; - static private final String TEST_PHP_NAME_1 = "PhpProject_commit_0001"; - static private final String INDEX_PHP_INITIAL_CONTENT + private static final String TEST_PHP_NAME_1 = "PhpProject_commit_0001"; + private static final String INDEX_PHP_INITIAL_CONTENT = "<!DOCTYPEhtml><!--Tochangethislicenseheader,chooseLicenseHeadersinProjectProperties.Tochangethistemplatefile,chooseTools|Templatesandopenthetemplateintheeditor.--><html><head><metacharset=\"UTF-8\"><title></title></head><body><?php//putyourcodehere?></body></html>"; - static private final String EMPTY_PHP_INITIAL_CONTENT + private static final String EMPTY_PHP_INITIAL_CONTENT = "<?php/**Tochangethislicenseheader,chooseLicenseHeadersinProjectProperties.*Tochangethistemplatefile,chooseTools|Templates*andopenthetemplateintheeditor.*/?>"; - static private final String CLASS_PHP_INITIAL_CONTENT + private static final String CLASS_PHP_INITIAL_CONTENT = "<?php/**Tochangethislicenseheader,chooseLicenseHeadersinProjectProperties.*Tochangethistemplatefile,chooseTools|Templates*andopenthetemplateintheeditor.*//***DescriptionofnewPHPClass**@author" + System.getProperty("user.name") + "*/classnewPHPClass{//putyourcodehere}"; - static private final int COMPLETION_LIST_INCLASS = 22; + private static final int COMPLETION_LIST_INCLASS = 22; private static boolean bUnzipped = false; public Commit(String arg0) { diff --git a/php/php.editor/test/qa-functional/src/org/netbeans/test/php/GeneralPHP.java b/php/php.editor/test/qa-functional/src/org/netbeans/test/php/GeneralPHP.java index 8e5b00b..16d2b48 100644 --- a/php/php.editor/test/qa-functional/src/org/netbeans/test/php/GeneralPHP.java +++ b/php/php.editor/test/qa-functional/src/org/netbeans/test/php/GeneralPHP.java @@ -57,7 +57,7 @@ public class GeneralPHP extends JellyTestCase { static final String PROJECT_RentSymfony = "Rent a Flat - Symfony Framework Sample Application"; static final String PROJECT_RentZend = "Rent a Flat - Zend Framework Sample Application"; static final String PROJECT_TodoList = "TodoList - PHP Sample Application"; - static protected final int COMPLETION_LIST_THRESHOLD = 5000; + protected static final int COMPLETION_LIST_THRESHOLD = 5000; protected static final String PHP_EXTENSION = ".php"; public class CFulltextStringComparator implements Operator.StringComparator { diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/TestUtilities.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/TestUtilities.java index 5719345..5512aa4 100644 --- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/TestUtilities.java +++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/TestUtilities.java @@ -49,7 +49,7 @@ public final class TestUtilities { * @param f the file to be read * @return the contents of the file(s). */ - public final static String copyFileToString (java.io.File f) throws java.io.IOException { + public static final String copyFileToString (java.io.File f) throws java.io.IOException { int s = (int)f.length (); byte[] data = new byte[s]; int len = new FileInputStream (f).read (data); @@ -64,7 +64,7 @@ public final class TestUtilities { * @param f the file to be read * @return the contents of the file(s). */ - public final static String copyGZipFileToString (java.io.File f) throws java.io.IOException { + public static final String copyGZipFileToString (java.io.File f) throws java.io.IOException { GZIPInputStream is = new GZIPInputStream(new FileInputStream(f)); byte[] arr = new byte[256 * 256]; int first = 0; @@ -83,7 +83,7 @@ public final class TestUtilities { * @param content the contents of the returned file. * @return the created file */ - public final static File copyStringToFile (File f, String content) throws Exception { + public static final File copyStringToFile (File f, String content) throws Exception { FileOutputStream os = new FileOutputStream(f); InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8")); FileUtil.copy(is, os); @@ -100,7 +100,7 @@ public final class TestUtilities { * @param content the contents of the returned file. * @return the created file */ - public final static FileObject copyStringToFile (FileObject f, String content) throws Exception { + public static final FileObject copyStringToFile (FileObject f, String content) throws Exception { OutputStream os = f.getOutputStream(); InputStream is = new ByteArrayInputStream(content.getBytes("UTF-8")); FileUtil.copy(is, os); diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/PrintASTVisitor.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/PrintASTVisitor.java index 61cbaea..7cf0d19 100644 --- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/PrintASTVisitor.java +++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/PrintASTVisitor.java @@ -30,8 +30,8 @@ import org.netbeans.modules.php.editor.parser.astnodes.*; public class PrintASTVisitor implements Visitor { private StringBuffer buffer; - private final static String NEW_LINE = "\n"; - private final static String TAB = " "; + private static final String NEW_LINE = "\n"; + private static final String TAB = " "; private int indent; private class XMLPrintNode { diff --git a/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/actions/ToggleBlockCommentAction.java b/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/actions/ToggleBlockCommentAction.java index 9204a70..c5c1f4e 100644 --- a/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/actions/ToggleBlockCommentAction.java +++ b/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/actions/ToggleBlockCommentAction.java @@ -44,8 +44,8 @@ import org.openide.util.Exceptions; public class ToggleBlockCommentAction extends BaseAction { static final long serialVersionUID = -1L; - static final private String FORCE_COMMENT = "force-comment"; //NOI18N - static final private String FORCE_UNCOMMENT = "force-uncomment"; //NOI18N + private static final String FORCE_COMMENT = "force-comment"; //NOI18N + private static final String FORCE_UNCOMMENT = "force-uncomment"; //NOI18N public ToggleBlockCommentAction() { super(ExtKit.toggleCommentAction); diff --git a/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionProvider.java b/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionProvider.java index 5372e8e..9d435af 100644 --- a/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionProvider.java +++ b/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/TplCompletionProvider.java @@ -188,7 +188,7 @@ public class TplCompletionProvider implements CompletionProvider { } } } - private static abstract class AbstractQuery extends AsyncCompletionQuery { + private abstract static class AbstractQuery extends AsyncCompletionQuery { @Override protected void preQueryUpdate(JTextComponent component) { diff --git a/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/SmartyCodeCompletionOffer.java b/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/SmartyCodeCompletionOffer.java index c681376..909ea0c 100644 --- a/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/SmartyCodeCompletionOffer.java +++ b/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/completion/entries/SmartyCodeCompletionOffer.java @@ -34,9 +34,9 @@ import org.openide.util.Exceptions; */ public class SmartyCodeCompletionOffer { - private final static ArrayList<TplCompletionItem> completionItemsFunctions = new ArrayList<TplCompletionItem>(); - private final static ArrayList<TplCompletionItem> completionItemsModifiers = new ArrayList<TplCompletionItem>(); - private final static HashMap<String, ArrayList<TplCompletionItem>> completionItemsFunctionParams = new HashMap<String, ArrayList<TplCompletionItem>>(); + private static final ArrayList<TplCompletionItem> completionItemsFunctions = new ArrayList<TplCompletionItem>(); + private static final ArrayList<TplCompletionItem> completionItemsModifiers = new ArrayList<TplCompletionItem>(); + private static final HashMap<String, ArrayList<TplCompletionItem>> completionItemsFunctionParams = new HashMap<String, ArrayList<TplCompletionItem>>(); static { //loadFunctions(new String[]{"built-in-functions", "custom-functions"}); --------------------------------------------------------------------- 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
