From 0ebc2a5ce2ae7a9a6d4ddb8d60585601e793042b Mon Sep 17 00:00:00 2001 From: Kirill Kalishev Date: Thu, 15 Sep 2011 11:21:31 +0400 Subject: [PATCH 01/26] addeded isEdt assertions for focus manager --- .../openapi/wm/impl/FocusManagerImpl.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/FocusManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/FocusManagerImpl.java index 42c57c9dd791..f6000f27e7a4 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/FocusManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/FocusManagerImpl.java @@ -183,6 +183,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { @NotNull public ActionCallback requestFocus(@NotNull final FocusCommand command, final boolean forced) { + assertDispatchThread(); + if (isInternalMode) { recordCommand(command, new Throwable(), forced); } @@ -602,6 +604,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { } public boolean isFocusTransferReady() { + assertDispatchThread(); + if (myRunContext != null) return true; invalidateFocusRequestsQueue(); @@ -741,6 +745,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { } public void suspendKeyProcessingUntil(@NotNull final ActionCallback done) { + assertDispatchThread(); + requestFocus(new FocusCommand(done) { public ActionCallback run() { return done; @@ -749,6 +755,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { } public Expirable getTimestamp(final boolean trackOnlyForcedCommands) { + assertDispatchThread(); + return new Expirable() { long myOwnStamp = trackOnlyForcedCommands ? myForcedCmdTimestamp : myCmdTimestamp; @@ -760,6 +768,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { @Override public FocusRequestor getFurtherRequestor() { + assertDispatchThread(); + FurtherRequestor requestor = new FurtherRequestor(this, getTimestamp(true)); myValidFurtherRequestors.add(requestor); revalidateFurtherRequestors(); @@ -789,6 +799,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { @Override public Component getFocusOwner() { + assertDispatchThread(); + Component result = null; if (myRunContext != null) { result = (Component)myRunContext.getData(PlatformDataKeys.CONTEXT_COMPONENT.getName()); @@ -815,6 +827,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { @Override public void runOnOwnContext(DataContext context, Runnable runnable) { + assertDispatchThread(); + myRunContext = context; try { runnable.run(); @@ -825,12 +839,16 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { @Override public Component getLastFocusedFor(IdeFrame frame) { + assertDispatchThread(); + WeakReference ref = myLastFocused.get(frame); return ref != null ? ref.get() : null; } @Override public void toFront(JComponent c) { + assertDispatchThread(); + if (c == null) return; final Window window = UIUtil.getParentOfType(Window.class, c); @@ -1018,4 +1036,8 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable { public boolean isFocusTransferEnabled() { return myApp.isActive() || !Registry.is("actionSystem.suspendFocusTransferIfApplicationInactive"); } + + private void assertDispatchThread() { + ApplicationManager.getApplication().assertIsDispatchThread(); + } } From 5df4e23ccd3e78f0dc47883c8119203550b953ab Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Thu, 4 Aug 2011 19:31:23 +0400 Subject: [PATCH 02/26] api improved --- .../openapi/fileChooser/FileChooser.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooser.java b/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooser.java index db6d6546a8fc..863c1ec2387c 100644 --- a/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooser.java +++ b/platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooser.java @@ -94,8 +94,29 @@ public class FileChooser { @Nullable final VirtualFile toSelect, @NotNull final Consumer onChosenCallback ) { - if (SystemInfo.isMac && isNativeMacChooserEnabled()) descriptor.putUserData(MacFileChooserDialog.NATIVE_MAC_FILE_CHOOSER_ENABLED, Boolean.TRUE); - final FileChooserDialog dialog = FileChooserFactory.getInstance().createFileChooser(descriptor, project); + chooseFilesWithSlideEffect(descriptor, project, null, toSelect, onChosenCallback); + } + + /** + * Shows file/folder open dialog, allows user to choose files/folders and then passes result to callback in EDT. + * On MacOS Open Dialog will be shown with slide effect if Macish UI is turned on. + * @param descriptor File chooser descriptor + * @param project project + * @param parent parent component + * @param toSelect file to preselect + * @param onChosenCallback Callback will be invoked after user have closed dialog + */ + public static void chooseFilesWithSlideEffect(@NotNull final FileChooserDescriptor descriptor, + @Nullable final Project project, + @Nullable final Component parent, + @Nullable final VirtualFile toSelect, + @NotNull final Consumer onChosenCallback + ) { + if (SystemInfo.isMac && isNativeMacChooserEnabled()) descriptor.putUserData(MacFileChooserDialog.NATIVE_MAC_FILE_CHOOSER_ENABLED, Boolean.TRUE); + final FileChooserFactory factory = FileChooserFactory.getInstance(); + final FileChooserDialog dialog = parent != null + ? factory.createFileChooser(descriptor, parent) + : factory.createFileChooser(descriptor, project); if (dialog instanceof MacFileChooserDialog) { ((MacFileChooserDialog)dialog).chooseWithSheet(toSelect, project, new MacFileChooserDialog.MacFileChooserCallback() { public void onChosen(@NotNull final VirtualFile[] files) { From 7e5344c84a2090fb64b62322dbb9eff6177985bc Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Wed, 10 Aug 2011 18:59:19 +0400 Subject: [PATCH 03/26] rebase github fork -> git vsc actions popup --- .../com/intellij/openapi/actionSystem/Separator.java | 3 ++- .../git4idea/actions/GitQuickListContentProvider.java | 11 ++++++++++- .../git4idea/src/git4idea/i18n/GitBundle.properties | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/Separator.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/Separator.java index 92e08842edfc..9bc7e8c1519a 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/Separator.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/Separator.java @@ -16,6 +16,7 @@ package com.intellij.openapi.actionSystem; import com.intellij.openapi.project.DumbAware; +import org.jetbrains.annotations.Nullable; /** * Represents a separator. @@ -28,7 +29,7 @@ public final class Separator extends AnAction implements DumbAware { public Separator() { } - public Separator(String text) { + public Separator(@Nullable final String text) { myText = text; } diff --git a/plugins/git4idea/src/git4idea/actions/GitQuickListContentProvider.java b/plugins/git4idea/src/git4idea/actions/GitQuickListContentProvider.java index 540c1f8dd7a0..2687a1a6a6db 100644 --- a/plugins/git4idea/src/git4idea/actions/GitQuickListContentProvider.java +++ b/plugins/git4idea/src/git4idea/actions/GitQuickListContentProvider.java @@ -23,6 +23,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.AbstractVcs; import com.intellij.openapi.vcs.actions.VcsQuickListContentProvider; import git4idea.GitVcs; +import git4idea.i18n.GitBundle; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -66,6 +67,14 @@ public class GitQuickListContentProvider implements VcsQuickListContentProvider add("Git.Stash", manager, actions); add("Git.Unstash", manager, actions); + // Github + addSeparator(actions); + final AnAction githubRebase = manager.getAction("Github.Rebase"); + if (githubRebase != null) { + actions.add(new Separator(GitBundle.message("vcs.popup.git.github.section"))); + actions.add(githubRebase); + } + return actions; } @@ -81,7 +90,7 @@ public class GitQuickListContentProvider implements VcsQuickListContentProvider return true; } - private void addSeparator(List actions) { + private void addSeparator(@NotNull final List actions) { actions.add(new Separator()); } diff --git a/plugins/git4idea/src/git4idea/i18n/GitBundle.properties b/plugins/git4idea/src/git4idea/i18n/GitBundle.properties index d4ce5b26e37b..215633bea117 100644 --- a/plugins/git4idea/src/git4idea/i18n/GitBundle.properties +++ b/plugins/git4idea/src/git4idea/i18n/GitBundle.properties @@ -516,3 +516,5 @@ branch.delete.not_fully_merged.description.not_on_branch=You are currently not o branch.delete.merged_to.many=The branch {0} is however fully merged to the following branches: {1}. branch.delete.merged_to.one=The branch {0} is however fully merged to the branch {1}. branch.delete.warning=You may still delete the branch {0}, but beware that it cannot be undone. + +vcs.popup.git.github.section=GitHub \ No newline at end of file From 52952457778c0e4169c6b7d91a95abf2751da45f Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Wed, 10 Aug 2011 19:04:49 +0400 Subject: [PATCH 04/26] 1. origin repo searching fixed 2. use "upstream" name for fork parent remote repo (github naming conventions) 3. if upstream contains a branch with same name as current branch - preselect it instead of "master" branch --- .../plugins/github/GithubRebase.java | 8 ++-- .../plugins/github/GithubRebaseAction.java | 14 ++++--- .../jetbrains/plugins/github/GithubUtil.java | 11 ++++- .../plugins/github/ui/GithubRebaseDialog.java | 41 ++++++++++++++++--- 4 files changed, 56 insertions(+), 18 deletions(-) diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubRebase.java b/plugins/github/src/org/jetbrains/plugins/github/GithubRebase.java index 8071d1faf418..6355e05006af 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubRebase.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubRebase.java @@ -31,7 +31,7 @@ import java.util.List; * @date 12/10/10 */ public class GithubRebase extends GitRebase { - private String myParent; + private String myOriginName; /** * {@inheritDoc} @@ -39,7 +39,7 @@ public class GithubRebase extends GitRebase { @Nullable protected GitLineHandler createHandler(final Project project, final List gitRoots, final VirtualFile defaultRoot) { final GithubRebaseDialog dialog = new GithubRebaseDialog(project, gitRoots, defaultRoot); - dialog.configure(myParent); + dialog.configure(myOriginName); dialog.show(); if (!dialog.isOK()) { return null; @@ -47,8 +47,8 @@ public class GithubRebase extends GitRebase { return dialog.handler(); } - public void setRebaseOrigin(final String parent) { - myParent = parent; + public void setRebaseOrigin(final String originName) { + myOriginName = originName; } } diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java index 9148996e28b3..bb09ef4ee4ef 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java @@ -25,6 +25,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.Computable; import com.intellij.openapi.util.IconLoader; +import com.intellij.openapi.util.Ref; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vfs.VirtualFile; @@ -124,15 +125,15 @@ public class GithubRebaseAction extends DumbAwareAction { final String parentRepoUrl = "git://github.com/" + parentRepoSuffix; // Check that corresponding remote branch is configured for the fork origin repo - boolean remoteForParentSeen = false; + final Ref remoteForForkParentRepo = new Ref(); for (GitRemote gitRemote : gitRemotes) { final String fetchUrl = gitRemote.fetchUrl(); if (fetchUrl.endsWith(parent + ".git")) { - remoteForParentSeen = true; + remoteForForkParentRepo.set(gitRemote.name()); break; } } - if (!remoteForParentSeen){ + if (remoteForForkParentRepo.isNull()){ final int result = Messages.showYesNoDialog(project, "It is necessary to have '" + parentRepoUrl + "' as a configured remote. Add remote?", "Github Rebase", @@ -149,8 +150,9 @@ public class GithubRebaseAction extends DumbAwareAction { final GitSimpleHandler addRemoteHandler = new GitSimpleHandler(project, root, GitCommand.REMOTE); addRemoteHandler.setNoSSH(true); addRemoteHandler.setSilent(true); - final String remoteName = parent.substring(0, parent.lastIndexOf('/')); - addRemoteHandler.addParameters("add", remoteName, parentRepoUrl); + + remoteForForkParentRepo.set("upstream"); + addRemoteHandler.addParameters("add", remoteForForkParentRepo.get(), parentRepoUrl); addRemoteHandler.run(); if (addRemoteHandler.getExitCode() != 0) { showErrorMessageInEDT(project, "Failed to add GitHub remote: '" + parentRepoUrl + "'"); @@ -180,7 +182,7 @@ public class GithubRebaseAction extends DumbAwareAction { BasicAction.saveAll(); final GithubRebase action = (GithubRebase) ActionManager.getInstance().getAction("Github.Rebase.Internal"); - action.setRebaseOrigin(parent); + action.setRebaseOrigin(remoteForForkParentRepo.get()); final AnActionEvent actionEvent = new AnActionEvent(e.getInputEvent(), e.getDataContext(), e.getPlace(), e.getPresentation(), e.getActionManager(), e.getModifiers()); action.actionPerformed(actionEvent); diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubUtil.java b/plugins/github/src/org/jetbrains/plugins/github/GithubUtil.java index 6af7001bedca..a9382f961f1e 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubUtil.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubUtil.java @@ -365,13 +365,20 @@ public class GithubUtil { @Nullable public static GitRemote findGitHubRemoteBranch(final Project project, final VirtualFile root) { + // i.e. find origin which points on my github repo try { // Check that given repository is properly configured git repository - final String host = GithubSettings.getInstance().getHost(); + final GithubSettings githubSettings = GithubSettings.getInstance(); + final String host = githubSettings.getHost(); + final String username = githubSettings.getLogin(); + + final String userRepoMarkerSSHProtocol = host + ":" + username + "/"; + final String userRepoMarkerOtherProtocols = host + "/" + username + "/"; + final List gitRemotes = GitRemote.list(project, root); for (GitRemote gitRemote : gitRemotes) { final String pushUrl = gitRemote.pushUrl(); - if (pushUrl.contains(host)) { + if (pushUrl.contains(userRepoMarkerSSHProtocol) || pushUrl.contains(userRepoMarkerOtherProtocols)) { return gitRemote; } } diff --git a/plugins/github/src/org/jetbrains/plugins/github/ui/GithubRebaseDialog.java b/plugins/github/src/org/jetbrains/plugins/github/ui/GithubRebaseDialog.java index 9f381d0ea1dd..9bce8d8ef355 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/ui/GithubRebaseDialog.java +++ b/plugins/github/src/org/jetbrains/plugins/github/ui/GithubRebaseDialog.java @@ -16,10 +16,13 @@ package org.jetbrains.plugins.github.ui; import com.intellij.openapi.project.Project; +import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vfs.VirtualFile; import git4idea.GitBranch; import git4idea.rebase.GitRebaseDialog; import git4idea.ui.GitUIUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; @@ -35,14 +38,13 @@ public class GithubRebaseDialog extends GitRebaseDialog { super(project, roots, defaultRoot); } - public void configure(final String parent) { + public void configure(final String originName) { setTitle("Rebase GitHub"); myShowRemoteBranchesCheckBox.setSelected(true); myShowRemoteBranchesCheckBox.getParent().remove(myShowRemoteBranchesCheckBox); myGitRootComboBox.setEnabled(false); myLocalBranches.clear(); - final String originName = parent.substring(0, parent.lastIndexOf('/')); final ArrayList remoteCopy = new ArrayList(); remoteCopy.addAll(myRemoteBranches); myRemoteBranches.clear(); @@ -55,14 +57,41 @@ public class GithubRebaseDialog extends GitRebaseDialog { updateOntoFrom(); // Preselect remote master - final String preselected = "/" + originName + "/master"; + GitBranch remoteBranch = null; + String currentLocalBranchName = null; + try { + final GitBranch currentBranch = GitBranch.current(myProject, gitRoot()); + if (currentBranch != null) { + currentLocalBranchName = currentBranch.getName(); + } + } + catch (VcsException e) { + // Do noting; + } + + if (currentLocalBranchName != null) { + // try to find corresponding remote branch + remoteBranch = findBranch("/" + originName + "/" + currentLocalBranchName); + } + if (remoteBranch == null) { + // else use master + remoteBranch = findBranch("/" + originName + "/master"); + } + + if (remoteBranch != null) { + myOntoComboBox.setSelectedItem(remoteBranch); + GitUIUtil.getTextField(myOntoComboBox).setText(remoteBranch.getFullName()); + } + } + + @Nullable + private GitBranch findBranch(@NotNull String preselected) { for (GitBranch remoteBranch : myRemoteBranches) { final String branchFullName = remoteBranch.getFullName(); if (branchFullName.endsWith(preselected)){ - myOntoComboBox.setSelectedItem(remoteBranch); - GitUIUtil.getTextField(myOntoComboBox).setText(branchFullName); - break; + return remoteBranch; } } + return null; } } From 7e1abb8b82f01c70a426e4e800d8119a3e493105 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Mon, 22 Aug 2011 22:22:19 +0400 Subject: [PATCH 05/26] fixed [RUBY-8864] Column mode hotkey combination doesn't work on OSX --- platform/platform-resources/src/idea/Keymap_Mac.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-resources/src/idea/Keymap_Mac.xml b/platform/platform-resources/src/idea/Keymap_Mac.xml index cc862b1e2b6e..2f82b8830f3a 100644 --- a/platform/platform-resources/src/idea/Keymap_Mac.xml +++ b/platform/platform-resources/src/idea/Keymap_Mac.xml @@ -218,7 +218,8 @@ - + + From 5f0bdfca05c2838fede259f6eaa0e4aeede45707 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Tue, 23 Aug 2011 12:04:30 +0400 Subject: [PATCH 06/26] error msg updated --- .../src/messages/SMTestsRunnerBundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-resources-en/src/messages/SMTestsRunnerBundle.properties b/platform/platform-resources-en/src/messages/SMTestsRunnerBundle.properties index d519fe788278..12d6d2c02abf 100644 --- a/platform/platform-resources-en/src/messages/SMTestsRunnerBundle.properties +++ b/platform/platform-resources-en/src/messages/SMTestsRunnerBundle.properties @@ -13,7 +13,7 @@ sm.test.runner.ui.tests.tree.presentation.labels.instantiating.tests=Instantiati sm.test.runner.ui.tests.tree.presentation.labels.not.test.results=No Test Results sm.test.runner.ui.tests.tree.presentation.labels.was.terminated=Terminated sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found=No tests were found -sm.test.runner.ui.tests.tree.presentation.labels.test.reporter.not.attached=Unable to attach test reporter to test framework +sm.test.runner.ui.tests.tree.presentation.labels.test.reporter.not.attached=Unable to attach test reporter to test framework or test framework quitted unexpectedly sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found.with.errors=No tests were found. Errors occurred sm.test.runner.ui.tests.tree.presentation.labels.empty.test.suite=Empty test suite sm.test.runner.ui.tests.tree.presentation.labels.all.tests.passed=All Tests Passed From 79dff0c6eaca4d51778cdd0eec4478db70a118f0 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Tue, 30 Aug 2011 22:17:02 +0400 Subject: [PATCH 07/26] test fixed --- .../src/messages/SMTestsRunnerBundle.properties | 2 +- .../testframework/sm/runner/ui/TestsPresentationUtilTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-resources-en/src/messages/SMTestsRunnerBundle.properties b/platform/platform-resources-en/src/messages/SMTestsRunnerBundle.properties index 12d6d2c02abf..c698828d276d 100644 --- a/platform/platform-resources-en/src/messages/SMTestsRunnerBundle.properties +++ b/platform/platform-resources-en/src/messages/SMTestsRunnerBundle.properties @@ -13,7 +13,7 @@ sm.test.runner.ui.tests.tree.presentation.labels.instantiating.tests=Instantiati sm.test.runner.ui.tests.tree.presentation.labels.not.test.results=No Test Results sm.test.runner.ui.tests.tree.presentation.labels.was.terminated=Terminated sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found=No tests were found -sm.test.runner.ui.tests.tree.presentation.labels.test.reporter.not.attached=Unable to attach test reporter to test framework or test framework quitted unexpectedly +sm.test.runner.ui.tests.tree.presentation.labels.test.reporter.not.attached=Unable to attach test reporter to test framework or test framework quit unexpectedly sm.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found.with.errors=No tests were found. Errors occurred sm.test.runner.ui.tests.tree.presentation.labels.empty.test.suite=Empty test suite sm.test.runner.ui.tests.tree.presentation.labels.all.tests.passed=All Tests Passed diff --git a/platform/smRunner/testSrc/com/intellij/execution/testframework/sm/runner/ui/TestsPresentationUtilTest.java b/platform/smRunner/testSrc/com/intellij/execution/testframework/sm/runner/ui/TestsPresentationUtilTest.java index 81fe4ead2ffa..023eb3ee610a 100644 --- a/platform/smRunner/testSrc/com/intellij/execution/testframework/sm/runner/ui/TestsPresentationUtilTest.java +++ b/platform/smRunner/testSrc/com/intellij/execution/testframework/sm/runner/ui/TestsPresentationUtilTest.java @@ -547,7 +547,7 @@ public class TestsPresentationUtilTest extends BaseSMTRunnerTestCase { assertEquals(PoolOfTestIcons.NOT_RAN, myRenderer.getIcon()); assertOneElement(myFragContainer.getFragments()); - assertEquals("Unable to attach test reporter to test framework", myFragContainer.getTextAt(0)); + assertEquals("Unable to attach test reporter to test framework or test framework quit unexpectedly", myFragContainer.getTextAt(0)); assertEquals(SimpleTextAttributes.ERROR_ATTRIBUTES, myFragContainer.getAttribsAt(0)); } From 9d5dff70b14ecaf4e4cb4e63f8762ce0ce7d4129 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Sat, 3 Sep 2011 15:15:58 +0400 Subject: [PATCH 08/26] 1. fixed [RUBY-9283] Support CoffeeScript in bundled color schemes 2. bundled schemes updated because converter was improved. --- .../{vibrantInk.xml => all_hallows_eve.xml} | 2255 ++++++---- colorSchemes/src/colorSchemes/blackboard.xml | 2707 ++++++++++++ colorSchemes/src/colorSchemes/cobalt.xml | 2715 +++++++++++- colorSchemes/src/colorSchemes/monokai.xml | 3579 +++++++++++----- .../{Railscasts.xml => rails_casts.xml} | 2008 ++++++--- colorSchemes/src/colorSchemes/twilight.xml | 3751 +++++++++++------ colorSchemes/src/colorSchemes/vibrant_ink.xml | 2737 ++++++++++++ 7 files changed, 15810 insertions(+), 3942 deletions(-) rename colorSchemes/src/colorSchemes/{vibrantInk.xml => all_hallows_eve.xml} (55%) create mode 100644 colorSchemes/src/colorSchemes/blackboard.xml rename colorSchemes/src/colorSchemes/{Railscasts.xml => rails_casts.xml} (67%) create mode 100644 colorSchemes/src/colorSchemes/vibrant_ink.xml diff --git a/colorSchemes/src/colorSchemes/vibrantInk.xml b/colorSchemes/src/colorSchemes/all_hallows_eve.xml similarity index 55% rename from colorSchemes/src/colorSchemes/vibrantInk.xml rename to colorSchemes/src/colorSchemes/all_hallows_eve.xml index 2839cfd8cf73..6cdc70be80c9 100644 --- a/colorSchemes/src/colorSchemes/vibrantInk.xml +++ b/colorSchemes/src/colorSchemes/all_hallows_eve.xml @@ -1,38 +1,40 @@ - - + diff --git a/colorSchemes/src/colorSchemes/blackboard.xml b/colorSchemes/src/colorSchemes/blackboard.xml new file mode 100644 index 000000000000..1363807612f8 --- /dev/null +++ b/colorSchemes/src/colorSchemes/blackboard.xml @@ -0,0 +1,2707 @@ + + + + diff --git a/colorSchemes/src/colorSchemes/cobalt.xml b/colorSchemes/src/colorSchemes/cobalt.xml index 2c7d36906835..60ff66639504 100644 --- a/colorSchemes/src/colorSchemes/cobalt.xml +++ b/colorSchemes/src/colorSchemes/cobalt.xml @@ -1,29 +1,470 @@ - + + diff --git a/colorSchemes/src/colorSchemes/Railscasts.xml b/colorSchemes/src/colorSchemes/rails_casts.xml similarity index 67% rename from colorSchemes/src/colorSchemes/Railscasts.xml rename to colorSchemes/src/colorSchemes/rails_casts.xml index 15ab83edf265..5242e0b0c98a 100644 --- a/colorSchemes/src/colorSchemes/Railscasts.xml +++ b/colorSchemes/src/colorSchemes/rails_casts.xml @@ -1,102 +1,118 @@ - - + + diff --git a/colorSchemes/src/colorSchemes/vibrant_ink.xml b/colorSchemes/src/colorSchemes/vibrant_ink.xml new file mode 100644 index 000000000000..32ce783288f0 --- /dev/null +++ b/colorSchemes/src/colorSchemes/vibrant_ink.xml @@ -0,0 +1,2737 @@ + + + + From 5d8b772f2186bdbd9665be6ba5f2f328fa0bc87c Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Sat, 3 Sep 2011 18:20:14 +0400 Subject: [PATCH 09/26] fixed [IDEA-68240] Default color scheme corruption while editing custom TODO element's setting --- .../lang-api/src/com/intellij/psi/search/TodoAttributes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-api/src/com/intellij/psi/search/TodoAttributes.java b/platform/lang-api/src/com/intellij/psi/search/TodoAttributes.java index 08c9d17d9fa0..7f7b74f6d08c 100644 --- a/platform/lang-api/src/com/intellij/psi/search/TodoAttributes.java +++ b/platform/lang-api/src/com/intellij/psi/search/TodoAttributes.java @@ -79,7 +79,7 @@ public class TodoAttributes implements JDOMExternalizable, Cloneable { } private static TextAttributes getDefaultColorSchemeTextAttributes() { - return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.TODO_DEFAULT_ATTRIBUTES); + return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.TODO_DEFAULT_ATTRIBUTES).clone(); } public void readExternal(Element element) throws InvalidDataException { From 38f541e7f855d096a177f1366d2255137262a813 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Sat, 3 Sep 2011 22:30:48 +0400 Subject: [PATCH 10/26] fixed [IDEA-62275] In dumb mode check whether TestLocationProvider implements DumbAware --- .../execution/testframework/sm/FileUrlProvider.java | 3 ++- .../execution/testframework/sm/runner/SMTestProxy.java | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/FileUrlProvider.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/FileUrlProvider.java index 33764f466176..a10a86bffcbc 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/FileUrlProvider.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/FileUrlProvider.java @@ -19,6 +19,7 @@ import com.intellij.execution.Location; import com.intellij.execution.PsiLocation; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Document; +import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.VirtualFile; @@ -36,7 +37,7 @@ import java.util.List; /** * @author Roman Chernyatchik */ -public class FileUrlProvider implements TestLocationProvider { +public class FileUrlProvider implements TestLocationProvider, DumbAware { private static final Logger LOG = Logger.getInstance(FileUrlProvider.class.getName()); @NonNls private static final String FILE_PROTOCOL_ID = "file"; diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java index 5a896c2db8d1..e6ecb19be407 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java @@ -28,6 +28,7 @@ import com.intellij.execution.ui.ConsoleViewContentType; import com.intellij.ide.util.EditSourceUtil; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.extensions.Extensions; +import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Key; import com.intellij.pom.Navigatable; @@ -180,6 +181,8 @@ public class SMTestProxy extends AbstractTestProxy { final String protocolId = TestsLocationProviderUtil.extractProtocol(myLocationUrl); final String path = TestsLocationProviderUtil.extractPath(myLocationUrl); + final boolean isDumbMode = DumbService.isDumb(project); + if (protocolId != null && path != null) { if (myLocator != null) { List locations = myLocator.getLocation(protocolId, path, project); @@ -188,6 +191,9 @@ public class SMTestProxy extends AbstractTestProxy { } } for (TestLocationProvider provider : Extensions.getExtensions(TestLocationProvider.EP_NAME)) { + if (isDumbMode && !DumbService.isDumbAware(provider)) { + continue; + } final List locations = provider.getLocation(protocolId, path, project); if (!locations.isEmpty()) { return locations.iterator().next(); From 6814b8fe6d4b46c4eee1279e4c1558c29a003a84 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Sun, 4 Sep 2011 14:57:14 +0400 Subject: [PATCH 11/26] colors schemes were regenerated : html/xml attrs names, ruby strings colors were fixed --- .../src/colorSchemes/all_hallows_eve.xml | 1964 +++------------ colorSchemes/src/colorSchemes/blackboard.xml | 1994 +++------------ colorSchemes/src/colorSchemes/cobalt.xml | 2143 +++-------------- colorSchemes/src/colorSchemes/monokai.xml | 2006 ++++----------- colorSchemes/src/colorSchemes/rails_casts.xml | 1962 +++------------ colorSchemes/src/colorSchemes/twilight.xml | 1954 +++------------ colorSchemes/src/colorSchemes/vibrant_ink.xml | 1941 +++------------ 7 files changed, 2644 insertions(+), 11320 deletions(-) diff --git a/colorSchemes/src/colorSchemes/all_hallows_eve.xml b/colorSchemes/src/colorSchemes/all_hallows_eve.xml index 6cdc70be80c9..9cc4c8c12646 100644 --- a/colorSchemes/src/colorSchemes/all_hallows_eve.xml +++ b/colorSchemes/src/colorSchemes/all_hallows_eve.xml @@ -1,745 +1,433 @@ - - + - diff --git a/colorSchemes/src/colorSchemes/blackboard.xml b/colorSchemes/src/colorSchemes/blackboard.xml index 1363807612f8..0cb85d5f8433 100644 --- a/colorSchemes/src/colorSchemes/blackboard.xml +++ b/colorSchemes/src/colorSchemes/blackboard.xml @@ -1,755 +1,435 @@ - - + - diff --git a/colorSchemes/src/colorSchemes/cobalt.xml b/colorSchemes/src/colorSchemes/cobalt.xml index 60ff66639504..46defca41d1d 100644 --- a/colorSchemes/src/colorSchemes/cobalt.xml +++ b/colorSchemes/src/colorSchemes/cobalt.xml @@ -1,865 +1,470 @@ - - + - diff --git a/colorSchemes/src/colorSchemes/monokai.xml b/colorSchemes/src/colorSchemes/monokai.xml index 253cdde1d632..e31618d8a0e6 100644 --- a/colorSchemes/src/colorSchemes/monokai.xml +++ b/colorSchemes/src/colorSchemes/monokai.xml @@ -1,755 +1,444 @@ - - + - diff --git a/colorSchemes/src/colorSchemes/rails_casts.xml b/colorSchemes/src/colorSchemes/rails_casts.xml index 5242e0b0c98a..ef0ea4c9b2f4 100644 --- a/colorSchemes/src/colorSchemes/rails_casts.xml +++ b/colorSchemes/src/colorSchemes/rails_casts.xml @@ -1,765 +1,447 @@ - - + - diff --git a/colorSchemes/src/colorSchemes/twilight.xml b/colorSchemes/src/colorSchemes/twilight.xml index da08be8ca47a..2e4e84911910 100644 --- a/colorSchemes/src/colorSchemes/twilight.xml +++ b/colorSchemes/src/colorSchemes/twilight.xml @@ -1,775 +1,446 @@ - - + - diff --git a/colorSchemes/src/colorSchemes/vibrant_ink.xml b/colorSchemes/src/colorSchemes/vibrant_ink.xml index 32ce783288f0..46f73db32ea6 100644 --- a/colorSchemes/src/colorSchemes/vibrant_ink.xml +++ b/colorSchemes/src/colorSchemes/vibrant_ink.xml @@ -1,775 +1,441 @@ - - + - From bfee8a5dda36e67197f0d49638e6980ee9415f86 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Mon, 5 Sep 2011 15:42:15 +0400 Subject: [PATCH 12/26] color schemes where updated - ANSI colors settings fixed --- .../src/colorSchemes/all_hallows_eve.xml | 53 +++++++++++--- colorSchemes/src/colorSchemes/blackboard.xml | 47 +++++++++++-- colorSchemes/src/colorSchemes/cobalt.xml | 45 ++++++++++-- colorSchemes/src/colorSchemes/monokai.xml | 51 +++++++++++--- colorSchemes/src/colorSchemes/rails_casts.xml | 47 +++++++++++-- colorSchemes/src/colorSchemes/twilight.xml | 47 +++++++++++-- colorSchemes/src/colorSchemes/vibrant_ink.xml | 55 ++++++++++++--- .../src/DefaultColorSchemesManager.xml | 70 +++++++++++++++++++ 8 files changed, 365 insertions(+), 50 deletions(-) diff --git a/colorSchemes/src/colorSchemes/all_hallows_eve.xml b/colorSchemes/src/colorSchemes/all_hallows_eve.xml index 9cc4c8c12646..667867a556ca 100644 --- a/colorSchemes/src/colorSchemes/all_hallows_eve.xml +++ b/colorSchemes/src/colorSchemes/all_hallows_eve.xml @@ -211,16 +211,46 @@ + + + + + + + @@ -306,7 +341,7 @@ @@ -405,7 +440,7 @@ @@ -427,7 +462,7 @@ @@ -1412,7 +1447,7 @@ diff --git a/colorSchemes/src/colorSchemes/blackboard.xml b/colorSchemes/src/colorSchemes/blackboard.xml index 0cb85d5f8433..32018be1399d 100644 --- a/colorSchemes/src/colorSchemes/blackboard.xml +++ b/colorSchemes/src/colorSchemes/blackboard.xml @@ -213,16 +213,46 @@ + + + + + + + @@ -307,7 +342,7 @@ @@ -429,7 +464,7 @@ + + + + + + + @@ -339,7 +374,7 @@ @@ -464,7 +499,7 @@ + + + + + + + @@ -315,7 +350,7 @@ @@ -416,7 +451,7 @@ @@ -438,7 +473,7 @@ @@ -1409,7 +1444,7 @@ diff --git a/colorSchemes/src/colorSchemes/rails_casts.xml b/colorSchemes/src/colorSchemes/rails_casts.xml index ef0ea4c9b2f4..bd9fdb48c809 100644 --- a/colorSchemes/src/colorSchemes/rails_casts.xml +++ b/colorSchemes/src/colorSchemes/rails_casts.xml @@ -220,16 +220,46 @@ + + + + + + + @@ -306,7 +341,7 @@ @@ -318,7 +353,7 @@ @@ -441,7 +476,7 @@ + + + + + + + @@ -317,7 +352,7 @@ @@ -440,7 +475,7 @@ + + + + + + + @@ -295,13 +330,13 @@ @@ -313,7 +348,7 @@ @@ -413,7 +448,7 @@ @@ -435,7 +470,7 @@ @@ -1427,7 +1462,7 @@ diff --git a/platform/platform-resources/src/DefaultColorSchemesManager.xml b/platform/platform-resources/src/DefaultColorSchemesManager.xml index 1499d4e0b511..45616099a0c3 100644 --- a/platform/platform-resources/src/DefaultColorSchemesManager.xml +++ b/platform/platform-resources/src/DefaultColorSchemesManager.xml @@ -1175,6 +1175,76 @@ + + + + + + + From 17e4296600f888d550dfe8e797b67b50216baf83 Mon Sep 17 00:00:00 2001 From: Roman Chernyatchik Date: Mon, 5 Sep 2011 21:27:31 +0400 Subject: [PATCH 13/26] 1. Fixed [RUBY-9319] Ruby injections look weird in Twilight color scheme -- converter updated: opacity support for scope colors --- colorSchemes/src/colorSchemes/twilight.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colorSchemes/src/colorSchemes/twilight.xml b/colorSchemes/src/colorSchemes/twilight.xml index ed3491001ec7..7cee3379f8ad 100644 --- a/colorSchemes/src/colorSchemes/twilight.xml +++ b/colorSchemes/src/colorSchemes/twilight.xml @@ -1154,7 +1154,7 @@