mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -94,12 +94,12 @@ public class FindClassUsagesDialog extends JavaFindUsagesDialog<JavaClassFindUsa
|
||||
}
|
||||
|
||||
protected void update() {
|
||||
if(myCbToSearchForTextOccurences != null){
|
||||
if(myCbToSearchForTextOccurrences != null){
|
||||
if (isSelected(myCbUsages)){
|
||||
myCbToSearchForTextOccurences.makeSelectable();
|
||||
myCbToSearchForTextOccurrences.makeSelectable();
|
||||
}
|
||||
else{
|
||||
myCbToSearchForTextOccurences.makeUnselectable(false);
|
||||
myCbToSearchForTextOccurrences.makeUnselectable(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,12 +62,12 @@ public class FindPackageUsagesDialog extends JavaFindUsagesDialog<JavaPackageFin
|
||||
}
|
||||
|
||||
protected void update() {
|
||||
if(myCbToSearchForTextOccurences != null){
|
||||
if(myCbToSearchForTextOccurrences != null){
|
||||
if (isSelected(myCbUsages)){
|
||||
myCbToSearchForTextOccurences.makeSelectable();
|
||||
myCbToSearchForTextOccurrences.makeSelectable();
|
||||
}
|
||||
else{
|
||||
myCbToSearchForTextOccurences.makeUnselectable(false);
|
||||
myCbToSearchForTextOccurrences.makeUnselectable(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,13 +46,13 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
|
||||
private final boolean myIsShowInNewTabEnabled;
|
||||
private final boolean myIsShowInNewTabVisible;
|
||||
|
||||
private final boolean mySearchForTextOccurencesAvailable;
|
||||
private final boolean mySearchForTextOccurrencesAvailable;
|
||||
|
||||
private final boolean mySearchInLibrariesAvailable;
|
||||
|
||||
private JCheckBox myCbToOpenInNewTab;
|
||||
|
||||
protected StateRestoringCheckBox myCbToSearchForTextOccurences;
|
||||
protected StateRestoringCheckBox myCbToSearchForTextOccurrences;
|
||||
protected JCheckBox myCbToSkipResultsWhenOneUsage;
|
||||
|
||||
private final ActionListener myUpdateAction;
|
||||
@@ -64,7 +64,7 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
|
||||
boolean toShowInNewTab,
|
||||
boolean mustOpenInNewTab,
|
||||
boolean isSingleFile,
|
||||
boolean searchForTextOccurencesAvailable,
|
||||
boolean searchForTextOccurrencesAvailable,
|
||||
boolean searchInLibrariesAvailable) {
|
||||
super(project, true);
|
||||
myProject = project;
|
||||
@@ -72,7 +72,7 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
|
||||
myToShowInNewTab = toShowInNewTab;
|
||||
myIsShowInNewTabEnabled = !mustOpenInNewTab && UsageViewManager.getInstance(myProject).getReusableContentsCount() > 0;
|
||||
myIsShowInNewTabVisible = !isSingleFile;
|
||||
mySearchForTextOccurencesAvailable = searchForTextOccurencesAvailable;
|
||||
mySearchForTextOccurrencesAvailable = searchForTextOccurrencesAvailable;
|
||||
mySearchInLibrariesAvailable = searchInLibrariesAvailable;
|
||||
|
||||
myUpdateAction = new ActionListener() {
|
||||
@@ -150,7 +150,7 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
|
||||
public void calcFindUsagesOptions(FindUsagesOptions options) {
|
||||
options.searchScope = myScopeCombo == null ? GlobalSearchScope.allScope(myProject) : myScopeCombo.getSelectedScope();
|
||||
|
||||
options.isSearchForTextOccurrences = isToChange(myCbToSearchForTextOccurences) && isSelected(myCbToSearchForTextOccurences);
|
||||
options.isSearchForTextOccurrences = isToChange(myCbToSearchForTextOccurrences) && isSelected(myCbToSearchForTextOccurrences);
|
||||
}
|
||||
|
||||
protected void update() {
|
||||
@@ -172,8 +172,8 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
|
||||
if (myScopeCombo != null) {
|
||||
settings.setDefaultScopeName(myScopeCombo.getSelectedScopeName());
|
||||
}
|
||||
if (mySearchForTextOccurencesAvailable && myCbToSearchForTextOccurences != null && myCbToSearchForTextOccurences.isEnabled()) {
|
||||
myFindUsagesOptions.isSearchForTextOccurrences = myCbToSearchForTextOccurences.isSelected();
|
||||
if (mySearchForTextOccurrencesAvailable && myCbToSearchForTextOccurrences != null && myCbToSearchForTextOccurrences.isEnabled()) {
|
||||
myFindUsagesOptions.isSearchForTextOccurrences = myCbToSearchForTextOccurrences.isSelected();
|
||||
}
|
||||
|
||||
if (myCbToSkipResultsWhenOneUsage != null) {
|
||||
@@ -242,8 +242,8 @@ public abstract class AbstractFindUsagesDialog extends DialogWrapper {
|
||||
protected abstract JPanel createFindWhatPanel();
|
||||
|
||||
protected void addUsagesOptions(JPanel optionsPanel) {
|
||||
if (mySearchForTextOccurencesAvailable) {
|
||||
myCbToSearchForTextOccurences = addCheckboxToPanel(FindBundle.message("find.options.search.for.text.occurences.checkbox"),
|
||||
if (mySearchForTextOccurrencesAvailable) {
|
||||
myCbToSearchForTextOccurrences = addCheckboxToPanel(FindBundle.message("find.options.search.for.text.occurences.checkbox"),
|
||||
myFindUsagesOptions.isSearchForTextOccurrences, optionsPanel, false);
|
||||
|
||||
}
|
||||
|
||||
@@ -1006,7 +1006,7 @@ public abstract class DialogWrapper {
|
||||
/**
|
||||
* Sets margine for command buttons ("OK", "Cance", "Help").
|
||||
*/
|
||||
public final void setButtonsMargin(Insets insets) {
|
||||
public final void setButtonsMargin(@Nullable Insets insets) {
|
||||
myButtonMargins = insets;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user