diff --git a/php/php.code.analysis/src/org/netbeans/modules/php/analysis/options/AnalysisOptions.java b/php/php.code.analysis/src/org/netbeans/modules/php/analysis/options/AnalysisOptions.java index 9ab6a6d6fb3d..1edc11740fda 100644 --- a/php/php.code.analysis/src/org/netbeans/modules/php/analysis/options/AnalysisOptions.java +++ b/php/php.code.analysis/src/org/netbeans/modules/php/analysis/options/AnalysisOptions.java @@ -58,7 +58,7 @@ public final class AnalysisOptions { private static final String PHPSTAN_CONFIGURATION = "phpstan.configuration"; // NOI18N private static final String PHPSTAN_MEMORY_LIMIT = "phpstan.memory.limit"; // NOI18N public static final int PHPSTAN_MIN_LEVEL = Integer.getInteger("nb.phpstan.min.level", 0); // NOI18N - public static final int PHPSTAN_MAX_LEVEL = Integer.getInteger("nb.phpstan.max.level", 9); // NOI18N + public static final int PHPSTAN_MAX_LEVEL = Integer.getInteger("nb.phpstan.max.level", 10); // NOI18N // Psalm - PHP Static Analysis Tool private static final String PSALM_PATH = "psalm.path"; // NOI18N private static final String PSALM_LEVEL = "psalm.level"; // NOI18N diff --git a/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/PHPStanLevelListCellRenderer.java b/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/PHPStanLevelListCellRenderer.java deleted file mode 100644 index d98229b2d9c8..000000000000 --- a/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/PHPStanLevelListCellRenderer.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.php.analysis.ui; - -import java.awt.Component; -import javax.swing.JList; -import javax.swing.ListCellRenderer; -import org.netbeans.modules.php.analysis.options.AnalysisOptions; - -public class PHPStanLevelListCellRenderer implements ListCellRenderer { - - private final ListCellRenderer defaultRenderer; - - public PHPStanLevelListCellRenderer(ListCellRenderer defaultRenderer) { - this.defaultRenderer = defaultRenderer; - } - - @Override - public Component getListCellRendererComponent(JList list, String value, int index, boolean isSelected, boolean cellHasFocus) { - String level = value; - if (String.valueOf(AnalysisOptions.PHPSTAN_MAX_LEVEL).equals(level)) { - level += " (max)"; // NOI18N - } - return defaultRenderer.getListCellRendererComponent(list, level, index, isSelected, cellHasFocus); - } - -} diff --git a/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/analyzer/PHPStanCustomizerPanel.java b/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/analyzer/PHPStanCustomizerPanel.java index 6912cf04a52f..237d5956f1f9 100644 --- a/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/analyzer/PHPStanCustomizerPanel.java +++ b/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/analyzer/PHPStanCustomizerPanel.java @@ -37,7 +37,6 @@ import org.netbeans.modules.analysis.spi.Analyzer; import org.netbeans.modules.php.analysis.commands.PHPStan; import org.netbeans.modules.php.analysis.options.AnalysisOptions; -import org.netbeans.modules.php.analysis.ui.PHPStanLevelListCellRenderer; import org.netbeans.modules.php.analysis.options.AnalysisOptionsValidator; import org.netbeans.modules.php.analysis.options.ValidatorPHPStanParameter; import org.netbeans.modules.php.analysis.ui.AnalysisDefaultDocumentListener; @@ -121,7 +120,6 @@ private void initLevelComboBox() { phpStanLevelComboBox.addItem(String.valueOf(i)); } phpStanLevelComboBox.addItem(PHPStan.MAX_LEVEL); - phpStanLevelComboBox.setRenderer(new PHPStanLevelListCellRenderer(phpStanLevelComboBox.getRenderer())); phpStanLevelComboBox.setSelectedItem(getValidLevel()); phpStanLevelComboBox.addItemListener(e -> setLevel()); } diff --git a/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/options/PHPStanOptionsPanel.java b/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/options/PHPStanOptionsPanel.java index 1fe379d5fbf6..7ae0ae3dbe4a 100644 --- a/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/options/PHPStanOptionsPanel.java +++ b/php/php.code.analysis/src/org/netbeans/modules/php/analysis/ui/options/PHPStanOptionsPanel.java @@ -39,7 +39,6 @@ import org.netbeans.modules.php.analysis.options.AnalysisOptions; import org.netbeans.modules.php.analysis.options.AnalysisOptionsValidator; import org.netbeans.modules.php.analysis.ui.AnalysisDefaultDocumentListener; -import org.netbeans.modules.php.analysis.ui.PHPStanLevelListCellRenderer; import org.netbeans.modules.php.analysis.options.ValidatorPHPStanParameter; import org.netbeans.modules.php.analysis.util.AnalysisUiUtils; import org.netbeans.modules.php.api.validation.ValidationResult; @@ -78,7 +77,6 @@ private void init() { phpStanLevelComboBox.addItem(String.valueOf(i)); } phpStanLevelComboBox.addItem(PHPStan.MAX_LEVEL); - phpStanLevelComboBox.setRenderer(new PHPStanLevelListCellRenderer(phpStanLevelComboBox.getRenderer())); // add listener DocumentListener defaultDocumentListener = new AnalysisDefaultDocumentListener(() -> fireChange()); phpStanTextField.getDocument().addDocumentListener(defaultDocumentListener);