Fix for using outdated apis.
Minor change to K2JSRunnerUtils.
This commit is contained in:
@@ -84,7 +84,7 @@ public final class K2JSRunConfigurationEditor extends SettingsEditor<K2JSRunConf
|
|||||||
private void setUpChooseGenerateFilePath() {
|
private void setUpChooseGenerateFilePath() {
|
||||||
FileChooserDescriptor fileChooserDescriptor =
|
FileChooserDescriptor fileChooserDescriptor =
|
||||||
FileChooserDescriptorFactory.getDirectoryChooserDescriptor("directory where generated files will be stored");
|
FileChooserDescriptorFactory.getDirectoryChooserDescriptor("directory where generated files will be stored");
|
||||||
fileChooserDescriptor.setRoots(ProjectRootManager.getInstance(project).getContentRootUrls());
|
fileChooserDescriptor.setRoots(ProjectRootManager.getInstance(project).getContentRoots());
|
||||||
generatedChooseFile.addBrowseFolderListener(null, null, project, fileChooserDescriptor);
|
generatedChooseFile.addBrowseFolderListener(null, null, project, fileChooserDescriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ public final class K2JSRunConfigurationEditor extends SettingsEditor<K2JSRunConf
|
|||||||
|
|
||||||
private void setUpChooseHtmlToShow() {
|
private void setUpChooseHtmlToShow() {
|
||||||
FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor(StdFileTypes.HTML);
|
FileChooserDescriptor fileChooserDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor(StdFileTypes.HTML);
|
||||||
fileChooserDescriptor.setRoots(ProjectRootManager.getInstance(project).getContentRootUrls());
|
fileChooserDescriptor.setRoots(ProjectRootManager.getInstance(project).getContentRoots());
|
||||||
htmlChooseFile.addBrowseFolderListener("Choose file to show after translation is finished", null, project, fileChooserDescriptor);
|
htmlChooseFile.addBrowseFolderListener("Choose file to show after translation is finished", null, project, fileChooserDescriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,13 +38,14 @@ import java.util.Set;
|
|||||||
|
|
||||||
import static org.jetbrains.jet.plugin.actions.JavaToKotlinActionUtil.allVirtualFiles;
|
import static org.jetbrains.jet.plugin.actions.JavaToKotlinActionUtil.allVirtualFiles;
|
||||||
|
|
||||||
//TODO: clean up
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Pavel Talanov
|
* @author Pavel Talanov
|
||||||
*/
|
*/
|
||||||
public final class K2JSRunnerUtils {
|
public final class K2JSRunnerUtils {
|
||||||
|
|
||||||
|
private K2JSRunnerUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
public static void notifyFailure(@NotNull Throwable exception) {
|
public static void notifyFailure(@NotNull Throwable exception) {
|
||||||
Notifications.Bus.notify(new Notification("JsTranslator", "Translation failed.",
|
Notifications.Bus.notify(new Notification("JsTranslator", "Translation failed.",
|
||||||
"Exception: " + exception.getMessage(),
|
"Exception: " + exception.getMessage(),
|
||||||
|
|||||||
Reference in New Issue
Block a user