mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-111616 External System: Run Configurations: project selector passes selected project to default run configurations
This commit is contained in:
+14
-3
@@ -405,11 +405,22 @@ public class ExternalSystemApiUtil {
|
||||
@NotNull
|
||||
public static String getProjectRepresentationName(@NotNull String targetProjectPath, @Nullable String rootProjectPath) {
|
||||
if (rootProjectPath == null) {
|
||||
return new File(targetProjectPath).getParentFile().getName();
|
||||
File rootProjectDir = new File(targetProjectPath);
|
||||
if (rootProjectDir.isFile()) {
|
||||
rootProjectDir = rootProjectDir.getParentFile();
|
||||
}
|
||||
return rootProjectDir.getName();
|
||||
}
|
||||
File rootProjectDir = new File(rootProjectPath);
|
||||
if (rootProjectDir.isFile()) {
|
||||
rootProjectDir = rootProjectDir.getParentFile();
|
||||
}
|
||||
File targetProjectDir = new File(targetProjectPath);
|
||||
if (targetProjectDir.isFile()) {
|
||||
targetProjectDir = targetProjectDir.getParentFile();
|
||||
}
|
||||
File rootProjectDir = new File(rootProjectPath).getParentFile();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (File f = new File(targetProjectPath).getParentFile(); f != null && !FileUtil.filesEqual(f, rootProjectDir); f = f.getParentFile()) {
|
||||
for (File f = targetProjectDir; f != null && !FileUtil.filesEqual(f, rootProjectDir); f = f.getParentFile()) {
|
||||
buffer.insert(0, f.getName()).insert(0, ":");
|
||||
}
|
||||
buffer.insert(0, rootProjectDir.getName());
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ public class ExternalSystemTaskSettingsControl implements ExternalSystemSettings
|
||||
|
||||
String path = myOriginalSettings.getExternalProjectPath();
|
||||
if (StringUtil.isEmpty(path)) {
|
||||
path = ExternalSystemApiUtil.getLastUsedExternalProjectPath(myExternalSystemId);
|
||||
path = "";
|
||||
}
|
||||
myProjectPathField.setText(path);
|
||||
myTasksTextField.setText(StringUtil.join(myOriginalSettings.getTaskNames(), " "));
|
||||
|
||||
+3
@@ -241,6 +241,9 @@ public class ExternalProjectPathField extends ComponentWithBrowseButton<External
|
||||
foldingModel.runBatchFoldingOperation(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (FoldRegion region : foldingModel.getAllFoldRegions()) {
|
||||
foldingModel.removeFoldRegion(region);
|
||||
}
|
||||
FoldRegion region = foldingModel.addFoldRegion(0, editor.getDocument().getTextLength(), placeholder);
|
||||
if (region != null) {
|
||||
region.setExpanded(false);
|
||||
|
||||
Reference in New Issue
Block a user