mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more consistency with other setters
This commit is contained in:
@@ -210,7 +210,7 @@ public class PackagesTreeStructureTest extends TestSourceBasedTestCase {
|
||||
|
||||
projectView.setShowLibraryContents(PackageViewPane.ID, showLibraryContents);
|
||||
|
||||
projectView.setFlattenPackages(flattenPackages, PackageViewPane.ID);
|
||||
projectView.setFlattenPackages(PackageViewPane.ID, flattenPackages);
|
||||
projectView.setAbbreviatePackageNames(PackageViewPane.ID, abbreviatePackageNames);
|
||||
projectView.setHideEmptyPackages(PackageViewPane.ID, true);
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
|
||||
final AbstractProjectViewPane viewPane = getCurrentProjectViewPane();
|
||||
final SelectionInfo selectionInfo = SelectionInfo.create(viewPane);
|
||||
if (isGlobalOptions()) {
|
||||
setFlattenPackages(flag, viewPane.getId());
|
||||
setFlattenPackages(viewPane.getId(), flag);
|
||||
}
|
||||
super.setSelected(event, flag);
|
||||
|
||||
@@ -1541,7 +1541,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
|
||||
return getPaneOptionValue(myFlattenPackages, paneId, ourFlattenPackagesDefaults);
|
||||
}
|
||||
|
||||
public void setFlattenPackages(boolean flattenPackages, String paneId) {
|
||||
public void setFlattenPackages(String paneId, boolean flattenPackages) {
|
||||
if (isGlobalOptions()) {
|
||||
getGlobalOptions().setFlattenPackages(flattenPackages);
|
||||
for (String pane : myFlattenPackages.keySet()) {
|
||||
@@ -1624,7 +1624,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
|
||||
ProjectViewPane old = (ProjectViewPane)pane;
|
||||
showExcludedFiles = old.myShowExcludedFiles;
|
||||
if (showExcludedFiles != ourShowExcludedFilesDefaults) {
|
||||
setShowExcludedFiles(showExcludedFiles, paneId, false);
|
||||
setShowExcludedFiles(paneId, showExcludedFiles, false);
|
||||
setPaneOption(myShowExcludedFiles, showExcludedFiles, ProjectViewPane.ID, false);
|
||||
old.myShowExcludedFiles = ourShowExcludedFilesDefaults; // reset old state after copying it
|
||||
}
|
||||
@@ -1633,7 +1633,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
|
||||
return showExcludedFiles;
|
||||
}
|
||||
|
||||
void setShowExcludedFiles(boolean showExcludedFiles, @NotNull String paneId, boolean updatePane) {
|
||||
void setShowExcludedFiles(@NotNull String paneId, boolean showExcludedFiles, boolean updatePane) {
|
||||
if (isGlobalOptions()) {
|
||||
getGlobalOptions().setShowExcludedFiles(showExcludedFiles);
|
||||
for (String id : getPaneIds()) {
|
||||
@@ -1665,7 +1665,7 @@ public class ProjectViewImpl extends ProjectView implements PersistentStateCompo
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ActionCallback setShowLibraryContentsCB(boolean showLibraryContents, String paneId) {
|
||||
public ActionCallback setShowLibraryContentsCB(String paneId, boolean showLibraryContents) {
|
||||
return setPaneOption(myShowLibraryContents, showLibraryContents, paneId, true);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -25,6 +25,6 @@ final class ShowExcludedFilesAction extends ProjectViewToggleAction {
|
||||
|
||||
@Override
|
||||
void setSelected(@NotNull ProjectViewImpl view, @NotNull String id, boolean showExcludedFiles) {
|
||||
view.setShowExcludedFiles(showExcludedFiles, id, true);
|
||||
view.setShowExcludedFiles(id, showExcludedFiles, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user