mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[shelf]: make ignoring shelf dir more understandable
This commit is contained in:
+9
-4
@@ -434,10 +434,7 @@ public class ShelveChangesManager extends AbstractProjectComponent implements JD
|
||||
|
||||
@NotNull
|
||||
private File generateUniqueSchemePatchDir(@NotNull final String defaultName, boolean createResourceDirectory) {
|
||||
File shelfDir = getShelfResourcesDirectory();
|
||||
if (!shelfDir.exists()) {
|
||||
ChangeListManager.getInstance(myProject).addDirectoryToIgnoreImplicitly(shelfDir.getAbsolutePath());
|
||||
}
|
||||
ignoreShelfDirectoryIfFirstShelf();
|
||||
String uniqueName = UniqueNameGenerator
|
||||
.generateUniqueName(shortenAndSanitize(defaultName), mySchemeManager.getAllSchemeNames());
|
||||
File dir = new File(myFileProcessor.getBaseDir(), uniqueName);
|
||||
@@ -448,6 +445,14 @@ public class ShelveChangesManager extends AbstractProjectComponent implements JD
|
||||
return dir;
|
||||
}
|
||||
|
||||
private void ignoreShelfDirectoryIfFirstShelf() {
|
||||
File shelfDir = getShelfResourcesDirectory();
|
||||
//check that shelf directory wasn't exist before that to ignore it only once
|
||||
if (!shelfDir.exists()) {
|
||||
ChangeListManager.getInstance(myProject).addDirectoryToIgnoreImplicitly(shelfDir.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
// for create patch only
|
||||
public static File suggestPatchName(Project project, @NotNull final String commitMessage, final File file, String extension) {
|
||||
|
||||
Reference in New Issue
Block a user