Skip to content

Commit

Permalink
Use the blessed modifier order in projects located in php projects
Browse files Browse the repository at this point in the history
  • Loading branch information
mklaehn committed Feb 18, 2022
1 parent 5840175 commit a5373c0
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ public String getFileUrl() {
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)) {
Expand All @@ -188,7 +188,7 @@ public synchronized final void setCondition(String condition) {
firePropertyChange(PROP_CONDITION, oldCondition, condition);
}

public synchronized final boolean isConditional() {
public final synchronized boolean isConditional() {
return condition != null && !condition.isEmpty();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*/
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2294,14 +2294,14 @@ private static short[][] getActionTable() {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* e.g.
* var $a, $b;
* public $a = 3;
* final private static $var;
* private static final $var;
* protected ?int $int = 0; // PHP 7.4
* </pre>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public boolean startsWithAnnotation() {

}

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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
* @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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* e.g.
* var $a, $b;
* public $a = 3;
* final private static $var;
* private static final $var;
* private int $int = 20; // PHP 7.4
* </pre>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private 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);
Expand All @@ -64,7 +64,7 @@ public final static String copyFileToString (java.io.File f) throws java.io.IOEx
* @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;
Expand All @@ -83,7 +83,7 @@ public final static String copyGZipFileToString (java.io.File f) throws java.io.
* @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);
Expand All @@ -100,7 +100,7 @@ public final static File copyStringToFile (File f, String content) throws Except
* @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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected void doQuery(CompletionResultSet resultSet, Document doc, int caretOff
}
}
}
private static abstract class AbstractQuery extends AsyncCompletionQuery {
private abstract static class AbstractQuery extends AsyncCompletionQuery {

@Override
protected void preQueryUpdate(JTextComponent component) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
*/
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"});
Expand Down

0 comments on commit a5373c0

Please sign in to comment.