Skip to content

Commit e6c40b1

Browse files
committed
Remove more now unused code
1 parent 2d95241 commit e6c40b1

File tree

7 files changed

+9
-18
lines changed

7 files changed

+9
-18
lines changed

third_party/src/main/java/com/jetbrains/lang/dart/ide/actions/DartPubActionBase.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import com.intellij.openapi.util.Disposer
3636
import com.intellij.openapi.util.Key
3737
import com.intellij.openapi.util.NlsContexts
3838
import com.intellij.openapi.util.io.FileUtil
39-
import com.intellij.openapi.util.text.StringUtil
4039
import com.intellij.openapi.vfs.VfsUtil
4140
import com.intellij.openapi.vfs.VirtualFile
4241
import com.intellij.openapi.wm.ToolWindowId
@@ -77,7 +76,7 @@ abstract class DartPubActionBase : AnAction(), DumbAware {
7776
e.presentation.isEnabled = visible && !isInProgress
7877
}
7978

80-
protected abstract fun getTitle(project: Project, pubspecYamlFile: VirtualFile): String
79+
protected abstract fun getTitle(pubspecYamlFile: VirtualFile): String
8180

8281
protected abstract fun calculatePubParameters(project: Project, pubspecYamlFile: VirtualFile): Array<String>?
8382

@@ -92,7 +91,7 @@ abstract class DartPubActionBase : AnAction(), DumbAware {
9291
if (sdk == null && allowModalDialogs) {
9392
val answer = Messages.showDialog(module.project,
9493
DartBundle.message("dart.sdk.is.not.configured"),
95-
getTitle(module.project, pubspecYamlFile),
94+
getTitle(pubspecYamlFile),
9695
arrayOf(DartBundle.message("setup.dart.sdk"), CommonBundle.getCancelButtonText()),
9796
Messages.OK,
9897
Messages.getErrorIcon())
@@ -110,7 +109,7 @@ abstract class DartPubActionBase : AnAction(), DumbAware {
110109
if (allowModalDialogs) {
111110
val answer = Messages.showDialog(module.project,
112111
DartBundle.message("dart.sdk.bad.dartpub.path", exeFile.path),
113-
getTitle(module.project, pubspecYamlFile),
112+
getTitle(pubspecYamlFile),
114113
arrayOf(DartBundle.message("setup.dart.sdk"), CommonBundle.getCancelButtonText()),
115114
Messages.OK,
116115
Messages.getErrorIcon())
@@ -134,7 +133,7 @@ abstract class DartPubActionBase : AnAction(), DumbAware {
134133
setupPubExePath(command, sdk)
135134
command.addParameters(*pubParameters)
136135

137-
doPerformPubAction(module, pubspecYamlFile, command, getTitle(module.project, pubspecYamlFile))
136+
doPerformPubAction(module, pubspecYamlFile, command, getTitle(pubspecYamlFile))
138137
}
139138
}
140139

third_party/src/main/java/com/jetbrains/lang/dart/ide/actions/DartPubBuildAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void update(@NotNull AnActionEvent e) {
2323
}
2424

2525
@Override
26-
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
26+
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull VirtualFile pubspecYamlFile) {
2727
final String projectName = PubspecYamlUtil.getDartProjectName(pubspecYamlFile);
2828
final String prefix = projectName == null ? "" : ("[" + projectName + "] ");
2929
return prefix + DartBundle.message("dart.webdev.build.title");

third_party/src/main/java/com/jetbrains/lang/dart/ide/actions/DartPubCacheRepairAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
public class DartPubCacheRepairAction extends DartPubActionBase {
1414
@Override
15-
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
15+
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull VirtualFile pubspecYamlFile) {
1616
return DartBundle.message("dart.pub.cache.repair.title");
1717
}
1818

third_party/src/main/java/com/jetbrains/lang/dart/ide/actions/DartPubGetAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
public class DartPubGetAction extends DartPubActionBase {
1313
@Override
14-
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
14+
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull VirtualFile pubspecYamlFile) {
1515
final String projectName = PubspecYamlUtil.getDartProjectName(pubspecYamlFile);
1616
final String prefix = projectName == null ? "" : ("[" + projectName + "] ");
1717
return prefix + DartBundle.message("dart.pub.get.title");

third_party/src/main/java/com/jetbrains/lang/dart/ide/actions/DartPubOutdatedAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void update(@NotNull AnActionEvent e) {
2525
}
2626

2727
@Override
28-
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
28+
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull VirtualFile pubspecYamlFile) {
2929
final String projectName = PubspecYamlUtil.getDartProjectName(pubspecYamlFile);
3030
final String prefix = projectName == null ? "" : ("[" + projectName + "] ");
3131
return prefix + DartBundle.message("dart.pub.outdated.title");

third_party/src/main/java/com/jetbrains/lang/dart/ide/actions/DartPubUpgradeAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
public class DartPubUpgradeAction extends DartPubActionBase {
1313
@Override
14-
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull Project project, final @NotNull VirtualFile pubspecYamlFile) {
14+
protected @NotNull @NlsContexts.DialogTitle String getTitle(final @NotNull VirtualFile pubspecYamlFile) {
1515
final String projectName = PubspecYamlUtil.getDartProjectName(pubspecYamlFile);
1616
final String prefix = projectName == null ? "" : ("[" + projectName + "] ");
1717
return prefix + DartBundle.message("dart.pub.upgrade.title");

third_party/src/main/java/com/jetbrains/lang/dart/sdk/DartSdkUtil.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,4 @@ public static void updateKnownSdkPaths(final @NotNull Project project, final @No
200200
public static @NotNull String getDartExePath(@NotNull String sdkRoot) {
201201
return sdkRoot + (SystemInfo.isWindows ? "/bin/dart.exe" : "/bin/dart");
202202
}
203-
204-
public static @NotNull String getPubPath(@NotNull DartSdk sdk) {
205-
return getPubPath(sdk.getHomePath());
206-
}
207-
208-
public static @NotNull String getPubPath(@NotNull String sdkRoot) {
209-
return sdkRoot + (SystemInfo.isWindows ? "/bin/pub.bat" : "/bin/pub");
210-
}
211203
}

0 commit comments

Comments
 (0)