Fix for using outdated apis.

Minor change to K2JSRunnerUtils.
This commit is contained in:
Pavel V. Talanov
2012-03-21 16:44:12 +04:00
parent 487fc95564
commit 8834367ae5
2 changed files with 5 additions and 4 deletions
@@ -84,7 +84,7 @@ public final class K2JSRunConfigurationEditor extends SettingsEditor<K2JSRunConf
private void setUpChooseGenerateFilePath() {
FileChooserDescriptor fileChooserDescriptor =
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);
}
@@ -101,7 +101,7 @@ public final class K2JSRunConfigurationEditor extends SettingsEditor<K2JSRunConf
private void setUpChooseHtmlToShow() {
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);
}
@@ -38,13 +38,14 @@ import java.util.Set;
import static org.jetbrains.jet.plugin.actions.JavaToKotlinActionUtil.allVirtualFiles;
//TODO: clean up
/**
* @author Pavel Talanov
*/
public final class K2JSRunnerUtils {
private K2JSRunnerUtils() {
}
public static void notifyFailure(@NotNull Throwable exception) {
Notifications.Bus.notify(new Notification("JsTranslator", "Translation failed.",
"Exception: " + exception.getMessage(),