summaryrefslogtreecommitdiff
path: root/java/java-tests
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-04-17 08:39:25 -0700
committerTor Norbye <tnorbye@google.com>2014-04-17 08:40:45 -0700
commit92584642bab4fdb27ac1067c124f4636be762978 (patch)
treea2faac8bd4d2a79d4bde5a9eaf58ae75f91b2ed4 /java/java-tests
parenta3e39abd38575b02d52f05e041d797023938b6d6 (diff)
downloadidea-92584642bab4fdb27ac1067c124f4636be762978.tar.gz
Snapshot 117b3dbedca758fa08dd37d4a36cf4a2320fae03 from idea/136.1685 of git://git.jetbrains.org/idea/community.git
117b3db: IDEA-123994 Java 8 compact profiles support fbeda14: WEB-11238 Live Console: avoid overlapping for the error and link to the file 555bcd7: WEB-11485 Debug Console missing horizontal scrollbar WEB-11238 Live Console: avoid overlapping for the error and link to the file (issue still actual in case of softwrap) 96b3c3d: move LineSeparatorPainter up 3171d15: create from sources: setup default (web) module if nothing special is detected (IDEA-91446, ZD-27093) cb43848: testdata fixed 8cd1ee6: remove assignment: fix for assignment nested in expression, not statement (IDEA-123903) 14718472: testdata for IDEA-79251 953109a: fix file name casing 36db24a: fix not-disposed errors on quit 610d8f1: cleanup f774ed3: dfa: reuse free eq class indices 81ae814: IDEA-123959 cannot create a new file 8718f8b: replace DfaMemoryStateImpl.areEquivalent with a more efficient version requiring less eq class traversals (IDEA-123826) 0b26e18: EA-55830 - PIEAE: PsiUtilCore.ensureValid e512a2f: EA-55951 - CCE: StreamApiMigrationInspection$ReplaceWithForeachCallFix.applyFix e7b3efb: EA-55962 - CCE: DefUseInspection$RemoveInitializerFix.sideEffectAwareRemove 0de9b5a: Start plugins wizard #15 b62e353: Start plugins wizard #14 1d23857: Start plugins wizard #13 199e9d8: generate visibility setting for create from usage, generate getter/setter/constructor (IDEA-120662, IDEA-64613, IDEA-122025) a850470: testng/junit: do not start pattern evaluation if one element is selected 9fda587: extract variable: ensure replace all occurrences survive parenthesis around value (IDEA-122041) 51f15b7: ignore methods return Void (IDEA-124010) d8a1d98: [vcs] IDEA-67409 Support Home/End keys in the Log. c854a5c: Revert "[vcs] IDEA-67409 Support Home/End keys in the Log." 19714f2: closure recursion test f13e5bf: IDEA-123484 abstract modifier for trait methods, some code duplicates removed bc38735: IDEA-123484 trait fields and properties d110706: cleanup 91085d8: IDEA-123484 anonymous from traits are not allowed c958da2: IDEA-123484 highlighting for extends list of traits, inc/dec on trait field c73b8b2: IDEA-123484 modifier inferring for trait members 3859660: IDEA-123484 initial. lexer, parser and psi for traits 1000337: extra code 7b25e0e: some overrides 15f3266: console leak fixed d385ea2: EA-31437,IDEA-121511 - assert: DocumentFoldingInfo.writeExternal 8f8d834: sometimes distraction free mode stays forever 439f50d: Test fixed (rt.jar on Apple JRE, again) 4306f24: [vcs] IDEA-67409 Support Home/End keys in the Log. 475c2be: fix a copy paste misprint 7e742e3: [git] IDEA-98189 Retry up to 3 times if authentication failed ac764f5: [git] better error text 7536b91: [git] remove an unused test class ecc84d5: [git] Use GitImpl for all remote commands 85cad87: [git] IDEA-98189 Forget incorrect password ccc5043: [git] refactor authenticator fffcd49: Add "try" live postfix template 5686958: Start plugins wizard #12 8bad783: jb v8 debug protocol: function scopes 77256b2: check extra assumptions ceb0932: typed field instead of Object, cleanup 74bfdbf: simplify, introduce runWriteCommandAction(ThrowableComputable) 75a0914: more readable temp file names: unitTest_defaultCharset_9 instead of unitTest234234234234234unitTest_213424 33980d3: re-detect file type on contents change 32f7b42: Cleanup (typos) 11fbadc: Cleanup (outdated comment; pointless assertion) 6495cfe: IDEA-123354 (content-based .jar check replaced with file type-based) b8493b6: method refs/lambdas: apply ground types for completion 62db5ce: EA-55747 - AIOOBE: ControlFlowUtil.getUsedVariables 6e61173: cancel inspections progress if view was closed 3bedbab: EA-55910 - CCE: JavaDocInfoGenerator.generateValue af91351: try to pass self name as default value during create parameter from usage (IDEA-123780) 89dc56b: test fix 81230c2: Make per language stack trace for InitialInfoBuilder (formatter) errors to separate reports in EA [CR-IC-5164] 29f708c: EnterInStringLiteralHandler should use language-specific option for operation sign (fixes IDEA-114783), [CR-IC-5159] e2e37ae: External system: source package prefix support added 685f753: External system: source package prefix support added 998ca88: disable test in headless environment, as it fails there b90a38f: EA-31437,IDEA-121511 - assert: DocumentFoldingInfo.writeExternal 6f86e2d: continue WEB-11784 slow nodejs debug: initial done properties loading 12d83e6: continue WEB-11784 slow nodejs debug: done frames loading a9dd7ee: allow TTL customization 28edb41: fix quickfix on last Assert usage and static import 2330050: trigram builder builds trigrams over "identifiers" 4622ff0: IDEA-122202 Mercurial: on new repository creating by EnableVCS action it is impossible to work with it until project reopening ab56115: inline local: do not try to delete declaration if this only; do not pretend to delete this when no reference selected d4c2db8: new inference: eliminate wildcards elimination eef0d12: new inference: eliminate wildcards at top level as they can't appear in type elements 0f8aed0: new inference: eliminate wildcards elimination 317d279: new inference: no need to eliminate wildcards as they are not used anyway 82fd80e: new inference: perform reduction and incorporation in one step db79a6f: disabled incompatible plugins NodeJS (136.1205), Php (134.1456), JSTestDriver (136.1141) ab4aada: [git] Simplify packed-refs line parsing a bit. bf5c358: [git] Refactor GitRepositoryReader 06a2de7: [vcs] generify a method 42e3586: test dependency added 7c56b9f: interruptibility 8af01dc: removed dependency on lang-api 1e2959c: implement LocalQuickFix interface in addition to IntentionAction f74d26f: AppCode: even more consistent Xcode keymap e98fd4d: continue WEB-11784 slow nodejs debug: continue frames loading b48e3e0: AppCode: more consistent Xcode keymap + keymap test 105221d: Keymap: 'IntelliJ IDEA Classic' schemes on mac are shown as 'IntelliJ IDEA Classic (Windows)' and 'IntelliJ IDEA Classic (OS X)' b6d8e90: Platform: per-IDE keymap tests 97228b6: Keymap: Console.SplitLine uses shortcut of generic SplitLine 47438f5: WEB-11877 Emmet transforms escaped $ to 0 (zero) 7d8ab23: IDEA-123331 IOOBException if cancel "paths affected in revision:..." process fixed 86357a2: remote-servers-agent-rt moved to platform 01c7467: include remote-servers modules to platform and include remote-servers-git to git plugin for small IDEs (IDEA-123977) ec2a990: do not delete output files corresponding to non-existing sources, if these outputs are already associated with existing sources from other modules that have been already compiled: part 2: correctly clean the mapping when removing outputs corresponding to changed sources 5609d39: new jb-v8-debugger support: fix bootstrap 116a0fc: Test fix (rt.jar path on Apple JRE) fb0efdd: EA-55889 - NPE: NavBarRootPaneExtension$.updateUI fee6711: avoid too many "invalid jar" 3b24c80: performance: DCL bdce1ee: get rid of pointless autoboxing 3ec7789: NotNull d29890e: NPE a077d24: tests 3e36dd7: IDEA-121445 150e69e: cleanup f0b0f50: Merge remote-tracking branch 'origin/master' f6c9348: IDEA-123912 Expression Evaluation does not have a default key binding 71800cf: IDEA-123691 Minor project wizard edits: Java (SE) category 59e7e94: Keymaps: * 'reset' action for each binding (IDEA-90069) * restoring selection on keymap filtering in UI b05305e: Keymaps: * correctly handle bound action overriding in both parent and child keymaps * show bound actions in the UI when no parent action present d21d35d: cloud detection in 'import project': don't access VFS if it isn't necessary 9d3b463: join declaration and assignment (IDEA-92226; IDEA-123689) b708f20: remove unused assignment: do not move the transformed statement up as it could change the semantic and is not evident (IDEA-123841) 36771d7: eclipse: restore root path from .classpath or do not create module at all (IDEA-123946) df1105f: do not write new setting to profile if it has not changed from the default value 71376ca: if there are any changed files after no-op UnindexedFilesUpdater, index them in the same dumb mode 8352036: Storyboard format db886f9: EA-54870 (read lock) 3afd5e77: proper reading of compressed data 55a791b: use custom InputsIndexExternalizer during snapshot indexing fee336b: ability to supply custom input index + TrigramIndex custom input index implementation 8887a5a: ability to use supplied bytearray fcb939f: introduced / used ThreadLocalCachedByteArray c02d91b: continue getFrame — continue WEB-11784 slow nodejs debug 8195023: switch selector error message (IDEA-123937) 964735c: compilation fix 44e9fff: compose scopes intersection when filter by file type is on (IDEA-119595) 36073fa: unwrap anonymous: replace return statements (IDEA-119558) 7a90a13: unwrap anonymous: do not remove declaration - try to replace initialization only (IDEA-47218) f20f1bb: redundant cast: nested casts with outer primitive (IDEA-119857) f3bc48e: no need in URLs? during description composition (IDEA-119992) e5a6475: allow to inline this only variable (IDEA-120041) c6828ca: parameter hides member: accept setters returning this (IDEA-120214) f4a2254: Try to download JIRA issue in separate request, if query looks like ID. fddf4bd: IDEA-123851 Link in Event Log seems to be not working correctly 64fdf83: Redmine REST API has no NATIVE_SEARCH support 22801d8: if there are any changed files after UnindexedFilesUpdater, index them in the same dumb mode 30f0b46: Don't repeat exception message twice c32ada6: Cleanup (formatting; immutability) 12e7a78: IDEA-123825 - Git Clouds detect Git remotes - OpenShift and generic f02a2d7: action registered in plugin.xml should always override update() 19140e2: Correctly extract project name from Redmine task 130eeba: IDEA-110736 Java autoformatter adds brackets when it shoulnd't, reverted fix for IDEA-87969 e8b5589: Merge branch 'svn_18_3' f4f3750: Mark getter for cached projects as @Transient to prevent serialization 2878862: EA-55850 (diagnostic) dc525c4: svn: Disabled "Save credentials" checkbox when requesting ssh credentials for command line (as ssh credentials caching is not supported by svn) ee24417: svn: Make ssh credentials be saved in memory by default for command line (like for other repository protocols and SVNKit) 099d86d: IDEA-123784 Do not treat "svn cat" output as binary for Unix - as currently separate error and output streams are not supported 880d0ef: Fix infinite loop in MavenProjectsTree.findRootProject when there is more than one level of aggregate POMs 0918676: External System: fix classpath for remote communication c8c92e9: IDEA-123691 Minor project wizard edits: more reliable sorting 886ea2c: Alex's fix about getting the physical path of a Gradle sub-project from a GradleBuild moved from Android plugin to Gradle plugin, see Change-Id: I2617fc929d18f23447d658ed2f4ae084b64847af and Ifa59c4810615fa27f5f8d5753bc89ea85374ff39 38abbe6: IDEA-118529 Mercurial (hg4idea) slow with IJ 13: workaround for processing hg ignored files 5b9b1f1: IDEA-82961 Mute breakpoints turns off when when start a new debug session - xdebugger fix 4005a3f: restore cashed argument types, not for overload resolution e0b83e7: new inference: remember mentioned constraints in set optimization 173e0be: new inference: optimization 3ffd666: IDEA-123886 (postpone .jar file type check until root creation) 9b747fd: Cleanup (JAR FS test moved to the flock) 76d2ce1: IDEA-123803 Popup goes behind its parent dialog for multyline editor 077fcc3: Platform: duplication spotted 9210149: WEB-11278 Bad performance expanding emmet cc4033e: Platform: do not prevent project files from being written (IDEA-123489, IDEA-123899) c8d9978: test finder: accept test classes from source roots 005dd85: Merge remote-tracking branch 'origin/master' 774099a: PyCharm 3.4 EAP logos. 555eac5: fix description file name 594451e: Package prefix support for external build systems 4cc78e5: IDEA-123477 Newly created Live Surround Template shows null in UI 155c419: IDEA-123344 Settings->File And Code Templates: group "Java EE" -> "Other"? b5df84e: IDEA-123850 incorrect "Condition is always false" warning in GemRequirementsChangeWatcher.updateAndAttach() c6c205d: refactor move inner for aspectJ 1977e48: escalate visibility for moved class (IDEA-119683) 288b080: test finder: accept potential tests as junit4 doesn't contain features of test until it contains test methods (IDEA-120123) 545753a: Cleanup (dependencies) 3194d62: IDEA-123674 (new "Usage of obsolete date-time api" inspection) 0e7c113: IDEA-123364 (Mismatched update of collections inspection no longer works) 4935bbc: do not delete output files corresponding to non-existing sources, if these outputs are already associated with existing sources from other modules that have been already compiled (example: moving some class to a dependent module with the same output root) 45cb352: IDEA-123773 The "Show Whitespaces" broken 0f869eb: schedule index rebuild after assertion 5c53c0d: better fix for IDEA-101698 & IDEA-123573 4c92967: Merge remote-tracking branch 'origin/master' d9fe702: push down: interface constants in class should appear with public-static-final (IDEA-123758) eb9a0ab: IDEA-123838 Iteration over 'keySet()' may be replaced with 'entrySet()' iteration quick fix produces wrong code 01b6c67: continue: speed up scope variables loading 62b2aa6: vfs: .jar validity check without opening ZipFile 99e72e6: IDEA-97465 Can't edit variable values in debugger with double click (F2 is required) - get back double click on empty space b19d559: IDEA-82961 Mute breakpoints turns off when when start a new debug session - better option name 42ede18: do not save new defaults bfac5ce: EA-55604 - assert: CopyFilesOrDirectoriesHandler.doCloneFile e672f58: WEB-11278 Bad performance expanding emmet 8d09421: Make CustomTemplateCallback immutable 99b97a5: Enable emmet completion in autopopup only b2bfd33: Merge remote-tracking branch 'origin/master' 0d66941: IDEA-123839: abstract&default combination 75f267c: testdata for IDEA-123848 5e4751f: testdata for IDEA-123869 675cd38: too aggressive: show popup when shift is pressed only 36466df: redundant type args: check also method reference qualifiers d84cfe4: method refs: do not loose information about type arguments given by ReferenceType in receiver a3348c5: lambda-> method ref: do not insert type args to reference type if they were inferred for lambda expression 08f5dad: show default tool name if XML contains empty group name 9e36eb1: catch CancellationException 86e8dd8: IDEA-123691 Minor project wizard edits: moving settings to the first page c67ada4d: Merge remote-tracking branch 'origin/master' 9ce01ad: Merge remote-tracking branch 'origin/master' aab16ff: IDEA-123867 Alignment between editor main are and gutter is lost while scrolling 8273986: IDEA-122292 Plugins list: checkbox missing padding/not usable 18f831a: Update Gitlab repository to use new API with server-side pagination 5d09a00: unused code cleanup ef53a1f: IDEA-111803 Breakpoint indicator on the right gutter - better fix 442ad37: minor cleanup 003db18: IDEA-123866 Map Help button of the Server Certificates page 49eaa91: [git] migrate GitRepositoryReaderTest to use JUnit Parametrized 90365a7: [git] more test data for GitRepositoryReaderTest 13eb661: [git] GitRepositoryReaderTest rewrite d89e625: [git] remove some weird test case b228286: Storyboard format 9cebef6: Request handlers in ResponseUtil don't throw JsonSyntaxException 86a4529: IDEA-123468 Correctly interpret id and iid as task's ID and task's number in Gitlab issues d2769ac: Refactor local task's project name and number to stored fields instead of computable properties, so they can be persisted in settings. 42c1335: correct font sizing when copying as HTML 471e1f9: IDEA-123820 Typeless Groovy catch parameter is Exception 91d363f: get rid of unnecessary invokeLater, check whether the module is disposed 0d2d5d3: less duplicated code 6b7e24c: IDEA-82961 Mute breakpoints turns off when when start a new debug session 8b124a1: use snapshot mapping for IdIndex / TrigramIndex for storing keys, right now switched on by the flag f8863d6: gradle: avoid distributions downloading in tests 3201ec7: init: speed up scope variables loading WEB-11784 slow nodejs debug 88b4b72: IDEA-111803 Breakpoint indicator on the right gutter a11b289: Merge remote-tracking branch 'origin/master' 09215e7: another attempt to reimplement IDEA-53663 397567d: tuple and map types improved. Used VolatileNotNullLazyValue instead of AtomicNotNullLazyValue to avoid deadlock Got rid of GrTupleTypeWithLazyValue. All the functionality is moved to GrTupleType 458ffce: known recursion manager prototype c8e27bf: ability to store PHM<Key,Integer> in more compact format 542bb74: run pushers in background ea048db: move more logic from CacheUpdateSession to CacheUpdateRunner 17ae7cb: renamed 18bec53: User/password dialog 7e74562: Merge remote-tracking branch 'origin/master' ee8955d: rerun failed tests: include all parameterized if one have failed (IDEA-121214) e1aa830: Platform: not-null SimpleProgramParameters.getEnv 025232d: IDEA-123818 Inspection "JUnit TestCase with non-trivial constructors" should not report error when used in a Parameterized test 925a186: copyright: allow to skip files with existing copyrights (IDEA-121912) 02724fc: try to start javafx without main (IDEA-101939) b824958: infer nullity: preview with ability to exclude some usages(IDEA-123110), remember "annotate local" checkbox 0b4a7df: setup javadoc url for javafx for java 7 as it was distributed without sources (IDEA-123290) c5de91a: tests: common TeamCity detector f6154f9: Cleanup (test) d35ae28: IDEA-122914 (unclosed ZipFile: JarFile usages) c6175fb: Storyboard format 7a23ecf: IDEA-123825 - Git Clouds: detect Git remotes 5c22e17: IDEA-91835 Debugger: Support caret at the 'View Text' control d51ce75: IDEA-51509 (IG: "String concatenation in i18n context" could suggest annotation quick fix for more variables) 6ff0475: IDEA-55853 Value displayed by custom type renderer is not copied to clipboard a7f8535: CheckingHandlerUtil.disableWhenDumb 617d0e0: GitChangeProviderTest: rethrow init exception aa81e27: GitChangeProviderTest, GitHistoryUtilsTest: prevent project leaks when failing c0e93d8: more cleanup in fixture-based test tearDown (e.g. local history) 6435abb: GitBranchWorkerTest: recover from setUp exceptions and prevent project leaks 8615c5f: ssl backend: sing outgoing traffic c807e88: IDEA-123691 Minor project wizard edits: project type list refactored a0e0851: IDEA-123803 Popup goes behind its parent dialog for multiline editor 7732839: IDEA-122856 Hard to catch layout delimiter in portrait mode 6f6e2c0: IDEA-123647 Mercurial merge fail 6f7f761: IDEA-123338 52951cf: allow to replace strings with non-final static 'constants' (IDEA-119480) 69f8d95: plugin updater: prefer plugins from hosts (IDEA-123350); ensure download progress is cancelable f2711a0: svn: Removed attempt to get "svn info" for HEAD revision in case of no local "svn info" found c4c0770: debugging OfflineModeTest 0d61815: versions for file type detectors + usage of them for file type index 312acda: Reimplement emmet completion with new CustomLiveTemplate api c96efa1: Disable autopopup in Xhtml 3e2b169: remove null icons 54afffa: platform: missed BindException bug info updated 83c4db5: platform: screen insets bug info updated e781fb9: use default tool name instead of blank 2579106: cleanup 84eb84b: remove null icon 9f55d61: fix Tab behaviour when there's selection (fixing test data) 546701d: Use SyncDateFormat in TaskUtil to make date parsing thread safe 2309f91: fix distraction-free extra size not being updated 1d0e6e8: get rid of intermediate markup representation (IDEA-67767) 19a7bdf: get rid of intermediate markup representation (IDEA-67767) 7aabb42: CR-IC-5125 (cleanup) f1907dd: IDEA-123710 Execute "lock" and "unlock" commands under terminal (if configured) as they require authentication 44dbc43: remove EditorChooseLookupItemAlways action efacd01: IDEA-123615 (Proxy settings are not exported) 3682593: Disable Basic Authentication in JIRA connector once JSESSIONID cookie was received to maintain session 33da443: Add some missing @Nullable/@NotNull annotation and JavaDoc in tasks API classes and concrete repositories 0c7f52f: Add @Nullable/@NotNull annotations to JIRA API classes 1b9067e: Add test of deadlock detection to CertificateTest c1b86a9: IDEA-123467 Add option in CertificateManager to accept all certificates automatically (not showing dialog) 75bf2d6d: Delayed requests to servers from Open Task popup using Alarm and FutureTask 527f08f9: fix Tab behaviour when there's selection (fixing test data) 76d86a5: initial WEB-4369 Support 'Jump to source' in JavaScript debuggers for object properties 4fa68a6: invokeOnEdt — always check passed condition ec8500e: empty tool name protection 3fe9754: notnull e6896ab: cleanup 699e022: make usable in upsource 944bdb4: cleanup 004ae7b: IDEA-90254 Feature suggestion: add names and groups to breakpoints - speed search a9c5e47: IDEA-90254 Feature suggestion: add names and groups to breakpoints be04021: Platform: meta-backspace remapped to Delete in Mac OS X 10.5+ keymap (IDEA-102003) b3c2e61: fix Tab behaviour when there's selection 390d102: IDEA-122405 Indent selection is disabled in IDEA 13.1 4961cdc: Fix tips. b9117c1: Fix editor leak in tests. 0a57685: Dispose correctly console view. 82b66b9: Print disposable stack trace in case of unreleased editors. 43c2a5f: Merge remote-tracking branch 'origin/master' 4efdfe2: Fixed path mappings for remote interpreters (PY-12550). f59ef7c: fix compilation for uncommitted code af109cb: Fix NPE on vagrant based interpreter creation (PY-12625). cae4610: extracted content hashing code into util class 6fb1478: introduced hasSnapshotMapping ce5cda1: extracted InputIndexDataExternalizer 4566871: do not switch scopes when focus is not requested/assume it is autoscroll from source (IDEA-123380) bdfa121: IDEA-123403 TestNG integration ignoring test classes without default constructor when using testng.@Guice 79a999d: don't use AtomicReferenceFieldUpdater — field name could be changed, use our util class 025e804: PasswordSafe: implement memory / master password timeouts 3a1128a: so long, and thanks for all the fish 8d7f369: Merge remote-tracking branch 'origin/master' 5329af0: remove links to old artwork 70a621d: Merge branch 'patch-1' of https://github.com/mounte/intellij-community into mounte-patch-1 fbb72f1: Merge remote-tracking branch 'origin/master' c871aed: IDEA-122856 Hard to catch layout delimiter in portrait mode d511bdc: debug VisitingTest 8278ee9: use trove maps/sets to save some memory c928235: register JList as generified compared to java 1.6 d4adc24: compilation fix e8d0e26: generate test templates: include static imports on Assert-s to provide simple completion, optimize imports on the fly would remove them though 666addd: invert boolean: ensure to invert default boolean initializer (IDEA-123510) 5a0fe43: check access class for super expressions referenced to interfaces ef82d76: java 8: anonymous class fields could be available later in next lambdas (IDEA-123731); narrow down scope of chained calls to the containing statement d9cd272: IDEA-100036 07600e5: testdata for IDEA-123731 6d7cfc9: java 8: anonymous class fields could be available later in next lambdas (IDEA-123731) 258af30: testng/junit: <no module> choice when all in project selected (IDEA-88524) 6ab05a2: chooser to redebug failed tests (IDEA-100278) fcc536f: Merge remote-tracking branch 'origin/master' 53a8f26: fixed project creation with detected sdk 11e10c9: RUBY-15187 File -> New command is disabled when editing a file 70107c7: console LineSeparatorPainter — remove from editor markup model, but not from document 2814b3d: IDEA-123543 Navigate to the Grails plugin page! 41e2698: patch local history tests; remove sync indexing 0b22926: WEB-11810 Node.js debugging doesn't work eb2735c: Merge remote-tracking branch 'origin/master' 070603e: ability to find a component by its id 8da69d7: fixed PY-12544 Access to a protected member: false negative for import statements dc15d42: RUBY-15202: some parsing tests do want to lowercase first letter 9a3d73e: Merge remote-tracking branch 'origin/master' 4220a13: Remote interpreters dialog redesign (PY-12462). c613ae1: Minor optimization +review CR-IC-5136 89639df: no exceptions in log 1e6e14d: make tests platform-independent (IDEA-67767) 926d1e5: Code formatting 8e895ee: IDEA-48247 Maven: resources builder: support outputDirectory parameters of maven-resources-plugin; updated for review comments d535632: New icons 5baf0cd: fixed PY-12500 Instance attribute defined outside init: generate python 3 super call without arguments for python 3 interpreters 10e91a9: Merge remote-tracking branch 'origin/master' 4f52352: fixed PY-12449 Create Virtualenv: do not run skeleton generator when selecting not added base python interpreter cb14faf: make FontMapper compile and work with JRE 1.6 (IDEA-67767) 4ba6c03: sync nashorn debugger support ValueType 33f6d78: testdata for IDEA-64103 e860377: testdata for IDEA-123366 cdf4412: provide project for TestStatusListener 67da469: jump to source: ability to jump to native V8 script (actual only for V8 debugger protocol) e1ca784: specify Locale.ENGLISH (it's a locale insensitive string) 2796b2e: Gradle: code clean-up 71f3f29: Gradle: code clean-up 67bc41e: new iteration model based on ChooseByNameItemProvider 7ddbfd5: dfa: don't suggest to replace reference qualifiers with null 73850cb: IDEA-123163 Use new single file content root in "open single file in temp project" c208dce: IDEA-27445 Breakpoint groups - added support for default group e56d173: cleanup c86fff8: better detection of binary files 7035c3a: ignore io exceptions on file type detect 065f021: CR-IC-4781 Formatter diagnostics improvement: check cases when PSI tree/model doesn't match the document 61bef59: WEB-11268 Live Templates in auto-completion interfere with Emmet/Zen expand b3a4361: util: universal .jar URLs splitter 2aeb018: IDEA-48247 Maven: resources builder: support outputDirectory parameters of maven-resources-plugin 6e4249e: diamonds: wrong constructor selected (IDEA-123518) 7e0d323: fixed PY-12637 PEP 8 naming inspection: scandinavian letters 6ca24c1: fix local history tests: don't do initial vfs refresh in unit test mode (as it was previously) 8dbc39fc: Merge remote-tracking branch 'origin/master' 09ddfbd: IDEA-123641 Breakpoints groups: for the java/javascriptExceptions nodes the MoveToGroup action is enabled but doesn't move AnyException subnodes 0e8173a: Merge remote-tracking branch 'origin/master' 4ed1669: C++: hangup at compiler launch is fixed (rollback Dmitry.Semeniouta changes) +review CR-OC-1448 5bc3f1d: EA-55239, EA-55618 - IllegalArgumentException 195ca9b: TestFramework: cleanup, copyrights, use org.junit.Assert c19f73d: convert to light test 68576b4: Merge remote-tracking branch 'origin/master' 53d6460: cleanup imports 24e8549: cleanup imports 0bc5d9d: IDEA-119544 Terminal title font doesn't revert to usual size after presentation mode 7d28015: cleanup imports 9ec0421: attempt to fix WEB-11784 huge array cause 100 cpu debug bb65da0: cleanup — nullability 9c5cd3f: Cleanup (docs) 4b3cbd3: templates to create new test classes (IDEA-107251) bb0af0a: dependencies: do not highlight return type params - already shown (IDEA-123577) a0dd4c5: use snappy in java implementation 9e4e295: Merge branch 'svn_18_3' 9fb6bdb: svn: terminal: Do not destroy process in terminal mode if some data is available in error stream - as subsequent interactive prompts could occur 144216c: Merge remote-tracking branch 'origin/master' 45cb54c: PY-12565 Django: default template names for generic class-based views are not resolved 93f8191: IDEA-123511 (DynamicRegexReplaceableByCompiledPattern should ignore String.split in some cases) f589bf2: C++: hangup at compiler launch is fixed +review CR-OC 6b882a3: Merge remote-tracking branch 'origin/master' 479984f: literal expression won't be created from string with line break 58e7a1e: NPE: usage in foreign language (IDEA-123604) 6fd18d1: unused parameter: do not highlight if method is used locally by method reference (IDEA-123265) e14e21a: ensure that tree is not flattened when action to switch is disabled (IDEA-123549) 2fa8491: IDEA-112552 "Replace with lambda" should use expression lambda when possible b26f696: improve distraction-free UE: fix blinking & enlarge breakpoint area 16dca7c: IDEA-123641 Breakpoints groups: for the java/javascriptExceptions nodes the MoveToGroup action is enabled but doesn't move AnyException subnodes 6f41e9e: Compilation fix 26aaa68: Cleanup (formatting) 6509542: IDEA-101642 Floating windows disappear/change positions on dual monitor a0b16a0: IDEA-123466 Sheet dialogs doesn't transfer focus back then closed e46486e: Merge remote-tracking branch 'origin/master' 7b697a5: compilation fix cf0ab3d: IDEA-67767 Copy syntax-coloured code block to clipboard as rtf f80bf32: functional expressions: include in find results when implementing classes/implementing methods options are on ab86d61: functional expressions: implementations view 39f354b: functional expressions: ensure that method to search is functional (not default or static) c8bbd66: anonym -> lambda, method ref: do not suggest replacement when default method is called out of functional interface context e9996cf: enter distraction-free mode in presentation mode 0a7b14c: refresh editors on successful registry changes 30fe8ea: fixes for distraction-free & presentation mode: file-editors only & etc. 812e2bd: clear() method should update 'myContentSize' only once a562a5e: IDEA-123337 fast constructor references for map literals e217b44: IDEA-123337 getReference should work fast 21c1cbf: IDEA-123337 lazy type inference for map literals 6e96d42: fix on demand import 14f4d6b: UnindexedFilesUpdater -> DumbModeTask; faster refresh handling 7a17712: index only valid files 5b12890: disable closure folding on Java 8 as confusing 5e0ad33: IDEA-12514 Can't generate EOF input in Console panel - ^D doesn't work - default shortcut 282ba94: svn: terminal: Do not guess process output type by line content for windows (as implementation already provide separate streams for output and errors) 85d01c0: IDEA-12514 Can't generate EOF input in Console panel - ^D doesn't work b200296: Merge remote-tracking branch 'origin/master' 56b33a8: Add missing feature declaration in YouTrack repository 1c0f050: Merge remote-tracking branch 'origin/master' 70a1264: IDEA-12514 Can't generate EOF input in Console panel - ^D doesn't work 2814589: IDEA-44718 Maven: provide possibility to navigate from profile node in MavenProjects tree to the corresponding profile 357fcee: Short method documentation 9b9cf22: Merge remote-tracking branch 'origin/master' 74b0d4b: do not run skeleton generation twice while creating virtual env d5c9775: for now test failure is expected af075b6: Fix maven test 97584df: fixed PY-12452 Replace browse button for interpreter selector with details icon in project creation dialog c6a98b1: fix presentation 1132fd5: Merge remote-tracking branch 'origin/master' be050f6: compilation fix 61243fb: IDEA-123619 Simplify adding stepping filters aad1a93: make the dialog non-modal to compare traces 8bb23c3: IDEA-123444 Item “more…” on Search Everywhere does not work 732de39: Real font families by generic names (cherry picked from commit 286ecf7) c09045e: console insert user text test 172a01d: functional expressions & @FunctionalInterface based conflicts for pull up/push down refactorings e55748f: functional expressions: pull up conflicts 05fb5ed: functional expressions: push down conflicts d8ed05d: functional expressions: allow to delete/change signature of default methods of functional interfaces c213495: functional expressions: reject to inline to anonymous if corresponding functional expressions exist 149197d: IDEA-123519 improvement 1337076: use thread local cached value for AppenderStream cbc6d61: removing all temp enumerator / persistence map files created during tests run 9ad5194: avoid multiple notificationgroup registration e91d207: IDEA-44718 Maven: provide possibility to navigate from profile node in MavenProjects tree to the corresponding profile 92cdb96: IDEA-123519 Sheet dialog: default button and focused buttons are incorrectly set 87d9dc6: SearchEverywhere shows Searching... if the popup is empty b40f6a5: external system: testFramework test dependency added fc7d372c: remove wrong @TestDataFile (CR-IC-5117#c24906) 04acba8: cleanup 6d24b11: Merge remote-tracking branch 'origin/master' bf1b30b: fixed PY-12628 Ugly interpretator configuration edff3da: DomFileFattern 6cf89cca: fix testdata 99e8efe: don't optimize imports and rearrange on commit in dumb mode 034c76d: DumbService: don't prepocess progress fraction, it only hurts in DumbModeTask's fe49955: kill old DirectoryIndex 810d328b: format, @TestDataFile d7f1281: reorder table items & fix renderers 0773a6f: functional expressions: include in class hierarchy feb2a09: disable convert interface to class for @FunctionalInterface-s 3692adc: @FunctionalInterface -> CommonClassNames 417e7a2: warn when converting from interface to class in presence of functional expressions a7875b5: functional expressions: show in method hierarchy da399c3: functional expressions: show them in hierarchy view (IDEA-95127) 2a89426: safe delete: warn about functional expressions cd3eac2: IDEA-118774 Warning about lack of subclasses when using lambdas c064f3c: better place for license info 89a7ea9: update artworks 8de7f77: Cleanup (formatting) fed172f: Fix icon of 'Browse styles' toolwindow 29250fe: Add options to disable/enable using maven-surefire-plugin configuration when execute JUnit Run Configuration. 128f2c1: Merge remote-tracking branch 'origin/master' 9bf99a9: fixed PY-12448 Create Virtualenv: NASE at com.jetbrains.python.sdk.CreateVirtualEnvDialog$4.actionPerformed 51ce094: Merge remote-tracking branch 'origin/master' 19d410e: fixed PY-12477 Project Interpreter is not set when attaching created project to currently opened one c908880: Merge remote-tracking branch 'origin/master' 9553c3f: IDEA-123467 Add two checks to prevent deadlocking with MediaTracker threads 68de0c5: IDEA-123467 Add key 'ide.certificate.manager' in registry to disable CertificateManager usage 8f03500: Add internal action to simulate deadlock caused by CertificateManager 43f09a2: compilation fix 89d58d467: do not treat anonymous classes as functional 6397808: Merge remote-tracking branch 'origin/master' 90f3c6f: laziness & compilation fix 0ee17fd: fixed PY-12477 Project Interpreter is not set when attaching created project to currently opened one 693c5f3: bring back changed files sync reindexing (local history tests are failing) 7f99a09: correct relative point for window 2f3d180: IDEA-123355 Postfix template expansions .null/.notnull after 'else' fail to provide a valid Java output ec1d492: search for functional interface implementations by lambdas and method references: change signature/find usages; to be continued (IDEA-104286; IDEA-90824) 737a7d5: IDEA-123529 No Retina Icon for Changed File cfb44bf: update icons d386f9e: IDEA-123116 method processed from static imports has special priority 1e550ab: cleanup eedead7: IDEA-123337 Lazy tuple types 3ad4478: some @notnulls 5ad0c0f: cleanup 5e7f2b7: Groovy: optimize declaration processing 98a6a14: Groovy: cleanup non-code members processing 02a2aa2: remove redundant field myName. Name property is already declared in the superClass 75fba02: notnull/nullable for NonCodeMembersContributor 5b9cf2b: get rid of myTypedContext field in MethodResolverProcessor and corresponding code, some code cleanup fbb5045: SimpleModificationTracker added to util 73f8ed4: IDEA-122995 "Grab dependencies" intention should work on any red class reference d2abb03: NPE f167774: Favorites: DnD fixes 30e96ba: some still make use of the horizontal scrollbar from time to time 3b3db9c: Dart — scope object could be primitive (for example, Integer) ace1780: Favorites: alphabetical sorting for favorite lists 16ad824: Platform: taking OS X scrollbar click behavior into account (IDEA-56288) 318b7b7: default value for Karma splitter edb1f6b: suppress postfix templates [r=ignatov] 3d258b9: IDEA-123268 (Wrong "magic number" triggering) f299a3b: Android-Gradle: use external project notifications for project sync messages 8e3a6d1: Fix several typos in JavaDoc feb9b63: IDEA-71597 3b86f6c: cleanup de04dfe: NPE 34e550f: notnull 12c80e7: seems html attributes spec is too aggressive, let's use alpha as attribute start f2c19c1: move JavaScriptDebugAware to community (required for kotlin&nashorn) 7c0dece: fix NPE 141fa22: ^174 "from my point of view it would be better to make inner MyFullValueEvaluator class static and change constructor signature to accept Value instead of int actualLength." 7371df1: IDEA-123160 Find Usages doing nothing in 13.1 88f8d64: cleanup b67d8ba: External project notification: code cleanup + added message counter methods 47c0c85: external system: add check for disposed application before document save handling 276af49: show execution point for VM script file and http files 77c13bc: cleanup — notnull 1850bd7: distraction free mode improvement: don't blink during editor switching cfe2889: IDEA-123160 Find Usages doing nothing in 13.1: do not throw exception in production. 7f2cc84: IDEA-123160 Find Usages doing nothing in 13.1: do not throw exception in production. 573c488: Change time measurements in logging to display time of request to single server e650594: AppCode: initial Reveal integration (incorrectly committed code removed) d2e05d8: AppCode: initial Reveal integration +review CR-OC b3df989: Platform: NSWorkspace class to work with cocoa e0dfdb9: IDEA-123508 DevKit: improve extension point quickdoc 4f72805: before reporting "already disposed", check if it's a canceled background process that could be gracefully finished by PCE 85740b0: remove CacheUpdater in v.15 6514533: better logging for detecting sporadic indexing updates ee4d472: display "Indexing..." while indexing 67ac560: avoid dumb mode on small vfs changes 1fdef60: don't do optimized groovyc classloading on java 5 where util.jar can't be loaded d2bfdb3: removed GrReferenceExpressionImpl println ed1187a: FileManager.forceReload, move and simplify edd39ff: ReferencesSearch should default to allScope a10e679: IDEA-123273 (correct handling of UNC roots in FileUtil and file pointer manager) af1a5eb: Cleanup (formatting; dead code) e561d7e: Merge remote-tracking branch 'origin/master' 192a47c: JediTerm updated to version 2.0. d3a2e4b: Merge remote-tracking branch 'origin/master' 5a3cd13: Templates obtained recursively 93c9741: track the reason of index updates bcb2530: introducing ThreadLocalCachedValue b8e2be3: Experimental utility method about system keyboard layout 7181aba: Merge remote-tracking branch 'origin/master' a85f897: Removing custom impl. of TargetElementUtilBase to fix tests a40b71a: fix offset contains condition 05ab3eb: report in more cases f38f05c: expand negative names list fcd5061: name suggestions for static non-final fields should escape _ (IDEA-123441) 8021c7c: allow final fields serialization (e.g. used by HighlightSeverity) 46f47a9: same custom file types as we have in community 5e5838a: made html lexer more closely follow html attribute syntax spec b2459ce: IDEA-123017 Mac sheet-dialogs do not correctly handle line breaks f187f25: IDEA-103016 Tooltip/label for Toggle Fullscreen Button in Main Toolbar is inverted compared to 'real' status d2ee60b: Storyboard format d8a6130: IDEA-123409 Sheet dialogs: Order of buttons and their sizes are incorrect 6e4e343: Merge remote-tracking branch 'origin/master' f32b903: sync field filter with xmlb.BeanBinding: skip transient and @Transient fields c3a806c: EA-55600 49e4236: EA-55548 - IOOBE: SegmentArray.offsetOutOfRange a89888e: Sizes and layout of buttons for IDEA-123409 6c78461: Revised Color & Font import API 86a9401: allow to run parameterized tests from plugin dd53240: EA-55041 - IAE: TypeConversionUtil.isAssignable 9de341b: EA-54930 - IOE: PsiJavaParserFacadeImpl.createExpressionFromText 83a1f2a: EA-55521 - IAE: TypeConversionUtil.getSuperClassSubstitutor c97a567: fixed PY-12478 Test Runner detector gets info about installed package from wrong project interpreter for multi-project 5a3a16e: move script-debugger-* to community — fix build scripts, add modules to community project b5a437a: move script-debugger-* to community 5e120d3: WEB-2100 Node.js debug: value is truncated, but IDE does not suggest to see full value WEB-11392 Node.js debugging: Copy Value doesn't copy the entire string a87079b: fix compilation bc234fe: WEB-6069 CoffeeScript Debugger doesn't show value of the variables 842010b: fix NPE 8b94534: cleanup, ExecutionStackImpl must not hold topFrame — check actual on get 5045ed4: WEB-11133 JS Debugger: Variables view is not properly updated after setting value 4b47fd6: WEB-11133 JS Debugger: Variables view is not properly updated after setting value 5b27729: cleanup — must be named as VmBase d2a450f: continue: local variables defined in the console should be available for resolve/completion/variables view 4df77a8: getCacheState -> getCacheStamp aafa722: cleanup — remove getGlobalEvaluateContext 4e48d7e: getCacheState -> getCacheStamp c9fe4c9: init: local variables defined in the console should be available for resolve/completion/variables view e020ca2: release object after global variables calculation 4e0bc81: release object after global variables calculation e33c085: honor context.watchableAsEvaluationExpression 60308ca: WEB-11399 Live Console: variables defined in the console are not autocompleted (global context) 2f11f9a: WEB-11399 Live Console: variables defined in the console are not autocompleted (global context) 50d6e15: StandaloneWipTab - add logging 5496bef: library scope is not watchableAsEvaluationExpression 0576bc5: variables sorting — prefixed '_' must last, fixed case sensitive natural compare cleanup 193062e: move createAndAddScopeList to ScopeVariablesGroup e65a4fa: WEB-7303 — node-webkit debug works c231831: continue WEB-7303: reduce dependency on ExtBackedChromeConnection, move navigated() up 3e26b8d: continue WEB-7303: reduce dependency on ExtBackedChromeConnection, move navigated() up d16a88f: move generic ProcessBackedVmConnection impl to shared module 4e72d77: move generic connection impl to shared module 66051bb: move generic connection impl to shared module 60dbe50: move generic connection impl to shared module f377dbd: extract SuspendContextImpl 542fce0: ChromeExecutionStack is generic impl 86b7cf8: ChromeExecutionStack is generic impl 08f232e: ChromeExecutionStack is generic impl ab343e3: cleanup d449db6: cleanup 98d2108: CR-IC-4719 revert "pass value to renderValue" 2e69bf5: cleanup 1c56ee5: cleanup dependencies 656f137: remove dependency on liveedit-protocol e39d6cb: notnull d5597c8: remove dependency on JavaScriptDebugger bff031a: move VM_SCHEME to backend sdk to reduce dependencies 19e548e: init nashorn conditional breakpoints dae303e: EvaluateContextBase 194fc38: remove dependency on JavaScriptDebugger 116514e: move Value to values package 8354821: move Value to values package b085e92: nashorn indexed array support d6a80f5: nashorn indexed array support 790b885: cleanup 53840c1: v8: don't return empty string as class name b694bf7: get rid of ObjectPropertyData 2258111: get rid of ObjectPropertyData 502f01d: NashornArray presentation d047f87: NashornArray presentation 4cfa1f7: cleanup 4a96f13: move isTruncated/getActualLength/reloadHeavyValue to StringValue 79862ca: move isTruncated/getActualLength/reloadHeavyValue to StringValue 7a54bda: add ObjectValue.hasProperties to simplify renderers 67f3450: add ObjectValue.hasProperties to simplify renderers 325d219: jdi Array presentation like current java impl 55bf487: jdi Array presentation like current java impl f668bcd: initial implementation of JdoObject/JdiArray fdc3ccc: cleanup 8e1b754: get rid of asObject 158024c: get rid of asObject 435ae25: remove getRefId() from API d1a7ef0: NotNull c0265e1: ClassObjectReference 6f7bdf2: rename "asFunction" to "resolve" 694d96f: rename to DebuggerView 9dd0456: rename "asFunction" to "resolve" 2dd20b5: nashorn variables view: Current "official" approach doesn't work in our case — it is better for us to not use DebuggerSupport, we should operate with ScriptObject directly. So, we have implemented our own nashorn debugger support (thanks to documented and public Nashorn API). 546cb8b: nashorn variables view: Current "official" approach doesn't work in our case — it is better for us to not use DebuggerSupport, we should operate with ScriptObject directly. So, we have implemented our own nashorn debugger support (thanks to documented and public Nashorn API). 35c5720: ValueLoader -> ValueManager It is not loader, it is just manager/factory. ddb3a80: ValueLoader -> ValueManager It is not loader, it is just manager/factory. eda0a66: relax getProperties — Variable is enough, we must not require ObjectProperty 594db26: relax getProperties — Variable is enough, we must not require ObjectProperty 43b45c0: refine ValueLoader concept 49799df: ObjectPropertyBase — getters/setters must be FunctionValue, move generic impl from V8 46c265a: rename scope.className to scope.description — actually, it is description a0f1f9c: rename scope.className to scope.description — actually, it is description db91942: add note about NashornScope impl 60eb22e: rename DeclarativeScopeBase to DeclarativeScope 6c56fcd: rename DeclarativeScopeBase to DeclarativeScope 8ae8053: rename StackFrameImpl to CallFrameView aad574d: move loadScopeVariables down nashorn variables view initially works 5624e4d: nashorn: continue variables presentation simplify V8Scope c1a42c7: don't auto expand Scope.Type.WITH 15a426d: BaseVariableContext -> VariableContextBase d4e978c: implement SimpleDebugProcessEx 702ee28: continue decouple xdebugger ex ui — XStackFrame impl 902bda6: continue decouple xdebugger ex ui — XStackFrame impl 8c202a8: continue decouple xdebugger ex ui — XValue/XStackFrame impl 87e701e: continue decouple xdebugger ex ui — XValue impl 2df6840: continue decouple xdebugger ex ui — XValue impl e4dab99: continue decouple xdebugger ex ui — XValue impl 8f64d34: continue decouple xdebugger ex ui 270adbb: simplify – suspend context has reference to vm 1b22196: move ContextDependentAsyncResultConsumer to decoupled module 0011573: decouple ContextDependentAsyncResultConsumer 053808e: simplification — get rid of v8 DebugSession add debugger-ui module 2916e19: simplification — get rid of v8 DebugSession add debugger-ui module 58b9bf9: nashorn: continue variables presentation ad81d5c: nullability 5ae3a76: nashorn: initial getReceiverVariable impl 101c153: introduce isMemberVisible/normalizeMemberName to avoid dependency on V8DebugProcess f521266: continue nashorn: variables view 63f68f2: nullability 5951a1c: don't depend on javascript b186cac: nashorn: x variables view 4668592: nashorn: frames view — correct presentation of stack frame (function name is not yet displayed) ebda663: fix compilation f403d8c: WEB-9926 remove 0xhh postfix 4c981bb: WEB-9926 add additional scopes fe52fa4: show "native" description for node objects d323ba1: WEB-9926 don't auto expand library scope, we must use case-sensitive natural compare — constants must be first b925454: WEB-9926 library scope 5a13a6c: CR-IC-4324 revert to NotNull, move new contract to PathUtil ed408cf: get rid of ScriptInfo 2692f06: move js debugger platform up 86d2886: move js debugger platform up b4c85ed: move js debugger platform up 0a0bc7f: disabling breakpoint group worked only after the second click 2cea25a: WEB-11695 Insert handler doesn't work for function with multiple definition 8e02a81: Merge branch 'svn_18_3' 00b440a: Merge remote-tracking branch 'origin/master' 129e760: Narrowing the top shadow, shadows are lighter for IDEA-122991 18a6681: Better workaround for PY-12317 37c7f51: Expression simplification 10e7111: IDEA-123402 Sheet dialogs are too transparent, making it hard to read the content 5ad2cb5: Merge remote-tracking branch 'origin/master' 699c241: IDEA-123115 Infer Nullity mark Local History 7a9f96d: shared icon introduced (IDEA-120989) 0afb681: IDEA-123230 html code visible in updated plugin disabled warning 0ce4ecd: svn: Implemented one common process handler for svn commands (both for terminal and regular mode) 8909f2e: DevKit: Extension.getExtensionPoint use domDeclaration provided by Extender directly 36c2d1b: IDEA-116029 in-place introduce variable name suggestions popup disappears before I can select anything (disabling property key to check for regressions) 084e9d4: svn: terminal: Implemented running svn commands using "cmd /c" and redirecting output to separate file for Windows (so we do not need separately process terminal escape sequences in process output) 15150f5: Platform: globally use customized 'Delete' shortcuts (IDEA-102003) + more places use standard shortcuts 90d6d50: Nix NPE while settings save. 50ae319: Platform: globally use customized 'Delete' shortcuts (IDEA-102003) + added 'delete' and 'backspace' mappings to the 'classic OS X' keymap 95314e2: Gradle: Tooling API integration tests fix - set minimal daemonMaxIdleTime 117155e: Gradle: Tooling API integration tests fix - set minimal daemonMaxIdleTime 75febf1: fix NPE on set breakpoint in Dart SDK file 9861ddc: DevKit: add Extensions#getEpPrefix 90fa8cb: move spellchecker to java-impl so it won't depend on any plugins enabled (IDEA-123346) 7ffb54d: view implementations: show self first (IDEA-123377) 79f6257: testng: allow all in project configuration for group, suite, pattern (IDEA-123385) 9f2d913: Platform: globally use customized 'Delete' shortcuts (IDEA-102003) + typo fixed d82d9b1: Add internal option to run processes with PTY. 430c02d: better name and problem descriptor 1637a3f: Cleanup (javadoc) 192b16f: Cleanup (test stability) d70e1ac: Cleanup (pointless exceptions) bd5f93c: Cleanup (formatting) cd55e1a: Refactored RunnerWinProcess - delegating method calls to original process extracted to separate class d15303a: Merge remote-tracking branch 'origin/master' e3c36ee: fix asm bug (IDEA-123343) a7d2e86: Merge remote-tracking branch 'origin/master' 05d9c33: IDEA-69131 (Cannot import inner class from annotation on outer class.) 4186051: presentation mode fixes: IDEA-123043, IDEA-122892 dd71309: svn: terminal: Terminal support for Windows extracted to separate classes 2b2ba01: svn: Refactored CommandExecutor - extracted utility methods to work with temp files 70887d1: use psi-based DomAnchor by default 788fe65: IDEA-122391 Apply correct arguments escaping for pty4j (depending on current OS) fcd726c: improve distraction free mode for detached editors 0c34825: IDEA-122391 Trim xml data before parsing - as unnecessary whitespaces (i.e. line breaks at the beginning) break parsing logic f0b6421: change prompt style for ipython to plain green text PY-9171 (cherry picked from commit e6f4916) 934f8f6: override exit handling for IPython TerminalInteractiveShell (PY-5172) (cherry picked from commit 05c1755) d0ac46e: Merge remote-tracking branch 'origin/master' 7bb8868: smart completion of method references (IDEA-123293; IDEA-123291) c33aa26: inside_expression already exclude literals 12ad891: fix generated api df9e6aa: safe delete should not start callback when "safe" checkbox is not on 1daf8f5: ambiguity (IDEA-123352) 9b1c967: simplify because myAlignmentStrategy != null 7257ecb: don't hold all strings from all plugin.xmls forever 680938d: JavaAutoPopupTest.testRestartWithVisibleLookup: don't blink 9524396: EA-54618 - assert: ComponentManagerImpl.getComponent 09389bb: Platform: tests added for virtual stace handling in DeleteToLineStart/End actions 101dc41: Merge remote-tracking branch 'origin/master' 6fb0d03: Merge remote-tracking branch 'origin/master' 12b5eed: IDEA-122701 IDEA doesn't start on Mac under one of the user accounts after patch update 3706485: AIOOBE (^Vassily) 1feee4a: support multiple carets in EditorDeleteToLineStart/End actions 30356e7: Platform: globally use customized 'Delete' shortcuts (IDEA-102003), Xcode keymap uses 'native' delete action shortcuts a587c8b: show source text as value name, part of "WEB-6069 CoffeeScript Debugger doesn't show value of the variables" 617cbb9: cleanup 24fe15e: remove obsolete class 3d6913c: fix NPE b6c6b95: IDEA-99329 Buggy UI when manually adding framework support for a module f2f8756: IDEA-27445 Breakpoint groups - prototype 4e53b58: fixed PY-7535 Specify return type: intention is not available at the end of the function name 2d6eafa: Merge remote-tracking branch 'origin/master' 417935b: TODOs added 3953531: Workaround for PY-12317 6fd05ee: NPE fixed 1a5f9d2: Merge branch 'master' of git.labs.intellij.net:idea/community 2406ded: Notify GIT repository listeners After info update - rollback static for listener notification (according to review CR-IC-5069) d200119: by default it's not stripped 3a0093d: fix AIOOBE in dfa contract processing 8c01fc0: initial folding should be build under a read action f6262c4: DumbService.queueTask(DumbModeTask) 2841329: avoid unnecessary status bar repaint 23bae53: IDEA-123356 Settings->"Postfix Completion" enhancements b0667e0: IDEA-123360 Sheet dialogs should have minimum size 9857064: IDEA-123383 Please rewrite ActionsTreeTest so it doesn't count on platform actions being incorrect 21dedab: remove new editor mode (revert d42ee690) d9969be: made public 2831129: notnull 4e0ca1c: cleanup e25a73e: isNative2AsciiForPropertiesFiles f7a20ff: CIDR: Xcode keymap utilizes Delete to Line start action 9e297df: Use Tahoma in HTMLEditorKit on Windows 07257e9: Platform: Delete to Line Start action (IDEA-102469) d1c4c28: Editor Actions: CutLineHandler extracted 0112f24: IDEA-123145 New project wizard is broken 582d67c: Open action on welcome screen 5f35c4f: Start plugins wizard #11 0eedbf0: Start plugins wizard #10 9a38c20: Start plugins wizard #9 ba25977: Start plugins wizard #8 (fix broken compilation) aeca763: Start plugins wizard #7 f7e746c: Start plugins wizard #6 d8166a2: Start plugins wizard #5 e086a39: Start plugins wizard #4 909a15a: Start plugins wizard #3 cbaf7f5: Start plugins wizard #2 5d38a35: Start plugins wizard #1 edf024c: ensure assert inserted in correct place (IDEA-123296) 02fc8fe: method refs refactoring 565b28a: check for assignment to final field inside lambda (IDEA-123308) 4bbe424: IDEA-102508 error status of run configuration is not updated after fix Get rid of extra repaints fd0f629: better fix for IDEA-120011 quick documentation looses styling b45b456: IDEA-113615 (Magic Number inspection does not treat ByteArrayInputStream initial size as initial capacity parameter) 675c6ed: introducing / using ReflectionUtil.getGrandCallerClass() 358f633: play sound utility methods 03073c1: Merge remote-tracking branch 'origin/master' 3455dde: PY-7000 Django: not able to Find Usages for template reference variable passed to template from view PY-12427 URL names reference does not work TODO: Add tests! dac515e: Mac keymap: restore old shortcut for rerun tests (cherry picked from commit 5bedbd8) 83a48c1: External project notification: clear notification messages in EDT 58b41b5: Merge branch 'master' of git.labs.intellij.net:idea/community 30f94c0: Notify GIT repository listeners After info update - remove unnecessary static's 1e9430a: Notify GIT repository listeners After info update b0fa971: EA-54357 - assert: ComponentManagerImpl.getComponent 3ff58dc: svn: Refactored SvnDiffProvider - log errors while resolving current revision for file as info (not as debug) 014d4c8: mark new files as dirty in jar FS: otherwise even if new version of jar is refreshed in Local FS jar content from persistent FS won't be refreshed 934f438: ui-designer-core moved to platform to allow third-party plugins to use it 6467286: Move JSPTreePatcher to XmlTemplateTreePatcher (WI-22026, WEB-5058) [CR-IC-4933] 1a7aff6: svn: Do not resolve repository url (with "svn info" command) only for local "svn info" commands cefdce8: catch NFE added to HgBaseLogParser 52aa623: IDEA-122078 Consider excluded output roots on output cleaning f3eda43: fixed PY-12506 Updating skeletons is run twice b487137: IDEA-122394 Use ModalityState.any() to prompt user if executing svn commands in terminal mode (as currently these prompts are in the thread that reads output and not in the one that started progress) 33790eb: svn: Make Command.myRepositoryUrl volatile - as it is accessed from several threads when in terminal mode adfe9ba: Fixed bug where Gradle settings were not updated on each project sync. 4d2b747: 'setMaskProvider' method restored and moved to API (used in 'presentation assistant' plugin) fd92682: [log] Cosmetics changes in VcsLogJoiner. a75b365: optimization 844099f: External project notification: add support for use of "Messages" tool window bec7a5d: External project notification: add support for use of "Messages" tool window 56484f1: code cleanup 9cfa601: allow unchecked generics in comparing unrelated return types (IDEA-123316) 2c85ce7: explicit 1.6 language level/compilation target cbe0d6d: create method from method reference (IDEA-112556) 702932a: make change color scheme actions dumb aware bb62d58: patch from Zalim Bashorov https://github.com/JetBrains/intellij-community/pull/162 905227b: breakpoint was not selected when opened from event popup c25dd563: fixed PY-12526 Replace with str format method call: unnecessary u prefix for python 3 a7d8bb3: bind smart element to proper root in template languages: keep API intact, use utility method 2c66b01: fixed PY-12541 do not add ruby interpreter as possible base for virtualenv f350935: bind smart element to proper root in template languages #WEB-11589 fixed 8ac22e1: Mac keymap: bind rerun tests on valid shortcut e75d93b: notnull, cleanup c6a7962: cleanup fb7d39f: moved to project-model ad25db4: notnull 82930ae: diagnostics 95398bd: cleanup a36a361: cleanup e45865e: IDEA-113198 7ce2aaa: cleanup 2cc9842: method references: highlight separately non-instantiated classes, not resolved methods (IDEA-123279) 6b4ad69: IDEA-123286 diff: fix off-by-one in the current document too 5ff0518: Update module_redeclarator.py d281c91: remove border f18463d: set proper fg and remove border ffe1edd: quick doc and tips are broken under darcula 70d6d69: IDEA-71048 (test fixed one more time) d783d86: IDEA-122670 Hg log: request only necessary log information 7333a78: explicit 1.6 language level 50bd74d: fixed PY-12545 Override method: generated incorrect super call for local classes 5898229: Emmet: reformat surrounded block fe7b903: testdata fixed 29265b3: Merge remote-tracking branch 'origin/master' de14860: Merge remote-tracking branch 'origin/master' 7164eb8: IDEA-71048 (test fixed once again) c46012d: fixed PY-12546 Completion: except keyword should not be available in try block after else or finally 2be1cd2: IDEA-71048 (test fixed once again) 9195d8e: stop replacement chain calls to sequences when root type changes during call chain; this-chain is not supported though 73f87cd: junit 3: workaround not to filter out "warning" suites when test was not correctly created (IDEA-123209) 06d6ad7: static in interfaces before 1.8 (IDEA-123252) 5f1e0e0: don't use @Override on implemented methods in util-rt 6ca82ee: revert util module language level changes f49bcf6: fixed PY-12551 Project Interpreters: deadlock after removing detected interpreter in the list fd29e82: Merge branch 'master' of https://github.com/ShlXue/intellij-community 077af48: allow to use system-independent delimiter in plugin.path property (comma) 46dc44c: breakpoints must not be rendered in diff editor 6a90941: explain invokeLater (IDEA-123118) 20d3149: asm 5 jarjar fixed 6d85a6c: [git] Fix GitConfigTest: correctly split by lines c30f704: [git] Fix GitLogParserTest: better paths comparison, don't use fake root 55f84ff: [git] Fix GitHistoryUtilsTest: better file path comparison a513885: consider static and non-static methods when language level is 8.0 or higher 2f2db4c: warn in more cases and conserve comments d3eebf3: IDEA-123142 Cannot specify default (no) package in Command Line App project template. 472f313: inline velocity 300e871: conditional velocity e70a2f8: SimpleTemplatesTest d72b199: IDEA-123236 Can't click through e23d6a9: Cleanup in TaskManager * Make getIssues with old signature not abstract and throwing exception * Add a few missing annotations on public methods and remove some redundant in TaskManagerImpl * Add javadoc for getIssues() * Switch parameters in getIssues to get rid of overloading on int/long types c0ea251: fixed PY-8151 Don't highlight deprecation on symbols imported as fallbacks after ImportError 7dfcf72: IDEA-123103 Structure view empty when editing some XML files b8c784f: ensure non-locked state to drop caches on stub-ast mismatch recovery (IDEA-123118) 5bc8717: EA-55507 - IOE: PsiJavaParserFacadeImpl.createStatementFromText d335758: new inference: substitute resolved vars which e.g. did not participate in initial session (IDEA-123248) 5518b93: method reference constraints (IDEA-123223) 925b71c: IDEA-107653 No Drag&Drop from "Expression Evaluation" window to watches tool window b400f0d: IDEA-88850 Inconsistent checkbox capitalization in breakpoints dialog - also sort buttons by group priority 3526fe0: Platform: new scrollbars are supported on JBTabbedPane + inspection to always use JBTabbedPanes 97d9377: java: .class parameter name calculation fixed 219c078: Cleanup (formatting) cce59a2: Cleanup (test) a18ec28: IDEA-98393 Bring focus into Inspect window after it is opened (so it can be browsed right away) d640d90: ability to disable debugger value lookup 6e7f8ff: util.jar should be compiled with 1.5 target level since it's used in groovyc fbda954: O(1) SortedList.isEmpty 18b1ccd: use stubs when resolving in dumb mode 90163c5: fix database tests build? 8fba729: fix PsiPackageImpl.getCachedClassesByName race condition in dumb mode b69532b: unnecessary dependency removed ca07624: Test .jar generation fixed e28d3f5: method reference: use site substitutor if nothing else was inferred 990094f: new inference: collect nested calls from lambda return statements (JDK-8038747) 34f4baa: toString 20690a0: toString 50ddb05: EA-55461 c5e0960: EP for upsource 00efb07: removing unused parameter and field a8cfc8b: DomUtil.checkHasXml: use hasXml() instead of getXmlElement() 001e5de: IDEA-122931, EA-52281 (better handling for corrupted .jar files) edcd1ec: WEB-11133 JS Debugger: Variables view is not properly updated after setting value 1294056: [log] Don't destroy data, when request invalid. db2ce67: minor refactoring to avoid NPEs 67054be: typo aca6b01: [log] Don't make defensive copying here: there is no need in it. 3a1335b: [git] cleanup 8f487f2: [git] convert some tests to java ffa433b: [log] GitLogProviderTest ed8883a: [log] remove dependency f9e8fa1: [log] remove temp method VcsRef#getCommitIndex 329848d: [log] Remove duplicating implementation 7a39b2b: [log] Extend VcsShortCommitDetailsImpl from TimedVcsCommitImpl 3fa88a4: [git] read current user on GitVcs activate 7d2f32c: [log] IDEA-117553 optimize git log initialization & refresh 096155f: [log] refactor & some API changes 570394b: Test .jar generation fixed 34c093d: Test .jar generation fixed 50e411e: IDEA-123141 Refactor / Rename erroneously wraps xml element content in CDATA when it already exists, and corrupts text content if two occurrences 8c63822: Merge remote-tracking branch 'origin/master' 76e04ec: PY-12579 "url" function is not processed correctly when imported as alias 6fa4820: Xcode keymap tweaks +review CR-OC-1412 03c4328: Merge remote-tracking branch 'origin/master' 9668628: Fog patch 4 (cherry picked from commit 48d6308) add006d: Fog patch 3 (cherry picked from commit 3487b86) 6ff2d05: IDEA-122950 Breakpoints aren't set, unless debugger already active f423ee7: Fog patch 2 (cherry picked from commit 1ed4a92) 4508615: sort postfix templates f34ae98: IDEA-123179 Task context grows to humongous size dd5dab3: Fog patch 2e5ae76: fix for polyadic expressions and make quickfix conserve comments d07565c: do not add an 'abstract' modifier to 'static' methods ea80c04: also warn when method from superclass is overloaded e132e12: diff: do not break layout if we don't know revision number 1150c6d: Added extension point for import buttons in Colors & Fonts preferences UI 79d1984: correcttions after review: using as unique IDs instances of Object instead of Key, which is stored in a never cleared static Map 3c47368: Easter fog: works if today is 1 Apr (or there is -Deggs=true) You can switch it off by -Dnoeggs=true Note: Fog won;t start if there are less than 4 CPU or if there are less than 32Mb of free memory e4d6a57: Clone dialog repository url label changed according to selected vcs name. 880b479: Huge performance hit when adding new property at the end of the large .properties file (IDEA-101698) fb63924: Platform: javadoc for ContentRoot-related classes updated to reflect new file-roots functionality 857d86d: slightly better performance 7f3f40c: cleanup d42ee69: new editor mode 6c497a6: Merge remote-tracking branch 'origin/master' e0d3b91: Use UnsupportedOperationException instead of AssertionError in deprecated abstract method. Fix delegation to overloaded #getIssues without progress indicator support 33ded49: advance bomb c6c28d7: IDEA-120802 Optimize imports preparation freezes UI & throws Exception & crashes with OOM when called on a large project [CR-IC-4766] 67ac3e2: Platform: OS X scrollbars disabled on OS X < 10.8 (IDEA-123156) 33e8c78: EA-55259 11bc248: EA-55456 1f9ab71: Emmet: more diagnostic info af4bbc3: Fix IDEA-123157 Unnecessary scrolling in Editor Color Dialog (typo fix in line 226) +review 188e321: diff: do not show 'contents identical' if we can't calculate diff 5c926ef: Override getRepository in tasks for Redmine and Gitlab f2224a2: disable animations 68ed40e: don't place notification under toolbar aaea529: + shadowSize 950b36e: cleanup 9688913: + titleForeground eace490: Merge remote-tracking branch 'origin/master' 12f32a4: bigger icons for notifications 42412c5: Add annotations to the builtin known Nullable/NotNull annotations (IDEA-123102) 8bdf39f: only highlight identifier instead of entire expression 01b0876: only highlight identifier instead of entire expression cf7a32d: give similar inspections similar descriptions 4342d32: fix grammar 9768008: should warn on prepared statement 25c0576: [log] fix cursor shape 7dc9975: Merge remote-tracking branch 'origin/master' 39ec503: testdata for IDEA-120498 b22a73b: Merge remote-tracking branch 'origin/master' 2b867ce: PY-12344 Views in i18n_patterns are not resolved 0cfb14e: hide fix with possible dialogs in batch mode 7751598: testng exception is expected but never thrown: use common util to collect thrown exceptions cceb035: IDEA-120769 Expected exception never thrown in test method body: process subclasses 123ba34: create enum constant: support constant creation when static import is used, process varargs method candidates as vararg/basic separately (IDEA-121287) 1cf32d2: EA-55404 - assert: PsiPackageBase.getChildren 3707c56: sort output 6b91f55: IDEA-122414 Boolean expression simplification changes behavior of the code e24e934: remove the test committed by mistake 6d2412b: dfa: a variable can't be null after dereference (IDEA-122215) 87a2944: IDEA-122624 @Contract fails on vararg methods 6199ff6: IDEA-123113 Tool window: stripe button text differs from View|Tool Windows f89a793: IDEA-122974 expected type suggester should ignore 'null' types fddab7b: IDEA-123034 Unused assignment inspection - Remove quick fix 94a0eb4: update bytecode viewer to asm5 2e7694a: IDEA-123084 Modules with errors are not marked in project tree. 406c45f: some TemplateContext improvements after review 0763359: Xcode keymap parent changed from "Mac OS X" to "Mac OS X 10.5+" da2b5b0: ClasspathCache correctly handles getResource("/") requests (more strict check) 0c76f8a: refresh hg repository root after rebasing and update appropriate repository information 47ab9b5: DSM project disposed checks a8bfd9c: added notnulls 779508e: do not stop in case of exceptions in position managers impls 599cd0b: CR-IC-5030 (test added) 1dd12cd: EA-55398 produce code from template without error checking 9ef3453: ui: avoid exceptions caused by writing VM options to protected file (reverted) 50b9228: Cleanup (arrangement) 6f25948: fixes after review 6afba27: IDEA-122950 Breakpoints aren't set, unless debugger already active 8998f5e: http://crucible.labs.intellij.net/cru/CR-IC-4539#c24372 a13593d4: use WeakHashMap (Upsource#105) 552fc59: Cleanup (test migrated to JUnit 4) 6d94d67: ClasspathCache correctly handles getResource("/") requests ba71998: Different alpha for Darcula and Aqua 6a59fbc: continue: local variables defined in the console should be available for resolve/completion/variables view 247e21d: vfs: ignore invalid .jar roots (tests fixed) 9a5d20a: Cleanup (unneeded write action) 1e8614b: IDEA-120785 Multiline select issue b990d94: Merge remote-tracking branch 'origin/master' 69df14c: VirtualDirectory allow assess to Apple JDK Classes dir 9496da1: only variables are expected while processing code blocks ed8bb6a: honor ClassHint while processing declarations 5aa70ff: IDEA-122707 prevent recursion while inferring @BaseScript. We can do this because there is no annotation classes can be declared inside script class 2f6448f: check elements in all languages for hover #WEB-10538 fixed 4e2177c: cleanup f2bcf5d: avoid recursive invocation of caret merging procedure 69e31da: vfs: ignore invalid .jar roots 3b9b0f7: IDEA-91160 Database console: AE at TextEditorHighlightingPassRegistrarImpl.instantiatePasses() on using same data source in different projects 84451e6: IDEA-121400 b55c837: new inference: processing of compound bounds e55a20c: raw substitutor when erasure happened during inference 87ef3f9: improve debugging experience 97ce34b: ui: avoid exceptions caused by writing VM options to protected file 71f46d6: Cleanup (inspections) 0b70f88: IDEA-122677 (do not show "fatal error" dialog if the app is already loaded) 53d5579: platform: catch/log all project initialization errors dfa3ef1: Cleanup (arrangement; formatting) 6163ece: fix missing mnemonic 3e6a790: RootIndex is always initialized 3c96063: rehighlight editors on dumb mode start/finish d7081c9b: reuse MockDumbService in tests fefc5a3: debugging blinking GroovyCompilerTest 6b036aa: IDEA-122891 Presentation mode: TW layout on exit is recalculated based on fullscreen sizes 207e963: VirtualDirectory checks access only for the new files as before 5c11491: added extra logging 07df0a4: IDEA-120011 quick documentation looses styling 64f0a14: Improvement for IDEA-122851. Only one button case. 7839bb6: VirtualDirectory.checkAccess does not break VirtualFilePointer + checks access on developer machines as well 15400e5: Platform: JBCardLayout keeps focused component when after swipe finishes bfd1504: Platform: ability to set add-remove-edit panel borders 6e59f59: Platform: update action toolbar on showing to avoid situation, when it's not displayed until IDE gets focued b362435: Platform: swipe animation in wizards 6c2afa2: IDEA-123011 Rebase strategy fixed in case updating without local commits de5c580: [git] fix reference to executable 4989f68: [git] temporary disable several tests 22479d4: [git] Fix retrial if index.lock error happens. 05a5137: [git] Fix GitCrlfProblemsDetectorTest: less mocky cda0a73: [git] fix GitBranchWorkerTest: less groovy 1ed8a0d: [git] GitSingleRepoTest for tests that operate with 1 and only 1 repo 6f1906b: [git] fix change provider tests: operate on io.Files for setup + more 9e5fa74: [git] cleanup 3ff96d2: [git] various tests fixes 4167521: [git] simplify tests dir structure a9b1b89: [git] remove some obsolete tests 80a0e5d: [git] convert & fix GitChangeProviderTests ed4c062: remove unused e4f8f1d: [vcs tests] move some static utility methods to VcsTestUtil daad6f0: [vcs tests] remove code duplication: move some methods to VcsTestUtil 0dcb5c5: [git] Fixing GitRebaserReorderCommitsTest 378af2a: [git] remove some obsolete test c7e1efe: [git] rename test to what it actually tests 103d25b: [git] convert & fix GitMergeTest 4734402: [git] remove some obsolete tests da6d90c: [git tests] fix some strange Groovy error 65fca10: Fix GitScenarios: suppress non-zero exit code exception e6dc680: [git] more GitHistoryUtilsTest fixes d95eb30: [git & hg tests] support failing in case of non zero exit code 7d8915c: [git] Convert & fix GitHistoryUtils test 581848a: [git] Fix GitLogParserTest f42eb11: [git] remove some unused test utils 3abe205: [git] Fix GitConfigTest: convert from testng, cleanup 79c581f: [git] Remove some obsolete not very good test e5884b6: [git] convert GitLightTests to be GitPlatformTest 91139fb: [git] Extract GitPlatformTest from GithubTest to reuse in some git tests 98c795b: [git] rename the basic old deprecated test class to free the name a859eec: IDEA-122924: FileProcessingCompilerAdapterTask ignores value of ValidityState 5b820a0: Better sizing and layout for buttons (IDEA-122991) 22b227a: IDEA-122918 MarkupModel.removeAllHighlighters() does not invalidate 817272b: getMaxId() method 71b615d: do not search for executable during class loading 0fc8215: javadoc 04dde29: cleanup ef0ff58: isWriteActionInProgress() method added 7fe17ae: Merge remote-tracking branch 'origin/master' 39a92b9: Merge remote-tracking branch 'origin/master' b5eee92: Aqua: Navigation popup has wrong visual text alignment (text is too close to bottom border line) 520a6fe: compareTo uses non-final vars: check methods from Comparable interfaces only c90293c: IDEA-123005 deadlock in awt thread e0a6809: remove duplication 9f03f56: fix test 066e3c0: #IDEA-122793 fixed f591119: Parent shadow for IDEA-122991 dab310f: Font size, translucency value for IDEA-122991 2436c9c: unused import e4530f1: Rename CertificatesManager to CertificateManager (not plural) to be consistent with related classes and components 2f634cf: IDEA-102693 Can't update maven repository (see comments in http://youtrack.jetbrains.com/issue/IDEA-122485) fb27b19: EA-55354 - IOOBE: MarkupModelImpl.addLineHighlighter 573eb8b: Cleanup in CertificateInfoPanel 979822c: IDEA-119804 second click on item in watches panel should toggle edit mode - avoid NPE 0ded360: jps-plugin-system extracted to separate jar in standalone jps d06b4bf: fixed handling AbstractMethodError by exception reporter, avoided self-contradictory messages, removed unused 'essential plugins' list (IDEA-122870) 9d97c23: IDEA-119804 second click on item in watches panel should toggle edit mode b662a95: StartupWizard2: icons 1881195: svn: Refactored SvnAuthenticationProvider - removed unused code 9465f77: IDEA-121752 Get cached authentication data through special SVNKit authentication provider and not directly from runtime storage (to utilize logic for creating appropriate storage key) 675031e: IDEA-96467 Block selection is not respected by Toggle Case action b6d7e79: StartupWizard2: initial fb58763: Merge remote-tracking branch 'origin/master' 5ab2bd8: PY-12497 .NET stubs are generated incorrectly when name is imported instead of module 5a8919a: Merge remote-tracking branch 'origin/master' c3176f8: fix colors on LAF change on Mac [the real one] d845005: junit: disable manual modification of parameterized test names (IDEA-122937) 73b01ed: icons (IDEA-119742) c7eb840: new inference: use available in stack methods, do not cache if this info was used (IDEA-122406) a4f36f2: anonym to lambda: rename conflicting locals (IDEA-120221) 72203e2: default methods: check for super class is now needed (IDEA-122720) 8e237e0: fixed PY-12476 Django: Nose Test Runner: not able to run django tests with django 1.6: AttributeError: 'NoOptions' object has no attribute 'with_fixture_bundling' 2dd7e92: disposeResult default impl 6a349f3: Merge remote-tracking branch 'origin/master' 94f4e2b: Merge remote-tracking branch 'origin/master' b0bc3ff: IDEA-122883 reverted fix. Status not updated e7fb793: DomImplUtil.isNameSuitable: remove obsolete assertion a926b06: [log] Use IntList for big int arrays. 324407c: [log] Add IntList. d95b41e: [log] Use BitSetFlags in PermanentGraphBuilder. a4fedd2: [log] Add BitSetFlags. 868acd6: [log] Move PermanentGraph and relative files to log.facade.graph.permanent package. c521d8a: [log] Fix 0 size for IntToIntMaps. e9140b4: [log] Move IntToIntMap and relative files to log.facade.utils package. 102ab03: [log] Move PrintParameters. 45c3ad8: [log] Move Flags. 7ec491d: [log] Move GraphAction & ActionRequest classes to vcs-log-api. fdb72b6: [log] Move GraphCommitCell. ec760a6: [log] Move ColorGenerator. 848619b: [log] Delete old GraphFacade. a51b125: [log] Add ListIntToIntMap and use it instead TreeIntToIntMap. 8b23ea0: [log] Extract UpdatableIntToIntMap interface. e65f6b0: IDEA-122883 Log should refreshes immediately after pull c6739a6: IDEA-122949 ChangeListTodosPanel should update GUI on EDT db75a82: on install/uninstall do fireUISettingChange + update toolbars 188bd20: +revalidate() b120397: reset inactive image on UI settings change 6b9964a: update Tab fg on UI settings change b9015d2: IDEA-78486 Column selection lost 39db3bd: Stop ignoring the exceptions. b927ac9: We still need to set a focused button, but now we can use requestFocusInWindow to prevent focus stealing. Jdk6 does not return focus to the modal blocker properly, so we use the requestFocus conditionally. f966367: IDEA-122499 Groovy static imports prefix with get unnecessarily 2454a0a: improve static import processing a35bcae: IDEA-121539 New Mac Messages: Yes/No messages have buttons in wrong order 4886836: Wrong assertion isAncestor returns true even if it is the same window c3e242f: IDEA-118590 Rule matcher for arrangement of Java code does not use the most specific rule 190c324: IDEA-122851 Mac Messages on Java 6: sometimes message doesn't get focus a16a1dc: remove duplicate updateUI & drop restart dialog 03efdc5: fix colors on LAF change on Mac 5cb034b: make editor less sensitive to accidental drags when adding/removing carets using mouse 3f39f7d: IDEA-121787 Multiple Carets: surround with character (', ", etc) works incorrectly c74c2cb: Merge branch 'master' of git.labs.intellij.net:idea/community 7375536: CR-IU-595 - introduce createTemporaryConnection - fix 00d1685: NPE fdd0cb1: IDEA-122928 Duplicate symbols in SearchEverywhere 71a9f36: Initial value of "do not ask" option has not been honored 812ce07: better test deps 17919cb: search symbols under read action 8de434f: cleanup f3a4990: IDEA-122662 Breakpoints dialog: on new breakpoint adding it should get focus 1eddec2: JPS extension loading: skip duplicated urls 6e35800: Merge remote-tracking branch 'origin/master' cac585c: fixed PY-12510 NPE in Idea 13 Python Plugin New Module SDK dialog prevents all python use a48429d: (IDEA-122795) problem with merge during update project fixed dcc87d6: comment added f3cc4e1: EP for upsource added e0e1939: IDEA-122465 Spring: Alt-F1/SpringBeans... navigation doesn't work properly in mixed contexts StubAnchor equals() missing eb997fb: multi-caret typing fixes for Java files 8b26747: fix overriding final method: com.intellij.execution.process.ConsoleHistoryModel com.intellij.execution.console.ConsoleExecuteAction$ConsoleExecuteActionHandler#getConsoleHistoryModel() (in SBT:1.5.1) 6b2fb64: IDEA-122729 Rename refactoring fails on method with spaces (Groovy) 824b8b0: WEB-11399 Live Console: variables defined in the console are not autocompleted (global context) 163f0ea: new master password dialog icon 1b22104: use RegExpFileType in find dialog directly (IDEA-122775) 1d65d9e: update: ignore errors on automatic updates (IDEA-122848) 7df6897: testng: allow in ui "all in project" for group, pattern, suite configurations (IDEA-122835) 0beea24: NPE during completion for lambda params 6065112: IDEA-122796 Call to 'printStackTrace()' should warn about overridden calls as well 2868293: IDEA-122281 Do not explicitly specify "--force-interactive" for svn commands under terminal (they will be interactive by default if under terminal) 9449019: IDEA-102508 error status of run configuration is not updated after fix 0b83ac9: IDEA-122839 wrong ToolWindow title 933956c: custom annotation checkers should be applied to alias annotations 925a430: Merge branch 'master' of git.labs.intellij.net:idea/community 5305823: PY-12521 Wrong skeletons generated for static methods in CLR/IronPython 61fdaaa: Merge branch 'svn_18_3' ea818c8: PY-12332 "Generate stubs for binary module" in IronPython with non-Camelcase names not available or presented (Env test added) 0db5440: Better approach for IDEA-122869 Change signature: unreadable message 86e7362: IDEA-122863 Settings / TODO: the user-defined color is shown incorrectly after making changes f072cf4: don't assume that *.txt is mapped to Plain Text (IDEA-122775) 915a3d6: do not show Local History group in console editors 6b9fcd0: IDEA-122865 Settings / Editor / Color and Fonts: disable ability to edit color for inherited attributes 904069b: IDEA-122852 Mac Messages: underscore (broken mnemonic) on some buttons 44818b4: IDEA-122866 'Terminate the process after disconnect' checkbox is switch off by default d134cea: IDEA-122869 Change signature: unreadable message d9a27f7: Typo ffe5268: IDEA-113949 Read output of svn commands with "--xml" option using UTF-8 encoding 80126cb: IDEA-104933 IDEA-113949 Use temporary file to specify message for svn commit operation b197f05: "Line/block comment at first column" options to be taken from language-specific settings [CR-IC-4952] 6495aaa: Better "do not ask" checkbox re-layout. c47c4f5: comment about special negative timestamps and long value for milliseconds 02a51bf: svn: Refactored CommandExecutor - methods extracted 7a4cf37: EA-55230 github: do not use deprecated method a761ae4: svn: Make CmdVersionClient utilize CommandExecutor (not to duplicate common logic) d19b9b4: svn: Make SvnVcs.isVcsBackgroundOperationsAllowed be always true if command line is configured 5705d76: IDEA-122529 Wrong event log icon 4b4d831: fix regressions for copy/paste behaviour in column selection mode a02159e: IDEA-122861 IDE fails to open HTML files on a system with Turkish locale b1e0f63: do not do resolve in dumb mode!!! 40b2cd3: IDEA-122164 Possibility to change default prompt style in LanguageConsoleImpl 9f58257: new inference: String::length should be exact (IDEA-122191) 5605b2e: field can be local: quick fix to register stop-annotations is added (IDEA-122836) 7e1ce96: Focus was broken for F12 on Windows. a1456bf: warn about active method breakpoints on debug session start 319a7b0: Bug fix: IDEA does not recognize managed dependencies usage in current pom.xml c6e39c5: IDEA-122757 IOE at com.intellij.openapi.util.io.FileUtilRt.doCreateTempFile e0ff391: IDEA-122637 CCE at com.intellij.debugger.ui.XBreakpointGroupingByClassRule.getGroup 4c49d4f: reverted fix for IDEA-122637 1896ad2: IDEA-121916 Allow to select several words with multiple carets with mouse 446b34c: Eliminating ugly black window with jdk7 and jdk8. b814912: Improove code readability. +review CR-IC-4863 29f8c8b: IDEA-112576 ("if statement replaceable with switch" quickfix is not equivalent for string targets) 390da27: Bug fix: replace addListener() with removeListener() inside ToolWindowManagerImpl.removeToolWindowManagerListener() +review CR-IC cd14dd0: IDEA-122838 Add UI click counters to the Editor context menu bc37a63: IDEA-122607 "SVN Repositories" tab don't closing 104f227: gFileChooserDescriptor renamed to getFileChooserDescriptor 76c3d23: lazy DirectoryInfo order entries calculation d822760: no expensive groovy runnable icon calculation in dumb mode b7b7efe: IDEA-122152 Retain 'the oldest' caret in editor on Esc press e949ad5: remove finishExecution form platform 2c67c88: IDEA-122837 Add UI click counters to toolwindow buttons 2402106: IDEA-122833 SearchEverywhere: renderer is broken in Jr. IDEs 530e825: base script checker 4e1ade3: IDEA-122707 @BaseScript initial support bdd42a7: resolve annotations inside injected fragments 894430b: optimize method call checks for Groovy Injector using Injection cache fcd90cf: Injection cache extracted from Concatenation injector for using in Groovy injector as well 3538327: DelimitedListProcessorTest: move to corresponding module e1d9fc35: dom-*: add missing license headers 47a0146: update netty — https://github.com/netty/netty/issues/2331 7e47fb6: wip bootstrap — support packaged app remove NodeJSRunner — platform impl is enough remove MochaDebugProgramRunner, NodeunitDebugRunner, NodeJSDebugRunner — DebuggableProgramRunner is enough 879f4bf: Content and source roots can now be files 7bed5dd: Disable SNI in IDEA to avoid "javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name" df25676: DomUtil.hasXml: use DomElement.exists() to avoid costly getXmlElement() fixes + tests CR-IC-4788 68ba599: IDEA-121510 JSP: reindex: INRE through JspSpiUtil.isIncludedOrIncludesSomething(): check for JSP includes should be invoked from pass itself, because it involves some index processing. bc95c5f: checkForSettingsDamage(): throw after tearDown() 3eb6d33: Merge remote-tracking branch 'origin/master' 7a2f35c: Merge remote-tracking branch 'origin/master' 7b940e1: rollback 4a4c6e3: Merge remote-tracking branch 'origin/master' 5697391: PY-12332 "Generate stubs for binary module" in IronPython with non-Camelcase names not available or presented (TODO: Add env tests) f8b3fa2: testdata fixed fb09780: IDEA-122661 "Method overloads method of superclass" inspection missing default methods in Java 8 interfaces 8632fe1: testng: forbid to run abstract tests not annotated with @Test (IDEA-122724) 654463b: use obsolete TW title property as Stripe button text 9c56b62: EA-55173 (diagnostic) 3d7bf9f: layout (IDEA-122614) 40424a1: wildcard substitution partly reverted (IDEA-122700) b500c13: effectively final: check usages inside inner classes/lambdas (IDEA-122686) aa6dbcd: collapse statement lambda to expression lambda: enable for value compatible lambdas (IDEA-122785) b19b34a: shorten qNames on adding explicit type arguments (IDEA-122667) 43b8f9c: stream migration: collapse identity matching (IDEA-122706) c82446f: java: .class stub builder API cleaned from explicit ASM dependency 32cf812: Merge remote-tracking branch 'origin/master' e714041: Further reduce size of responses by excluding almost all unused fields f39ed60: java: .class stub builder migrated to ASM 5 614e90e: Some cleanup in Trello: add annotations, use messages from bundle, and methods from ResponseUtil e1e3863: Exclude comment actions from query to reduce size of responses in Trello 0240a3e: IDEA-122630 AE at com.intellij.ui.BalloonImpl.a 4288833: asm 5 sources renamed 10124af: IDEA-122637 CCE at com.intellij.debugger.ui.XBreakpointGroupingByClassRule.getGroup 68cae1a: testdata fixed a008d21: asm 5 checks 895860c: library declaration for community d7f97b4: Sheets are added to the ide modality. ab2c16b: IDEA-122725 d1e89d1: cleanup e831bea: move method cf71866: moved method 039062c: diagnostics be8accb: EA-55101 - NPE: NegationBroadScopeFix.getText 00cf2c9: Focuses, draggability on mac + jdk6. The messages are enabled with jdk8 and jdk6 2bb7917: Merge remote-tracking branch 'origin/master' adbb58f: update asm to 5.0.1 7ee47b9: Better usability for focus tracer 8162e5a: EA-54991 - ISE: CaretModelImpl.getCurrentCaret 9885d31: test for breakpoint condition and log expression conversion 61094f0: Merge remote-tracking branch 'origin/master' 3c94abe: Properties API further extraction 45d0dcf: Merge remote-tracking branch 'origin/master' 5bd2213: inference: ensure nested methods lift their bounds (IDEA-122681) 86cf8fe: same behaviour for extract variable/constant/field (IDEA-122756) 124200e: IDEA-122710 JavaFX sources should be added when SDK is created eb470ce: IDEA-120443 Groovy: Idea can't compile valid code in implicitly typed statically compiled extension module 938485b: always queue index update in dump mode when idea.schedule.cache.update.in.dumb.mode property is set 87da48c: IDEA-122655 Breakpoints dialog: new java line breakpoint adding is available c98662e: following CR-IC-4653 c0180cf: following CR-IC-4773 f8fc600: Platform: OS X scrollbars (taking system preference into account IDEA-122633 - obsolete registry key removed) c68fd07: use name sequence to determine file types ae53d99: introduce VirtualFile.getNameSequence() to avoid too many String instantiations 297a0b4: do not update contentless indices upon content change + removed unused requestReindexExcluded method cd869fb: Platform: OS X scrollbars (taking system preference into account IDEA-122633) d051e6b: VirtualFilePointer correctly handles moves and copies under existing pointer + roots event are now sent on such changes 4d5269f: try coverage with asm 5.0.1 c15f69b: java name suggestions should work for java ce4031e: avoid opening nonclosed cached file bit map 22168b8: following CR-IC-4636 74576a1: IDEA-114685 Color editor should open with a single click on the color square b38c029: avoid race for reassigning fields 427a0cb: Remove unused ProjectFileExclusionManager / ProjectFileExclusionManagerImpl 7177fd5: IDEA-120730 Editor drops the existing selection when hitting Alt while selecting 09bb6a3: IDEA-104560 Duplicating the first line with line-wrapping enabled does not work well 82b2857: Merge remote-tracking branch 'origin/master' 3da109d: Save documents in EDT in console. 84a28b9: Fix NPE (WI-22515). 79e4e8a: cleanup 9d75bb0: nodewebkit RC — macro aware 8d297a6: AppCode: fixed some shortcuts in the Xcode keymap OC-7210 +review CR-OC @Anton.Makeev 3787230: AppCode: Xcode keymap rearranged to show Xcode shortcuts first OC-4212 +review CR-OC @Anton.Makeev 8da3dfb: Copy IntelliLang-python resources. 5e8f847: Add IntelliLang to classpath. 0178a9f: Add IntelliLang-python to community plugin build. 7a756f6: better caret row color for darcula 7279e47: change prompt to 'In[...]' for ipython (PY-9171) and fix problem in indentation (cherry picked from commit ff89fbe) 60c3bff: [log] IDEA-122300 Show full path in structure filter tooltip 7e4740e: [log] structure filter: increase the amount of max possible folders 224e701: [log] Don't duplicate text in tooltip 9c66c02: [log] IDEA-115897 Call applyFilters() on onFieldCleared(). ab8a24a: [log] IDEA-121948 Possibly fix "row doesn't exist" exception eebccf1: [log] spelling fdf2f79: [log] IDEA-122558 reset filters before applying new ones ca66a26: rerun action for GroovyShell & GroovyConsole 892246e: Fix build for community. d0940bd: Fix build. 54276f2: Merge remote-tracking branch 'origin/master' 621bf17: Handle navigation actions before Terminal. 67f215f: Don't override toolwindow switch shortcuts in Terminal (IDEA-122273). 3c26ebe: Improvement in Search Everywhere field: vertical alignment for text and icons. 98139f6: Usability issue: ColorPicker with Retina e55e917: Fixed remote external tool launch (IDEA-122288). 34ca931: NotNull annotations 08351c7: IDEA-122285 (Native method naming convention) d066c46: Merge remote-tracking branch 'origin/master' e2ba921: Rerun console should save documents as it is done by Run console action. 3f51a8a: IDEA-122344 (incorrect handling of paths around PATH_MAX limit on Windows) 6257b00: Merge remote-tracking branch 'origin/master' 60acb4b: IDEA-122616 0a516f5: refresh html5 schema #IDEA-122531 fixed 85aa2ff: common program parameters: preselect current directory 42cbbb1: IDEA-122653 Bad code green: missing extends list 1efd934: don't compile project before starting groovy console 782dc47: hg log: first block of commits loaded without changes 8ab972c: log problem for empty commit message fixed e04d876: improve master password UE: initial setup fixed a6ec39f: option to ignore 'native' methods (IDEA-122285) ca10464: EA-54946 (IOE: PsiJavaParserFacadeImpl.createExpressionFromText) 5ab135a: make public field final 2d149f4: IDEA-68621 (CVS: with 'don't Remove' option selected in Confirmation/WhenFilesAreDeleted settings file cannot be removed from vcs at all) fd187e3: IDEA-105413 Configure Axis when proxy is used. Refactor usages of awkward Mantis SOAP API in helper methods 5215938: improve master password UE 38ebd87: Merge remote-tracking branch 'origin/master' 1581f3f: Reassign alt+click to multiple carets in PyCharm. 2f2c698: IDEA-122208 Previous errors are sometimes stuck in errors view d487813: Local History: do not iterate newly created directories, unless they are under a project's context (IDEA-122495) 089b5de: IDEA-122507 Groovy: CompileStatic class should be red on private access a32f67d: cleanup GrUnresolvedAccessInspection d441984: libnotify version fixed to avoid API incompatibility 2ad59ed: delete/safe delete: restore delete (IDEA-122639) 9845ef2: new inference: capture nested call case fixed (~Collections) ccd70ec: Platform: OS X scrollbars (NPE due to concurrent issue in background createEditors) 6fd1324: UnscrambleDialogTest: RunContentDescriptor are not automatically disposed in tests, dispose manually 6452f5f: Merge remote-tracking branch 'origin/master' f1b3b1c: expandable item has extra space under Retina (Oracle JDK) 7fd26d1: CR-IC-4877 (cleanup) da5b8f3: Slim injection directly in the tree a87792f: CR-IC-4915 (cleanup) e8fa6ae: IDEA-122626 Github: try to reuse existing access token 99c0991: cleanup 2668819: cleanup 0aabc49: removed obsolete run configuration template from default project settings f1c1d23: verbose assertion 6a86074: TemplateState: yet another debug info e30e9a7: WEB-11445 AngularJS filters break Emmet 79aa741: IDEA-122476: Pack JPS distribution into one zip file 509a630: cleanup 99870ef: optimisation: overload to reduce varargs array allocation 52fba19: optimisation: do not allocate list unnecessarily df3c020: cleanup 5004732: optimisation: concurrent sets 0d27873: optimisation: no expensive Class.getmodifiers() and checkAccess() calls 913d755: avoid unnecessary SecurityException d687355: IDEA-72979 DOM: make DelimitedListConverter work nicely with TagValues ae33002: update navbar on frame selection 062c0f1: EA-55032: there is no reason to request UI update if update queue has been already disposed ea9d3c6: extract BasicGutterContentProvider — we need gutter content provider in any case to provide pretty UI (in/out markers) ba95020: Balloons: fix for inverted "contains" condition (causes NPE and wrong behavior) c351f3b: Add toString method in diagnostic purposes c33e62c: TemplateState: yet another debug info f8551ee: IDEA-122565 (CVS: files shown not under version control in 13.1) 545e353: fix property value a4747a9: nodejs 136.1205 published 37cf7a5: Empty descriptor PSI anchor fixed e6c34e4: logging 8f9d0ab: Platform: OS X scrollbars (do not directly cast view's parents to scrollbar) 944dfe2: Platform: OS X scrollbars (leak in AWT listener fixed + only keep scrollbar visible while mouse is moving over the scrollpane) 4a1dd3b: RUBY-15071: restoring an old logic which fights with extra new-lines 6bc99a3: IDEA-122548 Exception while inlining method 4686315: A class may not at the same time be a subtype of two interface types which are different parameterizations of the same generic interface(IDEA-122475); revert workarounds for javac 6 bug f6c426c: IDEA-122561 Some code is not shielded by "ide.mac.message.dialogs.as.sheets" key 9812ab2: EA-54956 (ignore corrupted annotations) 1f43d17: Merge remote-tracking branch 'origin/master' f6a41ef: IDEA-105413 Update Mantis integration tests 58a7e99: PY-10377 (allow non-journaled local FS to be watched) 0b836c0: Merge remote-tracking branch 'origin/master' 079a063: fix icons preview 75afd8d: findIcon without caching 73a0dad: don't hold console on a hard reference until the project is closed 04175e9: restore text search in directories outside project (IDEA-122322) e8932d6: IDEA-122578 Support content roots under ignored directories 2a938a0: Painting on retina 1def1d0: Restore import pydev_log 01c054d: IDEA-105413 Update pagination in Mantis 730951b: IDEA-105413 Remove filter from serialized form of Mantis project in settings a6e8deb: IDEA-121156 Editor Caret Odd Behavior For Blank Lines 0c9b479: Merge remote-tracking branch 'origin/master' dfd3a17: Don't try to stop threads as it has little sense in general and causes exception in Python 3.4 (PY-12317). 5461aa2: IDEA-122519 No enclosing instance of type XXX in scope b711782: IDEA-122464 Unused declaration ignores annotation patterns 4c4fff5: EA-55045 - ISE: MethodParameterInfoHandler.updateMethodPresentation a6218a4: process declarations for cls file should provide classes, otherwise cls classes in default packages have no chance to be found from inside cls (IDEA-122486) e350d3b: IDEA-105413 Remove awkward public static mutable project and filter from connector 76f7706: [log] move "Select..." up in multi-user filter to match multi-branch one 3a6a0bd: [log] IDEA-122429 Remember current value in branch/user filter popup 1b32efc: IDEA-122192 highlight usages should have highest priority 884db72: IDEA-122492 identifier highlighting conflicts with current line 0ab930d: Merge remote-tracking branch 'origin/master' 922b4f4: fix clear button position 75ef000: handle brilliant obsolete and deprecated marks e66d2cb: Painting optimisation 5a4b51e: more logging for mysticism b390943: place the netty-ID workaround code so that it is executed before any netty-dependent code in platform runs b26a980: EA-55106 - IAE: LeafPsiElement.replace bf098f6: IDEA-121693 Postfix completion for System.out.println() IDEA-122459 Postfix completion: template for String.format 595fa4e: be prepared to plugin bytecode issues when loading extensions (IDEA-122436) 5447b3e: leave at least one CPU core free during indexing: it improves IDE responsiveness noticeably aaa659e: IDEA-85572 only splitter fixed (form deleted) b9975e2: EA-52995 - assert: RefreshQueueImpl.execute 3ec59b5: IDEA-122536 Debug: App Freezes on launch after update to 13.1 ffcb263: don't trust lookup.isCompletion() baea900: EA-52995 - assert: RefreshQueueImpl.execute 103c590: EA-54103 - SOE: don't check need of instance methods if we don't need to process methods at all 23596b9: Groovy Shell & Console actions: ask for target module before compilation b9bbd55: IDEA-122505 Incorrect cursor position in "Expression Evaluation" window 798ac7f: WEB-11240 Live Console: implement multiple line input 409dd73: IDEA-122179 13.1 make/compile is much slower than 13.0 IDEA-122367 Build(make) is extremely slow 6ad2bf1: xdebugger java breakpoints: obtain project directly instead of fetching it via DataContext 003bfed: testdata for IDEA-122509 d8747df: stream: do not suggest collect when filter depends on collection (IDEA-122410) b929552: IDEA-122392 intention: "Create Local Var from instanceof Usage" does not format generated code c9e83b2: ui: popup-based expansion hints be4ba0a: CommonProgramParametersPanel — use native mac chooser working directory ensure that we set system dependent text a49b7c3: IDEA-122498 Code completion with @DataProvider does not work anymore e6547e3: poly conditional expression type = target type (IDEA-122401) 77f6284: IDEA-105413 Update Mantis repository to emulate "All Projects" pseudo project on client side if it's not available on server 9440209: Extract RemoteFetchTask and ComboBoxUpdater in TaskUiUtil class. Also added SimpleComboBoxRenderer class as common kind of renderer in repository editors 01fc6fe: Merge remote-tracking branch 'origin/master' eb9c90f: PY-12426 Create inspection that reports django language level specific issues (quckfix added) 1d6aa84: Merge branch 'svn_18_3' 9ededd4: update media values 687bd20: #WEB-6710 fixed aca42b2: provide content types from IANA registered list e609a41: reuse RFC2616 headers from html in REST client (IANA headers list misses some headers) c14437d: dropped RangeHighlighter from BreakpointWithHighlighter e38e4d6: cleanup d46ce2f: ignore missing XInclude in tests [me & nik] a0adee8: svn: Refactored SvnCommittedChangesProvider - determine repository root url using "svn info" command (instead of explicitly using SVNRepository from SVNKit) 64294ef: ui: about dialog converted to popup 0e79a85: ui: allow borderless popups 10f61bc: Cleanup (dead code, typos) 4da3a18: Cleanup (avoid pointless "cannot restart" exception from the IDE being debugged) 12757b7: jdk 1.6 painting ee49376: IDEA-122467 Exception in creating syntax highlighter shouldn't prevent opening a file dbd2050: remove dead CacheUtil code 17c3959: svn: Refactored SvnCommittedChangesProvider.getCommittedChangesImpl - use SVNRevision.HEAD as default "before revision" instead of explicitly calculating latest revision number available 28abbac: Gradle: cdata escape of null string 06fe402: [log] Fix smart refresh, in one commit case. 0ace194: Merge remote-tracking branch 'origin/master' 4d042e5: Windows/Linux fullscreen: more useful layout for clock and "Toggle Full Screen" button. 7e41480: IDEA-122425 "java.awt.AWTError: no screen devices" when trying to run Upsource with JDK 1.8 7c1d2e4: IDEA-122192 highlight usages should have highest priority 8852b34: fixed starting build scripts from IDEA 42975ca: IDEA-108515: Update Resources on frame deactivation should not perform compilation f27eb57: Platform: OS X scrollbars (registry key for disable) 3de588b: make inspection warn on anonymous classes e92a1a9: IDEA-84172 (Intention "Inner class is serializable while its outer class is not" doesn't warn on anonymous inner classes) 71ebc41: Bug fix: Don't pass unresolved properties to command line 6334dee: svn: Refactored SvnCommittedChangesProvider.getCommittedChangesImpl - use common client factory model (instead of direct SVNLogClient usage) 56e63f3: IDEA-122377 (do not show plugin error dialog in tests) a70bef6: PY-12374 (JRE-w/o-JDK detection in startup script) c63e915: Current branch preselected in Push Dialog 4c8ab4f: IDEA-122310 Hg: "push as new remote branch" should not require selected "Branch" checkbox ffa983e: IDEA-122358 Push should use 'default' path by default 75ce562: remove hgroup from html5 tags 86f09b2: svn: Refactored SvnCommittedChangesProvider.getCommittedChangesImpl - removed "filterUrls" parameter (usage of empty string array provides the same results) 8d0a079: unused symbol: should not apply to the public constructors of Externalizable classes (IDEA-120639 ) 4671189: IDEA-122138 formatting for Spock by default 00827c2: fixed loading JPS extensions in minor IDEs f6975dd: IDEA-109467 Too big tooltip for Close Icon (Debug Window) 55dc7eb: #WEB-8630 fixed 4cd7b8a: IDEA-122398 all wraps inside plain GString injections should be NONE cc7c165: fixed loading JPS extensions from plugins inside IDE process; JPS modules extracted to separate jar to get rid of idea.jar in classpath of external build process 7355e5c: Platform: OS X scrollbars (leaking AWT listener temporarily removed) 3751fb2: IDEA-25231 Resource Editor: Remember Group node foldings + arrows in properties structure 3c5ab6b: EA-53645 - assert: ComponentManagerImpl.getComponent 300f96e: EA-54605 - CCE: GradleConfigurationsNonCodeMembersContributor.processConfigurationAddition 0119122: Platform: OS X scrollbars (do not paint unnecessary scrollbar's background in the console) fb0df17: Platform: OS X scrollbars (mouse hovering threshold + animating track appearance) a42ebc1: Platform: OS X scrollbars (do not hide scrollbar while mouse is moving around) 17f72c9: Platform: OS X scrollbars (components hierarchy changed IDEA-122255 + handling components addition/removal after scrollpane creation) d452ad6: IDEA-122388 Replace with 'Integer.valueOf()' call raises Exception a97bc5c: IDEA-121180 Exception: Introduce parameter from final local var in anonymous class 6af1d4e: field can be local: group by top level blocks (IDEA-121490) f2c905d: fix extra border b5ed665: IDEA-122331 Cannot set breakpoints on multiple selections - corrected isEnabled 1db99bf: IDEA-122331 Cannot set breakpoints on multiple selections 08366a8: registry property to disable injections highlighting WEB-1475 and WEB-11251 partially fixed 26cf621: Icons from option panel, cosmetic changes, magic numbers eliminated. 39dea62: reverted fix for IDEA-121089 Rearrange watches in Debug toolwindow with drag-and-drop (it disables DnD from editor) 266a15d: svn: changes cache: Optimized incoming changes collecting using "svn status -u" command (available when Registry key "svn.use.incoming.optimization" is set) 4ba2acc: github: implement new Task API 5cc1d7e: vcs: changes cache: Optimized files revisions collecting - do not get revision for same file several times (duplicate files are removed from revisions collecting) eb66628: WEB-7303 — node-webkit debug works 38168d7: testdata after JDK-8034223 90698ca: IDEA-122014 Extract method duplicates analysis fails in case of inner classes ed13961: IDEA-122347 No quick fix to add explicit type arguments 8abeb2b: Merge remote-tracking branch 'origin/master' 162d49b: exception on exit 4006d8a: CR-IU-652 related to IDEA-114022 false positive inspection error "Cannot resolve query parameter '2'" 5cdd5da: IDEA-122382 Exception in Gradle: update failed for AnAction with ID=CreateRunConfiguration: com/intellij/execution/junit/PatternConfigurationProducer 106529a: IDEA-94140 Run Configurations: first configurations of every type is shown below Defaults on creation bc39cfc: Use clientIncludes/clientExcludes to filter foo-client.jar content. 9c76da9: Remove unused field webArtifactName aab8fbd: Rename MavenArtifactResourceConfiguration to MavenWebArtifactConfiguration a1bf8d4: Minor optimization 2f5eee0: Add expected file name in assertion message 0b6f6ef: IDEA-122192 highlight usages should have highest priority c26198d: Reusing offscreen image to increase performance. 4d20694: IDEA-99194 Groovy: valueOf of Groovy enum should be available in Java code 7476283e: IDEA-121089 Rearrange watches in Debug toolwindow with drag-and-drop 96c6021: introduced INDEX_DATA_OUTDATED saved indexing state that is set on index invalidation upon events. It allows us to clean index data properly upon file deletion and also avoid index clearing for changed files upon shutdown (IDEA-118211) 390cc17: follow up for IDEA-122272 5339701: IDEA-122050 Groovy. Good code red. @Typechecked. 47ce0aa: Merge remote-tracking branch 'origin/master' 150b3c1: use small font for editor when tabs font is small 3a32c96: Try to receive current user information instead of issues from Redmine to test connection 9aafaf3: Add several utility methods in ResponseUtil and TaskUtil 074efa8: Check that username is not empty in RedmineRepository#isConfigured f7b41fe: IDEA-119917 IntelliJ Platform Windows Launcher (pin to windows task bar) 3e87317: [log] fix graph tests when called from idea ultimate badd156: + notificationType2messageType 58a9de5: Tooltip is bigger than need in case of lack of space. UIUtil: CSS update (it works but has some mistakes) 0de1ef9: ability to customize "Options" text 8242749: IDEA-119475 Can't remove file reverence 4e20c7f: IDEA-121779 set correct context when creating extracted method body. If there is no correct context set original used classes are over covered by the classes imported by default. So the extracted class gets broken. e8b960c: IDEA-122105: manually set use scope for ReferenceSearch because the default search scope is restricted to project. So libraries are not included. It leads to empty results if the highlighted file is a library source file f17ed0c: Groovy reassigned checker: simplified caching 75dea1d: IDEA-122125 "Close Active Task" fail on commit 7983e89: compilation 453c95b: IDEA-116904 Gradle: Expand ide junit execution/report facilities to tests run via gradle b9d8057: sm.runner: StatisticsPanel row selection fix 3b538ef: made filters table cells editable fcc820f: revert change of http handlers 040e1d7: Merge remote-tracking branch 'origin/master' ec5b1cd: initial WEB-7303 Add support for debugging with node-webkit 74b15db: fix nullability 8b1944e: extract checkPath e1d36c7: log most frequent unknown extensions only if indices were used (IDEA-121444) b901aff: alt insert in editor tip: replace may with can b7b8338: reverted 15d941c: cleanup 39eb03d: Merge remote-tracking branch 'origin/master' 22d2a16: copyright: provide write action progress (IDEA-122290) b16c8c7: Updated python plugin versions. db9dd4a: Updated python plugin versions. 2aec833: Merge remote-tracking branch 'origin/master' c3874db: IDEA-122091 Scratch editor > Save as: provide default directory df55839: FinderRecursivePanel: when creating child from updateSelectedPath(), do not fire updatePanel(), also block updatePanel() when in update mode ad32b3b: Merge remote-tracking branch 'origin/master' 18f73e8: project leak via settingsListener e7e0833: log most frequent unknown extensions after full-text search (IDEA-121444) c4b2d85: make favorites dumb aware de6385b: query dumb-awareness from delegate 2368a48: dumb aware a37bf73: dumb aware buttons 62e38db: mention Contract(pure=true) in description 7976cb0: FinderRecursivePanel#updateSelectedPath: focus last list's selected item 1f9f67b: Merge remote-tracking branch 'origin/master' 62ee825: JPS: return modules and libraries from dependencies in proper order (IDEA-122154) c799d76: Merge branch 'master' of git.labs.intellij.net:idea/community 76bf0e3: Merge branch 'master' of git.labs.intellij.net:idea/community c321d51: memory leak in tests 81235aa: CR-IU-595 - introduce createTemporaryConnection 0d792f7: IDEA-122235 Detect groovy scripts from the hashbang line b066fcd: Merge remote-tracking branch 'origin/master' 8da91c3: missed optimize imports quick fix (IDEA-122234) c80dd70: return Advanced configuration tab for java 72389dc: IDEA-120348 Add checkbox in editor, that allows to download cards, not assigned to current user, because it turned out to be confusing 9499ff4: EA-54906 - IAE: ElementManipulators.getManipulator 161297a: IDEA-119863 Extract variable moves variable above label 407a496: IDEA-120595 Fix version number in bundle's message 8e9c741: IDEA-120595 Correctly check STATUS_UPDATING feature of repository in "Open Task" and "Close Task" dialogs 05308c7: [log] Preselect the first commit on log initialization 4701c07: [log] invokeAndWait instead of invokeLater a5af202: [git] fix typo in comment 1ed8560: [git log] IDEA-121969 don't request changes on start & refresh afdb8dd: [log] IDEA-121969 Don't load Changes on start and refresh 5f1d22f: [log] cleanup 8ab7cfd: [log] Simplify code & comments: no need to consider recent commit count 768265d: EA-54739 - assert: QuickEditHandler.<init> 859689e: IDEA-122283 Notification.expire() doesn't work if Event Log toolwindow hasn't been activated yet 86166fa: coverage: build trove4j to be compatible with 1.5 6f29a21: Merge remote-tracking branch 'origin/master' 1fe0dd9: EA-54916 exception in PhpStorm commandLineTool plugin aa6d3f6: Merge remote-tracking branch 'origin/master' c341934: better getPriority description 99fed4d: IDEA-119475 Can't remove file reverence 5924163: optimisation: lock-free sets cce3665: cleanup 80cbf54: notnull 959161e: test fixed 3a250971: notnull 1f0dcc2: feature usage for postfix completion 5aa3ffb: changing mouse shortcut for QuickEvaluateExpression on Linux to avoid conflict with add/remove caret shortcut e0bb6bd: IDEA-121963 AIOOBE at com.intellij.refactoring.introduceVariable.IntroduceVariableBase.collectExpressions 0bbad3a: IDEA-54392 (show annotations in type migration dialog) 34d89f6: Cleanup (pointless code; formatting) 2e878bc: IDEA-114022 false positive inspection error "Cannot resolve query parameter '2'" 1df86cf: IDEA-120430 (Format string %c with integer argument should not be shown as error) fde4e85: add javadoc url dumb aware 56458c2: make copy button dumb aware f536137: IDEA-120563 9e5d095: postfix templates rebranding d502927: postfix: gray example text (^zolotov) fb4cb3f: Platform: OS X scrollbars (table cell animator fixed) f9a8d50: IDEA-121067, EA-48867 Uncertain editor bug 10659ce: fixed firing rootsChange event on changes in libraries and SDK (IDEA-121272) ab5d415: Merge remote-tracking branch 'origin/master' b5be271: add global message to push dialog 29b0996: cleanup 1dbf9f3: cleanup 60f6491: prepare to fix WEB-7303 — reduce dependency on ExtBackedChromeConnection, add node-webkit icons 2ecb8b1: init WEB-7303 WebStorm: Add support for debugging with node-webkit. 0d8b9ae: deprecate unused method 54439ef: EA-53722 a8aebce: Merge remote-tracking branch 'origin/master' 1c63f99: tune mac scrollbars color under darcula 2025e78: [git] log suppressed output by separate logger f3e571b: [git] suppress stdout by default 5b25e65: [git] cleanup adccc14: [git] reuse parent logger f7f812c: [git] cleanup 5eec291: diff: enable/disable 'merge parameters' text field depending on 'Merge tool enabled' checkbox 365c3b8: IDEA-99129 diff: remember 'external merge tool' settings ada3f58: fix compilation af02623: fix compilation 422f7ad: forbid multi selection for unwrap (IDEA-120869) 3117a5a: delete from project view: show same safe delete dialog (IDEA-120945) 366670a: junit: exclude resources from test run (IDEA-121076) 4e081bc: prefer tests over main on test methods (DEA-121541) 8b37b2b: overload resolution: compare SAMs erasures c464f19: IDEA-122129 agentmain method is highlighted as unused 3704bfc: IDEA-121234 IDEA can not update method return type 30c779b: schedule cache update in dump mode on by default c7648e1: CR-IC-4717 name refactoring 9c7e7ed: Merge remote-tracking branch 'origin/master' 3457c99: CR-IC-4717 review result fixing 035d3eb: vcs: changes cache: Refactored ChangesCacheFile.RefreshIncomingChangesOperation - methods extracted 0de2170: Platform: OS X scrollbars (do not hide scrollbar while grabbed by mouse) 8eabdc7: IDEA-122142 on new Tag creating dialog focus moved to tag name field 1f16202: Platform: OS X scrollbars (unnecessary resets of scrollbars in editor) cb0037f: Platform: OS X scrollbars (incorrectly calculated indents fixed) ff2ecb3: IDEA-122188 IDEA 13.1 deadlock when loading project b7b410b: Add org.jetbrains.plugins.vagrant plugin 3e7913c: more tips and tricks d06c01c: Platform: OS X scrollbars d910f8b: vcs: changes cache: Optimized incoming changes processing - call FilePath.isUnder() only if we definitely need to (corresponding change indicates either parent was replaced or file was moved/renamed) d00772e: tune commit dialog to show global messages 105781f: git edit global message 76d0e4f: vcs global message initial e0dd82f: split buildHtml method 5a4b91e: vcs: changes cache: Optimized incoming changes processing - use cached value of index file length (instead of always calling native method RandomAccessFile.length()) 224598d: postfix completion tip f944608: catch any error from EP impl 1fa1472: add custom line split action for python console (PY-12224) 73346a2: Group by Directory dumb aware bfec045: expand all can be dumb aware 18d2a02: make browser panel action dumb aware 0ce3ced: make cvs tool window dumb aware (to e.g. browse CVS repository while in dumb mode) db0aa77: EA-54889 (NPE: CvsAnnotationProvider.annotateBinary) 2b1f5c1: make CVS actions dumb aware e8e8818: IDEA-122132 Maven: filtering of deployment descriptors support filteringDeploymentDescriptors option d8051db: EA-54696 - assert: FileManagerImpl.findFile 232212c: Return NONE connection type for null. da6d210: Gradle: rely on external Scala resolver extension declaration 773042b: save/restore psi elements 5c0ec9d: java implementation for psi externalizer bcd6ce9: Lang EP for psi <--> String conversions 86914b1: IDEA-117507 (lazy progress manager initialization) 7326052: obsolete highlighting 0517608: Typo b2f04a3: EA-54467 - assert: GroovyAccessibilityInspection$.fun 68a2121: scratch: introduce max visible size and better language filtration be322d6: IDEA-97026 Debugger: 'Help' button in 'Customize data views' dialog should exist b0a3d30: creating django project from python plugin 2a9abea: Temporarily disabled "only VCS changed text" checkbox due to [IDEA-122040] 0fb6648: [IDEA-116058] reformat code over selected text forces optimizes imports option. Temporarily disabled "only VCS changed text" checkbox for directory formatting. 56270c5: save/restore run configurations 450be84: IDEA-118548 Applied "locale settings for Mac" fix to CmdVersionClient 965b384: EnforcedPlainTextFileTypeManager: Use FileContentUtilCore.reparseFiles() instead of makeRootsChange, [CR-CR-IC-4656] comment 5ae8b51: Groovy: use method can be used with a list of classes 328daa4: fix HtmlCompletionTest.testXhtmlCompletionInHtml fd55393: Groovy: closure signature infrastructure. Closure signature implementations for PsiMethod and GrClosableBlock without state. Some utility signature implementations c2c368d: IDEA-121042 Disable certain types of documentation dialogs 7e48866: EA-54551 - IAE: ResolveUtil.treeWalkUp a5cc688: fix unboxing detection for equality operations and more than 2 operands fa8030d: EA-54780 (AIOOBE: ExpectedTypeUtils$ExpectedTypeVisitor.visitPolyadicExpression) 1bc249d: EA-52755 (assert: ProblemDescriptorBase.<init>) 97bd1ac: Tips update: IntelliLang 7adc32a: don't create UI in headless environment f4cd155: renderer is already receiving proper bounding rectangle (see JavaDoc) #WEB-11280 fixed bb3283e: Add meta shift B alias for Go to type declaration action in MacOS keymap 5e27502: fix missing CSS in plugin-specific tips f38c1c0: Merge remote-tracking branch 'origin/master' 219506d: new inference: ignore return dependencies of a variable when proper bound is present (IDEA-119535) 766bdc0: new inference: method reference constraint for the case of return type depends on type params (IDEA-122100) 51194e4: Fix emmet surround action. Replace unmodifiable set with modifiable one 15eb603: Merge remote-tracking branch 'origin/master' 170cf57: Merge branch 'master' of git.labs.intellij.net:idea/community 222b27b: IDEA-121738 Shift-click in gutter doesn't create 'no suspend' breakpoint anymore (after review) f37e655: fixed NPE when toggling a breakpoint on a line with comment 4482c9d: CR-IU-624 - make JavaDebugServerModeHandler the abstract class 0ab82a3: trunk is IntelliJ Idea 14.0 118d0ef: Merge remote-tracking branch 'origin/master' ad8a60e: [log] invoke handleAnswer (which manipulates with UI) in EDT 4b93624: Support properties loaded via properties-maven-plugin 1cfcd2d: Fix editing of a remote python sdk. 4032773: style: introduce tip variable fa3b014: CR-IU-637 remove fileType parameter 09a7e02: FinderRecursivePanel: always re-create child element as existing instance might refer to previously selected value of parent b8c5d87: introduce registry property: ide.scratch.enabled and small cleanup ee1aa0b: adjust popup size cfe4903: IDEA-122032 log problem with missed appropriate branch head file 7092b7e: EA-54824 - NPE: ModifiableModelCommitter.createDFSTBuilder 9cf91c4: Merge branch 'python-fixes' 835183a: CR-IC-4719 revert "pass value to renderValue" 9307222: fixed PY-9367 Instance attribute defined outside init: missing underscore in inspection name 1d66053: style 822c165: [git] IDEA-119453 IDEA-120142 Keep git error output 7b4e53e: IDEA-121431 New Mac Messages sometimes appear in the upper left corner of the desktop for a split second fc93d6e: fixed option name for PY-9222 False positive on 1-tuple in Remove Redundant Parentheses inspection 5ff6abd: fixed PY-9222 False positive on 1-tuple in Remove Redundant Parentheses inspection fe96d85: exception handling 1671619: initialize compiler options before any further customizations to adapt to lazy initialization of some components inside javac (IDEA-120255) b4b3825: fixed PY-9073 Wrong inspection of redundant parenthesis a4359f0: fixed tuple in return statement option in redundant parentheses inspection 28e65cb: wizard popup positioning fix fox mac (^medvedev) 932fdf2: Don't show modules from python-skeletons in Go To Class / Symbol 068794c: added PY-8367 Quickfix for removing unused parameter or variable 96b2f7d: Merge remote-tracking branch 'origin/master' 524034d: [git log] IDEA-122148 Hide action from non-git projects 8532356: new inference: resolve bounds which are not mentioned by additional constraints before starting algorithm d03d73e: testdata for IDEA-122074, IDEA-122084 8f39cbc: new inference: reject expression constraint which leads to false inside bound set a062d00: quick fix for EA-54736 - assert: MethodCandidateInfo.getPertinentApplicabilityLevel 78aca2e: default update Project strategy should be merge strategy 8484f43: IDEA-122034 status command error temporary fixed 9043ec6: [log] Fix getGraphChange() in GraphAnswer. 94ba424: Merge remote-tracking branch 'origin/master' 18e5363: DomUtil.hasXml: use DomElement.exists() to avoid costly getXmlElement() 51adc66: Merge branch 'python-fixes' 2683078: scratchpad: replace dialog with popup d276f0d: Cleanup 40c0a1b: wizard popup positioning fix (^kb) 67046c7: Don't include paths libraries in Python run configurations for PyCharm fb23b2b: EA-54574 - CCE: GroovyAnnotationAttributeInfoHandler.updateUI cf85fdc: get rid of DefaultGroovyMethods 93f4eef: EA-54612 - IAE: GroovyLanguageInjectionSupport.getTopLevelInjectionTarget 3f3ba45: some NotNulls aa406ec: Merge branch 'svn_18_3' ad01bdc: Merge remote-tracking branch 'origin/master' ee8efc6: IDEA-121826 Link to IDE in 'License Upgrade Needed' popup doesn't work 745ec14: [log] ignore empty lines in branch/user popups 44ec341: [log] IDEA-122051 Better fix case when no current user is defined 6f11629: github: remove deprecated string constant 14f5ea1: Next/Prev buttons stats 565c12d: Merge remote-tracking branch 'origin/master' dbf6107: Create and use checkedPlugins.txt daa6cbc: platform: update check postponed till the application is loaded 2fa0feb: EA-53425 (do not suggest casting to null type) 2805c47: IDEA-103174 (type annotations in change signature) 3ba792a: Cleanup (dead code; pointless exceptions; constants; formatting) 5dda968: show tips on startup statistics 92c73eb: ide settings statistics 82b3c91: [log] IDEA-117920 Remember 'show long edges' setting between refreshes & restarts 0a6d94b: Missed try/catch for MacMessagesException e88877b: EA-54776 - NPE: PsiSubstitutorImpl.toString a4d1145: IDEA-122052 Groovy: blinking red highlighting Any code inside annotations is never compile-static. So don't waste time for inferring. More over it can lead to incorrect result of isCompileStatic() if the inference is started inside @TypeChecked(...) annotation. 6909687: fixed vertical scrolling speed in debugger variables view 77ef485: IDEA-118202 Unable to create default run configuration from Welcome / Configure +review fac019e: Merge branch 'python-fixes' 5e9c513: libs for project templates 4aedbcc: Merge remote-tracking branch 'origin/master' 8caa48a: do not create run configuration for the LightVirtualFiles 61f6205: Show skeletons as "Binary Skeletons" and "Extended Defitions" inside Python SDK in project tree (PY-12407) 9d6906a: CR-IU-617 IDEA-122113 6f7a42f: cleanup f4985e3: IDEA-121896 Delete key doesn't delete CRLF while using multiple carets 2577f91: IDEA-120593 Do not suggest to create 'Static Web' module in IntelliJ IDEA Community Edition if there are no specific project templates like 'Dart'. 1a86a27: IDEA-121301 Setting a breakpoint after navigation to a folded method (after review) dfe4e01: undo should restore primary caret properly (IDEA-80056) e32ac9d: [log] IDEA-122051 Fix case when no current user is defined 660cb5c: IDEA-121301 Setting a breakpoint after navigation to a folded method (added glyph click support) 6fe62ef: fixed test runner for non-python modules 97f5f6c: fixed test runner detection f3f559c: CR-IU-586 IDEA-121892 Hibernate console: after Tab in code completion list truncated query is executed a440a00: Merge remote-tracking branch 'origin/master' 259a9c1: fixed tests 86eda08: [log] IDEA-117753 trim spaces in log filters 8583eb9: [git] IDEA-122086 update repository info after cherry-pick 60adb2f: fixed test data 200205e: Merge remote-tracking branch 'origin/master' 71cbc6e: added update property signature quick fix to the Property definitions inspection bb02dfc: Extracted getPythonSdk(AbstractTreeNode) ac95684: IDEA-122068 Unknown plugin error 38fcfd7: try more times to connect. 6ee4e80: Merge remote-tracking branch 'origin/master' 85a331b: Cleanup. 8e1582f: Logging an error in case of absent name. a33ddd0: Add javadoc for RemoteConnectionType. c9cea5a9: introduce OrphanGuardian interface cadf1a7: Revert "hide on UI changes" 62aa21e: avoid status bar update on internal method invoke c22e314: nashorn conditional breakpoints f03bc43: cleanup 9372f19: Merge remote-tracking branch 'origin/master' 94f10a8: PY-12367 loop variable should be able to reuse on else clause 1b02460: Merge remote-tracking branch 'origin/master' c5294ef: hide on UI changes 3259502: fix NavBar blinking and resizing on Color Scheme change due to async tweaking in updateUI 97eddb8: Cosmetic changes fede9f0: IDEA-122004 Good code red: surefire.forkNumber in pom.xml 016663e: added Change base class quick fix to the Old-style class contains new-style class features inspection ce5b97b: fix UI artifacts after exiting from Presentation Mode 6937b4d: StatusBar doesn't change when perform Prefs -> Appearance -> Custom fonts 0e9cbc8: added convert to new-style class quick fix to the Old-style class contains new-style class features inspection 30d235a: IdeRepaintManager.checkThreadViolations fix during readExternal() 7346c3a: [log] IDEA-118576 Don't show focus border cc3e0c5: [log] IDEA-115902 Fix visual artifact on multi-repo indicator 1146cb6: Merge remote-tracking branch 'origin/master' b991bf2d: PY-11948 Run manage.py Task ignores environment variables defined for Django Console (and Python Console) 8945192: added Remove decorator quick fix to the Problematic nesting of decorators inspection dd6b3a2: added Remove call quick fix to the Trying to call a non-callable object inspection 4e41daa: IDEA-122035 accept "tip" as a branch name d8382bb: remove unneeded read actions d348434: Merge remote-tracking branch 'origin/master' 6248e48: moved unittest tests to env tests ee3f4a5: IDEA-121966 Multiple-Cursor Jumpy f8e6cc5: moved doctest tests to env tests 914621c: IDEA-121295 If property part of new property - unable to introduce new property - Maven db3f6c7: replace tuple with list quick fix for tuple item assignment inspection e7cd951: Presentation Mode: common font-size fix for all toolwindows with trees 12f048b: Wrap with Exception quick fix for Raising a string exception inspection 042305c: EA-48005 Make default value for committed revision in PortableStatus be SVNRevision.UNDEFINED instead of null 0f5ec0d: Propose change signature quick fix for Method signature does not match signature of overridden method inspection 07ecf4d: cleanup 6ac6f4d: IDEA-122049 Mac messages: in some cases parent window is incorrectly detected 5ee2cf2: added remove return statement quick fix for the return from init inspection 1f0a076: IDEA-121995 Code selection is reseted on last line with space if Allow placement of caret inside tabs is enabled 54936df: added rename argument quick fix for the Incorrect call arguments inspection 45020ac: move quick fix to proper place e909581: IDEA-105935 Facets excluded from detection are still added on maven reimport 57c3cd7: Optimize MavenImporter.getSuitableImporters() f0d0f8e: do not build VFS for excluded directories 34c32ea: added remove argument quick fix to the Incorrect call arguments inspection 09f5de3: extract variables and method a145844: EA-54755 - NPE: FoldingUtil.findFoldRegionStartingAtLine c37d1ba: libs for project templates f7fad4d: IDEA-88443 (Run Inspection by Name: Inspections with same name are only shown once) 8521b4b: improve description b65fdb0: show problematic plugins 13cfa13: extract method 06cf300: Merge branch 'master' of git.labs.intellij.net:idea/community 4c2734f: after uninstall of a plugin the button should show "Restart" 1dbe26d: IDEA-121807 - Tomcat Logs doesn't show 02ad525: init nashorn conditional breakpoints 6cd525c: cleanup 1a0161e: cleanup e939ebe: reverted fix for IDEA-121961 because of failing test 8b32345: after installation of a plugin the button still shows "Install" e6e0d7d: Merge branch 'master' of git.labs.intellij.net:idea/community 1cb358a: IDEA-85098 Intellij is not supporting groovy-eclipse-compiler fd27d3b: IDEA-120027 - Import Git-cloud apps from sources - register VCS roots 71e5440: Don't show python-skeletons in Python SDK libraries inside project tree structure 787d068: filter by custom/bundled b5950b4: IDEA-120027 - Import Git-cloud apps from sources - single account for all run configurations 53f918f: align text and make header bg match to html bg cf75116: IDEA-121695 Add managed dependency info on hover over icon 2e5effd: IDEA-121762 Navigate->Select in: for Spring MVC Controller e301c4e: [log] IDEA-118328 Fix already disposed 5a621a4: updated plugin should have MODIFIED foreground b46a3bb: hide description on custom plugin panel f8155ad: add description label 6c9c9f6: added change signature refactoring quick fix to the Incompatible signatures of _new_ and _init_ inspection bb243be: cleanup 35312e5: Merge remote-tracking branch 'origin/master' e02ca9c: comment testdata 11cea86: New messages are implemented for jdk7 and latter jdk versions for now. 753497a3: Merge remote-tracking branch 'origin/master' ec60260: Merge remote-tracking branch 'origin/master' 2a91bce: highlight both incompatible signatures a314614: Merge remote-tracking branch 'origin/master' fefdeaf: Merge remote-tracking branch 'origin/master' 4afd85f: Merge branch 'python-fixes' 4b797eb: cleanup 168dbd0: IDEA-117493 Native crash in Mac launcher 88ed475: diff: do not show 'No changes' panel when 'Can not show diff' should be shown a148809: Merge remote-tracking branch 'origin/master' 88c7d65: lambda completion: strip unnecessary parenthesis, generate parameter names as for override/implement (IDEA-121947) f738b51: diamonds: incompatible error due to cls class in default package fixed - cls file doesn't process declarations! = need to switch to mirror (IDEA-121866) 2fefd8b: abstract method overrides abstract: distinguish between covariant returns (IDEA-121930) d851893: testdata for IDEA-121999 b89dc39: testdata for IDEA-121884 7d747c8: new inference: most specific with same functional interface presence 465325a: new inference: nested varargs 144684b: java 8: accept diamonds in method calls 4112118: new inference: choose most specifics between 2 varargs methods 1ee2942: new inference: raw inner class method qualifier fixed (IDEA-121909) 912e13d: add junit4.jar together with hamcrest (IDEA-119626) 10760d9: new inference: process varargs as separate method candidate/separate phase 69c6b7b: java 8 compatibility 62328cf: inspections: completely ignore currently unresolved scopes fb20169: new inference: reject varargs as method reference target 0f40eb9: new inference: exact method reference is not pertinent to applicability when target type is type parameter f64d239: rename suggestions: suggest new names for non-variables (IDEA-121982) 05289e4: Guess Python language level from SDKs of opened projects if it's not available for PSI elements c1346de: codestyle cleanup ee5f16e: added Add Exception base class quick fix to the Exception doesn't inherit from standard ''Exception'' class inspection 5b8ebf6: EA-54668 - NPE: Breakpoint.setLogEnabled 90c4e07: codestyle cleanup 61b1cb2: do not store reference to PsiElement in qFix, codestyle cleanup, cleanup deprecated method usage 28cc4de: Fix mappings initialization. 41c9f6f: NotNull annotations and checks. 4334ce2: Cleanup (pointless exceptions; field extracted; formatting) 278b8d6: IDEA-121928 Grails 2.3.7 reloading is broken in IntelliJ 13.0.2 bb5986d: IDEA-121938 (serialPersistentFields trips "MismatchedReadAndWriteOfArray" inspection) 93974a3: fix description 58a3377: IDEA-121920 (X/X can be replaced with X - incorrect arithmetic) 7f73d5e: Merge remote-tracking branch 'origin/master' 177f404: Fixed Nullable/NotNull annotations. f058695: IDEA-54387 (type annotations in introduce parameter) 6bf6d11: Cleanup (pointless exceptions; typos; formatting) e5fb46b: VcsIntegrationEnablerTest implemented for mock test vcs c6a1054: IDEA-121990 Filter by old branch fails with exception if full graph is not loaded 7a73eee: IDEA-121961 Debugger: evaluate from variables doesn't include context e2eaf0d: Support 'overwrite' parameter for maven-resources-plugin. 2acd338: rebase several problems fixed 2ace00e: cleanup deprecated method usage 298c646: @NotNull getStatementList 20269f4: do not store reference to PyFile in add function quickfix 5bd7108: code style cleanup 546c689: get rid of deprecated functions use 85b572b: do not store reference to PsiElement in add field quickfix a3343a3: Merge remote-tracking branch 'origin/master' f96d241: turn java messages on d2d3aa0: IDEA-116134 Inherited maven resource filtering is not applied 532e079: do not suggest python run configuration for scratch files fc9c134: fix ui under darcula b00e8a2: [log] IDEA-121992 Recalculate old heads values 813b0dc: Merge remote-tracking branch 'origin/master' 8d41286: Package method for checking version added 4155d62: code style cleanup 757f50b: code style cleanup f5ac410: cleanup 37c7fca: removed state from add super call quickfix, added tests 08e2f55: refactoring - following CR-IC-4721 c415007: Cleanup (formatting; javadoc) 64c651e: IDEA-54397 (type annotations in override/implement) 3f3e064: IDEA-54396 (type annotations in "Wrap Return Value") b360456: IDEA-104026 (Java type annotation formatting) 744d7c8: java: "wrap return value" bean formatting fixed 1540e54: Cleanup (pointless exceptions; formatting; nullability) fb7c097: IDEA-121834 (generic exception substituted) 378b22a: added format specifier quick fix for the python string format inspection 041748c: Package method for checking version addded 35cc71f: eclipse compiler updated to the latest version 7c1a2d6: [git log] Add icon for deep compare function 741e9b9: [log] IDEA-121875 Enable manual commits sorting in VCS that support it ee27725: make mouse shortcut for adding/removing carets configurable (IDEA-80056) 2ba4ece: Merge remote-tracking branch 'origin/master' 8dd9cc4: added remove dictionary key quick fix for the Dictionary contains duplicate keys inspection f0a66f7: [log] Fix HashImpl equals 5bd2cdd: [log] HashImpl: remove the caching map 0affa6a: dom: use ReflectionUtil.getClass{Public,Declared}Methods to skip synthetic methods (which change from one java version to another) aea8f6d: added move except clause quick fix for the Bad except clauses order inspection 39ca570: IDEA-121935 (Inspections: Overloaded variable argument method: every non-problematic method adds a warning) 8d172ac: IDEA-121952 (Java 1.8: "Interface may be annotated with @FunctionalInterface" inspection reports already annotated interfaces) b1977ea: added Remove assignment quick fix for the Assigning function call that doesn't return anything inspection 81ca41b: test fixed b6b5a68: fixed PY-11981 "PEP 8 naming convention violation" inspection treats class attributes as function variables f791db7: fixed PY-10342 Instance attribute defined outside init: detect functions called in init 4d76bdb: Statement list cannot be null f839260: Merge remote-tracking branch 'origin/master' 6f6d813: fixed PY-12033 PyAbstractClass invalid warning for properties. 85d52dd: IDEA-118296 Impossible to "Prevent App Nap" for the 133.* in MacOSX 10.9 (Mavericks) c748cef: artwork update for 13.1 2ee2888: attempt to clarify the inspection description c517b2c: add test 5a0f6fb: Merge remote-tracking branch 'origin/master' 4b96dbf: IDEA-116029 in-place introduce variable name suggestions popup disappears before I can select anything PARTIAL ROLLBACK, fix to be continued... bd199f1: Merge remote-tracking branch 'origin/master' b3dfff9: partially reverting 10f6a0f: psi depedent index get buffering status updates because they are applied to unsaved committed documents 255512d: Merge remote-tracking branch 'origin/master' fa8f612: Move ssh connection provider to remote-run. 1357e2b: use a more memory-efficient structure to hold a long indexed file list a0885a9: Merge remote-tracking branch 'origin/master' 23b20a8: Merge remote-tracking branch 'origin/master' 69c9865: fix test bbf4741: - Removed dependency on remote-run in vagrant plugin (PY-12254). - New api for path mappings providers (old left for compatibility with RubyMine and PhpStorm) - Fix launching of Python console for remote interpreter. e5d9dff: add -> keyword to cpp and make sure it's lexed correctly (IDEA-121906) 5e71180: add a proxy test that fails on java 8 ffa6350: enable new nashorn variables view by default c60c038: style: remove unnecessary method 965aafa: for unsaved documents with committed state and psi backed index use the same logic as for unsaved documents with plain index 8c56a6b: github tests with wrong notifications fixed 8ce415d: [log] Fix tests. (fix wrong line separators) ff002de: [log] Remake VcsLogJoiner without recursion. 7ac6e11: [log] IDEA-118947 Implement special highlighting for cherry-pick 881645a: [log] Add ability to listen to possible filter changes eff05ea: [log] Add ability to reuse branches filter popup d282a0e: [log] Expose VcsLogRefs into API 3d81303: [log] Expose the VcsLogFilterUi to the API, let set filter value a54504c: [log] repaint ui after adding highlighter 542550f: [log] make constants final 7066854: [log] Introduce VcsLogDataProvider to the API as part of VcsLogDataHolder e10b40f: [log] Expose VcsLogUI & DataPack to the vcs-log-api 55c79a0: [log] Make it possible to add VcsLogHighlighters to the log table. 0bca3c6: [log] Remove obsolete CommitCell & its Renderer 61e2ecc: renderValue — add XValue parameter to simplify, why we need to create b6738e4: Merge branch 'master' of git.labs.intellij.net:idea/community 8e48244: IDEA-119822 - Support Heroku Debug 1052ef2: less garbage 35a1eba: optimisation: use AtomicLazyNullableValue to avoid extra indirection and save memory cce38ff: cleanup 799041b: notnull f60abae: NPE protection e6806dd: remove old code commented code d7464ee: support run configurations 5717d3a: make public and refactor to make accessible from Search Everywhere 20d9cb0: make public 010566a: IDEA-58818 (SSR: strange highlighting of try-catch in preview pane) 4e1ef49: cleanup 52a92f2: Gradle: detect Scala plugin presence dynamically (to avoid cyclical plugin dependency) 0333bd1: Local History: do not load ignored files and folders into VFS 4fbcf60: cleanup 7a80e9c: fix duplicates and wrong order in search everywhere 48d4765: Platform: check and warn when trying to edit non-project files (do not update notifications, when not necessary) 8358761: IDEA-121898 (Add Don't ignore String for inspection "Number costructor..") 5e097fa: IDEA-121088 (Java Inspections: Type may be weakened readObject() writeObject()) 68b7c88: add fourth checkbox to description cbff651: Platform: check and warn when trying to edit non-project files (disabled in tests) c0847ee: Merge remote-tracking branch 'origin/master' 590f153: Platform: check and warn when trying to edit non-project files 14a5a6b: gradient colors for buttons ba067df: initial 774559b: cleanup 9a337d5: IDEA-121494 (Inspection "method overrides private method" can be improved) cc18c42: add table header with sorters a4d8900: always use gradient c559f14: diff: fix UnknownFileType detection 87113dc: re-arrange downloads label 311ff47: github: remove usage of deprecated VcsNotifier API c3b9b90: [log] IDEA-117553 Optimize details loading: don't parse Changes at once 645caac: 134->136 1168c7b: Cleanup (common method; pointless assertion; formatting) 66eaa91: nashorn: continue variables presentation simplify V8Scope 3627c46: dfa: treat different constants with same values as same (IDEA-121837) 8084cb0: Rebase feature for update project implemented fc56bcb: Increment hours in comments 044acff: IDEA-121835 "Breakpoints" UI looks clumsy aa2b1cb: always fold long command line in console (IDEA-121453) 6de56f5: some CharSequence utility methods defc8ce: IDEA-121800 Live templates are shown in 'Find in Path' dialog if 'autopopup completion' is enabled dccb826: new inference: cache substitutor for outer call conflict resolution a5adf26: IDEA-88643 delete item from list of breakpoints by pressing delete key: selection should not return to position 1. 424cffe: [git log] IDEA-121818 Accept HEAD as branch name a393838: [log] IDEA-121817 Fix keeping selection 70c52ca: [log] Remove the obsolete NoGraphTableModel & simplify the code which used to use it f41b964: [log] unused 611e758: StringExpressionHelper: JSF->Java-Analysis 54fccb5: IDEA-121828 (Add single member static import intention should be available on incomplete code) 6d2515c: fix IDEA-112499 for single member static imports 811fdf5: fix IDEA-112499 for on demand imports b52ec5f: IDEA-121784 (Add on demand static import intention not available when single-member static import present) 8853670: IDEA-119908 Smart Step doesn't work for classes generated with java 8 e36425ec: Moved LanguageLevel.forFile() to PyUtil.getLanguageLevelForVirtualFile() 8870abb: Get Python language level from PsiElements where possible instead VirtualFiles 7438ce8: added create property quick fix for the property access inspection 0ffb666: svn: terminal: Make commands that do not require repository access do no execute in terminal mode even if terminal mode is configured (to optimize performance) fc62f95: Simplify Gitlab connector by using ComboBoxUpdater. Also ComboBoxUpdater selects first item of the list, if no one is provided. ead71e4: IDEA-121645 Breakpoints conversion: disabled condition is just lost 60fa43c: use constant for history id 15cb81b: continue decouple xdebugger ex ui — XValue/XStackFrame impl eb624ba: Merge branch 'new-redmine-repo' 12f879f: svn: terminal: Run commands in terminal mode (if configured) only for ssh repositories 4e7d70f: Add several changes in "Tasks and Contexts" subsystem API to avoid previous problems with issues missing in "Open Task" dialog (e.g. see IDEA-110012). 8238972: added Make public quick fix for the protected member access inspection f471666: fixed NPE in BreakpointManager.getPsiFile aae9011: Merge branch 'python-fixes' 155f99a: added create property quick fix d9ae792: IDEA-121806 Breakpoints fail after file modification e7713c6: test fixed b5b1518: cleanup 1f2f49e: Platform: do not reverse tabs order on project reopening (IDEA-121816) + new tabs should open on the right (OC-3490) 262b949: Add tooltip about NTLM authentication to login field 2b21896: enable multiple carets by default (IDEA-80056) 44646fe: comment added for CPP-147 fix 6da7645: EA-54287 (diagnostic) eab3611: fixed code style 25c45d1: added rename quick fix to the protected member inspection d29cdc8: Merge remote-tracking branch 'origin/master' 2527c3a: Merge remote-tracking branch 'origin/master' 6f729cf: EnforcedPlainTextFileTypeManager: pass project as a parameter [CR-IC-4656] 8e176ce: EnforcedPlainTextFileTypeManager: Fix broken file status update sequence (PhpCompletionTest.testExcludedFiles()) [CR-IC-4656] a5f3040: Use HttpMethod#hasBeenUsed to prevent NPE, if server response was not received 218756a: Merge remote-tracking branch 'origin/master' 3b799e4: filtering templates by frameworks 2670f2d: yellow code 6a440f7: IDEA-121259 Generated toString() placed in incorrect class 3588589: IDEA-121803 (Windows date/time format translation error) c49bd80: svn: Perform saving all documents during move/rename in SvnFileSystemListener only if operations are related to files under svn - otherwise it could break functionality not related to svn (like renaming file under git) if svn plugin is enabled b6f778a: disable test navigation outside test roots 43d2b2e: default mapping for SelectAllOccurrences action (IDEA-80056) da2374a: if facet has associated framework show 'add facet' instead of 'add framework support' dialog in Project Structure (IDEA-120643, IDEA-113833) 594cad9: WEB-10567 Implemented a way to stop run configurations when starting incompatible ones. The idea is that some run configurations may implement CompatibilityAwareRunProfile.isCompatibleWith method and signal that they are not compatible with the run configuration being started so a dialog is displayed to a user and the user can choose to stop incompatible configurations. +review CR-IC b814f54: IDEA-121403 Live Template: "Surround with tag" should not be applicable while editing XmlAttributeValue 8db0857: better category name 40c45ca: do not add generic builder for "category" templates (e.g. Java FX) 79feee3: EditorActionHandler API cleanup (IDEA-80056) f4bbcbc: notify listener on task cancellation a53cccd: IDEA-71048 (test fixed) 4b6b959: system.out removed 3b408e6: Merge remote-tracking branch 'origin/master' 38bdd09: Open terminal in folder that was dragged to it from project view (IDEA-115145). 4586d4a: IDEA-71048 (system date/time formats on Windows) 6a119d1: platform: batch load system date/time formats c4e7e1f: Cleanup (pointless exceptions; formatting) 177a1d9: drop deprecated stuff e5740c5: Return true from dispatch in case of event processing. 38764d4: Merge remote-tracking branch 'origin/master' 8f8ef28: IDEA-114457 Undocked 'project' tool window doesn't always automatically hide when I double-click to open a file Animation fix (don't freeze EDT, use Animator), request focus fix. 5ac6d6f: cleanup e02f4ef: Terminal should override IDE shortcuts by default (IDEA-118837). fd85821: Merge remote-tracking branch 'origin/master' 026cf99: PY-12022 Clicking "Rerun" button of "Run manage.py Task..." doesn't stop current process eb2b2db: don't treat live template complete() as second basic completion invocation (HtmlCompletionTest.testXhtmlCompletionInHtml) 6ebe750: dumb-aware actions in the Messages panel 557cca9: IDEA-108072 (Don't suggest to add on-demand static import for the current class) 8d6f72b: IDEA-121756 Don't provide postfix completion options in java string literals c738a20: IDEA-89020 Disappears value of the variables standing next in Live templates IDEA-121634 Live Template: template is broken with 3+ variables and leading space 31dbd88: use constant empty array (following CR-IC-4606) 8537206: Extract RSS parsing logic and thus remove Atlassian plugin sources completely 1f4a22c: Fix Flex tests + IDEA-121771 <fx:Script> tag autocomplete broken b08a89d: cache scope attribute keys to reduce daemon garbage ddd7530: IDEA-121609 Cannot find '+' + using Find in Path f723320: Merge branch 'master' of git.labs.intellij.net:idea/community c66ea39: Local History fix: load file children on fileCreated event (second try) 1c7fa2c: IDEA-120027 - Import Git-cloud apps from sources - Heroku 5eab7d1: try single member static import first in live templates 364298f: IDEA-121738 Shift-click in gutter doesn't create 'no suspend' breakpoint anymore a0a8fe7: fixed editBreakpoint 912e749: diff: do not apply single change multiple times 3403bab: IDEA-12609 diff: do not consider equal changes as conflict 5379407: diff: do not create empty change on applying modified part of 'modified - deleted' conflict a0c4ea5: diff: rewrite MergeBuilder and MergeList fc8f64b: merge: rewrite MergeBuilder 90390cf: merge: add test 0adb7cc: @NotNull bbe7af5: move Inject SQL tip to intelliLang-java f14856e: speeding up 'Synchronizing output directories': avoid unnecessary rootsChanges events if many output directories were created during compilation (ZD-22766, IDEA-116757) 06b2ee3: fixed PY-11293 namedtuple underscore-methods are not protected f00ecc2: Merge remote-tracking branch 'origin/master' 2a07097: [git log] don't query ALL when branches to query are specified 397158b: VcsNotifier methods renamed according to their notification groups 24ce9d6: Exception throw for Unit Test mode removed from GitBranchOperation 6ef9934: CPP-147 PSI is build for files from another project +review CR-IC 64ab58d: nullability c221e1a: cleanup 0d4f12a: nashorn: initial getReceiverVariable impl 5ab90de: continue nashorn: variables view c750301: nullability 86d092e: nullability c97dd80: IDEA-98746 Annoying editor tab tooltips Step 2: clicks will hide tooltips & affect the point below; true "contains" for balloons 060290a0: make carets retain valid positions on Tab width changes, when multiple carets are enabled (IDEA-80056) 7325dffa: Changed default language level to Python 2.7 fd361c4: Merge remote-tracking branch 'origin/master' 1a931f9: lambda: unhandled exceptions inside method body should be treated as those inside anonymous classes (IDEA-121741) a042720: stream migration inspection: preserve comments (IDEA-121679) b060c81: stream migration inspection: collapse only primitive new initializers (IDEA-121745) 4d87683: fixed PY-12113 Questionable "access to a protected member of a class" inspection in tests 90d0740: IDEA-98746 Annoying editor tab tooltips Step 1: new setting has been added (Editor -> Editor Tabs -> Show tabs tooltip) e50b960: [git] remove unused MultipleContentsRevision 70bb70d: [log] Added time measurements to the VCS log 66fb815: renamed resolveWithoutImplicits to getResolveContext (which is more meaningfull) e1ce2db: [log] Synchonize access to the VcsUserRegistry a29e2b1: [log] DRY 082b273: [log] prohibit repaint during collapse/expand all branches 6f4a2d5: [log] fireTableStructureChanged if graph changes after some action 23396b0: [log] rename updateUI to repaintUI; unwrap: it shouldn't be executed not from EDT. 347647a: [log] handle answer a631891: [log] No need to set default cursor 8475418: [log] let handleAnswer be in the single place: VcsLogUI. 43f775c: [log] Add support of getContainingBranches method. 480d1ab: [log] Fix wrong collapse branch nodes. 758c07e: [log] Fix bug related with not load commit node. a944fe6: [log] Create JumpToNotLoadCommitActionRequest. 610219e: [log] VcsLogSorted fixed. 2d748d6: [log] Disabled selection of relative commits. 03a2a25: [log] Fix performance of collapse all action. 75ff6e6: [log] Add LinearBranchesExpansionAction support. (But collapse all may need more time). 6eaa9bf: [log] Add several debug messages. 45da0e7: [log] Disable draw harmonics in filters. aeff40e: [log] Add graph for filters. 12bb25e: [log] Don't fail for fresh repositories without commits bfbc9e4: [log] Don't make graph with always-false filters 33a3bf2: some automatic changes in community modules ca7f8d3: remove unused cc1b58a: [log] no filter => null, enable new graph by default, temporary return null if no commits match c153674: [log] temp diagnostics: why graph sometimes disappear ab4b7ac: [log] VcsLogSorter stub 8a62c27: [log] temp diagnostics: why graph sometimes disappear 4fd20fc: [log] Fix crash, when mouse over empty row. 8af46ee: [log] Add CollapsedMutableGraph. 6cc0435: [log] Add FragmentGenerator. 0859662: [log] Added highlighting relative commits. 8922251: [log] Extract dfs to DfsUtil. fe36f19: [log] Simple painter fix. 3e9f31b: [log] Fix not load commit node. 90c7bd1: [log] Fix case when not using new graph for filtering & using old graph facade b6ed824: [log] IDEA-117157 Filter by multiple branches eeefcfa: [log] use new graph for filtering commits (disabled by default) 56f381b: [git log] Support filtering by several branches 0cfc872: [log] Fix author column width calculation 20aeb1a: [log] Optimize case with filters: read & store commits without details 01121ba: [log] Add arrow highlighted when mouse over. 4421f12: [log] Add GraphActionDispatcher. ecdc992: [log] Fix Image overflow. 52db2ef: [log] Fix GraphCellGeneratorImpl. 863d8c7: [log] Fix Branch color. 04a0bc7: [log] Use new GraphFacade dfc41b0: [log] Temp fix SimpleGraphCellPainter 4f028e7: [log] Copy GraphCellPainter from old log. 62dd4f6: [log] Fix graph, when not all log loaded. 84790b5: [log] Add GraphCellGenerator. 3bf48c4: [log] Add MutableGraph and simple Impl 232fe7f: [log] Add PermanentGraph & Layout 413a6a9: [log] Add GraphFlags 3e4e166: [log] Add IntToIntMap, AbstractIntToIntMap, TreeIntToIntMap and TestTreeIntToIntMap 7642e8a: [log] Get rid of VcsLogDataHolder#getDataPack: pass DataPack manually 435fffb: [log] Explicitly pass VcsLogDataHolder & VcsLogUiProperties 270649b: [log] VcsUserRegistry: return a copy of users map, to avoid CCME 5dd7cd9: [log] Extract graph facade building into separate class 691077d: GraphColorManager initial implementation a615943: [log] remove no more needed dependencies from vcs-log-graph be34c32: [log] DataPack: create GraphFacadeImpl instance in build 584e37d: [log] Move GraphFacade implementation to vcs-log-graph module 4e968e1: [log] remove unused stuff from the DataPack. bfcb3f4: Override paintComponent() instead of paint(). 99d52e8: [log] Delegate graph painting to the GraphFacade c152a29: Move clicks & hovers to the GraphFacade a00646d: GraphColorManager: more methods + javadocs 98b80a1: rename & check link listener first 54a50ae: GraphAnswer interface f9b9890: rename to GraphFacade 055f10b: optimize search commit by part of hash d1b69d1: remove getVisibleCommits since we've got getVisibleCommitCount & getCommitAtRow 411a76f: javadocs bb8b897: optimize getOneOfHeads: store it in Branch instead of the VirtualFile. cd4728b: Transition to GraphFacade, step 4: click to row a74518c: Transition to GraphFacade, step 3: expansion actions 9311f2f: Transition to GraphFacade, step 2: setVisibleBranches 89dd596: Transition to GraphFacade, step 1: getVisibleCommits(), getRoot() e852593: remove unused methods 8661db5: GraphColorManager 81488e4: some javadocs & GraphInfoProvider extraction 039520b: Graph Black Box refactoring initial step fce20a5: IDEA-121764 Debugger does not show null values e14e913: IDEA-121739 Debugger doesn't stop on breakpoints in some anonymous classes 675fa42: fix tests. Rebinding for 'def' reference should do nothing because it references to an inferred variable's type or to a variable itself. 5a54361: IDEA-116134 Inherited maven resource filtering is not applied 1766d06: Groovy: fix parameter info 812d0d6: Groovy: remove redundant GrDefaultAnnotationValue psi. 2bc747e: Groovy: import static intention should be available on argument list cdfdf8d: IDEA-121662 Unify Groovy and Java Intention behavior 82a4f0d: IDEA-121318 optimizing whether place is child of import statement. Actually place can be a child of an import statement only if it is a GrCodeReferenceElement. 400d1ff: one big comparator for ratings, downloads, updates and status dbe0372: memory leak fixed 3d017bc: Remove unused SOAP classes generated from WSDL. Leave only basic authorization in legacy connector d6528d3: vcs notification structure refactored and common integration enabler provided f or mercurial vcs IDEA-120440 71e985b: IDEA-118548 Fixed locale settings for Mac - so svn launched from IDEA should get correct locale 5f70222: IDEA-121403 Live Template: "Surround with tag" should not be applicable while editing XmlAttributeValue 0e90d93: avoid boxing/unboxing (following CR-IC-4606) 754e7d9: remote table header 99540a3: register all sorters for available plugins table 60861dd: new sorters ae5ff21: Merge branch 'python-fixes' 455db27: Fixed names of live templates for dict comprehensions (PY-12307) b2bbf8b: Typo 4569a1c: Don't suggest the initial name if un-pluralization failed (PY-12308) 816b0e4: Don't suggest collection names in live templates that aren't valid Python identifier (PY-12308) b8412c1: refactor to support multiple sorters 2814c77: Add bundle for common task messages a4b56a6: java: formatting of type annotations inside type elements 0813c3c: java: type cast intention fixed 37ec0df: update appinfo files 6ff02b1: optimization for breakpoint set in folded code 09c6a8d: method refs: search for potentially applicable members in supers (IDEA-121737) 5412fbc: overload resolution: grab lambda from nested parenthesis as well as conditional expressions 0c7adaa: java: split multi-catch intention simplified; test data made adequate 4969888: java: no annotations needed in type cast 1687a22: Cleanup (unneeded test data) 333e542: Dictionary extended 9da8f7d: IDEA-121384 Breakpoints dialog: for method breakpoint created in dialog new branch is created 20a0571: notnull dd09f59: notnull 8aab3af: notnull 9e433b6: data race 6c89ea9: cleanup da637a4: IDEA-84705 Live Template: should be possible to reset the changes made in default templates ae81974: Merge remote-tracking branch 'origin/master' f86ac6f: new inference: use equals bounds during incorporation e07fdee: testdata for IDEA-118965 46112ee: new inference: cache lambda functional type during expression constraints reduction (IDEA-121315) 5029b3f: new inference: do not prefer specifics based on void return type for both void and value compatible lambdas a70f823: new inference: postpone argument types calculation 2149ea3: Fixed project leak 1608a84: svn: Perform special check if svn repository supports "merge-info" tracking only when corresponding registry key is set 9142df3: classes from old build system API marked as deprecated (to be removed in IDEA 14) 9b4f8c02: svn: Refactored SvnUtil - removed duplicate methods for checking if svn repository supports "merge-info" tracking d334d41: IDEA-121688 Added CommitEventType.failedOutOfDate; do not fail if could not convert SVNEventAction to CommitEventType (just log warning) 70aed3f: Merge remote-tracking branch 'origin/master' ba09765: missing test data 76591fd: dfa: comparison with other variables shouldn't affect a variable's nullability status 2c6cea6: IDEA-121698 Automatically make variables accessed from outer scopes final 6166a0e: don't flush fields for pure method and getter calls (IDEA-117449) 80049df: mention method name in edit contract intention text c1b03f0: dfa: variables shouldn't be marked unknown if they don't have known constant values 1fd57b4: Close terminal tabs with middle click (IDEA-112321). 6ee5d4f: Terminal should sign as xterm-256color (IDEA-118841). 1cd41f0: Merge remote-tracking branch 'origin/master' 8d167c6: Fix the locale on mac only for pycharm processes creation. 96c2016: IDEA-54434 (type annotations in Convert to Atomic/ThreadLocal) 9ae9623: java: formatting of type annotations inside references 50bf5a3: Cleanup (pointless exceptions; formatting) d44fab7: fix for exception with list of indexed ids merging 39c8f52: Merge remote-tracking branch 'origin/master' bd3cf45: Launch terminal with fixed locale (IDEA-116401, IDEA-118832, IDEA-120131). 1b0bc5f: fixed regress introduced by c5819e4 : remove stale index data for removed files that were scheduled to update lazily 61d11c8: nashorn: x variables view a5c886b: cleanup 4433f97: use SingleAlarm 6822332: Fix locale env vars on mac (IDEA-121713). 8d82a44: IDEA-52034 Implemented option to authenticate svn+ssh repositories using ssh agent (for SVNKit integration) (inspired by @charles-dyfis-net pull request - see issue comments for details) 90b352d: svn: Refactored SSHCredentialsDialog - removed unnecessary code 7f5f956: svn: Updating license info related to svn4idea plugin cb98865: svn: Upgraded to SVNKit 1.7.11 9d57fb2: Upgraded jna-utils (= platform = jna-platform) to 3.4.0 (now it corresponds to currently used jna 3.4.0) (both jna and jna-utils are downloaded from https://github.com/twall/jna/releases/tag/3.4.0) d9267b7: Added jsch-agent-proxy library to community b51333a: IDEA-75033 Implemented feature to automatically switch directory on new branch creation ee584ce: svn: Refactored AutoSvnUpdater - utility method to run svn updates 97e7ceb: svn: Removed unused classes d62789b: svn: Refactored SvnConfigurationState - simplify java version checks 7eff048: svn: Make "command line" integration be primary for default svn settings 1441da4: Fixed a warning, run maven build in maven 3.2.1 7461b16: Add tests for Redmine and filtering by assignee in its requests 56b1f50: Configure proper preemptive basic authentication in http client 5c6037b: Refactor Redmine editor to contain combo box with available projects. Extract common kinds of backgroundable tasks to RemoteFetchTask class efc4ae6: Update date parsing to accept spaces before timezone b75dafd: First version of updated Redmine repository 7b94fd3: Fix typo and remove unused redundant hashCode() implementation from Gitlab connector 2897d8e: Move Gson related utitly methods to 'impl.gson' package 47dfe5b: Move httpclient helper classes to 'impl' package b151d5d: Update old repository to use new getIssues() format Change-Id: I6689a2b039c939829abf0656740d02d779f14795
Diffstat (limited to 'java/java-tests')
-rw-r--r--java/java-tests/java-tests.iml1
-rw-r--r--java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType-out.java2
-rw-r--r--java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType1-out.java2
-rw-r--r--java/java-tests/testData/codeInsight/completion/smartType/FilterAmbiguity.java14
-rw-r--r--java/java-tests/testData/codeInsight/completion/smartType/FilterWrongParamsMethods-out.java18
-rw-r--r--java/java-tests/testData/codeInsight/completion/smartType/FilterWrongParamsMethods.java18
-rw-r--r--java/java-tests/testData/codeInsight/completion/smartType/FilteredStaticMethods-out.java14
-rw-r--r--java/java-tests/testData/codeInsight/completion/smartType/FilteredStaticMethods.java14
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/AgentPremain.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA79251.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java1
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java36
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IDEA122519EnclosingInstance.java20
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/ambiguousInheritance/pck/AmbiguousMethodCall.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA120563.java33
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA121400.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123316.java24
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123338.java12
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123352.java17
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123518.java21
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57311.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57439.java12
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA64103.java37
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams1.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/CaptureInsideNestedCalls.java15
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Erasure.java9
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/IDEA122401.java26
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/InheritedWithDifferentArgsInTypeParams.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/SOEInLeastUpperClass.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/SuperWildcardWithBoundPromotion.java (renamed from java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/SuperWildcardWithBoundPromotion.java)4
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Variance.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardBoundsCombination.java16
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardsBoundsIntersection.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/DefaultMethodTouched.java12
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/DefaultMethodTouched_after.java12
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/MethodArgument.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/VariableDeclaration.java9
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/findUsages/FieldFromAnonymousClassScope.java21
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/findUsages/MethodArgument.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/AmbiguitySpecificReturn.java4
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/IDEA123308.java14
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/TypeArgsConsistency.java4
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA120498.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA122720.java21
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA123839.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/NotInheritFromUnrelatedDefault.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/SuperProtectedCalls.java9
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/AccessModifiers.java6
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Ambiguity.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Assignability.java6
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefInnerFromSuper.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefs.java6
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefsInnerClasses.java12
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/DefaultConstructor.java24
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ExprReceiver.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefAcceptance.java20
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefMisc1.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/QualifierTypeArgs.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Varargs.java28
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/VarargsInReceiverPosition.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA123352.java19
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/JDK8034223.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/RelatedSAMErasures.java53
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/AdditionalConstraintDependsOnNonMentionedVars.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119003.java84
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119535.java30
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122074.java15
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122084.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122406.java41
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122616.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122700.java26
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123731.java21
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123848.java27
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123869.java19
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/NestedCallsInsideLambdaReturnExpression.java59
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AssertNumberOfParameters.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/FromReferenceWithTypeArgs.java17
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java4
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA112191.java15
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122018comment.java20
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122100.java20
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122509.java19
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122681.java21
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123223.java31
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123248.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123366.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123366comment.java49
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/resolve/IDEA122406.java41
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addAssert/afterLambda.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addAssert/beforeLambda.java7
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/afterFQN.java14
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/afterPrimitives.java14
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/beforeFQN.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/beforePrimitives.java14
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/afterTernary.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/beforeTernary.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCallToDefaultFromFunctionalInterfaceInsideInheritor.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCallToStaticFromFunctionalInterface.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterConflictingLocal.java9
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterFinalFieldInitializedBeforeAnonymInConstructor.java5
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterForwardStaticFieldReference.java4
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnable.java4
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnableInArrayInitializer.java4
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToDefaultFromFunctionalInterface.java16
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToDefaultFromFunctionalInterfaceInsideInheritor.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToStaticFromFunctionalInterface.java16
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeConflictingLocal.java12
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2methodReference/beforeCallToDefault.java16
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convert2Local/afterBlocksInSameMethod.java21
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convert2Local/beforeBlocksInSameMethod.java22
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/afterStaticImport.java21
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/afterVarargs.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeStaticImport.java21
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeVarargs.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/afterNull.java9
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/beforeNull.java8
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof/afterFormatting.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof/beforeFormatting.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterConstructor.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterReferenceType.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterThisType.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeConstructor.java9
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeReferenceType.java6
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeThisType.java6
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage/afterParameterNameFirstSuggestion.java9
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage/beforeParameterNameFirstSuggestion.java5
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage/afterDefaultValueAtCallPlace.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage/beforeDefaultValueAtCallPlace.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterEq.java6
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterMultiDeclr.java6
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterPlusEq.java6
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeEq.java7
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeForeignExprBetween.java8
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeMultiDeclr.java7
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforePlusEq.java7
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeUsedInRightPart.java7
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/afterCollapseToBeInferredTypeArgs.java29
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/afterNoCollapseTypeArgs.java23
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeCollapseToBeInferredTypeArgs.java29
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeNoCollapseTypeArgs.java23
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/afterReturnTypeInExpressionStatement.java8
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/beforeReturnTypeInExpressionStatement.java2
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn/afterIncorrectInHierarchy.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn/beforeIncorrectInHierarchy.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs/afterMethodReference.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs/beforeMethodReference.java18
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant/afterStaticNotFinal.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant/beforeStaticNotFinal.java10
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCastInIterValue.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectIdentityMap.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter1.java11
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter2.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter3.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter4.java17
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterMissedBraces.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCastInIterValue.java15
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectIdentityMap.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter.java15
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter1.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter2.java15
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter3.java15
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java19
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeMissedBraces.java13
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterInsideExpression.java7
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterNoSideEffect.java8
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterParameterAssignment.java7
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterSideEffect.java15
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeInsideExpression.java7
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeNoSideEffect.java9
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeParameterAssignment.java8
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeSideEffect.java15
-rw-r--r--java/java-tests/testData/codeInsight/editorActions/stringLiteral/enter.java5
-rw-r--r--java/java-tests/testData/codeInsight/editorActions/stringLiteral/enterOpSignOnNextLine.java5
-rw-r--r--java/java-tests/testData/codeInsight/editorActions/stringLiteral/enterOpSignOnNextLine_after.java6
-rw-r--r--java/java-tests/testData/codeInsight/editorActions/stringLiteral/enter_after.java6
-rw-r--r--java/java-tests/testData/codeInsight/generateConstructor/afterAbstractClass.java2
-rw-r--r--java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence.java2
-rw-r--r--java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence1.java2
-rw-r--r--java/java-tests/testData/codeInsight/generateConstructor/afterFinalFieldPreselection.java2
-rw-r--r--java/java-tests/testData/codeInsight/generateConstructor/afterImmediatelyAfterRBrace.java2
-rw-r--r--java/java-tests/testData/codeInsight/generateConstructor/afterPackageLocalClass.java2
-rw-r--r--java/java-tests/testData/codeInsight/generateConstructor/afterPrivateClass.java2
-rw-r--r--java/java-tests/testData/codeInsight/generateConstructor/afterSubstitution.java2
-rw-r--r--java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIf.java11
-rw-r--r--java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIfElse.java11
-rw-r--r--java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIfElse_after.java14
-rw-r--r--java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIf_after.java13
-rw-r--r--java/java-tests/testData/codeInsight/javadocIG/classTypeParamsPresentation.html2
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/completion/doNotCompleteTemplateInMultiCaretMode.java8
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/completion/doNotCompleteTemplateInMultiCaretMode_after.java8
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/completion/doNotShowTemplateInMultiCaretMode.java8
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/completion/shouldNotExpandInMultiCaretMode.java9
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/completion/shouldNotExpandInMultiCaretMode_after.java9
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/format/notString.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/format/notString_after.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/format/string.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/format/string_after.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/notnull/elseStatement.java8
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/notnull/elseStatement_after.java10
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/sout/simple.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/sout/simple_after.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/sout/void.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/sout/void_after.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/try/multiStatement.java7
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/try/multiStatement_after.java11
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/try/notStatement.java3
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/try/notStatement_after.java3
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/try/simple.java5
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/try/simple_after.java9
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/try/statement.java5
-rw-r--r--java/java-tests/testData/codeInsight/template/postfix/templates/try/statement_after.java9
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretIndentLBrace_after.java8
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretIndentLBrace_before.java8
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretIndentRBrace_after.java10
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretIndentRBrace_before.java10
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretInsertGt_after.java10
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretInsertGt_before.java10
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretInsertQuote_after.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretInsertQuote_before.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretInsertRParen_after.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretInsertRParen_before.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretSkipGt_after.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretSkipGt_before.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretSkipQuote_after.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretSkipQuote_before.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretSkipRParen_after.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretSkipRParen_before.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretSkipSemicolon_after.java6
-rw-r--r--java/java-tests/testData/codeInsight/typing/multicaretSkipSemicolon_before.java6
-rw-r--r--java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput.log15
-rw-r--r--java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleA/src/com/ppp/Inner.java.new4
-rw-r--r--java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/B.java6
-rw-r--r--java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/Inner.java5
-rw-r--r--java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/Inner.java.remove0
-rw-r--r--java/java-tests/testData/inspection/dataFlow/boxingBoolean/expected.xml2
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/ComparingToNotNullShouldNotAffectNullity.java21
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/ContractVarargs.java39
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/NotNullAfterDereference.java9
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/NullableBoolean.java23
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences.java6
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences_after.java6
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/TrueOrEqualsSomething.java9
-rw-r--r--java/java-tests/testData/inspection/dataFlow/fixture/TrueOrEqualsSomething_after.java8
-rw-r--r--java/java-tests/testData/inspection/redundantCast/generics/BoxingTopCast/expected.xml2
-rw-r--r--java/java-tests/testData/inspection/redundantCast/generics/BoxingTopCast/src/BoxingTopCast.java20
-rw-r--r--java/java-tests/testData/moduleRootManager/rootsChanged/emptyModule/a.iml11
-rw-r--r--java/java-tests/testData/psi/cls/mirror/Class.txt385
-rw-r--r--java/java-tests/testData/refactoring/changeSignature/TypeAnnotationsAllAround.java14
-rw-r--r--java/java-tests/testData/refactoring/changeSignature/TypeAnnotationsAllAround_after.java14
-rw-r--r--java/java-tests/testData/refactoring/inlineMethod/MethodInsideChangeIfStatement.java26
-rw-r--r--java/java-tests/testData/refactoring/inlineMethod/MethodInsideChangeIfStatement.java.after22
-rw-r--r--java/java-tests/testData/refactoring/inplaceIntroduceConstant/replaceAllInsideParenthesized.java13
-rw-r--r--java/java-tests/testData/refactoring/inplaceIntroduceConstant/replaceAllInsideParenthesized_after.java15
-rw-r--r--java/java-tests/testData/refactoring/inplaceIntroduceParameter/localInsideAnonymous.java18
-rw-r--r--java/java-tests/testData/refactoring/inplaceIntroduceParameter/localInsideAnonymous_after.java18
-rw-r--r--java/java-tests/testData/refactoring/introduceVariable/LambdaExprNotAccepted.after.java2
-rw-r--r--java/java-tests/testData/refactoring/invertBoolean/BooleanFieldWithoutInitializer.java10
-rw-r--r--java/java-tests/testData/refactoring/invertBoolean/BooleanFieldWithoutInitializer_after.java10
-rw-r--r--java/java-tests/testData/refactoring/methodDuplicates/SkipNonRelatedCalls.java16
-rw-r--r--java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/after/p/A.java8
-rw-r--r--java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/after/p/B.java9
-rw-r--r--java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/before/p/A.java15
-rw-r--r--java/java-tests/testData/refactoring/pullUp/NotFunctionalAnymore.java12
-rw-r--r--java/java-tests/testData/refactoring/pullUp/StillFunctional.java9
-rw-r--r--java/java-tests/testData/refactoring/pullUp/StillFunctional_after.java10
-rw-r--r--java/java-tests/testData/refactoring/pushDown/FunctionalExpression.java12
-rw-r--r--java/java-tests/testData/refactoring/pushDown/FunctionalExpressionDefaultMethod.java14
-rw-r--r--java/java-tests/testData/refactoring/pushDown/FunctionalExpressionDefaultMethod_after.java15
-rw-r--r--java/java-tests/testData/refactoring/pushDown/FunctionalExpression_after.java11
-rw-r--r--java/java-tests/testData/refactoring/pushDown/FunctionalInterface.java10
-rw-r--r--java/java-tests/testData/refactoring/pushDown/FunctionalInterface_after.java10
-rw-r--r--java/java-tests/testData/refactoring/pushDown/InterfaceConstants.java7
-rw-r--r--java/java-tests/testData/refactoring/pushDown/InterfaceConstants_after.java8
-rw-r--r--java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceDefaultMethod.java12
-rw-r--r--java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceDefaultMethod_after.java11
-rw-r--r--java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceMethod.java11
-rw-r--r--java/java-tests/testData/refactoring/safeDelete/ParameterFromFunctionalInterface.java11
-rw-r--r--java/java-tests/testData/vfs/maven-toolchain-1.0.jarbin0 -> 32911 bytes
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/JavaTypingTest.java70
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy2
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartType18CompletionTest.java37
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java10
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImplementationsViewTest.java96
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java4
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java2
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/ChangeSignatureTouchLambdaTest.java50
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FindFunctionalInterfaceTest.java66
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java16
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java33
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/LambdaHighlightingTest.java1
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MostSpecificResolutionTest.java12
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java44
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java40
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/TypeInference18Test.java64
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/CreateMethodFromMethodReferenceFixTest.java25
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/EmptyIntentionInspectionQuickFixTest.java3
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/Lambda2MethodReferenceInspectionTest.java6
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/RedundantTypeArgsInspectionTest.java43
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/RemoveUnusedAssignmentTest.java41
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/ReplaceWithConstantFixTest.java38
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/editorActions/JavaEnterInStringLiteralTest.java52
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/folding/JavaFoldingTest.groovy6
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/generation/surroundWith/JavaSurroundWithTest.java10
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerTest.groovy7
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/intention/JoinDeclarationTest.java26
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/intention/SplitDeclarationTest.java3
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy42
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java30
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/FormatPostfixTemplateTest.java27
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/NotNullPostfixTemplateTest.java4
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/SoutPostfixTemplateTest.java27
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/TryPostfixTemplateTest.java44
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java11
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInspection/JavaAPIUsagesInspectionTest.java23
-rw-r--r--java/java-tests/testSrc/com/intellij/codeInspection/RedundantCast15Test.java5
-rw-r--r--java/java-tests/testSrc/com/intellij/execution/BaseConfigurationTestCase.java14
-rw-r--r--java/java-tests/testSrc/com/intellij/find/FindManagerTest.java22
-rw-r--r--java/java-tests/testSrc/com/intellij/ide/fileTemplates/SimpleTemplatesTest.java53
-rw-r--r--java/java-tests/testSrc/com/intellij/index/IndexTest.java14
-rw-r--r--java/java-tests/testSrc/com/intellij/index/StringIndex.java2
-rw-r--r--java/java-tests/testSrc/com/intellij/navigation/GotoImplementationTest.java23
-rw-r--r--java/java-tests/testSrc/com/intellij/openapi/editor/impl/JavaFileEditorManagerTest.java2
-rw-r--r--java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java263
-rw-r--r--java/java-tests/testSrc/com/intellij/openapi/vfs/JarFileSystemTest.java121
-rw-r--r--java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java19
-rw-r--r--java/java-tests/testSrc/com/intellij/psi/ClsRepositoryUseTest.java59
-rw-r--r--java/java-tests/testSrc/com/intellij/psi/ConstantValuesTest.java5
-rw-r--r--java/java-tests/testSrc/com/intellij/psi/PsiConcurrencyStressTest.java3
-rw-r--r--java/java-tests/testSrc/com/intellij/psi/codeStyle/arrangement/JavaRearrangerSpecialRuleTest.groovy20
-rw-r--r--java/java-tests/testSrc/com/intellij/psi/search/FindUsagesTest.java2
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java2
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureBaseTest.java172
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java118
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/FindMethodDuplicatesTest.java4
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceConstantTest.java25
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceParameterTest.java8
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java210
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/MoveInnerTest.java4
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/PullUpTest.java56
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/PushDownTest.java13
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java29
-rw-r--r--java/java-tests/testSrc/com/intellij/refactoring/inline/InlineMethodTest.java4
-rw-r--r--java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java76
-rw-r--r--java/java-tests/testSrc/com/intellij/unscramble/UnscrambleDialogTest.java2
349 files changed, 5517 insertions, 630 deletions
diff --git a/java/java-tests/java-tests.iml b/java/java-tests/java-tests.iml
index 01e606b3b118..294b5ded0521 100644
--- a/java/java-tests/java-tests.iml
+++ b/java/java-tests/java-tests.iml
@@ -31,6 +31,7 @@
<orderEntry type="module" module-name="external-system-impl" scope="RUNTIME" />
<orderEntry type="module" module-name="junit_rt" scope="TEST" />
<orderEntry type="module" module-name="xml-psi-impl" scope="TEST" />
+ <orderEntry type="module" module-name="properties-psi-api" scope="TEST" />
</component>
</module>
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType-out.java b/java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType-out.java
index c96328d6c192..a99c498bb8bb 100644
--- a/java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType-out.java
+++ b/java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType-out.java
@@ -19,7 +19,7 @@ interface I {
public class Test {
public int m() {
I i = s -> {
- return s.contains();
+ return s.isEmpty();
};
return 0;
}
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType1-out.java b/java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType1-out.java
index 73a03e47a3ac..194727712bb1 100644
--- a/java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType1-out.java
+++ b/java/java-tests/testData/codeInsight/completion/smartType/ExpectedReturnType1-out.java
@@ -18,7 +18,7 @@ interface I {
}
public class Test {
public int m() {
- I i = s -> s.contains();
+ I i = s -> s.isEmpty();
return 0;
}
}
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/FilterAmbiguity.java b/java/java-tests/testData/codeInsight/completion/smartType/FilterAmbiguity.java
new file mode 100644
index 000000000000..58eb8c78a95f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/completion/smartType/FilterAmbiguity.java
@@ -0,0 +1,14 @@
+import java.util.ArrayList;
+import java.util.List;
+
+class A {
+ {
+ List<A> s = new ArrayList<>();
+ s.stream().filter(A::<caret>);
+ }
+
+ public boolean accept(String s) {
+ return true;
+ }
+}
+
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/FilterWrongParamsMethods-out.java b/java/java-tests/testData/codeInsight/completion/smartType/FilterWrongParamsMethods-out.java
new file mode 100644
index 000000000000..9f143155b1ff
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/completion/smartType/FilterWrongParamsMethods-out.java
@@ -0,0 +1,18 @@
+import java.util.ArrayList;
+import java.util.List;
+
+class A {
+ {
+ List<A> s = new ArrayList<>();
+ s.stream().filter(A::accept);
+ }
+
+ static <K> boolean accept(K k) {
+ return false;
+ }
+
+ public boolean accept1(String s) {
+ return true;
+ }
+}
+
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/FilterWrongParamsMethods.java b/java/java-tests/testData/codeInsight/completion/smartType/FilterWrongParamsMethods.java
new file mode 100644
index 000000000000..25af850029be
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/completion/smartType/FilterWrongParamsMethods.java
@@ -0,0 +1,18 @@
+import java.util.ArrayList;
+import java.util.List;
+
+class A {
+ {
+ List<A> s = new ArrayList<>();
+ s.stream().filter(A::<caret>);
+ }
+
+ static <K> boolean accept(K k) {
+ return false;
+ }
+
+ public boolean accept1(String s) {
+ return true;
+ }
+}
+
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/FilteredStaticMethods-out.java b/java/java-tests/testData/codeInsight/completion/smartType/FilteredStaticMethods-out.java
new file mode 100644
index 000000000000..c714230fca7b
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/completion/smartType/FilteredStaticMethods-out.java
@@ -0,0 +1,14 @@
+import java.util.ArrayList;
+import java.util.List;
+
+class A {
+ {
+ List<A> s = new ArrayList<>();
+ s.stream().filter(A::accept);
+ }
+
+ public boolean accept() {
+ return true;
+ }
+}
+
diff --git a/java/java-tests/testData/codeInsight/completion/smartType/FilteredStaticMethods.java b/java/java-tests/testData/codeInsight/completion/smartType/FilteredStaticMethods.java
new file mode 100644
index 000000000000..3f9a20a8d6f6
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/completion/smartType/FilteredStaticMethods.java
@@ -0,0 +1,14 @@
+import java.util.ArrayList;
+import java.util.List;
+
+class A {
+ {
+ List<A> s = new ArrayList<>();
+ s.stream().filter(A::<caret>);
+ }
+
+ public boolean accept() {
+ return true;
+ }
+}
+
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/AgentPremain.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/AgentPremain.java
new file mode 100644
index 000000000000..2fe9b41c2407
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/AgentPremain.java
@@ -0,0 +1,11 @@
+package java.lang.instrument;
+
+class Instrumentation {}
+
+class Foo {
+
+ public void agentmain(String args, Instrumentation i) {
+ System.out.println(args);
+ System.out.println(i);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA79251.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA79251.java
new file mode 100644
index 000000000000..b26587fb42ce
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA79251.java
@@ -0,0 +1,10 @@
+class Main {
+ public static class InnerClass {
+ private String field;
+ }
+ public static class InnerSubClass extends InnerClass {
+ public String getParentField() {
+ return this.<error descr="'field' has private access in 'Main.InnerClass'">field</error>;
+ }
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java
index d0d4dbc5324a..ac3eb042da5f 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java
@@ -45,5 +45,6 @@ class UnsupportedFeatures {
interface I {
<error descr="Extension methods are not supported at this language level">default void m() { }</error>
+ <error descr="Extension methods are not supported at this language level">static void m() { }</error>
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java
new file mode 100644
index 000000000000..3f81f49cac57
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java
@@ -0,0 +1,36 @@
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+class SerializationProxy implements Externalizable
+{
+ private static final long serialVersionUID = 1L;
+
+ private Object object;
+
+ public SerializationProxy()
+ {
+ // Empty constructor for Externalizable class
+ }
+
+ private <warning descr="Private constructor 'SerializationProxy(java.lang.Object)' is never used">SerializationProxy</warning>(Object object)
+ {
+ this.object = object;
+ }
+
+ public void writeExternal(ObjectOutput out) throws IOException
+ {
+ out.writeObject(this.object);
+ }
+
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+ {
+ this.object = in.readObject();
+ }
+
+ protected Object readResolve()
+ {
+ return this.object;
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IDEA122519EnclosingInstance.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IDEA122519EnclosingInstance.java
new file mode 100644
index 000000000000..3de0841eb0a9
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/IDEA122519EnclosingInstance.java
@@ -0,0 +1,20 @@
+class ClassA {
+ public abstract class InnerAbstractA {
+ }
+}
+
+class ClassC {
+ static ClassA classA = new ClassA();
+
+ public static ClassA getClassA() {
+ return classA;
+ }
+}
+
+class ClassB {
+ public static class InnerClassA extends ClassA.InnerAbstractA {
+ public InnerClassA() {
+ ClassC.getClassA().super();
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/ambiguousInheritance/pck/AmbiguousMethodCall.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/ambiguousInheritance/pck/AmbiguousMethodCall.java
index 580a30a72403..5eab22e56d86 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/ambiguousInheritance/pck/AmbiguousMethodCall.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/ambiguousInheritance/pck/AmbiguousMethodCall.java
@@ -7,7 +7,7 @@ interface A<T>
interface B<T> extends A<T[]> { }
-class C<T extends A<Object[]> & B<?>>
+class C<T extends A<Object[]> & B<Object>>
{
void foo(T x)
{
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA120563.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA120563.java
new file mode 100644
index 000000000000..fb60ea55a5d5
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA120563.java
@@ -0,0 +1,33 @@
+
+import java.util.Set;
+
+public class WrongGenerics {
+
+ @SuppressWarnings("unchecked")
+ <T> Set<Foo<? extends T>> foo(Set<Foo<?>> foo) {
+ return <error descr="Inconvertible types; cannot cast 'java.util.Set<Foo<?>>' to 'java.util.Set<Foo<? extends T>>'">(Set<Foo<? extends T>>)foo</error>;
+ }
+
+ @SuppressWarnings("unchecked")
+ <T> Set<Foo<? extends T>> bar(Set<Foo<? extends T>> foo) {
+ return <error descr="Inconvertible types; cannot cast 'java.util.Set<Foo<? extends T>>' to 'java.util.Set<Foo<?>>'">(Set<Foo<?>>) foo</error>;
+ }
+
+ @SuppressWarnings("unchecked")
+ <T> Foo<? extends T> bothSucceed(Foo<?> foo) {
+ return (Foo<? extends T>) foo;
+ }
+
+ @SuppressWarnings("unchecked")
+ <T> Foo<Foo<? extends T>> bothFail(Foo<Foo<?>> foo) {
+ return <error descr="Inconvertible types; cannot cast 'Foo<Foo<?>>' to 'Foo<Foo<? extends T>>'">(Foo<Foo<? extends T>>) foo</error>;
+ }
+
+ @SuppressWarnings("unchecked")
+ <T> Set<Foo<? extends T>> onlyIntelliJSucceeds(Set<Foo<?>> foo) {
+ return <error descr="Inconvertible types; cannot cast 'java.util.Set<Foo<?>>' to 'java.util.Set<Foo<? extends T>>'">(Set<Foo<? extends T>>) foo</error>;
+ }
+}
+
+class Foo<T> {
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA121400.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA121400.java
new file mode 100644
index 000000000000..bab56b84a45f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA121400.java
@@ -0,0 +1,13 @@
+import java.util.*;
+
+class Test<K,V> {
+ private final Map<? extends K, ? extends V> m = null;
+
+ {
+ f(m.entrySet());
+ }
+
+ private static <A, B> void f(Set<? extends Map.Entry<? extends A, ? extends B>> s) {}
+
+}
+
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123316.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123316.java
new file mode 100644
index 000000000000..101c8f397a8a
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123316.java
@@ -0,0 +1,24 @@
+class Temp {
+
+ interface Future<F> {}
+
+ class Message {
+ }
+
+ interface Client<C extends Client, M> {
+ <T> Future<T> request(M request);
+ }
+
+ interface MessageClient extends Client<MessageClient, Message> {
+ Future<Message> request(Message request);
+ }
+
+ abstract class AbstractClient implements MessageClient {
+ }
+
+ class ConcreteClient extends AbstractClient {
+ public Future<Message> request(Message request) {
+ return null;
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123338.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123338.java
new file mode 100644
index 000000000000..fdef47529a8f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123338.java
@@ -0,0 +1,12 @@
+class Aaa<Ta> {
+ class Inner {}
+ void doSmth(final Inner inner) {}
+}
+
+class Bbb<T> extends Aaa<T> {
+ class SubInner extends Aaa<T>.Inner {}
+ void doSmth(final SubInner inner) {}
+ void ambiguousCall() {
+ doSmth (new SubInner());
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123352.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123352.java
new file mode 100644
index 000000000000..1c49b587ee71
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123352.java
@@ -0,0 +1,17 @@
+import java.util.*;
+
+class Test {
+ class Predicate<T> {
+ <S extends T> boolean test(final Collection<T> src) {
+ return true;
+ }
+ <S extends T> boolean test(final Iterable<T> iterable) {
+ return false;
+ }
+ }
+
+ public void testPredicate() {
+ final Predicate<Integer> predicate = new Predicate<>();
+ predicate.test(new ArrayList<Integer>());
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123518.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123518.java
new file mode 100644
index 000000000000..0440475bde5d
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA123518.java
@@ -0,0 +1,21 @@
+import java.util.*;
+
+class sTest {
+
+ public void shouldCallListConstructor(){
+ List<String>stringList=new ArrayList<String>();
+ ClassUnderTest<Date> cut=new ClassUnderTest<>(stringList);
+ }
+
+ private class ClassUnderTest<T extends Date> {
+
+ public String constructorString;
+ private ClassUnderTest(List<T>stringList) {
+ constructorString="Using List Constructor";
+ }
+
+ private ClassUnderTest(Iterable<String> iterables) {
+ constructorString="Using Iterables Constructor";
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57311.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57311.java
index 9ed409cfc19f..2be9a4f1e4ff 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57311.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57311.java
@@ -4,7 +4,7 @@ class A<T> {
}
void bar(A<?> x){
- baz<error descr="'baz(A<A<? extends S>>)' in 'A' cannot be applied to '(A<A<capture<?>>>)'">(x.foo())</error>;
+ baz<error descr="'baz(A<A<?>>)' in 'A' cannot be applied to '(A<A<capture<?>>>)'">(x.foo())</error>;
}
<S> void baz(A<A<? extends S>> x){}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57439.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57439.java
index 544d6c16a605..2ca8deeed873 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57439.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57439.java
@@ -17,14 +17,14 @@ class B<T> extends A<A<T>> {
foo2(sb);
foo2(s);
- foo3<error descr="'foo3(A<A<? extends T>>)' in 'B' cannot be applied to '(B<capture<?>>)'">(b)</error>;
- foo3<error descr="'foo3(A<A<? extends T>>)' in 'B' cannot be applied to '(B<capture<? extends java.lang.String>>)'">(eb)</error>;
- foo3<error descr="'foo3(A<A<? extends T>>)' in 'B' cannot be applied to '(B<capture<? super java.lang.String>>)'">(sb)</error>;
+ foo3<error descr="'foo3(A<A<?>>)' in 'B' cannot be applied to '(B<capture<?>>)'">(b)</error>;
+ foo3<error descr="'foo3(A<A<? extends java.lang.String>>)' in 'B' cannot be applied to '(B<capture<? extends java.lang.String>>)'">(eb)</error>;
+ foo3<error descr="'foo3(A<A<?>>)' in 'B' cannot be applied to '(B<capture<? super java.lang.String>>)'">(sb)</error>;
foo3<error descr="'foo3(A<A<? extends java.lang.String>>)' in 'B' cannot be applied to '(B<java.lang.String>)'">(s)</error>;
- foo4<error descr="'foo4(A<A<? super T>>)' in 'B' cannot be applied to '(B<capture<?>>)'">(b)</error>;
- foo4<error descr="'foo4(A<A<? super T>>)' in 'B' cannot be applied to '(B<capture<? extends java.lang.String>>)'">(eb)</error>;
- foo4<error descr="'foo4(A<A<? super T>>)' in 'B' cannot be applied to '(B<capture<? super java.lang.String>>)'">(sb)</error>;
+ foo4<error descr="'foo4(A<A<? super java.lang.Object>>)' in 'B' cannot be applied to '(B<capture<?>>)'">(b)</error>;
+ foo4<error descr="'foo4(A<A<? super java.lang.Object>>)' in 'B' cannot be applied to '(B<capture<? extends java.lang.String>>)'">(eb)</error>;
+ foo4<error descr="'foo4(A<A<? super java.lang.String>>)' in 'B' cannot be applied to '(B<capture<? super java.lang.String>>)'">(sb)</error>;
foo4<error descr="'foo4(A<A<? super java.lang.String>>)' in 'B' cannot be applied to '(B<java.lang.String>)'">(s)</error>;
foo5(b);
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA64103.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA64103.java
new file mode 100644
index 000000000000..fd85609ff4cb
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA64103.java
@@ -0,0 +1,37 @@
+import java.util.*;
+
+class Test {
+
+ public static <R, E, RC extends Collection<R>, C extends Collection<E>> RC collectionGenericTest(C collection, Lambda<R, E> lambda) {
+ return (RC) new Vector<R>();
+ }
+
+ public static <R, E, RC extends List<R>, C extends List<E>> RC listGenericTest(C list, Lambda<R, E> lambda) {
+ return (RC) new Vector<R>();
+ }
+
+ public static void testGeneric() {
+ Collection<String> testCollection = collectionGenericTest(new Vector<Integer>(), new Lambda<String, Integer>() {
+ @Override
+ public String lambda(Integer l) {
+ return null;
+ }
+ });
+
+ List<String> testList = listGenericTest(new Vector<Integer>(), new Lambda<String, Integer>() {
+ @Override
+ public String lambda(Integer l) {
+ return null;
+ }
+ });
+ }
+
+ private interface Lambda<R, A> {
+ public R lambda(A l);
+ }
+
+ <error descr="Class 'Vector' must either be declared abstract or implement abstract method 'get(int)' in 'AbstractList'">private static class Vector<A> extends AbstractList<A> implements List<A></error> {
+ public Vector() {
+ }
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams.java
index 2adff2f8f495..180b75572c6e 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams.java
@@ -18,7 +18,7 @@ interface IA2<T> {}
interface IB2<T> extends IA2<T[]> {}
class A2 {
- <T extends IA2<Object[]> & IB2<?>> void foo(){}
+ <T extends IA2<Object[]> & IB2<Object>> void foo(){}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams1.java
new file mode 100644
index 000000000000..f7fda29752d4
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/InheritedWithDifferentArgsInTypeParams1.java
@@ -0,0 +1,10 @@
+import java.util.List;
+
+interface Base<T> {
+}
+
+interface Middle<T> extends Base<List<? super T>> {
+}
+
+<error descr="'Base' cannot be inherited with different type arguments: 'java.util.List<? super T>' and 'java.util.List<T>'">interface Child<T> extends Middle<T>, Base<List<T>></error> {
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/CaptureInsideNestedCalls.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/CaptureInsideNestedCalls.java
new file mode 100644
index 000000000000..38b699810c25
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/CaptureInsideNestedCalls.java
@@ -0,0 +1,15 @@
+import java.util.Iterator;
+
+class Test<K, V> {
+
+ private final Iterator<? extends Foo<? extends K, ? extends V>> i = null;
+
+ public Foo<K, V> next() {
+ return new Bar<>(i.next());
+ }
+
+ interface Foo<T, K> {}
+ private static class Bar<K, V> implements Foo<K, V> {
+ Bar(Foo<? extends K, ? extends V> e) {}
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Erasure.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Erasure.java
new file mode 100644
index 000000000000..0d38ade88126
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Erasure.java
@@ -0,0 +1,9 @@
+import java.util.Collection;
+
+abstract class NCollections {
+ public <T> void foo(Collection<? extends T> coll) {
+ bar((Collection)coll);
+ }
+
+ public abstract <T2 extends Object & Comparable<? super T2>> T2 bar(Collection<? extends T2> coll);
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/IDEA122401.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/IDEA122401.java
new file mode 100644
index 000000000000..95b8efc8303e
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/IDEA122401.java
@@ -0,0 +1,26 @@
+import java.util.Comparator;
+
+class NullComparator<T> {
+ private final Comparator<T> real = null;
+ private Comparator<? super T> other;
+ private Comparator<T> another;
+
+ NullComparator(Comparator<? super T> real) {
+ }
+
+ public NullComparator<T> thenComparing() {
+ return new NullComparator<>(real == null ? other : another);
+ }
+
+ Comparator<T> a() {
+ return null;
+ }
+
+ Comparator<? super T> b() {
+ return null;
+ }
+
+ public NullComparator<T> thenComparing1() {
+ return new NullComparator<>(real == null ? a() : b());
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/InheritedWithDifferentArgsInTypeParams.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/InheritedWithDifferentArgsInTypeParams.java
index 2adff2f8f495..a1c0d83bc64a 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/InheritedWithDifferentArgsInTypeParams.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/InheritedWithDifferentArgsInTypeParams.java
@@ -18,7 +18,7 @@ interface IA2<T> {}
interface IB2<T> extends IA2<T[]> {}
class A2 {
- <T extends IA2<Object[]> & IB2<?>> void foo(){}
+ <<error descr="'IA2' cannot be inherited with different type arguments: 'java.lang.Object[]' and 'capture<?>[]'"></error>T extends IA2<Object[]> & IB2<?>> void foo(){}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/SOEInLeastUpperClass.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/SOEInLeastUpperClass.java
index 70ad2666c619..20d377aaf8fa 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/SOEInLeastUpperClass.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/SOEInLeastUpperClass.java
@@ -7,6 +7,6 @@ interface B {}
}
void bar (boolean a, A a1, B b1){
- <error descr="Incompatible types. Found: 'java.lang.Object', required: 'T'">T t = a ? a1 : b1;</error>
+ T t = a ? <error descr="Incompatible types. Found: 'A', required: 'T'">a1</error> : <error descr="Incompatible types. Found: 'B', required: 'T'">b1</error>;
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/SuperWildcardWithBoundPromotion.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/SuperWildcardWithBoundPromotion.java
index cfdc2a5402a9..f1a533020e34 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/SuperWildcardWithBoundPromotion.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/SuperWildcardWithBoundPromotion.java
@@ -20,7 +20,7 @@ class Bug2<T extends Integer>{
}
void bug1(Parametrized<? super T> param) {
- foo(param);
+ <error descr="Inferred type 'capture<? super T>' for type parameter 'I' is not within its bound; should extend 'java.lang.Number'">foo(param)</error>;
}
@@ -47,7 +47,7 @@ class Test {
}
void bug1(Parametrized<? super T> param) {
- <error descr="Inferred type 'java.io.Serializable' for type parameter 'I' is not within its bound; should extend 'java.lang.Number'">foo(param)</error>;
+ <error descr="Inferred type 'capture<? super T>' for type parameter 'I' is not within its bound; should extend 'java.lang.Number'">foo(param)</error>;
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Variance.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Variance.java
index 298a33dcbdf6..7556292ef538 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Variance.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/Variance.java
@@ -142,7 +142,7 @@ class S1 {
}
void bar(List<? extends S1> k) {
- f<error descr="'f(java.util.List<capture<? extends S1>>, capture<? extends S1>)' in 'S1' cannot be applied to '(java.util.List<capture<? extends S1>>, capture<? extends S1>)'">(k, k.get(0))</error>;
+ f<error descr="'f(java.util.List<capture<? extends S1>>, capture<? extends S1>)' in 'S1' cannot be applied to '(java.util.List<capture<? extends S1>>, S1)'">(k, k.get(0))</error>;
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardBoundsCombination.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardBoundsCombination.java
new file mode 100644
index 000000000000..d621979d7bf9
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardBoundsCombination.java
@@ -0,0 +1,16 @@
+import java.util.*;
+import java.util.function.Consumer;
+
+class NachCollections<K,V> {
+ <K1, V1> Consumer<Map.Entry<K1, V1>> consumer(Consumer<Map.Entry<K1, V1>> c) {
+ return null;
+ }
+
+ public void forEach(Collection<? extends Map.Entry<K,V>> c1,
+ Collection<? super Map.Entry<K,V>> c2,
+ Consumer<Map.Entry<K, V>> a) {
+ c1.forEach(consumer(a));
+ c2.forEach(consumer<error descr="'consumer(java.util.function.Consumer<java.util.Map.Entry<K1,V1>>)' in 'NachCollections' cannot be applied to '(java.util.function.Consumer<java.util.Map.Entry<K,V>>)'">(a)</error>);
+ }
+}
+
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardsBoundsIntersection.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardsBoundsIntersection.java
index cf8ad1c9fb9f..6385fe5d125e 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardsBoundsIntersection.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/WildcardsBoundsIntersection.java
@@ -10,6 +10,6 @@ class Node<NodeTypeT extends NodeType> {
class Main {
public static void main(NodeProperty<NumberExpression, Integer> nval, Node<? extends NodeType> expr) {
- int val = expr.get<error descr="'get(NodeProperty<? super capture<? extends NodeType>,java.lang.Object>)' in 'Node' cannot be applied to '(NodeProperty<NumberExpression,java.lang.Integer>)'">(nval)</error>;
+ int val = expr.get<error descr="'get(NodeProperty<? super capture<? extends NodeType>,java.lang.Integer>)' in 'Node' cannot be applied to '(NodeProperty<NumberExpression,java.lang.Integer>)'">(nval)</error>;
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/DefaultMethodTouched.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/DefaultMethodTouched.java
new file mode 100644
index 000000000000..3edf10d0a992
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/DefaultMethodTouched.java
@@ -0,0 +1,12 @@
+interface SAM {
+ default void <caret>foo(){}
+ void bar();
+}
+
+class Test {
+ {
+ bar(() -> {});
+ }
+
+ void bar(SAM sam){}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/DefaultMethodTouched_after.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/DefaultMethodTouched_after.java
new file mode 100644
index 000000000000..b833d50f4a7d
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/DefaultMethodTouched_after.java
@@ -0,0 +1,12 @@
+interface SAM {
+ default void foo(boolean b){}
+ void bar();
+}
+
+class Test {
+ {
+ bar(() -> {});
+ }
+
+ void bar(SAM sam){}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/MethodArgument.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/MethodArgument.java
new file mode 100644
index 000000000000..2a28ea78e315
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/MethodArgument.java
@@ -0,0 +1,11 @@
+interface SAM {
+ void <caret>foo();
+}
+
+class Test {
+ {
+ bar(() -> {});
+ }
+
+ void bar(SAM sam){}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/VariableDeclaration.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/VariableDeclaration.java
new file mode 100644
index 000000000000..b28339fca623
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/VariableDeclaration.java
@@ -0,0 +1,9 @@
+interface SAM {
+ void <caret>foo();
+}
+
+class Test {
+ {
+ SAM sam = () -> {};
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/findUsages/FieldFromAnonymousClassScope.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/findUsages/FieldFromAnonymousClassScope.java
new file mode 100644
index 000000000000..db563c05a5be
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/findUsages/FieldFromAnonymousClassScope.java
@@ -0,0 +1,21 @@
+import java.util.Collection;
+import java.util.Map;
+
+class Test{
+
+ public static void main(String[] args) {
+ Map<String, Collection<Integer>> myMap = null;
+
+ myMap.entrySet().stream()
+ .flatMap(entry -> entry.getValue().stream()
+ .map(val -> new Object() {
+ String key = entry.getKey();
+ Integer va<caret>lue = val;
+ }))
+ .forEachOrdered(o -> {
+ final String key = o.key;
+ final Integer value = o.value;
+ System.out.println("key: " + key + " value: " + value);
+ });
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/findUsages/MethodArgument.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/findUsages/MethodArgument.java
new file mode 100644
index 000000000000..2fe6964a5f53
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/findUsages/MethodArgument.java
@@ -0,0 +1,11 @@
+interface SA<caret>M {
+ void foo();
+}
+
+class Test {
+ {
+ bar(() -> {});
+ }
+
+ void bar(SAM sam){}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/AmbiguitySpecificReturn.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/AmbiguitySpecificReturn.java
index 5ecd4f5f77ff..5b9d5d74e31e 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/AmbiguitySpecificReturn.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/AmbiguitySpecificReturn.java
@@ -1,8 +1,8 @@
class IntStream {
private void foo(IntStream s) {
- s.map(i -> <error descr="Operator '<<' cannot be applied to 'int', '<lambda parameter>'">1 << i</error>);
+ s.map<error descr="Ambiguous method call: both 'IntStream.map(IntUnaryOperator)' and 'IntStream.map(ObjIntFunction<Integer>)' match">(i -> 1 << i)</error>;
s.map<error descr="Ambiguous method call: both 'IntStream.map(IntUnaryOperator)' and 'IntStream.map(ObjIntFunction<Integer>)' match">(i -> 1)</error>;
- s.map<error descr="Ambiguous method call: both 'IntStream.map(IntUnaryOperator)' and 'IntStream.map(ObjIntFunction<T>)' match">(i -> i)</error>;
+ s.map<error descr="Ambiguous method call: both 'IntStream.map(IntUnaryOperator)' and 'IntStream.map(ObjIntFunction<Integer>)' match">(i -> i)</error>;
}
public static void main(String[] args) {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/IDEA123308.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/IDEA123308.java
new file mode 100644
index 000000000000..b650fd93b6ad
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/IDEA123308.java
@@ -0,0 +1,14 @@
+class Test {
+ private final int a;
+
+ public Test() {
+ a = 1;
+ run(() -> {
+ <error descr="Cannot assign a value to final variable 'a'">a</error> = 2;
+ });
+ }
+
+ public void run(Runnable r) {
+ r.run();
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java
index 0f7aa7012061..10cd3fffeb86 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/ReturnTypeCompatibility.java
@@ -25,7 +25,7 @@ class ReturnTypeIncompatibility {
}
public static void main(String[] args) {
- call<error descr="Ambiguous method call: both 'ReturnTypeIncompatibility.call(I1<P>)' and 'ReturnTypeIncompatibility.call(I2<P>)' match">(i-> {return i;})</error>;
+ call<error descr="Ambiguous method call: both 'ReturnTypeIncompatibility.call(I1<Integer>)' and 'ReturnTypeIncompatibility.call(I2<P>)' match">(i-> {return i;})</error>;
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/TypeArgsConsistency.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/TypeArgsConsistency.java
index 0c79d849fca7..911f35c615e6 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/TypeArgsConsistency.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/highlighting/TypeArgsConsistency.java
@@ -12,7 +12,7 @@ class TypeArgsConsistency {
I<Integer> i1 = (i, j) -> i + j;
foo((i, j) -> i + j);
I<Integer> i2 = bar((i, j) -> i + j);
- I<Integer> i3 = bar(<error descr="Cyclic inference">(i, j) -> "" + i + j</error>);
+ I<Integer> i3 = bar(<error descr="Incompatible return type String in lambda expression">(i, j) -> "" + i + j</error>);
}
}
@@ -43,7 +43,7 @@ class TypeArgsConsistency2 {
I<Integer> i1 = bar(x -> x);
I1<Integer> i2 = bar1(x -> 1);
I2<String> aI2 = bar2(x -> "");
- I2<Integer> aI28 = bar2( <error descr="Cyclic inference">x-> ""</error>);
+ I2<Integer> aI28 = bar2( <error descr="Incompatible return type String in lambda expression">x-> ""</error>);
I2<Integer> i3 = bar2(x -> x);
I2<Integer> i4 = bar2(x -> foooI());
System.out.println(i4.foo(2));
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA120498.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA120498.java
new file mode 100644
index 000000000000..8316f9e41fa9
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA120498.java
@@ -0,0 +1,11 @@
+
+interface X<T> { void m(T arg); }
+interface Y<T> { void m(T arg); }
+interface Z<T> extends X<T>, Y<T> {}
+
+class App {
+ public static void main(String[] args) {
+ Z<String> z = (String s) -> System.out.println(s);
+ z.m("Hello, world");
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA122720.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA122720.java
new file mode 100644
index 000000000000..84fcdcd2e9d5
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA122720.java
@@ -0,0 +1,21 @@
+interface I {
+ default void f() {}
+}
+
+class P {
+ public void f() {}
+}
+
+class AP extends P implements I {
+ @Override
+ public void f() {
+ I.super.f();
+ }
+}
+
+class AC implements Cloneable {
+
+ public Object clone() throws CloneNotSupportedException {
+ return Cloneable.super.<error descr="'clone()' has protected access in 'java.lang.Object'">clone</error>();
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA123839.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA123839.java
new file mode 100644
index 000000000000..d79effbcd615
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/IDEA123839.java
@@ -0,0 +1,13 @@
+import java.util.Iterator;
+
+interface A4 {
+ default Iterator iterator() {
+ return null;
+ }
+}
+
+interface A5 {
+ Iterator iterator();
+}
+
+abstract class <error descr="B inherits unrelated defaults for iterator() from types A5 and A4">B</error> implements A5, A4 {} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/NotInheritFromUnrelatedDefault.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/NotInheritFromUnrelatedDefault.java
index 79f310bdbde6..9cea47800df3 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/NotInheritFromUnrelatedDefault.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/NotInheritFromUnrelatedDefault.java
@@ -12,7 +12,7 @@ interface SecondParent {
class <error descr="Class 'SecondParent' must either be declared abstract or implement abstract method 'doSomething()' in 'SecondParent'">FirstSon</error> implements FirstParent, SecondParent {}
-<error descr="Class 'SecondSon' must either be declared abstract or implement abstract method 'doSomething()' in 'SecondParent'">class SecondSon implements SecondParent, FirstParent</error> {}
+<error descr="Class 'SecondSon' must either be declared abstract or implement abstract method 'doSomething()' in 'SecondParent'">class <error descr="SecondSon inherits unrelated defaults for doSomething() from types SecondParent and FirstParent">SecondSon</error> implements SecondParent, FirstParent</error> {}
interface A {
default int foo() {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/SuperProtectedCalls.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/SuperProtectedCalls.java
new file mode 100644
index 000000000000..feaf0d43b72c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods/SuperProtectedCalls.java
@@ -0,0 +1,9 @@
+package p2;
+
+import p.*;
+
+class Test extends Foo {
+ {
+ Test.super.foo();
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/AccessModifiers.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/AccessModifiers.java
index bc235b224c31..cb76d7470816 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/AccessModifiers.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/AccessModifiers.java
@@ -25,9 +25,9 @@ class AlienTest {
}
static {
- <error descr="Incompatible types. Found: '<method reference>', required: 'AlienTest.IInt'">IInt i1 = MyTest::abracadabra;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'AlienTest.IInt'">IInt i2 = MyTest::foo;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'AlienTest.IInt'">IInt i3 = MyTest::bar;</error>
+ IInt i1 = MyTest::<error descr="Cannot resolve method 'abracadabra'">abracadabra</error>;
+ IInt i2 = MyTest::<error descr="Cannot resolve method 'foo'">foo</error>;
+ IInt i3 = MyTest::<error descr="Cannot resolve method 'bar'">bar</error>;
<error descr="Incompatible types. Found: '<method reference>', required: 'AlienTest.IIntInt'">IIntInt i4 = MyTest::bar;</error>
IInt i5 = <error descr="Non-static method cannot be referenced from a static context">MyTest::baz</error>;
IInt i6 = <error descr="'foo(int)' is not public in 'MyTest.Foo'. Cannot be accessed from outside package">MyTest.foo::foo</error>;
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Ambiguity.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Ambiguity.java
index c7f2194a151d..475ae43cdd78 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Ambiguity.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Ambiguity.java
@@ -54,7 +54,7 @@ class MyTest1 {
}
{
- <error descr="Incompatible types. Found: '<method reference>', required: 'todelete.MyTest1.Bar1'">Bar1 b1 = MyTest2 :: foo;</error>
+ Bar1 b1 = MyTest2 :: <error descr="Cannot resolve method 'foo'">foo</error>;
bar(MyTest1 :: foo);
}
}
@@ -80,7 +80,7 @@ class MyTest2 {
}*/
{
- <error descr="Incompatible types. Found: '<method reference>', required: 'todelete.MyTest2.Bar1'">Bar1 b1 = MyTest2 :: foo;</error>
+ Bar1 b1 = MyTest2 :: <error descr="Cannot resolve method 'foo'">foo</error>;
bar(MyTest2 :: foo);
}
}
@@ -106,8 +106,8 @@ class MyTest3 {
}
{
- <error descr="Incompatible types. Found: '<method reference>', required: 'todelete.MyTest3.Bar1'">Bar1 b1 = MyTest2 :: foo;</error>
- bar<error descr="'bar(todelete.MyTest3.Bar2)' in 'todelete.MyTest3' cannot be applied to '(<method reference>)'">(MyTest3 :: foo)</error>;
+ Bar1 b1 = MyTest2 :: <error descr="Cannot resolve method 'foo'">foo</error>;
+ bar(MyTest3 :: <error descr="Cannot resolve method 'foo'">foo</error>);
}
}
@@ -129,7 +129,7 @@ class MyTest4 {
}
{
- bar<error descr="'bar(todelete.MyTest4.Bar1)' in 'todelete.MyTest4' cannot be applied to '(<method reference>)'">(MyTest4:: foo)</error>;
+ bar(MyTest4:: <error descr="Cannot resolve method 'foo'">foo</error>);
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Assignability.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Assignability.java
index 6b8d1fbfa6a5..a5dbcd07db18 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Assignability.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Assignability.java
@@ -1,8 +1,8 @@
class Test {
{
- <error descr="Incompatible types. Found: '<method reference>', required: 'java.lang.Runnable'">Runnable b = Test :: length;</error>
+ Runnable b = Test :: <error descr="Cannot resolve method 'length'">length</error>;
Comparable<String> c = Test :: length;
- <error descr="Incompatible types. Found: '<method reference>', required: 'java.lang.Comparable<java.lang.Integer>'">Comparable<Integer> c1 = Test :: length;</error>
+ Comparable<Integer> c1 = Test :: <error descr="Cannot resolve method 'length'">length</error>;
}
public static Integer length(String s) {
@@ -16,7 +16,7 @@ class Test {
class Test1 {
{
- <error descr="Incompatible types. Found: '<method reference>', required: 'java.lang.Runnable'">Runnable b = Test1 :: length;</error>
+ Runnable b = Test1 :: <error descr="Cannot resolve method 'length'">length</error>;
Comparable<String> c = Test1 :: length;
Comparable<Integer> c1 = Test1 :: length;
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefInnerFromSuper.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefInnerFromSuper.java
index 7c3bff9f386c..145823ff7ebd 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefInnerFromSuper.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefInnerFromSuper.java
@@ -13,7 +13,7 @@ class MyTest {
}
void test() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.Child.I'">I var = Child.Inner::new;</error>
+ I var = Child.Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;
}
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefs.java
index c9cb53a5c4d2..1b0893c0e0be 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefs.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefs.java
@@ -70,8 +70,8 @@ class MyTest3<X> {
static void test(I<Integer> s) { }
public static void main(String[] args) {
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest3.I<java.lang.Integer>'">I<Integer> s = MyTest3<String>::new;</error>
- test<error descr="'test(MyTest3.I<java.lang.Integer>)' in 'MyTest3' cannot be applied to '(<method reference>)'">(MyTest3<String>::new)</error>;
+ I<Integer> s = MyTest3<String>::<error descr="Cannot resolve constructor 'MyTest3'">new</error>;
+ test(MyTest3<String>::<error descr="Cannot resolve constructor 'MyTest3'">new</error>);
}
}
@@ -99,6 +99,6 @@ class MyTestInvalidQ {
interface I {
A foo();
}
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTestInvalidQ.A.I'">I i = A :: new;</error>
+ I i = <error descr="'A' is abstract; cannot be instantiated">A :: new</error>;
}
} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefsInnerClasses.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefsInnerClasses.java
index 99337ff597c2..887a776275a1 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefsInnerClasses.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ConstructorRefsInnerClasses.java
@@ -88,11 +88,11 @@ class StaticInner2 {
static {
- <error descr="Incompatible types. Found: '<method reference>', required: 'StaticInner2.I1'">I1 i1 = StaticInner2.Inner :: new;</error>
+ I1 i1 = StaticInner2.Inner :: <error descr="Cannot resolve constructor 'Inner'">new</error>;
}
{
- <error descr="Incompatible types. Found: '<method reference>', required: 'StaticInner2.I1'">I1 i1 = StaticInner2.Inner :: new;</error>
+ I1 i1 = StaticInner2.Inner :: <error descr="Cannot resolve constructor 'Inner'">new</error>;
}
}
@@ -109,11 +109,11 @@ class NonStaticInner2 {
static {
- <error descr="Incompatible types. Found: '<method reference>', required: 'NonStaticInner2.I1'">I1 i1 = NonStaticInner2.Inner :: new;</error>
+ I1 i1 = NonStaticInner2.Inner :: <error descr="Cannot resolve constructor 'Inner'">new</error>;
}
{
- <error descr="Incompatible types. Found: '<method reference>', required: 'NonStaticInner2.I1'">I1 i1 = NonStaticInner2.Inner :: new;</error>
+ I1 i1 = NonStaticInner2.Inner :: <error descr="Cannot resolve constructor 'Inner'">new</error>;
}
}
@@ -145,7 +145,7 @@ class NonStaticInner3 {
}
{
- <error descr="Incompatible types. Found: '<method reference>', required: 'NonStaticInner3.I3<NonStaticInner3.Foo>'">I3<Foo> b1 = Foo::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'NonStaticInner3.I4<NonStaticInner3.Foo>'">I4<Foo> b2 = Foo::new;</error>
+ I3<Foo> b1 = Foo::<error descr="Cannot resolve constructor 'Foo'">new</error>;
+ I4<Foo> b2 = Foo::<error descr="Cannot resolve constructor 'Foo'">new</error>;
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/DefaultConstructor.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/DefaultConstructor.java
index 25349976f249..53cd6381f3f9 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/DefaultConstructor.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/DefaultConstructor.java
@@ -13,25 +13,25 @@ class DefaultConstructor {
}
static void test1() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor.I2<DefaultConstructor.Outer.Inner,DefaultConstructor.Outer>'">I2<Inner, Outer> i2 = Inner :: new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor.I2<DefaultConstructor.Outer.Inner,java.lang.String>'">I2<Inner, String> i2str = Inner :: new;</error>
+ I2<Inner, Outer> i2 = Inner :: <error descr="Cannot resolve constructor 'Inner'">new</error>;
+ I2<Inner, String> i2str = Inner :: <error descr="Cannot resolve constructor 'Inner'">new</error>;
}
void test2() {
I1<Inner> i1 = Inner :: new;
<error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor.I1<java.lang.Integer>'">I1<Integer> i1Int = Inner :: new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor.I2<DefaultConstructor.Outer.Inner,DefaultConstructor.Outer>'">I2<Inner, Outer> i2 = Inner :: new;</error>
+ I2<Inner, Outer> i2 = Inner :: <error descr="Cannot resolve constructor 'Inner'">new</error>;
}
}
static void test1() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor.I2<DefaultConstructor.Outer.Inner,DefaultConstructor.Outer>'">I2<Outer.Inner, Outer> i2 = Outer.Inner::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor.I2<DefaultConstructor.Outer.Inner,java.lang.String>'">I2<Outer.Inner, String> i2str = Outer.Inner::new;</error>
+ I2<Outer.Inner, Outer> i2 = Outer.Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;
+ I2<Outer.Inner, String> i2str = Outer.Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;
}
void test2() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor.I2<DefaultConstructor.Outer.Inner,DefaultConstructor.Outer>'">I2<Outer.Inner, Outer> i2 = Outer.Inner::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor.I2<DefaultConstructor.Outer.Inner,java.lang.String>'">I2<Outer.Inner, String> i2str = Outer.Inner::new;</error>
+ I2<Outer.Inner, Outer> i2 = Outer.Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;
+ I2<Outer.Inner, String> i2str = Outer.Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;
}
}
@@ -52,7 +52,7 @@ class DefaultConstructor2 {
void f() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor2.I'">I i1 = DefaultConstructor2 :: new;</error>
+ I i1 = DefaultConstructor2 :: <error descr="Cannot resolve constructor 'DefaultConstructor2'">new</error>;
I i2 = <error descr="Cannot find class this">this</error>::new;
}
}
@@ -61,7 +61,7 @@ class DefaultConstructor3 {
public class Inner {}
public static class StaticInner {}
- static <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor3.I'">I i = Inner::new;</error>
+ static I i = Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;
static I1 i1 = StaticInner::new;
interface I {
Inner foo();
@@ -76,8 +76,8 @@ class DefaultConstructor4 {
public class Inner {}
public static class StaticInner {}
- static <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor4.I'">I i = Inner::new;</error>
- static <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor4.I1'">I1 i1 = StaticInner::new;</error>
+ static I i = Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;
+ static I1 i1 = StaticInner::<error descr="Cannot resolve constructor 'StaticInner'">new</error>;
interface I {
Inner foo(DefaultConstructor4 receiver);
}
@@ -91,7 +91,7 @@ class DefaultConstructor5 {
public class Inner {}
static void test() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'DefaultConstructor5.I'">I i = Inner::new;</error>
+ I i = Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;
}
void test1() {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ExprReceiver.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ExprReceiver.java
index f3bc8d4b8a6c..632f83b23701 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ExprReceiver.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/ExprReceiver.java
@@ -5,7 +5,7 @@ class ThreadExample {
}
{
A a = new A();
- <error descr="Incompatible types. Found: '<method reference>', required: 'ThreadExample.Function<? super ThreadExample.A,? extends java.lang.String>'">Function<? super A,? extends String> foo = a::foo;</error>
+ Function<? super A,? extends String> foo = a::<error descr="Cannot resolve method 'foo'">foo</error>;
}
static class A {
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefAcceptance.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefAcceptance.java
index 315a8e0c8dff..75f049fefef7 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefAcceptance.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefAcceptance.java
@@ -22,20 +22,20 @@ class Test {
void foo(IFactory cf) { }
void testAssign() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'Test.IFactory'">IFactory c1 = Anno::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'Test.IFactory'">IFactory c2 = E::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'Test.IFactory'">IFactory c3 = I::new;</error>
+ IFactory c1 = <error descr="'Anno' is abstract; cannot be instantiated">Anno::new</error>;
+ IFactory c2 = <error descr="Enum types cannot be instantiated">E::new</error>;
+ IFactory c3 = <error descr="'I' is abstract; cannot be instantiated">I::new</error>;
IFactory c4 = <error descr="Unexpected wildcard">Foo<?></error>::new;
IFactory c5 = <error descr="Cannot find class 1">1</error>::new;
- <error descr="Incompatible types. Found: '<method reference>', required: 'Test.IFactory'">IFactory c6 = ABar::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'Test.IFactory'">IFactory c7 = ABaz::new;</error>
+ IFactory c6 = <error descr="'ABar' is abstract; cannot be instantiated">ABar::new</error>;
+ IFactory c7 = <error descr="'ABaz' is abstract; cannot be instantiated">ABaz::new</error>;
- foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(Anno::new)</error>;
- foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(E::new)</error>;
- foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(I::new)</error>;
+ foo(<error descr="'Anno' is abstract; cannot be instantiated">Anno::new</error>);
+ foo(<error descr="Enum types cannot be instantiated">E::new</error>);
+ foo(<error descr="'I' is abstract; cannot be instantiated">I::new</error>);
foo(<error descr="Unexpected wildcard">Foo<?></error>::new);
foo(<error descr="Cannot find class 1">1</error>::new);
- foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(ABar::new)</error>;
- foo<error descr="'foo(Test.IFactory)' in 'Test' cannot be applied to '(<method reference>)'">(ABaz::new)</error>;
+ foo(<error descr="'ABar' is abstract; cannot be instantiated">ABar::new</error>);
+ foo(<error descr="'ABaz' is abstract; cannot be instantiated">ABaz::new</error>);
}
} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefMisc1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefMisc1.java
index bd9c9ca188d9..14b9a2baa2b2 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefMisc1.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/MethodRefMisc1.java
@@ -144,10 +144,10 @@ class MyTest7{
enum E { }
void test() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest7.I'">I s1 = A::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest7.I'">I s2 = I::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest7.I'">I s3 = AC::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest7.I'">I s4 = E::new;</error>
+ I s1 = <error descr="'A' is abstract; cannot be instantiated">A::new</error>;
+ I s2 = <error descr="'I' is abstract; cannot be instantiated">I::new</error>;
+ I s3 = <error descr="'AC' is abstract; cannot be instantiated">AC::new</error>;
+ I s4 = <error descr="Enum types cannot be instantiated">E::new</error>;
}
}
@@ -165,7 +165,7 @@ class MyTest8{
}
void test() {
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest8.Sub.I'">I var = Sub.Inner::new;</error>;
+ I var = Sub.Inner::<error descr="Cannot resolve constructor 'Inner'">new</error>;;
}
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/QualifierTypeArgs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/QualifierTypeArgs.java
index 7c1e04f2dc5e..f88c5bf76c05 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/QualifierTypeArgs.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/QualifierTypeArgs.java
@@ -12,7 +12,7 @@ class MyTest {
{
I i = Foo<String> :: foo;
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I'">I i1 = Foo<Integer> :: foo;</error>
+ I i1 = Foo<Integer> :: <error descr="Cannot resolve method 'foo'">foo</error>;
}
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java
index ed1efe80d21d..f11a6dedddc9 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/RefOnArrayDeclaration.java
@@ -34,7 +34,7 @@ class OnArrayTest {
Cln s = int[]::clone;
IA a = int[]::new;
<error descr="Incompatible types. Found: '<method reference>', required: 'OnArrayTest.I'">I i = int[]::new;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'OnArrayTest.Len<java.lang.String>'">Len<String> strLen = String[]::length;</error>
+ Len<String> strLen = String[]::<error descr="Cannot resolve method 'length'">length</error>;
ToStr<Integer> toStr = Integer[]::toString;
ArrayReturnType<String[]> a1 = String[]::new;
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Varargs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Varargs.java
index e521df2c2d40..db0dd1578083 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Varargs.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/Varargs.java
@@ -48,27 +48,27 @@ class MyTest {
static {
I1 i1 = MyTest::static_1;
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i2 = MyTest::static_2;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i3 = MyTest::static_3;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i4 = MyTest::static_4;</error>
+ I1 i2 = MyTest::<error descr="Cannot resolve method 'static_2'">static_2</error>;
+ I1 i3 = MyTest::<error descr="Cannot resolve method 'static_3'">static_3</error>;
+ I1 i4 = MyTest::<error descr="Cannot resolve method 'static_4'">static_4</error>;
}
{
I1 i_1 = <error descr="Non-static method cannot be referenced from a static context">MyTest::_1</error>;
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i_2 = MyTest::_2;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i_3 = MyTest::_3;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i_4 = MyTest::_4;</error>
+ I1 i_2 = MyTest::<error descr="Cannot resolve method '_2'">_2</error>;
+ I1 i_3 = MyTest::<error descr="Cannot resolve method '_3'">_3</error>;
+ I1 i_4 = MyTest::<error descr="Cannot resolve method '_4'">_4</error>;
I1 i1 = this::_1;
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i2 = this::_2;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i3 = this::_3;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I1'">I1 i4 = this::_4;</error>
-
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I2'">I2 i21 = MyTest::m1;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I2'">I2 i22 = MyTest::m2;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I2'">I2 i23 = MyTest::m3;</error>
- <error descr="Incompatible types. Found: '<method reference>', required: 'MyTest.I2'">I2 i24 = MyTest::m4;</error>
+ I1 i2 = this::<error descr="Cannot resolve method '_2'">_2</error>;
+ I1 i3 = this::<error descr="Cannot resolve method '_3'">_3</error>;
+ I1 i4 = this::<error descr="Cannot resolve method '_4'">_4</error>;
+
+ I2 i21 = MyTest::<error descr="Cannot resolve method 'm1'">m1</error>;
+ I2 i22 = MyTest::<error descr="Cannot resolve method 'm2'">m2</error>;
+ I2 i23 = MyTest::<error descr="Cannot resolve method 'm3'">m3</error>;
+ I2 i24 = MyTest::<error descr="Cannot resolve method 'm4'">m4</error>;
}
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/VarargsInReceiverPosition.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/VarargsInReceiverPosition.java
index cf2151dc76d8..b34634cfa6a0 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/VarargsInReceiverPosition.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/methodRef/VarargsInReceiverPosition.java
@@ -4,7 +4,7 @@ class Test {
void test() {
Comparator<Test> r2 = Test::yyy;
Comparator1<Test> c1 = <error descr="Non-static method cannot be referenced from a static context">Test::yyy</error>;
- <error descr="Incompatible types. Found: '<method reference>', required: 'Comparator1<Test>'">Comparator1<Test> c2 = Test::xxx;</error>
+ Comparator1<Test> c2 = Test::<error descr="Cannot resolve method 'xxx'">xxx</error>;
}
int yyy(Test... p) { return 1; }
int xxx(Test t) {return 42;}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA123352.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA123352.java
new file mode 100644
index 000000000000..77f04cb98d81
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA123352.java
@@ -0,0 +1,19 @@
+import java.util.*;
+
+class Test {
+ class Predicate<T> {
+ private <<warning descr="Type parameter 'S' is never used">S</warning> extends T> boolean test(final Collection<T> src) {
+ System.out.println(src);
+ return true;
+ }
+ private <<warning descr="Type parameter 'S' is never used">S</warning> extends T> boolean <warning descr="Private method 'test(java.lang.Iterable<T>)' is never used">test</warning>(final Iterable<T> iterable) {
+ System.out.println(iterable);
+ return false;
+ }
+ }
+
+ public void testPredicate() {
+ final Predicate<Integer> predicate = new Predicate<>();
+ predicate.test(new ArrayList<Integer>());
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/JDK8034223.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/JDK8034223.java
new file mode 100644
index 000000000000..e5469aba7a09
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/JDK8034223.java
@@ -0,0 +1,18 @@
+class MS {
+ interface GetInt { int get(); }
+ interface GetInteger { Integer get(); }
+
+ private void m(GetInt getter) {
+ System.out.println(getter);
+ }
+
+ private void m(GetInteger getter) {
+ System.out.println(getter);
+ }
+
+ void test(boolean cond) {
+ m(cond ? () -> 26 : () -> 24);
+ m<error descr="Cannot resolve method 'm(?)'">(cond ? () -> 26 : () -> new Integer(42))</error>;
+ m(cond ? () -> new Integer(26) : () -> new Integer(42));
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/RelatedSAMErasures.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/RelatedSAMErasures.java
new file mode 100644
index 000000000000..e2ac37c8d2e3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/RelatedSAMErasures.java
@@ -0,0 +1,53 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Callable;
+
+
+class Test {
+ interface RunnableX extends Callable<String> {
+ void run() throws Exception;
+
+ default String call() throws Exception
+ {
+ run();
+ return null;
+ }
+ }
+
+ static void foo(RunnableX r){
+ System.out.println(r);
+ }
+ static void foo(Callable<List<?>> c){
+ System.out.println(c);
+ }
+
+ public void test() {
+ foo<error descr="Ambiguous method call: both 'Test.foo(RunnableX)' and 'Test.foo(Callable<List<?>>)' match">(()-> new ArrayList<Void>() )</error>;
+ }
+
+}
+
+class Test1 {
+ interface RunnableX extends Callable<List<?>> {
+ void run() throws Exception;
+
+ default List<?> call() throws Exception
+ {
+ run();
+ return null;
+ }
+ }
+
+ static void foo(RunnableX r){
+ System.out.println(r);
+ }
+ static void foo(Callable<List<?>> c){
+ System.out.println(c);
+ }
+
+ public void test() {
+ foo(()-> new ArrayList<Void>() );
+ }
+
+}
+
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/AdditionalConstraintDependsOnNonMentionedVars.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/AdditionalConstraintDependsOnNonMentionedVars.java
new file mode 100644
index 000000000000..9bf687c7e2a8
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/AdditionalConstraintDependsOnNonMentionedVars.java
@@ -0,0 +1,13 @@
+import java.util.function.Function;
+
+abstract class Test {
+ abstract <T, A, R> Collector<T, A, R> create(Foo<A> foo, Function<A,R> fun);
+ abstract <Ts> Foo<Ts[]> toArray(Ts identity);
+
+ <Tf> Collector<Tf, ?, Tf> foo(Tf t) {
+ return create(toArray(t), a -> a[0]);
+ }
+
+ interface Collector<T1, A1, R1> {}
+ class Foo<D> {}
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119003.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119003.java
new file mode 100644
index 000000000000..f56af02e5dd8
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119003.java
@@ -0,0 +1,84 @@
+package problems;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Optional;
+
+import static java.util.stream.Collectors.*;
+
+class Test {
+
+ enum CaloricLevel { DIET, NORMAL, FAT }
+
+ public static void main(String[] args) {
+ List<Dish> menu = Arrays.asList(
+ new Dish("pork", false, 800, Dish.Type.MEAT),
+ new Dish("beef", false, 700, Dish.Type.MEAT),
+ new Dish("chicken", false, 400, Dish.Type.MEAT),
+ new Dish("french fries", true, 530, Dish.Type.OTHER),
+ new Dish("rice", true, 350, Dish.Type.OTHER),
+ new Dish("season fruit", true, 120, Dish.Type.OTHER),
+ new Dish("pizza", true, 550, Dish.Type.OTHER),
+ new Dish("prawns", false, 400, Dish.Type.FISH),
+ new Dish("salmon", false, 450, Dish.Type.FISH)
+ );
+
+ System.out.println(
+ menu.stream().collect(reducing(0, Dish::getCalories, (Integer i, Integer j) -> i + j))
+ );
+
+ System.out.println(
+ menu.stream().collect(
+ groupingBy(Dish::getType, mapping(
+ dish -> { if (dish.getCalories() <= 400) return CaloricLevel.DIET;
+ else if (dish.getCalories() <= 700) return CaloricLevel.NORMAL;
+ else return CaloricLevel.FAT; },
+ toSet())))
+ );
+
+ System.out.println(
+ menu.stream().collect(
+ groupingBy(Dish::getType,
+ collectingAndThen(
+ reducing((d1, d2) -> d1.getCalories() > d2.getCalories() ? d1 : d2),
+ Optional::get)))
+ );
+ }
+}
+
+class Dish {
+ private final String name;
+ private final boolean vegetarian;
+ private final int calories;
+ private final Type type;
+
+ public Dish(String name, boolean vegetarian, int calories, Type type) {
+ this.name = name;
+ this.vegetarian = vegetarian;
+ this.calories = calories;
+ this.type = type;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean isVegetarian() {
+ return vegetarian;
+ }
+
+ public int getCalories() {
+ return calories;
+ }
+
+ public Type getType() {
+ return type;
+ }
+
+ public enum Type { MEAT, FISH, OTHER }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119535.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119535.java
index 9c883308ff1a..414b2bd09cb8 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119535.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA119535.java
@@ -1,3 +1,4 @@
+import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -5,6 +6,8 @@ import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.stream.Collector;
+import static java.util.stream.Collectors.*;
+
class Stuff {
public enum Type { A }
private final int value;
@@ -41,4 +44,31 @@ class FakeErrors {
Collector<? super T, A, D> downstream) {
return null;
}
+}
+
+class FakeErrorsComplete {
+ public static List<Stuff> elems(){
+ return Arrays.asList(
+ new Stuff(800, Stuff.Type.A));
+ }
+
+ public static void main(String ... args){
+
+ Map<Stuff.Type, Optional<Stuff>> bar =
+ elems()
+ .stream()
+ .collect(groupingBy(Stuff::getType,
+ reducing((d1, d2) -> d1.getValue() > d2.getValue() ? d1 : d2)));
+
+ System.out.println(bar);
+
+ Map<Stuff.Type, Stuff> baz =
+ elems()
+ .stream()
+ .collect(groupingBy(Stuff::getType,
+ collectingAndThen(reducing((Stuff d1, Stuff d2) -> d1.getValue() > d2.getValue() ? d1 : d2),
+ Optional::get)));
+
+ System.out.println(baz);
+ }
} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122074.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122074.java
new file mode 100644
index 000000000000..02cdd6c702c7
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122074.java
@@ -0,0 +1,15 @@
+class CyclicInferenceBug {
+ interface Func1<T1, R> {
+ R apply(T1 v1);
+ void other();
+ }
+ interface F1<T1, R> extends Func1<T1, R> {
+ default void other() {}
+ }
+
+ <T1, R> Func1<T1, R> func(F1<T1, R> f1) { return f1; }
+
+ void test() {
+ Func1<String, String> f1 = func(s -> s);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122084.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122084.java
new file mode 100644
index 000000000000..1995793fd020
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122084.java
@@ -0,0 +1,18 @@
+class InferenceFailBug {
+ interface Func1<T1, R> {
+ R apply(T1 v1);
+ void other();
+ }
+ interface F1<T1, R> extends Func1<T1, R> {
+ default void other() {}
+ }
+
+ <T1, R> Func1<T1, R> func(F1<T1, R> f1) { return f1; }
+
+ interface Future<T> {
+ <R> Future<R> map(Func1<T, R> f1);
+ }
+ private Future<Integer> futureExample(Future<String> future) {
+ return future.map(func(s -> s.toUpperCase())).map(func(s -> s.length()));
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122406.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122406.java
new file mode 100644
index 000000000000..2d350a887ce7
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122406.java
@@ -0,0 +1,41 @@
+import java.util.*;
+import java.util.function.Predicate;
+
+abstract class Test {
+ public long countTweetsLongerThan(int numberOfChars, final List<String> tweetList) {
+ //numberOfChars = 100; //TODO uncomment to show it must be effectively final
+
+ long totalByFor = 0;
+ for (String tweet : tweetList) {
+ if (tweet.length() > numberOfChars) {
+ totalByFor++;
+ }
+ }
+
+ final ArrayList<String> guavaList = newArrayList(filter(tweetList, new Predicate<String>() {
+ @Override
+ public boolean test(String tweet) {
+ return false;
+ }
+ }));
+ final long totalFromGuava = guavaList.size();
+
+
+ final long totalFromLambda = tweetList.stream()
+ .filter(t -> t.length() > numberOfChars)
+ .count();
+
+ if (totalByFor != totalFromLambda | totalByFor != totalFromGuava) {
+ throw new RuntimeException("");
+ }
+ return totalFromLambda;
+ }
+
+ abstract <E> ArrayList<E> newArrayList(Iterable<? extends E> elements);
+ abstract <E> ArrayList<E> newArrayList();
+ abstract <E> ArrayList<E> newArrayList(E... elements);
+
+ abstract <T> Iterable<T> filter(Iterable<T> unfiltered, Predicate<? super T> predicate);
+ abstract <T> Iterable<T> filter(Iterable<?> unfiltered, Class<T> type);
+
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122616.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122616.java
new file mode 100644
index 000000000000..5963ad31c96c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122616.java
@@ -0,0 +1,18 @@
+import java.util.function.Function;
+
+class ChoiceBox<T> {
+ static {
+ ChoiceBox<Item> confParamField1 = new ChoiceBox<>("", p -> p.getName());
+ ChoiceBox<Item> confParamField2 = new ChoiceBox<Item>("", p -> p.getName());
+ }
+
+ public ChoiceBox(T... options) {}
+
+ public ChoiceBox(String caption, Function<T, String> itemCaption) {}
+
+ public static class Item {
+ public String getName() {
+ return null;
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122700.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122700.java
new file mode 100644
index 000000000000..03b0dec44c08
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA122700.java
@@ -0,0 +1,26 @@
+class Test {
+ class Event {}
+ class KeyEvent extends Event {
+ int getCode() {
+ return 0;
+ }
+ }
+ interface EventListener<T extends Event> {
+ void handle(T event);
+ }
+
+ class EventType<T extends Event>{}
+ static final EventType<KeyEvent> KEY_PRESSED = null;
+
+ {
+ addEventHandler(KEY_PRESSED, keyEvent -> {
+ int i = keyEvent.getCode();
+ });
+
+ }
+
+
+
+ public final <T extends Event> void addEventHandler(final EventType<T> eventType, final EventListener<? super T> listener) {}
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123731.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123731.java
new file mode 100644
index 000000000000..f5a0b63f1637
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123731.java
@@ -0,0 +1,21 @@
+import java.util.Collection;
+import java.util.Map;
+
+class Test{
+
+ public static void main(String[] args) {
+ Map<String, Collection<Integer>> myMap = null;
+
+ myMap.entrySet().stream()
+ .flatMap(entry -> entry.getValue().stream()
+ .map(val -> new Object() {
+ String key = entry.getKey();
+ Integer value = val;
+ }))
+ .forEachOrdered(o -> {
+ final String key = o.key;
+ final Integer value = o.value;
+ System.out.println("key: " + key + " value: " + value);
+ });
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123848.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123848.java
new file mode 100644
index 000000000000..0d1cec6f3c21
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123848.java
@@ -0,0 +1,27 @@
+import java.util.*;
+
+import static java.util.stream.Collectors.groupingBy;
+import static java.util.stream.Collectors.mapping;
+import static java.util.stream.Collectors.toList;
+
+class Test {
+
+ private static void run() {
+ List<R> list = Arrays.asList(new R());
+
+ System.out.println(
+ list.stream()
+ .collect(groupingBy(r -> r.get(String.class), mapping(r -> r.get(String.class),toList())
+ ))
+ );
+ }
+
+ static class R {
+ <T> T get(Class<T> clazz) {
+ if (clazz == String.class)
+ return (T) "string";
+
+ throw new IllegalArgumentException();
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123869.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123869.java
new file mode 100644
index 000000000000..14318d3ebe1b
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA123869.java
@@ -0,0 +1,19 @@
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Set;
+
+class Test {
+
+ {
+ Map<String, ? extends Set<Integer>> myMap = null;
+
+ myMap.entrySet().parallelStream()
+ .map(it -> {
+ final ArrayList<Integer> myList = newArrayList(it.getValue());
+ return myList.size();
+ })
+ .forEach(System.out::println);
+ }
+
+ public static <E> ArrayList<E> newArrayList(Iterable<? extends E> elements) { return null; }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/NestedCallsInsideLambdaReturnExpression.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/NestedCallsInsideLambdaReturnExpression.java
new file mode 100644
index 000000000000..b8db3c4e7a1b
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/NestedCallsInsideLambdaReturnExpression.java
@@ -0,0 +1,59 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.stream.Stream;
+
+abstract class Play {
+ public void main(Stream<String> stream, Stream<String> anotherStream) {
+ Stream<String> stringStream = stream.map(o -> foo(i -> "")).flatMap(l -> l);
+ }
+
+ abstract <RF > Stream<RF> foo(Function<Integer, ? extends RF> mapper);
+
+ static int foo() {
+ return 6;
+ }
+}
+
+
+
+class SimplePlay {
+ {
+ foo(y -> bar(x -> "")).substring(0);
+ }
+
+ interface Res<R> {
+ R apply(String s);
+ }
+
+ <T> T foo(Res<T> f) {return null;}
+ <K> K bar(Res<K> f) {return null;}
+}
+
+class Test19 {
+ interface Seq<E> extends Iterable<E> {
+ static <E> Seq<E> of(Iterable<? extends E> source) {
+ return null;
+ }
+
+ <R> Seq<R> map(Function<? super E, ? extends R> mapper);
+ <R, V> Seq<R> zip(BiFunction<? super E, ? super V, ? extends R> zipper, Seq<V> other);
+ }
+
+ interface S extends Seq<String> {
+ static S copyOf(Iterable<String> source) {
+ return null;
+ }
+ }
+
+ interface D extends S {
+
+ }
+
+ void test(Seq<D> dseq) {
+ BiFunction<D, List<Integer>, Seq<S>> f =
+ (d, nums) -> dseq.map(s -> s.zip((text, num) -> text + num, Seq.of(nums)))
+ .map(s -> S.copyOf(s));
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java
index c2ee24b70d41..ee24b8c2ba93 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java
@@ -77,7 +77,7 @@ abstract class AbstractCollection<E> implements Collection<E> {
public boolean add(E e) {
return true;
}
- public boolean addAll(Collection<? extends E> <warning descr="Parameter 'c' is never used">c</warning>) {
+ public boolean addAll(Collection<? extends E> c) {
boolean modified = false;
return modified;
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AssertNumberOfParameters.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AssertNumberOfParameters.java
index 77c670063cd2..9449054c0a18 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AssertNumberOfParameters.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AssertNumberOfParameters.java
@@ -10,6 +10,6 @@ class Test {
<T> void bar(I i) {}
void test() {
- bar<error descr="'bar(Test.I)' in 'Test' cannot be applied to '(<method reference>)'">(Foo::foo)</error>;
+ bar(Foo::<error descr="Cannot resolve method 'foo'">foo</error>);
}
} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/FromReferenceWithTypeArgs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/FromReferenceWithTypeArgs.java
new file mode 100644
index 000000000000..df394913646e
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/FromReferenceWithTypeArgs.java
@@ -0,0 +1,17 @@
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+class Box<T>
+{
+ public T getValue()
+ {
+ return null;
+ }
+
+ void f(Stream<Box<String>> stream) {
+ List<String> l3 = stream
+ .map(Box<String>::getValue)
+ .collect(Collectors.toList());
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java
index f985da24cf89..ad3ed7192df9 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java
@@ -6,11 +6,11 @@ class Test {
Test m(List<Integer> l1, List<Integer> l2);
}
- static Test meth(List<Integer>... <warning descr="Parameter 'lli' is never used">lli</warning>) {
+ static Test meth(List<Integer>... lli) {
return null;
}
- Test(List<Integer>... <warning descr="Parameter 'lli' is never used">lli</warning>) {}
+ Test(List<Integer>... lli) {}
{
I <warning descr="Variable 'i1' is never used">i1</warning> = <warning descr="Unchecked generics array creation for varargs parameter">Test::meth</warning>;
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA112191.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA112191.java
new file mode 100644
index 000000000000..273107e89500
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA112191.java
@@ -0,0 +1,15 @@
+import java.util.function.ToIntFunction;
+class Test {
+ {
+ fooBar(String::length);
+ }
+
+ class Foo<K> {
+ Foo<K> then() {
+ return null;
+ }
+ }
+ static <T> Foo<T> fooBar(ToIntFunction<? super T> keyExtractor) {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122018comment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122018comment.java
new file mode 100644
index 000000000000..ca9bf6957f34
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122018comment.java
@@ -0,0 +1,20 @@
+import java.util.List;
+import java.util.function.Function;
+class Base {
+
+ interface Seq<Eq> extends Iterable<Eq> {
+ static <E> Seq<E> of(Iterable<? extends E> source) {
+ return null;
+ }
+
+ <R> Seq<R> map(Function<? super Eq, ? extends R> mapper);
+ }
+
+}
+
+class Test3 extends Base {
+
+ void test4(Seq<List<String>> map) {
+ Seq<Seq<String>> mapped = map.map(Seq::of);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122100.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122100.java
new file mode 100644
index 000000000000..e6b44e44f6a5
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122100.java
@@ -0,0 +1,20 @@
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+
+class InferenceExample<E> {
+ public <Output> List<Output> convertAll(Function<E, Output> converter) {
+ return invoke (MyArrayList::convertAll, converter);
+ }
+
+ protected <A, R> R invoke(BiFunction<MyArrayList<E>, A, R> action, A arg) {
+ return null;
+ }
+
+ public class MyArrayList<T> extends ArrayList<T> {
+ public <Output1> List<Output1> convertAll(Function<T, Output1> converter) {
+ return null;
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122509.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122509.java
new file mode 100644
index 000000000000..7ed79873d2bc
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122509.java
@@ -0,0 +1,19 @@
+import java.util.Arrays;
+import java.util.List;
+
+class ListComprehensionSample {
+ public static void main(String[] args) {
+ new ListComprehensionSample().run();
+ }
+
+ interface Function1<ResultType, ParameterType1> {
+ ResultType invoke(ParameterType1 parameter1);
+ }
+
+ private void run() {
+ Function1<Integer, String> stringToInt = Integer::parseInt;
+ Function1<Double, Integer> intToPercent = i -> i / 100.0;
+ List<String> values = Arrays.asList("12", "23", "34", "45", "56", "67", "78", "89");
+ values.stream().map(stringToInt::invoke).map(intToPercent::invoke).forEach(System.out::println);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122681.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122681.java
new file mode 100644
index 000000000000..562f03da6841
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA122681.java
@@ -0,0 +1,21 @@
+import java.util.Set;
+import java.util.function.Supplier;
+
+class IDEA122681 {
+ private static <E> Set<E> getSet(E element) {
+ return null;
+ }
+
+ private static <T> T getObject(Supplier<T> supplier) {
+ return null;
+ }
+
+ private static Object getObjectFromString(String string) {
+ return null;
+ }
+
+ private static void callGetSet() {
+ getSet(getObjectFromString(getObject(String ::new)));
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123223.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123223.java
new file mode 100644
index 000000000000..becb426b3cef
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123223.java
@@ -0,0 +1,31 @@
+import java.util.List;
+import java.util.function.Function;
+
+class FluTr<K> {
+
+ class Group {
+ List<Authority> getAuthorities() {
+ return null;
+ }
+ }
+
+ class Authority {
+ String getPermission() {
+ return null;
+ }
+ }
+
+ public void filterForPermission(final String permission) {
+ transformAndConcat(Group::getAuthorities)
+ .transform(Authority::getPermission)
+ .contains(permission);
+ }
+
+ boolean contains(String f) {
+ return false;
+ }
+
+ public final <T> FluTr<T> transform(Function<? super K,T> function) { return null; }
+ public <T> FluTr<T> transformAndConcat(Function<? super Group,? extends Iterable<? extends T>> function) { return null; }
+
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123248.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123248.java
new file mode 100644
index 000000000000..bedd4e2f4a7a
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123248.java
@@ -0,0 +1,11 @@
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.Stream;
+
+class App {
+
+ void foo(Stream<Integer> boxed) {
+ final Map<Integer, Integer> count = boxed.collect(HashMap::new, null, HashMap::putAll);
+ }
+
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123366.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123366.java
new file mode 100644
index 000000000000..b54dc8ff785c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123366.java
@@ -0,0 +1,18 @@
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+class MyClass {
+ private static void test() {
+ List<String> collect = Arrays.asList("foo", "bar")
+ .stream()
+ .flatMap(MyClass::mapper)
+ .filter(s -> s.startsWith("foo"))
+ .collect(Collectors.toList());
+ }
+
+ private static Stream<String> mapper(String s) {
+ return Stream.of(s);
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123366comment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123366comment.java
new file mode 100644
index 000000000000..f360a9cf8f44
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA123366comment.java
@@ -0,0 +1,49 @@
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+class MethodReferenceTest {
+
+ private final List<String> strings = Arrays.asList("One,Two", "Three,Four,Five");
+
+ public static Stream<String> split(String csv) {
+ return Arrays.asList(csv.split(",")).stream();
+ }
+
+ public void testMethodReference() {
+ List<String> list = strings.stream()
+ .flatMap(MethodReferenceTest::split)
+ .collect(Collectors.toList());
+
+ }
+
+ public void testLambda() {
+ List<String> list = strings.stream()
+ .flatMap((t) -> MethodReferenceTest.split(t))
+ .collect(Collectors.toList());
+ }
+
+ public void testMethodReferenceWithCast() {
+ List<String> list = strings.stream()
+ .flatMap((Function<String,Stream<String>>)MethodReferenceTest::split)
+ .collect(Collectors.toList());
+
+ }
+
+ public void testAnonymousInnerClass() {
+ List<String> strings = Arrays.asList("One,Two", "Three,Four,Five");
+
+ List<String> list = strings.stream()
+ .flatMap(new Function<String, Stream<String>>() {
+ @Override
+ public Stream<String> apply(String s) {
+ return Arrays.asList(s.split(",")).stream();
+ }
+ })
+ .collect(Collectors.toList());
+
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/resolve/IDEA122406.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/resolve/IDEA122406.java
new file mode 100644
index 000000000000..b40ccbcd5c56
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/resolve/IDEA122406.java
@@ -0,0 +1,41 @@
+import java.util.*;
+import java.util.function.Predicate;
+
+abstract class Test {
+ public long countTweetsLongerThan(int numberOfChars, final List<String> tweetList) {
+ //numberOfChars = 100; //TODO uncomment to show it must be effectively final
+
+ long totalByFor = 0;
+ for (String tweet : tweetList) {
+ if (tweet.length() > numberOfChars) {
+ totalByFor++;
+ }
+ }
+
+ final ArrayList<String> guavaList = newArrayList(fil<ref>ter(tweetList, new Predicate<String>() {
+ @Override
+ public boolean test(String tweet) {
+ return false;
+ }
+ }));
+ final long totalFromGuava = guavaList.size();
+
+
+ final long totalFromLambda = tweetList.stream()
+ .filter(t -> t.length() > numberOfChars)
+ .count();
+
+ if (totalByFor != totalFromLambda | totalByFor != totalFromGuava) {
+ throw new RuntimeException("");
+ }
+ return totalFromLambda;
+ }
+
+ abstract <E> ArrayList<E> newArrayList(Iterable<? extends E> elements);
+ abstract <E> ArrayList<E> newArrayList();
+ abstract <E> ArrayList<E> newArrayList(E... elements);
+
+ abstract <T> Iterable<T> filter(Iterable<T> unfiltered, Predicate<? super T> predicate);
+ abstract <T> Iterable<T> filter(Iterable<?> unfiltered, Class<T> type);
+
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addAssert/afterLambda.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addAssert/afterLambda.java
new file mode 100644
index 000000000000..6f1a4509f709
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addAssert/afterLambda.java
@@ -0,0 +1,10 @@
+// "Assert 'container != null'" "true"
+class A{
+ void test(){
+ Object container = null;
+ Runnable r = () -> {
+ assert container != null;
+ container == null ? container.toString() : "";
+ };
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addAssert/beforeLambda.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addAssert/beforeLambda.java
new file mode 100644
index 000000000000..47ec64c94e4e
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addAssert/beforeLambda.java
@@ -0,0 +1,7 @@
+// "Assert 'container != null'" "true"
+class A{
+ void test(){
+ Object container = null;
+ Runnable r = () -> container == null ? conta<caret>iner.toString() : "";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/afterFQN.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/afterFQN.java
new file mode 100644
index 000000000000..a69afc2dccb4
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/afterFQN.java
@@ -0,0 +1,14 @@
+// "Add explicit type arguments" "true"
+import java.util.Date;
+import java.util.List;
+import java.util.Collections;
+
+class Bar {
+ public static void main(String[] args) {
+ new Foo().foo(Collections.<Date>emptyList());
+ }
+}
+
+class Foo {
+ void foo(List<java.util.Date> dates) { }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/afterPrimitives.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/afterPrimitives.java
new file mode 100644
index 000000000000..08841589c9d9
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/afterPrimitives.java
@@ -0,0 +1,14 @@
+// "Add explicit type arguments to 2nd argument" "true"
+import java.util.Collections;
+import java.util.List;
+
+class Foo {
+
+ public static void main(String[] args) {
+ new Foo(1, Collections.<String>emptyList());
+ }
+
+ public Foo(Integer i, List<String> list) {
+
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/beforeFQN.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/beforeFQN.java
new file mode 100644
index 000000000000..64b582f7a1b1
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/beforeFQN.java
@@ -0,0 +1,13 @@
+// "Add explicit type arguments" "true"
+import java.util.List;
+import java.util.Collections;
+
+class Bar {
+ public static void main(String[] args) {
+ new Foo().fo<caret>o(Collections.emptyList());
+ }
+}
+
+class Foo {
+ void foo(List<java.util.Date> dates) { }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/beforePrimitives.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/beforePrimitives.java
new file mode 100644
index 000000000000..52a2dfff2769
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeArguments/beforePrimitives.java
@@ -0,0 +1,14 @@
+// "Add explicit type arguments to 2nd argument" "true"
+import java.util.Collections;
+import java.util.List;
+
+class Foo {
+
+ public static void main(String[] args) {
+ new Foo(1, Collections.empt<caret>yList());
+ }
+
+ public Foo(Integer i, List<String> list) {
+
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/afterTernary.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/afterTernary.java
index 1ed19b512529..e9c192298727 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/afterTernary.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/afterTernary.java
@@ -1,7 +1,7 @@
// "Cast to 'B'" "true"
class A {
void f(B b) {
- B s = <caret>b == null ? (B) this : b;
+ B s = b == null ? <caret>(B) this : b;
}
}
class B extends A {} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/beforeTernary.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/beforeTernary.java
index 3c079952c727..c19e1163648c 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/beforeTernary.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addTypeCast/beforeTernary.java
@@ -1,7 +1,7 @@
// "Cast to 'B'" "true"
class A {
void f(B b) {
- B s = <caret>b == null ? this : b;
+ B s = b == null ? <caret>this : b;
}
}
class B extends A {} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCallToDefaultFromFunctionalInterfaceInsideInheritor.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCallToDefaultFromFunctionalInterfaceInsideInheritor.java
new file mode 100644
index 000000000000..234ad18a837f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCallToDefaultFromFunctionalInterfaceInsideInheritor.java
@@ -0,0 +1,13 @@
+// "Replace with lambda" "true"
+class Test {
+ interface InOut {
+ void run() throws IOException;
+ default void foo(){}
+ }
+
+ interface InOutEx extends InOut {
+ InOut bind() {
+ return () -> foo();
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCallToStaticFromFunctionalInterface.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCallToStaticFromFunctionalInterface.java
new file mode 100644
index 000000000000..500492191306
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCallToStaticFromFunctionalInterface.java
@@ -0,0 +1,11 @@
+// "Replace with lambda" "true"
+class Test {
+ interface InOut {
+ void run() throws IOException;
+ static void foo(){}
+ }
+
+ InOut bind() {
+ return () -> InOut.foo();
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterConflictingLocal.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterConflictingLocal.java
new file mode 100644
index 000000000000..2d931e5b0d23
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterConflictingLocal.java
@@ -0,0 +1,9 @@
+// "Replace with lambda" "true"
+class X1 {
+ Runnable m() {
+ String s;
+ return () -> {
+ String s1;
+ };
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterFinalFieldInitializedBeforeAnonymInConstructor.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterFinalFieldInitializedBeforeAnonymInConstructor.java
index e481f9b597c2..c6dec3d2f6cd 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterFinalFieldInitializedBeforeAnonymInConstructor.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterFinalFieldInitializedBeforeAnonymInConstructor.java
@@ -4,10 +4,7 @@ class HelloLambda {
HelloLambda() {
x = 1;
- Runnable r = () -> {
- System.out.println(x);
-
- };
+ Runnable r = () -> System.out.println(x);
}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterForwardStaticFieldReference.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterForwardStaticFieldReference.java
index 16ed145c7916..813d85107ef1 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterForwardStaticFieldReference.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterForwardStaticFieldReference.java
@@ -1,7 +1,5 @@
// "Replace with lambda" "true"
class HelloLambda {
- private final Runnable r = () -> {
- System.out.println(x);
- };
+ private final Runnable r = () -> System.out.println(x);
private static int x = 0;
} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnable.java
index 8860a7ce35d6..c92f237ef62e 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnable.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnable.java
@@ -1,8 +1,6 @@
// "Replace with lambda" "true"
class Test {
{
- Runnable r = () -> {
- System.out.println("");
- };
+ Runnable r = () -> System.out.println("");
}
} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnableInArrayInitializer.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnableInArrayInitializer.java
index 0688e8bbee46..83ad2f63b5be 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnableInArrayInitializer.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterRunnableInArrayInitializer.java
@@ -1,8 +1,6 @@
// "Replace with lambda" "true"
class Test {
{
- Runnable[] r = new Runnable[] {() -> {
- System.out.println("");
- }};
+ Runnable[] r = new Runnable[] {() -> System.out.println("")};
}
} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToDefaultFromFunctionalInterface.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToDefaultFromFunctionalInterface.java
new file mode 100644
index 000000000000..0a91eea1bd34
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToDefaultFromFunctionalInterface.java
@@ -0,0 +1,16 @@
+// "Replace with lambda" "false"
+class Test {
+ interface InOut {
+ void run() throws IOException;
+ default void foo(){}
+ }
+
+ InOut bind() {
+ return new In<caret>Out() {
+ @Override
+ public void run() throws IOException {
+ foo();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToDefaultFromFunctionalInterfaceInsideInheritor.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToDefaultFromFunctionalInterfaceInsideInheritor.java
new file mode 100644
index 000000000000..5432bb9513d3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToDefaultFromFunctionalInterfaceInsideInheritor.java
@@ -0,0 +1,18 @@
+// "Replace with lambda" "true"
+class Test {
+ interface InOut {
+ void run() throws IOException;
+ default void foo(){}
+ }
+
+ interface InOutEx extends InOut {
+ InOut bind() {
+ return new In<caret>Out() {
+ @Override
+ public void run() throws IOException {
+ foo();
+ }
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToStaticFromFunctionalInterface.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToStaticFromFunctionalInterface.java
new file mode 100644
index 000000000000..acfb9756e6ac
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCallToStaticFromFunctionalInterface.java
@@ -0,0 +1,16 @@
+// "Replace with lambda" "true"
+class Test {
+ interface InOut {
+ void run() throws IOException;
+ static void foo(){}
+ }
+
+ InOut bind() {
+ return new In<caret>Out() {
+ @Override
+ public void run() throws IOException {
+ foo();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeConflictingLocal.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeConflictingLocal.java
new file mode 100644
index 000000000000..5b1035b0f543
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeConflictingLocal.java
@@ -0,0 +1,12 @@
+// "Replace with lambda" "true"
+class X1 {
+ Runnable m() {
+ String s;
+ return new Run<caret>nable() {
+ @Override
+ public void run() {
+ String s;
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2methodReference/beforeCallToDefault.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2methodReference/beforeCallToDefault.java
new file mode 100644
index 000000000000..34c118cd993b
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2methodReference/beforeCallToDefault.java
@@ -0,0 +1,16 @@
+// "Replace with method reference" "false"
+class Test {
+ interface InOut {
+ void run() throws IOException;
+ default void foo(){}
+ }
+
+ InOut bind() {
+ return new In<caret>Out() {
+ @Override
+ public void run() throws IOException {
+ foo();
+ }
+ };
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convert2Local/afterBlocksInSameMethod.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convert2Local/afterBlocksInSameMethod.java
new file mode 100644
index 000000000000..9f5a1571289b
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convert2Local/afterBlocksInSameMethod.java
@@ -0,0 +1,21 @@
+// "Convert to local" "true"
+import java.util.ArrayList;
+
+class ITest {
+
+ public IntelliJBugConvertToLocal(int x, int z) {
+
+ ArrayList<String> mayBeLocal = new ArrayList<String>();
+ if (x == 5) {
+ mayBeLocal.add("jjj");
+ }
+
+ if (x > z) {
+ useIt(mayBeLocal);
+ }
+ }
+ @SuppressWarnings("UnusedParameters")
+ private void useIt(Object data) {
+ System.out.println(data);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convert2Local/beforeBlocksInSameMethod.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convert2Local/beforeBlocksInSameMethod.java
new file mode 100644
index 000000000000..b4e42ef32dcf
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/convert2Local/beforeBlocksInSameMethod.java
@@ -0,0 +1,22 @@
+// "Convert to local" "true"
+import java.util.ArrayList;
+
+class ITest {
+
+ private ArrayList<String> may<caret>BeLocal = new ArrayList<String>();
+
+ public IntelliJBugConvertToLocal(int x, int z) {
+
+ if (x == 5) {
+ mayBeLocal.add("jjj");
+ }
+
+ if (x > z) {
+ useIt(mayBeLocal);
+ }
+ }
+ @SuppressWarnings("UnusedParameters")
+ private void useIt(Object data) {
+ System.out.println(data);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/afterStaticImport.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/afterStaticImport.java
new file mode 100644
index 000000000000..27470ff5f9f7
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/afterStaticImport.java
@@ -0,0 +1,21 @@
+// "Create Enum Constant 'CRIME'" "true"
+import java.util.Arrays;
+import java.util.List;
+
+import static AutomaticTypeInference.E.*;
+
+class AutomaticTypeInference {
+
+ AutomaticTypeInference(List<E> gs) {
+ }
+
+ public static void main(String[] args) {
+
+ new AutomaticTypeInference(Arrays.asList(ACTION, CRIME));
+
+ }
+
+ enum E {
+ ACTION, CRIME;
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/afterVarargs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/afterVarargs.java
new file mode 100644
index 000000000000..3c48ba6e6f7e
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/afterVarargs.java
@@ -0,0 +1,18 @@
+// "Create Enum Constant 'CRIME'" "true"
+import java.util.*;
+
+class AutomaticTypeInference {
+
+ AutomaticTypeInference(List<E> gs) {
+ }
+
+ public static void main(String[] args) {
+
+ new AutomaticTypeInference(Arrays.asList(E.ACTION, E.CRIME));
+
+ }
+
+ enum E {
+ ACTION, CRIME;
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeStaticImport.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeStaticImport.java
new file mode 100644
index 000000000000..e34874cd45e5
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeStaticImport.java
@@ -0,0 +1,21 @@
+// "Create Enum Constant 'CRIME'" "true"
+import java.util.Arrays;
+import java.util.List;
+
+import static AutomaticTypeInference.E.*;
+
+class AutomaticTypeInference {
+
+ AutomaticTypeInference(List<E> gs) {
+ }
+
+ public static void main(String[] args) {
+
+ new AutomaticTypeInference(Arrays.asList(ACTION, CRI<caret>ME));
+
+ }
+
+ enum E {
+ ACTION;
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeVarargs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeVarargs.java
new file mode 100644
index 000000000000..3ce84a9a56f3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeVarargs.java
@@ -0,0 +1,18 @@
+// "Create Enum Constant 'CRIME'" "true"
+import java.util.*;
+
+class AutomaticTypeInference {
+
+ AutomaticTypeInference(List<E> gs) {
+ }
+
+ public static void main(String[] args) {
+
+ new AutomaticTypeInference(Arrays.asList(E.ACTION, E.CRI<caret>ME));
+
+ }
+
+ enum E {
+ ACTION;
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/afterNull.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/afterNull.java
new file mode 100644
index 000000000000..a7ffa693eb01
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/afterNull.java
@@ -0,0 +1,9 @@
+// "Create Local Variable 'str'" "true"
+public class A {
+ void foo() {
+ String str;
+ String s = str;
+ str = null;
+ }
+
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/beforeNull.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/beforeNull.java
new file mode 100644
index 000000000000..75899508acd8
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalFromUsage/beforeNull.java
@@ -0,0 +1,8 @@
+// "Create Local Variable 'str'" "true"
+public class A {
+ void foo() {
+ String s = s<caret>tr;
+ str = null;
+ }
+
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof/afterFormatting.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof/afterFormatting.java
new file mode 100644
index 000000000000..f96cba4a1958
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof/afterFormatting.java
@@ -0,0 +1,13 @@
+// "Insert '(IOException)o' declaration" "true"
+import java.io.IOException;
+
+class C {
+ void f(Object o) {
+ if (o instanceof IOException) {
+ IOException ioException = (IOException) o;
+
+
+ }
+ }
+}
+
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof/beforeFormatting.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof/beforeFormatting.java
new file mode 100644
index 000000000000..8303c6d70af7
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createLocalVarFromInstanceof/beforeFormatting.java
@@ -0,0 +1,11 @@
+// "Insert '(IOException)o' declaration" "true"
+import java.io.IOException;
+
+class C {
+ void f(Object o) {
+ if (o instanceof IOException) {
+ <caret>
+ }
+ }
+}
+
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterConstructor.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterConstructor.java
new file mode 100644
index 000000000000..4c5e012f1ea3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterConstructor.java
@@ -0,0 +1,13 @@
+// "Create Constructor" "true"
+class FooBar {
+ FooBar(int i) {
+ }
+
+ {
+ Runnable r = FooBar::new;
+ }
+
+ public FooBar() {
+
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterReferenceType.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterReferenceType.java
new file mode 100644
index 000000000000..7c818893a5ca
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterReferenceType.java
@@ -0,0 +1,10 @@
+// "Create Method 'fooBar'" "true"
+class FooBar {
+ {
+ Runnable r = FooBar::fooBar;
+ }
+
+ private static void fooBar() {
+
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterThisType.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterThisType.java
new file mode 100644
index 000000000000..f1d2b64ee9c0
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/afterThisType.java
@@ -0,0 +1,10 @@
+// "Create Method 'fooBar'" "true"
+class FooBar {
+ {
+ Runnable r = this::fooBar;
+ }
+
+ private void fooBar() {
+
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeConstructor.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeConstructor.java
new file mode 100644
index 000000000000..5660b9f73466
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeConstructor.java
@@ -0,0 +1,9 @@
+// "Create Constructor" "true"
+class FooBar {
+ FooBar(int i) {
+ }
+
+ {
+ Runnable r = FooBar::ne<caret>w;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeReferenceType.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeReferenceType.java
new file mode 100644
index 000000000000..6430bdb63790
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeReferenceType.java
@@ -0,0 +1,6 @@
+// "Create Method 'fooBar'" "true"
+class FooBar {
+ {
+ Runnable r = FooBar::foo<caret>Bar;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeThisType.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeThisType.java
new file mode 100644
index 000000000000..9f3e0d83b403
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef/beforeThisType.java
@@ -0,0 +1,6 @@
+// "Create Method 'fooBar'" "true"
+class FooBar {
+ {
+ Runnable r = this::foo<caret>Bar;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage/afterParameterNameFirstSuggestion.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage/afterParameterNameFirstSuggestion.java
new file mode 100644
index 000000000000..62e163e8cdce
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage/afterParameterNameFirstSuggestion.java
@@ -0,0 +1,9 @@
+// "Create Method 'test2'" "true"
+class Foo {
+ static String FOO_BAR = "Bar";
+ void test1() { test2(FOO_BAR); }
+
+ private void test2(String fooBar) {
+
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage/beforeParameterNameFirstSuggestion.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage/beforeParameterNameFirstSuggestion.java
new file mode 100644
index 000000000000..2275135f7be1
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromUsage/beforeParameterNameFirstSuggestion.java
@@ -0,0 +1,5 @@
+// "Create Method 'test2'" "true"
+class Foo {
+ static String FOO_BAR = "Bar";
+ void test1() { tes<caret>t2(FOO_BAR); }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage/afterDefaultValueAtCallPlace.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage/afterDefaultValueAtCallPlace.java
new file mode 100644
index 000000000000..8bc0f57a0639
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage/afterDefaultValueAtCallPlace.java
@@ -0,0 +1,10 @@
+// "Create Parameter 'popop'" "true"
+class Calculator {
+ public void printError(int popop) {
+ int i = popop;
+ }
+
+ {
+ printError(popop);
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage/beforeDefaultValueAtCallPlace.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage/beforeDefaultValueAtCallPlace.java
new file mode 100644
index 000000000000..4ab4d2ad3b46
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createParameterFromUsage/beforeDefaultValueAtCallPlace.java
@@ -0,0 +1,10 @@
+// "Create Parameter 'popop'" "true"
+class Calculator {
+ public void printError() {
+ int i = <caret>popop;
+ }
+
+ {
+ printError();
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterEq.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterEq.java
new file mode 100644
index 000000000000..485bc373d61c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterEq.java
@@ -0,0 +1,6 @@
+// "Join declaration and assignment" "true"
+class Test {
+ {
+ String ss = "hello";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterMultiDeclr.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterMultiDeclr.java
new file mode 100644
index 000000000000..8109062f70d1
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterMultiDeclr.java
@@ -0,0 +1,6 @@
+// "Join declaration and assignment" "true"
+class Test {
+ {
+ String ss = "hello", a = "";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterPlusEq.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterPlusEq.java
new file mode 100644
index 000000000000..c8e9c3dfccea
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/afterPlusEq.java
@@ -0,0 +1,6 @@
+// "Join declaration and assignment" "true"
+class Test {
+ {
+ String ss = "hello" + "world";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeEq.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeEq.java
new file mode 100644
index 000000000000..b44568a06949
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeEq.java
@@ -0,0 +1,7 @@
+// "Join declaration and assignment" "true"
+class Test {
+ {
+ String s<caret>s = "";
+ ss = "hello";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeForeignExprBetween.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeForeignExprBetween.java
new file mode 100644
index 000000000000..975661932b19
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeForeignExprBetween.java
@@ -0,0 +1,8 @@
+// "Join declaration and assignment" "false"
+class Test {
+ {
+ String s<caret>s = "";
+ System.out.println(ss);
+ ss = "hello";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeMultiDeclr.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeMultiDeclr.java
new file mode 100644
index 000000000000..b488a53ab462
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeMultiDeclr.java
@@ -0,0 +1,7 @@
+// "Join declaration and assignment" "true"
+class Test {
+ {
+ String s<caret>s = "", a = "";
+ ss = "hello";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforePlusEq.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforePlusEq.java
new file mode 100644
index 000000000000..593244559412
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforePlusEq.java
@@ -0,0 +1,7 @@
+// "Join declaration and assignment" "true"
+class Test {
+ {
+ String ss = "hello";
+ ss +<caret>= "world";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeUsedInRightPart.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeUsedInRightPart.java
new file mode 100644
index 000000000000..9b84b9cc35b0
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeUsedInRightPart.java
@@ -0,0 +1,7 @@
+// "Join declaration and assignment" "false"
+class Test {
+ {
+ String ss = "hello";
+ ss +<caret>= ss;
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/afterCollapseToBeInferredTypeArgs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/afterCollapseToBeInferredTypeArgs.java
new file mode 100644
index 000000000000..e3e2ad0e5d4d
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/afterCollapseToBeInferredTypeArgs.java
@@ -0,0 +1,29 @@
+// "Replace lambda with method reference" "true"
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class Box<T>
+{
+ public Box(T value)
+ {
+ this._value = value;
+ }
+
+ private final T _value;
+
+ public T getValue()
+ {
+ return this._value;
+ }
+
+ {
+ List<Box<String>> l1 = new ArrayList<>();
+ l1.add(new Box<>("Foo"));
+ l1.add(new Box<>("Bar"));
+
+ List<String> l3 = l1.stream()
+ .map(Box::getValue)
+ .collect(Collectors.toList());
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/afterNoCollapseTypeArgs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/afterNoCollapseTypeArgs.java
new file mode 100644
index 000000000000..650296507d28
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/afterNoCollapseTypeArgs.java
@@ -0,0 +1,23 @@
+// "Replace lambda with method reference" "true"
+import java.util.function.Function;
+
+class Box<T>
+{
+ public Box(T value)
+ {
+ this._value = value;
+ }
+
+ private final T _value;
+
+ public T getValue()
+ {
+ return this._value;
+ }
+
+ {
+ foo(Box<String>::getValue);
+ }
+
+ <K> void foo(Function<Box<K>, K> f){}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeCollapseToBeInferredTypeArgs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeCollapseToBeInferredTypeArgs.java
new file mode 100644
index 000000000000..f14712789eb7
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeCollapseToBeInferredTypeArgs.java
@@ -0,0 +1,29 @@
+// "Replace lambda with method reference" "true"
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+class Box<T>
+{
+ public Box(T value)
+ {
+ this._value = value;
+ }
+
+ private final T _value;
+
+ public T getValue()
+ {
+ return this._value;
+ }
+
+ {
+ List<Box<String>> l1 = new ArrayList<>();
+ l1.add(new Box<>("Foo"));
+ l1.add(new Box<>("Bar"));
+
+ List<String> l3 = l1.stream()
+ .map((t) -> t.get<caret>Value())
+ .collect(Collectors.toList());
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeNoCollapseTypeArgs.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeNoCollapseTypeArgs.java
new file mode 100644
index 000000000000..13b324df36b5
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeNoCollapseTypeArgs.java
@@ -0,0 +1,23 @@
+// "Replace lambda with method reference" "true"
+import java.util.function.Function;
+
+class Box<T>
+{
+ public Box(T value)
+ {
+ this._value = value;
+ }
+
+ private final T _value;
+
+ public T getValue()
+ {
+ return this._value;
+ }
+
+ {
+ foo((Box<String> t) -> t.get<caret>Value());
+ }
+
+ <K> void foo(Function<Box<K>, K> f){}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/afterReturnTypeInExpressionStatement.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/afterReturnTypeInExpressionStatement.java
new file mode 100644
index 000000000000..159cd7916e48
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/afterReturnTypeInExpressionStatement.java
@@ -0,0 +1,8 @@
+// "Replace with expression lambda" "true"
+class Test {
+ {
+ Runnable c = () -> foo();
+ }
+
+ int foo() {return 1;}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/beforeReturnTypeInExpressionStatement.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/beforeReturnTypeInExpressionStatement.java
index e5be2cdba078..4e737717a510 100644
--- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/beforeReturnTypeInExpressionStatement.java
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambdaCodeBlock2Expr/beforeReturnTypeInExpressionStatement.java
@@ -1,4 +1,4 @@
-// "Replace with expression lambda" "false"
+// "Replace with expression lambda" "true"
class Test {
{
Runnable c = () -> <caret>{foo();};
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn/afterIncorrectInHierarchy.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn/afterIncorrectInHierarchy.java
new file mode 100644
index 000000000000..b1b656650ab3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn/afterIncorrectInHierarchy.java
@@ -0,0 +1,18 @@
+// "Make 'get' return 'Callable<java.lang.Integer>'" "true"
+interface Gettable<T> {
+ Callable<Integer> get();
+}
+
+public class Issue<T> implements Gettable<T> {
+ public Callable<Integer> get() {
+
+ return new Callable<Integer>() {
+ public Integer call() {
+ return 0;
+ }
+ };
+
+ }
+}
+
+class Callable<T> {} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn/beforeIncorrectInHierarchy.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn/beforeIncorrectInHierarchy.java
new file mode 100644
index 000000000000..53d46b69b422
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/methodReturn/beforeIncorrectInHierarchy.java
@@ -0,0 +1,18 @@
+// "Make 'get' return 'Callable<java.lang.Integer>'" "true"
+interface Gettable<T> {
+ Callable<Integer> get();
+}
+
+public class Issue<T> implements Gettable<T> {
+ public void get() {
+
+ return new Call<caret>able<Integer>() {
+ public Integer call() {
+ return 0;
+ }
+ };
+
+ }
+}
+
+class Callable<T> {} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs/afterMethodReference.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs/afterMethodReference.java
new file mode 100644
index 000000000000..84b4cc2cb3c6
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs/afterMethodReference.java
@@ -0,0 +1,18 @@
+// "Remove explicit type arguments" "true"
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+class Box<T>
+{
+ public T getValue()
+ {
+ return null;
+ }
+
+ void f(Stream<Box<String>> stream) {
+ List<String> l3 = stream
+ .map(Box::getValue)
+ .collect(Collectors.toList());
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs/beforeMethodReference.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs/beforeMethodReference.java
new file mode 100644
index 000000000000..6f812c0a458a
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs/beforeMethodReference.java
@@ -0,0 +1,18 @@
+// "Remove explicit type arguments" "true"
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+class Box<T>
+{
+ public T getValue()
+ {
+ return null;
+ }
+
+ void f(Stream<Box<String>> stream) {
+ List<String> l3 = stream
+ .map(Box<Stri<caret>ng>::getValue)
+ .collect(Collectors.toList());
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant/afterStaticNotFinal.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant/afterStaticNotFinal.java
new file mode 100644
index 000000000000..17546ac1b633
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant/afterStaticNotFinal.java
@@ -0,0 +1,10 @@
+// "Replace with 'A.RADIUS'" "true"
+
+class A {
+ public static String RADIUS = "radius";
+
+ public void myMethod(String propertyName) {
+ if (RADIUS.equals(propertyName)) {
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant/beforeStaticNotFinal.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant/beforeStaticNotFinal.java
new file mode 100644
index 000000000000..30b6308e7a17
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant/beforeStaticNotFinal.java
@@ -0,0 +1,10 @@
+// "Replace with 'A.RADIUS'" "true"
+
+class A {
+ public static String RADIUS = "radius";
+
+ public void myMethod(String propertyName) {
+ if ("rad<caret>ius".equals(propertyName)) {
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCastInIterValue.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCastInIterValue.java
new file mode 100644
index 000000000000..e6a5527f716c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCastInIterValue.java
@@ -0,0 +1,11 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ List<String> foo = new ArrayList<>();
+ String foo(){
+ ((List<String>) foo).stream().filter(s -> s == null).forEach(System.out::println);
+ return null;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectIdentityMap.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectIdentityMap.java
new file mode 100644
index 000000000000..ea95020b1b09
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectIdentityMap.java
@@ -0,0 +1,11 @@
+// "Replace with collect" "true"
+import java.util.*;
+import java.util.stream.Collectors;
+
+public class Collect {
+ class Person {}
+
+ void collectNames(List<Person> persons){
+ List<Person> names = persons.stream().collect(Collectors.toList());
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter.java
new file mode 100644
index 000000000000..868657074157
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter.java
@@ -0,0 +1,13 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ public static void main(List<String> testTags) {
+ final List<String> resultJava7 = new ArrayList<>(testTags.size());
+ testTags.stream().filter(tag -> !resultJava7.contains(tag.trim())).forEach(tag -> {
+ resultJava7.add(tag.trim());
+ });
+
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter1.java
new file mode 100644
index 000000000000..c081b1bab5e6
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter1.java
@@ -0,0 +1,11 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+abstract class Sample implements List<String> {
+ void main() {
+ this.stream().filter(tag -> !contains(tag.trim())).forEach(tag -> {
+ add(tag.trim());
+ });
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter2.java
new file mode 100644
index 000000000000..c0a135ff5b76
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter2.java
@@ -0,0 +1,13 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+abstract class Sample implements List<String> {
+ void main() {
+ this.stream().filter(tag -> !foo(this)).forEach(tag -> {
+ add(tag.trim());
+ });
+ }
+
+ static boolean foo(List<String> a){ return false;}
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter3.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter3.java
new file mode 100644
index 000000000000..2813cdf0957c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter3.java
@@ -0,0 +1,13 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample extends ArrayList<String> {
+ void main() {
+ this.stream().filter(tag -> !super.contains(tag)).forEach(tag -> {
+ add(tag.trim());
+ });
+ }
+
+ static boolean foo(List<String> a){ return false;}
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter4.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter4.java
new file mode 100644
index 000000000000..8488d78593f5
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterCollectionDependencyInFilter4.java
@@ -0,0 +1,17 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ public static void main(List<String> testTags) {
+ final List<String> resultJava7 = new ArrayList<>(testTags.size());
+ testTags.stream().filter(tag -> !foo(resultJava7)).forEach(tag -> {
+ resultJava7.add(tag.trim());
+ });
+
+ }
+
+ static boolean foo(List<String> l) {
+ return false;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterMissedBraces.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterMissedBraces.java
new file mode 100644
index 000000000000..6cfe43ae5bb3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/afterMissedBraces.java
@@ -0,0 +1,13 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ List<String> foo = new ArrayList<>();
+ String foo(){
+ foo.stream().filter(s -> s == null).forEach(s -> {
+ int i = 0;
+ });
+ return null;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCastInIterValue.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCastInIterValue.java
new file mode 100644
index 000000000000..12a4d0e03215
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCastInIterValue.java
@@ -0,0 +1,15 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ List<String> foo = new ArrayList<>();
+ String foo(){
+ for (String s : (List<String>)fo<caret>o) {
+ if (s == null) {
+ System.out.println(s);
+ }
+ }
+ return null;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectIdentityMap.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectIdentityMap.java
new file mode 100644
index 000000000000..9f708f63e02c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectIdentityMap.java
@@ -0,0 +1,13 @@
+// "Replace with collect" "true"
+import java.util.*;
+
+public class Collect {
+ class Person {}
+
+ void collectNames(List<Person> persons){
+ List<Person> names = new ArrayList<>();
+ for (Person person : pers<caret>ons) {
+ names.add(person);
+ }
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter.java
new file mode 100644
index 000000000000..b0844f2e080f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter.java
@@ -0,0 +1,15 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ public static void main(List<String> testTags) {
+ final List<String> resultJava7 = new ArrayList<>(testTags.size());
+ for (final String tag : tes<caret>tTags) {
+ if (!resultJava7.contains(tag.trim())) {
+ resultJava7.add(tag.trim());
+ }
+ }
+
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter1.java
new file mode 100644
index 000000000000..0cfc956dcd61
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter1.java
@@ -0,0 +1,13 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+abstract class Sample implements List<String> {
+ void main() {
+ for (final String tag : t<caret>his) {
+ if (!contains(tag.trim())) {
+ add(tag.trim());
+ }
+ }
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter2.java
new file mode 100644
index 000000000000..aae55cf5fe36
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter2.java
@@ -0,0 +1,15 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+abstract class Sample implements List<String> {
+ void main() {
+ for (final String tag : t<caret>his) {
+ if (!foo(this)) {
+ add(tag.trim());
+ }
+ }
+ }
+
+ static boolean foo(List<String> a){ return false;}
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter3.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter3.java
new file mode 100644
index 000000000000..16f612ac56d4
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter3.java
@@ -0,0 +1,15 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample extends ArrayList<String> {
+ void main() {
+ for (final String tag : t<caret>his) {
+ if (!super.contains(tag)) {
+ add(tag.trim());
+ }
+ }
+ }
+
+ static boolean foo(List<String> a){ return false;}
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java
new file mode 100644
index 000000000000..92831a2936cf
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectionDependencyInFilter4.java
@@ -0,0 +1,19 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ public static void main(List<String> testTags) {
+ final List<String> resultJava7 = new ArrayList<>(testTags.size());
+ for (final String tag : tes<caret>tTags) {
+ if (!foo(resultJava7)) {
+ resultJava7.add(tag.trim());
+ }
+ }
+
+ }
+
+ static boolean foo(List<String> l) {
+ return false;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeMissedBraces.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeMissedBraces.java
new file mode 100644
index 000000000000..f366f2ffe0f8
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeMissedBraces.java
@@ -0,0 +1,13 @@
+// "Replace with forEach" "true"
+import java.util.ArrayList;
+import java.util.List;
+
+class Sample {
+ List<String> foo = new ArrayList<>();
+ String foo(){
+ for (String s : fo<caret>o) {
+ if (s == null) int i = 0;
+ }
+ return null;
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterInsideExpression.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterInsideExpression.java
new file mode 100644
index 000000000000..8fe63b4024db
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterInsideExpression.java
@@ -0,0 +1,7 @@
+// "Remove redundant assignment" "true"
+class A {
+ public static void main(String[] args) {
+ int x = 3 * 4;
+ System.out.println(x);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterNoSideEffect.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterNoSideEffect.java
new file mode 100644
index 000000000000..6819587b3329
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterNoSideEffect.java
@@ -0,0 +1,8 @@
+// "Remove redundant assignment" "true"
+class A {
+ void m() {
+ int i;
+ i = 0;
+ System.out.println(i);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterParameterAssignment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterParameterAssignment.java
new file mode 100644
index 000000000000..6d20a3f8a12f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterParameterAssignment.java
@@ -0,0 +1,7 @@
+// "Remove redundant assignment" "true"
+class A {
+ void m(int i) {
+ i = 0;
+ System.out.println(i);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterSideEffect.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterSideEffect.java
new file mode 100644
index 000000000000..acbbf18820de
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterSideEffect.java
@@ -0,0 +1,15 @@
+// "Remove redundant assignment" "true"
+class A {
+ A a = null;
+ String m(String str) {
+ return str;
+ }
+
+ {
+ String ss = "";
+
+ System.out.println();
+
+ a.m(ss);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeInsideExpression.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeInsideExpression.java
new file mode 100644
index 000000000000..4449c9caee70
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeInsideExpression.java
@@ -0,0 +1,7 @@
+// "Remove redundant assignment" "true"
+class A {
+ public static void main(String[] args) {
+ int x = (<caret>x = 3) * 4;
+ System.out.println(x);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeNoSideEffect.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeNoSideEffect.java
new file mode 100644
index 000000000000..1c8b767bdad5
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeNoSideEffect.java
@@ -0,0 +1,9 @@
+// "Remove redundant assignment" "true"
+class A {
+ void m() {
+ int i;
+ <caret>i = 9;
+ i = 0;
+ System.out.println(i);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeParameterAssignment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeParameterAssignment.java
new file mode 100644
index 000000000000..d65c37194715
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeParameterAssignment.java
@@ -0,0 +1,8 @@
+// "Remove redundant assignment" "true"
+class A {
+ void m(int i) {
+ <caret>i = 9;
+ i = 0;
+ System.out.println(i);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeSideEffect.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeSideEffect.java
new file mode 100644
index 000000000000..014f3fcb3358
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeSideEffect.java
@@ -0,0 +1,15 @@
+// "Remove redundant assignment" "true"
+class A {
+ A a = null;
+ String m(String str) {
+ return str;
+ }
+
+ {
+ String ss = "";
+
+ System.out.println();
+
+ s<caret>s = a.m(ss);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enter.java b/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enter.java
new file mode 100644
index 000000000000..729448314913
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enter.java
@@ -0,0 +1,5 @@
+public class Shakespeare {
+ void quote() {
+ String theQuote = "A fool thinks himself to be wise, <caret>but a wise man knows himself to be a fool.";
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enterOpSignOnNextLine.java b/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enterOpSignOnNextLine.java
new file mode 100644
index 000000000000..729448314913
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enterOpSignOnNextLine.java
@@ -0,0 +1,5 @@
+public class Shakespeare {
+ void quote() {
+ String theQuote = "A fool thinks himself to be wise, <caret>but a wise man knows himself to be a fool.";
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enterOpSignOnNextLine_after.java b/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enterOpSignOnNextLine_after.java
new file mode 100644
index 000000000000..b5576432a1e4
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enterOpSignOnNextLine_after.java
@@ -0,0 +1,6 @@
+public class Shakespeare {
+ void quote() {
+ String theQuote = "A fool thinks himself to be wise, "
+ + "<caret>but a wise man knows himself to be a fool.";
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enter_after.java b/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enter_after.java
new file mode 100644
index 000000000000..d9205976e708
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/editorActions/stringLiteral/enter_after.java
@@ -0,0 +1,6 @@
+public class Shakespeare {
+ void quote() {
+ String theQuote = "A fool thinks himself to be wise, " +
+ "<caret>but a wise man knows himself to be a fool.";
+ }
+}
diff --git a/java/java-tests/testData/codeInsight/generateConstructor/afterAbstractClass.java b/java/java-tests/testData/codeInsight/generateConstructor/afterAbstractClass.java
index 6e850b123246..bbf363cedb34 100644
--- a/java/java-tests/testData/codeInsight/generateConstructor/afterAbstractClass.java
+++ b/java/java-tests/testData/codeInsight/generateConstructor/afterAbstractClass.java
@@ -1,4 +1,4 @@
public abstract class Test {
- protected Test() {<caret>
+ public Test() {<caret>
}
}
diff --git a/java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence.java b/java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence.java
index 9ae5a0b2ec4d..d783ba3af819 100644
--- a/java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence.java
+++ b/java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence.java
@@ -1,7 +1,7 @@
class Parent {
Object menu;
- Parent(Object menu) {
+ public Parent(Object menu) {
this.menu = menu;
}
}
diff --git a/java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence1.java b/java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence1.java
index 29be0de779ed..3b3c4ac48e04 100644
--- a/java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence1.java
+++ b/java/java-tests/testData/codeInsight/generateConstructor/afterFieldPrefixCoincidence1.java
@@ -1,7 +1,7 @@
class Test {
private int _foo;
- Test(int foo) {
+ public Test(int foo) {
_foo = foo;
}
} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/generateConstructor/afterFinalFieldPreselection.java b/java/java-tests/testData/codeInsight/generateConstructor/afterFinalFieldPreselection.java
index bd402a9b28b7..afac816dc6ab 100644
--- a/java/java-tests/testData/codeInsight/generateConstructor/afterFinalFieldPreselection.java
+++ b/java/java-tests/testData/codeInsight/generateConstructor/afterFinalFieldPreselection.java
@@ -4,7 +4,7 @@ class Test {
private int c;
private final int d;
- Test(int b, int d) {
+ public Test(int b, int d) {
this.b = b;
this.d = d;
}
diff --git a/java/java-tests/testData/codeInsight/generateConstructor/afterImmediatelyAfterRBrace.java b/java/java-tests/testData/codeInsight/generateConstructor/afterImmediatelyAfterRBrace.java
index f5b985840745..84e94c50e08f 100644
--- a/java/java-tests/testData/codeInsight/generateConstructor/afterImmediatelyAfterRBrace.java
+++ b/java/java-tests/testData/codeInsight/generateConstructor/afterImmediatelyAfterRBrace.java
@@ -1,5 +1,5 @@
class A
{
- A() {
+ public A() {<caret>
}
}
diff --git a/java/java-tests/testData/codeInsight/generateConstructor/afterPackageLocalClass.java b/java/java-tests/testData/codeInsight/generateConstructor/afterPackageLocalClass.java
index 0d9b0ade18c9..8a885805af98 100644
--- a/java/java-tests/testData/codeInsight/generateConstructor/afterPackageLocalClass.java
+++ b/java/java-tests/testData/codeInsight/generateConstructor/afterPackageLocalClass.java
@@ -1,4 +1,4 @@
class Test {
- Test() {<caret>
+ public Test() {<caret>
}
}
diff --git a/java/java-tests/testData/codeInsight/generateConstructor/afterPrivateClass.java b/java/java-tests/testData/codeInsight/generateConstructor/afterPrivateClass.java
index 19906167ba60..e0f41778cdb7 100644
--- a/java/java-tests/testData/codeInsight/generateConstructor/afterPrivateClass.java
+++ b/java/java-tests/testData/codeInsight/generateConstructor/afterPrivateClass.java
@@ -1,6 +1,6 @@
class Test {
private class Foo {
- private Foo() {<caret>
+ public Foo() {<caret>
}
}
}
diff --git a/java/java-tests/testData/codeInsight/generateConstructor/afterSubstitution.java b/java/java-tests/testData/codeInsight/generateConstructor/afterSubstitution.java
index f457956a2f25..696adcccddd5 100644
--- a/java/java-tests/testData/codeInsight/generateConstructor/afterSubstitution.java
+++ b/java/java-tests/testData/codeInsight/generateConstructor/afterSubstitution.java
@@ -7,7 +7,7 @@ class Parent<T> {
}
class Child<Integer> extends Parent<Integer> {
- Child(Integer field) {
+ public Child(Integer field) {
super(field);
}
}
diff --git a/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIf.java b/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIf.java
new file mode 100644
index 000000000000..9fab2d23f0ed
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIf.java
@@ -0,0 +1,11 @@
+class Test {
+ boolean foo() {
+ return true;
+ }
+
+ void bar() {
+ if (true) {
+ }
+ else <selection>foo()</selection>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIfElse.java b/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIfElse.java
new file mode 100644
index 000000000000..9fab2d23f0ed
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIfElse.java
@@ -0,0 +1,11 @@
+class Test {
+ boolean foo() {
+ return true;
+ }
+
+ void bar() {
+ if (true) {
+ }
+ else <selection>foo()</selection>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIfElse_after.java b/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIfElse_after.java
new file mode 100644
index 000000000000..1735bec14e5d
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIfElse_after.java
@@ -0,0 +1,14 @@
+class Test {
+ boolean foo() {
+ return true;
+ }
+
+ void bar() {
+ if (true) {
+ }
+ else if (foo()) {
+ <caret>
+ } else {
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIf_after.java b/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIf_after.java
new file mode 100644
index 000000000000..f410dc48c795
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/generation/surroundWith/java/SurroundExpressionWithElseIf_after.java
@@ -0,0 +1,13 @@
+class Test {
+ boolean foo() {
+ return true;
+ }
+
+ void bar() {
+ if (true) {
+ }
+ else if (foo()) {
+ <caret>
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/javadocIG/classTypeParamsPresentation.html b/java/java-tests/testData/codeInsight/javadocIG/classTypeParamsPresentation.html
index 789ba1067959..ea45f5f35706 100644
--- a/java/java-tests/testData/codeInsight/javadocIG/classTypeParamsPresentation.html
+++ b/java/java-tests/testData/codeInsight/javadocIG/classTypeParamsPresentation.html
@@ -1,3 +1,3 @@
[&lt; java 1.7 &gt;] java.util
- public class java.util.ArrayList&lt;E&gt; extends java.util.AbstractList&lt;E&gt;
+ public class ArrayList&lt;E&gt; extends java.util.AbstractList&lt;E&gt;
implements java.util.List&lt;E&gt;, java.util.RandomAccess, java.lang.Cloneable, java.io.Serializable \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/completion/doNotCompleteTemplateInMultiCaretMode.java b/java/java-tests/testData/codeInsight/template/postfix/completion/doNotCompleteTemplateInMultiCaretMode.java
new file mode 100644
index 000000000000..31f0bd69b347
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/completion/doNotCompleteTemplateInMultiCaretMode.java
@@ -0,0 +1,8 @@
+import java.lang.Object;
+
+public class Foo {
+ void m() {
+ new Object().inst<caret>
+ new Object().inst<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/completion/doNotCompleteTemplateInMultiCaretMode_after.java b/java/java-tests/testData/codeInsight/template/postfix/completion/doNotCompleteTemplateInMultiCaretMode_after.java
new file mode 100644
index 000000000000..31f0bd69b347
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/completion/doNotCompleteTemplateInMultiCaretMode_after.java
@@ -0,0 +1,8 @@
+import java.lang.Object;
+
+public class Foo {
+ void m() {
+ new Object().inst<caret>
+ new Object().inst<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/completion/doNotShowTemplateInMultiCaretMode.java b/java/java-tests/testData/codeInsight/template/postfix/completion/doNotShowTemplateInMultiCaretMode.java
new file mode 100644
index 000000000000..8cedb76a386c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/completion/doNotShowTemplateInMultiCaretMode.java
@@ -0,0 +1,8 @@
+import java.lang.Object;
+
+public class Foo {
+ void m() {
+ new Object().<caret>
+ new Object().<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/completion/shouldNotExpandInMultiCaretMode.java b/java/java-tests/testData/codeInsight/template/postfix/completion/shouldNotExpandInMultiCaretMode.java
new file mode 100644
index 000000000000..7a4651ff2f46
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/completion/shouldNotExpandInMultiCaretMode.java
@@ -0,0 +1,9 @@
+class A {
+ Object foo;
+ Object bar;
+
+ public static void main(String[] args) {
+ foo == null<caret>
+ bar == null<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/completion/shouldNotExpandInMultiCaretMode_after.java b/java/java-tests/testData/codeInsight/template/postfix/completion/shouldNotExpandInMultiCaretMode_after.java
new file mode 100644
index 000000000000..076ce16708f4
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/completion/shouldNotExpandInMultiCaretMode_after.java
@@ -0,0 +1,9 @@
+class A {
+ Object foo;
+ Object bar;
+
+ public static void main(String[] args) {
+ foo == null.if <caret>
+ bar == null.if <caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/format/notString.java b/java/java-tests/testData/codeInsight/template/postfix/templates/format/notString.java
new file mode 100644
index 000000000000..f95b6df27253
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/format/notString.java
@@ -0,0 +1,7 @@
+package templates;
+
+public class Foo {
+ void m(boolean b, int value) {
+ b.format<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/format/notString_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/format/notString_after.java
new file mode 100644
index 000000000000..e828f4da8931
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/format/notString_after.java
@@ -0,0 +1,7 @@
+package templates;
+
+public class Foo {
+ void m(boolean b, int value) {
+ b.format <caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/format/string.java b/java/java-tests/testData/codeInsight/template/postfix/templates/format/string.java
new file mode 100644
index 000000000000..0cd8302e1b83
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/format/string.java
@@ -0,0 +1,7 @@
+package templates;
+
+public class Foo {
+ void m(boolean b, int value) {
+ "m()".format<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/format/string_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/format/string_after.java
new file mode 100644
index 000000000000..a0b3172a42b8
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/format/string_after.java
@@ -0,0 +1,7 @@
+package templates;
+
+public class Foo {
+ void m(boolean b, int value) {
+ String.format("m()", <caret>);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/notnull/elseStatement.java b/java/java-tests/testData/codeInsight/template/postfix/templates/notnull/elseStatement.java
new file mode 100644
index 000000000000..477a154402ca
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/notnull/elseStatement.java
@@ -0,0 +1,8 @@
+public class Foo {
+ void m(Object o) {
+ if (true) {
+
+ }
+ else o.notnull<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/notnull/elseStatement_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/notnull/elseStatement_after.java
new file mode 100644
index 000000000000..97da48f45b51
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/notnull/elseStatement_after.java
@@ -0,0 +1,10 @@
+public class Foo {
+ void m(Object o) {
+ if (true) {
+
+ }
+ else if (o != null) {
+ <caret>
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/sout/simple.java b/java/java-tests/testData/codeInsight/template/postfix/templates/sout/simple.java
new file mode 100644
index 000000000000..80da2b8ad620
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/sout/simple.java
@@ -0,0 +1,7 @@
+package templates;
+
+public class Foo {
+ void m(boolean b, int value) {
+ b.sout<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/sout/simple_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/sout/simple_after.java
new file mode 100644
index 000000000000..3b0a8dd051ad
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/sout/simple_after.java
@@ -0,0 +1,7 @@
+package templates;
+
+public class Foo {
+ void m(boolean b, int value) {
+ System.out.println(b);<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/sout/void.java b/java/java-tests/testData/codeInsight/template/postfix/templates/sout/void.java
new file mode 100644
index 000000000000..b99a577e98b9
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/sout/void.java
@@ -0,0 +1,7 @@
+package templates;
+
+public class Foo {
+ void m(boolean b, int value) {
+ m().sout<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/sout/void_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/sout/void_after.java
new file mode 100644
index 000000000000..4e08abc92f85
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/sout/void_after.java
@@ -0,0 +1,7 @@
+package templates;
+
+public class Foo {
+ void m(boolean b, int value) {
+ m().sout <caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/try/multiStatement.java b/java/java-tests/testData/codeInsight/template/postfix/templates/try/multiStatement.java
new file mode 100644
index 000000000000..6b6447294b3f
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/try/multiStatement.java
@@ -0,0 +1,7 @@
+public class Foo {
+ void m() {
+ somevalue.try<caret>
+ int i=0;
+
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/try/multiStatement_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/try/multiStatement_after.java
new file mode 100644
index 000000000000..cf2395d563c8
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/try/multiStatement_after.java
@@ -0,0 +1,11 @@
+public class Foo {
+ void m() {
+ try {
+ somevalue<caret>
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ int i=0;
+
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/try/notStatement.java b/java/java-tests/testData/codeInsight/template/postfix/templates/try/notStatement.java
new file mode 100644
index 000000000000..bec0827189df
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/try/notStatement.java
@@ -0,0 +1,3 @@
+public class Foo.try<caret> {
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/try/notStatement_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/try/notStatement_after.java
new file mode 100644
index 000000000000..59c9b045004a
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/try/notStatement_after.java
@@ -0,0 +1,3 @@
+public class Foo.try <caret> {
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/try/simple.java b/java/java-tests/testData/codeInsight/template/postfix/templates/try/simple.java
new file mode 100644
index 000000000000..d77e002333b8
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/try/simple.java
@@ -0,0 +1,5 @@
+public class Foo {
+ void m() {
+ somevalue.try<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/try/simple_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/try/simple_after.java
new file mode 100644
index 000000000000..bf0347afd14c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/try/simple_after.java
@@ -0,0 +1,9 @@
+public class Foo {
+ void m() {
+ try {
+ somevalue<caret>
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/try/statement.java b/java/java-tests/testData/codeInsight/template/postfix/templates/try/statement.java
new file mode 100644
index 000000000000..e68cb699ddb3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/try/statement.java
@@ -0,0 +1,5 @@
+public class Foo {
+ void m() {
+ Object o = new Object().try<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/try/statement_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/try/statement_after.java
new file mode 100644
index 000000000000..41f8cc1c0885
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/template/postfix/templates/try/statement_after.java
@@ -0,0 +1,9 @@
+public class Foo {
+ void m() {
+ try {
+ Object o = new Object()<caret>
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretIndentLBrace_after.java b/java/java-tests/testData/codeInsight/typing/multicaretIndentLBrace_after.java
new file mode 100644
index 000000000000..31d1689ea98c
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretIndentLBrace_after.java
@@ -0,0 +1,8 @@
+class Foo {
+ void m() {
+ if (true)
+ {<caret>
+ if (true)
+ {<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretIndentLBrace_before.java b/java/java-tests/testData/codeInsight/typing/multicaretIndentLBrace_before.java
new file mode 100644
index 000000000000..cc7542de0f46
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretIndentLBrace_before.java
@@ -0,0 +1,8 @@
+class Foo {
+ void m() {
+ if (true)
+ <caret>
+ if (true)
+ <caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretIndentRBrace_after.java b/java/java-tests/testData/codeInsight/typing/multicaretIndentRBrace_after.java
new file mode 100644
index 000000000000..dd2d47d65563
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretIndentRBrace_after.java
@@ -0,0 +1,10 @@
+class Foo {
+ void m() {
+ if (true) {
+ System.out.println();
+ }<caret>
+ if (true) {
+ System.out.println();
+ }<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretIndentRBrace_before.java b/java/java-tests/testData/codeInsight/typing/multicaretIndentRBrace_before.java
new file mode 100644
index 000000000000..386e2e261916
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretIndentRBrace_before.java
@@ -0,0 +1,10 @@
+class Foo {
+ void m() {
+ if (true) {
+ System.out.println();
+ <caret>
+ if (true) {
+ System.out.println();
+ <caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretInsertGt_after.java b/java/java-tests/testData/codeInsight/typing/multicaretInsertGt_after.java
new file mode 100644
index 000000000000..5779f885b4bd
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretInsertGt_after.java
@@ -0,0 +1,10 @@
+class Foo {
+ void m() {
+ if (true) {
+ List<<caret>>
+ }
+ if (true) {
+ List<<caret>>
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretInsertGt_before.java b/java/java-tests/testData/codeInsight/typing/multicaretInsertGt_before.java
new file mode 100644
index 000000000000..fa17fc84dca4
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretInsertGt_before.java
@@ -0,0 +1,10 @@
+class Foo {
+ void m() {
+ if (true) {
+ List<caret>
+ }
+ if (true) {
+ List<caret>
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretInsertQuote_after.java b/java/java-tests/testData/codeInsight/typing/multicaretInsertQuote_after.java
new file mode 100644
index 000000000000..bef6962d2280
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretInsertQuote_after.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.out.println("<caret>");
+ System.out.println("<caret>");
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretInsertQuote_before.java b/java/java-tests/testData/codeInsight/typing/multicaretInsertQuote_before.java
new file mode 100644
index 000000000000..c0716b5a99b8
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretInsertQuote_before.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.out.println(<caret>);
+ System.out.println(<caret>);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretInsertRParen_after.java b/java/java-tests/testData/codeInsight/typing/multicaretInsertRParen_after.java
new file mode 100644
index 000000000000..ec85a6782591
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretInsertRParen_after.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.exit(<caret>)
+ System.exit(<caret>)
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretInsertRParen_before.java b/java/java-tests/testData/codeInsight/typing/multicaretInsertRParen_before.java
new file mode 100644
index 000000000000..594fa9162ca3
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretInsertRParen_before.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.exit<caret>
+ System.exit<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretSkipGt_after.java b/java/java-tests/testData/codeInsight/typing/multicaretSkipGt_after.java
new file mode 100644
index 000000000000..432129e7f48e
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretSkipGt_after.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ java.util.List<String> l1 = new java.util.ArrayList<><caret>();
+ java.util.List<String> l2 = new java.util.ArrayList<><caret>();
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretSkipGt_before.java b/java/java-tests/testData/codeInsight/typing/multicaretSkipGt_before.java
new file mode 100644
index 000000000000..7fe0a6077934
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretSkipGt_before.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ java.util.List<String> l1 = new java.util.ArrayList<<caret>>();
+ java.util.List<String> l2 = new java.util.ArrayList<<caret>>();
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretSkipQuote_after.java b/java/java-tests/testData/codeInsight/typing/multicaretSkipQuote_after.java
new file mode 100644
index 000000000000..a2ce5c51e485
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretSkipQuote_after.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.out.println(""<caret>);
+ System.out.println(""<caret>);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretSkipQuote_before.java b/java/java-tests/testData/codeInsight/typing/multicaretSkipQuote_before.java
new file mode 100644
index 000000000000..bef6962d2280
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretSkipQuote_before.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.out.println("<caret>");
+ System.out.println("<caret>");
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretSkipRParen_after.java b/java/java-tests/testData/codeInsight/typing/multicaretSkipRParen_after.java
new file mode 100644
index 000000000000..45324ed65b40
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretSkipRParen_after.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.exit()<caret>
+ System.exit()<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretSkipRParen_before.java b/java/java-tests/testData/codeInsight/typing/multicaretSkipRParen_before.java
new file mode 100644
index 000000000000..ec85a6782591
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretSkipRParen_before.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.exit(<caret>)
+ System.exit(<caret>)
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretSkipSemicolon_after.java b/java/java-tests/testData/codeInsight/typing/multicaretSkipSemicolon_after.java
new file mode 100644
index 000000000000..0e0ddbaf5385
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretSkipSemicolon_after.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.out.println();<caret>
+ System.out.println();<caret>
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/typing/multicaretSkipSemicolon_before.java b/java/java-tests/testData/codeInsight/typing/multicaretSkipSemicolon_before.java
new file mode 100644
index 000000000000..cadfb3312bd6
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/typing/multicaretSkipSemicolon_before.java
@@ -0,0 +1,6 @@
+class Foo {
+ void m() {
+ System.out.println()<caret>;
+ System.out.println()<caret>;
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput.log b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput.log
new file mode 100644
index 000000000000..1f87c341e730
--- /dev/null
+++ b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput.log
@@ -0,0 +1,15 @@
+Compiling files:
+moduleA/src/com/ppp/Inner.java
+End of files
+Cleaning output files:
+out/com/ppp/B.class
+End of files
+Compiling files:
+moduleB/src/com/ppp/B.java
+End of files
+Cleaning output files:
+out/com/ppp/B.class
+End of files
+Compiling files:
+moduleB/src/com/ppp/B.java
+End of files
diff --git a/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleA/src/com/ppp/Inner.java.new b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleA/src/com/ppp/Inner.java.new
new file mode 100644
index 000000000000..b27489774bed
--- /dev/null
+++ b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleA/src/com/ppp/Inner.java.new
@@ -0,0 +1,4 @@
+package com.ppp;
+
+class Inner {
+} \ No newline at end of file
diff --git a/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/B.java b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/B.java
new file mode 100644
index 000000000000..da7cb3fc9b26
--- /dev/null
+++ b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/B.java
@@ -0,0 +1,6 @@
+package com.ppp;
+
+public class B {
+ private Inner inner;
+}
+
diff --git a/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/Inner.java b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/Inner.java
new file mode 100644
index 000000000000..5ffa5766c98e
--- /dev/null
+++ b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/Inner.java
@@ -0,0 +1,5 @@
+package com.ppp;
+
+class Inner {
+}
+
diff --git a/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/Inner.java.remove b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/Inner.java.remove
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/java/java-tests/testData/compileServer/incremental/common/moveClassToDependentModuleWithSameOutput/moduleB/src/com/ppp/Inner.java.remove
diff --git a/java/java-tests/testData/inspection/dataFlow/boxingBoolean/expected.xml b/java/java-tests/testData/inspection/dataFlow/boxingBoolean/expected.xml
index d04ea2815d43..e04ae9dabc10 100644
--- a/java/java-tests/testData/inspection/dataFlow/boxingBoolean/expected.xml
+++ b/java/java-tests/testData/inspection/dataFlow/boxingBoolean/expected.xml
@@ -33,7 +33,7 @@
<problem>
<file>Test.java</file>
<line>51</line>
- <description>Condition &lt;code&gt;o&lt;/code&gt; at the left side of assignment expression is always &lt;code&gt;false&lt;/code&gt;. Can be simplified to normal assignment.</description>
+ <description>Condition &lt;code&gt;o&lt;/code&gt; at the left side of assignment expression is always &lt;code&gt;false&lt;/code&gt;. Can be simplified.</description>
</problem>
</problems>
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/ComparingToNotNullShouldNotAffectNullity.java b/java/java-tests/testData/inspection/dataFlow/fixture/ComparingToNotNullShouldNotAffectNullity.java
index fed3d1b79015..98c26df45721 100644
--- a/java/java-tests/testData/inspection/dataFlow/fixture/ComparingToNotNullShouldNotAffectNullity.java
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/ComparingToNotNullShouldNotAffectNullity.java
@@ -18,6 +18,27 @@ class Bar3 {
if (first == getObj() || collection.size() > 0) {
System.out.println(first.hashCode());
}
+ if (<warning descr="Condition 'first == null' is always 'false'">first == null</warning>) {
+ System.out.println(first.hashCode());
+ }
+ }
+ }
+
+ void foo2(Collection<Object> collection) {
+ if (!collection.isEmpty()) {
+ Object first = collection.iterator().next();
+ if (first != getObj() || collection.size() > 0) {
+ first.hashCode();
+ }
+ }
+ }
+
+ void foo3(Collection<Object> collection) {
+ if (!collection.isEmpty()) {
+ Object first = collection.iterator().next();
+ if (first == getObj() || collection.size() > 2) {
+ System.out.println(first.hashCode());
+ }
if (first == null) {
System.out.println(<warning descr="Method invocation 'first.hashCode()' may produce 'java.lang.NullPointerException'">first.hashCode()</warning>);
}
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/ContractVarargs.java b/java/java-tests/testData/inspection/dataFlow/fixture/ContractVarargs.java
new file mode 100644
index 000000000000..e65bc8740e83
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/ContractVarargs.java
@@ -0,0 +1,39 @@
+import org.jetbrains.annotations.Contract;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+class Contracts {
+
+ public void simpleFail(@Nullable String message) {
+ notBlank(message);
+ log(message);
+ }
+
+ @Contract("_->fail")
+ private void notBlank(@Nullable Object message) {
+
+ }
+
+ @Contract("_,_,_->fail")
+ private void notBlank(@Nullable Object o, String message, Object... args) {
+
+ }
+
+ public void varargFail(@Nullable String message) {
+ notBlank(message, "Message should not be blank");
+ log(message);
+ }
+
+ public void vararg1(@Nullable String message) {
+ notBlank(message, "Message should not be blank", new Object());
+ log(message);
+ }
+ public void vararg2(@Nullable String message) {
+ notBlank(message, "Message should not be blank", new Object(), new Object());
+ log(message);
+ }
+
+ public void log(@NotNull String message) {
+ System.out.println(message);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/NotNullAfterDereference.java b/java/java-tests/testData/inspection/dataFlow/fixture/NotNullAfterDereference.java
new file mode 100644
index 000000000000..5c6dc81fe339
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/NotNullAfterDereference.java
@@ -0,0 +1,9 @@
+class Foo {
+
+ private void someMethod(String someArg) {
+ someArg.getClass();
+ if (<warning descr="Condition 'someArg == null' is always 'false'">someArg == null</warning>) {
+ System.err.println("Wrong argument");
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/NullableBoolean.java b/java/java-tests/testData/inspection/dataFlow/fixture/NullableBoolean.java
new file mode 100644
index 000000000000..36756339d51d
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/NullableBoolean.java
@@ -0,0 +1,23 @@
+import org.jetbrains.annotations.Nullable;
+
+import java.util.List;
+
+class Foo {
+
+ public static void main(@Nullable Boolean hasMissingGems, List<String> missing) {
+ if (hasMissingGems != null && hasMissingGems) {
+ return;
+ }
+
+ if (hasMissingGems == null && missing.size() > 0) {
+
+ }
+
+ }
+ public static void main2(@Nullable Boolean hasMissingGems, List<String> missing) {
+ if ((hasMissingGems != null && hasMissingGems) || (hasMissingGems == null && missing.size() > 0)) {
+
+ }
+
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences.java b/java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences.java
index 7f727f919154..d81b46724a81 100644
--- a/java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences.java
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences.java
@@ -16,4 +16,10 @@ class Test {
return foo;
}
+ public void testDontReplaceQualifierWithNull(Object bar) {
+ if (bar == null) {
+ <warning descr="Method invocation 'bar.hashCode()' may produce 'java.lang.NullPointerException'">bar.hashCode()</warning>;
+ }
+ }
+
} \ No newline at end of file
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences_after.java b/java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences_after.java
index feb147c4fc30..0d187397afc9 100644
--- a/java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences_after.java
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/ReportConstantReferences_after.java
@@ -16,4 +16,10 @@ class Test {
return foo;
}
+ public void testDontReplaceQualifierWithNull(Object bar) {
+ if (bar == null) {
+ bar.hashCode();
+ }
+ }
+
} \ No newline at end of file
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/TrueOrEqualsSomething.java b/java/java-tests/testData/inspection/dataFlow/fixture/TrueOrEqualsSomething.java
new file mode 100644
index 000000000000..a41172b8838e
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/TrueOrEqualsSomething.java
@@ -0,0 +1,9 @@
+class Contracts {
+
+ private boolean method(boolean a) {
+ boolean b = true;
+ <warning descr="Condition 'b' at the left side of assignment expression is always 'true'. Can be simplified"><caret>b</warning> |= a;
+ return b;
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/TrueOrEqualsSomething_after.java b/java/java-tests/testData/inspection/dataFlow/fixture/TrueOrEqualsSomething_after.java
new file mode 100644
index 000000000000..8e7695f4cee4
--- /dev/null
+++ b/java/java-tests/testData/inspection/dataFlow/fixture/TrueOrEqualsSomething_after.java
@@ -0,0 +1,8 @@
+class Contracts {
+
+ private boolean method(boolean a) {
+ boolean b = true;
+ return b;
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/inspection/redundantCast/generics/BoxingTopCast/expected.xml b/java/java-tests/testData/inspection/redundantCast/generics/BoxingTopCast/expected.xml
new file mode 100644
index 000000000000..4704d91e891d
--- /dev/null
+++ b/java/java-tests/testData/inspection/redundantCast/generics/BoxingTopCast/expected.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<problems/> \ No newline at end of file
diff --git a/java/java-tests/testData/inspection/redundantCast/generics/BoxingTopCast/src/BoxingTopCast.java b/java/java-tests/testData/inspection/redundantCast/generics/BoxingTopCast/src/BoxingTopCast.java
new file mode 100644
index 000000000000..148422b00588
--- /dev/null
+++ b/java/java-tests/testData/inspection/redundantCast/generics/BoxingTopCast/src/BoxingTopCast.java
@@ -0,0 +1,20 @@
+class TestCasting
+{
+ public void testRedundantCast() throws Exception
+ {
+ Object o = getObject();
+ double d = 0.0;
+
+ if( o instanceof Integer )
+ {
+ d = (double) (Integer)o;
+ }
+
+ System.out.println( "d = " + d );
+ }
+
+ private Object getObject()
+ {
+ return new Integer(42);
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/moduleRootManager/rootsChanged/emptyModule/a.iml b/java/java-tests/testData/moduleRootManager/rootsChanged/emptyModule/a.iml
new file mode 100644
index 000000000000..ddf828eec880
--- /dev/null
+++ b/java/java-tests/testData/moduleRootManager/rootsChanged/emptyModule/a.iml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
+
diff --git a/java/java-tests/testData/psi/cls/mirror/Class.txt b/java/java-tests/testData/psi/cls/mirror/Class.txt
new file mode 100644
index 000000000000..59d7e4d231fe
--- /dev/null
+++ b/java/java-tests/testData/psi/cls/mirror/Class.txt
@@ -0,0 +1,385 @@
+
+ // IntelliJ API Decompiler stub source generated from a class file
+ // Implementation of methods is not available
+
+package java.lang;
+
+public final class Class <T> implements java.io.Serializable, java.lang.reflect.GenericDeclaration, java.lang.reflect.Type, java.lang.reflect.AnnotatedElement {
+ private static final int ANNOTATION = 8192;
+ private static final int ENUM = 16384;
+ private static final int SYNTHETIC = 4096;
+ private transient volatile java.lang.reflect.Constructor<T> cachedConstructor;
+ private transient volatile java.lang.Class<?> newInstanceCallerCache;
+ private transient java.lang.String name;
+ private static java.security.ProtectionDomain allPermDomain;
+ private static boolean useCaches;
+ private transient volatile java.lang.ref.SoftReference<java.lang.Class.ReflectionData<T>> reflectionData;
+ private transient volatile int classRedefinedCount;
+ private transient volatile sun.reflect.generics.repository.ClassRepository genericInfo;
+ private static final long serialVersionUID = 3206093459760846163L;
+ private static final java.io.ObjectStreamField[] serialPersistentFields;
+ private static sun.reflect.ReflectionFactory reflectionFactory;
+ private static boolean initted;
+ private transient volatile T[] enumConstants;
+ private transient volatile java.util.Map<java.lang.String,T> enumConstantDirectory;
+ private transient volatile java.lang.Class.AnnotationData annotationData;
+ private transient volatile sun.reflect.annotation.AnnotationType annotationType;
+ transient java.lang.ClassValue.ClassValueMap classValueMap;
+
+ private static native void registerNatives();
+
+ private Class() { /* compiled code */ }
+
+ public java.lang.String toString() { /* compiled code */ }
+
+ public java.lang.String toGenericString() { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public static java.lang.Class<?> forName(java.lang.String s) throws java.lang.ClassNotFoundException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public static java.lang.Class<?> forName(java.lang.String s, boolean b, java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundException { /* compiled code */ }
+
+ private static native java.lang.Class<?> forName0(java.lang.String s, boolean b, java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundException;
+
+ @sun.reflect.CallerSensitive
+ public T newInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException { /* compiled code */ }
+
+ public native boolean isInstance(java.lang.Object o);
+
+ public native boolean isAssignableFrom(java.lang.Class<?> aClass);
+
+ public native boolean isInterface();
+
+ public native boolean isArray();
+
+ public native boolean isPrimitive();
+
+ public boolean isAnnotation() { /* compiled code */ }
+
+ public boolean isSynthetic() { /* compiled code */ }
+
+ public java.lang.String getName() { /* compiled code */ }
+
+ private native java.lang.String getName0();
+
+ @sun.reflect.CallerSensitive
+ public java.lang.ClassLoader getClassLoader() { /* compiled code */ }
+
+ native java.lang.ClassLoader getClassLoader0();
+
+ public java.lang.reflect.TypeVariable<java.lang.Class<T>>[] getTypeParameters() { /* compiled code */ }
+
+ public native java.lang.Class<? super T> getSuperclass();
+
+ public java.lang.reflect.Type getGenericSuperclass() { /* compiled code */ }
+
+ public java.lang.Package getPackage() { /* compiled code */ }
+
+ public java.lang.Class<?>[] getInterfaces() { /* compiled code */ }
+
+ private native java.lang.Class<?>[] getInterfaces0();
+
+ public java.lang.reflect.Type[] getGenericInterfaces() { /* compiled code */ }
+
+ public native java.lang.Class<?> getComponentType();
+
+ public native int getModifiers();
+
+ public native java.lang.Object[] getSigners();
+
+ native void setSigners(java.lang.Object[] objects);
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Method getEnclosingMethod() throws java.lang.SecurityException { /* compiled code */ }
+
+ private native java.lang.Object[] getEnclosingMethod0();
+
+ private java.lang.Class.EnclosingMethodInfo getEnclosingMethodInfo() { /* compiled code */ }
+
+ private static java.lang.Class<?> toClass(java.lang.reflect.Type type) { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Constructor<?> getEnclosingConstructor() throws java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.Class<?> getDeclaringClass() throws java.lang.SecurityException { /* compiled code */ }
+
+ private native java.lang.Class<?> getDeclaringClass0();
+
+ @sun.reflect.CallerSensitive
+ public java.lang.Class<?> getEnclosingClass() throws java.lang.SecurityException { /* compiled code */ }
+
+ public java.lang.String getSimpleName() { /* compiled code */ }
+
+ public java.lang.String getTypeName() { /* compiled code */ }
+
+ private static boolean isAsciiDigit(char c) { /* compiled code */ }
+
+ public java.lang.String getCanonicalName() { /* compiled code */ }
+
+ public boolean isAnonymousClass() { /* compiled code */ }
+
+ public boolean isLocalClass() { /* compiled code */ }
+
+ public boolean isMemberClass() { /* compiled code */ }
+
+ private java.lang.String getSimpleBinaryName() { /* compiled code */ }
+
+ private boolean isLocalOrAnonymousClass() { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.Class<?>[] getClasses() { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Field[] getFields() throws java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Method[] getMethods() throws java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Constructor<?>[] getConstructors() throws java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Field getField(java.lang.String s) throws java.lang.NoSuchFieldException, java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Method getMethod(java.lang.String s, java.lang.Class<?>... classes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Constructor<T> getConstructor(java.lang.Class<?>... classes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.Class<?>[] getDeclaredClasses() throws java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Field[] getDeclaredFields() throws java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Method[] getDeclaredMethods() throws java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Constructor<?>[] getDeclaredConstructors() throws java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Field getDeclaredField(java.lang.String s) throws java.lang.NoSuchFieldException, java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Method getDeclaredMethod(java.lang.String s, java.lang.Class<?>... classes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { /* compiled code */ }
+
+ @sun.reflect.CallerSensitive
+ public java.lang.reflect.Constructor<T> getDeclaredConstructor(java.lang.Class<?>... classes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { /* compiled code */ }
+
+ public java.io.InputStream getResourceAsStream(java.lang.String s) { /* compiled code */ }
+
+ public java.net.URL getResource(java.lang.String s) { /* compiled code */ }
+
+ public java.security.ProtectionDomain getProtectionDomain() { /* compiled code */ }
+
+ private native java.security.ProtectionDomain getProtectionDomain0();
+
+ static native java.lang.Class<?> getPrimitiveClass(java.lang.String s);
+
+ private void checkMemberAccess(int i, java.lang.Class<?> aClass, boolean b) { /* compiled code */ }
+
+ private void checkPackageAccess(java.lang.ClassLoader classLoader, boolean b) { /* compiled code */ }
+
+ private java.lang.String resolveName(java.lang.String s) { /* compiled code */ }
+
+ private java.lang.Class.ReflectionData<T> reflectionData() { /* compiled code */ }
+
+ private java.lang.Class.ReflectionData<T> newReflectionData(java.lang.ref.SoftReference<java.lang.Class.ReflectionData<T>> softReference, int i) { /* compiled code */ }
+
+ private native java.lang.String getGenericSignature0();
+
+ private sun.reflect.generics.factory.GenericsFactory getFactory() { /* compiled code */ }
+
+ private sun.reflect.generics.repository.ClassRepository getGenericInfo() { /* compiled code */ }
+
+ native byte[] getRawAnnotations();
+
+ native byte[] getRawTypeAnnotations();
+
+ static byte[] getExecutableTypeAnnotationBytes(java.lang.reflect.Executable executable) { /* compiled code */ }
+
+ native sun.reflect.ConstantPool getConstantPool();
+
+ private java.lang.reflect.Field[] privateGetDeclaredFields(boolean b) { /* compiled code */ }
+
+ private java.lang.reflect.Field[] privateGetPublicFields(java.util.Set<java.lang.Class<?>> set) { /* compiled code */ }
+
+ private static void addAll(java.util.Collection<java.lang.reflect.Field> collection, java.lang.reflect.Field[] fields) { /* compiled code */ }
+
+ private java.lang.reflect.Constructor<T>[] privateGetDeclaredConstructors(boolean b) { /* compiled code */ }
+
+ private java.lang.reflect.Method[] privateGetDeclaredMethods(boolean b) { /* compiled code */ }
+
+ private java.lang.reflect.Method[] privateGetPublicMethods() { /* compiled code */ }
+
+ private static java.lang.reflect.Field searchFields(java.lang.reflect.Field[] fields, java.lang.String s) { /* compiled code */ }
+
+ private java.lang.reflect.Field getField0(java.lang.String s) throws java.lang.NoSuchFieldException { /* compiled code */ }
+
+ private static java.lang.reflect.Method searchMethods(java.lang.reflect.Method[] methods, java.lang.String s, java.lang.Class<?>[] classes) { /* compiled code */ }
+
+ private java.lang.reflect.Method getMethod0(java.lang.String s, java.lang.Class<?>[] classes, boolean b) { /* compiled code */ }
+
+ private java.lang.reflect.Constructor<T> getConstructor0(java.lang.Class<?>[] classes, int i) throws java.lang.NoSuchMethodException { /* compiled code */ }
+
+ private static boolean arrayContentsEq(java.lang.Object[] objects, java.lang.Object[] objects1) { /* compiled code */ }
+
+ private static java.lang.reflect.Field[] copyFields(java.lang.reflect.Field[] fields) { /* compiled code */ }
+
+ private static java.lang.reflect.Method[] copyMethods(java.lang.reflect.Method[] methods) { /* compiled code */ }
+
+ private static <U> java.lang.reflect.Constructor<U>[] copyConstructors(java.lang.reflect.Constructor<U>[] constructors) { /* compiled code */ }
+
+ private native java.lang.reflect.Field[] getDeclaredFields0(boolean b);
+
+ private native java.lang.reflect.Method[] getDeclaredMethods0(boolean b);
+
+ private native java.lang.reflect.Constructor<T>[] getDeclaredConstructors0(boolean b);
+
+ private native java.lang.Class<?>[] getDeclaredClasses0();
+
+ private static java.lang.String argumentTypesToString(java.lang.Class<?>[] classes) { /* compiled code */ }
+
+ public boolean desiredAssertionStatus() { /* compiled code */ }
+
+ private static native boolean desiredAssertionStatus0(java.lang.Class<?> aClass);
+
+ public boolean isEnum() { /* compiled code */ }
+
+ private static sun.reflect.ReflectionFactory getReflectionFactory() { /* compiled code */ }
+
+ private static void checkInitted() { /* compiled code */ }
+
+ public T[] getEnumConstants() { /* compiled code */ }
+
+ T[] getEnumConstantsShared() { /* compiled code */ }
+
+ java.util.Map<java.lang.String,T> enumConstantDirectory() { /* compiled code */ }
+
+ public T cast(java.lang.Object o) { /* compiled code */ }
+
+ private java.lang.String cannotCastMsg(java.lang.Object o) { /* compiled code */ }
+
+ public <U> java.lang.Class<? extends U> asSubclass(java.lang.Class<U> aClass) { /* compiled code */ }
+
+ public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> aClass) { /* compiled code */ }
+
+ public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> aClass) { /* compiled code */ }
+
+ public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> aClass) { /* compiled code */ }
+
+ public java.lang.annotation.Annotation[] getAnnotations() { /* compiled code */ }
+
+ public <A extends java.lang.annotation.Annotation> A getDeclaredAnnotation(java.lang.Class<A> aClass) { /* compiled code */ }
+
+ public <A extends java.lang.annotation.Annotation> A[] getDeclaredAnnotationsByType(java.lang.Class<A> aClass) { /* compiled code */ }
+
+ public java.lang.annotation.Annotation[] getDeclaredAnnotations() { /* compiled code */ }
+
+ private java.lang.Class.AnnotationData annotationData() { /* compiled code */ }
+
+ private java.lang.Class.AnnotationData createAnnotationData(int i) { /* compiled code */ }
+
+ boolean casAnnotationType(sun.reflect.annotation.AnnotationType annotationType, sun.reflect.annotation.AnnotationType annotationType1) { /* compiled code */ }
+
+ sun.reflect.annotation.AnnotationType getAnnotationType() { /* compiled code */ }
+
+ java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> getDeclaredAnnotationMap() { /* compiled code */ }
+
+ public java.lang.reflect.AnnotatedType getAnnotatedSuperclass() { /* compiled code */ }
+
+ public java.lang.reflect.AnnotatedType[] getAnnotatedInterfaces() { /* compiled code */ }
+
+ private static class AnnotationData {
+ final java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> annotations;
+ final java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> declaredAnnotations;
+ final int redefinedCount;
+
+ AnnotationData(java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> map, java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> map1, int i) { /* compiled code */ }
+ }
+
+ private static class Atomic {
+ private static final sun.misc.Unsafe unsafe;
+ private static final long reflectionDataOffset;
+ private static final long annotationTypeOffset;
+ private static final long annotationDataOffset;
+
+ private Atomic() { /* compiled code */ }
+
+ private static long objectFieldOffset(java.lang.reflect.Field[] fields, java.lang.String s) { /* compiled code */ }
+
+ static <T> boolean casReflectionData(java.lang.Class<?> aClass, java.lang.ref.SoftReference<java.lang.Class.ReflectionData<T>> softReference, java.lang.ref.SoftReference<java.lang.Class.ReflectionData<T>> softReference1) { /* compiled code */ }
+
+ static <T> boolean casAnnotationType(java.lang.Class<?> aClass, sun.reflect.annotation.AnnotationType annotationType, sun.reflect.annotation.AnnotationType annotationType1) { /* compiled code */ }
+
+ static <T> boolean casAnnotationData(java.lang.Class<?> aClass, java.lang.Class.AnnotationData annotationData, java.lang.Class.AnnotationData annotationData1) { /* compiled code */ }
+ }
+
+ private static final class EnclosingMethodInfo {
+ private java.lang.Class<?> enclosingClass;
+ private java.lang.String name;
+ private java.lang.String descriptor;
+
+ private EnclosingMethodInfo(java.lang.Object[] objects) { /* compiled code */ }
+
+ boolean isPartial() { /* compiled code */ }
+
+ boolean isConstructor() { /* compiled code */ }
+
+ boolean isMethod() { /* compiled code */ }
+
+ java.lang.Class<?> getEnclosingClass() { /* compiled code */ }
+
+ java.lang.String getName() { /* compiled code */ }
+
+ java.lang.String getDescriptor() { /* compiled code */ }
+ }
+
+ static class MethodArray {
+ private java.lang.reflect.Method[] methods;
+ private int length;
+
+ MethodArray() { /* compiled code */ }
+
+ void add(java.lang.reflect.Method method) { /* compiled code */ }
+
+ void addAll(java.lang.reflect.Method[] methods) { /* compiled code */ }
+
+ void addAll(java.lang.Class.MethodArray methodArray) { /* compiled code */ }
+
+ void addIfNotPresent(java.lang.reflect.Method method) { /* compiled code */ }
+
+ void addAllIfNotPresent(java.lang.Class.MethodArray methodArray) { /* compiled code */ }
+
+ void addAllNonStatic(java.lang.reflect.Method[] methods) { /* compiled code */ }
+
+ int length() { /* compiled code */ }
+
+ java.lang.reflect.Method get(int i) { /* compiled code */ }
+
+ void removeByNameAndSignature(java.lang.reflect.Method method) { /* compiled code */ }
+
+ void compactAndTrim() { /* compiled code */ }
+
+ java.lang.reflect.Method[] getArray() { /* compiled code */ }
+ }
+
+ private static class ReflectionData <T> {
+ volatile java.lang.reflect.Field[] declaredFields;
+ volatile java.lang.reflect.Field[] publicFields;
+ volatile java.lang.reflect.Method[] declaredMethods;
+ volatile java.lang.reflect.Method[] publicMethods;
+ volatile java.lang.reflect.Constructor<T>[] declaredConstructors;
+ volatile java.lang.reflect.Constructor<T>[] publicConstructors;
+ volatile java.lang.reflect.Field[] declaredPublicFields;
+ volatile java.lang.reflect.Method[] declaredPublicMethods;
+ volatile java.lang.Class<?>[] interfaces;
+ final int redefinedCount;
+
+ ReflectionData(int i) { /* compiled code */ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/changeSignature/TypeAnnotationsAllAround.java b/java/java-tests/testData/refactoring/changeSignature/TypeAnnotationsAllAround.java
new file mode 100644
index 000000000000..c9387c2ebdc3
--- /dev/null
+++ b/java/java-tests/testData/refactoring/changeSignature/TypeAnnotationsAllAround.java
@@ -0,0 +1,14 @@
+import java.lang.annotation.*;
+import java.util.List;
+
+@Target({ElementType.TYPE_USE})
+@interface TA { int value() default 0; }
+
+class C {
+ class Inner { }
+
+ //public @TA(0) List<@TA(1) C.@TA(1) Inner> m(@TA(2) int @TA(3) [] p1, @TA(4) List<@TA(5) Class<@TA(6) ?>> p2, @TA(7) String @TA(8) ... p3) throws @TA(42) IllegalArgumentException, @TA(43) IllegalStateException {
+ public List<Inner> m<caret>() {
+ return null;
+ }
+}
diff --git a/java/java-tests/testData/refactoring/changeSignature/TypeAnnotationsAllAround_after.java b/java/java-tests/testData/refactoring/changeSignature/TypeAnnotationsAllAround_after.java
new file mode 100644
index 000000000000..7b21bd166fcb
--- /dev/null
+++ b/java/java-tests/testData/refactoring/changeSignature/TypeAnnotationsAllAround_after.java
@@ -0,0 +1,14 @@
+import java.lang.annotation.*;
+import java.util.List;
+
+@Target({ElementType.TYPE_USE})
+@interface TA { int value() default 0; }
+
+class C {
+ class Inner { }
+
+ //public @TA(0) List<@TA(1) C.@TA(1) Inner> m(@TA(2) int @TA(3) [] p1, @TA(4) List<@TA(5) Class<@TA(6) ?>> p2, @TA(7) String @TA(8) ... p3) throws @TA(42) IllegalArgumentException, @TA(43) IllegalStateException {
+ public @TA(0) List<@TA(1) Inner> m(@TA(2) int @TA(3) [] p1, @TA(4) List<@TA(5) Class<@TA(6) ?>> p2, @TA(7) String @TA(8) ... p3) {
+ return null;
+ }
+}
diff --git a/java/java-tests/testData/refactoring/inlineMethod/MethodInsideChangeIfStatement.java b/java/java-tests/testData/refactoring/inlineMethod/MethodInsideChangeIfStatement.java
new file mode 100644
index 000000000000..1df5d47a74ab
--- /dev/null
+++ b/java/java-tests/testData/refactoring/inlineMethod/MethodInsideChangeIfStatement.java
@@ -0,0 +1,26 @@
+import java.util.ArrayList;
+import java.util.List;
+
+class Test {
+ List<String> foo(String[] strs)
+ {
+ final List<String> result = new ArrayList<String>();
+ int start = -1;
+ for (int i = 0; i < strs.length; i++)
+ {
+ if (idx(i) == 42 && start == -1)
+ {
+ start = i;
+ } else if (idx(i) != 24 && start != -1)
+ {
+ result.add("".substring(id<caret>x(start)));
+ }
+ }
+ return result;
+ }
+
+ private static int idx(int i) {
+ return i;
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/inlineMethod/MethodInsideChangeIfStatement.java.after b/java/java-tests/testData/refactoring/inlineMethod/MethodInsideChangeIfStatement.java.after
new file mode 100644
index 000000000000..e43e7e849a44
--- /dev/null
+++ b/java/java-tests/testData/refactoring/inlineMethod/MethodInsideChangeIfStatement.java.after
@@ -0,0 +1,22 @@
+import java.util.ArrayList;
+import java.util.List;
+
+class Test {
+ List<String> foo(String[] strs)
+ {
+ final List<String> result = new ArrayList<String>();
+ int start = -1;
+ for (int i = 0; i < strs.length; i++)
+ {
+ if (i == 42 && start == -1)
+ {
+ start = i;
+ } else if (i != 24 && start != -1)
+ {
+ result.add("".substring(start));
+ }
+ }
+ return result;
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/inplaceIntroduceConstant/replaceAllInsideParenthesized.java b/java/java-tests/testData/refactoring/inplaceIntroduceConstant/replaceAllInsideParenthesized.java
new file mode 100644
index 000000000000..671fc5ab40b7
--- /dev/null
+++ b/java/java-tests/testData/refactoring/inplaceIntroduceConstant/replaceAllInsideParenthesized.java
@@ -0,0 +1,13 @@
+class Test {
+
+ Test foo(long l) {
+ return this;
+ }
+
+ {
+ Test t = new Test()
+ .foo(-(5<caret>L))
+ .foo(7L)
+ .foo(-(5L));
+ }
+}
diff --git a/java/java-tests/testData/refactoring/inplaceIntroduceConstant/replaceAllInsideParenthesized_after.java b/java/java-tests/testData/refactoring/inplaceIntroduceConstant/replaceAllInsideParenthesized_after.java
new file mode 100644
index 000000000000..a67368d5c5d3
--- /dev/null
+++ b/java/java-tests/testData/refactoring/inplaceIntroduceConstant/replaceAllInsideParenthesized_after.java
@@ -0,0 +1,15 @@
+class Test {
+
+ Test foo(long l) {
+ return this;
+ }
+
+ public static final long LONG = 5L;
+
+ {
+ Test t = new Test()
+ .foo(-LONG)
+ .foo(7L)
+ .foo(-LONG);
+ }
+}
diff --git a/java/java-tests/testData/refactoring/inplaceIntroduceParameter/localInsideAnonymous.java b/java/java-tests/testData/refactoring/inplaceIntroduceParameter/localInsideAnonymous.java
new file mode 100644
index 000000000000..932201e43ce5
--- /dev/null
+++ b/java/java-tests/testData/refactoring/inplaceIntroduceParameter/localInsideAnonymous.java
@@ -0,0 +1,18 @@
+class Abc {
+ void foo() {
+ final String name = "name";
+
+ new Runnable(){
+ @Override
+ public void run() {
+ foo();
+
+ }
+
+ private void foo() {
+ System.out.println(na<caret>me);
+ }
+ };
+ }
+}
+
diff --git a/java/java-tests/testData/refactoring/inplaceIntroduceParameter/localInsideAnonymous_after.java b/java/java-tests/testData/refactoring/inplaceIntroduceParameter/localInsideAnonymous_after.java
new file mode 100644
index 000000000000..172bbd19a3fd
--- /dev/null
+++ b/java/java-tests/testData/refactoring/inplaceIntroduceParameter/localInsideAnonymous_after.java
@@ -0,0 +1,18 @@
+class Abc {
+ void foo() {
+ final String name = "name";
+
+ new Runnable(){
+ @Override
+ public void run() {
+ foo(name);
+
+ }
+
+ private void foo(String name1) {
+ System.out.println(name1);
+ }
+ };
+ }
+}
+
diff --git a/java/java-tests/testData/refactoring/introduceVariable/LambdaExprNotAccepted.after.java b/java/java-tests/testData/refactoring/introduceVariable/LambdaExprNotAccepted.after.java
index a4b5330a289f..6e02ab00eb56 100644
--- a/java/java-tests/testData/refactoring/introduceVariable/LambdaExprNotAccepted.after.java
+++ b/java/java-tests/testData/refactoring/introduceVariable/LambdaExprNotAccepted.after.java
@@ -4,7 +4,7 @@ interface SAM<X> {
class Foo {
void test() {
- SAM<X> c = (i, j) -> "" + i + j;
+ SAM<Integer> c = (i, j) -> "" + i + j;
SAM<Integer> s3 = m(c);
}
<X> SAM<X> m(SAM<X> s) { return null; }
diff --git a/java/java-tests/testData/refactoring/invertBoolean/BooleanFieldWithoutInitializer.java b/java/java-tests/testData/refactoring/invertBoolean/BooleanFieldWithoutInitializer.java
new file mode 100644
index 000000000000..01d5a1db8fae
--- /dev/null
+++ b/java/java-tests/testData/refactoring/invertBoolean/BooleanFieldWithoutInitializer.java
@@ -0,0 +1,10 @@
+class Test {
+ private boolean notInitial<caret>ized;
+
+ public void foo() {
+ if (notInitialized) {
+ notInitialized = false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/invertBoolean/BooleanFieldWithoutInitializer_after.java b/java/java-tests/testData/refactoring/invertBoolean/BooleanFieldWithoutInitializer_after.java
new file mode 100644
index 000000000000..20b31fae0778
--- /dev/null
+++ b/java/java-tests/testData/refactoring/invertBoolean/BooleanFieldWithoutInitializer_after.java
@@ -0,0 +1,10 @@
+class Test {
+ private boolean notInitializedInverted = true;
+
+ public void foo() {
+ if (!notInitializedInverted) {
+ notInitializedInverted = true;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/methodDuplicates/SkipNonRelatedCalls.java b/java/java-tests/testData/refactoring/methodDuplicates/SkipNonRelatedCalls.java
new file mode 100644
index 000000000000..fbda8f3fe7a8
--- /dev/null
+++ b/java/java-tests/testData/refactoring/methodDuplicates/SkipNonRelatedCalls.java
@@ -0,0 +1,16 @@
+class CommonParent {
+ void foo() {}
+}
+
+public class A extends CommonParent {
+
+ private void <caret>f() {
+ foo();
+ }
+
+ private class B extends CommonParent {
+ void g() {
+ foo();
+ }
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/after/p/A.java b/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/after/p/A.java
new file mode 100644
index 000000000000..077abf465534
--- /dev/null
+++ b/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/after/p/A.java
@@ -0,0 +1,8 @@
+package p;
+
+class A {
+ public void test() {
+ B.foo();
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/after/p/B.java b/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/after/p/B.java
new file mode 100644
index 000000000000..218cf833b376
--- /dev/null
+++ b/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/after/p/B.java
@@ -0,0 +1,9 @@
+package p;
+
+class B {
+ private B() {
+ System.out.println("Constructor");
+ }
+
+ static void foo(){}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/before/p/A.java b/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/before/p/A.java
new file mode 100644
index 000000000000..8597534df69a
--- /dev/null
+++ b/java/java-tests/testData/refactoring/moveInner/constructorUtilClassVisibility/before/p/A.java
@@ -0,0 +1,15 @@
+package p;
+
+class A {
+ public void test() {
+ B.foo();
+ }
+
+ private class B {
+ private B() {
+ System.out.println("Constructor");
+ }
+
+ static void foo(){}
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/pullUp/NotFunctionalAnymore.java b/java/java-tests/testData/refactoring/pullUp/NotFunctionalAnymore.java
new file mode 100644
index 000000000000..df7683e00faf
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pullUp/NotFunctionalAnymore.java
@@ -0,0 +1,12 @@
+interface I {
+ void foo();
+}
+
+class IImpl implements I {
+ public void foo(){}
+ public void g<caret>et() {}
+
+ {
+ I i = () -> {};
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/pullUp/StillFunctional.java b/java/java-tests/testData/refactoring/pullUp/StillFunctional.java
new file mode 100644
index 000000000000..657a296a5b76
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pullUp/StillFunctional.java
@@ -0,0 +1,9 @@
+@FunctionalInterface
+interface I {
+ void foo();
+}
+
+class IImpl implements I {
+ public void foo(){}
+ public void g<caret>et() {}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/pullUp/StillFunctional_after.java b/java/java-tests/testData/refactoring/pullUp/StillFunctional_after.java
new file mode 100644
index 000000000000..d4380a3c082d
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pullUp/StillFunctional_after.java
@@ -0,0 +1,10 @@
+@FunctionalInterface
+interface I {
+ void foo();
+
+ default void get() {}
+}
+
+class IImpl implements I {
+ public void foo(){}
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/pushDown/FunctionalExpression.java b/java/java-tests/testData/refactoring/pushDown/FunctionalExpression.java
new file mode 100644
index 000000000000..36975cff7e06
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pushDown/FunctionalExpression.java
@@ -0,0 +1,12 @@
+interface Base {
+ default void foo() {
+ System.out.println("Hi there.");
+ }
+ void ba<caret>r();
+}
+
+class Test {
+ {
+ Base base = () -> {};
+ }
+}
diff --git a/java/java-tests/testData/refactoring/pushDown/FunctionalExpressionDefaultMethod.java b/java/java-tests/testData/refactoring/pushDown/FunctionalExpressionDefaultMethod.java
new file mode 100644
index 000000000000..f3a6b82b7e92
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pushDown/FunctionalExpressionDefaultMethod.java
@@ -0,0 +1,14 @@
+interface Base {
+ default void foo<caret>() {
+ System.out.println("Hi there.");
+ }
+ void bar();
+}
+
+class Test {
+ {
+ Base base = () -> {};
+ }
+}
+
+class Child implements Base {}
diff --git a/java/java-tests/testData/refactoring/pushDown/FunctionalExpressionDefaultMethod_after.java b/java/java-tests/testData/refactoring/pushDown/FunctionalExpressionDefaultMethod_after.java
new file mode 100644
index 000000000000..50fd08d85e97
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pushDown/FunctionalExpressionDefaultMethod_after.java
@@ -0,0 +1,15 @@
+interface Base {
+ void bar();
+}
+
+class Test {
+ {
+ Base base = () -> {};
+ }
+}
+
+class Child implements Base {
+ public void foo() {
+ System.out.println("Hi there.");
+}
+}
diff --git a/java/java-tests/testData/refactoring/pushDown/FunctionalExpression_after.java b/java/java-tests/testData/refactoring/pushDown/FunctionalExpression_after.java
new file mode 100644
index 000000000000..1ddc1ab5e51a
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pushDown/FunctionalExpression_after.java
@@ -0,0 +1,11 @@
+interface Base {
+ default void foo() {
+ System.out.println("Hi there.");
+ }
+}
+
+class Test {
+ {
+ Base base = () -> {};
+ }
+}
diff --git a/java/java-tests/testData/refactoring/pushDown/FunctionalInterface.java b/java/java-tests/testData/refactoring/pushDown/FunctionalInterface.java
new file mode 100644
index 000000000000..331ac896fb53
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pushDown/FunctionalInterface.java
@@ -0,0 +1,10 @@
+@FunctionalInterface
+interface Base {
+ default void foo() {
+ System.out.println("Hi there.");
+ }
+ void ba<caret>r();
+}
+
+class Child implements Base {
+}
diff --git a/java/java-tests/testData/refactoring/pushDown/FunctionalInterface_after.java b/java/java-tests/testData/refactoring/pushDown/FunctionalInterface_after.java
new file mode 100644
index 000000000000..e83436078bb7
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pushDown/FunctionalInterface_after.java
@@ -0,0 +1,10 @@
+@FunctionalInterface
+interface Base {
+ default void foo() {
+ System.out.println("Hi there.");
+ }
+}
+
+class Child implements Base {
+ public abstract void bar();
+}
diff --git a/java/java-tests/testData/refactoring/pushDown/InterfaceConstants.java b/java/java-tests/testData/refactoring/pushDown/InterfaceConstants.java
new file mode 100644
index 000000000000..d510a849def2
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pushDown/InterfaceConstants.java
@@ -0,0 +1,7 @@
+interface SimpleDialogPresenter {
+ int BUT<caret>TON_POSITIVE = 1;
+ int BUTTON_NEGATIVE = 2;
+ int BUTTON_NEUTRAL = 3;
+}
+
+class SimpleDialogPresenterImpl implements SimpleDialogPresenter {} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/pushDown/InterfaceConstants_after.java b/java/java-tests/testData/refactoring/pushDown/InterfaceConstants_after.java
new file mode 100644
index 000000000000..4a7044e4ae94
--- /dev/null
+++ b/java/java-tests/testData/refactoring/pushDown/InterfaceConstants_after.java
@@ -0,0 +1,8 @@
+interface SimpleDialogPresenter {
+ int BUTTON_NEGATIVE = 2;
+ int BUTTON_NEUTRAL = 3;
+}
+
+class SimpleDialogPresenterImpl implements SimpleDialogPresenter {
+ public static final int BUTTON_POSITIVE = 1;
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceDefaultMethod.java b/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceDefaultMethod.java
new file mode 100644
index 000000000000..e9c4a9126dbd
--- /dev/null
+++ b/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceDefaultMethod.java
@@ -0,0 +1,12 @@
+interface SAM {
+ default void fo<caret>o(int i){}
+ void bar(int i);
+}
+
+class Test {
+
+ {
+ SAM sam = (i) -> {};
+ }
+
+}
diff --git a/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceDefaultMethod_after.java b/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceDefaultMethod_after.java
new file mode 100644
index 000000000000..2530d0feeaaf
--- /dev/null
+++ b/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceDefaultMethod_after.java
@@ -0,0 +1,11 @@
+interface SAM {
+ void bar(int i);
+}
+
+class Test {
+
+ {
+ SAM sam = (i) -> {};
+ }
+
+}
diff --git a/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceMethod.java b/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceMethod.java
new file mode 100644
index 000000000000..2f1c097726d0
--- /dev/null
+++ b/java/java-tests/testData/refactoring/safeDelete/FunctionalInterfaceMethod.java
@@ -0,0 +1,11 @@
+interface SAM {
+ void fo<caret>o(int i);
+}
+
+class Test {
+
+ {
+ SAM sam = (i) -> {};
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/refactoring/safeDelete/ParameterFromFunctionalInterface.java b/java/java-tests/testData/refactoring/safeDelete/ParameterFromFunctionalInterface.java
new file mode 100644
index 000000000000..61f666d0d856
--- /dev/null
+++ b/java/java-tests/testData/refactoring/safeDelete/ParameterFromFunctionalInterface.java
@@ -0,0 +1,11 @@
+interface SAM {
+ void foo(int <caret>i);
+}
+
+class Test {
+
+ {
+ SAM sam = (i) -> {};
+ }
+
+} \ No newline at end of file
diff --git a/java/java-tests/testData/vfs/maven-toolchain-1.0.jar b/java/java-tests/testData/vfs/maven-toolchain-1.0.jar
new file mode 100644
index 000000000000..ace00cfb44fb
--- /dev/null
+++ b/java/java-tests/testData/vfs/maven-toolchain-1.0.jar
Binary files differ
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/JavaTypingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/JavaTypingTest.java
new file mode 100644
index 000000000000..8c3837fe1722
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/JavaTypingTest.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2000-2014 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.codeInsight;
+
+import com.intellij.testFramework.PlatformTestUtil;
+import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
+
+import java.io.File;
+
+public class JavaTypingTest extends LightPlatformCodeInsightFixtureTestCase {
+ public void testMulticaretIndentLBrace() {
+ doTest('{');
+ }
+
+ public void testMulticaretIndentRBrace() {
+ doTest('}');
+ }
+
+ public void testMulticaretSkipSemicolon() {
+ doTest(';');
+ }
+
+ public void testMulticaretSkipGt() {
+ doTest('>');
+ }
+
+ public void testMulticaretInsertGt() {
+ doTest('<');
+ }
+
+ public void testMulticaretSkipRParen() {
+ doTest(')');
+ }
+
+ public void testMulticaretInsertRParen() {
+ doTest('(');
+ }
+
+ public void testMulticaretSkipQuote() {
+ doTest('"');
+ }
+
+ public void testMulticaretInsertQuote() {
+ doTest('"');
+ }
+
+ private void doTest(char c) {
+ myFixture.configureByFile(getTestName(true) + "_before.java");
+ myFixture.type(c);
+ myFixture.checkResultByFile(getTestName(true) + "_after.java");
+ }
+
+ @Override
+ protected String getTestDataPath() {
+ return PlatformTestUtil.getCommunityPath().replace(File.separatorChar, '/') + "/java/java-tests/testData/codeInsight/typing";
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy
index e626fd42b37f..d789ce2ad957 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy
@@ -812,7 +812,7 @@ class Foo {
}
def l = lookup
edt {
- assert lookup.calculating
+ if (!lookup.calculating) println "testRestartWithVisibleLookup couldn't be faster than LongContributor"
myFixture.type 'c'
}
joinCommit {
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartType18CompletionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartType18CompletionTest.java
index a9811983947e..66051a9da390 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartType18CompletionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/SmartType18CompletionTest.java
@@ -37,7 +37,7 @@ public class SmartType18CompletionTest extends LightFixtureCompletionTestCase {
@NotNull
@Override
protected LightProjectDescriptor getProjectDescriptor() {
- return JAVA_LATEST;
+ return JAVA_8;
}
@@ -82,7 +82,21 @@ public class SmartType18CompletionTest extends LightFixtureCompletionTestCase {
}
public void testFilteredMethodReference() throws Exception {
- doTest();
+ doTest(false);
+ }
+
+ public void testFilteredStaticMethods() throws Exception {
+ doTest(false);
+ }
+
+ public void testFilterWrongParamsMethods() throws Exception {
+ doTest(false);
+ }
+
+ public void testFilterAmbiguity() throws Exception {
+ configureByFile("/" + getTestName(false) + ".java");
+ assertNotNull(myItems);
+ assertTrue(myItems.length == 0);
}
public void testNotAvailableInLambdaPositionAfterQualifier() throws Exception {
@@ -105,17 +119,22 @@ public class SmartType18CompletionTest extends LightFixtureCompletionTestCase {
}
public void testDiamondsInsideMethodCall() throws Exception {
- configureByFile("/" + getTestName(false) + ".java");
- checkResultByFile("/" + getTestName(false) + "-out.java");
+ doTest(false);
}
private void doTest() {
+ doTest(true);
+ }
+
+ private void doTest(boolean checkItems) {
configureByFile("/" + getTestName(false) + ".java");
- assertNotNull(myItems);
- assertTrue(myItems.length > 0);
- final Lookup lookup = getLookup();
- if (lookup != null) {
- selectItem(lookup.getCurrentItem(), Lookup.NORMAL_SELECT_CHAR);
+ if (checkItems) {
+ assertNotNull(myItems);
+ assertTrue(myItems.length > 0);
+ final Lookup lookup = getLookup();
+ if (lookup != null) {
+ selectItem(lookup.getCurrentItem(), Lookup.NORMAL_SELECT_CHAR);
+ }
}
checkResultByFile("/" + getTestName(false) + "-out.java");
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java
index 2ed84c6ab14d..f4e40bde2970 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java
@@ -238,6 +238,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testIDEA106964() throws Exception { doTest5(false);}
public void testIDEA107782() throws Exception { doTest5(false);}
public void testInheritedWithDifferentArgsInTypeParams() throws Exception { doTest5(false);}
+ public void testInheritedWithDifferentArgsInTypeParams1() throws Exception { doTest5(false);}
public void testIllegalForwardReferenceInTypeParameterDefinition() throws Exception { doTest5(false);}
public void testIDEA57877() throws Exception { doTest5(false);}
@@ -337,8 +338,13 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testIDEA119546() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
public void testIDEA118527() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
public void testIDEA120153() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
-
- public void testSuperWildcardWithBoundPromotion() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false);}
+ public void testIDEA120563() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
+ public void testIDEA121400() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
+ public void testIDEA123316() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
+ public void testIDEA123352() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
+ public void testIDEA123518() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
+ public void testIDEA64103() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
+ public void testIDEA123338() { doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
public void testJavaUtilCollections_NoVerify() throws Exception {
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImplementationsViewTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImplementationsViewTest.java
index 6e3b0ccdff82..d12e7201f11e 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImplementationsViewTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ImplementationsViewTest.java
@@ -2,12 +2,14 @@ package com.intellij.codeInsight.daemon;
import com.intellij.codeInsight.TargetElementUtilBase;
import com.intellij.codeInsight.hint.ImplementationViewComponent;
+import com.intellij.codeInsight.navigation.ClassImplementationsSearch;
+import com.intellij.codeInsight.navigation.MethodImplementationsSearch;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiMethod;
-import com.intellij.psi.search.searches.ClassInheritorsSearch;
import com.intellij.psi.search.searches.OverridingMethodsSearch;
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
+import com.intellij.util.CommonProcessors;
import org.junit.Assert;
import java.util.*;
@@ -80,6 +82,20 @@ public class ImplementationsViewTest extends LightCodeInsightFixtureTestCase {
" }", newText);
}
+ private static Collection<PsiElement> getClassImplementations(final PsiClass psiClass) {
+ CommonProcessors.CollectProcessor<PsiElement> processor = new CommonProcessors.CollectProcessor<PsiElement>();
+ ClassImplementationsSearch.processImplementations(psiClass, processor, psiClass.getUseScope());
+
+ return processor.getResults();
+ }
+
+ private static Collection<PsiElement> getMethodImplementations(final PsiMethod psiMethod) {
+ CommonProcessors.CollectProcessor<PsiElement> processor = new CommonProcessors.CollectProcessor<PsiElement>();
+ MethodImplementationsSearch.processImplementations( psiMethod, processor, psiMethod.getUseScope());
+
+ return processor.getResults();
+ }
+
public void testInnerClasses() {
myFixture.configureByText("a.java", "abstract class AF<caret>oo{\n" +
" abstract boolean aaa();\n" +
@@ -107,14 +123,17 @@ public class ImplementationsViewTest extends LightCodeInsightFixtureTestCase {
(PsiClass)TargetElementUtilBase.findTargetElement(myFixture.getEditor(), TargetElementUtilBase.getInstance().getAllAccepted());
assert psiClass != null;
- final Collection<PsiClass> classes = ClassInheritorsSearch.search(psiClass).findAll();
- List<PsiClass> all = new ArrayList<PsiClass>();
+ final Collection<PsiElement> classes = getClassImplementations(psiClass);
+ List<PsiElement> all = new ArrayList<PsiElement>();
all.add(psiClass);
all.addAll(classes);
final ImplementationViewComponent component =
new ImplementationViewComponent(all.toArray(new PsiElement[all.size()]), 0);
try {
final String[] visibleFiles = component.getVisibleFiles();
+ assertTrue(visibleFiles.length > 0);
+ assertEquals(visibleFiles[0], "a.java (AFoo)");
+ Arrays.sort(visibleFiles);
Assert.assertArrayEquals(Arrays.toString(visibleFiles),
new String[]{"a.java (AFoo)", "a.java (AFoo1 in AFoo)", "a.java (AFoo2 in AFoo)", "a.java (AFoo3 in AFoo)"}, visibleFiles);
}
@@ -123,6 +142,70 @@ public class ImplementationsViewTest extends LightCodeInsightFixtureTestCase {
}
}
+ public void testFunctionalInterface() {
+ myFixture.configureByText("a.java", "interface AF<caret>oo{\n" +
+ " boolean aaa();\n" +
+ "}\n" +
+ "class AFooImpl {\n" +
+ " {\n" +
+ " AFoo a = () -> {return false;};\n" +
+ " }\n" +
+ "}");
+ PsiClass psiClass =
+ (PsiClass)TargetElementUtilBase.findTargetElement(myFixture.getEditor(), TargetElementUtilBase.getInstance().getAllAccepted());
+
+ assert psiClass != null;
+ final Collection<PsiElement> classes = getClassImplementations(psiClass);
+ List<PsiElement> all = new ArrayList<PsiElement>();
+ all.add(psiClass);
+ all.addAll(classes);
+ final ImplementationViewComponent component = new ImplementationViewComponent(all.toArray(new PsiElement[all.size()]), 0);
+ assertContent(component, new String[]{"a.java (AFoo)", "a.java"});
+ }
+
+ public void testInterfaceMethodOfFunctionalInterface() {
+ myFixture.configureByText("a.java", "interface AFoo{\n" +
+ " boolean a<caret>aa();\n" +
+ "}\n" +
+ "class AFooImpl {\n" +
+ " {\n" +
+ " AFoo a = () -> {return false;};\n" +
+ " }\n" +
+ "}");
+ PsiMethod psiMethod =
+ (PsiMethod)TargetElementUtilBase.findTargetElement(myFixture.getEditor(), TargetElementUtilBase.getInstance().getAllAccepted());
+
+ assert psiMethod != null;
+ final Collection<PsiElement> methods = getMethodImplementations(psiMethod);
+ List<PsiElement> all = new ArrayList<PsiElement>();
+ all.add(psiMethod);
+ all.addAll(methods);
+ final ImplementationViewComponent component = new ImplementationViewComponent(all.toArray(new PsiElement[all.size()]), 0);
+ assertContent(component, new String[]{"a.java (AFoo)", "a.java"});
+ }
+
+ public void testDefaultMethodOfFunctionalInterface() {
+ myFixture.configureByText("a.java", "interface AFoo{\n" +
+ " default boolean a<caret>aa(){}\n" +
+ " boolean bbb();" +
+ "}\n" +
+ "class AFooImpl {\n" +
+ " {\n" +
+ " AFoo a = () -> {return false;};\n" +
+ " }\n" +
+ "}");
+ PsiMethod psiMethod =
+ (PsiMethod)TargetElementUtilBase.findTargetElement(myFixture.getEditor(), TargetElementUtilBase.getInstance().getAllAccepted());
+
+ assert psiMethod != null;
+ final Collection<PsiElement> methods = getMethodImplementations(psiMethod);
+ List<PsiElement> all = new ArrayList<PsiElement>();
+ all.add(psiMethod);
+ all.addAll(methods);
+ final ImplementationViewComponent component = new ImplementationViewComponent(all.toArray(new PsiElement[all.size()]), 0);
+ assertContent(component, new String[]{"a.java (AFoo)"});
+ }
+
public void testMethodsInInnerClasses() {
myFixture.configureByText("a.java", "abstract class AFoo{\n" +
" abstract boolean a<caret>aa();\n" +
@@ -165,10 +248,13 @@ public class ImplementationsViewTest extends LightCodeInsightFixtureTestCase {
});
final ImplementationViewComponent component =
new ImplementationViewComponent(all.toArray(new PsiElement[all.size()]), 0);
+ assertContent(component, new String[]{"a.java (AFoo)", "a.java (AFoo1 in AFoo)", "a.java (AFoo2 in AFoo)", "a.java (AFoo3 in AFoo)"});
+ }
+
+ public static void assertContent(ImplementationViewComponent component, String[] expects) {
try {
final String[] visibleFiles = component.getVisibleFiles();
- Assert.assertArrayEquals(Arrays.toString(visibleFiles),
- new String[]{"a.java (AFoo)", "a.java (AFoo1 in AFoo)", "a.java (AFoo2 in AFoo)", "a.java (AFoo3 in AFoo)"}, visibleFiles);
+ Assert.assertArrayEquals(Arrays.toString(visibleFiles), expects, visibleFiles);
}
finally {
component.removeNotify();
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java
index 7ebb887323de..8d2c8156dc18 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java
@@ -62,4 +62,8 @@ public class LightAdvHighlightingJdk6Test extends LightDaemonAnalyzerTestCase {
public void testUnhandledExceptionsValueOf() { doTest(true, false); }
public void testUnsupportedFeatures7() { doTest(false, false); }
public void testEnumInitializers() { doTest(false, false); }
+ public void testIDEA79251() { doTest(false, false); }
+ public void testAgentPremain() {
+ doTest(false, false);
+ }
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java
index ec160610ed7a..9f146154d067 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk7Test.java
@@ -165,6 +165,7 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
public void testUncheckedWarningIDEA26738() { doTest(true, false); }
public void testUncheckedWarningIDEA99536() { doTest(true, false); }
public void testEnclosingInstance() { doTest(false, false); }
+ public void testIDEA122519EnclosingInstance() { doTest(false, false); }
public void testWrongArgsAndUnknownTypeParams() { doTest(false, false); }
public void testAmbiguousMethodCallIDEA97983() { doTest(false, false); }
public void testAmbiguousMethodCallIDEA100314() { doTest(false, false); }
@@ -180,4 +181,5 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
public void testIDEA78916() { doTest(false, false); }
public void testIDEA111420() { doTest(false, false); }
public void testIDEA111450() { doTest(true, false); }
+ public void testExternalizable() { doTest(true, false); }
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/ChangeSignatureTouchLambdaTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/ChangeSignatureTouchLambdaTest.java
new file mode 100644
index 000000000000..e7c19bf19c3f
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/ChangeSignatureTouchLambdaTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.daemon.lambda;
+
+import com.intellij.psi.PsiType;
+import com.intellij.refactoring.BaseRefactoringProcessor;
+import com.intellij.refactoring.ChangeSignatureBaseTest;
+import com.intellij.refactoring.changeSignature.ParameterInfoImpl;
+import com.intellij.refactoring.changeSignature.ThrownExceptionInfo;
+
+public class ChangeSignatureTouchLambdaTest extends ChangeSignatureBaseTest {
+
+ public void testVariableDeclaration() {
+ doTestConflict();
+ }
+
+ public void testMethodArgument() throws Exception {
+ doTestConflict();
+ }
+
+ public void testDefaultMethodTouched() throws Exception {
+ doTest(null, null, null, new ParameterInfoImpl[] {new ParameterInfoImpl(-1, "b", PsiType.BOOLEAN)}, new ThrownExceptionInfo[0], false);
+ }
+
+ private void doTestConflict() {
+ try {
+ doTest(null, null, null, new ParameterInfoImpl[] {new ParameterInfoImpl(-1, "b", PsiType.BOOLEAN)}, new ThrownExceptionInfo[0], false);
+ fail("Conflict expected");
+ }
+ catch (BaseRefactoringProcessor.ConflictsInTestsException ignored) { }
+ }
+
+ @Override
+ protected String getRelativePath() {
+ return "/codeInsight/daemonCodeAnalyzer/lambda/changeSignature/";
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FindFunctionalInterfaceTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FindFunctionalInterfaceTest.java
new file mode 100644
index 000000000000..a6a75b7c061c
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/FindFunctionalInterfaceTest.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.daemon.lambda;
+
+import com.intellij.JavaTestUtil;
+import com.intellij.psi.*;
+import com.intellij.psi.search.searches.FunctionalExpressionSearch;
+import com.intellij.psi.search.searches.ReferencesSearch;
+import com.intellij.psi.util.PsiTreeUtil;
+import com.intellij.testFramework.LightProjectDescriptor;
+import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.Collection;
+
+public class FindFunctionalInterfaceTest extends LightCodeInsightFixtureTestCase {
+ public void testMethodArgument() throws Exception {
+ myFixture.configureByFile(getTestName(false) + ".java");
+ final PsiElement elementAtCaret = myFixture.getElementAtCaret();
+ assertNotNull(elementAtCaret);
+ final PsiClass psiClass = PsiTreeUtil.getParentOfType(elementAtCaret, PsiClass.class, false);
+ assertTrue(psiClass != null && psiClass.isInterface());
+ final Collection<PsiFunctionalExpression> expressions = FunctionalExpressionSearch.search(psiClass).findAll();
+ assertTrue(expressions.size() == 1);
+ final PsiFunctionalExpression next = expressions.iterator().next();
+ assertNotNull(next);
+ assertEquals("() -> {}", next.getText());
+ }
+
+ public void testFieldFromAnonymousClassScope() throws Exception {
+ myFixture.configureByFile(getTestName(false) + ".java");
+ final PsiElement elementAtCaret = myFixture.getElementAtCaret();
+ assertNotNull(elementAtCaret);
+ final PsiField field = PsiTreeUtil.getParentOfType(elementAtCaret, PsiField.class, false);
+ assertNotNull(field);
+ final PsiClass aClass = field.getContainingClass();
+ assertTrue(aClass instanceof PsiAnonymousClass);
+ final Collection<PsiReference> references = ReferencesSearch.search(field).findAll();
+ assertFalse(references.isEmpty());
+ assertEquals(1, references.size());
+ }
+
+ @Override
+ protected String getBasePath() {
+ return JavaTestUtil.getRelativeJavaTestDataPath() + "/codeInsight/daemonCodeAnalyzer/lambda/findUsages/";
+ }
+
+ @NotNull
+ @Override
+ protected LightProjectDescriptor getProjectDescriptor() {
+ return JAVA_8;
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java
index 161d864d0e17..8f9167d83a21 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java
@@ -743,6 +743,22 @@ public class GenericsHighlighting8Test extends LightDaemonAnalyzerTestCase {
doTest();
}
+ public void testIDEA122401() throws Exception {
+ doTest();
+ }
+
+ public void testCaptureInsideNestedCalls() throws Exception {
+ doTest();
+ }
+
+ public void testSuperWildcardWithBoundPromotion() { doTest();}
+
+ public void testErasure() throws Exception { doTest(); }
+
+ public void testWildcardBoundsCombination() throws Exception {
+ doTest();
+ }
+
private void doTest() {
doTest(false);
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java
index f43c937ca883..dfc6a7317641 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/Interface8MethodsHighlightingTest.java
@@ -15,10 +15,13 @@
*/
package com.intellij.codeInsight.daemon.lambda;
-import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
+import com.intellij.JavaTestUtil;
+import com.intellij.testFramework.LightProjectDescriptor;
+import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
-public class Interface8MethodsHighlightingTest extends LightDaemonAnalyzerTestCase {
+public class Interface8MethodsHighlightingTest extends LightCodeInsightFixtureTestCase {
@NonNls static final String BASE_PATH = "/codeInsight/daemonCodeAnalyzer/lambda/interfaceMethods";
public void testStaticMethod() { doTest(); }
@@ -34,15 +37,39 @@ public class Interface8MethodsHighlightingTest extends LightDaemonAnalyzerTestCa
public void testDefaultMethodOverrideEquivalentObject() { doTest(false, false); }
public void testStaticMethods() { doTest(false, false); }
public void testFinalStaticDefaultMethods() { doTest(false, false); }
+ public void testIDEA122720() { doTest(false, false); }
+ public void testIDEA123839() { doTest(false, false); }
public void testDefaultSupersInStaticContext() {
doTest(false, false);
}
+ public void testSuperProtectedCalls() throws Exception {
+ myFixture.addClass("package p; public class Foo {" +
+ " protected void foo(){}" +
+ "}");
+ doTest();
+ }
+
+ public void testIDEA120498() { doTest(false, false); }
+
private void doTest() {
doTest(false, false);
}
private void doTest(boolean checkWarnings, boolean checkInfos) {
- doTestNewInference(BASE_PATH + "/" + getTestName(false) + ".java", checkWarnings, checkInfos);
+ String filePath = BASE_PATH + "/" + getTestName(false) + ".java";
+ myFixture.configureByFile(filePath);
+ myFixture.checkHighlighting(checkWarnings, checkInfos, false);
+ }
+
+ @Override
+ protected String getTestDataPath() {
+ return JavaTestUtil.getJavaTestDataPath();
+ }
+
+ @NotNull
+ @Override
+ protected LightProjectDescriptor getProjectDescriptor() {
+ return JAVA_8;
}
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/LambdaHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/LambdaHighlightingTest.java
index cf8f43b5508b..aa18173074fa 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/LambdaHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/LambdaHighlightingTest.java
@@ -99,6 +99,7 @@ public class LambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
public void testFinalInitializer() {doTest();}
public void testBreakContinueInside() {doTest();}
public void testSameLambdaParamNames() {doTest();}
+ public void testIDEA123308() {doTest();}
private void doTest() {
doTest(false);
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MostSpecificResolutionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MostSpecificResolutionTest.java
index 5f4d01e4ab5e..a46036cb98d4 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MostSpecificResolutionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/MostSpecificResolutionTest.java
@@ -63,6 +63,18 @@ public class MostSpecificResolutionTest extends LightDaemonAnalyzerTestCase {
doTest();
}
+ public void testRelatedSAMErasures() throws Exception {
+ doTest();
+ }
+
+ public void testJDK8034223() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA123352() throws Exception {
+ doTest();
+ }
+
private void doTest() {
doTest(true);
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java
index a3c2b12515eb..5e21a82fa200 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java
@@ -130,6 +130,10 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
+ public void testIDEA119003() throws Exception {
+ doTest();
+ }
+
public void testIDEA117124() throws Exception {
doTest();
}
@@ -154,6 +158,46 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
+ public void testIDEA122074() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA122084() throws Exception {
+ doTest();
+ }
+
+ public void testAdditionalConstraintDependsOnNonMentionedVars() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA122616() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA122700() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA122406() throws Exception {
+ doTest();
+ }
+
+ public void testNestedCallsInsideLambdaReturnExpression() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA123731() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA123869() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA123848() throws Exception {
+ doTest();
+ }
+
private void doTest() {
doTest(false);
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java
index f18ae823c7ff..54ee87c1af8b 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java
@@ -197,6 +197,46 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
+ public void testIDEA122100() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA122509() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA122681() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA112191() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA122018comment() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA123223() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA123248() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA123366() throws Exception {
+ doTest();
+ }
+
+ public void testIDEA123366comment() throws Exception {
+ doTest();
+ }
+
+ public void testFromReferenceWithTypeArgs() throws Exception {
+ doTest();
+ }
+
private void doTest() {
doTest(false);
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/TypeInference18Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/TypeInference18Test.java
new file mode 100644
index 000000000000..8a9a451c14da
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/TypeInference18Test.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.daemon.lambda;
+
+import com.intellij.JavaTestUtil;
+import com.intellij.openapi.projectRoots.JavaSdkVersion;
+import com.intellij.openapi.projectRoots.Sdk;
+import com.intellij.openapi.roots.LanguageLevelProjectExtension;
+import com.intellij.pom.java.LanguageLevel;
+import com.intellij.psi.*;
+import com.intellij.testFramework.IdeaTestUtil;
+import com.intellij.testFramework.ResolveTestCase;
+
+public class TypeInference18Test extends ResolveTestCase {
+
+ public void testIDEA122406() throws Exception {
+ doTest();
+ }
+
+ private LanguageLevel myOldLanguageLevel;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ myOldLanguageLevel = LanguageLevelProjectExtension.getInstance(myJavaFacade.getProject()).getLanguageLevel();
+ LanguageLevelProjectExtension.getInstance(myJavaFacade.getProject()).setLanguageLevel(LanguageLevel.JDK_1_8);
+ IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable());
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ LanguageLevelProjectExtension.getInstance(myJavaFacade.getProject()).setLanguageLevel(myOldLanguageLevel);
+ super.tearDown();
+ }
+
+ private void doTest() throws Exception {
+ PsiReference ref = configureByFile("/codeInsight/daemonCodeAnalyzer/lambda/resolve/" + getTestName(false) + ".java");
+ assertNotNull(ref);
+ assertNotNull(ref.resolve());
+ }
+
+ @Override
+ protected Sdk getTestProjectJdk() {
+ return IdeaTestUtil.getMockJdk18();
+ }
+
+ @Override
+ protected String getTestDataPath() {
+ return JavaTestUtil.getJavaTestDataPath();
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/CreateMethodFromMethodReferenceFixTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/CreateMethodFromMethodReferenceFixTest.java
new file mode 100644
index 000000000000..6182f875086d
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/CreateMethodFromMethodReferenceFixTest.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.daemon.quickFix;
+
+public class CreateMethodFromMethodReferenceFixTest extends LightQuickFixParameterizedTestCase {
+ public void test() throws Exception { doAllTests(); }
+
+ @Override
+ protected String getBasePath() {
+ return "/codeInsight/daemonCodeAnalyzer/quickFix/createMethodFromMethodRef";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/EmptyIntentionInspectionQuickFixTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/EmptyIntentionInspectionQuickFixTest.java
index 579081a99cc5..50258fd8f302 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/EmptyIntentionInspectionQuickFixTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/EmptyIntentionInspectionQuickFixTest.java
@@ -5,6 +5,7 @@ import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.codeInspection.defUse.DefUseInspection;
+import com.intellij.codeInspection.ex.EditInspectionToolsSettingsAction;
import com.intellij.psi.JavaElementVisitor;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.PsiLiteralExpression;
@@ -88,7 +89,7 @@ public class EmptyIntentionInspectionQuickFixTest extends LightQuickFixTestCase
}
assertTrue(i < emptyActions.size());
for (; i < emptyActions.size(); i++) {
- if (emptyActions.get(i) instanceof EmptyIntentionAction) {
+ if (emptyActions.get(i) instanceof EditInspectionToolsSettingsAction) {
return;
}
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/Lambda2MethodReferenceInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/Lambda2MethodReferenceInspectionTest.java
index 2bbe041b8fbb..125aaf43ce44 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/Lambda2MethodReferenceInspectionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/Lambda2MethodReferenceInspectionTest.java
@@ -17,6 +17,8 @@ package com.intellij.codeInsight.daemon.quickFix;
import com.intellij.codeInspection.LambdaCanBeMethodReferenceInspection;
import com.intellij.codeInspection.LocalInspectionTool;
+import com.intellij.openapi.projectRoots.Sdk;
+import com.intellij.testFramework.IdeaTestUtil;
import org.jetbrains.annotations.NotNull;
@@ -36,4 +38,8 @@ public class Lambda2MethodReferenceInspectionTest extends LightQuickFixParameter
return "/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference";
}
+ @Override
+ protected Sdk getProjectJDK() {
+ return IdeaTestUtil.getMockJdk18();
+ }
} \ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/RedundantTypeArgsInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/RedundantTypeArgsInspectionTest.java
new file mode 100644
index 000000000000..67659c1af372
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/RedundantTypeArgsInspectionTest.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.daemon.quickFix;
+
+import com.intellij.codeInspection.LocalInspectionTool;
+import com.intellij.codeInspection.miscGenerics.RedundantTypeArgsInspection;
+import com.intellij.openapi.projectRoots.Sdk;
+import com.intellij.testFramework.IdeaTestUtil;
+import org.jetbrains.annotations.NotNull;
+
+
+public class RedundantTypeArgsInspectionTest extends LightQuickFixParameterizedTestCase {
+ @NotNull
+ @Override
+ protected LocalInspectionTool[] configureLocalInspectionTools() {
+ return new LocalInspectionTool[]{ new RedundantTypeArgsInspection()};
+ }
+
+ public void test() throws Exception { doAllTests(); }
+
+ @Override
+ protected String getBasePath() {
+ return "/codeInsight/daemonCodeAnalyzer/quickFix/redundantTypeArgs";
+ }
+
+ @Override
+ protected Sdk getProjectJDK() {
+ return IdeaTestUtil.getMockJdk18();
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/RemoveUnusedAssignmentTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/RemoveUnusedAssignmentTest.java
new file mode 100644
index 000000000000..a8816f832323
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/RemoveUnusedAssignmentTest.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.daemon.quickFix;
+
+import com.intellij.codeInspection.LocalInspectionTool;
+import com.intellij.codeInspection.defUse.DefUseInspection;
+import com.intellij.pom.java.LanguageLevel;
+import org.jetbrains.annotations.NotNull;
+
+public class RemoveUnusedAssignmentTest extends LightQuickFixTestCase {
+ public void test() throws Exception { doAllTests(); }
+
+ @NotNull
+ @Override
+ protected LocalInspectionTool[] configureLocalInspectionTools() {
+ return new LocalInspectionTool[] {new DefUseInspection()};
+ }
+
+ @Override
+ protected String getBasePath() {
+ return "/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment";
+ }
+
+ @Override
+ protected LanguageLevel getLanguageLevel() {
+ return LanguageLevel.JDK_1_5;
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/ReplaceWithConstantFixTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/ReplaceWithConstantFixTest.java
new file mode 100644
index 000000000000..f0b62013c924
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/quickFix/ReplaceWithConstantFixTest.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.daemon.quickFix;
+
+import com.intellij.codeInspection.LocalInspectionTool;
+import com.intellij.codeInspection.duplicateStringLiteral.DuplicateStringLiteralInspection;
+import org.jetbrains.annotations.NotNull;
+
+public class ReplaceWithConstantFixTest extends LightQuickFixParameterizedTestCase {
+ @NotNull
+ @Override
+ protected LocalInspectionTool[] configureLocalInspectionTools() {
+ return new LocalInspectionTool[]{new DuplicateStringLiteralInspection()};
+ }
+
+ public void test() throws Exception {
+ doAllTests();
+ }
+
+ @Override
+ protected String getBasePath() {
+ return "/codeInsight/daemonCodeAnalyzer/quickFix/replaceWithConstant";
+ }
+} \ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/JavaEnterInStringLiteralTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/JavaEnterInStringLiteralTest.java
new file mode 100644
index 000000000000..f8feec3aa778
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/JavaEnterInStringLiteralTest.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.editorActions;
+
+import com.intellij.lang.java.JavaLanguage;
+import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
+import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
+import com.intellij.testFramework.EditorTestUtil;
+import com.intellij.testFramework.LightCodeInsightTestCase;
+
+/**
+ * @author Rustam Vishnyakov
+ */
+public class JavaEnterInStringLiteralTest extends LightCodeInsightTestCase {
+ private static final String BASE_PATH = "/codeInsight/editorActions/stringLiteral/";
+
+ public void testEnter() {
+ doTest();
+ }
+
+ public void testEnterOpSignOnNextLine() {
+ CommonCodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject()).getCommonSettings(JavaLanguage.INSTANCE);
+ boolean opSignOnNextLine = settings.BINARY_OPERATION_SIGN_ON_NEXT_LINE;
+ try {
+ settings.BINARY_OPERATION_SIGN_ON_NEXT_LINE = true;
+ doTest();
+ }
+ finally {
+ settings.BINARY_OPERATION_SIGN_ON_NEXT_LINE = opSignOnNextLine;
+ }
+ }
+
+ private void doTest() {
+ String testName = getTestName(true);
+ configureByFile(BASE_PATH + testName + ".java");
+ EditorTestUtil.performTypingAction(getEditor(), '\n');
+ checkResultByFile(BASE_PATH + testName + "_after.java");
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/folding/JavaFoldingTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/folding/JavaFoldingTest.groovy
index b462263eeba3..ffe09fdfcbcb 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/folding/JavaFoldingTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/folding/JavaFoldingTest.groovy
@@ -29,6 +29,7 @@ import com.intellij.psi.JavaPsiFacade
import com.intellij.psi.PsiClass
import com.intellij.psi.PsiMethod
import com.intellij.psi.search.GlobalSearchScope
+import com.intellij.testFramework.LightProjectDescriptor
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
/**
@@ -41,6 +42,11 @@ public class JavaFoldingTest extends LightCodeInsightFixtureTestCase {
def JavaCodeFoldingSettingsImpl myFoldingStateToRestore
@Override
+ protected LightProjectDescriptor getProjectDescriptor() {
+ return JAVA_1_7
+ }
+
+ @Override
public void setUp() {
super.setUp()
myFoldingSettings = JavaCodeFoldingSettings.instance as JavaCodeFoldingSettingsImpl
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/generation/surroundWith/JavaSurroundWithTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/generation/surroundWith/JavaSurroundWithTest.java
index 6f317868b1df..60be917bde7c 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/generation/surroundWith/JavaSurroundWithTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/generation/surroundWith/JavaSurroundWithTest.java
@@ -145,6 +145,16 @@ public class JavaSurroundWithTest extends LightCodeInsightTestCase {
TemplateManagerImpl.setTemplateTesting(getProject(), getTestRootDisposable());
doTest(getTestName(false), new JavaWithNotSurrounder());
}
+
+ public void testSurroundExpressionWithElseIf() {
+ TemplateManagerImpl.setTemplateTesting(getProject(), getTestRootDisposable());
+ doTest(getTestName(false), new JavaWithIfExpressionSurrounder());
+ }
+
+ public void testSurroundExpressionWithElseIfElse() {
+ TemplateManagerImpl.setTemplateTesting(getProject(), getTestRootDisposable());
+ doTest(getTestName(false), new JavaWithIfElseExpressionSurrounder());
+ }
private void doTest(@NotNull String fileName, final Surrounder surrounder) {
configureByFile(BASE_PATH + fileName + ".java");
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerTest.groovy
index 02d52a54da24..6237f9ca6f30 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/highlighting/HighlightUsagesHandlerTest.groovy
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 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.
@@ -14,11 +14,10 @@
* limitations under the License.
*/
package com.intellij.codeInsight.highlighting
-
import com.intellij.JavaTestUtil
+import com.intellij.codeInsight.daemon.impl.HighlightInfoType
import com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPassFactory
import com.intellij.codeInspection.sillyAssignment.SillyAssignmentInspection
-import com.intellij.lang.annotation.HighlightSeverity
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
import org.jetbrains.annotations.NonNls
/**
@@ -233,7 +232,7 @@ class Bar {
try {
def infos = myFixture.doHighlighting()
//import highlighted twice: for each overloaded usage target
- assert infos.findAll { it.severity == HighlightSeverity.INFORMATION && myFixture.file.text.substring(it.startOffset, it.endOffset) == 'foo' }.size() == 3
+ assert infos.findAll { it.severity == HighlightInfoType.ELEMENT_UNDER_CARET_SEVERITY && myFixture.file.text.substring(it.startOffset, it.endOffset) == 'foo' }.size() == 3
}
finally {
IdentifierHighlighterPassFactory.ourTestingIdentifierHighlighting = false
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/intention/JoinDeclarationTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/intention/JoinDeclarationTest.java
new file mode 100644
index 000000000000..d0e1d9fe42fa
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/intention/JoinDeclarationTest.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.intention;
+
+import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
+
+public class JoinDeclarationTest extends LightQuickFixParameterizedTestCase {
+
+ @Override
+ protected String getBasePath() {
+ return "/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration";
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/intention/SplitDeclarationTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/intention/SplitDeclarationTest.java
index 50e46ab2385e..9d7693a9e1d8 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/intention/SplitDeclarationTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/intention/SplitDeclarationTest.java
@@ -16,9 +16,6 @@
package com.intellij.codeInsight.intention;
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
-import com.intellij.codeInsight.intention.impl.SplitIfAction;
-import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
-import com.intellij.testFramework.LightCodeInsightTestCase;
public class SplitDeclarationTest extends LightQuickFixParameterizedTestCase {
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy
index cef42e9ea06d..8f7efeea6049 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/template/LiveTemplateTest.groovy
@@ -35,6 +35,7 @@ import com.intellij.psi.codeStyle.CodeStyleSettingsManager
import com.intellij.psi.codeStyle.CommonCodeStyleSettings
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
import com.intellij.util.containers.ContainerUtil
+import com.intellij.util.ui.UIUtil
import org.jetbrains.annotations.NotNull
import static com.intellij.codeInsight.template.Template.Property.USE_STATIC_IMPORT_IF_POSSIBLE
@@ -80,6 +81,7 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
addTemplate(template, testRootDisposable)
manager.startTemplate(editor, (char)'\t');
+ UIUtil.dispatchAllInvocationEvents()
checkResultByText(expected);
}
@@ -110,6 +112,7 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
addTemplate(template, testRootDisposable)
startTemplate(templateName, templateGroup)
+ UIUtil.dispatchAllInvocationEvents()
if (firstDefaultValue.empty) myFixture.type("TestValue1")
myFixture.type("\t")
if (secondDefaultValue.empty) myFixture.type("TestValue2")
@@ -137,9 +140,8 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
final TemplateManager manager = TemplateManager.getInstance(getProject());
final Template template = manager.createTemplate("empty", "user", '$VAR$');
template.addVariable("VAR", "", "", false);
- final Editor editor = getEditor();
- manager.startTemplate(editor, template);
+ startTemplate(template);
checkResultByText("");
}
@@ -150,9 +152,8 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
final Template template = manager.createTemplate("empty", "user", '$VAR$$END$');
template.addVariable("VAR", "bar", "bar", true);
template.setToReformat(true);
- final Editor editor = getEditor();
- manager.startTemplate(editor, template);
+ startTemplate(template);
myFixture.type("foo");
checkResultByText("foo");
}
@@ -168,7 +169,7 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
' $END$\n' +
'foo()');
template.setToReformat(true);
- manager.startTemplate(getEditor(), template);
+ startTemplate(template);
checkResultByText("class C {\n" +
" bar() {\n" +
" foo()\n" +
@@ -196,7 +197,7 @@ public class LiveTemplateTest extends LightCodeInsightFixtureTestCase {
"frame.pack();");
template.setToShortenLongNames(false);
template.setToReformat(true);
- manager.startTemplate(getEditor(), template);
+ startTemplate(template);
checkResult();
}
@@ -210,7 +211,7 @@ class Foo {
final TemplateManager manager = TemplateManager.getInstance(getProject());
final Template template = manager.createTemplate("frm", "user", '$VAR$');
template.addVariable('VAR', new MacroCallNode(new CompleteMacro()), new EmptyNode(), true)
- manager.startTemplate(getEditor(), template);
+ startTemplate(template);
myFixture.type('fo\n')
myFixture.checkResult '''
class Foo {
@@ -231,7 +232,7 @@ class Foo {
final TemplateManager manager = TemplateManager.getInstance(getProject());
final Template template = manager.createTemplate("frm", "user", '$VAR$');
template.addVariable('VAR', new MacroCallNode(new CompleteMacro()), new EmptyNode(), true)
- manager.startTemplate(getEditor(), template);
+ startTemplate(template);
myFixture.type('fo\n')
myFixture.checkResult '''
class Foo {
@@ -253,7 +254,7 @@ class Foo {
final TemplateManager manager = TemplateManager.getInstance(getProject());
final Template template = manager.createTemplate("frm", "user", '$VAR$');
template.addVariable('VAR', new MacroCallNode(new ClassNameCompleteMacro()), new EmptyNode(), true)
- manager.startTemplate(getEditor(), template);
+ startTemplate(template);
assert !state.finished
assert 'Bar' in myFixture.lookupElementStrings
}
@@ -278,7 +279,12 @@ class Foo {
}
def startTemplate(String name, String group) {
- TemplateManager.getInstance(getProject()).startTemplate(getEditor(), TemplateSettings.getInstance().getTemplate(name, group));
+ startTemplate(TemplateSettings.getInstance().getTemplate(name, group));
+ }
+
+ def startTemplate(Template template) {
+ TemplateManager.getInstance(getProject()).startTemplate(getEditor(), template)
+ UIUtil.dispatchAllInvocationEvents()
}
private static <T extends TemplateContextType> T contextType(Class<T> clazz) {
@@ -533,7 +539,7 @@ class Foo {
template.addVariable("V3", "", "", true);
final Editor editor = getEditor();
- writeCommand { manager.startTemplate(editor, template) }
+ writeCommand { startTemplate(template) }
final TemplateState state = getState();
@@ -575,7 +581,7 @@ class Foo {
template.addVariable("V1", "", "", true);
template.addVariable("V2", "", '"239"', true);
- writeCommand { manager.startTemplate(editor, template) }
+ writeCommand { startTemplate(template) }
myFixture.checkResult '<caret> var = 239;'
@@ -596,7 +602,7 @@ class Foo {
addTemplate(template, testRootDisposable)
myFixture.type '\t'
- myFixture.checkResult 'class A { void f() { Stri "; } }'
+ myFixture.checkResult 'class A { void f() { Stri "; } }'
}
static void addTemplate(Template template, Disposable parentDisposable) {
@@ -659,7 +665,7 @@ class Foo {
template.addVariable('T', new MacroCallNode(new MethodReturnTypeMacro()), new EmptyNode(), false)
template.toReformat = true
- manager.startTemplate(getEditor(), template);
+ startTemplate(template);
assert myFixture.editor.document.text.contains('List<Map.Entry<String, Integer>> result;')
}
@@ -705,7 +711,7 @@ class Foo {
final Template template = manager.createTemplate("xxx", "user", 'foo $ARG$ bar $END$ goo $SELECTION$ after');
template.addVariable("ARG", "", "", true);
- manager.startTemplate(editor, template);
+ startTemplate(template);
myFixture.type('arg')
state.nextTab()
assert !state
@@ -731,7 +737,7 @@ class Foo {
final Template template = manager.createTemplate("xxx", "user", 'foo.Bar.someMethod($END$)');
template.setValue(USE_STATIC_IMPORT_IF_POSSIBLE, true);
- manager.startTemplate(editor, template);
+ startTemplate(template);
myFixture.checkResult """
import static foo.Bar.someMethod;
@@ -754,7 +760,7 @@ class Foo {
template.addVariable('B', macroCallNode, false)
myFixture.configureByText "a.txt", "<caret>"
- manager.startTemplate(editor, template);
+ startTemplate(template);
myFixture.type('-foo-bar_goo-')
state.nextTab()
assert !state
@@ -779,7 +785,7 @@ class Foo {
final Template template = manager.createTemplate("xxx", "user", 'foo.Bar.someMethod($END$)');
template.setValue(USE_STATIC_IMPORT_IF_POSSIBLE, true);
- manager.startTemplate(editor, template);
+ startTemplate(template);
myFixture.checkResult """import static foo.Bar.someMethod;
class Foo {
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java
index 39fd2fbd4f8c..9fa0063facd0 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/completion/TemplatesCompletionTest.java
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.template.postfix.completion;
import com.intellij.JavaTestUtil;
import com.intellij.codeInsight.completion.CompletionAutoPopupTestCase;
+import com.intellij.codeInsight.completion.CompletionType;
import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.lookup.impl.LookupImpl;
import com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor;
@@ -27,10 +28,18 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class TemplatesCompletionTest extends CompletionAutoPopupTestCase {
+ private boolean shotTemplatesInTestsOldValue;
@Override
- public void tearDown() throws Exception {
+ public void setUp() {
+ super.setUp();
+ shotTemplatesInTestsOldValue = LiveTemplateCompletionContributor.ourShowTemplatesInTests;
LiveTemplateCompletionContributor.ourShowTemplatesInTests = false;
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ LiveTemplateCompletionContributor.ourShowTemplatesInTests = shotTemplatesInTestsOldValue;
PostfixTemplatesSettings settings = PostfixTemplatesSettings.getInstance();
assertNotNull(settings);
@@ -95,6 +104,17 @@ public class TemplatesCompletionTest extends CompletionAutoPopupTestCase {
doAutoPopupTest("instanceof", null);
}
+ public void testDoNotShowTemplateInMultiCaretMode() {
+ doAutoPopupTest("instanceof", null);
+ }
+
+ public void testDoNotCompleteTemplateInMultiCaretMode() {
+ LiveTemplateCompletionContributor.ourShowTemplatesInTests = true;
+ configureByFile();
+ assertEmpty(myFixture.complete(CompletionType.BASIC));
+ checkResultByFile();
+ }
+
public void testShowTemplateOnDoubleLiteral() {
doAutoPopupTest("switch", SwitchStatementPostfixTemplate.class);
}
@@ -146,7 +166,7 @@ public class TemplatesCompletionTest extends CompletionAutoPopupTestCase {
public void testTabCompletionWithTemplatesInAutopopup() {
LiveTemplateCompletionContributor.ourShowTemplatesInTests = true;
-
+
configureByFile();
type(".");
myFixture.assertPreferredCompletionItems(0, "parents");
@@ -156,6 +176,12 @@ public class TemplatesCompletionTest extends CompletionAutoPopupTestCase {
checkResultByFile();
}
+ public void testShouldNotExpandInMultiCaretMode() {
+ configureByFile();
+ type(".if\t");
+ checkResultByFile();
+ }
+
@Override
protected String getBasePath() {
return JavaTestUtil.getRelativeJavaTestDataPath() + "/codeInsight/template/postfix/completion";
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/FormatPostfixTemplateTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/FormatPostfixTemplateTest.java
new file mode 100644
index 000000000000..fc336e077aa8
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/FormatPostfixTemplateTest.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.template.postfix.templates;
+
+import org.jetbrains.annotations.NotNull;
+
+public class FormatPostfixTemplateTest extends PostfixTemplateTestCase {
+ @NotNull
+ @Override
+ protected String getSuffix() { return "format"; }
+
+ public void testString() { doTest(); }
+ public void testNotString() { doTest(); }
+} \ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/NotNullPostfixTemplateTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/NotNullPostfixTemplateTest.java
index ca08b6867e6e..bbac7ff38532 100644
--- a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/NotNullPostfixTemplateTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/NotNullPostfixTemplateTest.java
@@ -17,9 +17,6 @@ package com.intellij.codeInsight.template.postfix.templates;
import org.jetbrains.annotations.NotNull;
-/**
- * @author ignatov
- */
public class NotNullPostfixTemplateTest extends PostfixTemplateTestCase {
@NotNull
@Override
@@ -29,4 +26,5 @@ public class NotNullPostfixTemplateTest extends PostfixTemplateTestCase {
public void testPrimitive() { doTest(); }
public void testNn() { doTest(); }
public void testSecondStatement() { doTest(); }
+ public void testElseStatement() { doTest(); }
} \ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/SoutPostfixTemplateTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/SoutPostfixTemplateTest.java
new file mode 100644
index 000000000000..d3bcc74d4684
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/SoutPostfixTemplateTest.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.template.postfix.templates;
+
+import org.jetbrains.annotations.NotNull;
+
+public class SoutPostfixTemplateTest extends PostfixTemplateTestCase {
+ @NotNull
+ @Override
+ protected String getSuffix() { return "sout"; }
+
+ public void testSimple() { doTest(); }
+ public void testVoid() { doTest(); }
+} \ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/TryPostfixTemplateTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/TryPostfixTemplateTest.java
new file mode 100644
index 000000000000..7183883cbe3f
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/codeInsight/template/postfix/templates/TryPostfixTemplateTest.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2000-2014 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.codeInsight.template.postfix.templates;
+
+import org.jetbrains.annotations.NotNull;
+
+
+public class TryPostfixTemplateTest extends PostfixTemplateTestCase {
+
+ @NotNull
+ @Override
+ protected String getSuffix() {
+ return "try";
+ }
+
+ public void testSimple() {
+ doTest();
+ }
+
+ public void testStatement() {
+ doTest();
+ }
+
+ public void testMultiStatement() {
+ doTest();
+ }
+
+ public void testNotStatement() {
+ doTest();
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java
index f636c11b37ab..af697933ae69 100644
--- a/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInspection/DataFlowInspectionTest.java
@@ -274,6 +274,7 @@ public class DataFlowInspectionTest extends LightCodeInsightFixtureTestCase {
public void testContractWithNullable() { doTest(); }
public void testContractPreservesUnknownNullability() { doTest(); }
public void testContractSeveralClauses() { doTest(); }
+ public void testContractVarargs() { doTest(); }
public void testBoxingImpliesNotNull() { doTest(); }
public void testLargeIntegersAreNotEqualWhenBoxed() { doTest(); }
@@ -308,6 +309,10 @@ public class DataFlowInspectionTest extends LightCodeInsightFixtureTestCase {
public void testUnusedCallDoesNotMakeUnknown() { doTest(); }
public void testGettersAndPureNoFlushing() { doTest(); }
+
+ public void testNotNullAfterDereference() { doTest(); }
+
+ public void testNullableBoolean() { doTest(); }
public void testSameComparisonTwice() { doTest(); }
@@ -320,6 +325,12 @@ public class DataFlowInspectionTest extends LightCodeInsightFixtureTestCase {
doTest();
}
+
+ public void testTrueOrEqualsSomething() {
+ doTest();
+ myFixture.launchAction(myFixture.findSingleIntention("Remove redundant assignment"));
+ myFixture.checkResultByFile(getTestName(false) + "_after.java");
+ }
public void _testNullCheckBeforeInstanceof() { doTest(); } // http://youtrack.jetbrains.com/issue/IDEA-113220
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/JavaAPIUsagesInspectionTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/JavaAPIUsagesInspectionTest.java
index 8414b7fdd0fd..18b96564cc61 100644
--- a/java/java-tests/testSrc/com/intellij/codeInspection/JavaAPIUsagesInspectionTest.java
+++ b/java/java-tests/testSrc/com/intellij/codeInspection/JavaAPIUsagesInspectionTest.java
@@ -23,17 +23,7 @@ package com.intellij.codeInspection;
import com.intellij.JavaTestUtil;
import com.intellij.codeInspection.ex.LocalInspectionToolWrapper;
import com.intellij.codeInspection.java15api.Java15APIUsageInspection;
-import com.intellij.openapi.roots.ContentIterator;
-import com.intellij.openapi.util.Comparing;
-import com.intellij.openapi.vfs.JarFileSystem;
-import com.intellij.openapi.vfs.VfsUtilCore;
-import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.openapi.vfs.VirtualFileFilter;
import com.intellij.pom.java.LanguageLevel;
-import com.intellij.psi.*;
-import com.intellij.psi.javadoc.PsiDocComment;
-import com.intellij.psi.javadoc.PsiDocTag;
-import com.intellij.psi.javadoc.PsiDocTagValue;
import com.intellij.testFramework.IdeaTestUtil;
import com.intellij.testFramework.InspectionTestCase;
@@ -70,9 +60,10 @@ public class JavaAPIUsagesInspectionTest extends InspectionTestCase {
});
}
- @SuppressWarnings("UnusedDeclaration")
- public void _testCollectSinceApiUsages() {
- final String version = "1.7";
+ //generate apiXXX.txt
+ /*
+ public void testCollectSinceApiUsages() {
+ final String version = "1.8";
final ContentIterator contentIterator = new ContentIterator() {
@Override
public boolean processFile(VirtualFile fileOrDir) {
@@ -102,15 +93,15 @@ public class JavaAPIUsagesInspectionTest extends InspectionTestCase {
return true;
}
};
- final VirtualFile srcFile = JarFileSystem.getInstance().findFileByPath("c:/program files/java/jdk1.6.0_12/src.zip!/");
+ final VirtualFile srcFile = JarFileSystem.getInstance().findFileByPath("c:/tools/jdk8/src.zip!/");
assert srcFile != null;
VfsUtilCore.iterateChildrenRecursively(srcFile, VirtualFileFilter.ALL, contentIterator);
}
-/*
+
@Override
protected void setUpJdk() {
Module[] modules = ModuleManager.getInstance(myProject).getModules();
- final Sdk sdk = JavaSdk.getInstance().createJdk("1.7", "c:/program files (x86)/java/jdk1.7.0_09/", false);
+ final Sdk sdk = JavaSdk.getInstance().createJdk("1.8", "c:/tools/jdk8/", false);
for (Module module : modules) {
ModuleRootModificationUtil.setModuleSdk(module, sdk);
}
diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/RedundantCast15Test.java b/java/java-tests/testSrc/com/intellij/codeInspection/RedundantCast15Test.java
index ca3065d27d14..4dd29648e055 100644
--- a/java/java-tests/testSrc/com/intellij/codeInspection/RedundantCast15Test.java
+++ b/java/java-tests/testSrc/com/intellij/codeInspection/RedundantCast15Test.java
@@ -57,6 +57,11 @@ public class RedundantCast15Test extends InspectionTestCase {
doTest();
}
+ public void testBoxingTopCast() throws Exception {
+ IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_7, getModule(), getTestRootDisposable());
+ doTest();
+ }
+
public void testIgnore() throws Exception {
final RedundantCastInspection castInspection = new RedundantCastInspection();
castInspection.IGNORE_ANNOTATED_METHODS = true;
diff --git a/java/java-tests/testSrc/com/intellij/execution/BaseConfigurationTestCase.java b/java/java-tests/testSrc/com/intellij/execution/BaseConfigurationTestCase.java
index 9092e2551a8d..9a88daac74eb 100644
--- a/java/java-tests/testSrc/com/intellij/execution/BaseConfigurationTestCase.java
+++ b/java/java-tests/testSrc/com/intellij/execution/BaseConfigurationTestCase.java
@@ -32,6 +32,7 @@ import com.intellij.openapi.module.StdModuleTypes;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.roots.ModuleRootModificationUtil;
+import com.intellij.openapi.util.Computable;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.JavaPsiFacade;
@@ -96,20 +97,21 @@ public abstract class BaseConfigurationTestCase extends IdeaTestCase {
return module;
}
- private Module createTempModule() throws IOException {
+ private Module createTempModule() {
return createTempModule(myTempFiles, myProject);
}
+ @NotNull
public static Module createTempModule(TempFiles tempFiles, final Project project) {
final String tempPath = tempFiles.createTempPath();
- final Module[] module = new Module[1];
- ApplicationManager.getApplication().runWriteAction(new Runnable() {
+ return ApplicationManager.getApplication().runWriteAction(new Computable<Module>() {
@Override
- public void run() {
- module[0] = ModuleManager.getInstance(project).newModule(tempPath, StdModuleTypes.JAVA.getId());
+ public Module compute() {
+ Module result = ModuleManager.getInstance(project).newModule(tempPath, StdModuleTypes.JAVA.getId());
+ project.save();
+ return result;
}
});
- return module[0];
}
protected static VirtualFile findFile(String path) {
diff --git a/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java b/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java
index b0bc587fd406..86d79fb41e10 100644
--- a/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java
+++ b/java/java-tests/testSrc/com/intellij/find/FindManagerTest.java
@@ -28,7 +28,7 @@ import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.fileTypes.FileTypes;
-import com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl;
+import com.intellij.openapi.fileTypes.PlainTextFileType;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.util.ProperTextRange;
import com.intellij.openapi.util.io.FileUtil;
@@ -302,8 +302,7 @@ public class FindManagerTest extends DaemonAnalyzerTestCase {
}.execute().getResultObject();
assertNull(FileDocumentManager.getInstance().getCachedDocument(custom));
- assertEquals(FileTypes.UNKNOWN, custom.getFileType());
- assertFalse(FileTypeManagerImpl.isFileTypeDetectedFromContent(custom));
+ assertEquals(PlainTextFileType.INSTANCE, custom.getFileType());
FindModel findModel = new FindModel();
findModel.setWholeWordsOnly(true);
@@ -318,7 +317,6 @@ public class FindManagerTest extends DaemonAnalyzerTestCase {
// and we should get the same with text loaded
assertNotNull(FileDocumentManager.getInstance().getDocument(custom));
assertEquals(FileTypes.PLAIN_TEXT, custom.getFileType());
- assertTrue(FileTypeManagerImpl.isFileTypeDetectedFromContent(custom));
assertSize(2, findUsages(findModel));
}
@@ -539,6 +537,22 @@ public class FindManagerTest extends DaemonAnalyzerTestCase {
}
}
+ public void testFindInDirectoryOutsideProject() throws Exception {
+ final TempDirTestFixture tempDirFixture = new TempDirTestFixtureImpl();
+ tempDirFixture.setUp();
+ try {
+ tempDirFixture.createFile("a.txt", "foo bar foo");
+ FindModel findModel = FindManagerTestUtils.configureFindModel("foo");
+ findModel.setWholeWordsOnly(true);
+ findModel.setProjectScope(false);
+ findModel.setDirectoryName(tempDirFixture.getFile("").getPath());
+ assertSize(2, findUsages(findModel));
+ }
+ finally {
+ tempDirFixture.tearDown();
+ }
+ }
+
public void testFindInJavaDocs() {
FindModel findModel = FindManagerTestUtils.configureFindModel("done");
String text = "/** done done done */";
diff --git a/java/java-tests/testSrc/com/intellij/ide/fileTemplates/SimpleTemplatesTest.java b/java/java-tests/testSrc/com/intellij/ide/fileTemplates/SimpleTemplatesTest.java
new file mode 100644
index 000000000000..193dd7d6be4a
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/ide/fileTemplates/SimpleTemplatesTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2000-2014 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.fileTemplates;
+
+import com.intellij.ide.fileTemplates.impl.CustomFileTemplate;
+import com.intellij.testFramework.IdeaTestCase;
+import com.intellij.testFramework.LightPlatformTestCase;
+
+import java.util.Properties;
+
+/**
+ * @author Dmitry Avdeev
+ */
+public class SimpleTemplatesTest extends LightPlatformTestCase {
+
+ @SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
+ public SimpleTemplatesTest() {
+ IdeaTestCase.initPlatformPrefix();
+ }
+
+ public void testConditional() throws Exception {
+ CustomFileTemplate template = new CustomFileTemplate("foo", "bar");
+ template.setText("#set($flag = \"$!IJ_BASE_PACKAGE\" != \"\")\n" +
+ "<option name=\"MAIN_CLASS_NAME\" value=\"$IJ_BASE_PACKAGE#if($flag).#{end}Main\" />"
+ );
+ Properties attributes = new Properties();
+ attributes.setProperty("IJ_BASE_PACKAGE", "");
+ assertEquals("<option name=\"MAIN_CLASS_NAME\" value=\"Main\" />", template.getText(attributes));
+ attributes.setProperty("IJ_BASE_PACKAGE", "foo.bar");
+ assertEquals("<option name=\"MAIN_CLASS_NAME\" value=\"foo.bar.Main\" />", template.getText(attributes));
+ }
+
+ public void testInline() throws Exception {
+ CustomFileTemplate template = new CustomFileTemplate("foo", "bar");
+ template.setText("$IJ_BASE_PACKAGE.replace(\".\", \"/\")");
+ Properties attributes = new Properties();
+ attributes.setProperty("IJ_BASE_PACKAGE", "foo.bar");
+ assertEquals("foo/bar", template.getText(attributes));
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/index/IndexTest.java b/java/java-tests/testSrc/com/intellij/index/IndexTest.java
index 7770c5e4a1f9..4fcb40296a48 100644
--- a/java/java-tests/testSrc/com/intellij/index/IndexTest.java
+++ b/java/java-tests/testSrc/com/intellij/index/IndexTest.java
@@ -18,7 +18,7 @@ package com.intellij.index;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager;
-import com.intellij.openapi.fileTypes.UnknownFileType;
+import com.intellij.openapi.fileTypes.PlainTextFileType;
import com.intellij.openapi.util.Factory;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.VfsUtil;
@@ -276,8 +276,8 @@ public class IndexTest extends IdeaTestCase {
final VirtualFile vFile = createChildData(dir, "Foo.test");
VfsUtil.saveText(vFile, "Foo");
- assertEquals(UnknownFileType.INSTANCE, vFile.getFileType());
- assertEmpty(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
+ assertEquals(PlainTextFileType.INSTANCE, vFile.getFileType());
+ assertOneElement(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
final Document document = FileDocumentManager.getInstance().getDocument(vFile);
//todo should file type be changed silently without events?
@@ -287,22 +287,22 @@ public class IndexTest extends IdeaTestCase {
assertInstanceOf(file, PsiPlainTextFile.class);
assertEquals("Foo", file.getText());
- assertEmpty(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
+ assertOneElement(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
WriteCommandAction.runWriteCommandAction(myProject, new Runnable() {
@Override
public void run() {
document.insertString(0, " ");
assertEquals("Foo", file.getText());
- assertEmpty(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
+ assertOneElement(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
FileDocumentManager.getInstance().saveDocument(document);
assertEquals("Foo", file.getText());
- assertEmpty(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
+ assertOneElement(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
PsiDocumentManager.getInstance(myProject).commitAllDocuments();
assertEquals(" Foo", file.getText());
- assertEmpty(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
+ assertOneElement(PsiSearchHelper.SERVICE.getInstance(myProject).findFilesWithPlainTextWords("Foo"));
}
});
diff --git a/java/java-tests/testSrc/com/intellij/index/StringIndex.java b/java/java-tests/testSrc/com/intellij/index/StringIndex.java
index 7d2dd108ceac..0b5d48dcfa91 100644
--- a/java/java-tests/testSrc/com/intellij/index/StringIndex.java
+++ b/java/java-tests/testSrc/com/intellij/index/StringIndex.java
@@ -59,7 +59,7 @@ public class StringIndex {
private static class Indexer implements DataIndexer<String, String, PathContentPair> {
@Override
@NotNull
- public Map<String,String> map(final PathContentPair inputData) {
+ public Map<String,String> map(@NotNull final PathContentPair inputData) {
final Map<String,String> _map = new HashMap<String, String>();
final StringBuilder builder = new StringBuilder();
final String content = inputData.content;
diff --git a/java/java-tests/testSrc/com/intellij/navigation/GotoImplementationTest.java b/java/java-tests/testSrc/com/intellij/navigation/GotoImplementationTest.java
index da1de928d58a..cba853e5a66f 100644
--- a/java/java-tests/testSrc/com/intellij/navigation/GotoImplementationTest.java
+++ b/java/java-tests/testSrc/com/intellij/navigation/GotoImplementationTest.java
@@ -12,6 +12,7 @@ import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiClass;
+import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiMethod;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.util.CommonProcessors;
@@ -26,8 +27,8 @@ import java.util.Set;
*/
public class GotoImplementationTest extends CodeInsightTestCase {
- private static Collection<PsiClass> getClassImplementations(final PsiClass psiClass) {
- CommonProcessors.CollectProcessor<PsiClass> processor = new CommonProcessors.CollectProcessor<PsiClass>();
+ private static Collection<PsiElement> getClassImplementations(final PsiClass psiClass) {
+ CommonProcessors.CollectProcessor<PsiElement> processor = new CommonProcessors.CollectProcessor<PsiElement>();
ClassImplementationsSearch.processImplementations(psiClass, processor, psiClass.getUseScope());
return processor.getResults();
@@ -64,29 +65,31 @@ public class GotoImplementationTest extends CodeInsightTestCase {
PsiClass test1 = myJavaFacade.findClass("com.test.TestI", moduleScope);
PsiClass test2 = myJavaFacade.findClass("com.test.TestI", GlobalSearchScope.moduleScope(module2));
PsiClass test3 = myJavaFacade.findClass("com.test.TestI", GlobalSearchScope.moduleScope(module3));
- HashSet<PsiClass> expectedImpls1 = new HashSet<PsiClass>(Arrays.asList(
+ HashSet<PsiElement> expectedImpls1 = new HashSet<PsiElement>(Arrays.asList(
myJavaFacade.findClass("com.test.TestIImpl1", moduleScope),
myJavaFacade.findClass("com.test.TestIImpl2", moduleScope)
));
- assertEquals(expectedImpls1, new HashSet<PsiClass>(getClassImplementations(test1)));
+ assertEquals(expectedImpls1, new HashSet<PsiElement>(getClassImplementations(test1)));
PsiMethod psiMethod = test1.findMethodsByName("test", false)[0];
- Set<PsiMethod> expectedMethodImpl1 = new HashSet<PsiMethod>(Arrays.asList(
+ Set<PsiElement> expectedMethodImpl1 = new HashSet<PsiElement>(Arrays.asList(
myJavaFacade.findClass("com.test.TestIImpl1", moduleScope).findMethodsByName("test",false)[0],
myJavaFacade.findClass("com.test.TestIImpl2", moduleScope).findMethodsByName("test",false)[0]
));
- assertEquals(expectedMethodImpl1, new HashSet<PsiMethod>(Arrays.asList(MethodImplementationsSearch.getMethodImplementations(psiMethod, moduleScope))));
+ CommonProcessors.CollectProcessor<PsiElement> processor = new CommonProcessors.CollectProcessor<PsiElement>();
+ MethodImplementationsSearch.processImplementations(psiMethod, processor, moduleScope);
+ assertEquals(expectedMethodImpl1, new HashSet<PsiElement>(processor.getResults()));
- HashSet<PsiClass> expectedImpls2 = new HashSet<PsiClass>(Arrays.asList(
+ HashSet<PsiElement> expectedImpls2 = new HashSet<PsiElement>(Arrays.asList(
myJavaFacade.findClass("com.test.TestIImpl1", GlobalSearchScope.moduleScope(module2)),
myJavaFacade.findClass("com.test.TestIImpl3", GlobalSearchScope.moduleScope(module2))
));
- assertEquals(expectedImpls2, new HashSet<PsiClass>(getClassImplementations(test2)));
+ assertEquals(expectedImpls2, new HashSet<PsiElement>(getClassImplementations(test2)));
- HashSet<PsiClass> expectedImpls3 = new HashSet<PsiClass>(Arrays.asList(
+ HashSet<PsiElement> expectedImpls3 = new HashSet<PsiElement>(Arrays.asList(
myJavaFacade.findClass("com.test.TestIImpl1", GlobalSearchScope.moduleScope(module3))
));
- assertEquals(expectedImpls3, new HashSet<PsiClass>(getClassImplementations(test3)));
+ assertEquals(expectedImpls3, new HashSet<PsiElement>(getClassImplementations(test3)));
}
diff --git a/java/java-tests/testSrc/com/intellij/openapi/editor/impl/JavaFileEditorManagerTest.java b/java/java-tests/testSrc/com/intellij/openapi/editor/impl/JavaFileEditorManagerTest.java
index 2a985b873ee3..47735323ad42 100644
--- a/java/java-tests/testSrc/com/intellij/openapi/editor/impl/JavaFileEditorManagerTest.java
+++ b/java/java-tests/testSrc/com/intellij/openapi/editor/impl/JavaFileEditorManagerTest.java
@@ -15,7 +15,7 @@
*/
package com.intellij.openapi.editor.impl;
-import com.intellij.openapi.fileEditor.FileEditorManagerTestCase;
+import com.intellij.testFramework.FileEditorManagerTestCase;
import com.intellij.testFramework.PlatformTestUtil;
import org.jdom.JDOMException;
diff --git a/java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java b/java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java
index 23334b6810a7..cf6f11e1b981 100644
--- a/java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java
+++ b/java/java-tests/testSrc/com/intellij/openapi/roots/impl/DirectoryIndexTest.java
@@ -20,6 +20,7 @@ import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.fileTypes.FileTypeManager;
import com.intellij.openapi.fileTypes.ex.FileTypeManagerEx;
+import com.intellij.openapi.module.ModifiableModuleModel;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.module.StdModuleTypes;
@@ -31,6 +32,7 @@ import com.intellij.openapi.vfs.*;
import com.intellij.testFramework.IdeaTestCase;
import com.intellij.testFramework.PlatformTestCase;
import com.intellij.testFramework.PsiTestUtil;
+import gnu.trove.THashSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.java.JavaResourceRootType;
@@ -39,10 +41,7 @@ import org.jetbrains.jps.model.module.JpsModuleSourceRootType;
import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
import static java.util.Collections.singletonList;
@@ -330,9 +329,10 @@ public class DirectoryIndexTest extends IdeaTestCase {
}
public void testChangeIgnoreList() throws Exception {
- myModule1Dir.createChildDirectory(this, "newDir");
-
+ VirtualFile newDir = myModule1Dir.createChildDirectory(this, "newDir");
+
myIndex.checkConsistency();
+ checkInfoNotNull(newDir);
final FileTypeManagerEx fileTypeManager = (FileTypeManagerEx)FileTypeManager.getInstance();
final String list = fileTypeManager.getIgnoredFilesList();
@@ -344,8 +344,8 @@ public class DirectoryIndexTest extends IdeaTestCase {
fileTypeManager.setIgnoredFilesList(list1);
}
});
-
myIndex.checkConsistency();
+ checkInfoNull(newDir);
}
finally {
ApplicationManager.getApplication().runWriteAction(new Runnable() {
@@ -354,6 +354,7 @@ public class DirectoryIndexTest extends IdeaTestCase {
fileTypeManager.setIgnoredFilesList(list);
}
});
+ checkInfoNotNull(newDir);
}
}
@@ -375,6 +376,45 @@ public class DirectoryIndexTest extends IdeaTestCase {
myIndex.checkConsistency();
}
+ public void testModuleUnderIgnoredDir() throws IOException {
+ final VirtualFile ignored = myRootVFile.createChildDirectory(this, "RCS");
+ assertTrue(FileTypeManager.getInstance().isFileIgnored(ignored));
+ final VirtualFile module4 = ignored.createChildDirectory(this, "module4");
+ assertFalse(FileTypeManager.getInstance().isFileIgnored(module4));
+
+ new WriteCommandAction.Simple(getProject()) {
+ @Override
+ protected void run() throws Throwable {
+ ModuleManager moduleManager = ModuleManager.getInstance(myProject);
+ Module module = moduleManager.newModule(myRootVFile.getPath() + "/newModule.iml", StdModuleTypes.JAVA.getId());
+ PsiTestUtil.addContentRoot(module, module4);
+ checkInfoNull(ignored);
+ checkInfo(module4, module, false, false, null, null);
+ }
+ }.execute().throwException();
+
+ }
+
+ public void testModuleInIgnoredDir() throws IOException {
+ final VirtualFile ignored = myRootVFile.createChildDirectory(this, "RCS");
+ assertTrue(FileTypeManager.getInstance().isFileIgnored(ignored));
+
+ new WriteCommandAction.Simple(getProject()) {
+ @Override
+ protected void run() throws Throwable {
+ ModuleManager moduleManager = ModuleManager.getInstance(myProject);
+ ModifiableModuleModel model = moduleManager.getModifiableModel();
+ model.disposeModule(myModule);
+ model.disposeModule(myModule2);
+ model.disposeModule(myModule3);
+ model.commit();
+ Module module = moduleManager.newModule(myRootVFile.getPath() + "/newModule.iml", StdModuleTypes.JAVA.getId());
+ PsiTestUtil.addContentRoot(module, ignored);
+ checkInfo(ignored, module, false, false, null, null);
+ }
+ }.execute().throwException();
+ }
+
public void testExcludedDirsInLibraries() {
ProjectFileIndex index = ProjectRootManager.getInstance(myProject).getFileIndex();
assertFalse(index.isInLibraryClasses(myExcludedLibClsDir));
@@ -678,6 +718,203 @@ public class DirectoryIndexTest extends IdeaTestCase {
assertFalse(myIndex.isProjectExcludeRoot(projectOutputUnderContent));
}
+ public void testFileContentAndSourceRoots() throws IOException {
+ ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
+
+ VirtualFile fileRoot = myRootVFile.createChildData(this, "fileRoot.txt");
+ VirtualFile fileSourceRoot = myRootVFile.createChildData(this, "fileSourceRoot.txt");
+ VirtualFile fileTestSourceRoot = myRootVFile.createChildData(this, "fileTestSourceRoot.txt");
+
+ checkInfoNull(fileRoot);
+ assertFalse(fileIndex.isInContent(fileRoot));
+ assertIteratedContent(fileIndex, null, Arrays.asList(fileRoot, fileSourceRoot, fileTestSourceRoot));
+
+ ContentEntry contentEntry = PsiTestUtil.addContentRoot(myModule, fileRoot);
+ assertSame(fileRoot, contentEntry.getFile());
+ checkInfo(fileRoot, myModule, false, false, "", null);
+ assertTrue(fileIndex.isInContent(fileRoot));
+ assertFalse(fileIndex.isInSource(fileRoot));
+
+ PsiTestUtil.addContentRoot(myModule, fileSourceRoot);
+ PsiTestUtil.addSourceRoot(myModule, fileSourceRoot);
+ checkInfo(fileSourceRoot, myModule, false, false, "", JavaSourceRootType.SOURCE, myModule);
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertTrue(fileIndex.isInSource(fileSourceRoot));
+
+ PsiTestUtil.addContentRoot(myModule, fileTestSourceRoot);
+ PsiTestUtil.addSourceRoot(myModule, fileTestSourceRoot, true);
+ checkInfo(fileTestSourceRoot, myModule, false, false, "", JavaSourceRootType.TEST_SOURCE, myModule);
+ assertTrue(fileIndex.isInContent(fileTestSourceRoot));
+ assertTrue(fileIndex.isInSource(fileTestSourceRoot));
+
+ assertIteratedContent(fileIndex, Arrays.asList(fileRoot, fileSourceRoot, fileTestSourceRoot), null);
+
+ // removing file source root
+ PsiTestUtil.removeSourceRoot(myModule, fileTestSourceRoot);
+ checkInfo(fileTestSourceRoot, myModule, false, false, "", null);
+ assertTrue(fileIndex.isInContent(fileTestSourceRoot));
+ assertFalse(fileIndex.isInSource(fileTestSourceRoot));
+ assertIteratedContent(fileIndex, Arrays.asList(fileRoot, fileSourceRoot, fileTestSourceRoot), null);
+
+ // removing file content root
+ PsiTestUtil.removeContentEntry(myModule, contentEntry);
+ checkInfoNull(fileRoot);
+ assertFalse(fileIndex.isInContent(fileRoot));
+ assertFalse(fileIndex.isInSource(fileRoot));
+ assertIteratedContent(fileIndex, Arrays.asList(fileSourceRoot, fileTestSourceRoot), Arrays.asList(fileRoot));
+ }
+
+ private void assertIteratedContent(ProjectFileIndex fileIndex,
+ @Nullable List<VirtualFile> contains,
+ @Nullable List<VirtualFile> doesntContain) {
+ final Set<VirtualFile> collected = new THashSet<VirtualFile>();
+ fileIndex.iterateContent(new ContentIterator() {
+ @Override
+ public boolean processFile(VirtualFile fileOrDir) {
+ collected.add(fileOrDir);
+ return true;
+ }
+ });
+ if (contains != null) assertContainsElements(collected, contains);
+ if (doesntContain != null) assertDoesntContain(collected, doesntContain);
+ }
+
+ public void testFileSourceRootsUnderDirContentRoot() throws IOException {
+ ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
+
+ VirtualFile fileSourceRoot = myModule1Dir.createChildData(this, "fileSourceRoot.txt");
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertFalse(fileIndex.isInSource(fileSourceRoot));
+ checkInfoNull(fileSourceRoot);
+
+ PsiTestUtil.addSourceRoot(myModule, fileSourceRoot);
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertTrue(fileIndex.isInSource(fileSourceRoot));
+ checkInfo(fileSourceRoot, myModule, false, false, "", JavaSourceRootType.SOURCE, myModule);
+
+ // removing file source root
+ PsiTestUtil.removeSourceRoot(myModule, fileSourceRoot);
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertFalse(fileIndex.isInSource(fileSourceRoot));
+ checkInfoNull(fileSourceRoot);
+ }
+
+ public void testFileModuleExcludeRootUnderDirectoryRoot() throws IOException {
+ ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
+
+ VirtualFile fileExcludeRoot = mySrcDir1.createChildData(this, "fileExcludeRoot.txt");
+ assertTrue(fileIndex.isInContent(fileExcludeRoot));
+ assertTrue(fileIndex.isInSource(fileExcludeRoot));
+ checkInfoNull(fileExcludeRoot);
+ assertIteratedContent(fileIndex, Arrays.asList(fileExcludeRoot), null);
+
+ PsiTestUtil.addExcludedRoot(myModule, fileExcludeRoot);
+ assertFalse(fileIndex.isInContent(fileExcludeRoot));
+ assertFalse(fileIndex.isInSource(fileExcludeRoot));
+ checkInfoNull(fileExcludeRoot);
+ assertIteratedContent(fileIndex, null, Arrays.asList(fileExcludeRoot));
+
+ // removing file exclude root
+ PsiTestUtil.removeExcludedRoot(myModule, fileExcludeRoot);
+ assertTrue(fileIndex.isInContent(fileExcludeRoot));
+ assertTrue(fileIndex.isInSource(fileExcludeRoot));
+ checkInfoNull(fileExcludeRoot);
+ assertIteratedContent(fileIndex, Arrays.asList(fileExcludeRoot), null);
+ }
+
+ public void testFileModuleExcludeRootUnderFileRoot() throws IOException {
+ ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
+
+ VirtualFile fileRoot = myRootVFile.createChildData(this, "fileRoot.txt");
+ PsiTestUtil.addContentRoot(myModule, fileRoot);
+ checkInfo(fileRoot, myModule, false, false, "", null);
+ assertTrue(fileIndex.isInContent(fileRoot));
+ assertIteratedContent(fileIndex, Arrays.asList(fileRoot), null);
+
+ PsiTestUtil.addExcludedRoot(myModule, fileRoot);
+ assertFalse(fileIndex.isInContent(fileRoot));
+ checkInfoNull(fileRoot);
+ assertIteratedContent(fileIndex, null, Arrays.asList(fileRoot));
+
+ // removing file exclude root
+ PsiTestUtil.removeExcludedRoot(myModule, fileRoot);
+ checkInfo(fileRoot, myModule, false, false, "", null);
+ assertTrue(fileIndex.isInContent(fileRoot));
+ assertIteratedContent(fileIndex, Arrays.asList(fileRoot), null);
+ }
+
+ public void testFileLibraryInsideFolderLibrary() throws IOException {
+ VirtualFile file = myLibSrcDir.createChildData(this, "empty.txt");
+ ModuleRootModificationUtil.addModuleLibrary(myModule2, "lib2",
+ Collections.<String>emptyList(), singletonList(file.getUrl()),
+ Collections.<String>emptyList(), DependencyScope.COMPILE, true);
+
+ // same for the dir and for the file
+ checkInfo(file, myModule, false, true, "", null, myModule2, myModule3);
+ checkInfo(myLibSrcDir, myModule, false, true, "", null, myModule2, myModule3);
+ }
+
+ public void testFileContentRootsModifications() throws IOException {
+ ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
+
+ VirtualFile temp = myRootVFile.createChildDirectory(this, "temp");
+
+ VirtualFile fileSourceRoot = myRootVFile.createChildData(this, "fileSourceRoot.txt");
+ checkInfoNull(fileSourceRoot);
+
+ PsiTestUtil.addContentRoot(myModule, fileSourceRoot);
+ PsiTestUtil.addSourceRoot(myModule, fileSourceRoot);
+ checkInfo(fileSourceRoot, myModule, false, false, "", JavaSourceRootType.SOURCE, myModule);
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertTrue(fileIndex.isInSource(fileSourceRoot));
+
+ // delete and recreate
+ fileSourceRoot.delete(this);
+ checkInfoNull(fileSourceRoot);
+ assertFalse(fileIndex.isInContent(fileSourceRoot));
+ assertFalse(fileIndex.isInSource(fileSourceRoot));
+ fileSourceRoot = myRootVFile.createChildData(this, "fileSourceRoot.txt");
+ checkInfo(fileSourceRoot, myModule, false, false, "", JavaSourceRootType.SOURCE, myModule);
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertTrue(fileIndex.isInSource(fileSourceRoot));
+
+ // delete and move from another dir
+ fileSourceRoot.delete(this);
+ checkInfoNull(fileSourceRoot);
+ assertFalse(fileIndex.isInContent(fileSourceRoot));
+ assertFalse(fileIndex.isInSource(fileSourceRoot));
+ fileSourceRoot = temp.createChildData(this, "fileSourceRoot.txt");
+ checkInfoNull(fileSourceRoot);
+ fileSourceRoot.move(this, myRootVFile);
+ checkInfo(fileSourceRoot, myModule, false, false, "", JavaSourceRootType.SOURCE, myModule);
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertTrue(fileIndex.isInSource(fileSourceRoot));
+
+ // delete and copy from another dir
+ fileSourceRoot.delete(this);
+ checkInfoNull(fileSourceRoot);
+ assertFalse(fileIndex.isInContent(fileSourceRoot));
+ assertFalse(fileIndex.isInSource(fileSourceRoot));
+ fileSourceRoot = temp.createChildData(this, "fileSourceRoot.txt");
+ checkInfoNull(fileSourceRoot);
+ fileSourceRoot = fileSourceRoot.copy(this, myRootVFile, "fileSourceRoot.txt");
+ checkInfo(fileSourceRoot, myModule, false, false, "", JavaSourceRootType.SOURCE, myModule);
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertTrue(fileIndex.isInSource(fileSourceRoot));
+
+ // delete and rename from another file
+ fileSourceRoot.delete(this);
+ checkInfoNull(fileSourceRoot);
+ assertFalse(fileIndex.isInContent(fileSourceRoot));
+ assertFalse(fileIndex.isInSource(fileSourceRoot));
+ fileSourceRoot = myRootVFile.createChildData(this, "temp_file.txt");
+ checkInfoNull(fileSourceRoot);
+ fileSourceRoot.rename(this, "fileSourceRoot.txt");
+ checkInfo(fileSourceRoot, myModule, false, false, "", JavaSourceRootType.SOURCE, myModule);
+ assertTrue(fileIndex.isInContent(fileSourceRoot));
+ assertTrue(fileIndex.isInSource(fileSourceRoot));
+ }
+
private void checkInfo(VirtualFile dir,
@Nullable Module module,
boolean isInLibrary,
@@ -688,11 +925,11 @@ public class DirectoryIndexTest extends IdeaTestCase {
DirectoryInfo info = checkInfoNotNull(dir);
assertEquals(module, info.getModule());
if (moduleSourceRootType != null) {
- assertTrue(info.isInModuleSource());
+ assertTrue("isInModuleSource", info.isInModuleSource());
assertEquals(moduleSourceRootType, myIndex.getSourceRootType(info));
}
else {
- assertFalse(info.isInModuleSource());
+ assertFalse("isInModuleSource", info.isInModuleSource());
}
assertEquals(isInLibrary, info.hasLibraryClassRoot());
assertEquals(isInLibrarySource, info.isInLibrarySource());
@@ -725,12 +962,4 @@ public class DirectoryIndexTest extends IdeaTestCase {
assertOrderedEquals(actualDirs, expectedDirs);
}
- public void testFileLibraryInsideFolderLibrary() throws IOException {
- VirtualFile file = myLibSrcDir.createChildData(this, "empty.txt");
- ModuleRootModificationUtil.addModuleLibrary(myModule2, "lib2",
- Collections.<String>emptyList(), singletonList(file.getUrl()),
- Collections.<String>emptyList(), DependencyScope.COMPILE, true);
- checkInfo(file, null, false, true, "", null, myModule2, myModule3);
-
- }
}
diff --git a/java/java-tests/testSrc/com/intellij/openapi/vfs/JarFileSystemTest.java b/java/java-tests/testSrc/com/intellij/openapi/vfs/JarFileSystemTest.java
deleted file mode 100644
index d1154eff0bfa..000000000000
--- a/java/java-tests/testSrc/com/intellij/openapi/vfs/JarFileSystemTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2000-2013 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.openapi.vfs;
-
-import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.projectRoots.Sdk;
-import com.intellij.openapi.roots.ModuleRootManager;
-import com.intellij.openapi.util.Ref;
-import com.intellij.openapi.util.io.IoTestUtil;
-import com.intellij.openapi.vfs.newvfs.BulkFileListener;
-import com.intellij.openapi.vfs.newvfs.events.VFileContentChangeEvent;
-import com.intellij.openapi.vfs.newvfs.events.VFileEvent;
-import com.intellij.testFramework.IdeaTestCase;
-import org.jetbrains.annotations.NotNull;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-
-import static com.intellij.testFramework.PlatformTestUtil.assertPathsEqual;
-
-public class JarFileSystemTest extends IdeaTestCase {
- public void testFindFile() throws IOException {
- String rtJarPath = getJdkRtPath("src.zip");
-
- VirtualFile jarRoot = findByPath(rtJarPath + JarFileSystem.JAR_SEPARATOR);
- assertTrue(jarRoot.isDirectory());
-
- VirtualFile file2 = findByPath(rtJarPath + JarFileSystem.JAR_SEPARATOR + "java");
- assertTrue(file2.isDirectory());
-
- VirtualFile file3 = jarRoot.findChild("java");
- assertEquals(file2, file3);
-
- VirtualFile file4 = findByPath(rtJarPath + JarFileSystem.JAR_SEPARATOR + "java/lang/Object.java");
- assertTrue(!file4.isDirectory());
-
- byte[] bytes = file4.contentsToByteArray();
- assertNotNull(bytes);
- assertTrue(bytes.length > 10);
- }
-
- public void testMetaInf() {
- String rtJarPath = getJdkRtPath("jre/lib/rt.jar");
-
- VirtualFile jarRoot = findByPath(rtJarPath + JarFileSystem.JAR_SEPARATOR);
- assertTrue(jarRoot.isDirectory());
-
- VirtualFile metaInf = jarRoot.findChild("META-INF");
- assertNotNull(metaInf);
-
- VirtualFile[] children = metaInf.getChildren();
- assertEquals(1, children.length);
- }
-
- public void testJarRefresh() throws IOException {
- File jar = IoTestUtil.createTestJar();
- assertTrue(jar.setLastModified(jar.lastModified() - 1000));
- VirtualFile vFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(jar);
- assertNotNull(vFile);
-
- final VirtualFile entry = findByPath(jar.getPath() + JarFileSystem.JAR_SEPARATOR + "entry.txt");
- assertContent(entry, "test");
-
- final Ref<Boolean> updated = Ref.create(false);
- ApplicationManager.getApplication().getMessageBus().connect(myTestRootDisposable).subscribe(
- VirtualFileManager.VFS_CHANGES,
- new BulkFileListener.Adapter() {
- @Override
- public void before(@NotNull List<? extends VFileEvent> events) {
- for (VFileEvent event : events) {
- if (event instanceof VFileContentChangeEvent && entry.equals(event.getFile())) {
- updated.set(true);
- break;
- }
- }
- }
- }
- );
-
- IoTestUtil.writeEntry(jar, "entry.txt", "update");
- vFile.refresh(false, false);
-
- assertTrue(updated.get());
- assertTrue(entry.isValid());
- assertContent(entry, "update");
- }
-
- private String getJdkRtPath(String relativePath) {
- Sdk jdk = ModuleRootManager.getInstance(myModule).getSdk();
- assertNotNull(jdk);
- VirtualFile jdkHome = jdk.getHomeDirectory();
- assertNotNull(jdkHome);
- return jdkHome.getPath() + "/" + relativePath;
- }
-
- private static VirtualFile findByPath(String path) {
- VirtualFile file = JarFileSystem.getInstance().findFileByPath(path);
- assertNotNull(file);
- assertPathsEqual(path, file.getPath());
- return file;
- }
-
- private static void assertContent(VirtualFile file, String expected) throws IOException {
- String content = new String(file.contentsToByteArray());
- assertEquals(expected, content);
- }
-}
diff --git a/java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java b/java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java
index 7523e5b2dbe0..4ac4bfb055e1 100644
--- a/java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java
+++ b/java/java-tests/testSrc/com/intellij/psi/ClsMirrorBuildingTest.java
@@ -18,8 +18,10 @@ package com.intellij.psi;
import com.intellij.JavaTestUtil;
import com.intellij.ide.highlighter.JavaFileType;
import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.openapi.vfs.JarFileSystem;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.openapi.vfs.VirtualFileSystem;
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
import com.intellij.psi.impl.compiled.ClsFileImpl;
@@ -52,7 +54,7 @@ public class ClsMirrorBuildingTest extends LightIdeaTestCase {
public void testLocalClass() { doTest(); }
public void testBounds() { doTest(); }
- public void testTextPsiMismatch() throws Exception {
+ public void testTextPsiMismatch() {
CommonCodeStyleSettings.IndentOptions options =
CodeStyleSettingsManager.getInstance(getProject()).getCurrentSettings().getIndentOptions(JavaFileType.INSTANCE);
int indent = options.INDENT_SIZE;
@@ -65,22 +67,31 @@ public class ClsMirrorBuildingTest extends LightIdeaTestCase {
}
}
+ public void testJdk8Class() {
+ String testDir = JavaTestUtil.getJavaTestDataPath();
+ String clsPath = testDir + "/../../mockJDK-1.8/jre/lib/rt.jar!/java/lang/Class.class";
+ String txtPath = testDir + "/psi/cls/mirror/" + "Class.txt";
+ doTest(clsPath, txtPath);
+ }
+
private void doTest() {
doTest(getTestName(false));
}
private static void doTest(String name) {
String testDir = JavaTestUtil.getJavaTestDataPath() + "/psi/cls/mirror/";
+ doTest(testDir + "pkg/" + name + ".class", testDir + name + ".txt");
+ }
- String clsPath = testDir + "pkg/" + name + ".class";
- VirtualFile vFile = LocalFileSystem.getInstance().findFileByPath(clsPath);
+ private static void doTest(String clsPath, String txtPath) {
+ VirtualFileSystem fs = clsPath.contains("!/") ? JarFileSystem.getInstance() : LocalFileSystem.getInstance();
+ VirtualFile vFile = fs.findFileByPath(clsPath);
assertNotNull(clsPath, vFile);
PsiFile clsFile = getPsiManager().findFile(vFile);
assertNotNull(vFile.getPath(), clsFile);
String expected;
try {
- String txtPath = testDir + name + ".txt";
expected = StringUtil.trimTrailing(PlatformTestUtil.loadFileText(txtPath));
}
catch (IOException e) {
diff --git a/java/java-tests/testSrc/com/intellij/psi/ClsRepositoryUseTest.java b/java/java-tests/testSrc/com/intellij/psi/ClsRepositoryUseTest.java
index 504838c9c437..709eb8893d04 100644
--- a/java/java-tests/testSrc/com/intellij/psi/ClsRepositoryUseTest.java
+++ b/java/java-tests/testSrc/com/intellij/psi/ClsRepositoryUseTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 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.
@@ -18,7 +18,6 @@ package com.intellij.psi;
import com.intellij.ide.highlighter.JavaFileType;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ex.PathManagerEx;
-import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.roots.ModuleRootModificationUtil;
import com.intellij.openapi.roots.OrderRootType;
import com.intellij.openapi.util.io.FileUtil;
@@ -37,9 +36,8 @@ import java.io.File;
@PlatformTestCase.WrapInCommand
public class ClsRepositoryUseTest extends PsiTestCase {
- private static final Logger LOG = Logger.getInstance("#com.intellij.psi.ClsRepositoryUseTest");
-
private static final String TEST_ROOT = PathManagerEx.getTestDataPath() + "/psi/repositoryUse/cls";
+
private GlobalSearchScope RESOLVE_SCOPE;
@Override
@@ -50,15 +48,9 @@ public class ClsRepositoryUseTest extends PsiTestCase {
new Runnable() {
@Override
public void run() {
- try {
- VirtualFile vDir = getRootFile();
- PsiTestUtil.removeAllRoots(myModule, IdeaTestUtil.getMockJdk17());
- addLibraryToRoots(vDir, OrderRootType.CLASSES);
-// PsiTestUtil.addSourceContentToRoots(myProject, vDir);
- }
- catch (Exception e) {
- LOG.error(e);
- }
+ VirtualFile vDir = getRootFile();
+ PsiTestUtil.removeAllRoots(myModule, IdeaTestUtil.getMockJdk17());
+ addLibraryToRoots(vDir, OrderRootType.CLASSES);
}
}
);
@@ -76,28 +68,21 @@ public class ClsRepositoryUseTest extends PsiTestCase {
final File classes = createTempDir("classes", false);
final File com = new File(classes, "com");
- //noinspection ResultOfMethodCallIgnored
- com.mkdir();
+ FileUtil.ensureExists(com);
File dataPath = new File(PathManagerEx.getTestDataPath() + "/psi/cls");
final File target = new File(com, "TestClass.class");
FileUtil.copy(new File(dataPath, "1/TestClass.class"), target);
- //noinspection ResultOfMethodCallIgnored
- target.setLastModified(System.currentTimeMillis());
+ assertTrue(target.setLastModified(System.currentTimeMillis()));
ApplicationManager.getApplication().runWriteAction(
new Runnable() {
@Override
public void run() {
- try {
- VirtualFile vDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(classes);
- assertNotNull(vDir);
- addLibraryToRoots(vDir, OrderRootType.CLASSES);
- }
- catch (Exception e) {
- LOG.error(e);
- }
+ VirtualFile vDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(classes);
+ assertNotNull(vDir);
+ addLibraryToRoots(vDir, OrderRootType.CLASSES);
}
}
);
@@ -123,20 +108,14 @@ public class ClsRepositoryUseTest extends PsiTestCase {
assertEquals("method1", psiClass.getMethods()[1].getName());
FileUtil.copy(new File(dataPath, "2/TestClass.class"), target);
- //noinspection ResultOfMethodCallIgnored
- target.setLastModified(System.currentTimeMillis() + 5000);
+ assertTrue(target.setLastModified(System.currentTimeMillis() + 5000));
assert vFile != null;
ApplicationManager.getApplication().runWriteAction(
new Runnable() {
@Override
public void run() {
- try {
- vFile.refresh(false, false);
- }
- catch (Exception e) {
- LOG.error(e);
- }
+ vFile.refresh(false, false);
}
}
);
@@ -375,7 +354,6 @@ public class ClsRepositoryUseTest extends PsiTestCase {
assertEquals("void", type1.getText());
assertTrue(type1.getType() instanceof PsiPrimitiveType);
- assertTrue(!(type1.getType() instanceof PsiArrayType));
PsiMethod method3 = aClass.getMethods()[2];
assertNull(method3.getReturnType());
@@ -400,7 +378,7 @@ public class ClsRepositoryUseTest extends PsiTestCase {
PsiField field = aClass.getFields()[1];
PsiType type = field.getType();
- LOG.assertTrue(type instanceof PsiArrayType);
+ assertTrue(type instanceof PsiArrayType);
PsiType componentType = ((PsiArrayType)type).getComponentType();
assertTrue(componentType.equalsToText(CommonClassNames.JAVA_LANG_OBJECT));
@@ -497,7 +475,6 @@ public class ClsRepositoryUseTest extends PsiTestCase {
assertEquals("java.io.IOException", refs[1].getCanonicalText());
}
-
public void testParameters() throws Exception {
PsiClass aClass = myJavaFacade.findClass("pack.MyClass", GlobalSearchScope.allScope(myProject));
assert aClass != null;
@@ -524,7 +501,11 @@ public class ClsRepositoryUseTest extends PsiTestCase {
PsiClass objectClass = myJavaFacade.findClasses(CommonClassNames.JAVA_LANG_OBJECT, RESOLVE_SCOPE)[1];
assertEquals(objectClass, target2);
- parameters[0].getModifierList();
+ assertNotNull(parameters[0].getModifierList());
+ assertNotNull(parameters[1].getModifierList());
+
+ assertEquals("ints", parameters[0].getName());
+ assertEquals("o", parameters[1].getName());
}
public void testGenericClass() throws Exception {
@@ -706,10 +687,6 @@ public class ClsRepositoryUseTest extends PsiTestCase {
final PsiType returnType = methodsWithReturnType.getReturnType();
assert returnType != null : methodsWithReturnType;
assertEquals("pack.Parametrized<? extends T>", returnType.getCanonicalText());
-
- //TODO[ven, max]: After fix for loading decompiled stuff the result had been change. Need to discuss whether this is important
- //enough to try to conform old output.
- //assertEquals("public Parametrized<? extends T> method() { /* compiled code */ }", methodsWithReturnType.getText());
assertEquals("public pack.Parametrized<? extends T> method() { /* compiled code */ }", methodsWithReturnType.getText());
}
diff --git a/java/java-tests/testSrc/com/intellij/psi/ConstantValuesTest.java b/java/java-tests/testSrc/com/intellij/psi/ConstantValuesTest.java
index 5c3b63139860..af68ad625ac8 100644
--- a/java/java-tests/testSrc/com/intellij/psi/ConstantValuesTest.java
+++ b/java/java-tests/testSrc/com/intellij/psi/ConstantValuesTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 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.
@@ -25,6 +25,7 @@ import com.intellij.psi.impl.JavaConstantExpressionEvaluator;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.testFramework.PsiTestCase;
import com.intellij.testFramework.PsiTestUtil;
+import org.jetbrains.annotations.NotNull;
import java.io.IOException;
@@ -57,7 +58,7 @@ public class ConstantValuesTest extends PsiTestCase{
}
@Override
- protected void invokeTestRunnable(Runnable runnable) throws Exception {
+ protected void invokeTestRunnable(@NotNull Runnable runnable) throws Exception {
super.invokeTestRunnable(runnable);
final PsiJavaFile file = (PsiJavaFile)myClass.getContainingFile();
diff --git a/java/java-tests/testSrc/com/intellij/psi/PsiConcurrencyStressTest.java b/java/java-tests/testSrc/com/intellij/psi/PsiConcurrencyStressTest.java
index 9250602002dd..8316fe7111da 100644
--- a/java/java-tests/testSrc/com/intellij/psi/PsiConcurrencyStressTest.java
+++ b/java/java-tests/testSrc/com/intellij/psi/PsiConcurrencyStressTest.java
@@ -33,6 +33,7 @@ import com.intellij.pom.java.LanguageLevel;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.testFramework.*;
import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NotNull;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
@@ -193,7 +194,7 @@ public class PsiConcurrencyStressTest extends PsiTestCase {
}
@Override
- protected void invokeTestRunnable(final Runnable runnable) throws Exception {
+ protected void invokeTestRunnable(@NotNull final Runnable runnable) throws Exception {
runnable.run();
}
}
diff --git a/java/java-tests/testSrc/com/intellij/psi/codeStyle/arrangement/JavaRearrangerSpecialRuleTest.groovy b/java/java-tests/testSrc/com/intellij/psi/codeStyle/arrangement/JavaRearrangerSpecialRuleTest.groovy
index 024f0cdb9aab..71959e5f1bc4 100644
--- a/java/java-tests/testSrc/com/intellij/psi/codeStyle/arrangement/JavaRearrangerSpecialRuleTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/psi/codeStyle/arrangement/JavaRearrangerSpecialRuleTest.groovy
@@ -15,6 +15,7 @@
*/
package com.intellij.psi.codeStyle.arrangement
+import static com.intellij.psi.codeStyle.arrangement.std.StdArrangementTokens.EntryType.*
import static com.intellij.psi.codeStyle.arrangement.std.StdArrangementTokens.Modifier.*
import static com.intellij.psi.codeStyle.arrangement.std.StdArrangementTokens.Order.BY_NAME
@@ -112,4 +113,23 @@ class Test {
rules: [ruleWithOrder(BY_NAME, rule(PUBLIC)), ruleWithOrder(BY_NAME, rule(PUBLIC, STATIC))]
)
}
+
+ void "test different entries type with modifier conditions"() {
+ doTest(
+ initial: '''\
+class Test {
+ public static void b() {}
+ public void a() {}
+}
+''',
+ expected: '''\
+class Test {
+ public void a() {}
+ public static void b() {}
+}
+''',
+ rules: [rule(FIELD, PUBLIC), rule(FIELD), rule(METHOD, PUBLIC), rule(METHOD), rule(METHOD, PUBLIC, ABSTRACT), rule(METHOD, ABSTRACT),
+ rule(FIELD, PUBLIC, STATIC), rule(FIELD, STATIC), rule(METHOD, PUBLIC, STATIC), rule(METHOD, STATIC)]
+ )
+ }
}
diff --git a/java/java-tests/testSrc/com/intellij/psi/search/FindUsagesTest.java b/java/java-tests/testSrc/com/intellij/psi/search/FindUsagesTest.java
index 185ec301eadb..d6e5e9d8fd8a 100644
--- a/java/java-tests/testSrc/com/intellij/psi/search/FindUsagesTest.java
+++ b/java/java-tests/testSrc/com/intellij/psi/search/FindUsagesTest.java
@@ -89,7 +89,7 @@ public class FindUsagesTest extends PsiTestCase{
public void testLibraryClassUsageFromDecompiledSource() {
PsiElement decompiled =
((PsiCompiledElement)myJavaFacade.findClass("javax.swing.JLabel", GlobalSearchScope.allScope(myProject))).getMirror();
- assertEquals(2, ReferencesSearch.search(decompiled).findAll().size());
+ assertEquals(2, ReferencesSearch.search(decompiled, GlobalSearchScope.projectScope(myProject)).findAll().size());
}
public void testImplicitConstructorUsage() throws Throwable {
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java b/java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java
index 5c760cedc1fd..82b047c98203 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/AbstractJavaInplaceIntroduceTest.java
@@ -42,7 +42,7 @@ public abstract class AbstractJavaInplaceIntroduceTest extends AbstractInplaceIn
}
@Nullable
- protected static PsiExpression getExpressionFromEditor() {
+ protected PsiExpression getExpressionFromEditor() {
final PsiExpression expression = PsiTreeUtil.getParentOfType(getFile().findElementAt(getEditor().getCaretModel().getOffset()), PsiExpression.class);
if (expression instanceof PsiReferenceExpression && expression.getParent() instanceof PsiMethodCallExpression) {
return (PsiExpression)expression.getParent();
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureBaseTest.java b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureBaseTest.java
new file mode 100644
index 000000000000..69b5cc08a427
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureBaseTest.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2000-2014 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.refactoring;
+
+import com.intellij.JavaTestUtil;
+import com.intellij.codeInsight.TargetElementUtilBase;
+import com.intellij.psi.*;
+import com.intellij.refactoring.changeSignature.ChangeSignatureProcessor;
+import com.intellij.refactoring.changeSignature.JavaThrownExceptionInfo;
+import com.intellij.refactoring.changeSignature.ParameterInfoImpl;
+import com.intellij.refactoring.changeSignature.ThrownExceptionInfo;
+import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+public abstract class ChangeSignatureBaseTest extends LightRefactoringTestCase {
+ protected PsiElementFactory myFactory;
+
+ @NotNull
+ @Override
+ protected String getTestDataPath() {
+ return JavaTestUtil.getJavaTestDataPath();
+ }
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ myFactory = JavaPsiFacade.getInstance(getProject()).getElementFactory();
+ }
+
+ protected void doTest(@Nullable String returnType,
+ @Nullable final String[] parameters,
+ @Nullable final String[] exceptions,
+ boolean delegate) {
+ GenParams genParams = parameters == null ? new SimpleParameterGen() : new GenParams() {
+ @Override
+ public ParameterInfoImpl[] genParams(PsiMethod method) throws IncorrectOperationException {
+ ParameterInfoImpl[] parameterInfos = new ParameterInfoImpl[parameters.length];
+ for (int i = 0; i < parameters.length; i++) {
+ PsiType type = myFactory.createTypeFromText(parameters[i], method);
+ parameterInfos[i] = new ParameterInfoImpl(-1, "p" + (i + 1), type);
+ }
+ return parameterInfos;
+ }
+ };
+
+ GenExceptions genExceptions = exceptions == null ? new SimpleExceptionsGen() : new GenExceptions() {
+ @Override
+ public ThrownExceptionInfo[] genExceptions(PsiMethod method) throws IncorrectOperationException {
+ ThrownExceptionInfo[] exceptionInfos = new ThrownExceptionInfo[exceptions.length];
+ for (int i = 0; i < exceptions.length; i++) {
+ PsiType type = myFactory.createTypeFromText(exceptions[i], method);
+ exceptionInfos[i] = new JavaThrownExceptionInfo(-1, (PsiClassType)type);
+ }
+ return exceptionInfos;
+ }
+ };
+
+ doTest(null, null, returnType, genParams, genExceptions, delegate);
+ }
+
+ protected void doTest(@Nullable String newReturnType, ParameterInfoImpl[] parameterInfos, boolean generateDelegate) {
+ doTest(null, null, newReturnType, parameterInfos, new ThrownExceptionInfo[0], generateDelegate);
+ }
+
+ protected void doTest(@PsiModifier.ModifierConstant @Nullable String newVisibility,
+ @Nullable String newName,
+ @Nullable String newReturnType,
+ ParameterInfoImpl[] parameterInfo,
+ ThrownExceptionInfo[] exceptionInfo,
+ boolean generateDelegate) {
+ SimpleParameterGen params = new SimpleParameterGen(parameterInfo);
+ SimpleExceptionsGen exceptions = new SimpleExceptionsGen(exceptionInfo);
+ doTest(newVisibility, newName, newReturnType, params, exceptions, generateDelegate);
+ }
+
+ protected void doTest(@PsiModifier.ModifierConstant @Nullable String newVisibility,
+ @Nullable String newName,
+ @Nullable @NonNls String newReturnType,
+ GenParams genParams,
+ boolean generateDelegate) {
+ doTest(newVisibility, newName, newReturnType, genParams, new SimpleExceptionsGen(), generateDelegate);
+ }
+
+ protected void doTest(@PsiModifier.ModifierConstant @Nullable String newVisibility,
+ @Nullable String newName,
+ @Nullable String newReturnType,
+ GenParams genParams,
+ GenExceptions genExceptions,
+ boolean generateDelegate) {
+ String basePath = getRelativePath() + getTestName(false);
+ configureByFile(basePath + ".java");
+ PsiElement targetElement = TargetElementUtilBase.findTargetElement(getEditor(), TargetElementUtilBase.ELEMENT_NAME_ACCEPTED);
+ assertTrue("<caret> is not on method name", targetElement instanceof PsiMethod);
+ PsiMethod method = (PsiMethod)targetElement;
+ PsiType newType = newReturnType != null ? myFactory.createTypeFromText(newReturnType, method) : method.getReturnType();
+ new ChangeSignatureProcessor(getProject(), method, generateDelegate, newVisibility,
+ newName != null ? newName : method.getName(),
+ newType, genParams.genParams(method), genExceptions.genExceptions(method)).run();
+ checkResultByFile(basePath + "_after.java");
+ }
+
+ protected String getRelativePath() {
+ return "/refactoring/changeSignature/";
+ }
+
+ protected interface GenParams {
+ ParameterInfoImpl[] genParams(PsiMethod method) throws IncorrectOperationException;
+ }
+
+ protected interface GenExceptions {
+ ThrownExceptionInfo[] genExceptions(PsiMethod method) throws IncorrectOperationException;
+ }
+
+ protected static class SimpleParameterGen implements GenParams {
+ private ParameterInfoImpl[] myInfos;
+
+ public SimpleParameterGen() { }
+
+ public SimpleParameterGen(ParameterInfoImpl[] infos) {
+ myInfos = infos;
+ }
+
+ @Override
+ public ParameterInfoImpl[] genParams(PsiMethod method) {
+ if (myInfos == null) {
+ myInfos = new ParameterInfoImpl[method.getParameterList().getParametersCount()];
+ for (int i = 0; i < myInfos.length; i++) {
+ myInfos[i] = new ParameterInfoImpl(i);
+ }
+ }
+ for (ParameterInfoImpl info : myInfos) {
+ info.updateFromMethod(method);
+ }
+ return myInfos;
+ }
+ }
+
+ protected static class SimpleExceptionsGen implements GenExceptions {
+ private final ThrownExceptionInfo[] myInfos;
+
+ public SimpleExceptionsGen() {
+ myInfos = new ThrownExceptionInfo[0];
+ }
+
+ public SimpleExceptionsGen(ThrownExceptionInfo[] infos) {
+ myInfos = infos;
+ }
+
+ @Override
+ public ThrownExceptionInfo[] genExceptions(PsiMethod method) {
+ for (ThrownExceptionInfo info : myInfos) {
+ info.updateFromMethod(method);
+ }
+ return myInfos;
+ }
+ }
+}
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java
index 4f6c44824ab6..4cd9936b02cf 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java
@@ -15,7 +15,6 @@
*/
package com.intellij.refactoring;
-import com.intellij.JavaTestUtil;
import com.intellij.codeInsight.TargetElementUtilBase;
import com.intellij.psi.*;
import com.intellij.refactoring.changeSignature.ChangeSignatureProcessor;
@@ -24,22 +23,13 @@ import com.intellij.refactoring.changeSignature.ParameterInfoImpl;
import com.intellij.refactoring.changeSignature.ThrownExceptionInfo;
import com.intellij.refactoring.util.CanonicalTypes;
import com.intellij.util.IncorrectOperationException;
-import org.jetbrains.annotations.NonNls;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
import java.util.HashSet;
/**
* @author dsl
*/
-public class ChangeSignatureTest extends LightRefactoringTestCase {
- private PsiElementFactory myFactory;
-
- public void setUp() throws Exception {
- super.setUp();
- myFactory = JavaPsiFacade.getInstance(getProject()).getElementFactory();
- }
+public class ChangeSignatureTest extends ChangeSignatureBaseTest {
public void testSimple() {
doTest(null, null, null, new ParameterInfoImpl[0], new ThrownExceptionInfo[0], false);
@@ -392,7 +382,7 @@ public class ChangeSignatureTest extends LightRefactoringTestCase {
}
public void testPropagateParameter() {
- String basePath = "/refactoring/changeSignature/" + getTestName(false);
+ String basePath = getRelativePath() + getTestName(false);
configureByFile(basePath + ".java");
final PsiElement targetElement = TargetElementUtilBase.findTargetElement(getEditor(), TargetElementUtilBase.ELEMENT_NAME_ACCEPTED);
assertTrue("<caret> is not on method name", targetElement instanceof PsiMethod);
@@ -413,102 +403,14 @@ public class ChangeSignatureTest extends LightRefactoringTestCase {
checkResultByFile(basePath + "_after.java");
}
- /* workers */
-
- private void doTest(@Nullable String newReturnType, ParameterInfoImpl[] parameterInfos, boolean generateDelegate) {
- doTest(null, null, newReturnType, parameterInfos, new ThrownExceptionInfo[0], generateDelegate);
- }
-
- private void doTest(@PsiModifier.ModifierConstant @Nullable String newVisibility,
- @Nullable String newName,
- @Nullable String newReturnType,
- ParameterInfoImpl[] parameterInfo,
- ThrownExceptionInfo[] exceptionInfo,
- boolean generateDelegate) {
- doTest(newVisibility, newName, newReturnType, new SimpleParameterGen(parameterInfo), new SimpleExceptionsGen(exceptionInfo), generateDelegate);
- }
-
- private void doTest(@PsiModifier.ModifierConstant @Nullable String newVisibility,
- @Nullable String newName,
- @Nullable @NonNls String newReturnType,
- GenParams gen,
- boolean generateDelegate) {
- doTest(newVisibility, newName, newReturnType, gen, new SimpleExceptionsGen(), generateDelegate);
- }
-
- private void doTest(@PsiModifier.ModifierConstant @Nullable String newVisibility,
- @Nullable String newName,
- @Nullable String newReturnType,
- GenParams genParams,
- GenExceptions genExceptions,
- boolean generateDelegate) {
- String basePath = "/refactoring/changeSignature/" + getTestName(false);
- configureByFile(basePath + ".java");
- PsiElement targetElement = TargetElementUtilBase.findTargetElement(getEditor(), TargetElementUtilBase.ELEMENT_NAME_ACCEPTED);
- assertTrue("<caret> is not on method name", targetElement instanceof PsiMethod);
- PsiMethod method = (PsiMethod)targetElement;
- PsiType newType = newReturnType != null ? myFactory.createTypeFromText(newReturnType, method) : method.getReturnType();
- new ChangeSignatureProcessor(getProject(), method, generateDelegate, newVisibility,
- newName != null ? newName : method.getName(),
- newType, genParams.genParams(method), genExceptions.genExceptions(method)).run();
- checkResultByFile(basePath + "_after.java");
- }
-
- private interface GenParams {
- ParameterInfoImpl[] genParams(PsiMethod method) throws IncorrectOperationException;
- }
-
- private static class SimpleParameterGen implements GenParams {
- private ParameterInfoImpl[] myInfos;
-
- private SimpleParameterGen() { }
-
- private SimpleParameterGen(ParameterInfoImpl[] infos) {
- myInfos = infos;
- }
-
- @Override
- public ParameterInfoImpl[] genParams(PsiMethod method) {
- if (myInfos == null) {
- myInfos = new ParameterInfoImpl[method.getParameterList().getParametersCount()];
- for (int i = 0; i < myInfos.length; i++) {
- myInfos[i] = new ParameterInfoImpl(i);
- }
- }
- for (ParameterInfoImpl info : myInfos) {
- info.updateFromMethod(method);
- }
- return myInfos;
- }
- }
-
- private interface GenExceptions {
- ThrownExceptionInfo[] genExceptions(PsiMethod method) throws IncorrectOperationException;
+ public void testTypeAnnotationsAllAround() {
+ //String[] ps = {"@TA(1) int @TA(2) []", "java.util.@TA(4) List<@TA(5) Class<@TA(6) ?>>", "@TA(7) String @TA(8) ..."};
+ //String[] ex = {"@TA(42) IllegalArgumentException", "java.lang.@TA(43) IllegalStateException"};
+ //doTest("java.util.@TA(0) List<@TA(1) C.@TA(1) Inner>", ps, ex, false);
+ String[] ps = {"@TA(2) int @TA(3) []", "@TA(4) List<@TA(5) Class<@TA(6) ?>>", "@TA(7) String @TA(8) ..."};
+ String[] ex = {};
+ doTest("@TA(0) List<@TA(1) Inner>", ps, ex, false);
}
- private static class SimpleExceptionsGen implements GenExceptions {
- private final ThrownExceptionInfo[] myInfos;
-
- public SimpleExceptionsGen() {
- myInfos = new ThrownExceptionInfo[0];
- }
-
- private SimpleExceptionsGen(ThrownExceptionInfo[] infos) {
- myInfos = infos;
- }
-
- @Override
- public ThrownExceptionInfo[] genExceptions(PsiMethod method) {
- for (ThrownExceptionInfo info : myInfos) {
- info.updateFromMethod(method);
- }
- return myInfos;
- }
- }
-
- @NotNull
- @Override
- protected String getTestDataPath() {
- return JavaTestUtil.getJavaTestDataPath();
- }
+ /* workers */
}
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/FindMethodDuplicatesTest.java b/java/java-tests/testSrc/com/intellij/refactoring/FindMethodDuplicatesTest.java
index ecabfb08cc83..b841cb71320f 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/FindMethodDuplicatesTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/FindMethodDuplicatesTest.java
@@ -51,6 +51,10 @@ public class FindMethodDuplicatesTest extends FindMethodDuplicatesBaseTest{
doTest();
}
+ public void testSkipNonRelatedCalls() throws Exception {
+ doTest(false);
+ }
+
public void testMappingAny2ParameterPrimitiveLvalue() throws Exception {
doTest(false);
}
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceConstantTest.java b/java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceConstantTest.java
index 14a53f40cb3e..2eefaa1364b1 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceConstantTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceConstantTest.java
@@ -19,10 +19,13 @@ import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Pass;
import com.intellij.psi.PsiExpression;
+import com.intellij.psi.PsiLiteralExpression;
import com.intellij.psi.PsiLocalVariable;
+import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.refactoring.introduce.inplace.AbstractInplaceIntroducer;
import com.intellij.refactoring.introduceField.IntroduceConstantHandler;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* User: anna
@@ -43,6 +46,28 @@ public class InplaceIntroduceConstantTest extends AbstractJavaInplaceIntroduceTe
});
}
+ @Nullable
+ @Override
+ protected PsiExpression getExpressionFromEditor() {
+ final PsiExpression expression = super.getExpressionFromEditor();
+ if (expression != null) {
+ return expression;
+ }
+ final PsiExpression expr = PsiTreeUtil.getParentOfType(getFile().findElementAt(getEditor().getCaretModel().getOffset()), PsiExpression.class);
+ return expr instanceof PsiLiteralExpression ? expr : null;
+ }
+
+ public void testReplaceAllInsideParenthesized() throws Exception {
+
+ doTest(new Pass<AbstractInplaceIntroducer>() {
+ @Override
+ public void pass(AbstractInplaceIntroducer inplaceIntroduceFieldPopup) {
+ inplaceIntroduceFieldPopup.setReplaceAllOccurrences(true);
+
+ }
+ });
+ }
+
public void testReplaceAllWithClassRefType() throws Exception {
doTest(new Pass<AbstractInplaceIntroducer>() {
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceParameterTest.java b/java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceParameterTest.java
index 697b42314e3e..841a67ea001d 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceParameterTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/InplaceIntroduceParameterTest.java
@@ -86,6 +86,14 @@ public class InplaceIntroduceParameterTest extends AbstractJavaInplaceIntroduceT
});
}
+ public void testLocalInsideAnonymous() throws Exception {
+ doTest(new Pass<AbstractInplaceIntroducer>() {
+ @Override
+ public void pass(AbstractInplaceIntroducer inplaceIntroducePopup) {
+ }
+ });
+ }
+
@Override
protected String getBasePath() {
return BASE_PATH;
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java b/java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java
index fcadcd170588..34745372977e 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java
@@ -28,7 +28,6 @@ import com.intellij.refactoring.introduceVariable.IntroduceVariableSettings;
import com.intellij.refactoring.ui.TypeSelectorManagerImpl;
import com.intellij.testFramework.LightCodeInsightTestCase;
import com.intellij.util.containers.MultiMap;
-import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import java.util.Collection;
@@ -37,66 +36,65 @@ import java.util.Collection;
* @author dsl
*/
public class IntroduceVariableTest extends LightCodeInsightTestCase {
-
@NotNull
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath();
}
- public void testSimpleExpression() throws Exception {
+ public void testSimpleExpression() {
doTest(new MockIntroduceVariableHandler("i", false, false, true, "int"));
}
- public void testInsideFor() throws Exception {
+ public void testInsideFor() {
doTest(new MockIntroduceVariableHandler("temp", false, false, true, "int"));
}
- public void testReplaceAll() throws Exception {
- doTest(new MockIntroduceVariableHandler("s", true, true, true, "java.lang.String"));
+ public void testReplaceAll() {
+ doTest(new MockIntroduceVariableHandler("s", true, true, true, CommonClassNames.JAVA_LANG_STRING));
}
- public void testIDEADEV3678() throws Exception {
+ public void testIDEADEV3678() {
doTest(new MockIntroduceVariableHandler("component", true, true, true, CommonClassNames.JAVA_LANG_OBJECT));
}
- public void testIDEADEV13369() throws Exception {
+ public void testIDEADEV13369() {
doTest(new MockIntroduceVariableHandler("ints", true, true, true, "int[]"));
}
- public void testAnonymousClass() throws Exception {
+ public void testAnonymousClass() {
doTest(new MockIntroduceVariableHandler("temp", true, false, true, "int"));
}
- public void testAnonymousClass1() throws Exception {
+ public void testAnonymousClass1() {
doTest(new MockIntroduceVariableHandler("runnable", false, false, false, CommonClassNames.JAVA_LANG_RUNNABLE));
}
- public void testAnonymousClass2() throws Exception {
+ public void testAnonymousClass2() {
doTest(new MockIntroduceVariableHandler("j", true, false, false, "int"));
}
- public void testAnonymousClass3() throws Exception {
+ public void testAnonymousClass3() {
doTest(new MockIntroduceVariableHandler("j", true, false, false, "Foo"));
}
- public void testAnonymousClass4() throws Exception {
+ public void testAnonymousClass4() {
doTest(new MockIntroduceVariableHandler("j", true, false, false, "int"));
}
- public void testAnonymousClass5() throws Exception {
+ public void testAnonymousClass5() {
doTest(new MockIntroduceVariableHandler("j", true, false, false, "int"));
}
- public void testLambda() throws Exception {
+ public void testLambda() {
doTest(new MockIntroduceVariableHandler("j", true, false, false, "int"));
}
- public void testParenthized() throws Exception {
+ public void testParenthized() {
doTest(new MockIntroduceVariableHandler("temp", true, false, false, "int"));
}
- public void testExpectedType8Inference() throws Exception {
+ public void testExpectedType8Inference() {
final PsiResolveHelperImpl helper = (PsiResolveHelperImpl)JavaPsiFacade.getInstance(getProject()).getResolveHelper();
helper.setTestHelper(new PsiGraphInferenceHelper(getPsiManager()));
try {
@@ -108,64 +106,64 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
}
}
- public void testMethodCall() throws Exception {
+ public void testMethodCall() {
doTest(new MockIntroduceVariableHandler("temp", true, true, true, CommonClassNames.JAVA_LANG_OBJECT));
}
- public void testMethodCallInSwitch() throws Exception {
+ public void testMethodCallInSwitch() {
doTest(new MockIntroduceVariableHandler("i", true, true, true, "int"));
}
- public void testParenthizedOccurence() throws Exception {
+ public void testParenthizedOccurence() {
doTest(new MockIntroduceVariableHandler("empty", true, true, true, "boolean"));
}
- public void testParenthizedOccurence1() throws Exception {
- doTest(new MockIntroduceVariableHandler("s", true, true, true, "java.lang.String"));
+ public void testParenthizedOccurence1() {
+ doTest(new MockIntroduceVariableHandler("s", true, true, true, CommonClassNames.JAVA_LANG_STRING));
}
- public void testConflictingField() throws Exception {
- doTest(new MockIntroduceVariableHandler("name", true, false, true, "java.lang.String"));
+ public void testConflictingField() {
+ doTest(new MockIntroduceVariableHandler("name", true, false, true, CommonClassNames.JAVA_LANG_STRING));
}
- public void testConflictingFieldInExpression() throws Exception {
+ public void testConflictingFieldInExpression() {
doTest(new MockIntroduceVariableHandler("name", false, false, true, "int"));
}
- public void testStaticConflictingField() throws Exception {
+ public void testStaticConflictingField() {
doTest(new MockIntroduceVariableHandler("name", false, false, true, "int"));
}
- public void testNonConflictingField() throws Exception {
+ public void testNonConflictingField() {
doTest(new MockIntroduceVariableHandler("name", false, false, true, "int"));
}
- public void testScr16910() throws Exception {
+ public void testScr16910() {
doTest(new MockIntroduceVariableHandler("i", true, true, false, "int"));
}
- public void testSCR18295() throws Exception {
- doTest(new MockIntroduceVariableHandler("it", true, false, false, "java.lang.String"));
+ public void testSCR18295() {
+ doTest(new MockIntroduceVariableHandler("it", true, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testSCR18295a() throws Exception {
- doTest(new MockIntroduceVariableHandler("it", false, false, false, "java.lang.String"));
+ public void testSCR18295a() {
+ doTest(new MockIntroduceVariableHandler("it", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testFromInjected() throws Exception {
- doTest(new MockIntroduceVariableHandler("regexp", false, false, false, "java.lang.String"));
+ public void testFromInjected() {
+ doTest(new MockIntroduceVariableHandler("regexp", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testSCR10412() throws Exception {
+ public void testSCR10412() {
doTest(new MockIntroduceVariableHandler("newVar", false, false, false, "java.lang.String[]"));
}
- public void testSCR22718() throws Exception {
+ public void testSCR22718() {
doTest(new MockIntroduceVariableHandler("object", true, true, false, CommonClassNames.JAVA_LANG_OBJECT));
}
- public void testSCR26075() throws Exception {
- doTest(new MockIntroduceVariableHandler("wrong", false, false, false, "java.lang.String") {
+ public void testSCR26075() {
+ doTest(new MockIntroduceVariableHandler("wrong", false, false, false, CommonClassNames.JAVA_LANG_STRING) {
@Override
protected void assertValidationResult(boolean validationResult) {
assertFalse(validationResult);
@@ -182,59 +180,59 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
});
}
- public void testConflictingFieldInOuterClass() throws Exception {
- doTest(new MockIntroduceVariableHandler("text", true, true, false, "java.lang.String"));
+ public void testConflictingFieldInOuterClass() {
+ doTest(new MockIntroduceVariableHandler("text", true, true, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testSkipSemicolon() throws Exception {
+ public void testSkipSemicolon() {
doTest(new MockIntroduceVariableHandler("mi5", false, false, false, "int"));
}
- public void testInsideIf() throws Exception {
- doTest(new MockIntroduceVariableHandler("s1", false, false, false, "java.lang.String"));
+ public void testInsideIf() {
+ doTest(new MockIntroduceVariableHandler("s1", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testInsideElse() throws Exception {
- doTest(new MockIntroduceVariableHandler("s1", false, false, false, "java.lang.String"));
+ public void testInsideElse() {
+ doTest(new MockIntroduceVariableHandler("s1", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testInsideWhile() throws Exception {
+ public void testInsideWhile() {
doTest(new MockIntroduceVariableHandler("temp", false, false, false, "int"));
}
- public void testSCR40281() throws Exception {
+ public void testSCR40281() {
doTest(new MockIntroduceVariableHandler("temp", false, false, false, "Set<? extends Map<?,java.lang.String>.Entry<?,java.lang.String>>"));
}
- public void testWithIfBranches() throws Exception {
+ public void testWithIfBranches() {
doTest(new MockIntroduceVariableHandler("temp", true, false, false, "int"));
}
- public void testInsideForLoop() throws Exception {
+ public void testInsideForLoop() {
doTest(new MockIntroduceVariableHandler("temp", true, false, false, "int"));
}
- public void testDuplicateGenericExpressions() throws Exception {
+ public void testDuplicateGenericExpressions() {
doTest(new MockIntroduceVariableHandler("temp", true, false, false, "Foo2<? extends java.lang.Runnable>"));
}
- public void testStaticImport() throws Exception {
+ public void testStaticImport() {
doTest(new MockIntroduceVariableHandler("i", true, true, false, "int"));
}
- public void testThisQualifier() throws Exception {
+ public void testThisQualifier() {
doTest(new MockIntroduceVariableHandler("count", true, true, false, "int"));
}
- public void testSubLiteral() throws Exception {
- doTest(new MockIntroduceVariableHandler("str", false, false, false, "java.lang.String"));
+ public void testSubLiteral() {
+ doTest(new MockIntroduceVariableHandler("str", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testSubLiteral1() throws Exception {
- doTest(new MockIntroduceVariableHandler("str", false, false, false, "java.lang.String"));
+ public void testSubLiteral1() {
+ doTest(new MockIntroduceVariableHandler("str", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testSubLiteralFailure() throws Exception {
+ public void testSubLiteralFailure() {
try {
doTest(new MockIntroduceVariableHandler("str", false, false, false, "int"));
}
@@ -246,35 +244,35 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
fail("Should not be able to perform refactoring");
}
- public void testSubLiteralFromExpression() throws Exception {
- doTest(new MockIntroduceVariableHandler("str", false, false, false, "java.lang.String"));
+ public void testSubLiteralFromExpression() {
+ doTest(new MockIntroduceVariableHandler("str", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testSubExpressionFromIntellijidearulezzz() throws Exception {
- doTest(new MockIntroduceVariableHandler("str", false, false, false, "java.lang.String"));
+ public void testSubExpressionFromIntellijidearulezzz() {
+ doTest(new MockIntroduceVariableHandler("str", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testSubPrimitiveLiteral() throws Exception {
+ public void testSubPrimitiveLiteral() {
doTest(new MockIntroduceVariableHandler("str", false, false, false, "boolean"));
}
- public void testArrayFromVarargs() throws Exception {
+ public void testArrayFromVarargs() {
doTest(new MockIntroduceVariableHandler("strs", false, false, false, "java.lang.String[]"));
}
- public void testArrayFromVarargs1() throws Exception {
+ public void testArrayFromVarargs1() {
doTest(new MockIntroduceVariableHandler("strs", false, false, false, "java.lang.String[]"));
}
- public void testEnumArrayFromVarargs() throws Exception {
+ public void testEnumArrayFromVarargs() {
doTest(new MockIntroduceVariableHandler("strs", false, false, false, "E[]"));
}
- public void testFromFinalFieldOnAssignment() throws Exception {
- doTest(new MockIntroduceVariableHandler("strs", false, false, false, "java.lang.String"));
+ public void testFromFinalFieldOnAssignment() {
+ doTest(new MockIntroduceVariableHandler("strs", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testNoArrayFromVarargs() throws Exception {
+ public void testNoArrayFromVarargs() {
try {
doTest(new MockIntroduceVariableHandler("strs", false, false, false, "java.lang.String[]"));
}
@@ -286,7 +284,7 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
fail("Should not be able to perform refactoring");
}
- public void testNoArrayFromVarargs1() throws Exception {
+ public void testNoArrayFromVarargs1() {
try {
doTest(new MockIntroduceVariableHandler("strs", false, false, false, "java.lang.String[]"));
}
@@ -298,59 +296,59 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
fail("Should not be able to perform refactoring");
}
- public void testNonExpression() throws Exception {
+ public void testNonExpression() {
doTest(new MockIntroduceVariableHandler("sum", true, true, false, "int"));
}
- public void testTypeAnnotations() throws Exception {
+ public void testTypeAnnotations() {
doTest(new MockIntroduceVariableHandler("y1", true, false, false, "@TA C"));
}
- public void testReturnStatementWithoutSemicolon() throws Exception {
- doTest(new MockIntroduceVariableHandler("b", true, true, false, "java.lang.String"));
+ public void testReturnStatementWithoutSemicolon() {
+ doTest(new MockIntroduceVariableHandler("b", true, true, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testAndAndSubexpression() throws Exception {
+ public void testAndAndSubexpression() {
doTest(new MockIntroduceVariableHandler("ab", true, true, false, "boolean"));
}
- public void testSubexpressionWithSpacesInSelection() throws Exception {
+ public void testSubexpressionWithSpacesInSelection() {
doTest(new MockIntroduceVariableHandler("ab", true, true, false, "boolean"));
}
- public void testDuplicatesAnonymousClassCreationWithSimilarParameters () throws Exception {
+ public void testDuplicatesAnonymousClassCreationWithSimilarParameters () {
doTest(new MockIntroduceVariableHandler("foo1", true, true, false, "Foo"));
}
- public void testDifferentForeachParameters () throws Exception {
- doTest(new MockIntroduceVariableHandler("tostr", true, true, false, "java.lang.String"));
+ public void testDifferentForeachParameters () {
+ doTest(new MockIntroduceVariableHandler("tostr", true, true, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testCollapsedToDiamond() throws Exception {
+ public void testCollapsedToDiamond() {
doTest(new MockIntroduceVariableHandler("a", true, true, true, "java.util.ArrayList<java.lang.String>"));
}
- public void testCantCollapsedToDiamond() throws Exception {
+ public void testCantCollapsedToDiamond() {
doTest(new MockIntroduceVariableHandler("a", true, true, true, "Foo<java.lang.Number>"));
}
- public void testFromForInitializer() throws Exception {
+ public void testFromForInitializer() {
doTest(new MockIntroduceVariableHandler("list", true, true, true, "java.util.List"));
}
- public void testInvalidPostfixExpr() throws Exception {
+ public void testInvalidPostfixExpr() {
doTest(new MockIntroduceVariableHandler("a1", true, false, true, "int[]"));
}
- public void testPolyadic() throws Exception {
+ public void testPolyadic() {
doTest(new MockIntroduceVariableHandler("b1", true, true, true, "boolean"));
}
- public void testAssignmentToUnresolvedReference() throws Exception {
+ public void testAssignmentToUnresolvedReference() {
doTest(new MockIntroduceVariableHandler("collection", true, true, true, "java.util.List<? extends java.util.Collection<?>>"));
}
- public void testNameSuggestion() throws Exception {
+ public void testNameSuggestion() {
final String expectedTypeName = "Path";
doTest(new MockIntroduceVariableHandler("path", true, false, false, expectedTypeName) {
@Override
@@ -370,7 +368,7 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
});
}
- public void testSiblingInnerClassType() throws Exception {
+ public void testSiblingInnerClassType() {
doTest(new MockIntroduceVariableHandler("vari", true, false, false, "A.B") {
@Override
public IntroduceVariableSettings getSettings(Project project, Editor editor,
@@ -388,7 +386,7 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
});
}
- public void testNonExpressionPriorityFailure() throws Exception {
+ public void testNonExpressionPriorityFailure() {
doTest(new MockIntroduceVariableHandler("sum", true, true, false, "int"){
@Override
protected void showErrorMessage(Project project, Editor editor, String message) {
@@ -398,10 +396,9 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
});
}
-
- public void testIncorrectExpressionSelected() throws Exception {
+ public void testIncorrectExpressionSelected() {
try {
- doTest(new MockIntroduceVariableHandler("toString", false, false, false, "java.lang.String"));
+ doTest(new MockIntroduceVariableHandler("toString", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
catch (Exception e) {
assertEquals(e.getMessage(), "Error message:Cannot perform refactoring.\n" +
@@ -411,51 +408,50 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
fail("Should not be able to perform refactoring");
}
- public void testMultiCatchSimple() throws Exception {
+ public void testMultiCatchSimple() {
doTest(new MockIntroduceVariableHandler("e", true, true, false, "java.lang.Exception", true));
}
- public void testMultiCatchTyped() throws Exception {
+ public void testMultiCatchTyped() {
doTest(new MockIntroduceVariableHandler("b", true, true, false, "java.lang.Exception", true));
}
- public void testBeforeVoidStatement() throws Exception {
+ public void testBeforeVoidStatement() {
doTest(new MockIntroduceVariableHandler("c", false, false, false, CommonClassNames.JAVA_LANG_OBJECT));
}
- public void testWriteUsages() throws Exception {
+ public void testWriteUsages() {
doTest(new MockIntroduceVariableHandler("c", true, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testLambdaExpr() throws Exception {
-
+ public void testLambdaExpr() {
doTest(new MockIntroduceVariableHandler("c", false, false, false, "SAM<java.lang.Integer>"));
}
- public void testMethodRef() throws Exception {
+ public void testMethodRef() {
doTest(new MockIntroduceVariableHandler("c", false, false, false, "Test.Bar"));
}
- public void testLambdaExprNotAccepted() throws Exception {
- doTest(new MockIntroduceVariableHandler("c", false, false, false, "SAM<X>"));
+ public void testLambdaExprNotAccepted() {
+ doTest(new MockIntroduceVariableHandler("c", false, false, false, "SAM<java.lang.Integer>"));
}
- public void testOneLineLambdaVoidCompatible() throws Exception {
- doTest(new MockIntroduceVariableHandler("c", false, false, false, "java.lang.String"));
+ public void testOneLineLambdaVoidCompatible() {
+ doTest(new MockIntroduceVariableHandler("c", false, false, false, CommonClassNames.JAVA_LANG_STRING));
}
- public void testOneLineLambdaValueCompatible() throws Exception {
+ public void testOneLineLambdaValueCompatible() {
doTest(new MockIntroduceVariableHandler("c", false, false, false, "int"));
}
- public void testNormalizeDeclarations() throws Exception {
+ public void testNormalizeDeclarations() {
doTest(new MockIntroduceVariableHandler("i3", false, false, false, "int"));
}
- public void testMethodReferenceExpr() throws Exception {
+ public void testMethodReferenceExpr() {
doTest(new MockIntroduceVariableHandler("m", false, false, false, "Foo.I"));
}
- public void testReturnNonExportedArray() throws Exception {
+ public void testReturnNonExportedArray() {
doTest(new MockIntroduceVariableHandler("i", false, false, false, "java.io.File[]") {
@Override
protected boolean isInplaceAvailableInTestMode() {
@@ -464,8 +460,8 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
});
}
- private void doTest(IntroduceVariableBase testMe) throws Exception {
- @NonNls String baseName = "/refactoring/introduceVariable/" + getTestName(false);
+ private void doTest(IntroduceVariableBase testMe) {
+ String baseName = "/refactoring/introduceVariable/" + getTestName(false);
configureByFile(baseName + ".java");
testMe.invoke(getProject(), getEditor(), getFile(), null);
checkResultByFile(baseName + ".after.java");
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/MoveInnerTest.java b/java/java-tests/testSrc/com/intellij/refactoring/MoveInnerTest.java
index 2e6865bfc5f8..c56ff8219d1f 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/MoveInnerTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/MoveInnerTest.java
@@ -85,6 +85,10 @@ public class MoveInnerTest extends MultiFileTestCase {
doTest(createAction("p.A.B", "B", false, null, false, false, null));
}
+ public void testConstructorUtilClassVisibility() throws Exception {
+ doTest(createAction("p.A.B", "B", false, null, false, false, null));
+ }
+
public void testFieldAccessInSuper() throws Exception {
doTest(createAction("p.A.B", "B", true, "a", false, false, null));
}
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/PullUpTest.java b/java/java-tests/testSrc/com/intellij/refactoring/PullUpTest.java
index cbf095578213..f0d4e771ed1a 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/PullUpTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/PullUpTest.java
@@ -16,17 +16,24 @@
package com.intellij.refactoring;
import com.intellij.JavaTestUtil;
+import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.pom.java.LanguageLevel;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.refactoring.listeners.JavaRefactoringListenerManager;
import com.intellij.refactoring.listeners.MoveMemberListener;
+import com.intellij.refactoring.memberPullUp.PullUpConflictsUtil;
import com.intellij.refactoring.memberPullUp.PullUpProcessor;
import com.intellij.refactoring.util.DocCommentPolicy;
+import com.intellij.refactoring.util.classMembers.InterfaceContainmentVerifier;
import com.intellij.refactoring.util.classMembers.MemberInfo;
+import com.intellij.testFramework.IdeaTestUtil;
+import com.intellij.util.containers.MultiMap;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
+import java.util.Arrays;
+
/**
* @author ven
*/
@@ -86,6 +93,16 @@ public class PullUpTest extends LightRefactoringTestCase {
doTest(new RefactoringTestUtil.MemberDescriptor("get", PsiMethod.class));
}
+ public void testNotFunctionalAnymore() {
+ setLanguageLevel(LanguageLevel.JDK_1_8);
+ doTest(true, "Functional expression demands functional interface to have exact one method", new RefactoringTestUtil.MemberDescriptor("get", PsiMethod.class, true));
+ }
+
+ public void testStillFunctional() {
+ setLanguageLevel(LanguageLevel.JDK_1_8);
+ doTest(true, new RefactoringTestUtil.MemberDescriptor("get", PsiMethod.class, false));
+ }
+
public void testAsDefault() {
final RefactoringTestUtil.MemberDescriptor descriptor = new RefactoringTestUtil.MemberDescriptor("get", PsiMethod.class);
doTest(descriptor);
@@ -156,6 +173,13 @@ public class PullUpTest extends LightRefactoringTestCase {
}
private void doTest(final boolean checkMembersMovedCount, RefactoringTestUtil.MemberDescriptor... membersToFind) {
+ doTest(checkMembersMovedCount, null, membersToFind);
+ }
+
+ private void doTest(final boolean checkMembersMovedCount,
+ String conflictMessage,
+ RefactoringTestUtil.MemberDescriptor... membersToFind) {
+ final MultiMap<PsiElement, String> conflictsMap = new MultiMap<PsiElement, String>();
configureByFile(BASE_PATH + getTestName(false) + ".java");
PsiElement elementAt = getFile().findElementAt(getEditor().getCaretModel().getOffset());
final PsiClass sourceClass = PsiTreeUtil.getParentOfType(elementAt, PsiClass.class);
@@ -169,7 +193,7 @@ public class PullUpTest extends LightRefactoringTestCase {
assertTrue(interfaces[0].isWritable());
targetClass = interfaces[0];
}
- MemberInfo[] infos = RefactoringTestUtil.findMembers(sourceClass, membersToFind);
+ final MemberInfo[] infos = RefactoringTestUtil.findMembers(sourceClass, membersToFind);
final int[] countMoved = {0};
final MoveMemberListener listener = new MoveMemberListener() {
@@ -180,10 +204,35 @@ public class PullUpTest extends LightRefactoringTestCase {
}
};
JavaRefactoringListenerManager.getInstance(getProject()).addMoveMembersListener(listener);
+ final PsiDirectory targetDirectory = targetClass.getContainingFile().getContainingDirectory();
+ final PsiPackage targetPackage = targetDirectory != null ? JavaDirectoryService.getInstance().getPackage(targetDirectory) : null;
+ conflictsMap.putAllValues(
+ PullUpConflictsUtil
+ .checkConflicts(infos, sourceClass, targetClass, targetPackage, targetDirectory, new InterfaceContainmentVerifier() {
+ @Override
+ public boolean checkedInterfacesContain(PsiMethod psiMethod) {
+ return PullUpProcessor.checkedInterfacesContain(Arrays.asList(infos), psiMethod);
+ }
+ })
+ );
final PullUpProcessor helper = new PullUpProcessor(sourceClass, targetClass, infos, new DocCommentPolicy(DocCommentPolicy.ASIS));
helper.run();
UIUtil.dispatchAllInvocationEvents();
JavaRefactoringListenerManager.getInstance(getProject()).removeMoveMembersListener(listener);
+
+ if (conflictMessage != null && conflictsMap.isEmpty()) {
+ fail("Conflict was not detected");
+ }
+
+ if (conflictMessage == null && !conflictsMap.isEmpty()) {
+ fail(conflictsMap.values().iterator().next());
+ }
+
+ if (conflictMessage != null) {
+ assertEquals(conflictMessage, conflictsMap.values().iterator().next());
+ return;
+ }
+
if (checkMembersMovedCount) {
assertEquals(countMoved[0], membersToFind.length);
}
@@ -195,4 +244,9 @@ public class PullUpTest extends LightRefactoringTestCase {
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath();
}
+
+ @Override
+ protected Sdk getProjectJDK() {
+ return IdeaTestUtil.getMockJdk18();
+ }
}
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/PushDownTest.java b/java/java-tests/testSrc/com/intellij/refactoring/PushDownTest.java
index 5ea40f697a4d..299a6468f4f7 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/PushDownTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/PushDownTest.java
@@ -16,12 +16,14 @@
package com.intellij.refactoring;
import com.intellij.codeInsight.TargetElementUtilBase;
+import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.psi.*;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.refactoring.memberPushDown.PushDownProcessor;
import com.intellij.refactoring.util.DocCommentPolicy;
import com.intellij.refactoring.util.classMembers.MemberInfo;
import com.intellij.refactoring.util.classMembers.MemberInfoStorage;
+import com.intellij.testFramework.IdeaTestUtil;
import com.intellij.usageView.UsageInfo;
import com.intellij.util.containers.MultiMap;
@@ -54,6 +56,12 @@ public class PushDownTest extends LightRefactoringTestCase {
public void testExtensionMethodToInterface() { doTest(); }
public void testExtensionMethodToClass() { doTest(); }
+ public void testFunctionalExpression() { doTest(true);}
+ public void testFunctionalInterface() { doTest(true);}
+ public void testFunctionalExpressionDefaultMethod() { doTest();}
+
+ public void testInterfaceConstants() { doTest();}
+
private void doTest() {
doTest(false);
}
@@ -122,4 +130,9 @@ public class PushDownTest extends LightRefactoringTestCase {
checkResultByFile(BASE_PATH + getTestName(false) + "_after.java");
}
+
+ @Override
+ protected Sdk getProjectJDK() {
+ return IdeaTestUtil.getMockJdk18();
+ }
}
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java b/java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java
index a6768c98d0f3..e99d8a5d1cec 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/SafeDeleteTest.java
@@ -134,6 +134,35 @@ public class SafeDeleteTest extends MultiFileTestCase {
}
}
+ public void testParameterFromFunctionalInterface() throws Exception {
+ try {
+ LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_8);
+ doSingleFileTest();
+ fail("Conflict was not detected");
+ }
+ catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
+ String message = e.getMessage();
+ assertEquals("class <b><code>SAM</code></b> has 1 usage that is not safe to delete.", message);
+ }
+ }
+
+ public void testFunctionalInterfaceMethod() throws Exception {
+ try {
+ LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_8);
+ doSingleFileTest();
+ fail("Conflict was not detected");
+ }
+ catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
+ String message = e.getMessage();
+ assertEquals("class <b><code>SAM</code></b> has 1 usage that is not safe to delete.", message);
+ }
+ }
+
+ public void testFunctionalInterfaceDefaultMethod() throws Exception {
+ LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_8);
+ doSingleFileTest();
+ }
+
public void testMethodDeepHierarchy() throws Exception {
doTest("Super");
}
diff --git a/java/java-tests/testSrc/com/intellij/refactoring/inline/InlineMethodTest.java b/java/java-tests/testSrc/com/intellij/refactoring/inline/InlineMethodTest.java
index ec5ab9e53e96..c77b344f6722 100644
--- a/java/java-tests/testSrc/com/intellij/refactoring/inline/InlineMethodTest.java
+++ b/java/java-tests/testSrc/com/intellij/refactoring/inline/InlineMethodTest.java
@@ -260,6 +260,10 @@ public class InlineMethodTest extends LightRefactoringTestCase {
doTest(true);
}
+ public void testMethodInsideChangeIfStatement() throws Exception {
+ doTest();
+ }
+
private void doTestInlineThisOnly() {
@NonNls String fileName = "/refactoring/inlineMethod/" + getTestName(false) + ".java";
configureByFile(fileName);
diff --git a/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java b/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java
index 8d61ad0b94b4..25af740228c7 100644
--- a/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java
+++ b/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java
@@ -16,14 +16,14 @@
package com.intellij.roots;
import com.intellij.ProjectTopics;
+import com.intellij.openapi.application.ex.PathManagerEx;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
-import com.intellij.openapi.roots.impl.ModifiableModelCommitter;
import com.intellij.openapi.projectRoots.ProjectJdkTable;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.SdkModificator;
-import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
import com.intellij.openapi.roots.*;
+import com.intellij.openapi.roots.impl.ModifiableModelCommitter;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.libraries.LibraryTable;
import com.intellij.openapi.roots.libraries.LibraryTablesRegistrar;
@@ -58,6 +58,47 @@ public class RootsChangedTest extends ModuleTestCase {
super.tearDown();
}
+ public void testEventsAfterFileModifications() throws Exception {
+ final File root = FileUtil.createTempDirectory(getTestName(true), "");
+ File dir1 = new File(root, "dir1");
+ assertTrue(dir1.mkdirs());
+ final VirtualFile vDir1 = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(dir1);
+
+ final Module moduleA = createModule("a.iml");
+ final ModifiableRootModel model = ModuleRootManager.getInstance(moduleA).getModifiableModel();
+ myModuleRootListener.reset();
+
+ model.addContentEntry(vDir1.getUrl());
+ model.commit();
+
+ assertEventsCount(1);
+ assertSameElements(ModuleRootManager.getInstance(moduleA).getContentRoots(), vDir1);
+
+ vDir1.delete(null);
+ assertEventsCount(1);
+ assertEmpty(ModuleRootManager.getInstance(moduleA).getContentRoots());
+
+ File dir2 = new File(root, "dir2");
+ dir2.mkdirs();
+ final VirtualFile vDir2 = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(dir2);
+
+ vDir2.rename(null, "dir1");
+ assertEventsCount(1);
+ assertSameElements(ModuleRootManager.getInstance(moduleA).getContentRoots(), vDir2);
+
+ // when the existing root is renamed, it remains a root
+ vDir2.rename(null, "dir2");
+ assertEventsCount(0);
+ assertSameElements(ModuleRootManager.getInstance(moduleA).getContentRoots(), vDir2);
+
+ // and event if it is moved, it's still a root
+ File subdir = new File(root, "subdir");
+ subdir.mkdirs();
+ vDir2.move(null, LocalFileSystem.getInstance().refreshAndFindFileByIoFile(subdir));
+ assertEventsCount(0);
+ assertSameElements(ModuleRootManager.getInstance(moduleA).getContentRoots(), vDir2);
+ }
+
public void testProjectLibraryChangeEvent() throws Exception {
final LibraryTable projectLibraryTable = LibraryTablesRegistrar.getInstance().getLibraryTable(myProject);
verifyLibraryTableEditing(projectLibraryTable);
@@ -68,16 +109,33 @@ public class RootsChangedTest extends ModuleTestCase {
verifyLibraryTableEditing(globalLibraryTable);
}
- public void testProjectLibraryEventsInUncommitedModel() throws Exception {
+ public void testProjectLibraryEventsInUncommittedModel() throws Exception {
final LibraryTable projectLibraryTable = LibraryTablesRegistrar.getInstance().getLibraryTable(myProject);
- verifyLibraryTableEditingInUncommitedModel(projectLibraryTable);
+ verifyLibraryTableEditingInUncommittedModel(projectLibraryTable);
}
- public void testGlobalLibraryEventsInUncommitedModel() throws Exception {
+ public void testGlobalLibraryEventsInUncommittedModel() throws Exception {
final LibraryTable globalLibraryTable = LibraryTablesRegistrar.getInstance().getLibraryTable();
- verifyLibraryTableEditingInUncommitedModel(globalLibraryTable);
+ verifyLibraryTableEditingInUncommittedModel(globalLibraryTable);
}
+ public void testEditLibraryForModuleLoadFromXml() throws IOException {
+ File moduleFile = PathManagerEx.findFileUnderProjectHome("java/java-tests/testData/moduleRootManager/rootsChanged/emptyModule/a.iml", getClass());
+ Module a = loadModule(moduleFile, true);
+ assertEventsCount(1);
+
+ final Sdk jdk = IdeaTestUtil.getMockJdk17();
+ ProjectJdkTable.getInstance().addJdk(jdk);
+ assertEventsCount(0);
+
+ ModuleRootModificationUtil.setModuleSdk(a, jdk);
+ assertEventsCount(1);
+
+ final SdkModificator sdkModificator = jdk.getSdkModificator();
+ sdkModificator.addRoot(getVirtualFile(createTempDirectory()), OrderRootType.CLASSES);
+ sdkModificator.commitChanges();
+ assertEventsCount(1);
+ }
public void testModuleJdkEditing() throws Exception {
final Module moduleA = createModule("a.iml");
@@ -93,9 +151,7 @@ public class RootsChangedTest extends ModuleTestCase {
rootModelA.setSdk(jdk);
rootModelB.setSdk(jdk);
ModifiableRootModel[] rootModels = new ModifiableRootModel[]{rootModelA, rootModelB};
- if (rootModels.length > 0) {
- ModifiableModelCommitter.multiCommit(rootModels, ModuleManager.getInstance(rootModels[0].getProject()).getModifiableModel());
- }
+ ModifiableModelCommitter.multiCommit(rootModels, ModuleManager.getInstance(rootModels[0].getProject()).getModifiableModel());
assertEventsCount(1);
final SdkModificator sdkModificator = jdk.getSdkModificator();
@@ -192,7 +248,7 @@ public class RootsChangedTest extends ModuleTestCase {
assertEventsCount(1);
}
- private void verifyLibraryTableEditingInUncommitedModel(final LibraryTable libraryTable) {
+ private void verifyLibraryTableEditingInUncommittedModel(final LibraryTable libraryTable) {
final Module moduleA = createModule("a.iml");
final Module moduleB = createModule("b.iml");
assertEventsCount(2);
diff --git a/java/java-tests/testSrc/com/intellij/unscramble/UnscrambleDialogTest.java b/java/java-tests/testSrc/com/intellij/unscramble/UnscrambleDialogTest.java
index e49823ecdd76..7124d3b6692b 100644
--- a/java/java-tests/testSrc/com/intellij/unscramble/UnscrambleDialogTest.java
+++ b/java/java-tests/testSrc/com/intellij/unscramble/UnscrambleDialogTest.java
@@ -17,6 +17,7 @@ package com.intellij.unscramble;
import com.intellij.JavaTestUtil;
import com.intellij.execution.ui.RunContentDescriptor;
+import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase;
@@ -65,6 +66,7 @@ public class UnscrambleDialogTest extends JavaCodeInsightFixtureTestCase {
private RunContentDescriptor showText(String unscramble) {
RunContentDescriptor descriptor = UnscrambleDialog.showUnscrambledText(null, "foo", getProject(), unscramble);
assertNotNull(descriptor);
+ Disposer.register(myModule, descriptor);
return descriptor;
}