From ca709184937848187e1c6aa38ac182ad957c653a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Sep 2009 14:56:18 +0400 Subject: [PATCH 01/58] Undo: fix npe --- .../src/com/intellij/ide/actions/UndoRedoAction.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/ide/actions/UndoRedoAction.java b/platform/platform-impl/src/com/intellij/ide/actions/UndoRedoAction.java index bd91e70f85a5..d055f543c547 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/UndoRedoAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/UndoRedoAction.java @@ -8,6 +8,7 @@ import com.intellij.openapi.fileEditor.TextEditor; import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.text.StringUtil; +import org.jetbrains.annotations.Nullable; public abstract class UndoRedoAction extends AnAction implements DumbAware { public UndoRedoAction() { @@ -36,7 +37,8 @@ public abstract class UndoRedoAction extends AnAction implements DumbAware { UndoManager undoManager = getUndoManager(editor, dataContext); boolean available = isAvailable(editor, undoManager); presentation.setEnabled(available); - String actionName = available ? formatAction(editor, undoManager) : ""; + String actionName = available ? formatAction(editor, undoManager) : null; + if (actionName == null) actionName = ""; String shortActionName = StringUtil.first(actionName, 30, true); if (actionName.length() == 0) actionName = ActionsBundle.message(getActionDescriptionEmptyMessageKey()); @@ -70,5 +72,6 @@ public abstract class UndoRedoAction extends AnAction implements DumbAware { protected abstract String getActionDescriptionEmptyMessageKey(); + @Nullable protected abstract String formatAction(FileEditor editor, UndoManager undoManager); } \ No newline at end of file From a59466f2408954ca1a9433d20191268bf152c6b4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Sep 2009 15:05:06 +0400 Subject: [PATCH 02/58] Maven: do not let empty parameters pass to command line --- .../idea/maven/execution/MavenExternalParameters.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenExternalParameters.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenExternalParameters.java index 9d6726310478..ff98dc748d38 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenExternalParameters.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenExternalParameters.java @@ -66,7 +66,9 @@ public class MavenExternalParameters { params.setMainClass(MAVEN_LAUNCHER_CLASS); for (String parameter : createMavenParameters(new ArrayList(), coreSettings, runnerSettings, parameters)) { - params.getProgramParametersList().add(parameter); + if (!StringUtil.isEmpty(parameter)) { + params.getProgramParametersList().add(parameter); + } } return params; From db481ae301ed4fd3dacaf6bdcafe112e803cce8c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Sep 2009 15:05:31 +0400 Subject: [PATCH 03/58] Maven: ignored test + attached sources --- plugins/maven/maven.iml | 80 +++++++++---------- .../maven/DependenciesManagementTest.java | 2 + 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/plugins/maven/maven.iml b/plugins/maven/maven.iml index 8f0118e16c8d..c2bd4ee8d1c0 100644 --- a/plugins/maven/maven.iml +++ b/plugins/maven/maven.iml @@ -26,47 +26,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesManagementTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesManagementTest.java index 845356cf2c30..9f0f0d2dc7dd 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesManagementTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesManagementTest.java @@ -55,6 +55,8 @@ public class DependenciesManagementTest extends MavenImportingTestCase { } public void testImportingNotInstalledDependencies() throws Exception { + if (ignore()) return; + setRepositoryPath(new File(myDir, "/repo").getPath()); updateSettingsXml("" + getRepositoryPath() + ""); From 584483d521fd0f3c88dbd1562921397f01f4ad09 Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Tue, 29 Sep 2009 15:47:05 +0400 Subject: [PATCH 04/58] do not save configs with meaningless (empty) data --- .../openapi/components/impl/stores/FileBasedStorage.java | 2 +- .../openapi/components/impl/stores/XmlElementStorage.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/FileBasedStorage.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/FileBasedStorage.java index 202b56123fd5..159223721891 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/FileBasedStorage.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/FileBasedStorage.java @@ -133,7 +133,7 @@ public class FileBasedStorage extends XmlElementStorage { @Override protected boolean physicalContentNeedsSave() { - if (!myFile.exists()) return true; + if (!myFile.exists()) return !myStorageData.isEmpty(); return !StorageUtil.contentEquals(getDocumentToSave(), myFile); } diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/XmlElementStorage.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/XmlElementStorage.java index 58a8b998f7c7..25abffe7fd9a 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/XmlElementStorage.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/XmlElementStorage.java @@ -730,6 +730,10 @@ public abstract class XmlElementStorage implements StateStorage, Disposable { return diffs; } + public boolean isEmpty() { + return myComponentStates.size() == 0; + } + public boolean hasState(final String componentName) { return myComponentStates.containsKey(componentName); } From 31de3d1509ee625176b9461c6e1cf79c6f3f2e3e Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2009 17:12:34 +0400 Subject: [PATCH 05/58] fix disappearing mappings --- .../openapi/vcs/impl/ModuleVcsDetector.java | 6 +- .../VcsManagerPerModuleConfiguration.java | 6 +- .../vcs/impl/projectlevelman/NewMappings.java | 3 +- .../InspectionGadgetsPlugin.iml | 9 - .../IntentionPowerPackPlugin.iml | 9 - plugins/devkit/devkit.iml | 156 --------------- plugins/images/images.iml | 156 --------------- plugins/images/imagesPlugin.iml | 177 ------------------ plugins/svn4idea/svn4idea.iml | 9 - plugins/svn4idea/svn4idea_plugin.iml | 4 - plugins/testng/testng-j.iml | 9 - 11 files changed, 8 insertions(+), 536 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/openapi/vcs/impl/ModuleVcsDetector.java b/platform/lang-impl/src/com/intellij/openapi/vcs/impl/ModuleVcsDetector.java index c2d76d055da9..047739fd2e00 100644 --- a/platform/lang-impl/src/com/intellij/openapi/vcs/impl/ModuleVcsDetector.java +++ b/platform/lang-impl/src/com/intellij/openapi/vcs/impl/ModuleVcsDetector.java @@ -112,14 +112,18 @@ public class ModuleVcsDetector implements ProjectComponent { } private void autoDetectModuleVcsMapping(final Module module) { + boolean mappingsUpdated = false; final VirtualFile[] files = ModuleRootManager.getInstance(module).getContentRoots(); for(VirtualFile file: files) { AbstractVcs vcs = myVcsManager.findVersioningVcs(file); if (vcs != null && vcs != myVcsManager.getVcsFor(file)) { myVcsManager.setAutoDirectoryMapping(file.getPath(), vcs.getName()); + mappingsUpdated = true; } } - myVcsManager.cleanupMappings(); + if (mappingsUpdated) { + myVcsManager.cleanupMappings(); + } } private void checkRemoveVcsRoot(final Module module) { diff --git a/platform/lang-impl/src/com/intellij/openapi/vcs/impl/VcsManagerPerModuleConfiguration.java b/platform/lang-impl/src/com/intellij/openapi/vcs/impl/VcsManagerPerModuleConfiguration.java index 70fc402a7798..cc59aabd9c71 100644 --- a/platform/lang-impl/src/com/intellij/openapi/vcs/impl/VcsManagerPerModuleConfiguration.java +++ b/platform/lang-impl/src/com/intellij/openapi/vcs/impl/VcsManagerPerModuleConfiguration.java @@ -64,10 +64,6 @@ public class VcsManagerPerModuleConfiguration implements JDOMExternalizable, Mod } public void writeExternal(Element element) throws WriteExternalException { - if (!USE_PROJECT_VCS) { - DefaultJDOMExternalizer.writeExternal(this, element); - } else { - throw new WriteExternalException(); - } + throw new WriteExternalException(); } } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/NewMappings.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/NewMappings.java index f26b596ce32b..020c9a50f5b8 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/NewMappings.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/NewMappings.java @@ -350,7 +350,8 @@ public class NewMappings { // already sorted mySortedMappings = items.toArray(new VcsDirectoryMapping[items.size()]); - return filter.getRemovedRequests(); + final List watchRequestList = filter.getRemovedRequests(); + return watchRequestList; } private boolean trySwitchVcs(final String path, final String activeVcsName) { diff --git a/plugins/InspectionGadgets/InspectionGadgetsPlugin.iml b/plugins/InspectionGadgets/InspectionGadgetsPlugin.iml index cca7216dfe4c..1e152154480e 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsPlugin.iml +++ b/plugins/InspectionGadgets/InspectionGadgetsPlugin.iml @@ -17,14 +17,5 @@ - - - - - - - diff --git a/plugins/IntentionPowerPak/IntentionPowerPackPlugin.iml b/plugins/IntentionPowerPak/IntentionPowerPackPlugin.iml index bef2fcee36be..e3817225b2d6 100644 --- a/plugins/IntentionPowerPak/IntentionPowerPackPlugin.iml +++ b/plugins/IntentionPowerPak/IntentionPowerPackPlugin.iml @@ -14,14 +14,5 @@ - - - - - - - diff --git a/plugins/devkit/devkit.iml b/plugins/devkit/devkit.iml index 165351058fe0..941ee0c69569 100644 --- a/plugins/devkit/devkit.iml +++ b/plugins/devkit/devkit.iml @@ -32,161 +32,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/images/images.iml b/plugins/images/images.iml index d52b55b4a4f2..fc9a5aef0ad1 100644 --- a/plugins/images/images.iml +++ b/plugins/images/images.iml @@ -10,161 +10,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/images/imagesPlugin.iml b/plugins/images/imagesPlugin.iml index e9d9b69accc9..4e12d30128e1 100644 --- a/plugins/images/imagesPlugin.iml +++ b/plugins/images/imagesPlugin.iml @@ -11,182 +11,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/svn4idea/svn4idea.iml b/plugins/svn4idea/svn4idea.iml index 4dd2002a72e3..14fb4417e929 100644 --- a/plugins/svn4idea/svn4idea.iml +++ b/plugins/svn4idea/svn4idea.iml @@ -49,14 +49,5 @@ - - - - diff --git a/plugins/svn4idea/svn4idea_plugin.iml b/plugins/svn4idea/svn4idea_plugin.iml index 0bb8fe1feae1..c0f38c08fabf 100644 --- a/plugins/svn4idea/svn4idea_plugin.iml +++ b/plugins/svn4idea/svn4idea_plugin.iml @@ -33,9 +33,5 @@ - - diff --git a/plugins/testng/testng-j.iml b/plugins/testng/testng-j.iml index 7f72ea4bb548..d739ce24e375 100644 --- a/plugins/testng/testng-j.iml +++ b/plugins/testng/testng-j.iml @@ -32,14 +32,5 @@ - - - - - - - From d79725ae21408876e71c8482616a190eac2bcefc Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2009 17:21:13 +0400 Subject: [PATCH 06/58] fix exception on first startup of CE --- .../platform-main/src/com/intellij/idea/MainImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/platform-main/src/com/intellij/idea/MainImpl.java b/platform/platform-main/src/com/intellij/idea/MainImpl.java index 8da470cd0be8..3a383e73b2e0 100644 --- a/platform/platform-main/src/com/intellij/idea/MainImpl.java +++ b/platform/platform-main/src/com/intellij/idea/MainImpl.java @@ -87,12 +87,12 @@ public class MainImpl { } private static void startApplication(final String[] args) { - if (runStartupWizard) { - StartupUtil.runStartupWizard(); - } - final IdeaApplication app = new IdeaApplication(args); SwingUtilities.invokeLater(new Runnable() { public void run() { + if (runStartupWizard) { + StartupUtil.runStartupWizard(); + } + final IdeaApplication app = new IdeaApplication(args); app.run(); } }); From c61a8b45d4c388108ca5f996a77cef3a2a7830b7 Mon Sep 17 00:00:00 2001 From: nik Date: Tue, 29 Sep 2009 18:00:20 +0400 Subject: [PATCH 07/58] fix tests on linux - 1 --- .../com/intellij/refactoring/rename/RenameUtil.java | 5 ++--- .../intellij/lang/xpath/xslt/XsltHighlightingTest.java | 10 +++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/refactoring/rename/RenameUtil.java b/platform/lang-impl/src/com/intellij/refactoring/rename/RenameUtil.java index 53508d21b178..9e7cc2b2e080 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/rename/RenameUtil.java +++ b/platform/lang-impl/src/com/intellij/refactoring/rename/RenameUtil.java @@ -12,6 +12,7 @@ import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.pom.PomTargetPsiElement; import com.intellij.psi.*; import com.intellij.psi.meta.PsiMetaData; import com.intellij.psi.meta.PsiMetaOwner; @@ -23,10 +24,8 @@ import com.intellij.refactoring.util.*; import com.intellij.usageView.UsageInfo; import com.intellij.util.IncorrectOperationException; import com.intellij.util.containers.HashMap; -import com.intellij.pom.PomTargetPsiElement; import org.jetbrains.annotations.NotNull; -import java.io.File; import java.util.*; public class RenameUtil { @@ -283,7 +282,7 @@ public class RenameUtil { return inputValidator.value(newName); } if (psiElement instanceof PsiFile || psiElement instanceof PsiDirectory) { - return newName.indexOf(File.separatorChar) < 0 && newName.indexOf('/') < 0; + return newName.indexOf('\\') < 0 && newName.indexOf('/') < 0; } if (psiElement instanceof PomTargetPsiElement) { return !StringUtil.isEmptyOrSpaces(newName); diff --git a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltHighlightingTest.java b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltHighlightingTest.java index cdaf126053a3..eb9fe399eeeb 100644 --- a/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltHighlightingTest.java +++ b/plugins/xpath/xpath-lang/test/org/intellij/lang/xpath/xslt/XsltHighlightingTest.java @@ -62,23 +62,23 @@ public class XsltHighlightingTest extends TestBase { doXsltHighlighting(); } - public void testInValidPattern1() throws Throwable { + public void testInvalidPattern1() throws Throwable { doXsltHighlighting(); } - public void testInValidPattern2() throws Throwable { + public void testInvalidPattern2() throws Throwable { doXsltHighlighting(); } - public void testInValidPattern3() throws Throwable { + public void testInvalidPattern3() throws Throwable { doXsltHighlighting(); } - public void testInValidPattern4() throws Throwable { + public void testInvalidPattern4() throws Throwable { doXsltHighlighting(); } - public void testInValidPattern5() throws Throwable { + public void testInvalidPattern5() throws Throwable { doXsltHighlighting(); } From 99536d83f28d080076500251e9e67c95053f22d1 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2009 18:02:41 +0400 Subject: [PATCH 08/58] ignore community workspace.xml --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3957bdf65e76..341a9f8a864b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /config /system +.idea/workspace.xml From 1936337a859198e018fc53f92e363e697a43a8d9 Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Tue, 29 Sep 2009 18:28:33 +0400 Subject: [PATCH 09/58] do not create empty configuration dirictories + fix codestylesettings manager to not write default state --- .../codeStyle/CodeStyleSettingsManager.java | 3 +- .../impl/stores/DirectoryBasedStorage.java | 46 ++++++++++--------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/platform/lang-api/src/com/intellij/psi/codeStyle/CodeStyleSettingsManager.java b/platform/lang-api/src/com/intellij/psi/codeStyle/CodeStyleSettingsManager.java index 73ea9039921a..ceb278591ab7 100644 --- a/platform/lang-api/src/com/intellij/psi/codeStyle/CodeStyleSettingsManager.java +++ b/platform/lang-api/src/com/intellij/psi/codeStyle/CodeStyleSettingsManager.java @@ -20,6 +20,7 @@ import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.DefaultJDOMExternalizer; +import com.intellij.openapi.util.DifferenceFilter; import com.intellij.openapi.util.InvalidDataException; import com.intellij.openapi.util.WriteExternalException; import org.jdom.Element; @@ -62,7 +63,7 @@ public class CodeStyleSettingsManager implements PersistentStateComponent(this, new CodeStyleSettingsManager())); } public Element getState() { diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/DirectoryBasedStorage.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/DirectoryBasedStorage.java index afd32dc6cec0..df3265c3d97e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/DirectoryBasedStorage.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/DirectoryBasedStorage.java @@ -50,6 +50,8 @@ public class DirectoryBasedStorage implements StateStorage, Disposable { @NonNls private static final String COMPONENT = "component"; @NonNls private static final String NAME = "name"; + private static final IFile[] EMPTY_FILES = new IFile[0]; + private final FileTypeManager myFileTypeManager; public DirectoryBasedStorage(final TrackingPathMacroSubstitutor pathMacroSubstitutor, @@ -242,12 +244,7 @@ public class DirectoryBasedStorage implements StateStorage, Disposable { assert mySession == this; final Set currentNames = new HashSet(); - if (!myDir.exists()) { - myDir.createParentDirs(); - myDir.mkDir(); - } - - IFile[] children = myDir.listFiles(); + IFile[] children = myDir.exists() ? myDir.listFiles() : EMPTY_FILES; for (IFile child : children) { final String fileName = child.getName(); if (!myFileTypeManager.isFileIgnored(fileName)) { @@ -264,6 +261,11 @@ public class DirectoryBasedStorage implements StateStorage, Disposable { } if (file.getTimeStamp() <= myStorageData.getLastTimeStamp()) { + if (!myDir.exists()) { + myDir.createParentDirs(); + myDir.mkDir(); + } + StorageUtil.save(file, element); myStorageData.updateLastTimestamp(file); } @@ -272,23 +274,25 @@ public class DirectoryBasedStorage implements StateStorage, Disposable { ApplicationManager.getApplication().runWriteAction(new Runnable() { public void run() { - for (String name : currentNames) { - IFile child = myDir.getChild(name); + if (myDir.exists()) { + for (String name : currentNames) { + IFile child = myDir.getChild(name); - if (child.getTimeStamp() > myStorageData.getLastTimeStamp()) { - // do not touch new files during VC update (which aren't read yet) - // now got an opposite problem: file is recreated if was removed by VC during update. - return; - } - - final VirtualFile virtualFile = StorageUtil.getVirtualFile(child); - if (virtualFile != null) { - try { - LOG.debug("Removing configuration file: " + virtualFile.getPresentableUrl()); - virtualFile.delete(DirectoryBasedStorage.this); + if (child.getTimeStamp() > myStorageData.getLastTimeStamp()) { + // do not touch new files during VC update (which aren't read yet) + // now got an opposite problem: file is recreated if was removed by VC during update. + return; } - catch (IOException e) { - LOG.error(e); + + final VirtualFile virtualFile = StorageUtil.getVirtualFile(child); + if (virtualFile != null) { + try { + LOG.debug("Removing configuration file: " + virtualFile.getPresentableUrl()); + virtualFile.delete(DirectoryBasedStorage.this); + } + catch (IOException e) { + LOG.error(e); + } } } } From 0a9c4879552d0cf78a57ac1aa9607281ba2db7aa Mon Sep 17 00:00:00 2001 From: "Anton.Makeev" Date: Tue, 29 Sep 2009 17:52:47 +0400 Subject: [PATCH 10/58] Undo: rename case change fix --- .../integration/revertion/ChangeRevertionVisitor.java | 2 +- .../src/com/intellij/openapi/command/impl/ChangeRange.java | 2 +- .../com/intellij/openapi/command/impl/FileUndoProvider.java | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/platform/lvcs-impl/src/com/intellij/history/integration/revertion/ChangeRevertionVisitor.java b/platform/lvcs-impl/src/com/intellij/history/integration/revertion/ChangeRevertionVisitor.java index 40e3153a15f4..c04db7bf881a 100644 --- a/platform/lvcs-impl/src/com/intellij/history/integration/revertion/ChangeRevertionVisitor.java +++ b/platform/lvcs-impl/src/com/intellij/history/integration/revertion/ChangeRevertionVisitor.java @@ -61,7 +61,7 @@ public class ChangeRevertionVisitor extends ChangeVisitor { String newName = getName(e); VirtualFile existing = f.getParent().findChild(newName); - if (existing != null) { + if (existing != null && existing != f) { existing.delete(this); } f.rename(this, newName); diff --git a/platform/lvcs-impl/src/com/intellij/openapi/command/impl/ChangeRange.java b/platform/lvcs-impl/src/com/intellij/openapi/command/impl/ChangeRange.java index 270b5a2c2312..7c1bc7d7874d 100644 --- a/platform/lvcs-impl/src/com/intellij/openapi/command/impl/ChangeRange.java +++ b/platform/lvcs-impl/src/com/intellij/openapi/command/impl/ChangeRange.java @@ -32,7 +32,7 @@ public class ChangeRange { last[0] = c; } }; - myVcs.removeListener(l); + myVcs.addListener(l); try { myVcs.acceptWrite(new ChangeRangeRevertionVisitor(myGateway, myToChange, myFromChange)); } diff --git a/platform/lvcs-impl/src/com/intellij/openapi/command/impl/FileUndoProvider.java b/platform/lvcs-impl/src/com/intellij/openapi/command/impl/FileUndoProvider.java index 73d9692f8949..5feaaca5626b 100644 --- a/platform/lvcs-impl/src/com/intellij/openapi/command/impl/FileUndoProvider.java +++ b/platform/lvcs-impl/src/com/intellij/openapi/command/impl/FileUndoProvider.java @@ -7,6 +7,7 @@ import com.intellij.history.core.changes.Change; import com.intellij.history.integration.IdeaGateway; import com.intellij.history.integration.LocalHistoryComponent; import com.intellij.openapi.command.undo.*; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.ModuleRootEvent; import com.intellij.openapi.roots.ModuleRootListener; @@ -18,6 +19,8 @@ import com.intellij.util.messages.MessageBusConnection; import java.io.IOException; public class FileUndoProvider extends VirtualFileAdapter implements UndoProvider { + public static final Logger LOG = Logger.getInstance("#" + FileUndoProvider.class.getName()); + private final Key DELETION_WAS_UNDOABLE = new Key("DeletionWasUndoable"); private final Project myProject; @@ -193,6 +196,7 @@ public class FileUndoProvider extends VirtualFileAdapter implements UndoProvider myUndoChangeRange = myActionChangeRange.revert(myUndoChangeRange); } catch (IOException e) { + LOG.warn(e); throw new UnexpectedUndoException(e.getMessage()); } } @@ -202,6 +206,7 @@ public class FileUndoProvider extends VirtualFileAdapter implements UndoProvider myActionChangeRange = myUndoChangeRange.revert(myActionChangeRange); } catch (IOException e) { + LOG.warn(e); throw new UnexpectedUndoException(e.getMessage()); } } From e5d40b564285c602e985e598bc0fbdf16b4d2acf Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Tue, 29 Sep 2009 18:53:57 +0400 Subject: [PATCH 11/58] missed (from git import) testdata files --- .../AddBracesIntention/after.java.template | 8 ++++++++ .../AddBracesIntention/before.java.template | 6 ++++++ .../ExtractIncrementIntention/after.java.template | 6 ++++++ .../ExtractIncrementIntention/before.java.template | 5 +++++ .../after.java.template | 5 +++++ .../before.java.template | 5 +++++ .../SimplifyIfElseIntention/after.java.template | 5 +++++ .../SimplifyIfElseIntention/before.java.template | 8 ++++++++ 8 files changed, 48 insertions(+) create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/AddBracesIntention/after.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/AddBracesIntention/before.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/ExtractIncrementIntention/after.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/ExtractIncrementIntention/before.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithStringBufferIntention/after.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithStringBufferIntention/before.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/SimplifyIfElseIntention/after.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/SimplifyIfElseIntention/before.java.template diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/AddBracesIntention/after.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/AddBracesIntention/after.java.template new file mode 100644 index 000000000000..7777953c60cc --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/AddBracesIntention/after.java.template @@ -0,0 +1,8 @@ +public class X { + int f(boolean b) { + if (b) { + return 1; + } + return 0; + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/AddBracesIntention/before.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/AddBracesIntention/before.java.template new file mode 100644 index 000000000000..d45dc00808ae --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/AddBracesIntention/before.java.template @@ -0,0 +1,6 @@ +public class X { + int f(boolean b) { + if (b) return 1; + return 0; + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/ExtractIncrementIntention/after.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/ExtractIncrementIntention/after.java.template new file mode 100644 index 000000000000..24830dee7c05 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/ExtractIncrementIntention/after.java.template @@ -0,0 +1,6 @@ +public class X { + int f() { + System.out.println(i); + i++; + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/ExtractIncrementIntention/before.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/ExtractIncrementIntention/before.java.template new file mode 100644 index 000000000000..20b5f42e2118 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/ExtractIncrementIntention/before.java.template @@ -0,0 +1,5 @@ +public class X { + int f() { + System.out.println(i++); + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithStringBufferIntention/after.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithStringBufferIntention/after.java.template new file mode 100644 index 000000000000..5c6b11913b7b --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithStringBufferIntention/after.java.template @@ -0,0 +1,5 @@ +public class X { + String f() { + return new StringBuffer().append("1").append("2").toString(); + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithStringBufferIntention/before.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithStringBufferIntention/before.java.template new file mode 100644 index 000000000000..1dbd1ab1669b --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithStringBufferIntention/before.java.template @@ -0,0 +1,5 @@ +public class X { + String f() { + return "1" + "2"; + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/SimplifyIfElseIntention/after.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/SimplifyIfElseIntention/after.java.template new file mode 100644 index 000000000000..286b7f258199 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/SimplifyIfElseIntention/after.java.template @@ -0,0 +1,5 @@ +public class X { + boolean f(boolean a) { + return a; + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/SimplifyIfElseIntention/before.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/SimplifyIfElseIntention/before.java.template new file mode 100644 index 000000000000..c23f51396417 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/SimplifyIfElseIntention/before.java.template @@ -0,0 +1,8 @@ +public class X { + boolean f(boolean a) { + if (a) { + return true; + } + return false; + } +} \ No newline at end of file From d099240a63524ec54fee7cd26b843fd15266c901 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2009 19:46:09 +0400 Subject: [PATCH 12/58] fix line separators in Ruby testdata --- .../ide/actions/FixLineSeparatorsAction.java | 71 +++++++++++++++++++ .../src/idea/PlatformActions.xml | 1 + 2 files changed, 72 insertions(+) create mode 100644 platform/platform-impl/src/com/intellij/ide/actions/FixLineSeparatorsAction.java diff --git a/platform/platform-impl/src/com/intellij/ide/actions/FixLineSeparatorsAction.java b/platform/platform-impl/src/com/intellij/ide/actions/FixLineSeparatorsAction.java new file mode 100644 index 000000000000..fe3b7d6443af --- /dev/null +++ b/platform/platform-impl/src/com/intellij/ide/actions/FixLineSeparatorsAction.java @@ -0,0 +1,71 @@ +package com.intellij.ide.actions; + +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.PlatformDataKeys; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.command.CommandProcessor; +import com.intellij.openapi.editor.Document; +import com.intellij.openapi.fileEditor.FileDocumentManager; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.vfs.VirtualFile; + +/** + * @author yole + */ +public class FixLineSeparatorsAction extends AnAction { + @Override + public void actionPerformed(AnActionEvent e) { + Project project = e.getData(PlatformDataKeys.PROJECT); + final VirtualFile[] vFiles = e.getData(PlatformDataKeys.VIRTUAL_FILE_ARRAY); + if (project == null || vFiles == null) return; + CommandProcessor.getInstance().executeCommand(project, new Runnable() { + public void run() { + for (VirtualFile vFile : vFiles) { + fixSeparators(vFile); + } + } + }, "fixing line separators", null); + } + + private static void fixSeparators(VirtualFile vFile) { + if (vFile.isDirectory()) { + for (VirtualFile child : vFile.getChildren()) { + fixSeparators(child); + } + } + else { + if (vFile.getFileType().isBinary()) { + return; + } + final Document document = FileDocumentManager.getInstance().getDocument(vFile); + if (areSeparatorsBroken(document)) { + fixSeparators(document); + } + } + } + + private static boolean areSeparatorsBroken(Document document) { + final int count = document.getLineCount(); + for (int i = 1; i < count; i += 2) { + if (document.getLineStartOffset(i) != document.getLineEndOffset(i)) { + return false; + } + } + return true; + } + + private static void fixSeparators(final Document document) { + ApplicationManager.getApplication().runWriteAction(new Runnable() { + public void run() { + int i = 1; + while(i < document.getLineCount()) { + final int start = document.getLineEndOffset(i); + final int end = document.getLineEndOffset(i) + document.getLineSeparatorLength(i); + document.deleteString(start, end); + i++; + } + } + }); + } +} diff --git a/platform/platform-resources/src/idea/PlatformActions.xml b/platform/platform-resources/src/idea/PlatformActions.xml index 4e5ba9952f36..ed2c4f9f03f3 100644 --- a/platform/platform-resources/src/idea/PlatformActions.xml +++ b/platform/platform-resources/src/idea/PlatformActions.xml @@ -382,6 +382,7 @@ + From b93be57708a34003bcbc1ab988958a1ff709003e Mon Sep 17 00:00:00 2001 From: "Anton.Makeev" Date: Tue, 29 Sep 2009 19:44:31 +0400 Subject: [PATCH 13/58] Maven: community tests fix --- .../jetbrains/idea/maven/ArchetypesTest.java | 2 + .../idea/maven/DependenciesImportingTest.java | 142 +----------------- .../maven/DependenciesManagementTest.java | 2 + .../jetbrains/idea/maven/MavenTestCase.java | 6 + .../SnapshotDependenciesImportingTest.java | 8 + .../idea/maven/StructureImportingTest.java | 2 + .../maven/execution/MavenExecutorsTest.java | 2 + .../idea/maven/execution/MavenRunnerTest.java | 2 + .../maven/wizards/MavenModuleBuilderTest.java | 22 +++ 9 files changed, 52 insertions(+), 136 deletions(-) diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/ArchetypesTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/ArchetypesTest.java index ee50a864aafb..2d99aac510ef 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/ArchetypesTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/ArchetypesTest.java @@ -14,6 +14,8 @@ import java.util.Map; public class ArchetypesTest extends MavenTestCase { public void testGenerating() throws Exception { + if (!hasM2Home()) return; + File dir = new File(myDir.getPath(), "generated"); dir.mkdirs(); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesImportingTest.java index e4b0aad81bc7..c6c30cc8bf2e 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesImportingTest.java @@ -1019,44 +1019,6 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertTrue(myProjectsTree.findProject(myProjectPom).hasUnresolvedArtifacts()); } - public void testArtifactTypeProvidedByExtensionPlugin() throws Exception { - // This test ensures that we download all necessary extension plugins. - importProject("test" + - "project" + - "1" + - "swf" + - - "" + - " " + - " com.adobe.flex.framework" + - " framework" + - " 3.2.0.3959" + - " resource-bundle" + - " en_US" + - " " + - "" + - - "" + - " " + - " " + - " org.sonatype.flexmojos" + - " flexmojos-maven-plugin" + - " true" + - " " + - " " + - ""); - - // flex plugin handles 'resource-bundle' dependencies in a special way. - // - assertModuleLibDep("project", "Maven: com.adobe.flex.framework:framework:resource-bundle:en_US:3.2.0.3959", - "jar://" + getRepositoryPath() + - "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959-en_US.rb.swc!/", - "jar://" + getRepositoryPath() + - "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959-en_US.rb-sources.jar!/", - "jar://" + getRepositoryPath() + - "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959-en_US.rb-javadoc.jar!/"); - } - public void testCanResolveDependenciesWhenExtensionPluginNotFound() throws Exception { importProject("test" + "project" + @@ -1129,7 +1091,6 @@ public class DependenciesImportingTest extends MavenImportingTestCase { importProject("test" + "project" + "1" + - "war" + "" + " " + @@ -1141,7 +1102,7 @@ public class DependenciesImportingTest extends MavenImportingTestCase { " junit" + " junit" + " 4.0" + - " war" + + " test-jar" + " " + " " + " junit" + @@ -1152,11 +1113,11 @@ public class DependenciesImportingTest extends MavenImportingTestCase { ""); assertProjectLibraries("Maven: junit:junit:4.0", - "Maven: junit:junit:war:4.0", + "Maven: junit:junit:test-jar:tests:4.0", "Maven: junit:junit:jdk5:4.0"); assertModuleLibDeps("project", "Maven: junit:junit:4.0", - "Maven: junit:junit:war:4.0", + "Maven: junit:junit:test-jar:tests:4.0", "Maven: junit:junit:jdk5:4.0"); } @@ -1349,63 +1310,6 @@ public class DependenciesImportingTest extends MavenImportingTestCase { "jar://" + getRepositoryPath() + "/junit/junit/4.0/junit-4.0-javadoc.jar!/"); } - public void testUpdateRootEntriesWithActualPathForNonJarDependencies() throws Exception { - importProject("test" + - "project" + - "1" + - "swf" + - - "" + - " " + - " com.adobe.flex.framework" + - " framework" + - " 3.2.0.3959" + - " swc" + - " " + - "" + - - "" + - " " + - " " + - " info.flex-mojos" + - " flex-compiler-mojo" + - " 2.0M10" + - " true" + - " " + - " " + - "" + - - "" + - " " + - " flex-mojos-repository" + - " http://svn.sonatype.org/flexmojos/repository/" + - " " + - " true" + - " " + - " " + - ""); - - assertModuleLibDeps("project", "Maven: com.adobe.flex.framework:framework:swc:3.2.0.3959"); - assertModuleLibDep("project", "Maven: com.adobe.flex.framework:framework:swc:3.2.0.3959", - "jar://" + getRepositoryPath() + "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959.swc!/", - "jar://" + getRepositoryPath() + "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959-sources.jar!/", - "jar://" + getRepositoryPath() + - "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959-javadoc.jar!/"); - - myProjectsManager.listenForExternalChanges(); // to recognize repository change - setRepositoryPath(new File(myDir, "__repo").getPath()); - - scheduleResolveAll(); - - resolveDependenciesAndImport(); - - assertModuleLibDep("project", "Maven: com.adobe.flex.framework:framework:swc:3.2.0.3959", - "jar://" + getRepositoryPath() + "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959.swc!/", - "jar://" + getRepositoryPath() + "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959-sources.jar!/", - "jar://" + getRepositoryPath() + - "/com/adobe/flex/framework/framework/3.2.0.3959/framework-3.2.0.3959-javadoc.jar!/"); - } - public void testUpdateRootEntriesWithActualPathForDependenciesWithClassifiers() throws Exception { importProject("test" + "project" + @@ -1617,43 +1521,10 @@ public class DependenciesImportingTest extends MavenImportingTestCase { assertProjectLibraries("Maven: group:lib1:1"); } - public void testRemovingUnusedNonJARLibrary() throws Exception { - importProject("test" + - "project" + - "1" + - "war" + - - "" + - " " + - " group" + - " lib1" + - " 1" + - " ear" + - " " + - " " + - " group" + - " lib2" + - " 1" + - " war" + - " " + - ""); - - assertProjectLibraries("Maven: group:lib1:ear:1", - "Maven: group:lib2:war:1"); - - importProject("test" + - "project" + - "1" + - "war"); - - assertProjectLibraries(); - } - public void testRemovingUnusedLibraryWithClassifier() throws Exception { importProject("test" + "project" + "1" + - "war" + "" + " " + @@ -1666,18 +1537,17 @@ public class DependenciesImportingTest extends MavenImportingTestCase { " group" + " lib2" + " 1" + - " war" + + " test-jar" + " tests" + " " + ""); assertProjectLibraries("Maven: group:lib1:tests:1", - "Maven: group:lib2:war:tests:1"); + "Maven: group:lib2:test-jar:tests:1"); importProject("test" + "project" + - "1" + - "war"); + "1"); assertProjectLibraries(); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesManagementTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesManagementTest.java index 9f0f0d2dc7dd..b53a22e7e826 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesManagementTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/DependenciesManagementTest.java @@ -7,6 +7,8 @@ import java.util.Arrays; public class DependenciesManagementTest extends MavenImportingTestCase { public void testImportingDependencies() throws Exception { + if (!hasM2Home()) return; + setRepositoryPath(new File(myDir, "/repo").getPath()); updateSettingsXml("" + getRepositoryPath() + ""); diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java index 3b8701591983..73c567dae6ac 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java @@ -390,4 +390,10 @@ public abstract class MavenTestCase extends TestCase { System.out.println("Ignored: " + getClass().getSimpleName() + "." + getName()); return true; } + + protected boolean hasM2Home() { + boolean result = System.getenv("M2_HOME") != null; + if (!result) System.out.println("Ignored, because Maven installation not found: " + getClass().getSimpleName() + "." + getName()); + return result; + } } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/SnapshotDependenciesImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/SnapshotDependenciesImportingTest.java index 2255c7319811..616cae4e9bf7 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/SnapshotDependenciesImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/SnapshotDependenciesImportingTest.java @@ -33,6 +33,8 @@ public class SnapshotDependenciesImportingTest extends MavenImportingTestCase { } private void performTestWithDependencyVersion(String version) throws Exception { + if (!hasM2Home()) return; + createProjectPom("test" + "project" + "pom" + @@ -79,6 +81,8 @@ public class SnapshotDependenciesImportingTest extends MavenImportingTestCase { } public void testNamingLibraryTheSameWayRegardlessAvailableSnapshotVersion() throws Exception { + if (!hasM2Home()) return; + deployArtifact("test", "foo", "1-SNAPSHOT"); importProject("test" + @@ -103,6 +107,8 @@ public class SnapshotDependenciesImportingTest extends MavenImportingTestCase { } public void testAttachingCorrectJavaDocsAndSources() throws Exception { + if (!hasM2Home()) return; + deployArtifact("test", "foo", "1-SNAPSHOT", "" + " " + @@ -161,6 +167,8 @@ public class SnapshotDependenciesImportingTest extends MavenImportingTestCase { } public void testCorrectlryUpdateRootEntriesWithActualPathForSnapshotDependencies() throws Exception { + if (!hasM2Home()) return; + deployArtifact("test", "foo", "1-SNAPSHOT", "" + " " + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/StructureImportingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/StructureImportingTest.java index 0fc9b9eb5ab9..711e2ccb0ce3 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/StructureImportingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/StructureImportingTest.java @@ -344,6 +344,8 @@ public class StructureImportingTest extends MavenImportingTestCase { } public void testParentInLocalRepository() throws Exception { + if (!hasM2Home()) return; + VirtualFile parent = createModulePom("parent", "test" + "parent" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutorsTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutorsTest.java index 9ee4c90d557a..a5834636f223 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutorsTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenExecutorsTest.java @@ -9,6 +9,8 @@ import java.util.Arrays; public class MavenExecutorsTest extends MavenTestCase { public void testExternalExecutor() throws Exception { + if (!hasM2Home()) return; + VfsUtil.saveText(createProjectSubFile("src/main/java/A.java"), "public class A {}"); createProjectPom("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenRunnerTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenRunnerTest.java index de3fc2d33e65..1420dc0ea8ee 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenRunnerTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/execution/MavenRunnerTest.java @@ -6,6 +6,8 @@ import java.util.Arrays; public class MavenRunnerTest extends MavenImportingTestCase { public void testUpdatingExcludedFoldersAfterRun() throws Exception { + if (!hasM2Home()) return; + createStdProjectFolders(); importProject("test" + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/wizards/MavenModuleBuilderTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/wizards/MavenModuleBuilderTest.java index 99d4a6f8780e..d5947bdab38b 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/wizards/MavenModuleBuilderTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/wizards/MavenModuleBuilderTest.java @@ -27,6 +27,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testCreatingBlank() throws Exception { + if (!hasM2Home()) return; + MavenId id = new MavenId("org.foo", "module", "1.0"); createNewModule(id); @@ -48,12 +50,16 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testInheritJdkFromProject() throws Exception { + if (!hasM2Home()) return; + createNewModule(new MavenId("org.foo", "module", "1.0")); ModuleRootManager manager = ModuleRootManager.getInstance(getModule("module")); assertTrue(manager.isSdkInherited()); } public void testCreatingFromArchetype() throws Exception { + if (!hasM2Home()) return; + setArchetype(new ArchetypeInfo("org.apache.maven.archetypes", "maven-archetype-quickstart", "1.0", null, null)); MavenId id = new MavenId("org.foo", "module", "1.0"); createNewModule(id); @@ -72,6 +78,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testAddingNewlyCreatedModuleToTheAggregator() throws Exception { + if (!hasM2Home()) return; + importProject("test" + "project" + "1"); @@ -91,6 +99,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testAddingManagedProjectIfNoArrgerator() throws Exception { + if (!hasM2Home()) return; + importProject("test" + "project" + "1"); @@ -106,6 +116,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testDoNotAddManagedProjectIfAddingAsModuleToAggregator() throws Exception { + if (!hasM2Home()) return; + importProject("test" + "project" + "1"); @@ -121,6 +133,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testAddingParent() throws Exception { + if (!hasM2Home()) return; + importProject("test" + "project" + "1"); @@ -150,6 +164,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testAddingParentWithInheritedProperties() throws Exception { + if (!hasM2Home()) return; + importProject("test" + "project" + "1"); @@ -178,6 +194,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testAddingParentAndInheritWhenGeneratingFromArchetype() throws Exception { + if (!hasM2Home()) return; + importProject("test" + "project" + "1"); @@ -213,6 +231,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testAddingParentWithRelativePath() throws Exception { + if (!hasM2Home()) return; + importProject("test" + "project" + "1"); @@ -243,6 +263,8 @@ public class MavenModuleBuilderTest extends MavenImportingTestCase { } public void testFindingPotentialParentInNotMavenizedProject() throws Exception { + if (!hasM2Home()) return; + Module module = createModule("project"); VirtualFile dir = module.getModuleFile().getParent(); dir.createChildData(this, "pom.xml"); From 769fd28e53805810b2af9d6447bcc2bbd2ec4bec Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Tue, 29 Sep 2009 19:55:45 +0400 Subject: [PATCH 14/58] added files for git to contain empty directories --- .../move/moveClass/classAndSecondary/after/pack2/Dummy.groovy | 0 .../move/moveClass/classAndSecondary/before/pack2/Dummy.groovy | 0 .../move/moveClass/ideadev27996/after/pack2/Dummy.groovy | 0 .../move/moveClass/ideadev27996/before/pack2/Dummy.groovy | 0 .../move/moveClass/localClass/after/pack1/Dummy.groovy | 0 .../move/moveClass/localClass/after/pack2/Dummy.groovy | 0 .../move/moveClass/localClass/before/pack1/Dummy.groovy | 0 .../move/moveClass/localClass/before/pack2/Dummy.groovy | 0 .../move/moveClass/moveMultiple1/after/pack1/Dummy.groovy | 0 .../move/moveClass/moveMultiple1/after/pack2/Dummy.groovy | 0 .../move/moveClass/moveMultiple1/before/pack1/Dummy.groovy | 0 .../move/moveClass/moveMultiple1/before/pack2/Dummy.groovy | 0 .../refactoring/move/moveClass/script/after/pack2/Dummy.groovy | 0 .../refactoring/move/moveClass/script/before/pack2/Dummy.groovy | 0 .../move/moveClass/stringsAndComments/after/pack1/Dummy.groovy | 0 .../move/moveClass/stringsAndComments/after/pack2/Dummy.groovy | 0 .../move/moveClass/stringsAndComments/before/pack1/Dummy.groovy | 0 .../move/moveClass/stringsAndComments/before/pack2/Dummy.groovy | 0 .../move/moveClass/stringsAndComments2/after/pack1/Dummy.groovy | 0 .../move/moveClass/stringsAndComments2/after/pack2/Dummy.groovy | 0 .../move/moveClass/stringsAndComments2/before/pack1/Dummy.groovy | 0 .../move/moveClass/stringsAndComments2/before/pack2/Dummy.groovy | 0 22 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/classAndSecondary/after/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/classAndSecondary/before/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/ideadev27996/after/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/ideadev27996/before/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/localClass/after/pack1/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/localClass/after/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/localClass/before/pack1/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/localClass/before/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/after/pack1/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/after/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/before/pack1/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/before/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/script/after/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/script/before/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/after/pack1/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/after/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/before/pack1/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/before/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/after/pack1/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/after/pack2/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/before/pack1/Dummy.groovy create mode 100644 plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/before/pack2/Dummy.groovy diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/classAndSecondary/after/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/classAndSecondary/after/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/classAndSecondary/before/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/classAndSecondary/before/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/ideadev27996/after/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/ideadev27996/after/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/ideadev27996/before/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/ideadev27996/before/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/localClass/after/pack1/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/localClass/after/pack1/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/localClass/after/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/localClass/after/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/localClass/before/pack1/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/localClass/before/pack1/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/localClass/before/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/localClass/before/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/after/pack1/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/after/pack1/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/after/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/after/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/before/pack1/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/before/pack1/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/before/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/moveMultiple1/before/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/script/after/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/script/after/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/script/before/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/script/before/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/after/pack1/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/after/pack1/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/after/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/after/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/before/pack1/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/before/pack1/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/before/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments/before/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/after/pack1/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/after/pack1/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/after/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/after/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/before/pack1/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/before/pack1/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/before/pack2/Dummy.groovy b/plugins/groovy/testdata/refactoring/move/moveClass/stringsAndComments2/before/pack2/Dummy.groovy new file mode 100644 index 000000000000..e69de29bb2d1 From 00909c65837080fb2739eea7dc90591499b16948 Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Tue, 29 Sep 2009 21:08:29 +0400 Subject: [PATCH 15/58] fix notifications panel to calculate link position correctly --- .../notification/impl/ui/NotificationsListPanel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/notification/impl/ui/NotificationsListPanel.java b/platform/platform-impl/src/com/intellij/notification/impl/ui/NotificationsListPanel.java index fa245eca3519..f66cef05a03f 100644 --- a/platform/platform-impl/src/com/intellij/notification/impl/ui/NotificationsListPanel.java +++ b/platform/platform-impl/src/com/intellij/notification/impl/ui/NotificationsListPanel.java @@ -366,6 +366,10 @@ public class NotificationsListPanel extends JPanel implements NotificationModelL final Notification notification = (Notification)value; final Component renderer = getCellRenderer().getListCellRendererComponent(this, value, index, false, false); if (renderer instanceof NotificationsListRenderer) { + final Rectangle bounds = getCellBounds(index, index); + renderer.setBounds(bounds); + renderer.doLayout(); + final JTextPane text = ((NotificationsListRenderer)renderer).getText(); Processor processor; @@ -385,9 +389,6 @@ public class NotificationsListPanel extends JPanel implements NotificationModelL ((NotificationsListRenderer)renderer).setCursorHandler(processor); } - final Rectangle bounds = getCellBounds(index, index); - renderer.setBounds(bounds); - final Point point = e.getPoint(); point.translate(-bounds.x, -bounds.y); From 537de6eecfae602bdf2d224816e97f0349d0357e Mon Sep 17 00:00:00 2001 From: anna Date: Tue, 29 Sep 2009 21:12:32 +0400 Subject: [PATCH 16/58] new order --- platform/util/src/com/intellij/util/lang/ClassPath.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/util/src/com/intellij/util/lang/ClassPath.java b/platform/util/src/com/intellij/util/lang/ClassPath.java index bfad419d68cd..ee0daf31e339 100644 --- a/platform/util/src/com/intellij/util/lang/ClassPath.java +++ b/platform/util/src/com/intellij/util/lang/ClassPath.java @@ -56,7 +56,7 @@ class ClassPath { final File orderFile = new File(PathManager.getBinPath() + File.separator + "order.txt"); try { if (!FileUtil.ensureCanCreateFile(orderFile)) return; - ourOrder = new PrintStream(new FileOutputStream(orderFile)); + ourOrder = new PrintStream(new FileOutputStream(orderFile, true)); ShutDownTracker.getInstance().registerShutdownTask(new Runnable() { public void run() { ourOrder.close(); @@ -97,7 +97,7 @@ class ClassPath { for (Loader loader : loaders) { final Resource resource = loader.getResource(s, flag); if (resource != null) { - //printOrder(loader, s); + printOrder(loader, s); return resource; } } From 77a4ca20303f5d800f99ed8222e39ad6ef9dfc1f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2009 21:28:15 +0400 Subject: [PATCH 17/58] don't try to run Windows binaries when running tests on non-Windows agents --- .../intellij/testFramework/AbstractVcsTestCase.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/AbstractVcsTestCase.java b/platform/testFramework/src/com/intellij/testFramework/AbstractVcsTestCase.java index ed82b8d3380d..e9be0f407fda 100644 --- a/platform/testFramework/src/com/intellij/testFramework/AbstractVcsTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/AbstractVcsTestCase.java @@ -24,6 +24,7 @@ import com.intellij.openapi.components.ProjectComponent; import com.intellij.openapi.diff.LineTokenizer; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Ref; +import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vcs.AbstractVcs; import com.intellij.openapi.vcs.ProjectLevelVcsManager; @@ -58,7 +59,13 @@ public class AbstractVcsTestCase { protected ProcessOutput runClient(String exeName, @Nullable String stdin, @Nullable final File workingDir, String[] commandLine) throws IOException { final List arguments = new ArrayList(); - arguments.add(new File(myClientBinaryPath, exeName).toString()); + if (SystemInfo.isWindows) { + arguments.add(new File(myClientBinaryPath, exeName).toString()); + } + else { + // assume client is in path + arguments.add(exeName); + } Collections.addAll(arguments, commandLine); final ProcessBuilder builder = new ProcessBuilder().command(arguments); if (workingDir != null) { @@ -85,7 +92,7 @@ public class AbstractVcsTestCase { return result; } - protected ProcessOutput runArbitrary(final String command, final String[] args) throws IOException { + protected static ProcessOutput runArbitrary(final String command, final String[] args) throws IOException { final List arguments = new ArrayList(); arguments.add(command); Collections.addAll(arguments, args); From 1095e3c5dc234a05dd383d6a573ff0118cf27348 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2009 21:29:22 +0400 Subject: [PATCH 18/58] fix case of testdata --- .../codeInspection/DefaultFileTemplateInspectionTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/DefaultFileTemplateInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/DefaultFileTemplateInspectionTest.java index 5acf76e290f3..336505572b4d 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/DefaultFileTemplateInspectionTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/DefaultFileTemplateInspectionTest.java @@ -11,7 +11,7 @@ public class DefaultFileTemplateInspectionTest extends InspectionTestCase { } private void doTest() throws Exception { - doTest("defaultFileTemplateUsage/" + getTestName(false), new DefaultFileTemplateUsageInspection()); + doTest("defaultFileTemplateUsage/" + getTestName(true), new DefaultFileTemplateUsageInspection()); } public void testDefaultFile() throws Exception{ From ceab2aa9ca5908bd892f4c2947929009fdf01808 Mon Sep 17 00:00:00 2001 From: Oleg Shpynov Date: Tue, 29 Sep 2009 21:42:58 +0400 Subject: [PATCH 19/58] Added 3 options to spellchecker: whether inspect code/literals/comments --- .../inspections/SpellCheckingInspection.java | 62 ++++++++++++++++--- 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java index e3e869ddac69..9b0fdeaebc12 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java +++ b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java @@ -2,23 +2,24 @@ package com.intellij.spellchecker.inspections; import com.intellij.codeHighlighting.HighlightDisplayLevel; import com.intellij.codeInspection.*; -import com.intellij.lang.Language; -import com.intellij.lang.LanguageExtensionPoint; +import com.intellij.codeInspection.ui.SingleCheckboxOptionsPanel; +import com.intellij.lang.*; import com.intellij.lang.refactoring.NamesValidator; import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.fileTypes.PlainTextLanguage; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.tree.IElementType; import com.intellij.spellchecker.CheckArea; import com.intellij.spellchecker.SpellCheckerManager; import com.intellij.spellchecker.TextSplitter; import com.intellij.spellchecker.quickfixes.AcceptWordAsCorrect; import com.intellij.spellchecker.quickfixes.ChangeTo; import com.intellij.spellchecker.quickfixes.RenameTo; +import com.intellij.spellchecker.tokenizer.SpellcheckingStrategy; import com.intellij.spellchecker.tokenizer.Token; import com.intellij.spellchecker.tokenizer.Tokenizer; -import com.intellij.spellchecker.tokenizer.SpellcheckingStrategy; import com.intellij.spellchecker.util.SpellCheckerBundle; import com.intellij.util.containers.hash.HashMap; import org.jetbrains.annotations.Nls; @@ -26,10 +27,12 @@ import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import javax.swing.*; +import java.awt.*; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.Collection; public class SpellCheckingInspection extends LocalInspectionTool { @@ -84,18 +87,42 @@ public class SpellCheckingInspection extends LocalInspectionTool { @NotNull public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { - return new PsiElementVisitor() { @Override - public void visitElement(PsiElement element) { + public void visitElement(final PsiElement element) { + + final ASTNode node = element.getNode(); + if (node == null){ + return; + } + // Extract parser definition from element + final Language language = element.getLanguage(); + final IElementType elementType = node.getElementType(); + final ParserDefinition parserDefinition = LanguageParserDefinitions.INSTANCE.forLanguage(language); + + // Handle selected options + if (parserDefinition != null){ + if (parserDefinition.getStringLiteralElements().contains(elementType)) { + if (!processLiterals){ + return; + } + } + else if (parserDefinition.getCommentTokens().contains(elementType)) { + if (!processComments){ + return; + } + } else if (!processLiterals){ + return; + } + } ensureFactoriesAreLoaded(); - final SpellcheckingStrategy factoryByLanguage = getFactoryByLanguage(element.getLanguage()); + final SpellcheckingStrategy factoryByLanguage = getFactoryByLanguage(language); final Tokenizer tokenizer = factoryByLanguage.getTokenizer(element); - - @SuppressWarnings({"unchecked"}) Token[] tokens = tokenizer.tokenize(element); + @SuppressWarnings({"unchecked"}) + final Token[] tokens = tokenizer.tokenize(element); if (tokens == null) { return; } @@ -193,4 +220,21 @@ public class SpellCheckingInspection extends LocalInspectionTool { } return false; } + + @SuppressWarnings({"PublicField"}) + public boolean processCode = true; + public boolean processLiterals = true; + public boolean processComments = true; + + @Override + public JComponent createOptionsPanel() { + final Box verticalBox = Box.createVerticalBox(); + verticalBox.add(new SingleCheckboxOptionsPanel("Process code", this, "processCode")); + verticalBox.add(new SingleCheckboxOptionsPanel("Process literals", this, "processLiterals")); + verticalBox.add(new SingleCheckboxOptionsPanel("Process comments", this, "processComments")); + final JPanel panel = new JPanel(new BorderLayout()); + panel.add(verticalBox, BorderLayout.NORTH); + return panel; + + } } From d514a07e09c936cfcf003f3b4b0fa72e91d9332a Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2009 21:43:33 +0400 Subject: [PATCH 20/58] add missing classes required for IG MalformedFormatStringInspectionTest --- java/mockJDK/jre/lib/rt.jar | Bin 526055 -> 533939 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/java/mockJDK/jre/lib/rt.jar b/java/mockJDK/jre/lib/rt.jar index aaafbb350c3720756e2ac341aa42384cd0959860..bca3aae335ee4ac21c3879cff50d19ed4358a8a0 100644 GIT binary patch delta 13663 zcmZ{~1yodB*fuOP%nV)9-Q5V%f+(FL-5}l4IiQrJCf5EpK!FVkYhxe*h7csy@}rN=#OCxs0x9Mp1zz zCY6~?0(!?eClhEGH*WqQmeOlAdM9;;fMgrzGnvWqnORonwz~EB9A=|5<=;A+nL@`l zdr}_z*%Cq;{ugEmyD)yV8_&F+P$EPhb^3ZcV|c5zRUmR*#B@Y|be3H7U4b;U17?d^WWW-ah0&AgK$Kdth? zQ=rg^y?0M81}}hcVHpB0we6@a68c4XidR`CeV^Z)jkTOKjN7V?(ChQhOEDR+pv;v+7mx#C7rU zTExQ+0$fxyby~(+@+S@=tl!WdETu~Gs_w`o=;@RuJzIyyArDQ6juB=DTxF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R3dtRqN%EJuYSQ(sD>b7Ty4B)i0x-C4qsJt0Ul ztZx|yEFuwz)Zl<2lBB~~66HRn^_#K72wgT<2rfLNB_^lG0TqTc5+3o8#@yPF!$T^9 zDlch=-8cL#<%3LKzOwzdObC)fXkxHR2$eb> z_}{b))C-|e`R@8nOK_an2_q+-;lF8qNERk-u-g$FX5AqgdQ+hz)8PZZ8372Oqrpr^ z{)=g5GviD)BLUIJQ2Px;kd;;jgo%(&nEC}cB8ns(BIHUu`~nRIvT532DT-7oGT9;v z?0Y6?iKEVsh>|O@=1Ux~Gmj3a4Bl$sAjI_l({{CP3 zF9}ivO2kN6?A{%=Y%$D>k(yY`eKzpK?o6Xxf<%pOKZa~ns& zav>^UZ8salVYMvwxr!Y@9NeW)Y~MkS=hSgP&p^+HV3L4tK0+35d__N?2GXedT|D3}jUFNjyab#RAe1>j!y{}_ z^imL#A?>jS1K27pZQy_h8woiWmO*>iA&XMWv*OU= za%hxIHXINsN19;A9iU2%^v5nZu}=libR~FTi5xNvkw=E7UD&z|kl##@P$-Ww|Kv}A zdmzC$r+`5Jb^^SDPz81fVLpKnqd;oF>^xHDRz!(E4*~^6^w3k-3E_$)dhmx5(2__j zfzOI;{av7}M0#N Date: Tue, 29 Sep 2009 21:45:36 +0400 Subject: [PATCH 21/58] Added 3 options to spellchecker: whether inspect code/literals/comments --- .../spellchecker/inspections/SpellCheckingInspection.java | 6 +++--- .../spellchecker/util/SpellCheckerBundle.properties | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java index 9b0fdeaebc12..731c56c3fbe3 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java +++ b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java @@ -229,9 +229,9 @@ public class SpellCheckingInspection extends LocalInspectionTool { @Override public JComponent createOptionsPanel() { final Box verticalBox = Box.createVerticalBox(); - verticalBox.add(new SingleCheckboxOptionsPanel("Process code", this, "processCode")); - verticalBox.add(new SingleCheckboxOptionsPanel("Process literals", this, "processLiterals")); - verticalBox.add(new SingleCheckboxOptionsPanel("Process comments", this, "processComments")); + verticalBox.add(new SingleCheckboxOptionsPanel(SpellCheckerBundle.message("process.code"), this, "processCode")); + verticalBox.add(new SingleCheckboxOptionsPanel(SpellCheckerBundle.message("process.literals"), this, "processLiterals")); + verticalBox.add(new SingleCheckboxOptionsPanel(SpellCheckerBundle.message("process.comments"), this, "processComments")); final JPanel panel = new JPanel(new BorderLayout()); panel.add(verticalBox, BorderLayout.NORTH); return panel; diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/util/SpellCheckerBundle.properties b/plugins/spellchecker/src/com/intellij/spellchecker/util/SpellCheckerBundle.properties index f60ee3e0ee27..1325cc59be63 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/util/SpellCheckerBundle.properties +++ b/plugins/spellchecker/src/com/intellij/spellchecker/util/SpellCheckerBundle.properties @@ -22,4 +22,7 @@ add.new.word=Add new word entered.word.0.is.mixed.cased.you.must.enter.simple.word=Entered word {0} is mixed cased. You must enter simple word entered.word.0.is.correct.you.no.need.to.add.this.in.list=Entered word {0} is correct. You no need to add this in list. no.suggestions= +process.code=Process code: +process.literals=Process literals: +process.comments=Process comments: From b213e77d97e8e1975460e67f4241220e8cb5e228 Mon Sep 17 00:00:00 2001 From: Oleg Shpynov Date: Tue, 29 Sep 2009 21:49:48 +0400 Subject: [PATCH 22/58] Typo --- .../spellchecker/inspections/SpellCheckingInspection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java index 731c56c3fbe3..1280993ef337 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java +++ b/plugins/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java @@ -112,7 +112,7 @@ public class SpellCheckingInspection extends LocalInspectionTool { if (!processComments){ return; } - } else if (!processLiterals){ + } else if (!processCode){ return; } } From 42d45f8369dbd1db673f03b8a619f3df1a6363fd Mon Sep 17 00:00:00 2001 From: Oleg Shpynov Date: Tue, 29 Sep 2009 21:55:54 +0400 Subject: [PATCH 23/58] typo --- .../spellchecker/util/SpellCheckerBundle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/util/SpellCheckerBundle.properties b/plugins/spellchecker/src/com/intellij/spellchecker/util/SpellCheckerBundle.properties index 1325cc59be63..f751b4a008f2 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/util/SpellCheckerBundle.properties +++ b/plugins/spellchecker/src/com/intellij/spellchecker/util/SpellCheckerBundle.properties @@ -22,7 +22,7 @@ add.new.word=Add new word entered.word.0.is.mixed.cased.you.must.enter.simple.word=Entered word {0} is mixed cased. You must enter simple word entered.word.0.is.correct.you.no.need.to.add.this.in.list=Entered word {0} is correct. You no need to add this in list. no.suggestions= -process.code=Process code: -process.literals=Process literals: -process.comments=Process comments: +process.code=Process code +process.literals=Process literals +process.comments=Process comments From 9983718e6d2f5a91ff434a2b9f4dbc069aafe40f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 29 Sep 2009 21:58:30 +0400 Subject: [PATCH 24/58] add missing classes required for IG SynchronizationOnLockObjectInspectionTest --- java/mockJDK/jre/lib/rt.jar | Bin 533939 -> 556304 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/java/mockJDK/jre/lib/rt.jar b/java/mockJDK/jre/lib/rt.jar index bca3aae335ee4ac21c3879cff50d19ed4358a8a0..972beaa7347b4cf5d6e5e2b805b3616fa29bbde5 100644 GIT binary patch delta 22328 zcma&NW0Yi3wk@2fv~An0v{`A}w#`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^y6EwxB-H&O}jXbZt#!c|Me|ABI9jD;Kj{; z0Y|?6kK|(;6UVPR-V+NR-a;OSXZt5SaGDh&N)&JfcPik@3Q;CnQv(A{yCjT2KP%)s z5v@5GK#_wvfRZgRBOuEL;Q%pM0A_3uBccuqFpxkA<^vveU=N{>4)Fy7)a(!)koOb7 znjK;avX41x*?@6&h&o8>8O~7RfGC585^+Yo8kiGUWrwf=(;N^Mka`-fn}HLe3i8ds z8UCD*%OIhbKno|t4y2TO)N%u&#$Zwa%87M!;lesf6&#(*3UHZ%AwV$~HuA_iFkt2Y zW=-J68c*uMzzs)inA%ti1Zf1qxgmx`ZcSi7(G}af$qf+#6@LV{c_4bA6O+Il9*8Cp zWEu=0qrgz$8xPh;c?RI)h1>vn&H?G9ruxDj#0>OM( zUyp4tpp*+{16HuTM6)|!pfnF_UF64Fia)>rRRNdL8i$zJ%Ac*M{JTJ20~Kc*+>ZYzZ*}au5GuMnSc-BZN{=OM-XFT)zRg}-imUoo z$LJVfKYp}}7jtp()AxFOiA#*qZZwWdzuCINh~&5##WuCfkE`Y4b*$+XHQlIGAKuOI z83Ys3g5e2irgF53$6jmGj}sE6C!JMN`-TG*W0?MSS4lh}x9DDXDMD_bav*Jo>L{aiO?#NM4tH*hF}<#% z_NJwshMpmpmR|GeIU`hJ56bGH)oBDXGDHV2U}a>GT4(VqBYh_JmhtsBH{tH2Cgt;t zhCiBHP(^(U_&F(e%=rT2Qwh^egR?-m&YN4l?_teid-a0Z;d2M&j|!TK%7 DWu}zZ From 780e924fb1205a850c7df9ea1312f68163c1d047 Mon Sep 17 00:00:00 2001 From: Peter Gromov Date: Tue, 29 Sep 2009 22:06:55 +0400 Subject: [PATCH 25/58] fix NCDFE in groovy compiler --- .../compiler/rt/GroovyCompilerWrapper.java | 24 +++++++++----- .../groovy/compiler/GroovyCompilerBase.java | 15 +++++++-- .../compiler/GroovycOSProcessHandler.java | 2 +- .../groovy/lang/GroovyCompilerTest.java | 31 +++++++++++++++++-- 4 files changed, 59 insertions(+), 13 deletions(-) diff --git a/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java b/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java index f93a0e035a54..10d0f91d5705 100644 --- a/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java +++ b/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java @@ -39,11 +39,17 @@ public class GroovyCompilerWrapper { try { unit.compile(forStubs ? Phases.CONVERSION : Phases.ALL); addCompiledFiles(unit, compiledFiles, forStubs, collector); - } catch (CompilationFailedException e) { + } + catch (CompilationFailedException e) { processCompilationException(e, collector, forStubs); - } catch (IOException e) { + } + catch (IOException e) { processException(e, collector, forStubs); - } finally { + } + catch (NoClassDefFoundError e) { + addMessageWithoutLocation(collector, "Groovyc error: " + e.getMessage() + " class not found, try compiling it explicitly", !forStubs); + } + finally { addWarnings(unit.getErrorCollector(), collector); } return compiledFiles; @@ -125,7 +131,7 @@ public class GroovyCompilerWrapper { } else if (message instanceof SimpleMessage) { addErrorMessage((SimpleMessage) message, collector); } else { - collector.add(new CompilerMessage(CompilerMessage.ERROR, "An unknown error occurred.", null, -1, -1)); + addMessageWithoutLocation(collector, "An unknown error occurred: " + message, true); } } @@ -133,12 +139,16 @@ public class GroovyCompilerWrapper { if (exception instanceof GroovyRuntimeException) { addErrorMessage((GroovyRuntimeException) exception, collector); } else if (forStubs) { - collector.add(new CompilerMessage(CompilerMessage.WARNING, "Groovyc stub generation failed: " + exception.getMessage(), null, -1, -1)); + addMessageWithoutLocation(collector, "Groovyc stub generation failed: " + exception.getMessage(), false); } else { - collector.add(new CompilerMessage(CompilerMessage.ERROR, exception.getMessage(), null, -1, -1)); + addMessageWithoutLocation(collector, exception.getMessage(), true); } } + private static void addMessageWithoutLocation(List collector, String message, boolean error) { + collector.add(new CompilerMessage(error ? CompilerMessage.ERROR : CompilerMessage.WARNING, message, null, -1, -1)); + } + private static final String LINE_AT = " @ line "; private static void addErrorMessage(SyntaxException exception, List collector) { @@ -173,7 +183,7 @@ public class GroovyCompilerWrapper { } private static void addErrorMessage(SimpleMessage message, List collector) { - collector.add(new CompilerMessage(CompilerMessage.ERROR, message.getMessage(), null, -1, -1)); + addMessageWithoutLocation(collector, message.getMessage(), true); } public interface OutputItem { diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompilerBase.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompilerBase.java index 56e691a20eec..727de70baa02 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompilerBase.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompilerBase.java @@ -167,7 +167,8 @@ public abstract class GroovyCompilerBase implements TranslatingCompiler { toRecompile.add(vFile); } - for (CompilerMessage compilerMessage : processHandler.getCompilerMessages()) { + final List messages = processHandler.getCompilerMessages(); + for (CompilerMessage compilerMessage : messages) { final CompilerMessageCategory category; category = getMessageCategory(compilerMessage); @@ -177,8 +178,18 @@ public abstract class GroovyCompilerBase implements TranslatingCompiler { compilerMessage.getColumnNum()); } + boolean hasMessages = !messages.isEmpty(); + StringBuffer unparsedBuffer = processHandler.getUnparsedOutput(); - if (unparsedBuffer.length() != 0) compileContext.addMessage(CompilerMessageCategory.ERROR, unparsedBuffer.toString(), null, -1, -1); + if (unparsedBuffer.length() != 0) { + compileContext.addMessage(CompilerMessageCategory.ERROR, unparsedBuffer.toString(), null, -1, -1); + hasMessages = true; + } + + final int exitCode = processHandler.getProcess().exitValue(); + if (!hasMessages && exitCode != 0) { + compileContext.addMessage(CompilerMessageCategory.ERROR, "Internal groovyc error: code " + exitCode, null, -1, -1); + } List outputItems = processHandler.getSuccessfullyCompiled(); if (forStubs) { diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovycOSProcessHandler.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovycOSProcessHandler.java index c2b9ccf34d61..ceb3ee45b987 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovycOSProcessHandler.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovycOSProcessHandler.java @@ -186,7 +186,7 @@ public class GroovycOSProcessHandler extends OSProcessHandler { compilerMessages.add(new CompilerMessage(category, message, url, linenumInt, colomnnumInt)); } else { - if (error) unparsedOutput.append(outputBuffer); + if (error) unparsedOutput.append(outputBuffer).append("\n"); outputBuffer.setLength(0); } } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyCompilerTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyCompilerTest.java index 16b0b684a18f..e04d213b7ee8 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyCompilerTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/GroovyCompilerTest.java @@ -50,6 +50,7 @@ import com.intellij.testFramework.builders.JavaModuleFixtureBuilder; import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase; import com.intellij.testFramework.fixtures.TempDirTestFixture; import com.intellij.testFramework.fixtures.impl.TempDirTestFixtureImpl; +import com.intellij.util.ObjectUtils; import com.intellij.util.concurrency.Semaphore; import junit.framework.AssertionFailedError; import org.jetbrains.plugins.groovy.compiler.GroovyCompilerLoader; @@ -186,6 +187,27 @@ public class GroovyCompilerTest extends JavaCodeInsightFixtureTestCase { assertOutput("Bar", "239"); } + public void testTransitiveJavaDependencyThroughGroovy() throws Throwable { + myFixture.addClass("public class IFoo { void foo() {} }").getContainingFile().getVirtualFile(); + myFixture.addFileToProject("Foo.groovy", "class Foo {\n" + + " static IFoo f\n" + + " public int foo() { return 239; }\n" + + "}"); + final PsiFile bar = myFixture.addFileToProject("Bar.groovy", "class Bar extends Foo {" + + "public static void main(String[] args) { " + + " System.out.println(new Foo().foo());" + + "}" + + "}"); + assertTrue(assertOneElement(make()).contains("WARNING: Groovyc couldn't generate stub")); + assertOutput("Bar", "239"); + + deleteClassFile("IFoo"); + touch(bar.getVirtualFile()); + + assertTrue(assertOneElement(make()).contains("WARNING: Groovyc error")); + assertOutput("Bar", "239"); + } + public void testDeleteTransitiveJavaClass() throws Throwable { myFixture.addClass("public interface IFoo { int foo(); }"); myFixture.addClass("public class Foo implements IFoo {" + @@ -254,8 +276,9 @@ public class GroovyCompilerTest extends JavaCodeInsightFixtureTestCase { private void deleteClassFile(final String className) throws IOException { new WriteCommandAction(getProject()) { protected void run(Result result) throws Throwable { - ModuleRootManager.getInstance(myModule).getModuleExtension(CompilerModuleExtension.class).getCompilerOutputPath() - .findChild(className + ".class").delete(this); + final CompilerModuleExtension extension = ModuleRootManager.getInstance(myModule).getModuleExtension(CompilerModuleExtension.class); + //noinspection ConstantConditions + extension.getCompilerOutputPath().findChild(className + ".class").delete(this); } }.execute(); } @@ -265,7 +288,7 @@ public class GroovyCompilerTest extends JavaCodeInsightFixtureTestCase { } private static void setFileText(PsiFile file, String barText) throws IOException { - VfsUtil.saveText(file.getVirtualFile(), barText); + VfsUtil.saveText(ObjectUtils.assertNotNull(file.getVirtualFile()), barText); } private List make() { @@ -278,6 +301,7 @@ public class GroovyCompilerTest extends JavaCodeInsightFixtureTestCase { return callback.getMessages(); } + /* private void compile(VirtualFile... files) { final Semaphore semaphore = new Semaphore(); semaphore.down(); @@ -286,6 +310,7 @@ public class GroovyCompilerTest extends JavaCodeInsightFixtureTestCase { semaphore.waitFor(); callback.throwException(); } + */ private void assertOutput(String className, String output) throws ExecutionException { final ApplicationConfiguration configuration = From ecc6715fde715058a1f62a6e21fd25fe28df7381 Mon Sep 17 00:00:00 2001 From: Peter Gromov Date: Tue, 29 Sep 2009 23:09:45 +0400 Subject: [PATCH 26/58] PsiClasses aren't equivalent if one of them is outside src root --- .../intellij/psi/impl/PsiClassImplUtil.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java b/java/java-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java index 4c5d37573141..0d2987c214e8 100644 --- a/java/java-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java +++ b/java/java-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java @@ -1,10 +1,13 @@ package com.intellij.psi.impl; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.roots.ProjectFileIndex; +import com.intellij.openapi.roots.ProjectRootManager; import com.intellij.openapi.util.Iconable; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.UserDataHolderEx; +import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.*; import com.intellij.psi.filters.OrFilter; import com.intellij.psi.impl.source.PsiImmediateClassType; @@ -826,7 +829,29 @@ public class PsiClassImplUtil { return false; } } - return qName1.hashCode() == qName2.hashCode() && qName1.equals(qName2); + if (qName1.hashCode() != qName2.hashCode() || !qName1.equals(qName2)) { + return false; + } + + if (aClass.getOriginalElement().equals(another.getOriginalElement())) { + return true; + } + + final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(aClass.getProject()).getFileIndex(); + final PsiFile file1 = aClass.getContainingFile().getOriginalFile(); + final PsiFile file2 = another.getContainingFile().getOriginalFile(); + if (file1.equals(file2)) { + return true; + } + + final VirtualFile vfile1 = file1.getViewProvider().getVirtualFile(); + final VirtualFile vfile2 = file2.getViewProvider().getVirtualFile(); + if ((fileIndex.isInSource(vfile1) || fileIndex.isInLibraryClasses(vfile1)) && + (fileIndex.isInSource(vfile2) || fileIndex.isInLibraryClasses(vfile2))) { + return true; + } + + return false; } public static boolean isFieldEquivalentTo(PsiField field, PsiElement another) { From 7c6b387f71cbd141758e1f723642802d5cdf8ede Mon Sep 17 00:00:00 2001 From: cdr Date: Wed, 30 Sep 2009 11:25:34 +0400 Subject: [PATCH 27/58] perform UI initialization in swing thread --- .../DuplicateStringLiteralInspection.java | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/plugins/java-i18n/src/com/intellij/codeInspection/duplicateStringLiteral/DuplicateStringLiteralInspection.java b/plugins/java-i18n/src/com/intellij/codeInspection/duplicateStringLiteral/DuplicateStringLiteralInspection.java index e15218697afe..1fe06c495b44 100644 --- a/plugins/java-i18n/src/com/intellij/codeInspection/duplicateStringLiteral/DuplicateStringLiteralInspection.java +++ b/plugins/java-i18n/src/com/intellij/codeInspection/duplicateStringLiteral/DuplicateStringLiteralInspection.java @@ -45,23 +45,7 @@ public class DuplicateStringLiteralInspection extends BaseLocalInspectionTool { private JPanel myPanel; private JCheckBox myIgnorePropertyKeyExpressions; @NonNls private static final String BR = "
"; - - public DuplicateStringLiteralInspection() { - myIgnorePropertyKeyExpressions.addActionListener(new ActionListener() { - public void actionPerformed(final ActionEvent e) { - IGNORE_PROPERTY_KEYS = myIgnorePropertyKeyExpressions.isSelected(); - } - }); - myMinStringLengthField.getDocument().addDocumentListener(new DocumentAdapter() { - protected void textChanged(final DocumentEvent e) { - try { - MIN_STRING_LENGTH = Integer.parseInt(myMinStringLengthField.getText()); - } - catch (NumberFormatException e1) { - } - } - }); - } + private boolean UIInitialized = false; @NotNull public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { @@ -277,6 +261,23 @@ public class DuplicateStringLiteralInspection extends BaseLocalInspectionTool { } public JComponent createOptionsPanel() { + if (!UIInitialized) { + UIInitialized = true; + myIgnorePropertyKeyExpressions.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent e) { + IGNORE_PROPERTY_KEYS = myIgnorePropertyKeyExpressions.isSelected(); + } + }); + myMinStringLengthField.getDocument().addDocumentListener(new DocumentAdapter() { + protected void textChanged(final DocumentEvent e) { + try { + MIN_STRING_LENGTH = Integer.parseInt(myMinStringLengthField.getText()); + } + catch (NumberFormatException e1) { + } + } + }); + } myIgnorePropertyKeyExpressions.setSelected(IGNORE_PROPERTY_KEYS); myMinStringLengthField.setText(Integer.toString(MIN_STRING_LENGTH)); return myPanel; From cf3a65f4edfa8ee2cc3cfe738bb413bfb8db178b Mon Sep 17 00:00:00 2001 From: cdr Date: Wed, 30 Sep 2009 11:31:00 +0400 Subject: [PATCH 28/58] cleanup --- .../impl/config/IntentionManagerSettings.java | 60 ++++++++----------- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionManagerSettings.java b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionManagerSettings.java index cf5fc8ab6426..b8177e3f4ac4 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionManagerSettings.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionManagerSettings.java @@ -73,8 +73,8 @@ public class IntentionManagerSettings implements PersistentStateComponent myIgnoredActions = new LinkedHashSet(); private final Map myMetaData = new LinkedHashMap(); - private static final @NonNls String IGNORE_ACTION_TAG = "ignoreAction"; - private static final @NonNls String NAME_ATT = "name"; + @NonNls private static final String IGNORE_ACTION_TAG = "ignoreAction"; + @NonNls private static final String NAME_ATT = "name"; private static final Pattern HTML_PATTERN = Pattern.compile("<[^<>]*>"); @@ -87,12 +87,9 @@ public class IntentionManagerSettings implements PersistentStateComponent words = registrar.getProcessedWordsWithoutStemming(descriptionText); - words.addAll(registrar.getProcessedWords(metaData.getFamily())); - for (String word : words) { - registrar.addOption(word, metaData.getFamily(), metaData.getFamily(), IntentionSettingsConfigurable.HELP_ID, IntentionSettingsConfigurable.DISPLAY_NAME); - } - } - catch (IOException e) { - LOG.error(e); + app.executeOnPooledThread(new Runnable(){ + public void run() { + try { + SearchableOptionsRegistrar registrar = SearchableOptionsRegistrar.getInstance(); + if (registrar == null) return; + @NonNls String descriptionText = description.getText().toLowerCase(); + descriptionText = HTML_PATTERN.matcher(descriptionText).replaceAll(" "); + final Set words = registrar.getProcessedWordsWithoutStemming(descriptionText); + words.addAll(registrar.getProcessedWords(metaData.getFamily())); + for (String word : words) { + registrar.addOption(word, metaData.getFamily(), metaData.getFamily(), IntentionSettingsConfigurable.HELP_ID, IntentionSettingsConfigurable.DISPLAY_NAME); } } - }); - } + catch (IOException e) { + LOG.error(e); + } + } + }); } public synchronized void unregisterMetaData(IntentionAction intentionAction) { From 03065fb477c175079b2837a136659992e71f4c73 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Sep 2009 12:41:27 +0400 Subject: [PATCH 29/58] re-schedule file for indexing in case of PCE --- .../util/indexing/FileBasedIndex.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index 56d9f8a7b2ac..4283ed5ae910 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -1131,7 +1131,9 @@ public class FileBasedIndex implements ApplicationComponent { try { updateSingleIndex(indexId, file, _fc); } - catch (ProcessCanceledException ignored) { + catch (ProcessCanceledException e) { + LOG.info("Re-scheduling file indexing for " + file.getPresentableUrl(), e); + myChangedFilesUpdater.scheduleForUpdate(file); } catch (StorageException e) { requestRebuild(indexId); @@ -1297,14 +1299,8 @@ public class FileBasedIndex implements ApplicationComponent { if (!isTooLarge(file)) { for (ID indexId : myIndices.keySet()) { if (needsFileContentLoading(indexId) && getInputFilter(indexId).acceptInput(file)) { - w.lock(); - try { - myFilesToUpdate.add(file); - break; // no need to iterate further, as the file is already marked - } - finally { - w.unlock(); - } + scheduleForUpdate(file); + break; // no need to iterate further, as the file is already marked } } } @@ -1315,6 +1311,16 @@ public class FileBasedIndex implements ApplicationComponent { IndexingStamp.flushCache(); } + public void scheduleForUpdate(VirtualFile file) { + w.lock(); + try { + myFilesToUpdate.add(file); + } + finally { + w.unlock(); + } + } + void invalidateIndices(final VirtualFile file, final boolean markForReindex) { if (isUnderConfigOrSystem(file)) { return; @@ -1368,13 +1374,7 @@ public class FileBasedIndex implements ApplicationComponent { if (indicesAffected && markForReindex) { iterateIndexableFiles(file, new Processor() { public boolean process(final VirtualFile file) { - w.lock(); - try { - myFilesToUpdate.add(file); - } - finally { - w.unlock(); - } + scheduleForUpdate(file); return true; } }); From 7b2b7d3c649781200e78b8ddabf437f459fff20a Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 30 Sep 2009 13:20:10 +0400 Subject: [PATCH 30/58] restore descriptions --- .../description.html | 7 +++++++ .../description.html | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithFormatStringIntention/description.html create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceOperatorAssignmentWithAssignmentIntention/description.html diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithFormatStringIntention/description.html b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithFormatStringIntention/description.html new file mode 100644 index 000000000000..e502d3b6b1a5 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceConcatenationWithFormatStringIntention/description.html @@ -0,0 +1,7 @@ + + +This intention replaces a String concatenation with the equivalent +java format pattern, using java.lang.String.format() or java.io.PrintStream.printf() where applicable. + + + diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceOperatorAssignmentWithAssignmentIntention/description.html b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceOperatorAssignmentWithAssignmentIntention/description.html new file mode 100644 index 000000000000..1396641527e5 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/ReplaceOperatorAssignmentWithAssignmentIntention/description.html @@ -0,0 +1,7 @@ + + +This intention replaces an operator assignment +expression with an equivalent plain assignment expression. + + + \ No newline at end of file From 86ef7c3887d34a47542741219fb4723b926543f5 Mon Sep 17 00:00:00 2001 From: Peter Gromov Date: Wed, 30 Sep 2009 13:57:31 +0400 Subject: [PATCH 31/58] remove obsolete JetGroovy build files --- plugins/groovy/Groovy.ipr | 607 --------------------- plugins/groovy/build.xml | 347 ------------ plugins/groovy/groovy.iml | 149 ----- plugins/groovy/groovy.properties.prototype | 15 - plugins/groovy/packagePlugin.xml | 461 ---------------- 5 files changed, 1579 deletions(-) delete mode 100644 plugins/groovy/Groovy.ipr delete mode 100644 plugins/groovy/build.xml delete mode 100644 plugins/groovy/groovy.iml delete mode 100644 plugins/groovy/groovy.properties.prototype delete mode 100644 plugins/groovy/packagePlugin.xml diff --git a/plugins/groovy/Groovy.ipr b/plugins/groovy/Groovy.ipr deleted file mode 100644 index 5a807b3de73c..000000000000 --- a/plugins/groovy/Groovy.ipr +++ /dev/null @@ -1,607 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/groovy/build.xml b/plugins/groovy/build.xml deleted file mode 100644 index aabb7d2b2d54..000000000000 --- a/plugins/groovy/build.xml +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/groovy/groovy.iml b/plugins/groovy/groovy.iml deleted file mode 100644 index 35558279d71c..000000000000 --- a/plugins/groovy/groovy.iml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/groovy/groovy.properties.prototype b/plugins/groovy/groovy.properties.prototype deleted file mode 100644 index 161f3b9d8119..000000000000 --- a/plugins/groovy/groovy.properties.prototype +++ /dev/null @@ -1,15 +0,0 @@ -# Path to Groovy distribution -path.variable.groovy_sdk_path=D:/dev/Groovy-1.5.6 - -# Path to IDEA distribution, used in groovy module SDK -jdk.home.jetgroovy_idea_sdk=C:/Program Files/JetBrains/IntelliJ IDEA 9712 - -# Path to JDK 1.6 (or higher) installation -jdk.home.jetgroovy_compile_with_jdk=D:/dev/jdk1.6 - -# rt module needs to be run against any JDK the user will have in her Groovy project in IntelliJ IDEA. -# So it should compile against JDK 1.4. Ideally, this variable should point to such a JDK. -jdk.home.jetgroovy_runtime_jdk=C:/sdks/j2sdk1.4.2_08 - -# Whether to skip the tests or not -skip.tests=true \ No newline at end of file diff --git a/plugins/groovy/packagePlugin.xml b/plugins/groovy/packagePlugin.xml deleted file mode 100644 index b0781c53318b..000000000000 --- a/plugins/groovy/packagePlugin.xml +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 634b14732bfb5356aa62c2fada52ad7e75b159c9 Mon Sep 17 00:00:00 2001 From: Peter Gromov Date: Wed, 30 Sep 2009 14:03:15 +0400 Subject: [PATCH 32/58] fix GroovyMoveClassTest --- .../plugins/groovy/refactoring/move/GroovyMoveClassTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java index 70d64bfe844c..415ef440e132 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassTest.java @@ -22,6 +22,7 @@ import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.fileEditor.FileDocumentManager; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileManager; import com.intellij.psi.*; @@ -200,8 +201,8 @@ public class GroovyMoveClassTest extends LightCodeInsightFixtureTestCase { final byte[] bytes1 = contentsToByteArray(f1); final byte[] bytes2 = f2.contentsToByteArray(); - String s1 = new String(bytes1); - String s2 = new String(bytes2); + String s1 = StringUtil.convertLineSeparators(new String(bytes1)); + String s2 = StringUtil.convertLineSeparators(new String(bytes2)); try { assertEquals(s1, s2); From 39635b7e67b4e6d1070ef39c8a8a32b6bf873301 Mon Sep 17 00:00:00 2001 From: Peter Gromov Date: Wed, 30 Sep 2009 14:30:47 +0400 Subject: [PATCH 33/58] rethrow PCE correctly when indexing --- .../com/intellij/util/indexing/FileBasedIndex.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index 4283ed5ae910..a98209593311 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -24,10 +24,7 @@ import com.intellij.openapi.project.*; import com.intellij.openapi.roots.CollectingContentIterator; import com.intellij.openapi.roots.ContentIterator; import com.intellij.openapi.roots.ProjectRootManager; -import com.intellij.openapi.util.Factory; -import com.intellij.openapi.util.Key; -import com.intellij.openapi.util.Pair; -import com.intellij.openapi.util.ShutDownTracker; +import com.intellij.openapi.util.*; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.vfs.*; @@ -1100,6 +1097,8 @@ public class FileBasedIndex implements ApplicationComponent { PsiFile psiFile = null; + final Ref pce = Ref.create(null); + final List tasks = new ArrayList(); for (final ID indexId : myIndices.keySet()) { if (shouldIndexFile(file, indexId)) { @@ -1132,8 +1131,7 @@ public class FileBasedIndex implements ApplicationComponent { updateSingleIndex(indexId, file, _fc); } catch (ProcessCanceledException e) { - LOG.info("Re-scheduling file indexing for " + file.getPresentableUrl(), e); - myChangedFilesUpdater.scheduleForUpdate(file); + pce.set(e); } catch (StorageException e) { requestRebuild(indexId); @@ -1164,6 +1162,10 @@ public class FileBasedIndex implements ApplicationComponent { } } + if (!pce.isNull()) { + throw pce.get(); + } + if (psiFile != null) { psiFile.putUserData(PsiFileImpl.BUILDING_STUB, null); } From 95ca96cce5064040a00f935e21ae731a7db0a807 Mon Sep 17 00:00:00 2001 From: nik Date: Wed, 30 Sep 2009 14:52:58 +0400 Subject: [PATCH 34/58] fixed tests on linux - 3 --- .../after/Test.java | 0 .../before/Test.java | 0 .../refactoring/TurnRefsToSuperTest.java | 2 +- .../dom/MavenModelReadingAndWritingTest.java | 48 +++++++++---------- 4 files changed, 25 insertions(+), 25 deletions(-) rename java/java-tests/testData/refactoring/turnRefsToSuper/{IDEADEV5517Noop => IDEADEV5517NOOP}/after/Test.java (100%) rename java/java-tests/testData/refactoring/turnRefsToSuper/{IDEADEV5517Noop => IDEADEV5517NOOP}/before/Test.java (100%) diff --git a/java/java-tests/testData/refactoring/turnRefsToSuper/IDEADEV5517Noop/after/Test.java b/java/java-tests/testData/refactoring/turnRefsToSuper/IDEADEV5517NOOP/after/Test.java similarity index 100% rename from java/java-tests/testData/refactoring/turnRefsToSuper/IDEADEV5517Noop/after/Test.java rename to java/java-tests/testData/refactoring/turnRefsToSuper/IDEADEV5517NOOP/after/Test.java diff --git a/java/java-tests/testData/refactoring/turnRefsToSuper/IDEADEV5517Noop/before/Test.java b/java/java-tests/testData/refactoring/turnRefsToSuper/IDEADEV5517NOOP/before/Test.java similarity index 100% rename from java/java-tests/testData/refactoring/turnRefsToSuper/IDEADEV5517Noop/before/Test.java rename to java/java-tests/testData/refactoring/turnRefsToSuper/IDEADEV5517NOOP/before/Test.java diff --git a/java/java-tests/testSrc/com/intellij/refactoring/TurnRefsToSuperTest.java b/java/java-tests/testSrc/com/intellij/refactoring/TurnRefsToSuperTest.java index d8a9a421f2b5..629204a2489f 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/TurnRefsToSuperTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/TurnRefsToSuperTest.java @@ -101,7 +101,7 @@ public class TurnRefsToSuperTest extends MultiFileTestCase { doTest("Xyz", "Xint", false); } - public void testIDEADEV5517Noop() throws Exception { + public void testIDEADEV5517NOOP() throws Exception { doTest("Xyz", "Xint", false); } diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelReadingAndWritingTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelReadingAndWritingTest.java index bc9d3bfc4f13..1aef5921d0b9 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelReadingAndWritingTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenModelReadingAndWritingTest.java @@ -43,15 +43,15 @@ public class MavenModelReadingAndWritingTest extends MavenImportingTestCase { } }, null, null); - assertEquals("\r\n" + - "\r\n" + - " 4.0.0\r\n" + - " foo\r\n" + - " bar\r\n" + - " baz\r\n" + - "", - VfsUtil.loadText(myProjectPom)); + assertSameLines("\r\n" + + "\r\n" + + " 4.0.0\r\n" + + " foo\r\n" + + " bar\r\n" + + " baz\r\n" + + "", + VfsUtil.loadText(myProjectPom)); } public void testAddingADependency() throws Exception { @@ -68,21 +68,21 @@ public class MavenModelReadingAndWritingTest extends MavenImportingTestCase { } }, null, null); - assertEquals("\r\n" + - "\r\n" + - " 4.0.0\r\n" + - " test\r\n" + - " project\r\n" + - " 1\r\n" + - " \r\n" + - " \r\n" + - " group\r\n" + - " artifact\r\n" + - " version\r\n" + - " \r\n" + - " \r\n" + - "", VfsUtil.loadText(myProjectPom)); + assertSameLines("\r\n" + + "\r\n" + + " 4.0.0\r\n" + + " test\r\n" + + " project\r\n" + + " 1\r\n" + + " \r\n" + + " \r\n" + + " group\r\n" + + " artifact\r\n" + + " version\r\n" + + " \r\n" + + " \r\n" + + "", VfsUtil.loadText(myProjectPom)); } private MavenDomProjectModel getDomModel() { From 8dae3a8b920a8a16d90111a731826745ad86475e Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 30 Sep 2009 15:03:43 +0400 Subject: [PATCH 35/58] wrong commit --- platform/util/src/com/intellij/util/lang/ClassPath.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/util/lang/ClassPath.java b/platform/util/src/com/intellij/util/lang/ClassPath.java index ee0daf31e339..996c89b698d9 100644 --- a/platform/util/src/com/intellij/util/lang/ClassPath.java +++ b/platform/util/src/com/intellij/util/lang/ClassPath.java @@ -97,7 +97,7 @@ class ClassPath { for (Loader loader : loaders) { final Resource resource = loader.getResource(s, flag); if (resource != null) { - printOrder(loader, s); + //printOrder(loader, s); return resource; } } From 1ecf48bf152ddf3d336ce0a3667ff7a9611134fc Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Wed, 30 Sep 2009 15:08:25 +0400 Subject: [PATCH 36/58] invalidate files being deleted lazily --- .../util/indexing/FileBasedIndex.java | 131 ++++++++++++++---- 1 file changed, 107 insertions(+), 24 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index a98209593311..a49310dc1346 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -15,10 +15,7 @@ import com.intellij.openapi.editor.impl.DocumentImpl; import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.fileTypes.*; -import com.intellij.openapi.progress.ProcessCanceledException; -import com.intellij.openapi.progress.ProgressIndicator; -import com.intellij.openapi.progress.ProgressManager; -import com.intellij.openapi.progress.Task; +import com.intellij.openapi.progress.*; import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator; import com.intellij.openapi.project.*; import com.intellij.openapi.roots.CollectingContentIterator; @@ -539,6 +536,7 @@ public class FileBasedIndex implements ApplicationComponent { myReentrancyGuard.set(Boolean.TRUE); try { + myChangedFilesUpdater.ensureAllInvalidateTasksCompleted(); if (isUpToDateCheckEnabled()) { try { checkRebuild(indexId, false); @@ -1092,6 +1090,7 @@ public class FileBasedIndex implements ApplicationComponent { } public void indexFileContent(com.intellij.ide.startup.FileContent content) { + myChangedFilesUpdater.ensureAllInvalidateTasksCompleted(); final VirtualFile file = content.getVirtualFile(); FileContent fc = null; @@ -1217,8 +1216,21 @@ public class FileBasedIndex implements ApplicationComponent { return !myNotRequiringContentIndices.contains(indexId); } + private abstract static class InvalidationTask implements Runnable { + private final VirtualFile mySubj; + + protected InvalidationTask(final VirtualFile subj) { + mySubj = subj; + } + + public VirtualFile getSubj() { + return mySubj; + } + } + private final class ChangedFilesUpdater extends VirtualFileAdapter implements BackgroundableCacheUpdater { private final Set myFilesToUpdate = new LinkedHashSet(); + private final Queue myFutureInvalidations = new LinkedList(); private final JBReentrantReadWriteLock myLock = LockFactory.createReadWriteLock(); private final JBLock r = myLock.readLock(); private final JBLock w = myLock.writeLock(); @@ -1340,7 +1352,7 @@ public class FileBasedIndex implements ApplicationComponent { else { cleanProcessedFlag(file); IndexingStamp.flushCache(); - boolean indicesAffected = false; + final List> affectedIndices = new ArrayList>(myIndices.size()); final boolean isTooLarge = isTooLarge(file); for (final ID indexId : myIndices.keySet()) { @@ -1352,18 +1364,7 @@ public class FileBasedIndex implements ApplicationComponent { } else { // the index requires file content if (!isTooLarge && shouldUpdateIndex(file, indexId)) { - indicesAffected = true; - if (markForReindex) { - // only mark the file as unindexed, reindex will be done lazily - ApplicationManager.getApplication().runReadAction(new Runnable() { - public void run() { - IndexingStamp.update(file, indexId, -1L); - } - }); - } - else { - updateSingleIndex(indexId, file, null); - } + affectedIndices.add(indexId); } } } @@ -1372,15 +1373,95 @@ public class FileBasedIndex implements ApplicationComponent { requestRebuild(indexId); } } - IndexingStamp.flushCache(); - if (indicesAffected && markForReindex) { - iterateIndexableFiles(file, new Processor() { - public boolean process(final VirtualFile file) { - scheduleForUpdate(file); - return true; + + if (affectedIndices.size() > 0) { + if (markForReindex) { + // only mark the file as unindexed, reindex will be done lazily + ApplicationManager.getApplication().runReadAction(new Runnable() { + public void run() { + for (ID indexId : affectedIndices) { + IndexingStamp.update(file, indexId, -1L); + } + } + }); + iterateIndexableFiles(file, new Processor() { + public boolean process(final VirtualFile file) { + scheduleForUpdate(file); + return true; + } + }); + } + else { + final InvalidationTask invalidator = new InvalidationTask(file) { + public void run() { + Throwable unexpectedError = null; + for (ID indexId : affectedIndices) { + try { + updateSingleIndex(indexId, file, null); + } + catch (StorageException e) { + LOG.info(e); + requestRebuild(indexId); + } + catch (ProcessCanceledException ignored) { + } + catch (Throwable e) { + LOG.info(e); + if (unexpectedError == null) { + unexpectedError = e; + } + } + } + IndexingStamp.flushCache(); + if (unexpectedError != null) { + LOG.error(unexpectedError); + } + } + }; + + w.lock(); + try { + myFutureInvalidations.offer(invalidator); } - }); + finally { + w.unlock(); + } + } } + IndexingStamp.flushCache(); + } + } + + public void ensureAllInvalidateTasksCompleted() { + final int size; + r.lock(); + try { + size = myFutureInvalidations.size(); + if (size == 0) return; + } + finally { + r.unlock(); + } + final ProgressIndicator current = ProgressManager.getInstance().getProgressIndicator(); + final ProgressIndicator indicator = current != null ? current : new EmptyProgressIndicator(); + indicator.setText(""); + int count = 0; + while (true) { + InvalidationTask task; + w.lock(); + try { + task = myFutureInvalidations.poll(); + } + finally { + w.unlock(); + } + + if (task == null) { + break; + } + indicator.setFraction(((double)count++)/size); + indicator.setText2(task.getSubj().getPresentableUrl()); + task.run(); } } @@ -1438,12 +1519,14 @@ public class FileBasedIndex implements ApplicationComponent { } public void processFile(final com.intellij.ide.startup.FileContent fileContent) { + myChangedFilesUpdater.ensureAllInvalidateTasksCompleted(); processFileImpl(fileContent); } private final Semaphore myForceUpdateSemaphore = new Semaphore(); public void forceUpdate() { + myChangedFilesUpdater.ensureAllInvalidateTasksCompleted(); final VirtualFile[] files = queryNeededFiles(); if (files.length > 0) { myForceUpdateSemaphore.down(); From c9fafade6bb9033deb7ecd478f8195ec02be0c97 Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 30 Sep 2009 15:13:33 +0400 Subject: [PATCH 37/58] restore descriptions --- .../FlipComparisonIntention/after.java.template | 5 +++++ .../FlipComparisonIntention/before.java.template | 5 +++++ .../FlipComparisonIntention/description.html | 6 ++++++ 3 files changed, 16 insertions(+) create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/after.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/before.java.template create mode 100644 plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/description.html diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/after.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/after.java.template new file mode 100644 index 000000000000..68db49da5167 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/after.java.template @@ -0,0 +1,5 @@ +public class X { + void f(int a, int b) { + if (b == a) return; + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/before.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/before.java.template new file mode 100644 index 000000000000..6f650cc79b8a --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/before.java.template @@ -0,0 +1,5 @@ +public class X { + void f(int a, int b) { + if (a == b) return; + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/description.html b/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/description.html new file mode 100644 index 000000000000..de0ab85e67c6 --- /dev/null +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/FlipComparisonIntention/description.html @@ -0,0 +1,6 @@ + + +This intention swaps the operands of a +comparison expression. + + From 234bba7f8286d467933510e45cd4eb9ac1a0a24c Mon Sep 17 00:00:00 2001 From: Maxim Shafirov Date: Wed, 30 Sep 2009 15:42:50 +0400 Subject: [PATCH 38/58] new build number format --- build.txt | 1 + .../intellij/ide/plugins/PluginManager.java | 75 ++++--- .../openapi/application/ApplicationInfo.java | 34 ++- .../intellij/ide/plugins/PluginInstaller.java | 5 +- .../ide/plugins/RepositoryHelper.java | 16 +- .../application/impl/ApplicationInfoImpl.java | 10 +- .../intellij/openapi/util/BuildNumber.java | 205 ++++++++++++++++++ .../openapi/util/BuildNumberTest.java | 17 ++ 8 files changed, 297 insertions(+), 66 deletions(-) create mode 100644 build.txt create mode 100644 platform/util/src/com/intellij/openapi/util/BuildNumber.java create mode 100644 platform/util/testSrc/com/intellij/openapi/util/BuildNumberTest.java diff --git a/build.txt b/build.txt new file mode 100644 index 000000000000..b478d314c4c5 --- /dev/null +++ b/build.txt @@ -0,0 +1 @@ +90.SNAPSHOT diff --git a/platform/platform-api/src/com/intellij/ide/plugins/PluginManager.java b/platform/platform-api/src/com/intellij/ide/plugins/PluginManager.java index 897b8dafa010..2622bb24fccf 100644 --- a/platform/platform-api/src/com/intellij/ide/plugins/PluginManager.java +++ b/platform/platform-api/src/com/intellij/ide/plugins/PluginManager.java @@ -1,3 +1,19 @@ +/* + * Copyright 2000-2009 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.ide.plugins; import com.intellij.ide.ClassloaderUtil; @@ -13,6 +29,7 @@ import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.extensions.LogProvider; import com.intellij.openapi.extensions.PluginId; import com.intellij.openapi.progress.ProcessCanceledException; +import com.intellij.openapi.util.BuildNumber; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.io.FileUtil; @@ -56,7 +73,7 @@ public class PluginManager { static final Object lock = new Object(); - private static String ourBuildNumber; + private static BuildNumber ourBuildNumber; @NonNls public static final String PLUGIN_XML = "plugin.xml"; @NonNls public static final String META_INF = "META-INF"; private static final Map ourId2Index = new THashMap(); @@ -381,37 +398,20 @@ public class PluginManager { } public static boolean isIncompatible(final IdeaPluginDescriptor descriptor) { - final String buildNumberString = getBuildNumber(); - if (buildNumberString != null) { - int buildNumber; - try { - buildNumber = Integer.parseInt(buildNumberString); - } - catch (NumberFormatException e) { - return false; - } - final String sinceBuild = descriptor.getSinceBuild(); - try { - int sinceBuildNumber = Integer.parseInt(sinceBuild); - if (sinceBuildNumber > buildNumber) { - return true; - } - } - catch (NumberFormatException e) { - //skip invalid numbers - } + BuildNumber buildNumber = getBuildNumber(); - final String untilBuild = descriptor.getUntilBuild(); - try { - int untilBuildNumber = Integer.parseInt(untilBuild); - if (untilBuildNumber < buildNumber) { - return true; - } - } - catch (NumberFormatException e) { - //skip invalid numbers + if (descriptor.getSinceBuild() != null) { + BuildNumber sinceBuild = BuildNumber.fromString(descriptor.getSinceBuild()); + if (sinceBuild.compareTo(buildNumber) > 0) { + return true; } } + + if (descriptor.getUntilBuild() != null && !buildNumber.isSnapshot()) { + BuildNumber untilBuild = BuildNumber.fromString(descriptor.getUntilBuild()); + if (untilBuild.compareTo(buildNumber) < 0) return true; + } + return false; } @@ -687,16 +687,23 @@ public class PluginManager { return true; } - @Nullable - static String getBuildNumber() { + static BuildNumber getBuildNumber() { if (ourBuildNumber == null) { - ourBuildNumber = System.getProperty("idea.plugins.compatible.build"); + ourBuildNumber = BuildNumber.fromString(System.getProperty("idea.plugins.compatible.build")); if (ourBuildNumber == null) { try { - ourBuildNumber = new String(FileUtil.loadFileText(new File(PathManager.getHomePath() + "/build.txt"))).trim(); + File buildTxtFile = + FileUtil.findFirstThatExist(PathManager.getHomePath() + "/build.txt", PathManager.getHomePath() + "/community/build.txt"); + + if (buildTxtFile != null) { + ourBuildNumber = BuildNumber.fromString(new String(FileUtil.loadFileText(buildTxtFile)).trim()); + } + else { + ourBuildNumber = BuildNumber.fromString("90.SNAPSHOT"); + } } catch (IOException e) { - ourBuildNumber = null; + ourBuildNumber = BuildNumber.fromString("90.SNAPSHOT"); } } } diff --git a/platform/platform-api/src/com/intellij/openapi/application/ApplicationInfo.java b/platform/platform-api/src/com/intellij/openapi/application/ApplicationInfo.java index dcb7f841669f..6ad58e349151 100644 --- a/platform/platform-api/src/com/intellij/openapi/application/ApplicationInfo.java +++ b/platform/platform-api/src/com/intellij/openapi/application/ApplicationInfo.java @@ -1,25 +1,37 @@ /* - * Copyright 2000-2007 JetBrains s.r.o. + * Copyright 2000-2009 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 + * 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 + * 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. + * 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.openapi.application; +import com.intellij.openapi.util.BuildNumber; + import java.util.Calendar; public abstract class ApplicationInfo { public abstract Calendar getBuildDate(); - public abstract String getBuildNumber(); + + @Deprecated() + /** + * Use {@link #getBuild()} instead + */ + public String getBuildNumber() { + return getBuild().asString(); + } + + public abstract BuildNumber getBuild(); + public abstract String getMajorVersion(); public abstract String getMinorVersion(); public abstract String getVersionName(); diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/PluginInstaller.java b/platform/platform-impl/src/com/intellij/ide/plugins/PluginInstaller.java index 2c9b8065a449..bbf8c5933104 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/PluginInstaller.java +++ b/platform/platform-impl/src/com/intellij/ide/plugins/PluginInstaller.java @@ -9,6 +9,7 @@ import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.openapi.ui.Messages; import com.intellij.openapi.updateSettings.impl.PluginDownloader; +import com.intellij.openapi.util.BuildNumber; import com.intellij.ui.GuiUtils; import org.jetbrains.annotations.NonNls; @@ -138,10 +139,10 @@ public class PluginInstaller { } synchronized (PluginManager.lock) { - final String buildNumber = RepositoryHelper.extractBuildNumber(); + final BuildNumber buildNumber = PluginManager.getBuildNumber(); final @NonNls String url = RepositoryHelper.DOWNLOAD_URL + URLEncoder.encode(pluginNode.getPluginId().getIdString(), "UTF8") + - "&build=" + buildNumber; + "&build=" + buildNumber.asString(); final PluginDownloader downloader = new PluginDownloader(pluginNode.getPluginId().getIdString(), url, null, null, pluginNode.getName()); if (downloader.prepareToInstall(ProgressManager.getInstance().getProgressIndicator())) { diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/RepositoryHelper.java b/platform/platform-impl/src/com/intellij/ide/plugins/RepositoryHelper.java index 59bae100452e..efcff2d5cd9d 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/RepositoryHelper.java +++ b/platform/platform-impl/src/com/intellij/ide/plugins/RepositoryHelper.java @@ -3,6 +3,7 @@ package com.intellij.ide.plugins; import com.intellij.ide.IdeBundle; import com.intellij.openapi.application.PathManager; import com.intellij.openapi.application.impl.ApplicationInfoImpl; +import com.intellij.openapi.util.BuildNumber; import com.intellij.openapi.util.io.FileUtil; import com.intellij.util.net.HttpConfigurable; import com.intellij.util.ui.UIUtil; @@ -38,8 +39,8 @@ public class RepositoryHelper { public static ArrayList process(JLabel label) throws IOException, ParserConfigurationException, SAXException { ArrayList plugins = null; try { - String buildNumber = extractBuildNumber(); - @NonNls String url = getListUrl() + "?build=" + buildNumber; + BuildNumber buildNumber = PluginManager.getBuildNumber(); + @NonNls String url = getListUrl() + "?build=" + buildNumber.asString(); setLabelText(label, IdeBundle.message("progress.connecting.to.plugin.manager", getRepositoryHost())); HttpConfigurable.getInstance().prepareURL(getRepositoryHost()); @@ -123,17 +124,6 @@ public class RepositoryHelper { } } - public static String extractBuildNumber() { - String build; - try { - build = Integer.valueOf(PluginManager.getBuildNumber()).toString(); - } - catch (NumberFormatException e) { - build = "3000"; - } - return build; - } - public static String getRepositoryHost() { return ApplicationInfoImpl.getShadowInstance().getPluginManagerUrl(); } diff --git a/platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java b/platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java index 33ba55c7b100..86e0e772e3cc 100644 --- a/platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java @@ -6,10 +6,7 @@ import com.intellij.openapi.application.PathManager; import com.intellij.openapi.application.ex.ApplicationInfoEx; import com.intellij.openapi.components.ApplicationComponent; import com.intellij.openapi.diagnostic.Logger; -import com.intellij.openapi.util.InvalidDataException; -import com.intellij.openapi.util.JDOMExternalizable; -import com.intellij.openapi.util.JDOMUtil; -import com.intellij.openapi.util.WriteExternalException; +import com.intellij.openapi.util.*; import org.jdom.Document; import org.jdom.Element; import org.jetbrains.annotations.NonNls; @@ -107,8 +104,9 @@ public class ApplicationInfoImpl extends ApplicationInfoEx implements JDOMExtern return myBuildDate; } - public String getBuildNumber() { - return myBuildNumber; + @Override + public BuildNumber getBuild() { + return BuildNumber.fromString(myBuildNumber); } public String getMajorVersion() { diff --git a/platform/util/src/com/intellij/openapi/util/BuildNumber.java b/platform/util/src/com/intellij/openapi/util/BuildNumber.java new file mode 100644 index 000000000000..747eec7cb047 --- /dev/null +++ b/platform/util/src/com/intellij/openapi/util/BuildNumber.java @@ -0,0 +1,205 @@ +/* + * Copyright 2000-2009 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. + */ + +/* + * @author max + */ +package com.intellij.openapi.util; + +import com.intellij.openapi.util.text.StringUtil; + +public class BuildNumber implements Comparable { + private final String myProductCode; + private final int myBaselineVersion; + private final int myBuildNumber; + + public BuildNumber(String productCode, int baselineVersion, int buildNumber) { + myProductCode = productCode; + myBaselineVersion = baselineVersion; + myBuildNumber = buildNumber; + } + + public String asString() { + StringBuilder builder = new StringBuilder(); + if (!StringUtil.isEmpty(myProductCode)) { + builder.append(myProductCode).append('-'); + } + + builder.append(myBaselineVersion).append('.'); + + if (myBuildNumber != Integer.MAX_VALUE) { + builder.append(myBuildNumber); + } + else { + builder.append("SNAPSHOT"); + } + + return builder.toString(); + } + + @Override + public String toString() { + return asString(); + } + + public static BuildNumber fromString(String version) { + if (version == null) return null; + String code = version; + int productSeparator = code.indexOf('-'); + final String productCode; + if (productSeparator > 0) { + productCode = code.substring(0, productSeparator); + code = code.substring(productSeparator + 1); + } + else { + productCode = ""; + } + + int baselineVersionSeparator = code.indexOf('.'); + int baselineVersion; + int buildNumber; + if (baselineVersionSeparator > 0) { + try { + baselineVersion = Integer.parseInt(code.substring(0, baselineVersionSeparator)); + code = code.substring(baselineVersionSeparator + 1); + } + catch (NumberFormatException e) { + throw new RuntimeException("Unparseable version number: " + version); + } + + if ("SNAPSHOT".equals(code) || "__BUILD_NUMBER__".equals(code)) { + buildNumber = Integer.MAX_VALUE; + } + else { + try { + buildNumber = Integer.parseInt(code); + } + catch (NumberFormatException e) { + throw new RuntimeException("Unparseable version number: " + version); + } + } + } + else { + try { + buildNumber = Integer.parseInt(code); + } + catch (NumberFormatException e) { + throw new RuntimeException("Unparseable version number: " + version); + } + + if (buildNumber <= 2000) { + // it's probably a baseline, not a build number + return new BuildNumber(productCode, buildNumber, 0); + } + + baselineVersion = getBaseLineForHistoricBuilds(buildNumber); + } + + return new BuildNumber(productCode, baselineVersion, buildNumber); + } + + public int compareTo(BuildNumber o) { + if (myBaselineVersion == o.myBaselineVersion) return myBuildNumber - o.myBuildNumber; + return myBaselineVersion - o.myBaselineVersion; + } + + public String getProductCode() { + return myProductCode; + } + + public int getBaselineVersion() { + return myBaselineVersion; + } + + public int getBuildNumber() { + return myBuildNumber; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + BuildNumber that = (BuildNumber)o; + + if (myBaselineVersion != that.myBaselineVersion) return false; + if (myBuildNumber != that.myBuildNumber) return false; + if (!myProductCode.equals(that.myProductCode)) return false; + + return true; + } + + @Override + public int hashCode() { + int result = myProductCode.hashCode(); + result = 31 * result + myBaselineVersion; + result = 31 * result + myBuildNumber; + return result; + } + + // See http://www.jetbrains.net/confluence/display/IDEADEV/Build+Number+Ranges for historic build ranges + private static int getBaseLineForHistoricBuilds(int bn) { + if (bn >= 10000) { + return 90; // Maia, 9x builds + } + + if (bn >= 9500) { + return 85; // 8.1 builds + } + + if (bn >= 9100) { + return 81; // 8.0.x builds + } + + if (bn >= 8000) { + return 80; // 8.0, including pre-release builds + } + + if (bn >= 7500) { + return 75; // 7.0.2+ + } + + if (bn >= 7200) { + return 72; // 7.0 final + } + + if (bn >= 6900) { + return 69; // 7.0 pre-M2 + } + + if (bn >= 6500) { + return 65; // 7.0 pre-M1 + } + + if (bn >= 6000) { + return 60; // 6.0.2+ + } + + if (bn >= 5000) { + return 55; // 6.0 branch, including all 6.0 EAP builds + } + + if (bn >= 4000) { + return 50; // 5.1 branch + } + + return 40; + } + + public boolean isSnapshot() { + return myBuildNumber == Integer.MAX_VALUE; + } +} diff --git a/platform/util/testSrc/com/intellij/openapi/util/BuildNumberTest.java b/platform/util/testSrc/com/intellij/openapi/util/BuildNumberTest.java new file mode 100644 index 000000000000..77666acc418d --- /dev/null +++ b/platform/util/testSrc/com/intellij/openapi/util/BuildNumberTest.java @@ -0,0 +1,17 @@ +/* + * @author max + */ +package com.intellij.openapi.util; + +import junit.framework.TestCase; + +public class BuildNumberTest extends TestCase { + public void testHistoricBuild() { + assertEquals(new BuildNumber("", 75, 7512), BuildNumber.fromString("7512")); + } + + public void testSnapshotDominates() { + assertTrue(BuildNumber.fromString("90.SNAPSHOT").compareTo(BuildNumber.fromString("90.12345")) > 0); + assertTrue(BuildNumber.fromString("IU-90.SNAPSHOT").compareTo(BuildNumber.fromString("RM-90.12345")) > 0); + } +} From 3307ca4196d94ac4de5965cd606a8c9e415712e3 Mon Sep 17 00:00:00 2001 From: Peter Gromov Date: Wed, 30 Sep 2009 15:48:01 +0400 Subject: [PATCH 39/58] fix groovy script running; yet another place to add quotations --- .../src/org/jetbrains/plugins/groovy/gant/GantRunner.java | 4 ++-- .../jetbrains/plugins/groovy/runner/GroovyScriptRunner.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/gant/GantRunner.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/gant/GantRunner.java index b0d544d063f5..85fb0bba4c95 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/gant/GantRunner.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/gant/GantRunner.java @@ -94,8 +94,8 @@ public class GantRunner extends GroovyScriptRunner { antHome = gantHome; } - params.getVMParametersList().addParametersString("-Dant.home=" + antHome); - params.getVMParametersList().addParametersString("-Dgant.home=" + gantHome + ""); + params.getVMParametersList().add("-Dant.home=" + antHome); + params.getVMParametersList().add("-Dgant.home=" + gantHome + ""); params.getProgramParametersList().add("--main"); params.getProgramParametersList().add("gant.Gant"); diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/runner/GroovyScriptRunner.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/runner/GroovyScriptRunner.java index 3b8b2599fb2d..7655386bc13e 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/runner/GroovyScriptRunner.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/runner/GroovyScriptRunner.java @@ -57,12 +57,12 @@ public abstract class GroovyScriptRunner { } protected static void setGroovyHome(JavaParameters params, String groovyHome) { - params.getVMParametersList().addParametersString("-Dgroovy.home=" + groovyHome); + params.getVMParametersList().add("-Dgroovy.home=" + groovyHome); if (groovyHome.contains("grails")) { //a bit of a hack - params.getVMParametersList().addParametersString("-Dgrails.home=" + groovyHome); + params.getVMParametersList().add("-Dgrails.home=" + groovyHome); } if (groovyHome.contains("griffon")) { //a bit of a hack - params.getVMParametersList().addParametersString("-Dgriffon.home=" + groovyHome); + params.getVMParametersList().add("-Dgriffon.home=" + groovyHome); } } From 3ae9ca0c2ccf34daeab25d1e2a857056fa2088bf Mon Sep 17 00:00:00 2001 From: anna Date: Wed, 30 Sep 2009 15:58:13 +0400 Subject: [PATCH 40/58] profiles: ignore empty files --- .../converter/options/options.after.xml | 6 ++-- .../converter/scope/options.after.xml | 6 ++-- .../profile/DefaultProjectProfileManager.java | 31 ++++++++++++++----- .../daemon/impl/SeverityRegistrar.java | 18 ++++++----- .../ex/InspectionProfileImpl.java | 1 + 5 files changed, 42 insertions(+), 20 deletions(-) diff --git a/java/java-tests/testData/inspection/converter/options/options.after.xml b/java/java-tests/testData/inspection/converter/options/options.after.xml index 5987f6fe7d1d..350606862ffa 100644 --- a/java/java-tests/testData/inspection/converter/options/options.after.xml +++ b/java/java-tests/testData/inspection/converter/options/options.after.xml @@ -1,8 +1,5 @@ -