Commit Graph
97022 Commits
Author SHA1 Message Date
peter 07e0385eca local variables should be preferred over factory methods no matter the name end matching degree 2013-03-10 12:07:25 +01:00
peter bbfffa7865 allow empty weigher arrays 2013-03-10 12:07:24 +01:00
peter 34ca5e4467 don't depend on prefix in java completion sorting 2013-03-10 12:07:24 +01:00
Kirill Likhodedov 618c1cdaf8 [git] IDEA-101668 Fix Git log for detached HEAD
`git log --branches --tags --remotes` doesn't count the current HEAD
if it is detached. To fix it, show the log from the HEAD:
`git log HEAD --branches --tags --remotes`
2013-03-09 21:27:47 +04:00
Kirill Likhodedov 0972978ca8 [git] Pull: remove fetch+merge hack used for JGit
JGit is no more used for HTTP operations.

This fixes IDEA-101902: git pull will be called only for the
chosen remote.
2013-03-09 21:15:54 +04:00
Kirill Likhodedov b200615c29 [git] Push dialog: for new branch show commits which are not pushed yet
Show all commits that are in the given branch,
but not in any remote branches in the given remote:
`git log new_branch --not --remotes=origin`
This fixes IDEA-83227.
2013-03-09 21:15:53 +04:00
Eugene Zhuravlev 85074a96cf external build: configurable log dir; build log default location moved under system/log directory 2013-03-09 17:54:21 +01:00
Kirill Likhodedov 51698ad84d [git] Disable JGit usage for HTTP connections
* Keep the code under a Java system property until native Git support
  for HTTP connection is tested.
* Remove NetrcData since it is not needed anymore.
2013-03-09 20:49:19 +04:00
Kirill Likhodedov 93ac1236e1 [git] Set minimal supported Git version to 1.7.1.1
This one is the first Git version which supports GIT_ASKPASS.
2013-03-09 20:49:16 +04:00
Kirill Likhodedov a1c70f5c2e [git] Better "unsupported Git version" notification
* Improve the notification format.
* Add links to the Settings and to git-scm.com.
* Fix notification group: it is important one.
2013-03-09 20:49:15 +04:00
Kirill Likhodedov 296555274e [git] Implement ability to use the native Git for HTTP(S) connection
Use native command line Git for HTTP connections via GIT_ASKPASS
environment variable, to be able to get rid of the JGit library.

Method description.
The communication logic is very similar to what is already
implemented for SSH connections.
* Define the GIT_ASKPASS environment variable pointing to a script
  generated by the ScriptGenerator.
* When Git requests username and/or password for an HTTP connection,
  it calls the script defined in GIT_ASKPASS.
* The script starts the Java application GitAskPassApp and passes the
  Git request to it as command line arguments. Git process waits for the
  app to return user credentials to the app's stdout.
* GitAskPassApp requests the credentials via XML RPC from the main
  IDEA instance by calling correspondent methods of the
  GitAskPassXmlRpcHandler.
* Before Git command is called, a GitHttpAuthenticator is registered in
  the GitHttpAuthService to receive any XML RPC requests about HTTP
  authentication.
* Once the XML RPC request is received, the GitHttpAuthenticator
  either takes the password from the password safe, or shows a prompt
  to the user in a modal dialog.
* Response is provided back to the GitAskPassXmlRpcClient, which returns
  it to the GitAskPassApp, which in turn returns it to the Git process.

GitHttpAuthenticator details:
* The key for password safe is url + login (see makeKey()).
* If password is asked, then the URL contains the login inside URL,
  and the key is ready.
* If username is asked the key is constructed and is searched for in
  the settings (GitRememberedInputs).
* If no username is specified in the URL, Git queries for the username
  and for the password consecutively. In this case to avoid showing
  dialogs twice, ask for both credentials at once (AuthDialog) and
  remember the password to provide it to the Git process during the next
  request.
* We can't store the credentials enter by user in the settings and
  the password safe right after they have been entered, because user
  can enter incorrect credentials.
  Therefore, listen to the Git process output
  (GitHandler#addAuthListener) and analyze whether authentication
  was successful or failed. If it was successful, ask
  GitHttpAuthenticator to remember the correct credentials, otherwise
  forget them (since they could have been taken from the password safe,
  not from the user).
* Because of this, all other data (url and login, or url with login
  if the password was requested) is saved to the instance fields.

This change fixes all issues opened because of JGit problems:
* authorization issues: IDEA-97178, IDEA-102201, IDEA-100617,
  IDEA-98189
* connection and proxy issues: IDEA-83984, IDEA-92519, IDEA-96205
* IDEA-77411 self-signed server certificates (although we can provide
  more user-friendliness by proposing to set http.sslVerify to false
  in the UI).
* IDEA-100096 client SSL certificates.
* other: IDEA-78744, IDEA-77992, IDEA-76982, IDEA-78310, IDEA-86083,
  IDEA-92163, IDEA-94167, IDEA-99159, IDEA-100097

Known drawback:
No retry. If user enters incorrect credentials,
he will see the failure notification and will need start operation again
to supply correct data this time.
2013-03-09 20:49:12 +04:00
Kirill Likhodedov bc96127b57 [password] Preselect "remember password" in password prompt dialog
Users usually want to remember password.
If not, they can turn the checkbox off.
2013-03-09 20:49:10 +04:00
Kirill Likhodedov b489f0e08b [git] Refactor git-ssh architecture: generify
Rename GitSSHService to GitXmlRpcHandlerService and let it be the base
abstract class parametrized by the actual GUI handler.
Move SSH-specific code to the first implementation: GitXmlRpcSshService.
2013-03-09 20:49:08 +04:00
Kirill Likhodedov cd9ebaa807 [git] Refactor-simplify git-ssh architecture
Remove one more abstraction: GitSSHService.Handler interface.
Move some javadocs to the only implementation: GitSSHGUIHandler.
2013-03-09 20:49:06 +04:00
Kirill Likhodedov 978e16ba02 [git] Refactor-simplify git-ssh architecture
Remove GitSSHIdeaService and move everything to GitSSHService.
There are no other implementations, and none is planned.
2013-03-09 20:49:04 +04:00
Kirill Likhodedov 553d2bd55c [git] Detect remote protocol from the url
* Clone, fetch and ls-remote are trivial: just pass the url parameter.
* Pull: modify the method signature, since it can return pull or merge
  handler depending on the situation. For merge url is not needed.
* Standard Push (GitPusher):
  - simplify the logic by taking the first url
    instead of iterating over all of them,
    because we don't support pushing to several urls very well anyway.
  - report error if there are no push urls: GitPusher shouldn't be
    called in this case at all.
* Push when remote branch is deleted (GitDeleteRemoteBranchOperation):
  same as for the standard push: take the first url,
  report error if there are no urls defined for the remote.
2013-03-09 20:49:03 +04:00
Kirill Likhodedov b2b8f2f957 [git] Change GitHandler#setNoSSH() to setRemoteProtocol()
* Set remote protocol to null by default => safely remove all 82 calls
  to setNoSSH.
* For remote operations (pull, push, fetch and clone) set the protocol
  to SSH (HTTP is handled separately for now).

This is a preparation for working with HTTP via native Git.
2013-03-09 20:49:00 +04:00
Kirill Likhodedov eb3814b0e6 [git] Fix javadocs
* Remove obvious javadocs.
* Move lockingCommand javadoc to the public method.
2013-03-09 20:48:56 +04:00
peter b64e389a31 don't clear dom/sem on low-memory events when it's needed for another dom/sem. Otherwise all the needed elements will be calculated and immediately cleared forever. OOM might be a friendlier alternative in this case (IDEA-102582, IDEA-97337) 2013-03-09 17:47:02 +01:00
peter 10b3155ce2 there's no need to load dom stubs for already parsed XML file (IDEA-102582) 2013-03-09 17:23:28 +01:00
Konstantin Bulenkov a902db5128 ant icons update 2013-03-09 17:01:25 +01:00
irengrig 72d6ecd872 1 modified error message so that it mentions SSLv3 and TLSv1
2 open popup message only for frame, not when in dialogs
IDEA-102758 Subversion: SSL: Repeating error when specifying wrong SSL protocol
2013-03-09 13:51:51 +04:00
irengrig 7a4ef64d2d Merge remote branch 'origin/master' 2013-03-09 11:44:22 +04:00
irengrig dfbc1c8f72 if throwable is of class CertificateRejected... , only log a message (in normal conditions, user already know he had rejected the certificate, or this is "passive" (silent) call)
IDEA-102664 Subversion: avoid error that appears on opening project associated with https repository
2013-03-09 11:43:26 +04:00
Dmitry Jemerov 794d4944d1 fix code review notes by delaying creation of second instance processing thread; fix confused variables in message 2013-03-08 21:19:15 +01:00
Yann Cébron 4f916577e7 CR-IC-320 follow-up to 8ac3b41, do not skip when value= null 2013-03-08 17:49:36 +01:00
nik 2ef907c170 jps: load path variables from config file 2013-03-08 19:42:55 +04:00
nik a59cf759f1 don't save application settings before external build in tests as necessary settings are saved in CompilerTestUtil 2013-03-08 19:42:54 +04:00
Dmitry Trofimov 89952096a1 Merge remote-tracking branch 'origin/master' 2013-03-08 16:23:28 +01:00
nik f52978b04e jps model: added API to save global settings 2013-03-08 17:23:04 +04:00
Dmitry Trofimov 1cf0875ef4 Merge remote-tracking branch 'origin/master' 2013-03-08 14:10:24 +01:00
Bas Leijdekkers 38226e6ab4 IDEA-72636 ("Log statement not guarded by log condition" inspection fails on custom logging methods with method signatures different from log.debug(String)) 2013-03-08 12:49:40 +01:00
Bas Leijdekkers d75f9e6b25 IDEA-72638 ("Log statement not guarded by log condition" inspection should offer option to flag log statements with constant arguments for coding convention enforcement) 2013-03-08 12:26:07 +01:00
Bas Leijdekkers fe8f82782a IDEA-94436 (Class does not overwrite toString() method shall have an option to ignore inner classes) 2013-03-08 11:59:23 +01:00
nik 282b5e2fc0 cleanup 2013-03-08 14:35:27 +04:00
Bas Leijdekkers 19803e7436 IDEA-97353 (Method can be variable arity method shall have an option to be ignored on methods implementing/overriding another method) 2013-03-08 11:31:32 +01:00
nik 02ee0fece5 facets removed from JPS model 2013-03-08 14:28:04 +04:00
nik 7d68d0532d cleanup 2013-03-08 14:25:16 +04:00
nik 37430f2d70 jps model: added api for loading model 2013-03-08 14:16:46 +04:00
Konstantin Bulenkov 1c7e0239c1 retina icons 2013-03-08 10:41:43 +01:00
Konstantin Bulenkov b343497c8a debugger icons update 2013-03-08 10:41:10 +01:00
Konstantin Bulenkov 79340453f8 copy to should be the first option after merge 2013-03-08 10:40:16 +01:00
Yann Cébron 8ac3b416f9 XmlAttribute#getValue|getDisplayValue are @Nullable: fix some potential NPEs 2013-03-08 08:58:46 +01:00
Yann Cébron 4754c9007f XmlAttribute#getValue|getDisplayValue are @Nullable 2013-03-08 08:58:23 +01:00
Yann Cébron 32d320aac7 EA-40210 - NPE: XmlUtil.findNamespacePrefixByURI 2013-03-08 08:53:44 +01:00
peter 8ef855248f CodeCompletionHandlerBase: extract some methods 2013-03-07 21:25:28 +01:00
peter 0bae9a22f6 CodeCompletionHandlerBase: minor 2013-03-07 21:22:02 +01:00
peter 7e804ced9e CodeCompletionHandlerBase: extract some methods 2013-03-07 21:18:48 +01:00
peter 5f771a3bf3 be prepared to SOE in CompositeElement.diagnoseTextInconsistency (EA-39738) 2013-03-07 21:18:48 +01:00
peter 9468543033 diagnose different control flows in different passes (EA-28732) 2013-03-07 21:18:47 +01:00