mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
project configuration: improve 'Convert to Repository Library' action
Hide 'Synchronize' actions in 'Library Diff' dialog (it makes no sense because content of a repository library cannot be modified).
This commit is contained in:
+4
-1
@@ -48,7 +48,10 @@ class LibraryJarsDiffDialog(libraryFile: VirtualFile,
|
||||
setOKButtonText("Replace")
|
||||
val request: ContentDiffRequest = DiffRequestFactory.getInstance().createFromFiles(project, libraryFile, downloadedFile)
|
||||
panel = DiffManager.getInstance().createRequestPanel(project, disposable, window)
|
||||
panel.putContextHints(DirDiffSettings.KEY, DirDiffSettings().apply { enableChoosers = false })
|
||||
panel.putContextHints(DirDiffSettings.KEY, DirDiffSettings().apply {
|
||||
enableChoosers = false
|
||||
enableOperations = false
|
||||
})
|
||||
panel.setRequest(request)
|
||||
init()
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ public class DirDiffSettings {
|
||||
public boolean showNewOnTarget = true;
|
||||
public boolean showCompareModes = true;
|
||||
public boolean enableChoosers = true;
|
||||
/** If {@code true} it's allowed to synchronize the left and the right parts by copying and deleting files directly in the diff viewer */
|
||||
public boolean enableOperations = true;
|
||||
public CompareMode compareMode = CompareMode.CONTENT;
|
||||
public double compareTimestampAccuracy = 0;
|
||||
public CustomSourceChooser customSourceChooser;
|
||||
|
||||
@@ -177,7 +177,7 @@ public class DirDiffTableModel extends AbstractTableModel implements DirDiffMode
|
||||
}
|
||||
|
||||
public boolean isOperationsEnabled() {
|
||||
return !myDisposed && mySource.isOperationsEnabled() && myTarget.isOperationsEnabled();
|
||||
return !myDisposed && mySettings.enableOperations && mySource.isOperationsEnabled() && myTarget.isOperationsEnabled();
|
||||
}
|
||||
|
||||
public List<DirDiffElementImpl> getElements() {
|
||||
|
||||
Reference in New Issue
Block a user