diff --git a/java/compiler/impl/src/com/intellij/compiler/CompileServerManager.java b/java/compiler/impl/src/com/intellij/compiler/CompileServerManager.java
index 8abbe757472b..ced65cfc37f5 100644
--- a/java/compiler/impl/src/com/intellij/compiler/CompileServerManager.java
+++ b/java/compiler/impl/src/com/intellij/compiler/CompileServerManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2011 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -191,6 +191,14 @@ public class CompileServerManager implements ApplicationComponent{
sendNotification(paths, true);
}
+ @Nullable
+ private static String getProjectPath(final Project project) {
+ final String path = project.getPresentableUrl();
+ if (path == null) return path;
+ final VirtualFile vFile = LocalFileSystem.getInstance().findFileByPath(path);
+ return vFile != null ? vFile.getPath() : null;
+ }
+
public void sendReloadRequest(final Project project) {
if (!project.isDefault() && project.isOpen()) {
myTaskExecutor.submit(new Runnable() {
@@ -200,7 +208,7 @@ public class CompileServerManager implements ApplicationComponent{
if (!project.isDisposed()) {
final CompileServerClient client = ensureServerRunningAndClientConnected(false);
if (client != null) {
- client.sendProjectReloadRequest(Collections.singletonList(project.getLocation()));
+ client.sendProjectReloadRequest(Collections.singletonList(getProjectPath(project)));
}
}
}
@@ -251,7 +259,7 @@ public class CompileServerManager implements ApplicationComponent{
}
for (Project project : openProjects) {
try {
- client.sendFSEvent(project.getLocation(), changed, deleted);
+ client.sendFSEvent(getProjectPath(project), changed, deleted);
}
catch (Exception e) {
LOG.info(e);
@@ -317,7 +325,7 @@ public class CompileServerManager implements ApplicationComponent{
final Collection modules, final Collection artifacts,
final Collection paths,
final Map userData, final JpsServerResponseHandler handler) {
- final String projectId = project.getLocation();
+ final String projectId = getProjectPath(project);
final Ref futureRef = new Ref(null);
final RunnableFuture future = myTaskExecutor.submit(new Runnable() {
public void run() {
diff --git a/java/compiler/openapi/src/com/intellij/openapi/compiler/CompilerPaths.java b/java/compiler/openapi/src/com/intellij/openapi/compiler/CompilerPaths.java
index 7f21c224225f..b366bc5a443d 100644
--- a/java/compiler/openapi/src/com/intellij/openapi/compiler/CompilerPaths.java
+++ b/java/compiler/openapi/src/com/intellij/openapi/compiler/CompilerPaths.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -96,13 +96,17 @@ public class CompilerPaths {
return new File(getCompilerSystemDirectory(), projectName + "." + project.getLocationHash());
}
+ @Nullable
private static String getPresentableName(final Project project) {
if (project.isDefault()) {
return project.getName();
}
- String location = project.getLocation();
- if (location == null) return null;
+ String location = project.getPresentableUrl();
+ if (location == null) {
+ return null;
+ }
+
String projectName = FileUtil.toSystemIndependentName(location);
if (projectName.endsWith("/")) {
projectName = projectName.substring(0, projectName.length() - 1);
diff --git a/java/idea-ui/src/com/intellij/ide/RecentProjectsManager.java b/java/idea-ui/src/com/intellij/ide/RecentProjectsManager.java
index c3ff4043ae1e..cd5a83b0d706 100644
--- a/java/idea-ui/src/com/intellij/ide/RecentProjectsManager.java
+++ b/java/idea-ui/src/com/intellij/ide/RecentProjectsManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,8 +23,6 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManager;
import com.intellij.util.messages.MessageBus;
-import java.io.File;
-
@State(
name = "RecentProjectsManager",
roamingType = RoamingType.DISABLED,
@@ -39,8 +37,7 @@ public class RecentProjectsManager extends RecentProjectsManagerBase {
}
protected String getProjectPath(Project project) {
- final String location = project.getLocation();
- return location == null ? null : location.replace('/', File.separatorChar);
+ return project.getPresentableUrl();
}
protected void doOpenProject(final String projectPath, Project projectToClose, final boolean forceOpenInNewFrame) {
diff --git a/java/java-tests/testSrc/com/intellij/psi/search/UpdateCacheTest.java b/java/java-tests/testSrc/com/intellij/psi/search/UpdateCacheTest.java
index d1877bd01d70..cd2cf6890ac3 100644
--- a/java/java-tests/testSrc/com/intellij/psi/search/UpdateCacheTest.java
+++ b/java/java-tests/testSrc/com/intellij/psi/search/UpdateCacheTest.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2000-2012 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.intellij.psi.search;
import com.intellij.JavaTestUtil;
@@ -139,7 +154,8 @@ public class UpdateCacheTest extends PsiTestCase{
checkUsages(objectClass, new String[]{});
FileBasedIndex.getInstance().getContainingFiles(TodoIndex.NAME, new TodoIndexEntry("todo", true), GlobalSearchScope.allScope(getProject()));
- final String projectLocation = myProject.getLocation();
+ final String projectLocation = myProject.getPresentableUrl();
+ assert projectLocation != null : myProject;
myProject.save();
final VirtualFile content = ModuleRootManager.getInstance(getModule()).getContentRoots()[0];
ProjectUtil.closeAndDispose(myProject);
diff --git a/platform/core-api/src/com/intellij/openapi/project/Project.java b/platform/core-api/src/com/intellij/openapi/project/Project.java
index bb57840075f1..f70e4025e64b 100644
--- a/platform/core-api/src/com/intellij/openapi/project/Project.java
+++ b/platform/core-api/src/com/intellij/openapi/project/Project.java
@@ -28,6 +28,12 @@ import org.jetbrains.annotations.Nullable;
public interface Project extends ComponentManager, AreaInstance {
@NonNls String DIRECTORY_STORE_FOLDER = ".idea";
+ /**
+ * Returns a name ot the project. For a directory-based project it's an arbitrary string specified by user at project creation
+ * or later in a project settings. For a file-based project it's a name of a project file without extension.
+ *
+ * @return project name
+ */
@NotNull
@NonNls
String getName();
@@ -40,7 +46,6 @@ public interface Project extends ComponentManager, AreaInstance {
* if it's desired to keep symlinks in original path.
*
* @return project base directory, or null for default project
- * todo: check usages
*/
@Nullable
VirtualFile getBaseDir();
@@ -83,7 +88,8 @@ public interface Project extends ComponentManager, AreaInstance {
/**
* Returns presentable project path:
- * {@linkplain #getProjectFilePath()} for file-based projects, {@linkplain #getBasePath()} for directory-based ones.
+ * {@linkplain #getProjectFilePath()} for file-based projects, {@linkplain #getBasePath()} for directory-based ones.
+ * Note: the word "presentable" here implies file system presentation, not a UI one.
*
* @return presentable project path
*/
@@ -110,7 +116,6 @@ public interface Project extends ComponentManager, AreaInstance {
/**
* @deprecated please use {@linkplain #getPresentableUrl()} or {@linkplain #getBasePath()} (to remove in IDEA 13).
- * todo: remove usages
*/
@Nullable
@NonNls
diff --git a/platform/lang-impl/src/com/intellij/codeInsight/actions/AbstractLayoutCodeProcessor.java b/platform/lang-impl/src/com/intellij/codeInsight/actions/AbstractLayoutCodeProcessor.java
index 7dc21a333c96..b13222bb406b 100644
--- a/platform/lang-impl/src/com/intellij/codeInsight/actions/AbstractLayoutCodeProcessor.java
+++ b/platform/lang-impl/src/com/intellij/codeInsight/actions/AbstractLayoutCodeProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2011 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -389,7 +389,7 @@ public abstract class AbstractLayoutCodeProcessor {
private static Set getIgnoreRoots(@NotNull Project project) {
Set result = new HashSet();
- String location = project.getLocation();
+ String location = project.getBasePath();
if (location != null) {
File projectDir = new File(location, Project.DIRECTORY_STORE_FOLDER);
if (projectDir.isDirectory()) {
diff --git a/platform/lang-impl/src/com/intellij/execution/console/ConsoleHistoryController.java b/platform/lang-impl/src/com/intellij/execution/console/ConsoleHistoryController.java
index 3806e0ff9656..29b8a89c4645 100644
--- a/platform/lang-impl/src/com/intellij/execution/console/ConsoleHistoryController.java
+++ b/platform/lang-impl/src/com/intellij/execution/console/ConsoleHistoryController.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2011 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -75,7 +75,7 @@ public class ConsoleHistoryController {
@NotNull final LanguageConsoleImpl console,
@NotNull final ConsoleHistoryModel model) {
myType = type;
- myId = StringUtil.isEmpty(persistenceId)? console.getProject().getLocation() : persistenceId;
+ myId = StringUtil.isEmpty(persistenceId)? console.getProject().getPresentableUrl() : persistenceId;
myConsole = console;
myModel = model;
}
diff --git a/platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java b/platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java
index 1e1dfef7ea35..8d1732e88c5a 100644
--- a/platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java
+++ b/platform/platform-impl/src/com/intellij/ide/impl/ProjectUtil.java
@@ -138,7 +138,7 @@ public class ProjectUtil {
}
@Nullable
- public static Project openProject(final String path, Project projectToClose, boolean forceOpenInNewFrame) {
+ public static Project openProject(final String path, @Nullable Project projectToClose, boolean forceOpenInNewFrame) {
File file = new File(path);
if (!file.exists()) {
Messages.showErrorDialog(IdeBundle.message("error.project.file.does.not.exist", path), CommonBundle.getErrorTitle());
@@ -161,7 +161,8 @@ public class ProjectUtil {
if (!forceOpenInNewFrame && openProjects.length > 0) {
int exitCode = confirmOpenNewProject(false);
if (exitCode == GeneralSettings.OPEN_PROJECT_SAME_WINDOW) {
- if (!closeAndDispose(projectToClose != null ? projectToClose : openProjects[openProjects.length - 1])) return null;
+ final Project toClose = projectToClose != null ? projectToClose : openProjects[openProjects.length - 1];
+ if (!closeAndDispose(toClose)) return null;
}
else if (exitCode != GeneralSettings.OPEN_PROJECT_NEW_WINDOW) {
return null;
diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java
index 9032270e62a5..6b49310d49fa 100644
--- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java
+++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java
@@ -316,7 +316,7 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject
String temp = getProjectFileName();
FileType fileType = FileTypeManager.getInstance().getFileTypeByFileName(temp);
if (fileType instanceof ProjectFileType) {
- temp = temp.substring(0, temp.length() - fileType.getDefaultExtension().length()-1);
+ temp = temp.substring(0, temp.length() - fileType.getDefaultExtension().length() - 1);
}
final int i = temp.lastIndexOf(File.separatorChar);
if (i >= 0) {
diff --git a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java
index faf376e92bd1..d957eca4d645 100644
--- a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java
+++ b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -918,7 +918,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements NamedJDOMExt
ProjectImpl projectImpl = (ProjectImpl)project[0];
if (projectImpl.isDisposed()) return;
IProjectStore projectStore = projectImpl.getStateStore();
- final String location = projectImpl.getLocation();
+ final String location = projectImpl.getPresentableUrl();
final List original;
try {
diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java
index e28e5e496034..d5d81f96374e 100644
--- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java
+++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/VirtualDirectoryImpl.java
@@ -222,6 +222,7 @@ public class VirtualDirectoryImpl extends VirtualFileSystemEntry {
String childPath = child.getPath();
if (child.getFileSystem() == JarFileSystem.getInstance()) {
VirtualFile local = JarFileSystem.getInstance().getVirtualFileForJar(child);
+ assert local != null : child;
childPath = local.getPath();
}
if (FileUtil.startsWith(childPath, root)) {
@@ -238,13 +239,14 @@ public class VirtualDirectoryImpl extends VirtualFileSystemEntry {
if (!isUnder) {
if (!allowed.isEmpty()) {
- assert false : "File accessed outside allowed roots: " + child + ";\n Allowed roots: " + new ArrayList(allowed);
+ assert false : "File accessed outside allowed roots: " + child + ";\n Allowed roots: " + allowed;
}
}
}
}
// null means we were unable to get roots, so do not check access
+ @Nullable
private static Set allowedRoots() {
if (insideGettingRoots) return null;
Project[] openProjects = ProjectManager.getInstance().getOpenProjects();
@@ -257,8 +259,7 @@ public class VirtualDirectoryImpl extends VirtualFileSystemEntry {
String output = new File(outUrl.toURI()).getParentFile().getParentFile().getPath();
allowed.add(FileUtil.toSystemIndependentName(output));
}
- catch (URISyntaxException ignored) {
- }
+ catch (URISyntaxException ignored) { }
String javaHome = SystemProperties.getJavaHome();
allowed.add(FileUtil.toSystemIndependentName(javaHome));
String tempDirectorySpecific = new File(FileUtil.getTempDirectory()).getParent();
@@ -277,7 +278,8 @@ public class VirtualDirectoryImpl extends VirtualFileSystemEntry {
for (VirtualFile root : getAllRoots(project)) {
allowed.add(StringUtil.trimEnd(root.getPath(), JarFileSystem.JAR_SEPARATOR));
}
- String location = project.getLocation();
+ String location = project.getBasePath();
+ assert location != null : project;
allowed.add(FileUtil.toSystemIndependentName(location));
}
diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectWindowAction.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectWindowAction.java
index 60ce09d2c921..997e85a14001 100644
--- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectWindowAction.java
+++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectWindowAction.java
@@ -90,7 +90,7 @@ public class ProjectWindowAction extends ToggleAction implements DumbAware {
public Frame findProjectFrame() {
final Project[] projects = ProjectManager.getInstance().getOpenProjects();
for (Project project : projects) {
- if (myProjectLocation.equals(project.getLocation())) {
+ if (myProjectLocation.equals(project.getPresentableUrl())) {
final WindowManager windowManager = WindowManager.getInstance();
return windowManager.getFrame(project);
}
@@ -104,7 +104,7 @@ public class ProjectWindowAction extends ToggleAction implements DumbAware {
if (project == null) {
return false;
}
- return myProjectLocation.equals(project.getLocation());
+ return myProjectLocation.equals(project.getPresentableUrl());
}
public void setSelected(@Nullable AnActionEvent e, boolean selected) {
diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectWindowActionGroup.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectWindowActionGroup.java
index 4c8bc785c276..341d28d166dc 100644
--- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectWindowActionGroup.java
+++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectWindowActionGroup.java
@@ -36,7 +36,7 @@ public class ProjectWindowActionGroup extends DefaultActionGroup {
private ProjectWindowAction latest = null;
public void addProject(@NotNull Project project) {
- final String projectLocation = project.getLocation();
+ final String projectLocation = project.getPresentableUrl();
if (projectLocation == null) {
return;
}
@@ -56,7 +56,7 @@ public class ProjectWindowActionGroup extends DefaultActionGroup {
}
public void removeProject(@NotNull Project project) {
- final ProjectWindowAction windowAction = findWindowAction(project.getLocation());
+ final ProjectWindowAction windowAction = findWindowAction(project.getPresentableUrl());
if (windowAction == null) {
return;
}
@@ -91,7 +91,7 @@ public class ProjectWindowActionGroup extends DefaultActionGroup {
if (project == null) {
return;
}
- final ProjectWindowAction windowAction = findWindowAction(project.getLocation());
+ final ProjectWindowAction windowAction = findWindowAction(project.getPresentableUrl());
if (windowAction == null) {
return;
}
@@ -106,7 +106,7 @@ public class ProjectWindowActionGroup extends DefaultActionGroup {
if (project == null) {
return;
}
- final ProjectWindowAction windowAction = findWindowAction(project.getLocation());
+ final ProjectWindowAction windowAction = findWindowAction(project.getPresentableUrl());
if (windowAction == null) {
return;
}
@@ -144,7 +144,7 @@ public class ProjectWindowActionGroup extends DefaultActionGroup {
final ProjectWindowAction windowAction = (ProjectWindowAction) child;
if (projectName.equals(windowAction.getProjectName())) {
if (result == null) {
- result = new ArrayList();
+ result = new ArrayList();
}
result.add(windowAction);
}
diff --git a/platform/testRunner/src/com/intellij/execution/testframework/export/ExportTestResultsAction.java b/platform/testRunner/src/com/intellij/execution/testframework/export/ExportTestResultsAction.java
index 6c08399b0199..67bfa9c18dde 100644
--- a/platform/testRunner/src/com/intellij/execution/testframework/export/ExportTestResultsAction.java
+++ b/platform/testRunner/src/com/intellij/execution/testframework/export/ExportTestResultsAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2010 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@ import com.intellij.diagnostic.LogMessageEx;
import com.intellij.diagnostic.errordialog.Attachment;
import com.intellij.execution.ExecutionBundle;
import com.intellij.execution.configurations.RuntimeConfiguration;
-import com.intellij.execution.testframework.AbstractTestProxy;
import com.intellij.execution.testframework.TestFrameworkRunningModel;
import com.intellij.ide.BrowserUtil;
import com.intellij.openapi.actionSystem.ActionManager;
@@ -28,7 +27,6 @@ import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ModalityState;
-import com.intellij.openapi.application.ex.ApplicationManagerEx;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.progress.PerformInBackgroundOption;
@@ -142,12 +140,11 @@ public class ExportTestResultsAction extends DumbAwareAction {
outputFolder = new File(config.getOutputFolder());
}
else {
- outputFolder = new File(new File(project.getLocation()), config.getOutputFolder());
+ outputFolder = new File(new File(project.getBasePath()), config.getOutputFolder());
}
}
else {
- outputFolder = new File(project.getLocation());
-
+ outputFolder = new File(project.getBasePath());
}
final File outputFile = new File(outputFolder, filename_);
final String outputText;
diff --git a/plugins/ant/src/com/intellij/lang/ant/config/actions/TargetAction.java b/plugins/ant/src/com/intellij/lang/ant/config/actions/TargetAction.java
index 9f6e9e7c7ab2..e7c1e3528bf9 100644
--- a/plugins/ant/src/com/intellij/lang/ant/config/actions/TargetAction.java
+++ b/plugins/ant/src/com/intellij/lang/ant/config/actions/TargetAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,9 @@ public final class TargetAction extends AnAction {
templatePresentation.setDescription(description);
myBuildName = buildFile.getPresentableName();
myTargets = targets;
- myDebugString = "Target action: " + displayName+ "; Build: " + buildFile.getPresentableName() + "; Project: " + buildFile.getProject().getLocation();
+ myDebugString = "Target action: " + displayName +
+ "; Build: " + buildFile.getPresentableName() +
+ "; Project: " + buildFile.getProject().getPresentableUrl();
}
public String toString() {
diff --git a/plugins/ant/src/com/intellij/lang/ant/config/execution/ExecutionHandler.java b/plugins/ant/src/com/intellij/lang/ant/config/execution/ExecutionHandler.java
index 77e9bd77b1ad..25d4c498804f 100644
--- a/plugins/ant/src/com/intellij/lang/ant/config/execution/ExecutionHandler.java
+++ b/plugins/ant/src/com/intellij/lang/ant/config/execution/ExecutionHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,6 +46,7 @@ import com.intellij.openapi.vfs.encoding.EncodingProjectManager;
import com.intellij.openapi.wm.*;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -63,7 +64,7 @@ public final class ExecutionHandler {
*/
public static void runBuild(final AntBuildFileBase buildFile,
String[] targets,
- final AntBuildMessageView buildMessageViewToReuse,
+ @Nullable final AntBuildMessageView buildMessageViewToReuse,
final DataContext dataContext,
List additionalProperties, @NotNull final AntBuildListener antBuildListener) {
FileDocumentManager.getInstance().saveAllDocuments();
@@ -223,7 +224,7 @@ public final class ExecutionHandler {
}
}
- private static AntBuildMessageView prepareMessageView(AntBuildMessageView buildMessageViewToReuse,
+ private static AntBuildMessageView prepareMessageView(@Nullable AntBuildMessageView buildMessageViewToReuse,
AntBuildFileBase buildFile,
String[] targets) throws RunCanceledException {
AntBuildMessageView messageView;