Merge branch 'appcode10' into merge_appcode10
authorMaxim Shafirov <max@jetbrains.com>
Wed, 26 Oct 2011 15:53:14 +0000 (19:53 +0400)
committerMaxim Shafirov <max@jetbrains.com>
Wed, 26 Oct 2011 15:53:14 +0000 (19:53 +0400)
Conflicts:
build.txt
java/java-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodDialog.java
platform/core-api/src/com/intellij/openapi/vfs/CharsetToolkit.java
platform/core-impl/src/com/intellij/openapi/editor/impl/CharArray.java
platform/core-impl/src/com/intellij/openapi/fileEditor/impl/LoadTextUtil.java
platform/core-impl/src/com/intellij/psi/impl/file/impl/FileManagerImpl.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.form
platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesPanel.java
platform/lang-impl/src/com/intellij/execution/impl/RunConfigurable.java
platform/lang-impl/src/com/intellij/openapi/vcs/checkin/TodoCheckinHandler.java
platform/platform-api/src/com/intellij/openapi/fileEditor/OpenFileDescriptor.java
platform/platform-api/src/com/intellij/openapi/ui/FixedComboBoxEditor.java
platform/platform-impl/src/com/intellij/ide/actionMacro/ActionMacroManager.java
platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerMain.form
platform/platform-impl/src/com/intellij/internal/statistic/updater/StatisticsNotificationManager.java
platform/platform-impl/src/com/intellij/notification/EventLogConsole.java
platform/platform-impl/src/com/intellij/notification/LogModel.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java
platform/platform-impl/src/com/intellij/platform/PlatformProjectOpenProcessor.java
platform/platform-impl/src/com/intellij/ui/EditorTextField.java
platform/platform-impl/src/com/intellij/util/ui/table/JBListTable.java
platform/platform-resources-en/src/messages/ActionsBundle.properties
platform/platform-resources-en/src/misc/registry.properties
platform/util/src/com/intellij/openapi/ui/Splitter.java
platform/util/src/com/intellij/util/containers/MultiMap.java
platform/util/src/com/intellij/util/ui/MacUIUtil.java
platform/util/src/com/intellij/util/ui/UIUtil.java
platform/util/testSrc/com/intellij/util/text/DateFormatUtilTest.java
plugins/git4idea/src/git4idea/actions/GitAdd.java
plugins/git4idea/src/git4idea/commands/GitSimpleHandler.java
plugins/hg4idea/src/org/zmlx/hg4idea/execution/HgCommandExecutor.java
plugins/spellchecker/src/com/intellij/spellchecker/inspections/CommentSplitter.java
plugins/spellchecker/testSrc/com/intellij/spellchecker/inspector/SplitterTest.java

20 files changed:
1  2 
platform/core-api/src/com/intellij/psi/impl/ElementBase.java
platform/core-api/src/com/intellij/psi/util/PsiTreeUtil.java
platform/core-impl/src/com/intellij/psi/impl/file/impl/FileManagerImpl.java
platform/lang-impl/src/com/intellij/application/options/colors/OptionsPanelImpl.java
platform/lang-impl/src/com/intellij/codeInsight/highlighting/BraceHighlightingHandler.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/PsiDirectoryNode.java
platform/lang-impl/src/com/intellij/ide/util/scopeChooser/ScopeChooserCombo.java
platform/platform-api/src/com/intellij/openapi/fileEditor/OpenFileDescriptor.java
platform/platform-api/src/com/intellij/openapi/ui/TreeComboBox.java
platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java
platform/platform-impl/src/com/intellij/ide/ui/search/SearchUtil.java
platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationInfoImpl.java
platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java
platform/platform-impl/src/com/intellij/platform/PlatformProjectOpenProcessor.java
platform/platform-resources/src/META-INF/PlatformExtensions.xml
platform/util/src/com/intellij/openapi/util/TextRange.java
platform/util/src/com/intellij/util/containers/MostlySingularMultiMap.java
platform/util/src/com/intellij/util/containers/MultiMap.java
platform/util/src/com/intellij/util/ui/UIUtil.java
plugins/spellchecker/src/com/intellij/spellchecker/inspections/CommentSplitter.java

index 7807ff66b3b5216c92b59cab8d29d77023219852,3f4e45b620d03c5a6008ed054a7b1a83883c3e32..f864b59870f77f81f436c6f7ef915536e6edeeca
@@@ -309,10 -309,8 +309,10 @@@ public class FileManagerImpl implement
    @Nullable
    public PsiFile getCachedPsiFile(@NotNull VirtualFile vFile) {
      ApplicationManager.getApplication().assertReadAccessAllowed();
-     LOG.assertTrue(vFile.isValid());
+     LOG.assertTrue(vFile.isValid(), "Invalid file");
 -    LOG.assertTrue(!myDisposed, "Already disposed");
 +    if (myDisposed) {
 +      LOG.error("Project is already disposed: " + myManager.getProject());
 +    }
      if (!myInitialized) return null;
  
      dispatchPendingEvents();
index 386a683795135d77e439d93656ff6ce830980161,787c3c21dc55daba4bc7d7ccff8d2b90afaeecbb..241ce3840a4b209430c2b6de7cf39cfe39b7d6e9
@@@ -127,7 -124,8 +127,7 @@@ public class OpenFileDescriptor impleme
        return ((INativeFileType) type).openFileInAssociatedApplication(project, myFile);
      }
  
-     return navigateInRequestedEditor() || navigateInAnyFileEditor(project, focusEditor);
+     return navigateInRequestedEditor() || navigateInAnyFileEditor(project, requestFocus);
 -
    }
  
    private boolean navigateInRequestedEditor() {
index 5df7a0564a7a087a278c24fed542e9279cc42ebb,512392ac355ea78ed88691a4ffbf504b5ec95d4d..c70b23b161eb6db4148713b9bd2c159015a903fa
@@@ -109,9 -110,14 +109,13 @@@ public class PlatformProjectOpenProcess
      
      final ProjectManagerEx projectManager = ProjectManagerEx.getInstanceEx();
      Project project = null;
 -    Ref<Boolean> cancelled = new Ref<Boolean>();
      if (projectDir.exists()) {
        try {
 -
 -        project = ((ProjectManagerImpl) projectManager).convertAndLoadProject(baseDir.getPath(), cancelled);
+         for (ProjectOpenProcessor processor : ProjectOpenProcessor.EXTENSION_POINT_NAME.getExtensions()) {
+           processor.refreshProjectFiles(projectDir);
+         }
++        
 +        project = ((ProjectManagerImpl) projectManager).convertAndLoadProject(baseDir.getPath());
        }
        catch (Exception e) {
          // ignore
index 3b8da1cae0b58fd57ffa16048023c6086778eaf2,5a27ab14a12b9962fa11bfc1cf72ccf67416a9e3..459f76efbd19b5d0cd8247abc019269319e7d134
@@@ -30,8 -32,10 +32,9 @@@ public class MultiMap<K, V> implements 
        return Collections.emptyMap();
      }
    };
+   private static final long serialVersionUID = -2632269270151455493L;
  
    private final Map<K, Collection<V>> myMap;
 -
    private Collection<V> values;
  
    public MultiMap() {
index 58d502146f77d3c33d582cc6d6eca58744ea2761,3fad261b9f5dfffae802b308552caf15bc5265df..bb02b5029b25ffb9c533d57ae164a7de4eb5e5ce
@@@ -120,13 -121,11 +120,13 @@@ public class UIUtil 
    private static final Color ACTIVE_HEADER_COLOR = new Color(160, 186, 213);
    private static final Color INACTIVE_HEADER_COLOR = new Color(128, 128, 128);
    private static final Color BORDER_COLOR = Color.LIGHT_GRAY;
 -  public static Color AQUA_SEPARATOR_FOREGROUND_COLOR = new Color(190, 190, 190);
 -  public static Color AQUA_SEPARATOR_BACKGROUND_COLOR = new Color(240, 240, 240);
 +
 +  public static final Color AQUA_SEPARATOR_FOREGROUND_COLOR = new Color(190, 190, 190);
 +  public static final Color AQUA_SEPARATOR_BACKGROUND_COLOR = new Color(240, 240, 240);
 +  public static final Color TRANSPARENT_COLOR = new Color(0, 0, 0, 0);
  
-   public static final int DEFAULT_HGAP = 10;
-   public static final int DEFAULT_VGAP = 5;
+   public static final int DEFAULT_HGAP = 8;
+   public static final int DEFAULT_VGAP = 4;
    public static final int LARGE_HGAP = 30;
    public static final int LARGE_VGAP = 20;
  
index 4d1124843c57b4c3e6aa86ea9e4ff0f031f3f0f7,51496977291ed577b45d89c5b4295770b06bd15c..cea3b8678ee688b35b78e280ce0f28022cff83ff
@@@ -25,18 -25,13 +25,18 @@@ import java.util.List
  import java.util.regex.Pattern;
  
  public class CommentSplitter extends BaseSplitter {
-   private static final Pattern HTML = Pattern.compile("<(\\S+?).*?>(.*?)</\\1>");
++  private static final Pattern HTML = Pattern.compile("<(\\S+?)[^<>]*?>(.*?)</\\1>");
 +  
 +  private static final CommentSplitter INSTANCE = new CommentSplitter();
 +  
 +  public static CommentSplitter getInstance() {
 +    return INSTANCE;
 +  }
  
 -   private static final Pattern HTML = Pattern.compile("<(\\S+?)[^<>]*?>(.*?)</\\1>");
 -
 -
 -  public List<CheckArea> split(@Nullable String text, @NotNull TextRange range) {
 +  @Override
 +  public void split(@Nullable String text, @NotNull TextRange range, Consumer<TextRange> consumer) {
      if (text == null || StringUtil.isEmpty(text)) {
 -      return null;
 +      return;
      }
  
      List<TextRange> toCheck = excludeByPattern(text, range, HTML, 2);