summaryrefslogtreecommitdiff
path: root/java/java-psi-impl/src
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-05-28 17:06:51 -0700
committerTor Norbye <tnorbye@google.com>2014-05-28 17:06:55 -0700
commitc667c1f74abd96a2098520effdd5afdff7f0d34b (patch)
treeab650b0e69fb57d40350579d8796da74d8ea49cb /java/java-psi-impl/src
parent0f831a730c50607e2ffd95020875af6185e17734 (diff)
downloadidea-c667c1f74abd96a2098520effdd5afdff7f0d34b.tar.gz
Snapshot idea/138.343 from git://git.jetbrains.org/idea/community.git
363dc51: row color for byte code viewer under darcula 98900f0: external annotations markers: move to fast line markers d5ee2ec: testdata fixed 2780ae5: ensure test class writable b8cdda6: preserve read-only status for class to test 27c5938: test generation: accept same test class name; avoid same test names 55c4e7a: Merge remote-tracking branch 'origin/master' 81c6fb5: PY-11592 Django 1.6: TEMPLATE_DIRS variable in settings.py is not created properly on project creation d4a3220: SQL: per-statement file structure grouping 3f7f1c1: IDEA-125397 Cyclic Expand Word no longer completes numbers 1443a9f: IDEA-125137 Click on failed unit test console output to navigate to test fails when using Groovy test name with '()' in test method name bb1b109: Merge branch 'master' of git.labs.intellij.net:idea/community d92b567: doesn't show empty langs in postfix completion tree 6252558: IDEA-88175 (wrong inspection Contents of collection 'x' are updated, but never queried) 5298c6b: HgCommandExecutor refactoring d215ac2: identify command from WorkingCopy changed to local 3dcf8ce: Merge remote-tracking branch 'origin/master' 8199a13: CCE 1cd6faa: Merge branch 'master' of git.labs.intellij.net:idea/community b2f594a: Merge remote-tracking branch 'origin/master' c2ad3ae: IDEA-119640 Problem with goto declaration of XML attribute defined in XSD 701f9fb: Merge branch 'master' of git.labs.intellij.net:idea/community fada6f1: Add temporary api to allow custom initialization of debug session data a41ecf9: IDEA-123466 Sheet dialogs doesn't transfer focus back then closed ea02814: Merge branch 'master' of git.labs.intellij.net:idea/community c6be0ae: XBreakpointUtil.getShortText() shortens text now 740b6b1: [log] IDEA-125578 Handle empty permanent graph d0891b3: IDEA-125580 - OpenShift: cloning application hangs if switch to another process 11202b9: DevKit: Goto EP declaration in plugin.xml (IDEA-86100) 8ebe9dd: IDEA-125258 ("Unnecessary boxing" inspection is triggered wrongly with overloaded constructors) 55ba38d: IDEA-121467 Quickfix inserts static imports instead of plain imports for inner classes 978a1dc: try with default pattern provider if selected one was not found (IDEA-125581) 8a80f67: leave foreign params untouched (IDEA-119700) 6c8c34c: avoid assert on IDE close with active debug session c68b3d3: IDEA-125344 (Serializable class without 'read/writeObject()' inspection should ignore classes w/o additions fields) ce6deee: IDEA-125558 new debugger: double result in evaluate expression 0315d6f: Merge branch 'svn_18_3' 7dcc19e: fix expression name for postfix template 2c9f426: [meo] restore backward compatibility in single-element CompositeFilter merge a6f23d0: use NavigationGutterIconBuilder 4ab120e: Merge remote-tracking branch 'origin/master' 1c6bfe0: invoke 'install plugin from disk' action from ctrl+shit+a a345e24: IDEA-125542 new debugger: 'rerun' failed tests are lost 53fd954: IDEA-125542 new debugger: 'rerun' failed tests are lost c9716a4: IDEA-124891 Implementation icon in gutter overlaps preview for Icon class Get rid of icons from collapsed areas f54e61d: ObjectsConvertor cleanup 05b53b7: IDEA-125421 diff tool opens wrong file if VCS file deleted via file system 854abe7: + retina variant 0d0dc51: add new icon 2e35935: broken plugins added ad666ec: do not bother users with warnings from external annotation roots 32fe274: stream api: do not collapse loops when body is not throws compatible (IDEA-125541) 972c75d: Lazy load the icon in DependencyValidationManagerImpl. #188 775e4cc: IDEA-124609 Unexpected indentation of anonymous classes 41c5b88: save caret position in evaluation dialog 4ca7c2b: cleanup 5287678: cleanup 7984ec9: IDEA-122538 Implemented "repository supports merge tracking" detection (for both command line and SVNKit) ffbcd16: fixed debugger tests 3d12351: disable postfix templates for coffeescript bfd4b28: ExtendedBuildModel now exposes the project's build directory. 9786fa2: fixing debugger tests 13e4b01: make test light ad7096e: IDEA-125361 (False positive 'Field may be final') 8ef32c8: missing dep e62c3c5: Merge remote-tracking branch 'origin/master' 895353f: extract DevKitGutterTargetsChecker 5c120d4: goto actions: vk_up/vk_down fix [^vasya] 2750009: Merge remote-tracking branch 'origin/master' 5859ed9: IDEA-125486 (Comparison using == instead of .equals() should replace with Objects.equals() instead of the instance .equals() method) 1316de2: PyCharm 3.4 artwork. 03da78e: Merge remote-tracking branch 'origin/master' 0cb2b06: Merge remote-tracking branch 'origin/master' a6d22de: fix testdata; restore again ExpectedHighlightingData 40420a0: quote parameters if win command processor launched with extra switches (e.g. /D) b61f519: Merge remote-tracking branch 'origin/master' f587cf6: require less stack in ResolveClassTest.testStaticImportNetwork 13441f9: Merge remote-tracking branch 'origin/master' 892e199: fix test 6c56888: Merge remote-tracking branch 'origin/master' 1d8d3f1: lambda: ignore results of assignment is used for expression lambda (IDEA-125473) eaa9ce6: method refs: check if interface functional (IDEA-125511) 5e7d32c: edit sources for documentation component; F4 2cf09bb: include window class into diagnostics (met with documentation popup) 2853c95: cleanup code on commit option d2c04b8: anonymous -> lambda: do not collapse to lambda functional interfaces with generics methods, accepted by method refs though c20f9d2: Merge remote-tracking branch 'origin/master' bfc443c: do not visit additional resource roots twice: additional indexed resource root providers can return intersecting paths sometimes 4b7dc58: a less gc-producing ImmutableText.subtext 2dc1af8: optimize ImmutableText memory usage 8dbda1f: [vcs] Log executable validation failure reason 9b3a535: [git] cleanup 52fb0b3: DebugLogConfigureAction: define the default focused component 47956e6: Merge remote-tracking branch 'origin/master' ec369f5: Local History tests tuned for new VFS behavior 6c0132d: Platform: IDEA-125330 Warning about non-project file modification should be merged with Read-only warning and shown in a modal dialog c611e59: Merge remote-tracking branch 'origin/master' b3afb57: Platform: OS X scrollbars can be disabled for diagnostic purpose d300533: Merge remote-tracking branch 'origin/master' a1d5b1c: fix border in dbe table editors 72f2e89: cleanup dccc79d: Merge remote-tracking branch 'origin/master' 5ffae2a: fix class with wrong qname sometimes returned from findClasses 813ab5f: [log] Don't schedule a refresh task if there is nothing to refresh a40d619: [log] Fix IAE when jumping to row #0 in empty table 2d2cf45: [log] set bek synchronously when applying filters to avoid locks 80e3729: Merge remote-tracking branch 'origin/master' c256133: fixed jdi objects leaks c10a0ca: Merge remote-tracking branch 'origin/master' 354d205: Merge branch 'python-fixes' 99c6577: Fixed false positive for 'yield' expressions in lambdas (PY-11663) 5de561b: Fixed false negative for 'yield' expressions in default values of parameters e23c4c0: Cleanup 222ecc2: hide execute in console action if not available a9d038d: Merge remote-tracking branch 'origin/master' 6823565: Merge remote-tracking branch 'origin/master' 26a710e: Merge branch 'modulefileinex-service' of https://github.com/yole/intellij-community into yole-modulefileinex-service 4be8c9b: Convert ModuleFileIndex to a module-level service. b37122b: merge hyperlink merging changes by meo (https://github.com/JetBrains/intellij-community/pull/185); cleanup 68f7fad: IDEA-125248 Incorrect simplify for float c82e10f: Merge remote-tracking branch 'origin/master' b7c5190: IDEA-125357 Throwable at com.intellij.openapi.wm.impl.WindowManagerImpl.isAlphaModeEnabled(WindowManagerImpl.java:359) 5e0039e: Merge remote-tracking branch 'origin/master' e32d36a: path fixed 9989bd2: Merge remote-tracking branch 'origin/master' ec32500: new "Serializable object implicitly stores non-Serializable object" inspection IDEA-62336 9db4420: - switching data buffering only once per state change - upon before file deletion event remove the file from myFilesToUpdate - rename inner class and other cleanup 438a3e2: final in "foreach" loop 0c86e1e: default message for postfix templates e8cef21: Merge remote-tracking branch 'origin/master' e2a7723: don't access disposed excluded entry (IDEA-120622 workaround) 33929c5: don't use checker.xml for dfa (but leave it there for a while, IDEA-125426) d50f08a: Merge remote-tracking branch 'origin/master' 7f8eae7: unification example postifx templates 45a21b2: Merge remote-tracking branch 'origin/master' 0fcb1c3: introduced pycharm_load_entry_point instead of searching for executable through local file system 76c0e94: moved inspections to groovy-psi 7c078e9: path to standardDsls fixed 1e4a913: moved more stuff to groovy-psi 0c48aca: DevKit: ExtensionPointCandidate: target PsiElement, EP-Locator: performance, search without supers 9dd16ef: Merge remote-tracking branch 'origin/master' 1a0533b: Merge remote-tracking branch 'origin/master' e617070: reverted 47fc79d09ef2793cd5fcc468d1fe7454bc5e4265 0375c72: correctly render more collections elements a149338: rearrange actions and added separators in context menus 0e230ea: fixed PY-12970 Extract variable: disable refactoring for parts of comrehensions 4af130d: use IntObjectMap in DirectoryIndex to avoid holding VirtualFile objects e41dedc: faster AdditionalIndexableFileSet.isInSet bb13e6f: Merge remote-tracking branch 'origin/master' f293b00: invalidate cashes stats 8173bf0: app start stats 1578ddf: JavaRearranger: proper processing of anonymous classes. 5580933: DevKit: extract ExtensionPointLocator 42702c9: moved to core ee9fcba: moved ExpressionConverter to psi 8404532: add groovy-psi to the roots for standardDsls loading e61091e: moved to psi f84bdce: export dependency 8c3458e: moved to properties psi 8a342ab: moved to core 0cf35f7: resource/gen ac478b1: moved resources to groovy-psi, regenerated icons 18ab45e: moved to core 1991ad8: moved to psi dc90b9a: cleanup cc0fbf8: test fix 9ed02a6: Platform: IDEA-125277 provide extension to allow non-project file modifications without notifications 817df5b: return code in django_manage_shell for old django versions 2355467: fix django console for PY-13031 remove old code with execute_manager and setup_environ fix django prompt 7b308ab: EA-54820 - assert: ClassMappingNameConverter.getVariants: fixed fd94f78: EA-54820 - assert: ClassMappingNameConverter.getVariants: diagnostics d0c1508: syncronize 'assert' c1ec45d: toString() restored 8142475: replace assertSame with assertEquals when comparing virtualFiles 9ee6a48: IDEA-123484: generate stub type definition for implicit trait type mixing a4094bf: IDEA-123484: multi-trait type dff7733: IDEA-123484: as operator with traits 0eefe8c: IDEA-124932 "Analyze Backward Dependencies" on any class fails with AssertionError: diagnostics d133496: javadoc 03ffdcf: IDEA-118036 Exception editing JSP file: diagnostics 49d5445: escaping redone, now only for double quotes cdca783: GPUB: drop deprecated stuff, parseTokenSmart & cleanup 6aef47f: Merge remote-tracking branch 'origin/master' d001816: PY-12734 Templates in app directories not found with implicit TEMPLATE_LOADERS 4fa70d5: do not write new setting to profile if it has not changed from the default value d38e995: fix for private fields 6e3b903: cleanup ProjectView popup menu and EA-56883 on Java8 a8ca529: Merge remote-tracking branch 'origin/master' f8b1755: revert: make too many mess in testdata to have everything escaped in error messages; or we won't have an ability just to accept actual error message and would have to rewrite it manually 6d3bf6d: IDEA-125464 Non-pinned and non-docked tool windows do not hide anymore f6a8a5e: (IDEA-89870, IDEA-114058) hg4idea: java.lang.AssertionError: Invalid command 51a5628: make exception dialog appear faster for long traces ea09e6e: don't fire UseVirtualFileEqualsInspection on comparisons with this 506a2cb: include anonym prefix in internal canonical text to avoid incompatibility messages with "same" types on both sides 5953b8f: accessibility of private method via anonymous classes fixed e43dbe0: IDEA-122430 Search in class hierarchy: preselect class b290c14: IDEA-125430 do not clear package view attributes a4898d7: Utility method for text alignment ee26a53: [log] Add registry key vcs.log.bek.sort=false. 2147279: [log] Add bek button. 02e5afb: [log] Add GitBekParentFixer for GitLogProvider. 9774870: [log] Create BekSorter. e3177e8: [log] Fix DelegateGraphFacade when applying filters. 56c0dd0: [log] fix VcsLogColorManagerImpl. 313c4b1: [git] cleanup: move method to the only place in tests where it is used a981a80: [git] IDEA-125328 Don't crash if commit/author time is empty a0f6188: Merge branch 'python-fixes' f0bc595: Specify HTTP URL scheme for proxy string passed to 'pip' (PY-12771) 843daaa: IDEA-125237 part II, the considering of static final fields 9213ca5: [log] IDEA-125309 One more fix for a possible deadlock f4b288b: fix gray gap in ComboBox under Darcula and IntelliJ lafs bdeea08: fix java.lang.IllegalArgumentException: Row index out of range when history is empty b553f5c: check for plugin incompatibilities before update for a new version (IDEA-24014) 1fc11e7: cleanup f6f7050: Merge remote-tracking branch 'origin/master' dc5157d: Fix CME in terminal (IDEA-125398). d8b5ecb: IDEA-125378 SQL: Implement keyword-based operators completion d591ab2: IDEA-107350 EvaluateXPath dialog: input field height is too small, text is unreadable 033aed0: IDEA-91663 (Method can be variable arity method shall have an option to ignore methods with multiple array arguments) 2335b92: make test light f0fdc59: IDEA-124590 Java Rearranger: Implement "section" support 61b6ca0: icon class regenerated 67b1070: Merge remote-tracking branch 'origin/master' ce11bc5: Merge remote-tracking branch 'origin/master' 3501998: PY-13018 ForeignKey to model in different file brakes backward references if referenced as APP_NAME.Model 383494f: Package info with links to confluence added 961bf42: Start plugins wizard #29 move plugins saving to beforeOkAction 42c25f2: DevKit: resources, icons, DevKitBundle 36d20ee: fix wrong LAF shown in Settings/Appearance on first run 86cda23: do not show empty Refactoring popup group aa68afd: IDEA-124119 [regression] Breakpoints dialog: checkbox for "condition" field is gone 544238b: Don't draw terminal content out of the terminal panel component (IDEA-125317). fdf377f: Merge remote-tracking branch 'origin/master' 9f9e67e: Don't draw terminal content out of the terminal panel component (IDEA-125317). 635cfcc: show renderer's icon in variables view a44cf2c: Merge remote-tracking branch 'origin/master' 70e83b9: Fixed scrolling issue in terminal (IDEA-125223). 947ef5c: show number of recurrent call in stack frames list a092c29: optimization: avoid unnecessary disk access operations 09d7890: Revert "Fix list selection background when unfocused" 15b772c: rerun browser on performed fix c7d2582: an internal inspection checking that virtual files are compared with "equals" d763d57: PushedFilePropertiesUpdater: don't start dumb mode because of vfs changes outside the project 844d483: compare virtual files by equals, not == b9b3b32: cleanup 82c9f72: cosmetics a8adf75: continue "auto expressions in Coffee" spec 00e17e3: borders for IntelliJ LaF 5857e85: removed another copy of processing files with given set of data keys 782f5eb: Merge remote-tracking branch 'origin/master' 164f48e: make customizable 9fe0fda: jediterm updated to fix IDEA-125385 421f658: selection border 356ac7a: default table render offset 5854fc8: support empty borders 92226c5: Merge remote-tracking branch 'origin/master' e3e854a: IDEA-125287 [new Java debugger] trimmed string value in Variables view f2f3a64: project file conversion: API, @NotNull and javadocs 96a6ad6: IDEA-121475 Row height in "Environment Variables" too low 19e6f54: IDEA-125369 (Error highlighting remains after expanding annotation to normal form) 3a80bec: IDEA-121475 Row height in "Environment Variables" too low After-review rollback 757fb8d: heads, parents and several other mercurial commands should be executed as local commands 6bb121c: IDEA-64250 ("simplifiable annotation" inspection could unwrap single-element array arguments) 54fdb56: [log] IDEA-125309 Fix deadlock. invokeLater instead of Wait 59630f4: Merge remote-tracking branch 'origin/master' cc055ad: fixed PY-12405 --noinput option does not work when running django unit tests 22b7cde: IDEA-122962 - Clouds: perform connection test in background - fix UI breaking on long error message eb65298: IDEA-125287 [new Java debugger] trimmed string value in Variables view ee02141: sources roots without sources converted to resource roots f2d9cda: @Nullable 2c2bc76: remove hardcoded RED color in tooltips 16d79c0: add module dependency [debugger-impl] -> [util] 2ff22a8: fix focus border around selected elements fabedf6: for indexed refactoring d4d6b60: sources roots without sources converted to resource roots 09c92d9: invalid source roots removed d750e35: XDebugger: Added myCustomTopPropertiesPanelWrapper to XLightBreakpointPropertiesPanel a1a393b: IDEA-124402 Exception during choosing input XML file 07e7838: IDEA-125289 Unexpected navigation after folding After-review fix 903857f: write action 268b90e: IDEA-124119 [regression] Breakpoints dialog: checkbox for "condition" field is gone - added mnemonic 2b3c1e1: notnull 2df4494: moved to psi a708897: notnull 90859a3: moved to psi a50eb7d: moved to psi, reduce dependencies 0a59e6f: notnull 76b18d8: moved to core 27e528f: continue "auto expressions in Coffee" spec fix NPE - absoluteLocalPathToSourceIndex 8a7ce9b: ensure fonts are not lost during collapse/expand, second popup shown, etc 0282f9e: IDEA-125047 Wrong error in XSLT injection d8f9f2b: Merge remote-tracking branch 'origin/master' 3baeea4: try to highlight only wrong argument in inapplicable call 607732e: ensure scrolling finished before popup is shown 7e77395: include build target info in error message for unexpected errors 1676779: IDEA-123049 Rearrange Code is breaking code (Code Style > Java > Arrangement) f91bf07: capitalization corrected 8f14954: IDEA-125302: The Analyze Stacktrace menu option remembers only one log file across multiple projects 7520a18: notnullification 94e42a8: don't warn on annotations containing errors 90a4b5c: make test light b2fc5b1: allow xml escaping in test highlighting data 3794f56: Merge remote-tracking branch 'origin/master' 68565ae: PY-2980 Unresolved reference for ForeignKey defined as string d923e07: IDEA-122956 Popups in Project Structure dialog have wrong initial size sometimes 202643b: init "auto expressions in Coffee" spec a23319a: cleanup 552c2c5: cleanup cb9b56b: cleanup b719055: Merge remote-tracking branch 'origin/master' 67ec3fc: IDEA-125269 List: bad selection BG/FG color cfa83df: use JBColor cb3f677: use default color scheme if using darcula color scheme with default LAF 1b9cdd8: get rid of unused DirectoryInfo.orderEntries field dd3c283: IDEA-124793 Editor gutter background not painted, gutter icons displaced 9f9a8b5: IDEA-121475 Row height in "Environment Variables" too low 98c8696: apply code cleanup after code generation, let's see how it would work on the long run (IDEA-124904) 7c15dce: cleanup tools extended a915a2d: update editor notifications on roots changed c21f106: check app directory first (IDEA-125294) c731f05: bomb test 9424172: Merge remote-tracking branch 'origin/master' 61fd17b: IDEA-125189 new debugger: pause doesn't select thread in frames combo c4f4f08: IDEA 123484: fix test ba16a8c: move all header into starting script for django console (PY-11728) dbe0fc8: IDEA-121687 New module->Ruby on Rails doesn't allow to specify sdk IDEA-121685 New module->Ruby has confusing UI 6db5e53: HgCommandExecutor refactoring (IDEA-119330 Reorganize mercurial command execution ) 3066cd3: IDEA-124119 [regression] Breakpoints dialog: checkbox for "condition" field is gone fbdaf43: foreach simplification + for in js postfix template 77e2c15: ignore 'winShellScriptingQuoting' test if not Windows 77df25e: AnnotateStackTraceAction in now reusable a1b2bed: Merge remote-tracking branch 'origin/master' cb8a9f0: add module dependencies: do not show duplicates (IDEA-125033) f5656e8: gutter icon for external annotations (IDEA-39633) bb5631c: action to change assignable var type (IDEA-125234) ec9a61b: extract method: redundant cast treatments (IDEA-125259) 68f0af6: IDEA-125262 Can't create Django, AppEngine and other specific Python projects 6ebbcc6: cleanup e11cf17: introduce process queue to auto-clean tossed resolve results 1a6a08f: compilation 2855b05: groovy sucks 11ba843: moved to psi 726502f: moved to psi 9fdcc12: removed static interface inheritance to reduce unnecessary dependencies 77522ae: inline GroovyFileType.GROOVY_LANGUAGE a093f0d: introduce groovy-psi module 65b4b98: moved to ui-ex 4f7b33b: CopyPastePostProcessor interface converted to class so incompatible plugins won't break copy-paste functionality (and exception will be shown only on first invocation) c946899: removed unused action to lessen dependency lang-impl on vcs-impl 0cb7117: removed unused code to get rid of dependencies from lang-impl to vcs-impl 68c8c32: some dependencies from lang-impl to vcs-impl removed a61b41f: IDEA 123484: support for trait fields. Accessors and pack__name fields abe983d: IDEA 123484: get rid of PsiImplUtil.isTrait(PsiClass) 98777dd: Gradle: nonclasspath finder updated to search psi classes in groovy sources 50c85d4: OC-9949 Breakpoint editing popup layout is broken e7884cc: vcs specific classes moved from lang-impl to vcs-impl 47fc79d: PY-12810 "imported" urls are not supported by {% url %} tag ( "patterns +=" now supported) 535e2f3: svn: Refactored SvnConfigureProxiesDialog - execute "svn info" as "test connection" implementation (instead of direct SVNRepository usage) 4c22b04: svn: Refactored BranchMerger - get latest source revision using InfoClient (instead of direct SVNRepository usage) 2046a89: svn: Refactored SvnUpdateEnvironment - get latest repository revision using InfoClient (instead of direct SVNRepository usage) f024c0c: svn: Refactored SvnUpdateEnvironment - removed unnecessary parameters, code simplified 39e5d54: svn: Fixed LatestExistentSearcher - ensure repository relative url starts with slash (for correct relative urls comparison) 65370cd: svn: Refactored LatestExistentSearcher - get latest repository revision using InfoClient (instead of direct SVNRepository usage) 6c0f1f1: svn: Refactored LatestExistentSearcher - fixed warnings, rewritten recursion with while loop d4fd095: IDEA-125237 (Misordered 'assertEquals()' arguments: support non-primitives) a11c2bd: svn: Refactored LatestExistentSearcher - check if item exists in given revision using InfoClient (instead of direct SVNRepository usage) 957aebe: svn: Refactored LatestExistentSearcher - use repository url passed as parameter (and not resolve repository url by itself) a4fcdde: IDEA-125289 Unexpected navigation after folding 894bbbd: fixed no toString value 8168063: replace @Nullable findInstance with @NotNull utility with logging (EA-55734) 061c4b0: compilation fixed: use dependency on 'annotations' module instead of 'annotations.jar' a454164: style 30287ac: IDEA-125285, EA-645852: AppCode exception on start up +review c08b9bd: Merge remote-tracking branch 'origin/master' 546f5fd: IDEA-86100 DevKit: support "Go To Related File..." sort after/before template files f4d0b25: svn: Refactored SvnUtil.remoteFolderIsEmpty - check folder content using BrowseClient (instead of direct SVNRepository usage) 12a5319: tweak insents 0e3c26e: [log] allow more results for the first request to get filtered results 06aebe0: Emmet: remove redundant borders from preview 2012b06: IDEA 123484: clashing methods from super-traits. Prefer the method from the last trait 1ba5924: IDEA 123484: access to super method with super. qualifier 205f80d: IDEA-124891 Implementation icon in gutter overlaps preview for Icon class c17387a: IDEA-86100 DevKit: support "Go To Related File..." 298ee51: Merge remote-tracking branch 'origin/master' 3c638cb: show variable name for arg_x and slot_x variables 3280f4f: [log] LOG.info the ISE (Joiner failure), not LOG.error f2e2a1b: [log] Joiner: use THashSet with much faster removeAll a32815c: [log] clear IntStack in DfsUtil. a5380f0: [log] Optimize IntTimestampGetter. bba2e43: [log] Optimize PermanentGraphImpl#getAllCommits() 02daba7: [log] Move GraphCommit implementation to vcs-log-graph 13378bb: [log] Add vcs-log-graph-api to root build modules 057c82c: fix author width update a1fe976: [log] Rewrite the process of refreshing log & building the DataPack 5cffaba: [log] Add sort type to PermanentGraph#createVisibleGraph. 081b82e: [log] Fix arrow. fa93a67: [log] Fix edges sort problem. 42874b2: [log] Create SmartDeltaCompressor. 89d784b: [log] Create new PermanentListIntToIntMap. It is useful for IntDeltaCompressor. a4141ad: [log] Fix NOT_LOAD_COMMIT. 82f85bd: [log] Fix color id. de26777: [log] Extract GraphLayoutImpl from GraphLayoutBuilder. 1b43a23: [log] Add DelegatedPermanentGraphInfo. 50b2fc4: [log] Create PermanentGraphInfo & PermanentCommitsInfo. 3cd6eb1: [log] performance fix. f5413a0: [log] PermanentGraphBuilderImpl - initial version 9210824: [log] Always request ordered recent commits c4804c2: [log] move getFilteredDetails to VcsLogFilterer 63b4315: [log] use interface 2ca8eac: [log] Remove obsolete ContentRevisionFactory ef6d65e: [log] Add new vcs-log-graph-api module in ultimate dd97706: [log] Fix jump to not load commit. 0510209: [log] Use trove HashMap. 8476e99: [log] Optimize in PermanentCommitsInfo for case CommitId == Integer. 3b585f0: [log] optimize full graph build. 2441f57: [log] Generify VcsLogJoiner. 954a4c2: [log] Fix mouse over action. 44505e8: [log] add equals & hashcode for PrintElement. 5d94e56: [log] Collapse all. 64433f9: [log] Fix oneOfHead(). 50388d4: [log] fix CurrentBranches. 24275af: [log] Fix CollapsedVisibleGraph. e86fb65: [log] performance problem 20b21f2: [log] Fix with for graph cell. 108183c: [log] Fix EdgesInRowGenerator. 4cc1adc: [log] Fix underdone nodes. e34b093: [log] Fix colorId. af5b227: [log] Drop VcsCommit. 616274e: [log] COMPILED! 4211697: [log] fix DataPack 3cbb213: [log] Change signature of GraphFacade#getAllCommits(); 545ef9f: [log] Rename getTime() -> getTimestamp(). 6fbc6f6: [log] Rename getHash() -> getId(). 33a7f03: [log] compilation fix. 4cb058c: ~~ [log] Add module dependence. bc7a666: [log] Add DelegateGraphFacade. b3d2206: [log] Add getVisibleRowIndex to VisibleGraph. 0a77ab3: [log] Make FilterVisibleGraph. c9795ab: [log] Make CollapsedVisibleGraph. 5be555e: [log] optimize import. 6650399: [log] Add branchNodeIndexes in PermanentGraphImpl. 293ef9a: [log] Add constructor. 15dd5b1: [log] Add IdFlags. 34c687e: [log] Fix PermanentGraphImpl. a4c2797: [log] Move method from CollapsedVisibleGraph to AbstractVisibleGraph. e671eb1: Extract deprecation warnings only if they present in text. b30e3f0: [log] In GraphColorManager JBColor -> int(colorId) && int -> CommitId 340ba68: [log] Fix EdgesInRowGenerator and add several tests. 1ec4cda: [log] Add LinearGraphWithElementsInfoParser. e3369e2: [log] Remove unnecessary BufferedReader usage. bd18165: [log] Remake test package structure. 4a67d5e: [log] Fix equals fox CommitId. 408d6878: [log] Remake tests. 62cad84: [log] Small fix. 88e5afd: [log] Remove newgraph package. c3fbf99: [log] Add Flags#setAll(). b8c1375: [log] Move DfsUtil. 770aff8: [log] Remake image printer. b49cea0: [log] Remake PrintElementsManagerImpl. 97c5f6d: [log] Add AbstractPrintElementsManager. fe3a680: [log] Create new PrintElementWithGraphElement. 80d21e9: [log] Remake ContainingBranchesGetter. 5996a24: [log] GraphCellGeneratorImpl -> PrintElementGeneratorImpl. 6b56353: [log] Generate equals & hashcode methods. 55b4219: [log] Remake AbstractPrintElementGenerator. 938956f: [log] Add simple implementation of PrintElements. 3784b45: [log] Remake EdgesInRowGenerator. ad7d357: [log] Remake FragmentGenerator. 1a1d238: [log] Add draft of CollapsedVisibleGraph. 95a51cd: [log] Add AbstractVisibleGraph. b8a9f02: [log] Fix CurrentBranches. 8722519: [log] PrintedLinearGraph.getLayoutIndex() -> getGraphLayout(). f6467e4: [log] Add draft files for PrintElementGenerator. 6f8ff22: [log] Add FilterGraphWithHiddenNodes. 6563dea: [log] Some changes in CollapsedGraphWithHiddenNodes. 0994121: [log] Add constructor. ad25cff: [log] Remake GraphWithElementsInfoImpl to CollapsedGraphWithHiddenNodes. 3abc13e: [log] Extract inner class. c9a5fb2: [log] Add LinearGraphAsGraphWithHiddenNodes. 3b2baa1: [log] Fix update event in GraphWithHiddenNodesAsPrintedGraph. a9bee1b: [log] graph.impl.visible.utils -> graph.impl.visible.adapters 2f4b46f: [log] Move all from vcs.log.facade.utils -> vcs.log.graph.utils. 579ee01c: [log] PermanentGraphLayout -> GraphLayout. 8e14dd2: [log] Add draft of PermanentGraphImpl. 6e5d35f: [log] Remake PermanentGraphBuilder to PermanentLinearGraphBuilder with CommitId. 313093e: [log] Remake PermanentCommitsInfo with CommitId. 8151d60: [log] Create new internal graph api. 797b59b: [log] Add PermanentCommitsInfo. 5e909f3: [log] Add IntTimestampGetter. 5049be6: [log] Drop unnecessary method from PermanentGraphLayout. adfa4b0: [log] DfsUtil: use IntStack. 24768a4: [log-api] Update api. b02fc19: [log-api] Update api. d1fce17: GRAPH API e7526b1: svn: Refactored BranchMerger - removed unused fields/parameters 65bab47: DevKit: refactor InspectionDescriptionNotFoundInspection 5a18a7e: svn: Refactored SelectLocationDialog - get repository root url using InfoClient (instead of direct SVNRepository usage) caa8262: support ContinuationWebSocketFrame cf56368: Calculate future feature only if it present in text. 1a79f0f: svn: Refactored SelectLocationDialog - removed unused code, removed duplication 445763e: do not calculate mirror file for each access to jar file 5cfdfeb: fix IllegalArgumentException: The file: doesn't exist. 49b2232: AC/C++: EA-56192 only allow directories in NullFileReferenceHelper roots +review CR-OC-1544 30d5ad4: js postfix template: parenthesized 3ce7f95: quote param containing ampersand for .bat files 0008feb: Based on comments for http://crucible.labs.intellij.net/cru/CR-IC-5400 * quote param containing ampersand for .bat exe files * improve test to actually execute .cmd/.bat files 2fb4ba8: reverted 69ea226: custom strategy bug fix, new Weak key soft value map e7ed4bf: moved to ui-ex bc74ad3: moved to core-impl c2083de: [log] Handle the case when null value is passed to the renderer 86c197a: IDEA-125227 New debugger: please disable switch from expression mode to code fragment mode when evaluating multiline expressions 519d350: Gradle: discover local gradle sdk sources local gradle dependencies 911aa11: inline GroovyFileType.GROOVY_LANGUAGE 9668cc5: renamed 06ad15b: javadoc, IncorrectOperationException replaced with UnsupportedOperationException as more standard 940d174: javadoc, cleanup, removed bulk operations since they are not jdk8 compatible anyway 7e1f445: AC/C++: EA-56192 allow files in NullFileReferenceHelper roots +review CR-OC-1544 ce9a38c: fixed "unmute on stop" action 2ca53a3: Calculate dunderAll in stubs only if file text contains __all__. 80cb0da: fixed PY-12970 Extract variable: disable refactoring for parts of comrehensions 1fe1440: typo 317cd70: fixed tomcat tests 47060bb: Merge remote-tracking branch 'origin/master' f343aa2: simplification postfix template fb45e36: Gradle: nonclasspath finder updated to search psi classes in groovy sources 897595c: Gradle: EA-54734 - assert: JavaSourceFilterScope.<init> 58d3c58: Gradle: EA-56552 - assert: NonClasspathClassFinder.findClass 3003df2: change class signature: process diamond (IDEA-125236) 479578f: move edit settings down 0da1a20: ensure expression valid, initializer expression should be already replaced (IDEA-125231) 57fa2db: fix tests 30d1d10: select and scroll to most recent revision (IDEA-60345) e54ffc6: scroll tree view file history to most recent change c3d8951: make scroll to selection in file history work better 90de406: support content loading for resource files from output roots (needed by some annotation processors) 6faa3ff: remove unnecessary addClass() calls 113323e: doc test: assert HTML body text only 96d93a8: add new not expression test c7ce438: cleanup 78a4030: Merge remote-tracking branch 'origin/master' 57f67f8: IDEA-125184 Mac launcher should not crash when IDEA_JDK env. var. does not correspond with JVMVersion from Info.plist. e7a2262: js postfix templates: not expression 7877bab: IDEA-125129 I would like to reopen IDEA-117698 3b26929: move jql lexer to gen source root 6723047: postfix template: js introduce variable be8ee4f: refactor expression postfix template with chooser cae5144: cache ClasspathCache.transformName 4119688: javadoc typos d12d8bd: [log] IDEA-116867 Use the same root renderer for author as for message ee1a2cf: IDEA 123484: traits are supported only since 2.3 version 86ffe87: IDEA 123484: complete trait keyword and extends/implements lists in traits 91875b6: IDEA 123484: trait methods are not allowed to be protected 5462267: IDEA 123484: clena up utils and tests 4e540d4: use previously calculated data from PHM if no read right now is performed: calculate the value instead of wait for IO to complete 53e5113: cvs file history in Browse CVS Repository 727804a: AC/C++: EA-56794 - assert: FileReferenceSet.getAbsoluteTopLevelDirLocations +review CR-OC 3326c46: cache already checked plugins (IDEA-124828) 0f9f39d: auto expressions spec: done duplication check 5d4a66c: auto expressions spec: init duplication check 901d664: Merge branch 'github-theme' f55b604: Updated JavaScript and CoffeeScript colors 9c26625: Updated Buildout, GQL, ReST and YAML colors 2bc7a23: Updated Django and Mako templates colors a027a36: Updated CSS, LESS and SASS colors f1a44bc: revert couple, 135 compatibility 8d2b706: change method return type on call site (IDEA-125166) 3316081: Updated HTML and XML colors e4bbd52: move diff utility classes to Util module 54754f3: add evaluate expression action to variable's context menu f915ea5: fixed NPE in evaluate handler 954f437: Updated default colors and set many Python styles to inherited 6c992e4: fix compilation ae76055: Fix list selection background when unfocused 98f8e9f: don't highlight if psi was invalidated (EA-56385 - PIEAE: PsiUtilCore.ensureValid) 9c76516: prevent SOE when creating PIEAE (EA-56284, EA-56810, EA-56809) 968779e: IDEA-123484: override/implement actions are aware of traits 1f6e60a: IDEA-123484: trait -> type_definitions token set c4764e6: IDEA-123484: use newHashSet(map()) instead of map2Set(), import static ContainerUtil.* ae3fce2: Sorted options 08ce945: svn: When looking for cached credentials for given url/realm check also if there are cached credentials for its parent urls/realms (and use them if found) ac6e1c9: IDEA-124077 Enum code reformat destroys enum a92b91b: rearranger @Nullable replacement 1311963: [diff] Simplify the "gear" button implementation e910c1c: fix Cut functionality and tests 9c75b87: [vcs] Simplify the gear action group definition 1dd998d: BlockSupportImpl: assertFileLength2->reportInconsistentLength 57b759f: IDEA-124712 ctrl-alt-space: duplicate completion variants 83a2697: IDEA-125194 Strange control-flow inspection 0f495ff: [git tests] cleanup ce0259e: svn: Refactored RepositoryLoader - use common client factory model (instead of direct SVNRepository usage) d7f2104: WEB-12199 Grunt tool window fails to load Gruntfile tasks, when an "&" is in the path e718569: Merge remote-tracking branch 'origin/master' c8485a5: Merge remote-tracking branch 'origin/master' e79e97b: js potfix templates: notnull & null 2c935f8: [git tests] Fix expected-actual order 81c101c: simplify settings (CR-IC-5127) c061e81: distinguish generated roots during rename/move warnings (IDEA-125147) 61460f7: combine all jdk jars into one marker in OutputChecker b49b8fd: [git tests] Remove a useless blinking test 053f37f: [git tests] Log index.lock error 6616b1a: [git tests] Log debug GitHandler stuff if test failed fed92bd: fixed PY-12991 Missing Added by user mark on paths added to the interpreter abfedef: throw IllegalStateException if number of keys in node to split is different from expected 73218a0: platform: plugin descriptors loading optimized a64c39b: EA-56305 (delegate FS used for parenting) 02521d2: [vcs] Add toolbar to the Shelf d9c049b: [vcs] ShowHideRecycledAction: don't proceed if project is null, cleanup db69de7: svn: Moved several classes to corresponding packages ("org.jetbrains.idea.svn.lowLevel" to "org.jetbrains.idea.svn.svnkit.lowLevel", diff related classes to "org.jetbrains.idea.svn.diff" package) 5546e02: Addede GitHub color scheme fd96e01: fixed tests 9a1a122: Merge remote-tracking branch 'origin/master' 850f818: Revert start_new_thread override. 5c8997d: svn: Refactored RepositoryBrowserDialog.doUnifiedDiff - use common client factory model (instead of direct SVNDiffClient usage) 71d8ba1: svn: Implemented "unified diff" clients (both for command line and SVNKit) e4dc06d: Merge remote-tracking branch 'origin/master' 02a4391: lazy scope initialization in case of big usage view open fba79fe: Slim. Introduce variable test fixed c816eb8: added javadoc d8f4bdd: IDEA-99541 New run configuration type to run Ant get rid of ProcessHandler.waitFor() e3f9e71: javafx: quick fix to switch to javafx css in property starts with -fx-; make css dialects configurable visible when file-mappings are available (IDEA-125020) 3cccccf: file templates: no NPE if exception doesn't contain message 5f0091f: refixed NPE in PasteHandler ea62a1d: NPE in PasteHandler 9ee678f: flusher on low memory should work the same way as periodic memory flusher to avoid loosing updates [r=Eugene.Zhuravlev] 12a7479: Merge remote-tracking branch 'origin/master' 1e48abe: good code red: nested classes inheritance e190be1: fix test 53b9222: processOverlapping should iterate in order cf632d0: do not open API for abuse 7bae702: refactoring - create both RTF and HTML flavours in one copy-paste postprocessor 66d211f: cleanup 4c253dc: refactor API interface 71ea747: make rich copy work for documents with non-normalized line separators c7f67f1: refactoring dc95443: cleanup 74c97e0: remove impact of ADD_IMPORTS_ON_PASTE setting on other copy-paste-related functionality 897f2ba: unused/static imports 873cada: cleanup 5a50486: @Override aa9f4b5: extracted GroovyRunnerPsiUtil f256b8d: moved ErrorUtil to psi 6243ae7: moved GroovyImportHelper to psi 242a795: removed dependency of GrMethodBaseImpl to code style. The clients of GrMethod.setReturnType() should call GrReferenceAdjuster.shortenAllReferenceIn() if they need to 5bdb72f: merged PsiUtil and GroovyPsiUtil f4c8ed4: moved to psi 939b86b: moved method to GroovyPsiUtil 9206109: moved to psi 532fdb0: notnull b6594a3: moved to core 91d1a5b: moved org.jetbrains.plugins.groovy.intentions.utils package to psi 55bb9af: moved to psi b2b65c2: removed dependency on platform 68910bc: moved to psi bda7716: moved to psi 91e946e: moved to core a95cbce: cleanup 7ca3394: cleanup 41b594c: notnull 00f6e5d: correctly identify class usage in dumps 28c6a3c: XML/HTML: move inspection descriptions to proper modules 47f5b9d: Revert "[vcs-log-graph] use Couple" 510ba46: fixed load project test 269e211: Code clean-up. 99f2434: fixed groovy debugger tests a32c4c4: add new test xml map serialization 1b65256: EA-55646: debug output 00964e5: update according to changes in GotoActionModel 9ea4344: rollback 7de12bf: Mono<T> == Function<T, T> 1c4c11b: [svn4idea] use Couple c159007: [testFramework] use Couple 00c700f: [vcs-log-graph] use Couple b8aa01b: [vcs-impl] use Couple 2d2df3b: remove unnecessary static 27c06dd: [ui-designer] use Couple 891b65f: [lvcs-impl] use Couple 9f2118c: [vcs-api] use Couple 31bd437: [properties] use Couple de97b7f: [platform-api] use Couple bbc1d35: [platform-impl] use Couple 7347cd3: [extensions] use Couple fb4d104: [idea-ui] use Couple 756e0ad: [hg4idea] use Couple 5bf1a92: [java-analysis-impl] use Couple ccb6b7c: [java-impl] use Couple c8b9199: [java-indexing-api] use Couple c04909d: [java-psi-api] use Couple d3278e6: [java-psi-impl] use Couple 70fcb07: [javaFx] use Couple eaed3bf: [jetgroovy] use Couple 526441d: [gradle] use Couple 3e1c9d1: [lang-impl] use Couple 7afb583: [dom-openapi] use Couple bffa11b: [debugger-impl] use Couple e9254bf: [github] use Couple 8fc8555: [git4idea] use Couple 187dd78: [vcs-impl] use Couple 2985542: [platform-impl] use Couple 47797e5: [core-impl] use Couple a583560: [core-api] use Couple a8727c8: [compiler-openapi] use Couple 9d30723: [compiler-impl] use Couple 1a54d31: [common-javaFX-plugin] use Couple e25eff2: Merge remote-tracking branch 'origin/master' 3974fdd: Fixed console debug for remote interpreter (PY-12959). db0de10: vfs: .zip file cache reset fixed e677a69: Remove double borders d54e0b0: svn: Refactored RepositoryBrowserDialog.doGraphicalDiff - use correct client factory depending on settings (and not always factory for SVNKit) c7313cf: Merge remote-tracking branch 'origin/master' 18844ff: PY-12810 "imported" urls are not supported by {% url %} tag (fixed quotes trouble) eeab21a: svn: Implemented diff for "url + url" pair for command line 3c6cccf: Data Views specs d47c2cd: EA-56596 - CCE: XmlLanguageInjector$.visitElement 7d729ca: platform: let out/err readers have independent policies e829e8c: store vfs charset in user data 8f05759: IDEA-121961 Debugger: evaluate from variables doesn't include context 0829ee7: better fix for IDEA-125082 90d6990: new inference: separate caching 8148aa2: filter out elements not matching scope (IDEA-125178) b1b6025: extract field from auto closable (IDEA-125141) 827e889: show the notification with a delay to avoid blinking when "too much output" ceases quickly a38bfd3: calculate editor notifications in a single background thread eae74d2: Cache enabling b6b3618: EA-56566 Fix NPE in TaskItemProvider.dispose c77cd7b: Merge remote-tracking branch 'origin/master' 714b3df: fixed PY-12698 Noticeable hang when selecting not yet added virtualenv as project interpreter b44ffe6: EA-56384 Fix NPE in JiraRepository.discoverApiVersion aef1f3e: do not show static node if empty 4c4b111: java-xdebugger: JRuby breakpoints handler a49b8ff: java-xdebugger: fixed tests 31434a5: java-xdebugger: IDEA-125088 Debugger: Evaluate Code Fragment works like Evaluate Expression 11d6bce: java-xdebugger: IDEA-125081 Debugger: Force Step Into works like simple Step Into 7c6f28c: java-xdebugger: allow method calls in quick evaluation with alt 428a04e: use editor font in expression combobox 1b7a152: java-xdebugger: correct context for watches evaluation e4d5f88: java-xdebugger: store java breakpoints in xbreakpoint's user data 3f3fdcd: java-xdebugger: fixes after review a542026: java-xdebugger: use correct context for variables calculation 2a64442: java-xdebugger: IDEA-125035 Debugger: breakpoints: unmute on finish: inconsistencies between behavior and appearance 4f64e19: java-xdebugger: IDEA-125037 Debugger: "Watch method return values" setting label is changed on stop f1de6f7: java-xdebugger: IDEA-125039 Debugger: Throwable at PsiDocumentManagerBase.commitAndRunReadAction() dca55b4: java-xdebugger: IDEA-125038 Debugger: setting field breakpoint causes IAE at SimpleColoredComponent.append() e1a926a: java-xdebugger: IDEA-125044 Debug: Run to Cursor: IAE at XDebugSessionImpl.breakpointReached() c2dc88d: java-xdebugger: fixing tests d369a04: java-xdebugger: avoid assert on context update b53018e: java-xdebugger: fixed breakpoint tests cd4b029: java-xdebugger: no need to recreate java breakpoints dc17bb0: java-xdebugger: do not store empty expressions 36e4354: java-xdebugger: show breakpoint icon when hit for non line breakpoints 9ade5d7: java-xdebugger: add stepping filter action acda84e: java-xdebugger: show extra array elements on demand 563511a: java-xdebugger: no need for extra constant d7a2306: java-xdebugger: correct context for variables calculation 98cb4bd: java-xdebugger: display object id and correct string coloring f882b59: java-xdebugger: show info messages in variables 1d06412: java-xdebugger: show return value on top of variables b1e62e0: java-xdebugger: fixed incorrect frames refresh with enabled filters e86c7d9: java-xdebugger: simplify external breakpoints handlers 764f536: java-xdebugger: fixed exceptions d21c49b: java-xdebugger: avoid asserts 4f439fe: java-xdebugger: static group and this variable cf699a8: java-xdebugger: variables icons 26a0ffb: java-xdebugger: get nashorn frames this way until we integrate fully 3bf4519: java-xdebugger: correctly handle frame change f0b82ee: java-xdebugger: correctly handle session change feb4620: java-xdebugger: lazy value label calculation 0f99ccd: java-xdebugger: avoid gathering variables with resumed context 6073323: java-xdebugger: do not calculate top stack frames for all threads 4b2ff87: java-xdebugger: avoid NPE 0ac53b8: java-xdebugger: fixed dump threads action d9d1c74: java-xdebugger: fixed memory leaks c83bb60: java-xdebugger: tooltip evaluation support 3b0b8f9: java-xdebugger: expressions language selection UI b025aaa: java-xdebugger: removed duplicated debugger editors provider d6299a6: java-xdebugger: correct context for expression 2293837: java-xdebugger: do not deprecate old setters b0f9849: java-xdebugger: fixes after review af29d44: java-xdebugger: store condition with language and custom info 071b912: java-xdebugger: custom java breakpoint handlers 2635efb: java-xdebugger: add to watch support a3b7433: java-xdebugger: View text action support 570305e: java-xdebugger: filter library frames support dbe29fe: java-xdebugger: jump to object source support aef95ac: java-xdebugger: use debugger thread to store descriptors tree 04571c0: java-xdebugger: mark object 439666c: java-xdebugger: set value prototype - minor extra fixes 3c7f48c: java-xdebugger: set value prototype 9265407: java-xdebugger: support of "view as" action 74a63863: java-xdebugger: drop frame action on the debugger toolbar b09633c: java-xdebugger: restore variables tree state when stepping bf02fe4: java-xdebugger: fixed actions order 1c7a3d4: java-xdebugger: fixed thread name presentation 24fb430: java-xdebugger: correctly calculate frames d5d617a: java-xdebugger: avoid ArrayIndexOutOfBoundsException c160771: java-xdebugger: special icon for current thread 61d146a: java-xdebugger: drop frame action f631088: java-xdebugger: do not show empty type dc9789f: java-xdebugger: rebuild on auto variables setting change 223d0ae: java-xdebugger: return correct active execution stack d225fdb: java-xdebugger: jump to source 59a75a5: java-xdebugger: do not create old DebugSessionTab af21fe9: java-xdebugger: pause support 3aade1c: java-xdebugger: "view as" action prototype ad3f1fc: java-xdebugger: init breakpoints on process attach 8835958: java-xdebugger: dump/export threads actions on the toolbar 8ce7361: java-xdebugger: customize data views action in watches context menu 7252d5d: java-xdebugger: customize thread views action in frames context menu 00ab63e: java-xdebugger: customize data views action in variables context menu f2e28dd: java-xdebugger: use xdebugger's mute breakpoints state 1cdd4f7: java-xdebugger: settings popup support ca891ba: java-xdebugger: imitate old frames renderer ef0745a: java-xdebugger: threads tab support - update on select b857507: java-xdebugger: assert not needed 27d67ad: java-xdebugger: threads tab support 60986c7: toString for line breakpoint 2479d8f: java-xdebugger: threads combo support prototype d66fc12: java-xdebugger: watches support prototype d2fe211: java-xdebugger: variables support prototype ef6369f: java-xdebugger: initial commit: - debugger start - java breakpoints handlers - set/unset breakpoints - simple frames view support f4fb687: EA-56555 (diagnostic) 8b27b16: Cleanup (weird exception constructor) 75f96f6: better corners for Darcula a0fae704: Merge remote-tracking branch 'origin/master' 665e0e1: hang on start up 66df65d: rename test methods to run on java 8 (ClassFormatError fixed) 5898e80: Filter out remote sources dir from extra sys path (PY-12958). 0a0b678: hide service information 2b8c333: fixed type annotations restoring (IDEA-124889) ef7c8b9: new inference: inference in terms of inference variable as type params (I) 0bea7ea: new inference: encapsulation 922715c: Fixed buggy calculateExtraSysPath 6133865: CR-IC-5378 add comment on java.io.File.exists usage instead of vfs refresh b2d382e: IDEA-99541 New run configuration type to run Ant 14a4668: EA-56795 (diagnostic) ee0b565: Cleanup (nullability; parameter type) a95b6d6: Slim. Template languages must be over HTML_DOCUMENT element 3c41d20: Embedding Ruby code into Slim. ba802ea: Merge branch 'master' of git.labs.intellij.net:idea/community 3a51776: Merge remote-tracking branch 'origin/master' 37c2e28: Gradle: extra tooling model build error builder added 4874a78: switch off couple inspection 9ad3184: EA-55850 (a constant used is only available since Win7) 56cea62: resources -> src 78e49f7: Cleanup (typo) 7a4ac7b: EA-56033 (early diagnostic) e52b674: cleanup b55f2ac: WEB-6779 JS Debugger / Variables: Automatically show used variables: mutability 4077052: Merge remote-tracking branch 'origin/master' 8b18eb8: IDEA-123484: independent GroovyLineMarkerProvider. Don't suggest implicit trait methods in implementation list 2f60fb3: IDEA-123484: concrete trait methods are implicitly generated in inheritors a7eb2a0: IDEA-123484: abstract trait methods should have explicit 'abstract' keyword 2fbab8a: lazy Object type in GrLightParameter 44eaa05: remove dependency from Groovy PSI to Groovy completion 18fa4ff: split groovy completion contributor into separate completion providers ce1beaf: IDEA-124731 semicolon or curly brace after constants 3a2dfbd: IDEA-124731 enum constants can be placed on several lines with comma placed on the next line 4bdc91c: lazy light PsiType for fast creation from string. Use it where possible in groovy psi 8c44253: cleanup stub generator 46a6910: IDEA-125082 (Weaken intention for LinkedHashSet suggests AbstractCollection) 38ba59f: fixed PY-12964 add path to the interpreter doesn't work f07444f: uniformly handling class loading from paths containing special symbols like spaces 88eb679: Arrangement: store opened section rules instead of start comments a4e42e3: WI-23285 Arranger: sections is keep added (already existed section is not found) 224ff5c: save some memory by not caching constructors in picocontainer; they're not reused anyway 3a25aee: DevKit: add InspectionDescriptionNotFoundInspectionTest.testHighlightingForDescriptionCustomShortName ed33e55: revert changes that made tests hang fedbb1d9: IDEA-124403, EA-55541, EA-55517, EA-49088, EA-49127 soft wraps recalculation issues 6112926: EA-55847 - AIOOBE: ImmutableText.charAt d2d6f45: cleanup (following review #212) e4f6aa4: EA-56779 - IVFAE: PersistentFSImpl.getFileId 2004f6a: improve description 16bd2ee: add "Suppress for 'Tests' scope" quickfix to "Prohibited exception caught" inspection f96b846: new "'BigDecimal' legacy method called" inspection 2be4b97: better layout for combobox eb6acaf: svn: Refactored RepositoryBrowserDialog.doGraphicalDiff - moved diff logic for "url + url" to SvnKitDiffClient ed5d225: svn: Refactored RepositoryBrowserDialog.doGraphicalDiff - do not wrap obtained changes in custom UrlContentRevision (see c38efc0eaffe39c4ac4250cdd4c2615a321db906) - changes collected by SvnDiffEditor correctly work with "Show Diff" action fb0c65a: InternetAttachSourceProvider: don't sync refresh from outside edt (EA-56768) 9770742: EA-56761 - PIEAE: ClsRepositoryPsiElement.getManager 8317a56: EA-56519 - CCE: PsiDocumentManagerBase.handleCommitWithoutPsi 2ecda67: vfs: create handler as soon as archive root is loaded b9b3a28: Cleanup (unneeded second refresh dropped) 00140af: IDEA-124361 Suggested variable names for Optional variable needs improving b92c65c: svn: Show "changes viewer" dialog even if changes collection is empty (dialog will display necessary information message by itself) 90a5b72: Merge remote-tracking branch 'origin/master' 6eb4127: fixed PY-11909 problem with extract variable a9d6cb1: svn: Moved several utility methods to SvnUtil class 71177eb: fixed PY-11922 pytest problem with marker expression containing spaces f895885: [log] IDEA-124546 enable "Edit Source" from commit list 3a483ab: [vcs] Delegate to the fuller constructor 8bc8177: fixed PY-11929 Insert type assertion should be disabled for references introduced in dict comprehensions de5a5e6: Add new icons for new arrangement section rule 19d7bf9: Merge remote-tracking branch 'origin/master' b61e49e: [log] Trim the hash in go-to-hash action a351cff: fixed PY-12037 long path cause wide menu 5972053: touch file to recompile 3e8ef45: continue WEB-6779 JS Debugger / Variables: Automatically show used variables 0c8bcaa: init WEB-6779 JS Debugger / Variables: Automatically show used variables ce66c08: compute memberFilter only once 1701927: IDEA-124688 Console scroll to the end - jumps on the end of the line sometimes 287390b: be prepared to event log changes when expiring notifications (EA-53620 - IOOBE: MarkupModelImpl.addLineHighlighter) 296a5dc: Platform: deleting shortcut from bound and inherited action fixed d0e540a: IDEA-106517 Exception on welcome screen when using speedsearch 5978682: svn: Refactored DirectoryWithBranchComparer - SVNKit diff logic moved to SvnKitDiffClient fc13a83: IDEA-116057 second-keystroke popup 1fe493a: fixed PY-12120 Invalid caret position after Enter press in unicode strings 69b6e2e: check for UserDataHolder directly 5cd9a8f: svn: Refactored SvnDiffEditor - use File instead of VirtualFile 8511042: diff: add icon for synchronized scrolling 8e9af01: js postfix templates: if, else, return, throw a309ba7: Remove Open Directory action. 23db467: use Couple fc77edb: fixed PY-12195 Changing signature of decorator removes '@' 6a1b621: cleanup 5653e4a: IDEA-124974 NPE from Switcher if 2 tool windows have the same first-strike char f74c773: do not log refresh stacktrace 6da5c0c: OC-9871 fd6d2fa: Gradle: tooling version updated in libLicenses.gant 0290479: use Couple e44b143: use Couple baecc09: use Couple 3a60ce3: use Couple 47f6b1b: IDEA-125121 MacMessages: NPE when parent is null 637a597: do not expand stubs when evaluating getContextName c39f3b1: Gradle: update Tooling API version: 1.12-rc-1 => 1.12 bbfc26b: IDEA-125119 NPE if message for MacMessage is null 5991df3: IDEA-124839 Gradle sync reports "Error:You can't change a configuration which is not in unresolved state!" and "Could not resolve all dependencies" 19c251b: fixed PY-12313 Incorrect __file__ value when running tests in a folder on Windows f9d754d: IDEA-124839 Gradle sync reports "Error:You can't change a configuration which is not in unresolved state!" b186522: @NotNull 4e90ea9: dependency fixed 3e98719: removed lang-api dependencies e5ba40d: removed dependency on platform-api 19444a1: notnull 4a8f5f8: @NotNull 9accb24: moved to core 38f3c11: moved out of psi c4390c4: Fixed IDEA-122488 IDEA 13 1 not using default font [CR-IC-5349] 8667c40: do not update when root name not changed 4569c83: fixed PY-12369 Code Inspection fails for negative default parameter 20c2b28: update plugins: check plugins according to the new version to be patched (IDEA-78385;IDEA-124308) 5f74804: IDEA-124543 sout template formatting f0918e0: fixed PY-12401 inline refactoring looses comments 851fd3b: IDEA-124305 JSP: Import statements suddenly disappearing every now and then 850ea16: typo acac62d: Cleanup (locale conversion; properties grouped) 21152ea: Cleanup (test simplified) a979900: vfs: core JAR FS migrated 4bf38d4: vfs: archive file system 96aad22: IDEA-64312 Maven: frequent .iml changes after exclude/source folder updates; project leak fix 607ba58: Platform: keymap tests cosmetics c6354dd: accept as cleanup tool 85f72e1: IDEA-123379 (Unable to generate toString() with template "+ super.toString()" if sub class doesn't have any variables) 2e1a1ab: fold some IJ boilerplate in console fd7f7a6: remove PSI event nesting because of eager PushedFilePropertiesUpdater (EA-56525) aafb2dc: use ensureValid (EA-56712) 5494673: TodoIndex supports snapshot mapping e676714: myContents shared snapshot index can be reset via clear (due to todoindex dependency on settings) 55f9327: use TW stripeTitle if needed. skip extra popup-step in case of one item. 8b36033: separate NavBar action place into popup and NavBarToolbar places (IDEA-124199) 3e3b44b: fixes for review comments 136d116: move normalizeMemberName to debugger view support b3675f7: IDEA-56033 Mercurial: add support for reverting an uncommitted merge 2b804da: IDEA-124393 Mercurial: Log: user filter applying causes empty log 27272f3: EA-55721 - assert: DbElementImpl.getDataSource 8c49254: EA-56008 - assert: DatabaseVirtualFileSystem.getProjectSafe 42cd37cc: related to EA-56292 - NPE: ComboBoxFieldPanel.createComponent c4a273f: EA-56671 - E: Runtime.syscall bffc362: adjust offset while looking for selector 6ef97d6: EA-56674 - IAE: DbFindUsagesHandlerFactory.canFindUsages c96459f: postfix templates convert configurable postfix list to tree & change store strategy 8481ffc: IDEA-118554 (Inspection suggestion: BigDecimal divide() without specifying a scale and/or RoundingMode) 69d1364: batching tasks to reduce the number of events posted to EDT c4e2bbe: remove useless HideFunctionValuesAction (now we correctly grouping functions) a862f08: Merge remote-tracking branch 'origin/master' 2386bed: testdata for IDEA-24479 760d73e: use manager.getProject (CR-IC-5302) 5c11efb: Merge branch 'master' of git.labs.intellij.net:idea/community 5ab59ac: EA-55808 - ISE: ComponentManagerImpl.getPicoContainer - a more robust fix 543d9f6: Merge remote-tracking branch 'origin/master' 5b53af1: Merge remote-tracking branch 'origin/master' 8de4646: IDEA-123896 Navigate -> symbol action doesn't find overloaded methods 7dc78a8: IDEA-124772 Code completion in import statement: suggestion shows package from "java.lang", but when it's selected "java.lang" prefix isn't 7e77d3d: Merge remote-tracking branch 'origin/master' 4b6debd: Merge remote-tracking branch 'origin/master' ad58ba7: results of code cleanup 1c55611: do not inspect binary files 0feba83: warn about raw arrays passed to varargs method (IDEA-16977) b32b333: assignment fix for super wildcards (IDEA-125031) 6e2f355: EA-56686 - NPE: UnusedDeclarationInspection$$.runInspection afe28ba: provide editor with project - no harm (IDEA-124656) a02113f: Remove class. 304f5dd: IDEA-124097 Structure tool window steals a focus 174a488: Merge branch 'master' of git.labs.intellij.net:idea/community 6a0d559: Remote libraries stored in a directory separated from skeletons 0f964da: aware of not sourcemap file adfec67: fix NPE Field is not nullable: className a0a681e: IDEA-124956 PsiShortNameCacheImpl.getClassesByName() is O(N^2) 5b4eafc: Rearranger: allow nested sections processing b638b32: Merge remote-tracking branch 'origin/master' c7bcc11: make "Unpredictable BigDecimal constructor call" inspection and quickfix more accurate 6ee9d29a: read saved index data by default + save empty indexed results ebece42: WEB-11680 chrome debugger doesn't start due to internal exceptions e2ceeec: WI-4722 Debugger: Ability to skip certain functions with step into. b63b703: continue WEB-11775 'Do Not Step Into' groupings ec71671: cleanup c309c6a: cleanup 0abe2e1: fix tests 51e2856: Merge remote-tracking branch 'origin/master' 1edc667: invalid psi range diagnostics (EA-49842 - assert: ExtendWordSelectionHandlerBase.select) dd4697d: IDEA-124379 Avoid completion lookup glitching 7732843: IDEA-85517 Option to collapse by-default manual defined (editor-fold) regions [CR-IC-5228] 095153a: set explicit locale environment: GeneralCommandLine.getCharset() and LC_CTYPE should be the same, remove dependency on project and application default encodings f4cd58b: DevKit: add InspectionDescriptionNotFoundInspectionTest 75ef7eb: fixed EA-53387 - CCE: PyElementGeneratorImpl.createParameter 440a2e5: Merge remote-tracking branch 'origin/master' f1842c2: fixed EA-56204 - IOOBE: SegmentArray.findSegmentIndex d5747a8: fixed EA-56667 - CCE: ReplaceListComprehensionWithForIntention.createForLoop f72f65c: DevKit: simplify/remove dups in DescriptionNotFoundInspectionBase, add tests 520268f: fixed EA-56673 - IAE: ChangeUtil.copyElement 6edaf52: fixed EA-56683 - NPE: PyStatementMover.moveTheSameLevel e78a1f8: Postfix cleanup af4c18c: fixed EA-56684 - NPE: PyStructuredDocstringFormatter.formatDocstring 51255dd: Merge remote-tracking branch 'origin/master' a6f328b: code cleanup available as intentions (IDEA-38653) 0e05ee3: Fixed a typo. d350749: IDEA-64312 Maven: frequent .iml changes after exclude/source folder updates a34f27b: Fix output handling. 6034330: DB: improve find usages grouping 0756490: scopes combo: filter duplicates, suppress internal-modules 2a680d2: DevKit: extract PluginDescriptorChooser, improve plugin.xml candidates list presentation, fix dumb mode error 598528c: Merge remote-tracking branch 'origin/master' c64f813: hide empty vcs scope when vcs is not configured 2e0f935: update "Select word at caret" to "Extend Selection" in tips (IDEA-124727) cc92f9a: use StringUtil.trimStart() CR-IC-5322#c26136 dfe9c11: DevKit: do not search in non-XML files for ExtensionPoint DOM usages CR-IC-5321 2fa4de5: ActionTestCase kicked 94c3177: fix puppet tests: clear extension cache on point registration 1d3458a: copy reference for directory: copy the relative path from some root (IDEA-92885) 3f1567e: enable CopyReferenceTest.testMethodOverloadCopy dffcdb3: rename "Select word at caret" to "Extend Selection" (IDEA-124727) 2dc0e67: IDEA-124935 Completion font issue on Spring b210fef: private EditorHyperlinkSupport.HyperlinkInfoTextAttributes c394f80: cleanup b3840bc: Cosmetics b05ddda: DevKitBundle: use AbstractBundle 847d67f: continue JS Debugger test framework — stepping spec 578a54b: cleanup cad6541: IDEA-125004 DevKit: support plugin.xml <depends> "config-file" 873fa26: Github: remove test a7ae56f: Github: do not catch OperationCanceledException explicitly 63ef800: EA-52410 Github: do not throw runtime exception on parse error fad9ec0: Github: fix dialog type 3c53f98: Github: remove final 0c7b058: Github: catch runtime exceptions in modal progress f08ff4c: Github: GithubFullPath case-insensitive 0204ba2: access to super members fixed (IDEA-124985) 7ab104a: IDEA-124985 74f3980: IDEA-64312 Maven: frequent .iml changes after exclude/source folder updates 11d2cc4: restore EditorHyperlinkSupport.getHyperlinks for EA 5f8a926: let EditorHyperlinkSupport.clearHyperlinks clear the hyperlinks 9219a05: Attach Debugger in Python console. e85f16d: IDEA-64312 Maven: frequent .iml changes after exclude/source folder updates c5c6471: EA-45164 - more TypeConversionUtil.getSuperClassSubstitutor diagnostics 28d0e2e: javadoc for clearHyperlinks deprecation 1fe25c5: EA-54479 - CCE: CustomFileTypeCompletionContributor$.addCompletions afba911: Emmet: use couple instead pair 3d63853: Custom templates: unify retrieving offset approach 0badce5: png optimization df16471: move generated icon classes to new generated roots 420255e: patched AbstractClassGenerator from CGLIB moved to util module because it's used from InstanceofCheckerGenerator class 92d4c4c: "Node.js Express App" doesn't relate to "Static Web" group f78f659: IDEA-124877 Run Configurations: Allow sort configurations under type or folder node (Exception fix) 7272ef6: remove copyright from intellij splash and about dialogs be38201: manually render copyright 9c0ccb4: +copyrightForeground f4cb6a8: Merge remote-tracking branch 'origin/master' 35f0811: fixed PY-12915 No project interpreter found after project creation aeb677d: Start plugins wizard #28 (be Ubuntu-friendly) ad086fe: Merge remote-tracking branch 'origin/master' c78ae5f: cleanup tool -> inspectionEP b52cf11: Fixed wrong usage. 421efd0: we must avoid use UUID.randomUUID — can cause long network calls 0ea9f4b: https://groups.google.com/forum/#!searchin/netty/netty$204.1/netty/8jf6SPFiN6g/nLg7opwUsxwJ 503f8cd: IDEA-124871 Can't build project if its name contains colon: convert project only when it is used as directory name 5bf5dd0: static methods in interfaces can't be hidden in subclasses (IDEA-124921) ec8f194: Extract execution timeout registry key f599645: fixed PY-12920 **kwargs in constructor parameters disappear after "Add super class call" quick fix 6a9db3b: Extract execution timeout registry key 26baf8f: extract superclass: pass target class in after data 838771a: code cleanup: allow to choose another profile; filter view to show cleanup tools only 2a25c8c: code cleanup (initial) 246bf70: Merge remote-tracking branch 'origin/master' 6e62c61: reverted back dc0ad20 due to PY-12904 IAE: Equal objects must have equal hashcodes 1eb6f78: - do not set databuffering if it was already set - make notifyAll in leave of StorageGuard if somebody is waiting 25ccd86: less lockStorage for put / get operations + store value file offsets in btree enumerator directly 1c8aaa4: lazier reparse range calculation b488d43: incremental reparse should happen only on nodes fully covering the changed fragment (EA-54262) 66da2af: more diagnostics and possible fixes for EA-46770: don't let code fragment documents be gc'ed 79ff607: EA-51141 - IAE: CreateFromTemplateAction$.getActionName 277ffe0: EA-54226 - simplify JavaFileManager, remove "access only after startup activity" assertion 4b22fa6: EA-54691 insert completion char in write action f4f67d2: EA-56504 - read action b515187: less lockStorage for put / get operations + store value file offsets in btree enumerator directly f0bdde8: move serialization of value container inside valuecontainer + added code for saving to use existing bitset used for large index values f0dcc74: magic number moved to registry e211432: check validity of RangeHighlighter 21afe13: [vcs] IDEA-120737 Change Merge button caption to Merge... c5bcb11: [git] IDEA-118125 change url for Detached Head information 60036d0: PY-10016 Namespace support in PyCharm 2.7.3 c02eade: DevKit: highlight <extensions> "xmlns" as deprecated 2b0d162: Devkit: remove non-stub test data 34d6a8e: include PIEAE invalidation trace as an attachment 571bdea: EA-56524 - check for virtual file validity when searching in its document d0a9cac: EA-56551 - don't expand structure view for invalid dom elements 7a6616d: EA-56593 - FindInProjectTask read action 73d32e6: move TraceableDisposable's own trace to the bottom as the least important 3fb8ff0: continue JS Debugger test framework e426c3e: Platform: redefined shortcuts for bound actions work in inherited keymaps + such shortcuts is shown in the UI tree, in spite of being 'bound' (OC-9826) 7859a0d: IDEA-124960 DevKit: "register extension" fix for EP defined in custom plugin bce419f: Devkit: rename/move RegisterExtensionFixProviderTest missed file 9359908: relaxed diagnostics 37894fc: Devkit: rename/move RegisterExtensionFixProviderTest 544ab30: CR-IU-696 - use activationComponent 0194c34: Devkit: add RegistrationProblemsInspectionCodeTest 92e0c60: extract PluginModuleTestCase d5a13c3: rename 28ea4b5: Don't evaluate debugger vars in EDT. 5529340: Fixed args. 5d4bea7: Merge remote-tracking branch 'origin/master' 7846df8: Backported more Pydev stuff including Stackless debugging support and AppEngine debugging fix. 5214a06: DevKit: add XmlRegistrationProblemsInspectionTest 3aa92a1: Merge remote-tracking branch 'origin/master' 3ea1686: Backport some minor Pydev fixes. f80095e: Rename modules. 8e6e512: [log] Don't send performAction request to the graph if below the log fad27ec: Commit document before creating callback fd61469: Allow emmet preview for xmlGenerator only abe4c7e: Fix Emmet preview for big abbreviations c8bb209: Fix emmet preview in injected fragments ddcf07c: Live templates: add diagnostic f5da90c: fix tests on linux (filename case) 5743b43: Merge remote-tracking branch 'origin/master' 48d9080e: Ability to perform force update when there are uncommitted merge added 001903a: clearer test data file name 11fdf63: Merge remote-tracking branch 'origin/master' e72fd1a: Fixed conversion. af0ae88: for CR-IC-5142 bff450e: make test light e3d5657: IDEA-124876 ("Mismatched query and update of StringBuilder" false positive with lambda method reference.) 3f9ce9c: IDEA-106749 DevKit/ComponentNotRegisteredInspection inspection does not handle optional dependencies properly 39f062f: store complete map results for snapshot supporting indices 743ae27: Remove 'Support' from settings name. d6c5e1f: Create thread on attempt to suspend on non existent thread. ad86a82: Merge remote-tracking branch 'origin/master' d42e997: We treat not started threads as alive, to support debugging of Python 3.4 threads created by start_new_thread. cfd0595: IDEA-122909 Mercurial update: clean option 6aae6da: Save all documents added before update and merge actions from branchPopUp 206d45f: SOE 51aa5b4: NPE fix bee86ca: new Pair<TypeA, TypeB>(a, b) -> Pair.create(a, b) d659703: DevKit: add ComponentNotRegisteredInspectionTest 28dce08: IDEA-124032 IDEA plugin: Can't find com.sun.xml.internal.messaging.saaj.soap.LocalStrings bundle command line property set to true by default 262d5a9: IDEA-124871 Can't build project if its name contains colon b3557e9: refactoring postfix templates 20fbada: IDEA-124032 IDEA plugin: Can't find com.sun.xml.internal.messaging.saaj.soap.LocalStrings bundle added command line property (false by default) 2d0c2f9: don't count 'runtime' dependencies when showing a warning about circular dependencies e5e5915: IDEA-124859 Runtime module dependencies are not compiled when run configuration with dependent module is launched c1980f4: check Pair types with actual parameters types 16906b2: IDEA-118714 Problem in automatically changing branch on tasks switching c177312: IDEA-123898 IntelliJ Configuration server : create/manage JetBrains account error 7370dd9: new Pair<TypeA, TypeB>(a, b) -> Pair.create(a, b) inspection for lang level < 1.7 136ade1: fixed PY-4479 Add field to class: select created field for editing, not passed to constructor parameter e7f0c33: add both add field and remove param QuickFixes for the param in __init__ method 00b00b6: Merge remote-tracking branch 'origin/master' 2d20acb: Merge remote-tracking branch 'origin/master' 3b0a609: track PsiFile invalidation trace 68ffeb6: use ensureValid (EA-55092) a51e36f: add PsiSubstitutor.ensureValid (EA-55730, EA-55738) 9f4593b: use Couple in util a249d4e: fixed PY-12825 Remove unused parameter: do not allow to remove last argument after star when refactoring function with keyword-only arguments 4ffed7a: IDEA-121171: fix failed tests c053844: convert testng -> junit e5b9d92: use Couple 5543b2f: use Couple d156a40: convert testng -> junit 43ba882: inspection and quick fix for Couple class 7411352: testdata fixed 4d5b798: restore test 74ff7fd: testAssistance -> DevKit 03640d1: EA-56450 - CCE: JavaSuppressionUtil.getInspectionIdsSuppressedInAnnotation 5455834: IPython should be enabled by default. 25a4149: Fix option label text and size. 514ddf8: Merge remote-tracking branch 'origin/master' b69e716: Return None in case of unknown source. 328fb7d: don't report ignored ioexception f0a2a53: No need to inform about failure. 541a3d3: fixed literal conversion. 11e19f2: IDEA-124877 Run Configurations: Allow sort configurations under type or folder node 6e84490: Do not delete inserted semicolon for statement-based postfix templates 7b768e0: Simplify return postfix template 9e18381: Reformat postfix templates tests f7abe52: Delete dummy semicolon after postfix template expansion 75264a6: Cleanup postfix templates 337ddff: TemplateManager -> service f6cc0f9: use ensureValid (EA-56464, EA-56467) 2b3b0f3: EA-55808 - ISE: ComponentManagerImpl.getPicoContainer c685b88: fix "already disposed" from EditorNotifications de62ac0: Devkit tests: add @TestDataPath ed97d68: PluginXmlDomStubsTest: move test data 7f98202: PostfixTemplateDescriptionNotFoundInspectionTest: rename/move test data 6d49cc4: extract ExtensionPointDocumentationProviderTest aebd2ef: PluginXmlFunctionalTest: cleanup inline test data 2bdefc7: No sets language without project (fix for ui-designer creating over default constructor) 4d0fde11: svn: Refactored SvnVcs - moved ourBusyExceptionProcessor to RepeatSvnActionThroughBusy 81f13d8: PluginXmlFunctionalTest: fix enabled inspections 8656e4d: rename/cleanup InspectionMappingConsistencyInspectionTest 2e6a042: extract DevKitImplicitUsageProviderTest 29ac0ab: PostfixTemplateInspectionTest -> LightCodeInsightFixtureTestCase 494bc38: OS X: fixed NSString and NSOpenPanelDelegate_ leaking add7462: Fix indentation to conform PEP8. 382ab4b: DOM stubs: exclude some dom extenders from stub building 72d5787: EA-56189 - ISE: LocalCanBeFinal.checkCodeBlock 788f777: EA-56308 - NPE: UnusedParametersInspection.checkElement 6dfed9d: EA-56333 - assert: PsiMethodReferenceCompatibilityConstraint.specialCase 606d8ea: EA-56286 - AIOOBE: BringVariableIntoScopeFix.invoke 659e657: svn: Refactored SvnVcs - removed old code that deletes previously used notification groups fec2014: svn: Refactored SvnVcs - removed unnecessary logging 33da31b: make dumb aware 2c7c9e1: IDEA-124663 (Refused Bequest inspection should honor @OverridingMethodsMustInvokeSuper annotation) c37b1a4: Merge remote-tracking branch 'origin/master' 08cf27c: select exact match in install package dialog 64f7299: read access d83af54: accept raw substitutors during diamonds inference (IDEA-124836) 16b6498: [git] fix some editable comboboxes 27a2e0f: [log] Fix transitivity in compareTo 7e86caa: DOM stubs: exclude some dom extenders from stub building bf339b6: Repository refresh added after pull action 8e41d7d: use Couple a285781: +getEmpty b4b6cc6: fixed PY-12660 PyCharm adds quotes in runconfiguration and fails 5f75f69: svn: Refactored SvnVcs, SvnUtil - removed unused code, warnings fixed, code simplified 85c621d: svn: Refactored SvnVcs - updated deprecated VcsListener registration 94af0a5: Merge remote-tracking branch 'origin/master' a26b016: easier logic for indentation in console and fix PY-12542 209eb14: fix for PY-12542 and improve indentation in console logic 9b97079: fill PyConsoleIndentTest with new tests and improve old 2aa7076: fix console crashing on IPython completion (PY-11645) 0dbd022: editor now save file on transition to Python Console (PY-12487) 265a763: move console startup commands to Starting script field in Python Console settings (PY-11728) 74aa6cc: add checkbox for disable IPython in Console settings (PY-7425) 5f5a2bb: restore EditorHyperlinkSupper.addHyperlink for EA binary compatibility af43068: OC-9742 e685f38: less disk operations on integrate 9db3107: fix expected wildcard types f29a167: fixed PY-12679 Remove redundant parenthesis: false negative for duplicated parenthesis in complicated and or statements cc743c3: testdata for JDK-8042508 1ab69ce: stream migration: missed qualifiers restored (IDEA-124820) 8862613: variable type by expression type suggestion (IDEA-124816) 909915f: Merge remote-tracking branch 'origin/master' dc0ad20: fixed PY-12698 Noticeable hang when selecting not yet added virtualenv as project interpreter f91fcdb: svn: Refactored SvnVcs - SVNKit related initialization logic moved to SvnKitManager b67eac0: svn: Refactored SvnVcs - encapsulate access to configured ssl protocols fa6941f: svn: Refactored SvnVcs - inner classes moved to separate files (and renamed) 0da2c6c: svn: Refactored logging logic in SvnVcs - code simplified, duplication removed 250b00c: IDEA-124250 Mercurial branches sorted in push dialog 17bf1db: ignore @org.mockito.Captor (IDEA-124802) 17e28ba: cleanup invalid fold regions (fix console leaks, IDEA-124626) d2ead52: move postfix templates to lang-impl d13a4e1: Emmet: add tests + fix existing ones f9e13cb: Emmet: fix preview for abbreviations with 's' filter 6799aa2: Emmet: move calculating template text into hint alarm b6f41b4: Emmet: parse incomplete more/climb abbreviations 3bc5114: Dispose hint on inner editor released d28aae1: Emmet: performance improvement 0ef5647: Cleanup emmet generator 88dcca7: Emmet: fix logging message 83deceb: Emmet: add new action for preview 14b4449: Fix typo b333197: Emmet: performance improvements, add segments limit. 3d5fcbc: Emmet: show new preview only if it's enabled in settings b53ff16: HTML: enable autopopup after < and & only be5c39d: Brand new emmet preview c8ec330: Extract logger 6ca1101: fixed PY-12786 Python Interpreters: extra space in configuration popup from project creation dialog 1a15783: fixed PY-12824 Remove unused parameter: usages in function calls are not updated 03a2ae2: IDEA-116630 Run/Debug button disabled sometimes after breaking make process (and hanging thread) 07613ed: svn: Refactored SvnKitManager - @NotNull, removed duplication 2c91e9a: restore deprecated EditorHyperlinkSupport.clearHyperlinks for broken plugins 7c1c4b1: fixed PY-12825 Remove unused parameter: do not allow to remove last argument after star when refactoring function with keyword-only arguments 520b4be: fixed PY-12826 Remove unused parameter: remove references in the docstrings 2311a48: some additional checks for consistency b79e433: svn: Refactored SvnVcs - methods related to SVNKit clients/repositories creation moved to separate SvnKitManager class 73c5925: better "cannot create branch from repository with no commits" problem handling it was unclear why "Create branch" option is not available for just created repo. b28779b: IDEA-124570 (diagnostic) 65e5214: merge EditorNotifications requests, update automatically on dumb mode changes 4a210b0: IdeaPluginConverter#getAllPlugins: get rid of isIdeaProject() call (DOM stubs interfering) 87b041d: move postfix templates descr to resource-en 7ef1c6d: svn: Removed unnecessary SvnUtil.formatRepresentation 4c7c29f: Run/Debug buttons stay disabled, thread hanging if external tool configured as 'before launch task' fails to start. 8b762a5: Merge branch 'svn_18_3' 7ee2226: Merge remote-tracking branch 'origin/master' b44a1bc: Removed unnecessary EP, introduced Rename Handler for Python Magic Literals: fixing some tests 6c5b423: revert IDEA-123956 Anonymous class formatting moves all args to the next line (32ae79905cb025f6bc213a925f1f4e58e9d6b8f7) 404cf1a: Merge remote-tracking branch 'origin/master' f0ac2bd: unnecessarily qualified statically imported elements: do not ignore chained calls (IDEA-124806) 6f548f2: skip tests under resources roots 51e7e1c: compiler configuration: distinguish compilable resources (IDEA-124599) 6a76a7e: ignore deleted custom repositories (IDEA-124796) a32723b: postfix template description inspection + tests 85f2823: remove alarm. Make SE faster 32ae799: IDEA-123956 Anonymous class formatting moves all args to the next line [CR-IC-5212] 6094264: Cleanup (unneeded interface) 899e7e3: [git] IDEA-124052 Support remote refs w/o a correspondent remote + test 172a3f9: [git] Don't log error in case of empty config file - it is allowed 95468ea: [log] Don't report the error too often 09f5029: [log] Fail safer if no refs were found at some head commit ea5506c: WEB-10560 Debugger: second Mute Breakpoints invocation doesn't work b967e4a: removed extra unneeded delegate 815a632: for given fragment: calc hash code once and do not use wrapper CharSequenceSubSequence for interning store CharSequence into Map of int -> CharSequence+ 06778a8: cleanup e01a5af3: initial d197ca8: reformat only changed text checkboxes are enabled (IDEA-121171) 1c6ba24: Start plugins wizard #27 cleanup 78e7840: WEB-12106 node-webkit crashes when opening developer tools 61b298f: ^461 don't create invalid range marker 5790679: getter invocation in case of object-backed scope 2a38f58: IDEA-115737 Mercurial problem on Windows when repository replaced right inside disk directory. 7d53080: Merge remote-tracking branch 'origin/master' a7bb442: Merge remote-tracking branch 'origin/master' 459d870: ignore @org.mockito.Spy (IDEA-124802) efa4d64: junit 4 library setup (IDEA-124780) 85f6ea1: IDEA-121171 Reformat only VCS changed text - does not work when editor is not opened 765dacb: cosmetics 753dd85: do not remove contents added by other subsystems, which were run independently from any compile session (e.g. ant build) 6e20824: capitalization f09a084: ensure cancel definitions search on popup closing 95e2ed2: Merge remote-tracking branch 'origin/master' 420f392: WinPty libs for Win XP. 161dd99: Removed unnecessary EP, introduced Rename Handler for Python Magic Literals: fixing some tests e593086: remove unnecessary file f585fcd: make test light 0e4f67f: IDEA-95363 ("for loop replaceable" inspection error) 1e1bb69: fix compilation 3078cb5: restore com.intellij.openapi.roots.LanguageLevelProjectExtension.reloadProjectOnLanguageLevelChange as deprecated ae82d08: IDEA-124688 Console scroll to the end - jumps on the end of the line sometimes 5348fc6: IDEA-124644 Comparison of negative zero with positive zero incorrectly marked as always false 0897305: AIOOBE (IDEA-120790) 86141d8: assertion e461a9bc: IDEA-124755 "Unnecessary {@inheritDoc} Javadoc Comment": do not warn when additional tags are present 4e13faa: Fixed IDEA-118781 Eclipse code style import: White Space: some categories are not applied b306260: Fixed IDEA-124647 Quick switch scheme > switch code style scheme does not work db2e799: don't clear cache for disposed MessageBus, fix tests 4c5d8e6: a higher output threshold for "Too much output" in console to avoid this message on long command lines 5b27a1f: navigate to function source: respect our navigation policy 1a04727: Merge remote-tracking branch 'origin/master' 288ccfa: most specific check: accept lambdas when target type is type parameter (IDEA-124725) 78e9bb7: type parameters should not cause deprecated constructor warning to appear (IDEA-124689) 91f6308: redundant suppressions: take into account alternative ids (IDEA-124690) a2a076c0: lambda -> method ref: reject anonymous class replacement (IDEA-124748) dc73135: accept static methods with body in interfaces (IDEA-124745) e4a77b6: check suspicious ConcurrentHashMap.contains (IDEA-124698) 35206e4: uncomment testdata 2ae7053: check inferred type test 4cefdc5: testdata for IDEA-124547 51f1e0e: add option to ignore specified AutoCloseable subtypes f8d2553: find field in superclasses also 747928f: fix broken readSettings() logic 83f842a: make magic checkbox work on private fields dac9905: remove faulty annotation 24bdcbf: DOM: optimize JavaMethod annotation handling dcdbc00: move MessageBusTest to platform-tests to avoid cyclic dependencies involving util 1da0bf9: save a bit memory on non-root message buses, relax test expectations a bit 0b888e5: IDEA-122914 (unclosed zip files) cf649f8: [git tests] Dump to stdout if the test failed 9214eb2: [tests] Move enable debug logging for certain categories to a common place 32597b1: better java doc 2ec1705: fixed PY-12698 Noticeable hang when selecting not yet added virtualenv as project interpreter d87049a: Merge remote-tracking branch 'origin/master' bc78e99: RunConfigurationExtensionsManager API improved 8d20600: Cleanup (obsolete logging) 4a61e1a: Show debug command line action renamed (PY-12835). 4725ae6: Merge remote-tracking branch 'origin/master' 21de2af: fixed PY-12848 Adding local Python SDK does not work c1c98cb: Merge remote-tracking branch 'origin/master' 7bd7aae: don't show hoisted variables 6de7d54: move BasicDebuggerViewSupport up 11656b8: init: don't show hoisted variables f1b95b5: ColorChooserIntentionAction.isInsideDecodeOrGetColorMethod: use constants 00ee9ed: Merge remote-tracking branch 'origin/master' ce4bafa: Until build moved forward. 2806dd8: OC-9570 OC-9663 0f15b6d: restore the ability to clear console from any thread bb44094: IDEA-124646 Option to turn off "compilation successful" popup adac2da: style: optimize if-statement and assignment c32cafb: style fcc2f18: Remove code duplication. 58be81d: Removed unnecessary EP, introduced Rename Handler for Python Magic Literals. b2c7dea: fix console highlighting of lines added one by one, dispose range marker 56beb0e: take into account buffer overflows when calculating console fragment to highlight & fold 9065b24: be less public in new EditorHyperlinkSupport API 5f39988: clarify a bit when hyperlinks & foldings are disabled in console 18fdcfd: disabling of foldings removed 84162a7: continue processing when the output stops 97474ce: revert of condition 358ff50: continue processing when the output slowed down under the threshold b19c269: more eager disabling b788f32: removed todos, no issue here. 88ead50: removed manual action e26bb7f: continue processing from last location - commit fix 15d968a: continue processing from last location 03969ac: removed myHighlighterToMessageInfoMap f60543f: disable console when there is too much added text removed EditorHyperlinkSupport#myHighlighters list which seems redundant and would need some smart clearing. 9d3bfdf: little experiment c572e4a: ^461 revert: we must create lazy range marker delegate on document changed, otherwise invalid delegate will be created b828042: background notifications: cancel on file invalidation; don't leak e429328: cache editor char width a8e14ae: relax testStaticImportInTheSameClass expected timing 676f08a: IDEA-124317 super class method is not shown in basic and smart completion, while accessible a655925: ability to serialize internal classes 51fabf9: cleanup fe4a711: rename to BasicDebuggerViewSupport 0fa7a11: rename to RemoteVmConnection a82fe46: init WEB-11968 Support debugging with embedded Chromium using projects such as CEF3 d3d775b: update editor notifications in background 2a77c0f: maven tests: tearDown more f0a6a44: IDEA-124476 (slf4j parameterized logging inspection: add option to only apply to certain log levels.) 54ae382: we must create lazy range marker delegate on document changed, otherwise invalid delegate will be created 0c7dbd9: cleanup 991f719: we must check getLine() at first, because getOffset() can cause dramatic side effects 5cdeb11: ^192 fix selection d652d59: done WEB-9842 Node debugging: Hitting a breakpoint with a local variable in scope that is a large buffer will cause the debugger to hang for a _long_ time WEB-9834 Node.js debugging: variable value calculation takes a while WEB-1892 NodeJS, Debugger: deadlock after stack frames has emptied WEB-7945 clustered view of Buffer class 73a6343: init: move getIndexedProperties to ObjectValue 3b4ad30: IDEA-124593 (Inspection "AutoCloseable used without try-with-resources" flags System.out.printf) 4290300: IDEA-124654 (replace with chained append() calls gives wrong result when the object is unknown) 4b68768: drop unused property 28c75d2: remove check covered by "Variable is assigned to itself" inspection (IDEA-124559) 5201ba0: prevent maven test initialization failing to spoil the fixture for other tests 1b55349: faster invalid line number detection in console exception filter (IDEA-124626) db58c9b: IDEA-124556 MessageBus event processing should be faster with many child buses and (almost) no listeners 77c7af8: optimization for getChars handling 48a56e0: PY-12846 ("show hidden files" configurable through FileChooserDescriptor) b0679d6: Cleanup (builder-style API; arrangement; duplicate deprecation) 4f5db0a: [git tests] fix paths comparison fa24163: [git tests] simpler method names 6d469a1: [git tests] Fix testdata for cherry-pick 600259a: [git tests] Remove the test root directory after test execution, reorder teardowns e422a99: [vcs] Fix already disposed exception 7cb3043: [git tests] turn cuke tests back on. f9d83e6: [git tests] fix GitAddSteps 49fecac: [git tests] Make sure other tear downs finish even if one fails e0847db: [tests] extract dumping log to stdout to the common test framework 07923cc: [git] Don't spam to stdout in tests unless test failed 84a8fbe: [git] Fix already disposed 90d2f45: new inference: early abort calculation by lambda return (IDEA-124276) f2256ca: calculate target type in the same way for statement/expressions lambdas 896c488: testdata to expression lambda 8096d63: inference when incomplete 6f6367d: fix layout under darcula 3d3550e: escape ampersands 3768908: IDEA-123831 (Missing Method Count Limit in Inspections under Class Metrics) 04d3283: cleaning javac nametable: synchronization added 368bb54: [git tests] Better test name not to make some buildserver Gits "insane" ea6683d: [git tests] Better test dir name not to make some buildserver Gits "insane" 41d0942: remove unused properties [CR-IC-5247] cbf1c1e: ensure pushers are run before initial indexing, don't rely on chance 4c1dc50: let PushedFilePropertiesUpdater schedule reindex itself if necessary 79a75f2: update language level without project reloading 64c452e: Merge remote-tracking branch 'origin/master' b86dec4: simplify 0c0fb61: change method name ad18e4b: make method name discoverable 5529054: IDEA-124653 Keyboard shortcut for New does not work 3b7d2e9: svn: Refactored IdeaSvnkitBasedAuthenticationCallback - inner classes moved to separate files dafd2d3: revert memory page size back d5a0f9e: svn: Moved several authentication-related classes to "org.jetbrains.idea.svn.auth" package ac99e82: svn: Refactored IdeaSvnkitBasedAuthenticationCallback - made inner classes to be static e663caa: svn: Refactored IdeaSvnkitBasedAuthenticationCallback - code simplified, duplication removed 3ac7f7d: some dumb mode logging (IDEA-124604) 10bf86c: dom vfs listeners: don't load new vfs, support cyclic symlinks, simplify 2f76fdc: svn: Refactored IdeaSvnkitBasedAuthenticationCallback.AbstractAuthenticator and inheritors - code simplified ec05ae8: svn: Refactored IdeaSvnkitBasedAuthenticationCallback.AbstractAuthenticator and inheritors - common parameters moved to base class, @NotNull faf7595: ^451 add test 326278b: extract JsDebuggerViewSupport bc771e7: show data-source name for table editors 0faa413: making sure all posted tasks are processed even after process terminated and dispose called by using sequential task executor instead of MergingUpdateQueue (IDEA-120167 Phantom eternal Ant task on make) aff053d: Increase connection timeout for JIRA integration tests ab7c4be: WEB-6584 Files opened by URL should also be able to open scripts used in the file 1461ed0: cache indexOf result 8b73b26: cleanup 62b7621: svn: Refactored IdeaSvnkitBasedAuthenticationCallback.AbstractAuthenticator - made it not generic 6d7d17b: IDEA-124580 Links in mac sheets dialogs do not work 534c2aa: Temporary solution for IDEA-124615 cebe7d9: IDEA-124535 com.sun.*.internal packages not found 21110f2: moved to core d8cf8f5: @NotNull 979de11: moved to core-impl 9dd6e0d: moved to java-psi bf77b14: OriginInfoAwareElement moved to psi to core 26ef0e3: completion-related classes moved out of psi to separate package 4fe1761: removed dependency on java-impl 46408be: method references: super methods treatment in exact check a3f190a: svn: Refactored IdeaSvnkitBasedAuthenticationCallback.AbstractAuthenticator - removed unnecessary parameters from acknowledge() method 985bef3: Start plugins wizard #26 better color for selection (Darcula), hide dialog buttons when in "Customize plugin group" mode 4f97e92: Merge remote-tracking branch 'origin/master' 0081a7f: fixed PY-12819 Unable to run GAE nosetests 782ae0b: check directories consistency only for local files 95bce93: Cleanup (common URL check code extracted) 901e60d: Cleanup (arrangement; aggressive logging) d3d0f73: CaseInsensitiveUrlHashingStrategy nullability f144943: applicability constraints by method reference (IDEA-122018) 9e9c7e3: Cancel future if alarm was disposed in TaskItemProvider to prevent deadlocks 1e352af: Update CA certificate for SSL tests. Add link to test server used for client authentication 9ebf7ca: reparse files on language level change 29a7c80: will explicit System.gc lead to less ResolveClassTest blinking? ea54399: less garbage in tests (VirtualDirectoryImpl.assertConsistency) fba7ee7: postfix templates memory leak eb639ae: Merge remote-tracking branch 'origin/master' c5d0d5e: handle hidden groups correctly 0d2fc45: Merge remote-tracking branch 'origin/master' 577cef9: cleanup d14900f: svn: Refactored IdeaSvnkitBasedAuthenticationCallback - removed unused methods related to saving proxy settings to svn config files (currently proxy settings are passed through command line arguments) dedc16a: svn: Refactored IdeaSvnkitBasedAuthenticationCallback - code simplifications, @NotNull ef226f6: restore extra space trimmed by fitInsideEditor() 779ebf1: save some invokeLater's in progress text2 updating 9c46a51: Cleanup (arrangement; warns in default logger) b02b4c1: more accurate work with IOUtil.allocReadWriteBuffer: use IOUtil.write/readUTF that have thread local buffer upon softreference: - to avoid extra allocations (1G of garbage produced for our codebase indexing) - possible several threads accessing same buffer problem bb2af75: Cleanup (locale use) 949b567: IDEA-120035 (diagnostic; log level lowered) 4f1e8e6: svn: Refactored SvnAuthenticationManager - removed unused/commented code, code simplifications, warnings fixes 2fde908: WEB-11690 TypeScript breakpoint is not hit We must respect fs case sensitivity sourcemap visualizer: ugly compiler can produce mappings for empty lines, and IDEA can then strip whitespace from line ends, but sourcemap still references to empty ranges 81f903f: remove LineSeparatorPainter 902e51a: substitute bounds (IDEA-123509) 547c62c: qualify conflicting fields name (IDEA-123969) f58394c: IDEA-124019 291c431: notification group registration fixed f9f9b39: Merge remote-tracking branch 'origin/master' 527f8db: fireModelUpdate for lazy structure building (Scala, etc) f1c3652: IDEA-93452 Implement "section" support in rearrange menu: update parent offset on new section rule insert 47d8b3d: svn: Refactored MergeFromTheirsResolver - use common client factory model (instead of direct SVNWCClient usage) fe22b91: Fixed: IDEA-87312 Custom code folding: editor-fold; Folding/unfolding behavior not available when an enum inside the block IDEA-122715 Region folding does work if contains interface definition 4f9003f: Update jediterm.jar with antialiasing restored. 118d6d9: do not process xs:include for stub building ff22ffc: Fix tests 80dfa90: IDEA-93452 Implement "section" support in rearrange menu: section rules validation fe96f39: IDEA-124461 New Module (Maven, Gradle) created in Empty project don't get the specified jdk 1b8f51f: IDEA-124400 New Module wizard: Gradle module misses options 952a2c5: IDEA-71508 Scroll with inertia (Mac os) should only work in the initial component 632d4c8: don't draw separator line if we cannot compute relationship properly for all lines (important in case of process input — nodejs for example) 2ebc871: WEB-11957 Valid JavaScript regexp marked as red ca2c75e: svn: Refactored RepositoryBrowserDialog - removed unused and commented code a15d397: cleanup after adding postfix templates preview 7a06f6d: EA-56182 59454cd: improve "Show Members" opption suppression c115690: IDEA-124435 (Fix "Collapse catch blocks" produces non-compiling code) c048414: 136 -> 138 8c562a2: bug fix postfix templates preview 2b4b915: avoid wildcard with null bound (IDEA-124377) a6db438: testdata fixed a4ac655: Gradle: IDEA-124477 sourceFolder order in iml file generated by gradle is unstable c0f3611: IDEA-115374 "Print file" truncates the code on Mac 12a8f3b: Start plugins wizard #25 get rid of scrollpanes' borders ffe6776: A typo. 9fa19ab: svn: Refactored RepositoryBrowserDialog - make "move file/folder" logic use common client factory model (instead of direct SVNCopyClient usage) 7a95352: svn: Implemented ability to move files/folders directly in repository (for CopyMoveClient) 240c396: more diagnostics on EA-56168 - assert: JavaFoldingBuilderBase.addToFold ae954a6: remove unused ExtensionsArea.unregister* 3ad5dd7: Merge remote-tracking branch 'origin/master' 10fe5a5: skip symlinks ff8a795: removing -ea from defaults because this may dramatically slow down compilation (e.g. eclipse compiler with annotations): https://jetbrains.zendesk.com/agent/#/tickets/27833 a465476: HardReference for PsiAnchors used for duplicates indexing, 2 885405f: features.xml fix 016de10: Cleanup (inner class abuse) 58734a2: svn: Refactored RepositoryBrowserDialog - make file/folder deletion logic use common client factory model (instead of direct SVNCommitClient usage) 65fd69c: svn: Implemented ability to delete files/folders directly from repository (for DeleteClient) d9fe570: HardReference for PsiAnchors used for duplicates indexing 73a17e0: follow up for commit 288dd00: make util-rt available for all agents 55614bb: svn: Refactored RepositoryBrowserDialog - make folder creation logic use common client factory model (instead of direct SVNCommitClient usage) 7265d01: cleanup 10eb4a3: StartupManager: linear-time startup activities running 4708541: IDEA-124442 Update options for newer version of YourKit (get rid of deprecated warnings) e225a23: IDEA-124503 Filter out IntellijIdeaRulezzz completion items f41cb93: svn: Refactored CreateBranchOrTagAction - removed unnecessary parameters, removed todo items 54da0af: IDEA-122732 Javadoc invalid html closing tags b8197a7: OC-9621 d19a902: svn: Removed unused classes 924f108: svn: Refactored ShareProjectAction - use common client factory model (instead of direct SVNCommitClient usage) 673351f: svn: Implemented ability to create folders directly in repository (for BrowseClient) 8bd8a4d: initialize file watcher in background 9d3c23d: avoid entering dumb mode to push properties to one file 0ab0ec6: Maven: cleanup test e98a99f: Merge remote-tracking branch 'origin/master' bdfec0f: Mantis integration: Reset repository configuration on Axis errors 67cf17d: Maven: stable order of source folders IDEA-64312 Maven: frequent .iml changes after exclude/source folder updates 5d0ce7c: enumerate items on demand c520519: Merge remote-tracking branch 'origin/master' c2957e7: anonymous -> lambda: conflicting ref in var declaration (IDEA-124525) 5dbbebe: extract superclass: process same name type parameters inside class members 84deec9: method refs: is exact should check super methods for this/super qualifiers only (IDEA-124507) 528a91b: Merge remote-tracking branch 'origin/master' 7a8f56c: fixed PY-12717 Improper replacement of the `print x, y` statement for Py3+ 33aeb0b: fixed PY-12804 PyStatementEffect inspection doesn't wrap exec argument in parenthesis 9929113: IDEA-124394 Exception while creating New File w/o extension 933194d: IDEA-124073 (avoid requesting focus manager until app is loaded) 4d43dab9: add before-after preview for postfix templates c4084ff: Merge remote-tracking branch 'origin/master' e2d7505: fixed PY-12726 PyCharm does not recognize compatibility issues when importing from __future__ 533e26d: do not reparse re-detected files in background in tests since it may cause unpleasant interference with e.g. highlighting 414c4ad: merged test classes ba23594: IDEA-124155 Performance problem on live search in long lines 6ce3483: Revert "Templates performance: run segments changes in bulk mode" c9284e0: Start plugins wizard #24 phrases 75472a5: calc hash from content once we have bytes available, don't delay its processing until we have only chars 5aac831: notnull 02a9c6e: notnull 81d2d98: cleanup 403d4f1: fix test a98abce: Templates performance: run segments changes in bulk mode 587e216: Merge remote-tracking branch 'origin/master' 66821eb: init WEB-11393 Live edit doesn't work for linked css 1429f44: IDEA-124527 Shift-drag after Shift-click starts new selection in editor d774199: IDEA-51883 IDEA prints out huge number of pages 8a80c54: Merge remote-tracking branch 'origin/master' 336be36: IDEA-98912 An Enter license button should be added to the welcome screen 72e2b3a: ensure each post-startup activity runs in smart mode (IDEA-123943) e64ae73: Merge remote-tracking branch 'origin/master' beeee74: make inspector work with modal dialogs 324ddc4: move getTokenType() up so white-spaces are skipped before rawTokenIndex() call c808c3e: integrate Grammar-Kit/pull/31 from ligasgr 984922a: tests fix afe050c: move xml lexers to gen root 2640f20: move groovy lexers to gen root eb2047f: move spi lexers to gen root cef748e: move java lexers to gen root 600887a: move reg exp lexer to gen root fc01dd0: move templates* lexers to gen root cbd64fa: move rest lexer to gen root fd2765c: move python-community lexers to gen root 90d1e84: more compact format when we serialize 8f3acde: use isjavaidentifierpart + enable trigramindex for tests because test appeared 2adc37a: IDEA-65879 "idea" protocol handler to open files directly from a URL (for Mac) 8615aa2: vfs: handling of invalid .jar files efb2fca: test framework: ability to intercept error/warn logs 0fff999: Groovy PSI doesn't depends on LookupElements anymore 92da487: some checkCanceled 876426a: magic constant b01adfe: know recursion manager deleted e9eaa2d: IDEA-124368 (diagnostic) d321dd2: vfs: JAR FS cleanup and minor optimization 4155907: revert IDEA-123049 Rearrange Code is breaking code (Code Style > Java > Arrangement) (1162eb1847279461e17d200416be100351d0c668) f62183c: IDEA-93452 Implement "section" support in rearrange menu: cleanup e833f18: Merge remote-tracking branch 'origin/master' a4f2f0e: create method from method ref: fis for type element qualifier (IDEA-124485) baccb31: diamonds: resolve conflicts based on type params from constructor and containing class (IDEA-123518) f3e1d96: IDEA-124385 1d32716: [by cdr, jeka] eliminating dependencies on utility classes in the code loaded by javac classloader to avoid NCDFE d08964e: IDEA-93452 Implement "section" support in rearrange menu. e16690a: better doctype detection 0645af6: move properties lexer to gen root e851587: svn: Refactored CreateBranchOrTagAction - do not create non-existent folders manually (as "svn copy" supports corresponding "--parents" option) 1162eb1: IDEA-123049 Rearrange Code is breaking code (Code Style > Java > Arrangement) 0c4028d: IDEA-123074 Code formatting. Closing brace. 7456ac5: svn: Use RA_ILLEGAL_URL error code for SVNException in command line info client when passed target does not exist (so CreateBranchOrTagAction.dirExists() works correctly for command line) 1dab5da: Maven: do not unexclude excludeFolders on removal of the respective physical directory related issue - IDEA-120944 Maven integration inconsistently, frequently, and spuriously changes .iml files 8be02cd: Allow to specify ranges which can't be indented by PostprocessReformattingAspect (fixes WI-22725 surround heredoc block with try catch causes parse error) [CR-IC-5135] 18bbc9d: IDEA-115374 "Print file" truncates the code on Mac 0d4ccd0: svn: Added ability to track warnings to SvnBindException 7ec9633: svn: Refactored SvnBindException - use MultiMap to track errors 820d7b2: Switcher: use TW stripe title instead of id 936b1f2: Merge remote-tracking branch 'origin/master' 0c1ec73: IDEA-124163 6fd9884: extract notification groups (IDEA-124454) 71f8a4a: IDEA-124352 b3926cf: EA-55442 - CCE: DomStubBuilder.buildStubTree - a better fix 370e06e: Merge remote-tracking branch 'origin/master' affac73: fixed PY-12731 Creating test profile from context menu unexpectedly creates django tests eed0df2: do not process xs:include for stub building 9bc7805: Revert "Do not wrap border with TitledBorder if there is not title" c255139: IDEA-119926 Completing Statements doesn't go to next line for non conditional statements 6988973: Ensure that indexes of substring are correct in YouTrackCompletionContributor ae4b79f: IDEA-112189 Change YouTrack integration default query 30c5366: MantisFilter violates comparable contact 2255513: svn: Moved execute() methods from CommandUtil to BaseSvnClient 46b8888: in django project show unittest runner and the django one in context menu 8bc1d46: Start plugins wizard #22 fix Windows-specific exceptions (non-initialized Alloy license & NPE during Darcula initialization) 42bc957: svn: Several classes moved to corresponding packages (commit related and exception classes) be188d5: Merge remote-tracking branch 'origin/master' 5e4c305: svn: "svn info" related classes moved to "org.jetbrains.idea.svn.info" package 19f9684: Start plugins wizard #20 icons for categories 93f8c1d: svn: Renamed info clients for both SVNKit and command line (interface and implementations) 063575b: svn: Make info clients (both for SVNKit and command line) satisfy common client factory model c0dd002: svn: Refactored SvnCommandLineInfoClient - do not inherit SvnkitSvnWcClient (just implement corresponding SvnWcClientI interface) 3dac920: svn: "svn status" related classes moved to "org.jetbrains.idea.svn.status" package 0d2131d: svn: Refactored CmdStatusClient - do not use CommandExecutor.myCommandLine directly (use corresponding CommandExecutor methods instead) 7b6f441: svn: Renamed status clients for both SVNKit and command line (interface and implementations) 7f65a87: fix for Kubuntu/Firefox/Gmail (IDEA-67767) 526a02f: fixed PY-12779 Configure Template directories quick-fix: open project structure settings page right away 9ee64e4: fix "go to source/type" — XSourcePosition doesn't provide column number, so, we must override createNavigatable 3f8277c: ability to invoke/reinvoke getter value a9663fe: Merge remote-tracking branch 'origin/master' 4ab4259: IDEA-123691 Minor project wizard edits: icons 16x16 b03f63d: fixed PY-12786 Python Interpreters: extra space in configuration popup from project creation dialog 546f9a5: Revert: IDEA-123160 Find Usages doing nothing in 13.1 (7371df17bd49da0804c600571671fd3a1fe90ec2) 3fbbef8: Merge remote-tracking branch 'origin/master' 2b99821: suppress project loading cancellation if in NonCancellableSection 25e6148: move PushedFilePropertiesUpdater to lang-impl 2782c66: semicolon->space in language-agnostic completion advertisement a9888bb: Merge remote-tracking branch 'origin/master' 779df06: fix messages d8f478c: changed to correct @NotNull 4f2dad1: EA-54648 - assert: PsiWalkingState.elementStarted 066ab8a: EA-55374 - NPE: DataFlowInspectionBase$.applyFix 16b53a5: EA-55442 - CCE: DomStubBuilder.buildStubTree 69fd8e8: EA-55457 - IE: CacheUpdateRunner.waitForAll 6b7c6a0: EA-55708 - NPE: FileEditorManager.getInstance d8e6415: [by cdr] optimizations d38a277: enabled by default c49c422: don't calc content hash id twice f82d4be: Merge remote-tracking branch 'origin/master' 4657702: Merge remote-tracking branch 'origin/master' b275b4e: Netty channel id init is not reliable yet 13aec5a: cleanup 5a75f21: continue WEB-9103 nodejs: show get/set functions in addition 72276e4: init WEB-9103 nodejs: Debugger not showing value of getter 029f89a: testdata fixed 03cba2c: add undo to JBTextField a344d0e: do not dbl substitution (type annotations could be lost after that) b898f91: static method reference completion (IDEA-124043) 78dafa0: dfa: just don't assume initialized final fields are notnull, it doesn't help, but hurts and slows things down (IDEA-124323) b6be84f: simplify HTML markup - updated test data (IDEA-67767) 622b745: simplify HTML markup (IDEA-67767) bcc4a00: junit category support (IDEA-88389) 99b16f3: check for project.isDisposed added to DumbService, unnecessary checks at call sites removed 3f304a3: Animator: test 36d9ddc: Animator: corereview CR-IC-5059 9709e9f: Animator: fix stuck at 0th frame during repeatable animaion 1957b85: SemVer.getParsedVersion added 8e48a46: SemVer.toString added ae2667d: Merge remote-tracking branch 'origin/master' 1be6001: fixed PY-12451 Interpreter added from project creation dialog is not set as project interpreter 5bb9964: fixed possible NPE 9359151: Platform: scrollbars survive background editors initialization 3ca40fc: fixed tests f2b136a: fixed possible NPE 8fde24a: drain file type queue 835ce62: cleanup f2fb07f: removed lang-impl dependency edb88b8: notnull 6dd81f8: NPE when application is already disposed c2545c2: unmute on session finish - spelling 223dffa: IDEA-122962 - Clouds: perform connection test in background 7cc9133: Merge remote-tracking branch 'origin/master' c5bffbd: remove duplicated code (IDEA-67767) a5a9d6a: Merge remote-tracking branch 'origin/master' 1167e96: fixed PY-12543 Project Interpreters: too big or too small details popup cbc40e9: lazy array data loading — API/UI/v8 new backend done WEB-11784 slow nodejs debug: huge array cause 100 cpu debug a892f89: add missing test data 2215544: fix another RTF background colouring issue (IDEA-67767) fd2b253: Merge remote-tracking branch 'origin/master' bc7a7ad: Merge remote-tracking branch 'origin/master' fda4b8a: Merge remote-tracking branch 'origin/master' c8474eb: fix testdata ee2a5d0: introduce: process chained method calls during same occurrences processing (IDEA-124349) 9397fb0: CR-IC-5167 (cleanup) 8dbf638: Cleanup (post-review #330) 91e3ed4: vfs: .jar refresh test extended 115aaf1: vfs: unified attributes loading between JarHandler / JarFS 10efd8b: Cleanup (duplication; readability) 8231d80: IDEA-124032 IDEA plugin: Can't find com.sun.xml.internal.messaging.saaj.soap.LocalStrings bundle: allow bootstrap resources for root IDEA classloader cb808a6: fixed PY-12723 Unable to run tests with Django 1.7b1: "RuntimeError: App registry isn't ready yet." 8c5c0ec: added project.isDisposed check to DumbService 1f2a568: code style 46881e4: Merge remote-tracking branch 'origin/master' 8401fa0: fixed windows path separator 6ae658f: fixed 'project is disposed' 6431234: Github: release editor in tests c726c53: Github: small test cleanup 6d6d583: Platform: ShowFilePathAction correctly handles non-normalized paths (e.g. with ../) 8e1f7a7: Merge remote-tracking branch 'origin/master' 916d90b: Platform: always allow writing module files (IDEA-123899) + typo in test fixed 6e063ee: IDEA-121318 ClosureParamsEnhancer now uses call.getCallVariants() instead of call.resolve(). Erasing instance parameter's types when comparing them. It helps to select the correct one when we are comparing T and Iterable<T>. 637da92: IDEA-123712 Groovy: @language annotation on method parameters with default values reflected methods now have light parameters with original modifier lists 8ffcef2: EA-52671 - assert: AbstractMappingStrategy.processFoldRegion 30d14a3: fix RTF background colouring and make it compatible with Mac (IDEA-67767) 39d7edd: svn: Make status clients (both for SVNKit and command line) satisfy common client factory model 85e3825: Merge remote-tracking branch 'origin/master' 1d31c68: svn: Refactored SvnRecursiveStatusWalker.MyItem - use common client factory model (instead of direct SVNStatusClient usage) 3a14f0a: Use tree set to store remote roots to avoid duplicates. 343ea1c: svn: Refactored SvnRecursiveStatusWalker - methods extracted, warnings fixes 3ca64b6: svn: Merged StatusWalkerPartner interface and StatusWalkerPartnerImpl implementation to single class 93ddbc2: svn: Refactored SvnChangeProvider - use common client factory model (instead of direct SVNStatusClient usage) 416463d: svn: Refactored SvnRecursiveStatusWalker.MyItem.getClient() - removed unnecessary parameters 82af9cb: svn: SvnCommitRunner moved to "checkin" package and renamed b0b7121: svn: Refactored SvnCheckinEnvironment - logic extracted to separate SVNKit and command line clients (common client factory model is used) af5ad7c: svn: Refactored SvnCommitRunner - inlined several parameters (that have same value in all code paths) beb8081: svn: Refactored SvnCheckinEnvironment - moved SVNKit related logic to corresponding SVNKit-scoped method 626d944: svn: Refactored SvnCheckinEnvironment - code simplified, unified code flows for SVNKit and command line c636313: IDEA-124057 Manually load key store set using VM options. Don't modify default context, if Certificate Manager was disabled 4729cf2: svn: Refactored OneShotMergeInfoHelper and OneRecursiveShotMergeInfoWorker - removed unnecessary fields and utilize MergeContext instead 9fe9ac9: svn: Refactored LoadRecentBranchRevisions - removed unnecessary fields and utilize MergeContext instead 562e89d: svn: Refactored MergeCalculatorTask - removed unnecessary fields and utilize data from MergeContext instead c85e79d: svn: Refactored QuickMerge - inner classes moved to separate files (and renamed) 3f10457: IDEA-122845 Add test to check that wrong credentials are recognized when testConnection() is used cf3252c: svn: Refactored QuickMerge - make task classes do not directly depend on QuickMerge instance * MergeContext and QuickMergeInteraction parameters added to all task constructors * several QuickMerge methods moved to corresponding task classes e62ad72: svn: Refactored QuickMerge - merge parameters extracted to separate MergeContext class 482733a: svn: Refactored LatestExistentSearcher - use common client factory model (instead of direct SVNLogClient usage) a260ac4: svn: Refactored DefaultConfigLoader - code simplifications, warnings fixes d899191: svn: Make sure start() method of the task queue (myBranchesLoader) in SvnBranchConfigurationManager is invoked - otherwise runnables passed to queue are not executed a95c8b4: svn: Refactored DefaultConfigLoader - use common client factory model (instead of direct SVNLogClient usage) 1d33a57: svn: Refactored FirstInBranch - use common client factory model (instead of direct SVNLogClient usage) 372a664: svn: Refactored SvnMergeInfoCache - removed inner MyState class (fields added directly to SvnMergeInfoCache) 281cc56: svn: Refactored FirstInBranch - not null, code simplifications (exception handling) ef8bad7: svn: Refactored FirstInBranch - code simplifications, warnings fixes 2104741: svn: Removed unnecessary SvnBranchPointsCalculator.Invertor interface 0b9815c: svn: Refactored SvnBranchPointsCalculator.WrapperInvertor - explicitly use SvnBranchPointsCalculator.BranchCopyData type (instead of being generic) aa5e3fd: svn: Refactored MergerFactory - removed unused methods 9d618f1: svn: Refactored SvnMergeInfoTest - methods extracted, duplication removed, warning fixes 4947243: svn: Refactored SvnMergeInfoTest - methods extracted, lots of duplication removed Change-Id: Id231a4e5444690193a99f454d027ea17f7c2845c
Diffstat (limited to 'java/java-psi-impl/src')
-rw-r--r--java/java-psi-impl/src/com/intellij/codeInsight/CoreJavaCodeInsightSettingsFacade.java23
-rw-r--r--java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java15
-rw-r--r--java/java-psi-impl/src/com/intellij/codeInsight/folding/impl/JavaFoldingBuilderBase.java9
-rw-r--r--java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java141
-rw-r--r--java/java-psi-impl/src/com/intellij/core/CoreLanguageLevelProjectExtension.java4
-rw-r--r--java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaDocLexer.java721
-rw-r--r--java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.flex1
-rw-r--r--java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.java1451
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/PsiDiamondTypeImpl.java67
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/EmptySubstitutorImpl.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/ExpressionConverter.java41
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/PsiImplUtil.java4
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java37
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/PsiSubstitutorImpl.java16
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/PsiSuperMethodImplUtil.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/light/ImplicitVariableImpl.java57
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/light/LightFieldBuilder.java86
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/light/LightMethodBuilder.java440
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/light/LightModifierList.java17
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/light/LightParameter.java62
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/light/LightReferenceListBuilder.java106
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/light/LightVariableBase.java166
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/light/LightVariableBuilder.java156
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/PsiImmediateClassType.java5
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaCodeReferenceElementImpl.java3
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/javadoc/PsiDocTokenImpl.java4
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveUtil.java3
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiOldInferenceHelper.java26
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java143
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceVariable.java20
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ConstraintFormula.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ExpressionCompatibilityConstraint.java9
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/InputOutputConstraintFormula.java14
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/LambdaExpressionCompatibilityConstraint.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/PsiMethodReferenceCompatibilityConstraint.java39
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/StrictSubtypingConstraint.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/SubtypingConstraint.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeCompatibilityConstraint.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeEqualityConstraint.java2
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/tree/CoreJavaASTFactory.java5
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/MethodReferenceResolver.java76
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiCodeBlockImpl.java8
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiJavaTokenImpl.java4
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiKeywordImpl.java4
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiMethodReferenceExpressionImpl.java13
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/presentation/java/ClassPresentationUtil.java5
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/scope/conflictResolvers/JavaMethodsConflictResolver.java8
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/scope/processor/MethodCandidatesProcessor.java10
-rw-r--r--java/java-psi-impl/src/com/intellij/psi/scope/util/PsiScopesUtil.java8
-rw-r--r--java/java-psi-impl/src/com/intellij/refactoring/util/CanonicalTypes.java346
-rw-r--r--java/java-psi-impl/src/messages/JavaErrorMessages.properties1
52 files changed, 1931 insertions, 2461 deletions
diff --git a/java/java-psi-impl/src/com/intellij/codeInsight/CoreJavaCodeInsightSettingsFacade.java b/java/java-psi-impl/src/com/intellij/codeInsight/CoreJavaCodeInsightSettingsFacade.java
new file mode 100644
index 000000000000..59e51d86da1d
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/codeInsight/CoreJavaCodeInsightSettingsFacade.java
@@ -0,0 +1,23 @@
+/*
+ * 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;
+
+public class CoreJavaCodeInsightSettingsFacade extends JavaCodeInsightSettingsFacade {
+ @Override
+ public boolean isShowStaticAfterInstance() {
+ return false;
+ }
+}
diff --git a/java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java b/java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java
index b989c3054b06..552c7e2d9ff5 100644
--- a/java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java
+++ b/java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java
@@ -403,13 +403,16 @@ public class ExceptionUtil {
final boolean includeSelfCalls) {
final JavaResolveResult result = methodCall.resolveMethodGenerics();
final PsiMethod method = (PsiMethod)result.getElement();
+ if (method == null) {
+ return Collections.emptyList();
+ }
final PsiMethod containingMethod = PsiTreeUtil.getParentOfType(methodCall, PsiMethod.class);
if (!includeSelfCalls && method == containingMethod) {
return Collections.emptyList();
}
final PsiSubstitutor substitutor = result.getSubstitutor();
- if (method != null && !isArrayClone(method, methodCall) && methodCall instanceof PsiMethodCallExpression) {
+ if (!isArrayClone(method, methodCall) && methodCall instanceof PsiMethodCallExpression) {
final PsiClassType[] thrownExceptions = method.getThrowsList().getReferencedTypes();
if (thrownExceptions.length > 0) {
final PsiFile containingFile = (containingMethod == null ? methodCall : containingMethod).getContainingFile();
@@ -537,11 +540,11 @@ public class ExceptionUtil {
}
@NotNull
- public static List<PsiClassType> getUnhandledExceptions(@Nullable PsiMethod method,
- PsiElement element,
- PsiElement topElement,
- @NotNull PsiSubstitutor substitutor) {
- if (method == null || isArrayClone(method, element)) {
+ public static List<PsiClassType> getUnhandledExceptions(@NotNull PsiMethod method,
+ PsiElement element,
+ PsiElement topElement,
+ @NotNull PsiSubstitutor substitutor) {
+ if (isArrayClone(method, element)) {
return Collections.emptyList();
}
final PsiClassType[] referencedTypes = method.getThrowsList().getReferencedTypes();
diff --git a/java/java-psi-impl/src/com/intellij/codeInsight/folding/impl/JavaFoldingBuilderBase.java b/java/java-psi-impl/src/com/intellij/codeInsight/folding/impl/JavaFoldingBuilderBase.java
index 550ffc26b062..7a296ff7630d 100644
--- a/java/java-psi-impl/src/com/intellij/codeInsight/folding/impl/JavaFoldingBuilderBase.java
+++ b/java/java-psi-impl/src/com/intellij/codeInsight/folding/impl/JavaFoldingBuilderBase.java
@@ -29,6 +29,7 @@ import com.intellij.psi.tree.IElementType;
import com.intellij.psi.util.PropertyUtil;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.util.PsiUtil;
+import com.intellij.psi.util.PsiUtilCore;
import com.intellij.util.Function;
import com.intellij.util.ObjectUtils;
import com.intellij.util.text.CharArrayUtil;
@@ -422,7 +423,7 @@ public abstract class JavaFoldingBuilderBase extends CustomFoldingBuilder implem
}
private boolean addToFold(List<FoldingDescriptor> list, PsiElement elementToFold, Document document, boolean allowOneLiners) {
- LOG.assertTrue(elementToFold.isValid());
+ PsiUtilCore.ensureValid(elementToFold);
TextRange range = getRangeToFold(elementToFold);
if (range == null) return false;
return addFoldRegion(list, elementToFold, document, allowOneLiners, range);
@@ -831,6 +832,10 @@ public abstract class JavaFoldingBuilderBase extends CustomFoldingBuilder implem
@Override
protected boolean isCustomFoldingRoot(ASTNode node) {
IElementType nodeType = node.getElementType();
- return nodeType == JavaElementType.CLASS || nodeType == JavaElementType.CODE_BLOCK;
+ if (nodeType == JavaElementType.CLASS) {
+ ASTNode parent = node.getTreeParent();
+ return parent == null || parent.getElementType() != JavaElementType.CLASS;
+ }
+ return nodeType == JavaElementType.CODE_BLOCK;
}
}
diff --git a/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java b/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java
index a2f1dc9c0daa..7b154bd5383c 100644
--- a/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java
+++ b/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.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.
@@ -123,7 +123,7 @@ public class JavaDocInfoGenerator {
elements = rawElements;
}
- return new Pair<PsiElement[], InheritDocProvider<PsiElement[]>>(elements, mapProvider(pair.second, dropFirst));
+ return Pair.create(elements, mapProvider(pair.second, dropFirst));
}
@Override
@@ -250,6 +250,20 @@ public class JavaDocInfoGenerator {
return true;
}
+ public static String generateSignature(PsiElement element) {
+ StringBuilder buf = new StringBuilder();
+ if (element instanceof PsiClass) {
+ if (generateClassSignature(buf, (PsiClass)element)) return null;
+ }
+ else if (element instanceof PsiField) {
+ generateFieldSignature(buf, (PsiField)element);
+ }
+ else if (element instanceof PsiMethod) {
+ generateMethodSignature(buf, (PsiMethod)element);
+ }
+ return buf.toString();
+ }
+
@Nullable
public String generateDocInfo(List<String> docURLs) {
StringBuilder buffer = new StringBuilder();
@@ -293,6 +307,21 @@ public class JavaDocInfoGenerator {
}
buffer.append("<PRE>");
+ if (generateClassSignature(buffer, aClass)) return;
+ buffer.append("</PRE>");
+ //buffer.append("<br>");
+
+ PsiDocComment comment = getDocComment(aClass);
+ if (comment != null) {
+ generateCommonSection(buffer, comment);
+ generateTypeParametersSection(buffer, aClass);
+ }
+
+ if (generatePrologueAndEpilogue)
+ generateEpilogue(buffer);
+ }
+
+ private static boolean generateClassSignature(StringBuilder buffer, PsiClass aClass) {
generateAnnotations(buffer, aClass);
String modifiers = PsiFormatUtil.formatModifiers(aClass, PsiFormatUtilBase.JAVADOC_MODIFIERS_ONLY);
if (!modifiers.isEmpty()) {
@@ -301,12 +330,12 @@ public class JavaDocInfoGenerator {
}
buffer.append(aClass.isInterface() ? LangBundle.message("java.terms.interface") : LangBundle.message("java.terms.class"));
buffer.append(" ");
- String refText = JavaDocUtil.getReferenceText(myProject, aClass);
+ String refText = JavaDocUtil.getReferenceText(aClass.getProject(), aClass);
if (refText == null) {
buffer.setLength(0);
- return;
+ return true;
}
- String labelText = JavaDocUtil.getLabelText(myProject, manager, refText, aClass);
+ String labelText = JavaDocUtil.getLabelText(aClass.getProject(), aClass.getManager(), refText, aClass);
buffer.append("<b>");
buffer.append(labelText);
buffer.append("</b>");
@@ -350,17 +379,7 @@ public class JavaDocInfoGenerator {
if (buffer.charAt(buffer.length() - 1) == '\n') {
buffer.setLength(buffer.length() - 1);
}
- buffer.append("</PRE>");
- //buffer.append("<br>");
-
- PsiDocComment comment = getDocComment(aClass);
- if (comment != null) {
- generateCommonSection(buffer, comment);
- generateTypeParametersSection(buffer, aClass);
- }
-
- if (generatePrologueAndEpilogue)
- generateEpilogue(buffer);
+ return false;
}
private void generateTypeParametersSection(final StringBuilder buffer, final PsiClass aClass) {
@@ -453,18 +472,7 @@ public class JavaDocInfoGenerator {
}
buffer.append("<PRE>");
- generateAnnotations(buffer, field);
- String modifiers = PsiFormatUtil.formatModifiers(field, PsiFormatUtilBase.JAVADOC_MODIFIERS_ONLY);
- if (!modifiers.isEmpty()) {
- buffer.append(modifiers);
- buffer.append(" ");
- }
- generateType(buffer, field.getType(), field);
- buffer.append(" ");
- buffer.append("<b>");
- buffer.append(field.getName());
- appendInitializer(buffer, field);
- buffer.append("</b>");
+ generateFieldSignature(buffer, field);
buffer.append("</PRE>");
//buffer.append("<br>");
@@ -479,6 +487,21 @@ public class JavaDocInfoGenerator {
generateEpilogue(buffer);
}
+ private static void generateFieldSignature(StringBuilder buffer, PsiField field) {
+ generateAnnotations(buffer, field);
+ String modifiers = PsiFormatUtil.formatModifiers(field, PsiFormatUtilBase.JAVADOC_MODIFIERS_ONLY);
+ if (!modifiers.isEmpty()) {
+ buffer.append(modifiers);
+ buffer.append(" ");
+ }
+ generateType(buffer, field.getType(), field);
+ buffer.append(" ");
+ buffer.append("<b>");
+ buffer.append(field.getName());
+ appendInitializer(buffer, field);
+ buffer.append("</b>");
+ }
+
public static void enumConstantOrdinal(StringBuilder buffer, PsiField field, PsiClass parentClass, final String newLine) {
if (parentClass != null && field instanceof PsiEnumConstant) {
final PsiField[] fields = parentClass.getFields();
@@ -778,6 +801,37 @@ public class JavaDocInfoGenerator {
}
buffer.append("<PRE>");
+ generateMethodSignature(buffer, method);
+
+ buffer.append("</PRE>");
+ //buffer.append("<br>");
+
+ PsiDocComment comment = getMethodDocComment(method);
+
+ generateMethodDescription(buffer, method, comment);
+
+ generateSuperMethodsSection(buffer, method, false);
+ generateSuperMethodsSection(buffer, method, true);
+
+ if (comment != null) {
+ generateDeprecatedSection(buffer, comment);
+ }
+
+ generateParametersSection(buffer, method, comment);
+ generateTypeParametersSection(buffer, method);
+ generateReturnsSection(buffer, method, comment);
+ generateThrowsSection(buffer, method, comment);
+
+ if (comment != null) {
+ generateSinceSection(buffer, comment);
+ generateSeeAlsoSection(buffer, comment);
+ }
+
+ if (generatePrologueAndEpilogue)
+ generateEpilogue(buffer);
+ }
+
+ private static void generateMethodSignature(StringBuilder buffer, PsiMethod method) {
generateAnnotations(buffer, method);
String modifiers = PsiFormatUtil.formatModifiers(method, PsiFormatUtilBase.JAVADOC_MODIFIERS_ONLY);
int indent = 0;
@@ -846,33 +900,6 @@ public class JavaDocInfoGenerator {
}
}
}
-
- buffer.append("</PRE>");
- //buffer.append("<br>");
-
- PsiDocComment comment = getMethodDocComment(method);
-
- generateMethodDescription(buffer, method, comment);
-
- generateSuperMethodsSection(buffer, method, false);
- generateSuperMethodsSection(buffer, method, true);
-
- if (comment != null) {
- generateDeprecatedSection(buffer, comment);
- }
-
- generateParametersSection(buffer, method, comment);
- generateTypeParametersSection(buffer, method);
- generateReturnsSection(buffer, method, comment);
- generateThrowsSection(buffer, method, comment);
-
- if (comment != null) {
- generateSinceSection(buffer, comment);
- generateSeeAlsoSection(buffer, comment);
- }
-
- if (generatePrologueAndEpilogue)
- generateEpilogue(buffer);
}
@SuppressWarnings({"HardCodedStringLiteral"})
@@ -1481,7 +1508,7 @@ public class JavaDocInfoGenerator {
String tagName = value.getText();
if (tagName != null && areWeakEqual(tagName, paramName)) {
- parmTag = new Pair<PsiDocTag, InheritDocProvider<PsiDocTag>>(localTag, ourEmptyProvider);
+ parmTag = Pair.create(localTag, ourEmptyProvider);
break;
}
}
@@ -1498,7 +1525,7 @@ public class JavaDocInfoGenerator {
try {
final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(method.getProject()).getElementFactory();
final PsiDocTag tag = elementFactory.createDocTagFromText("@exception " + paramName);
- collectedTags.addLast(new Pair<PsiDocTag, InheritDocProvider<PsiDocTag>>(tag, ourEmptyProvider));
+ collectedTags.addLast(Pair.create(tag, ourEmptyProvider));
}
catch (IncorrectOperationException e) {
LOG.error(e);
diff --git a/java/java-psi-impl/src/com/intellij/core/CoreLanguageLevelProjectExtension.java b/java/java-psi-impl/src/com/intellij/core/CoreLanguageLevelProjectExtension.java
index 07f42cd5c1b8..58956f32a406 100644
--- a/java/java-psi-impl/src/com/intellij/core/CoreLanguageLevelProjectExtension.java
+++ b/java/java-psi-impl/src/com/intellij/core/CoreLanguageLevelProjectExtension.java
@@ -37,6 +37,10 @@ public class CoreLanguageLevelProjectExtension extends LanguageLevelProjectExten
}
@Override
+ public void languageLevelsChanged() {
+ }
+
+ @Override
public void reloadProjectOnLanguageLevelChange(@NotNull LanguageLevel languageLevel, boolean forceReload) {
}
}
diff --git a/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaDocLexer.java b/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaDocLexer.java
deleted file mode 100644
index 1780cbeb9721..000000000000
--- a/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaDocLexer.java
+++ /dev/null
@@ -1,721 +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.
- */
-
-/* The following code was generated by JFlex 1.4.3 on 05.06.13 19:07 */
-
-/* It's an automatically generated code. Do not modify it. */
-package com.intellij.lang.java.lexer;
-
-import com.intellij.lexer.DocCommentTokenTypes;
-import com.intellij.lexer.FlexLexer;
-import com.intellij.psi.tree.IElementType;
-
-@SuppressWarnings("ALL")
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 05.06.13 19:07 from the specification file
- * <tt>C:/Users/roman.shevchenko/Projects/IDEA/tools/lexer/../../community/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaDocLexer.flex</tt>
- */
-class _JavaDocLexer implements FlexLexer {
- /** initial size of the lookahead buffer */
- private static final int ZZ_BUFFERSIZE = 16384;
-
- /** lexical states */
- public static final int INLINE_TAG_NAME = 16;
- public static final int PARAM_TAG_SPACE = 8;
- public static final int COMMENT_DATA = 4;
- public static final int DOC_TAG_VALUE = 10;
- public static final int COMMENT_DATA_START = 2;
- public static final int TAG_DOC_SPACE = 6;
- public static final int YYINITIAL = 0;
- public static final int DOC_TAG_VALUE_IN_PAREN = 12;
- public static final int DOC_TAG_VALUE_IN_LTGT = 14;
-
- /**
- * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
- * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
- * at the beginning of a line
- * l is of the form l = 2*k, k a non negative integer
- */
- private static final int ZZ_LEXSTATE[] = {
- 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,
- 8, 8
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\2\1\1\1\0\1\2\1\1\22\0\1\2\2\0\1\13"+
- "\1\4\3\0\1\11\1\12\1\7\1\0\1\14\1\5\1\3\1\6"+
- "\12\3\1\5\1\0\1\22\1\0\1\23\1\0\1\15\32\4\1\10"+
- "\1\0\1\10\1\0\1\4\1\0\1\17\13\4\1\21\2\4\1\16"+
- "\1\4\1\20\10\4\1\24\1\0\1\25\44\0\4\4\4\0\1\4"+
- "\12\0\1\4\4\0\1\4\5\0\27\4\1\0\37\4\1\0\u01ca\4"+
- "\4\0\14\4\16\0\5\4\7\0\1\4\1\0\1\4\201\0\5\4"+
- "\1\0\2\4\2\0\4\4\10\0\1\4\1\0\3\4\1\0\1\4"+
- "\1\0\24\4\1\0\123\4\1\0\213\4\10\0\236\4\11\0\46\4"+
- "\2\0\1\4\7\0\47\4\110\0\33\4\5\0\3\4\30\0\1\4"+
- "\24\0\53\4\43\0\2\4\1\0\143\4\1\0\1\4\17\0\2\4"+
- "\7\0\2\4\12\0\3\4\2\0\1\4\20\0\1\4\1\0\36\4"+
- "\35\0\131\4\13\0\1\4\30\0\41\4\11\0\2\4\4\0\1\4"+
- "\5\0\26\4\4\0\1\4\11\0\1\4\3\0\1\4\27\0\31\4"+
- "\253\0\66\4\3\0\1\4\22\0\1\4\7\0\12\4\17\0\7\4"+
- "\1\0\7\4\5\0\10\4\2\0\2\4\2\0\26\4\1\0\7\4"+
- "\1\0\1\4\3\0\4\4\3\0\1\4\20\0\1\4\15\0\2\4"+
- "\1\0\3\4\16\0\4\4\7\0\1\4\11\0\6\4\4\0\2\4"+
- "\2\0\26\4\1\0\7\4\1\0\2\4\1\0\2\4\1\0\2\4"+
- "\37\0\4\4\1\0\1\4\23\0\3\4\20\0\11\4\1\0\3\4"+
- "\1\0\26\4\1\0\7\4\1\0\2\4\1\0\5\4\3\0\1\4"+
- "\22\0\1\4\17\0\2\4\17\0\1\4\23\0\10\4\2\0\2\4"+
- "\2\0\26\4\1\0\7\4\1\0\2\4\1\0\5\4\3\0\1\4"+
- "\36\0\2\4\1\0\3\4\17\0\1\4\21\0\1\4\1\0\6\4"+
- "\3\0\3\4\1\0\4\4\3\0\2\4\1\0\1\4\1\0\2\4"+
- "\3\0\2\4\3\0\3\4\3\0\14\4\26\0\1\4\50\0\1\4"+
- "\13\0\10\4\1\0\3\4\1\0\27\4\1\0\12\4\1\0\5\4"+
- "\3\0\1\4\32\0\2\4\6\0\2\4\43\0\10\4\1\0\3\4"+
- "\1\0\27\4\1\0\12\4\1\0\5\4\3\0\1\4\40\0\1\4"+
- "\1\0\2\4\17\0\2\4\22\0\10\4\1\0\3\4\1\0\51\4"+
- "\2\0\1\4\20\0\1\4\21\0\2\4\30\0\6\4\5\0\22\4"+
- "\3\0\30\4\1\0\11\4\1\0\1\4\2\0\7\4\72\0\60\4"+
- "\1\0\2\4\13\0\10\4\72\0\2\4\1\0\1\4\2\0\2\4"+
- "\1\0\1\4\2\0\1\4\6\0\4\4\1\0\7\4\1\0\3\4"+
- "\1\0\1\4\1\0\1\4\2\0\2\4\1\0\4\4\1\0\2\4"+
- "\11\0\1\4\2\0\5\4\1\0\1\4\25\0\2\4\42\0\1\4"+
- "\77\0\10\4\1\0\44\4\33\0\5\4\163\0\53\4\24\0\1\4"+
- "\20\0\6\4\4\0\4\4\3\0\1\4\3\0\2\4\7\0\3\4"+
- "\4\0\15\4\14\0\1\4\21\0\46\4\12\0\53\4\1\0\1\4"+
- "\3\0\u0149\4\1\0\4\4\2\0\7\4\1\0\1\4\1\0\4\4"+
- "\2\0\51\4\1\0\4\4\2\0\41\4\1\0\4\4\2\0\7\4"+
- "\1\0\1\4\1\0\4\4\2\0\17\4\1\0\71\4\1\0\4\4"+
- "\2\0\103\4\45\0\20\4\20\0\125\4\14\0\u026c\4\2\0\21\4"+
- "\1\0\32\4\5\0\113\4\3\0\3\4\17\0\15\4\1\0\4\4"+
- "\16\0\22\4\16\0\22\4\16\0\15\4\1\0\3\4\17\0\64\4"+
- "\43\0\1\4\3\0\2\4\103\0\130\4\10\0\51\4\1\0\1\4"+
- "\5\0\106\4\12\0\35\4\63\0\36\4\2\0\5\4\13\0\54\4"+
- "\25\0\7\4\70\0\27\4\11\0\65\4\122\0\1\4\135\0\57\4"+
- "\21\0\7\4\67\0\36\4\15\0\2\4\20\0\46\4\32\0\44\4"+
- "\51\0\3\4\12\0\44\4\153\0\4\4\1\0\4\4\16\0\300\4"+
- "\100\0\u0116\4\2\0\6\4\2\0\46\4\2\0\6\4\2\0\10\4"+
- "\1\0\1\4\1\0\1\4\1\0\1\4\1\0\37\4\2\0\65\4"+
- "\1\0\7\4\1\0\1\4\3\0\3\4\1\0\7\4\3\0\4\4"+
- "\2\0\6\4\4\0\15\4\5\0\3\4\1\0\7\4\102\0\2\4"+
- "\23\0\1\4\34\0\1\4\15\0\1\4\20\0\15\4\3\0\32\4"+
- "\110\0\1\4\4\0\1\4\2\0\12\4\1\0\1\4\3\0\5\4"+
- "\6\0\1\4\1\0\1\4\1\0\1\4\1\0\4\4\1\0\13\4"+
- "\2\0\4\4\5\0\5\4\4\0\1\4\21\0\51\4\u0a77\0\57\4"+
- "\1\0\57\4\1\0\205\4\6\0\4\4\21\0\46\4\12\0\66\4"+
- "\11\0\1\4\20\0\27\4\11\0\7\4\1\0\7\4\1\0\7\4"+
- "\1\0\7\4\1\0\7\4\1\0\7\4\1\0\7\4\1\0\7\4"+
- "\120\0\1\4\u01d5\0\3\4\31\0\11\4\7\0\5\4\2\0\5\4"+
- "\4\0\126\4\6\0\3\4\1\0\132\4\1\0\4\4\5\0\51\4"+
- "\3\0\136\4\21\0\33\4\65\0\20\4\u0200\0\u19b6\4\112\0\u51cc\4"+
- "\64\0\u048d\4\103\0\56\4\2\0\u010d\4\3\0\20\4\12\0\2\4"+
- "\24\0\57\4\20\0\31\4\10\0\120\4\47\0\11\4\2\0\147\4"+
- "\2\0\4\4\1\0\2\4\16\0\12\4\120\0\10\4\1\0\3\4"+
- "\1\0\4\4\1\0\27\4\25\0\1\4\7\0\64\4\16\0\62\4"+
- "\76\0\6\4\3\0\1\4\16\0\34\4\12\0\27\4\31\0\35\4"+
- "\7\0\57\4\34\0\1\4\60\0\51\4\27\0\3\4\1\0\10\4"+
- "\24\0\27\4\3\0\1\4\5\0\60\4\1\0\1\4\3\0\2\4"+
- "\2\0\5\4\2\0\1\4\1\0\1\4\30\0\3\4\43\0\6\4"+
- "\2\0\6\4\2\0\6\4\11\0\7\4\1\0\7\4\221\0\43\4"+
- "\35\0\u2ba4\4\14\0\27\4\4\0\61\4\u2104\0\u012e\4\2\0\76\4"+
- "\2\0\152\4\46\0\7\4\14\0\5\4\5\0\1\4\1\0\12\4"+
- "\1\0\15\4\1\0\5\4\1\0\1\4\1\0\2\4\1\0\2\4"+
- "\1\0\154\4\41\0\u016b\4\22\0\100\4\2\0\66\4\50\0\15\4"+
- "\66\0\2\4\30\0\3\4\31\0\1\4\6\0\5\4\1\0\207\4"+
- "\7\0\1\4\34\0\32\4\4\0\1\4\1\0\32\4\13\0\131\4"+
- "\3\0\6\4\2\0\6\4\2\0\6\4\2\0\3\4\3\0\2\4"+
- "\3\0\2\4\31\0";
-
- /**
- * Translates characters to character classes
- */
- private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
-
- /**
- * Translates DFA states to action switch labels.
- */
- private static final int [] ZZ_ACTION = zzUnpackAction();
-
- private static final String ZZ_ACTION_PACKED_0 =
- "\11\0\3\1\1\2\1\3\2\2\1\4\1\5\1\6"+
- "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16"+
- "\1\17\1\12\1\20\1\1\1\0\1\21\1\0\2\22"+
- "\1\23\3\22\1\24";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[41];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAction(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
-
- /**
- * Translates a state to a row index in the transition table
- */
- private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
-
- private static final String ZZ_ROWMAP_PACKED_0 =
- "\0\0\0\26\0\54\0\102\0\130\0\156\0\204\0\232"+
- "\0\260\0\306\0\334\0\362\0\306\0\u0108\0\362\0\u011e"+
- "\0\306\0\306\0\u0134\0\u014a\0\u0160\0\u0176\0\u018c\0\306"+
- "\0\306\0\306\0\306\0\306\0\u01a2\0\306\0\u011e\0\u01b8"+
- "\0\306\0\362\0\u01ce\0\u01e4\0\306\0\u01fa\0\u0210\0\u0226"+
- "\0\u01ce";
-
- private static int [] zzUnpackRowMap() {
- int [] result = new int[41];
- int offset = 0;
- offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackRowMap(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int high = packed.charAt(i++) << 16;
- result[j++] = high | packed.charAt(i++);
- }
- return j;
- }
-
- /**
- * The transition table of the DFA
- */
- private static final int [] ZZ_TRANS = zzUnpackTrans();
-
- private static final String ZZ_TRANS_PACKED_0 =
- "\6\12\1\13\1\14\16\12\1\15\2\16\4\15\1\17"+
- "\5\15\1\20\6\15\1\21\1\22\1\15\1\16\1\23"+
- "\4\15\1\17\14\15\1\21\1\22\1\12\2\24\4\12"+
- "\1\14\15\12\1\22\1\12\2\25\4\12\1\14\16\12"+
- "\1\15\2\26\2\27\2\15\1\17\1\27\1\30\1\15"+
- "\1\31\1\32\1\15\4\27\1\33\2\15\1\22\1\12"+
- "\2\16\2\27\2\12\1\14\1\27\1\12\1\34\1\12"+
- "\1\32\1\12\4\27\10\12\1\35\2\12\1\14\6\12"+
- "\4\35\1\12\1\36\11\12\1\14\5\12\1\37\10\12"+
- "\35\0\1\40\24\0\1\41\1\42\17\0\2\16\27\0"+
- "\1\43\11\0\1\44\3\43\6\0\1\23\24\0\2\24"+
- "\24\0\2\25\24\0\2\26\26\0\2\27\3\0\1\27"+
- "\5\0\4\27\7\0\3\35\10\0\4\35\13\0\1\45"+
- "\21\0\3\43\10\0\4\43\7\0\3\43\10\0\1\43"+
- "\1\46\2\43\7\0\3\43\10\0\2\43\1\47\1\43"+
- "\7\0\3\43\10\0\1\43\1\50\2\43\7\0\3\43"+
- "\10\0\3\43\1\51\4\0";
-
- private static int [] zzUnpackTrans() {
- int [] result = new int[572];
- int offset = 0;
- offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackTrans(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- value--;
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
-
- /* error codes */
- private static final int ZZ_UNKNOWN_ERROR = 0;
- private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
- private static final char[] EMPTY_BUFFER = new char[0];
- private static final int YYEOF = -1;
- private static java.io.Reader zzReader = null; // Fake
-
- /* error messages for the codes above */
- private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
- /**
- * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
- */
- private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
-
- private static final String ZZ_ATTRIBUTE_PACKED_0 =
- "\11\0\1\11\2\1\1\11\3\1\2\11\5\1\5\11"+
- "\1\1\1\11\1\1\1\0\1\11\1\0\2\1\1\11"+
- "\4\1";
-
- private static int [] zzUnpackAttribute() {
- int [] result = new int[41];
- int offset = 0;
- offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAttribute(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
- /** the current state of the DFA */
- private int zzState;
-
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private CharSequence zzBuffer = "";
-
- /** this buffer may contains the current text array to be matched when it is cheap to acquire it */
- private char[] zzBufferArray;
-
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int zzPushbackPos;
-
- /** the current text position in the buffer */
- private int zzCurrentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
-
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
-
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
-
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
-
- /* user code: */
- private boolean myJdk15Enabled;
- private DocCommentTokenTypes myTokenTypes;
-
- public _JavaDocLexer(boolean isJdk15Enabled, DocCommentTokenTypes tokenTypes) {
- this((java.io.Reader)null);
- myJdk15Enabled = isJdk15Enabled;
- myTokenTypes = tokenTypes;
- }
-
- public boolean checkAhead(char c) {
- if (zzMarkedPos >= zzBuffer.length()) return false;
- return zzBuffer.charAt(zzMarkedPos) == c;
- }
-
- public void goTo(int offset) {
- zzCurrentPos = zzMarkedPos = zzStartRead = offset;
- zzPushbackPos = 0;
- zzAtEOF = offset < zzEndRead;
- }
-
-
- _JavaDocLexer(java.io.Reader in) {
- this.zzReader = in;
- }
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- _JavaDocLexer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] zzUnpackCMap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 1606) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do map[j++] = value; while (--count > 0);
- }
- return map;
- }
-
- public final int getTokenStart(){
- return zzStartRead;
- }
-
- public final int getTokenEnd(){
- return getTokenStart() + yylength();
- }
-
- public void reset(CharSequence buffer, int start, int end,int initialState){
- zzBuffer = buffer;
- zzBufferArray = com.intellij.util.text.CharArrayUtil.fromSequenceWithoutCopying(buffer);
- zzCurrentPos = zzMarkedPos = zzStartRead = start;
- zzPushbackPos = 0;
- zzAtEOF = false;
- zzAtBOL = true;
- zzEndRead = end;
- yybegin(initialState);
- }
-
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException if any I/O-Error occurs
- */
- private boolean zzRefill() throws java.io.IOException {
- return true;
- }
-
-
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- public final CharSequence yytext() {
- return zzBuffer.subSequence(zzStartRead, zzMarkedPos);
- }
-
-
- /**
- * Returns the character at position <tt>pos</tt> from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- public final char yycharat(int pos) {
- return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos-zzStartRead;
- }
-
-
- /**
- * Reports an error that occured while scanning.
- *
- * In a wellformed scanner (no or only correct usage of
- * yypushback(int) and a match-all fallback rule) this method
- * will only be called with things that "Can't Possibly Happen".
- * If this method is called, something is seriously wrong
- * (e.g. a JFlex bug producing a faulty scanner etc.).
- *
- * Usual syntax/scanner level error handling should be done
- * in error fallback rules.
- *
- * @param errorCode the code of the errormessage to display
- */
- private void zzScanError(int errorCode) {
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
-
- throw new Error(message);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- public void yypushback(int number) {
- if ( number > yylength() )
- zzScanError(ZZ_PUSHBACK_2BIG);
-
- zzMarkedPos -= number;
- }
-
-
- /**
- * Contains user EOF-code, which will be executed exactly once,
- * when the end of file is reached
- */
- private void zzDoEOF() {
- if (!zzEOFDone) {
- zzEOFDone = true;
-
- }
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception java.io.IOException if any I/O-Error occurs
- */
- public IElementType advance() throws java.io.IOException {
- int zzInput;
- int zzAction;
-
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- CharSequence zzBufferL = zzBuffer;
- char[] zzBufferArrayL = zzBufferArray;
- char [] zzCMapL = ZZ_CMAP;
-
- int [] zzTransL = ZZ_TRANS;
- int [] zzRowMapL = ZZ_ROWMAP;
- int [] zzAttrL = ZZ_ATTRIBUTE;
-
- while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- zzState = ZZ_LEXSTATE[zzLexicalState];
-
-
- zzForAction: {
- while (true) {
-
- if (zzCurrentPosL < zzEndReadL)
- zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
- else if (zzAtEOF) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- // store back cached positions
- zzCurrentPos = zzCurrentPosL;
- zzMarkedPos = zzMarkedPosL;
- boolean eof = zzRefill();
- // get translated positions and possibly new buffer
- zzCurrentPosL = zzCurrentPos;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- zzEndReadL = zzEndRead;
- if (eof) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
- }
- }
- int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
- if (zzNext == -1) break zzForAction;
- zzState = zzNext;
-
- int zzAttributes = zzAttrL[zzState];
- if ( (zzAttributes & 1) == 1 ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( (zzAttributes & 8) == 8 ) break zzForAction;
- }
-
- }
- }
-
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
-
- switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 12:
- { return myTokenTypes.tagValueSharp();
- }
- case 21: break;
- case 16:
- { yybegin(COMMENT_DATA); return myTokenTypes.tagValueGT();
- }
- case 22: break;
- case 3:
- { return myTokenTypes.space();
- }
- case 23: break;
- case 6:
- { return myTokenTypes.commentData();
- }
- case 24: break;
- case 5:
- { yybegin(COMMENT_DATA); return myTokenTypes.inlineTagEnd();
- }
- case 25: break;
- case 19:
- { yybegin(COMMENT_DATA_START); return myTokenTypes.commentStart();
- }
- case 26: break;
- case 7:
- { if (checkAhead('<') || checkAhead('\"')) yybegin(COMMENT_DATA);
- else if (checkAhead('\u007b') ) yybegin(COMMENT_DATA); // lbrace - there's a error in JLex when typing lbrace directly
- else yybegin(DOC_TAG_VALUE);
- return myTokenTypes.space();
- }
- case 27: break;
- case 8:
- { yybegin(DOC_TAG_VALUE); return myTokenTypes.space();
- }
- case 28: break;
- case 10:
- { return myTokenTypes.tagValueToken();
- }
- case 29: break;
- case 18:
- { yybegin(TAG_DOC_SPACE); return myTokenTypes.tagName();
- }
- case 30: break;
- case 9:
- { yybegin(COMMENT_DATA); return myTokenTypes.space();
- }
- case 31: break;
- case 20:
- { yybegin(PARAM_TAG_SPACE); return myTokenTypes.tagName();
- }
- case 32: break;
- case 1:
- { return myTokenTypes.badCharacter();
- }
- case 33: break;
- case 15:
- { yybegin(DOC_TAG_VALUE); return myTokenTypes.tagValueRParen();
- }
- case 34: break;
- case 11:
- { yybegin(DOC_TAG_VALUE_IN_PAREN); return myTokenTypes.tagValueLParen();
- }
- case 35: break;
- case 13:
- { return myTokenTypes.tagValueComma();
- }
- case 36: break;
- case 14:
- { if (myJdk15Enabled) {
- yybegin(DOC_TAG_VALUE_IN_LTGT);
- return myTokenTypes.tagValueLT();
- }
- else {
- yybegin(COMMENT_DATA);
- return myTokenTypes.commentData();
- }
- }
- case 37: break;
- case 4:
- { if (checkAhead('@')) {
- yybegin(INLINE_TAG_NAME);
- return myTokenTypes.inlineTagStart();
- }
- else{
- yybegin(COMMENT_DATA);
- return myTokenTypes.inlineTagStart();
- }
- }
- case 38: break;
- case 2:
- { yybegin(COMMENT_DATA); return myTokenTypes.commentData();
- }
- case 39: break;
- case 17:
- { return myTokenTypes.commentEnd();
- }
- case 40: break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- zzDoEOF();
- return null;
- }
- else {
- zzScanError(ZZ_NO_MATCH);
- }
- }
- }
- }
-
-
-}
diff --git a/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.flex b/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.flex
index 4d3de09b8d34..67615506afda 100644
--- a/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.flex
+++ b/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.flex
@@ -19,6 +19,7 @@ import com.intellij.pom.java.LanguageLevel;
import com.intellij.psi.JavaTokenType;
import com.intellij.psi.impl.source.tree.JavaDocElementType;
import com.intellij.psi.tree.IElementType;
+import com.intellij.lexer.FlexLexer;
@SuppressWarnings({"ALL"})
%%
diff --git a/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.java b/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.java
deleted file mode 100644
index 517108e8bcf2..000000000000
--- a/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.java
+++ /dev/null
@@ -1,1451 +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.
- */
-
-/* The following code was generated by JFlex 1.4.3 on 05.06.13 17:47 */
-package com.intellij.lang.java.lexer;
-
-import com.intellij.lexer.FlexLexer;
-import com.intellij.pom.java.LanguageLevel;
-import com.intellij.psi.JavaTokenType;
-import com.intellij.psi.impl.source.tree.JavaDocElementType;
-import com.intellij.psi.tree.IElementType;
-
-@SuppressWarnings({"ALL"})
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 05.06.13 17:47 from the specification file
- * <tt>C:/Users/roman.shevchenko/Projects/IDEA/tools/lexer/../../community/java/java-psi-impl/src/com/intellij/lang/java/lexer/_JavaLexer.flex</tt>
- */
-class _JavaLexer implements FlexLexer {
- /** initial size of the lookahead buffer */
- private static final int ZZ_BUFFERSIZE = 16384;
-
- /** lexical states */
- public static final int YYINITIAL = 0;
-
- /**
- * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
- * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
- * at the beginning of a line
- * l is of the form l = 2*k, k a non negative integer
- */
- private static final int ZZ_LEXSTATE[] = {
- 0, 0
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\3\1\1\1\6\1\0\1\1\1\6\16\3\4\0\1\1\1\60"+
- "\1\26\1\0\1\2\1\67\1\65\1\24\1\70\1\71\1\5\1\62"+
- "\1\77\1\22\1\20\1\4\1\13\11\7\1\102\1\76\1\63\1\57"+
- "\1\64\1\101\1\103\1\11\1\15\1\11\1\17\1\21\1\16\5\2"+
- "\1\12\3\2\1\23\7\2\1\14\2\2\1\74\1\25\1\75\1\66"+
- "\1\10\1\0\1\34\1\40\1\41\1\47\1\32\1\33\1\52\1\45"+
- "\1\46\1\2\1\43\1\35\1\50\1\37\1\42\1\53\1\2\1\30"+
- "\1\36\1\27\1\31\1\54\1\55\1\51\1\44\1\56\1\72\1\61"+
- "\1\73\1\100\41\3\2\0\4\2\4\0\1\2\2\0\1\3\7\0"+
- "\1\2\4\0\1\2\5\0\27\2\1\0\37\2\1\0\u01ca\2\4\0"+
- "\14\2\16\0\5\2\7\0\1\2\1\0\1\2\21\0\160\3\5\2"+
- "\1\0\2\2\2\0\4\2\10\0\1\2\1\0\3\2\1\0\1\2"+
- "\1\0\24\2\1\0\123\2\1\0\213\2\1\0\5\3\2\0\236\2"+
- "\11\0\46\2\2\0\1\2\7\0\47\2\11\0\55\3\1\0\1\3"+
- "\1\0\2\3\1\0\2\3\1\0\1\3\10\0\33\2\5\0\3\2"+
- "\15\0\4\3\7\0\1\2\4\0\13\3\5\0\53\2\37\3\4\0"+
- "\2\2\1\3\143\2\1\0\1\2\10\3\1\0\6\3\2\2\2\3"+
- "\1\0\4\3\2\2\12\3\3\2\2\0\1\2\17\0\1\3\1\2"+
- "\1\3\36\2\33\3\2\0\131\2\13\3\1\2\16\0\12\3\41\2"+
- "\11\3\2\2\4\0\1\2\5\0\26\2\4\3\1\2\11\3\1\2"+
- "\3\3\1\2\5\3\22\0\31\2\3\3\244\0\4\3\66\2\3\3"+
- "\1\2\22\3\1\2\7\3\12\2\2\3\2\0\12\3\1\0\7\2"+
- "\1\0\7\2\1\0\3\3\1\0\10\2\2\0\2\2\2\0\26\2"+
- "\1\0\7\2\1\0\1\2\3\0\4\2\2\0\1\3\1\2\7\3"+
- "\2\0\2\3\2\0\3\3\1\2\10\0\1\3\4\0\2\2\1\0"+
- "\3\2\2\3\2\0\12\3\4\2\7\0\1\2\5\0\3\3\1\0"+
- "\6\2\4\0\2\2\2\0\26\2\1\0\7\2\1\0\2\2\1\0"+
- "\2\2\1\0\2\2\2\0\1\3\1\0\5\3\4\0\2\3\2\0"+
- "\3\3\3\0\1\3\7\0\4\2\1\0\1\2\7\0\14\3\3\2"+
- "\1\3\13\0\3\3\1\0\11\2\1\0\3\2\1\0\26\2\1\0"+
- "\7\2\1\0\2\2\1\0\5\2\2\0\1\3\1\2\10\3\1\0"+
- "\3\3\1\0\3\3\2\0\1\2\17\0\2\2\2\3\2\0\12\3"+
- "\1\0\1\2\17\0\3\3\1\0\10\2\2\0\2\2\2\0\26\2"+
- "\1\0\7\2\1\0\2\2\1\0\5\2\2\0\1\3\1\2\7\3"+
- "\2\0\2\3\2\0\3\3\10\0\2\3\4\0\2\2\1\0\3\2"+
- "\2\3\2\0\12\3\1\0\1\2\20\0\1\3\1\2\1\0\6\2"+
- "\3\0\3\2\1\0\4\2\3\0\2\2\1\0\1\2\1\0\2\2"+
- "\3\0\2\2\3\0\3\2\3\0\14\2\4\0\5\3\3\0\3\3"+
- "\1\0\4\3\2\0\1\2\6\0\1\3\16\0\12\3\11\0\1\2"+
- "\7\0\3\3\1\0\10\2\1\0\3\2\1\0\27\2\1\0\12\2"+
- "\1\0\5\2\3\0\1\2\7\3\1\0\3\3\1\0\4\3\7\0"+
- "\2\3\1\0\2\2\6\0\2\2\2\3\2\0\12\3\22\0\2\3"+
- "\1\0\10\2\1\0\3\2\1\0\27\2\1\0\12\2\1\0\5\2"+
- "\2\0\1\3\1\2\7\3\1\0\3\3\1\0\4\3\7\0\2\3"+
- "\7\0\1\2\1\0\2\2\2\3\2\0\12\3\1\0\2\2\17\0"+
- "\2\3\1\0\10\2\1\0\3\2\1\0\51\2\2\0\1\2\7\3"+
- "\1\0\3\3\1\0\4\3\1\2\10\0\1\3\10\0\2\2\2\3"+
- "\2\0\12\3\12\0\6\2\2\0\2\3\1\0\22\2\3\0\30\2"+
- "\1\0\11\2\1\0\1\2\2\0\7\2\3\0\1\3\4\0\6\3"+
- "\1\0\1\3\1\0\10\3\22\0\2\3\15\0\60\2\1\3\2\2"+
- "\7\3\4\0\10\2\10\3\1\0\12\3\47\0\2\2\1\0\1\2"+
- "\2\0\2\2\1\0\1\2\2\0\1\2\6\0\4\2\1\0\7\2"+
- "\1\0\3\2\1\0\1\2\1\0\1\2\2\0\2\2\1\0\4\2"+
- "\1\3\2\2\6\3\1\0\2\3\1\2\2\0\5\2\1\0\1\2"+
- "\1\0\6\3\2\0\12\3\2\0\2\2\42\0\1\2\27\0\2\3"+
- "\6\0\12\3\13\0\1\3\1\0\1\3\1\0\1\3\4\0\2\3"+
- "\10\2\1\0\44\2\4\0\24\3\1\0\2\3\5\2\13\3\1\0"+
- "\44\3\11\0\1\3\71\0\53\2\24\3\1\2\12\3\6\0\6\2"+
- "\4\3\4\2\3\3\1\2\3\3\2\2\7\3\3\2\4\3\15\2"+
- "\14\3\1\2\17\3\2\0\46\2\12\0\53\2\1\0\1\2\3\0"+
- "\u0149\2\1\0\4\2\2\0\7\2\1\0\1\2\1\0\4\2\2\0"+
- "\51\2\1\0\4\2\2\0\41\2\1\0\4\2\2\0\7\2\1\0"+
- "\1\2\1\0\4\2\2\0\17\2\1\0\71\2\1\0\4\2\2\0"+
- "\103\2\2\0\3\3\40\0\20\2\20\0\125\2\14\0\u026c\2\2\0"+
- "\21\2\1\0\32\2\5\0\113\2\3\0\3\2\17\0\15\2\1\0"+
- "\4\2\3\3\13\0\22\2\3\3\13\0\22\2\2\3\14\0\15\2"+
- "\1\0\3\2\1\0\2\3\14\0\64\2\40\3\3\0\1\2\3\0"+
- "\2\2\1\3\2\0\12\3\41\0\3\3\2\0\12\3\6\0\130\2"+
- "\10\0\51\2\1\3\1\2\5\0\106\2\12\0\35\2\3\0\14\3"+
- "\4\0\14\3\12\0\12\3\36\2\2\0\5\2\13\0\54\2\4\0"+
- "\21\3\7\2\2\3\6\0\12\3\46\0\27\2\5\3\4\0\65\2"+
- "\12\3\1\0\35\3\2\0\13\3\6\0\12\3\15\0\1\2\130\0"+
- "\5\3\57\2\21\3\7\2\4\0\12\3\21\0\11\3\14\0\3\3"+
- "\36\2\12\3\3\0\2\2\12\3\6\0\46\2\16\3\14\0\44\2"+
- "\24\3\10\0\12\3\3\0\3\2\12\3\44\2\122\0\3\3\1\0"+
- "\25\3\4\2\1\3\4\2\1\3\15\0\300\2\47\3\25\0\4\3"+
- "\u0116\2\2\0\6\2\2\0\46\2\2\0\6\2\2\0\10\2\1\0"+
- "\1\2\1\0\1\2\1\0\1\2\1\0\37\2\2\0\65\2\1\0"+
- "\7\2\1\0\1\2\3\0\3\2\1\0\7\2\3\0\4\2\2\0"+
- "\6\2\4\0\15\2\5\0\3\2\1\0\7\2\16\0\5\3\32\0"+
- "\5\3\20\0\2\2\23\0\1\2\13\0\5\3\5\0\6\3\1\0"+
- "\1\2\15\0\1\2\20\0\15\2\3\0\32\2\26\0\15\3\4\0"+
- "\1\3\3\0\14\3\21\0\1\2\4\0\1\2\2\0\12\2\1\0"+
- "\1\2\3\0\5\2\6\0\1\2\1\0\1\2\1\0\1\2\1\0"+
- "\4\2\1\0\13\2\2\0\4\2\5\0\5\2\4\0\1\2\21\0"+
- "\51\2\u0a77\0\57\2\1\0\57\2\1\0\205\2\6\0\4\2\3\3"+
- "\16\0\46\2\12\0\66\2\11\0\1\2\17\0\1\3\27\2\11\0"+
- "\7\2\1\0\7\2\1\0\7\2\1\0\7\2\1\0\7\2\1\0"+
- "\7\2\1\0\7\2\1\0\7\2\1\0\40\3\57\0\1\2\u01d5\0"+
- "\3\2\31\0\11\2\6\3\1\0\5\2\2\0\5\2\4\0\126\2"+
- "\2\0\2\3\2\0\3\2\1\0\132\2\1\0\4\2\5\0\51\2"+
- "\3\0\136\2\21\0\33\2\65\0\20\2\u0200\0\u19b6\2\112\0\u51cc\2"+
- "\64\0\u048d\2\103\0\56\2\2\0\u010d\2\3\0\20\2\12\3\2\2"+
- "\24\0\57\2\1\3\14\0\2\3\1\0\31\2\10\0\120\2\2\3"+
- "\45\0\11\2\2\0\147\2\2\0\4\2\1\0\2\2\16\0\12\2"+
- "\120\0\10\2\1\3\3\2\1\3\4\2\1\3\27\2\5\3\20\0"+
- "\1\2\7\0\64\2\14\0\2\3\62\2\21\3\13\0\12\3\6\0"+
- "\22\3\6\2\3\0\1\2\4\0\12\3\34\2\10\3\2\0\27\2"+
- "\15\3\14\0\35\2\3\0\4\3\57\2\16\3\16\0\1\2\12\3"+
- "\46\0\51\2\16\3\11\0\3\2\1\3\10\2\2\3\2\0\12\3"+
- "\6\0\27\2\3\0\1\2\1\3\4\0\60\2\1\3\1\2\3\3"+
- "\2\2\2\3\5\2\2\3\1\2\1\3\1\2\30\0\3\2\43\0"+
- "\6\2\2\0\6\2\2\0\6\2\11\0\7\2\1\0\7\2\221\0"+
- "\43\2\10\3\1\0\2\3\2\0\12\3\6\0\u2ba4\2\14\0\27\2"+
- "\4\0\61\2\u2104\0\u012e\2\2\0\76\2\2\0\152\2\46\0\7\2"+
- "\14\0\5\2\5\0\1\2\1\3\12\2\1\0\15\2\1\0\5\2"+
- "\1\0\1\2\1\0\2\2\1\0\2\2\1\0\154\2\41\0\u016b\2"+
- "\22\0\100\2\2\0\66\2\50\0\15\2\3\0\20\3\20\0\7\3"+
- "\14\0\2\2\30\0\3\2\31\0\1\2\6\0\5\2\1\0\207\2"+
- "\2\0\1\3\4\0\1\2\13\0\12\3\7\0\32\2\4\0\1\2"+
- "\1\0\32\2\13\0\131\2\3\0\6\2\2\0\6\2\2\0\6\2"+
- "\2\0\3\2\3\0\2\2\3\0\2\2\22\0\3\3\4\0";
-
- /**
- * Translates characters to character classes
- */
- private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
-
- /**
- * Translates DFA states to action switch labels.
- */
- private static final int [] ZZ_ACTION = zzUnpackAction();
-
- private static final String ZZ_ACTION_PACKED_0 =
- "\1\0\1\1\1\2\1\3\1\4\1\5\2\6\1\7"+
- "\1\10\1\11\1\12\20\3\1\13\1\14\1\15\1\16"+
- "\1\17\1\20\1\21\1\22\1\23\1\24\1\25\1\26"+
- "\1\27\1\30\1\31\1\32\1\33\1\34\1\35\1\36"+
- "\1\37\1\40\1\41\1\42\1\43\1\44\1\45\3\46"+
- "\2\6\1\0\1\47\1\50\1\51\2\11\2\12\34\3"+
- "\1\52\3\3\1\53\6\3\1\54\1\55\1\56\1\57"+
- "\1\60\1\61\1\62\1\63\1\64\1\65\1\66\1\67"+
- "\1\70\1\41\1\71\1\46\1\6\1\0\1\72\2\3"+
- "\1\73\10\3\1\74\13\3\1\75\11\3\1\76\14\3"+
- "\1\77\1\0\2\71\1\0\1\100\2\3\1\101\1\3"+
- "\1\102\1\103\6\3\1\104\6\3\1\105\3\3\1\106"+
- "\1\3\1\107\3\3\1\110\6\3\1\111\5\3\1\112"+
- "\1\3\1\41\1\0\1\3\1\113\2\3\1\114\1\115"+
- "\1\116\4\3\1\117\1\3\1\120\2\3\1\121\1\3"+
- "\1\122\1\123\1\3\1\124\13\3\1\125\1\3\1\126"+
- "\1\127\2\3\1\130\2\3\1\131\1\3\1\132\1\133"+
- "\5\3\1\134\1\3\1\135\2\3\1\136\3\3\1\137"+
- "\1\140\3\3\1\141\4\3\1\142\1\3\1\143\1\144"+
- "\2\3\1\145\1\146\1\3\1\147\4\3\1\150\1\151"+
- "\1\3\1\152\2\3\1\153\1\3\1\154\1\155\1\3"+
- "\1\156";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[320];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAction(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
-
- /**
- * Translates a state to a row index in the transition table
- */
- private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
-
- private static final String ZZ_ROWMAP_PACKED_0 =
- "\0\0\0\104\0\210\0\314\0\u0110\0\u0154\0\u0198\0\u01dc"+
- "\0\u0220\0\u0264\0\u02a8\0\u02ec\0\u0330\0\u0374\0\u03b8\0\u03fc"+
- "\0\u0440\0\u0484\0\u04c8\0\u050c\0\u0550\0\u0594\0\u05d8\0\u061c"+
- "\0\u0660\0\u06a4\0\u06e8\0\u072c\0\u0770\0\u07b4\0\u07f8\0\u083c"+
- "\0\u0880\0\104\0\u08c4\0\u0908\0\u094c\0\104\0\104\0\104"+
- "\0\104\0\104\0\104\0\104\0\104\0\104\0\104\0\u0990"+
- "\0\104\0\u09d4\0\u0a18\0\104\0\104\0\104\0\104\0\104"+
- "\0\u0a5c\0\u0aa0\0\u0ae4\0\u0b28\0\u0b6c\0\104\0\104\0\104"+
- "\0\104\0\u0bb0\0\u0bf4\0\104\0\u0c38\0\u0c7c\0\u0cc0\0\u0d04"+
- "\0\u0d48\0\u0d8c\0\u0dd0\0\u0e14\0\u0e58\0\u0e9c\0\u0ee0\0\u0f24"+
- "\0\u0f68\0\u0fac\0\u0ff0\0\u1034\0\u1078\0\u10bc\0\u1100\0\u1144"+
- "\0\u1188\0\u11cc\0\u1210\0\u1254\0\u1298\0\u12dc\0\u1320\0\u1364"+
- "\0\314\0\u13a8\0\u13ec\0\u1430\0\u1474\0\u14b8\0\u14fc\0\u1540"+
- "\0\u1584\0\u15c8\0\u160c\0\104\0\104\0\104\0\104\0\104"+
- "\0\104\0\104\0\u1650\0\104\0\104\0\104\0\104\0\104"+
- "\0\u1694\0\u16d8\0\u171c\0\u1760\0\u17a4\0\104\0\u17e8\0\u182c"+
- "\0\314\0\u1870\0\u18b4\0\u18f8\0\u193c\0\u1980\0\u19c4\0\u1a08"+
- "\0\u1a4c\0\314\0\u1a90\0\u1ad4\0\u1b18\0\u1b5c\0\u1ba0\0\u1be4"+
- "\0\u1c28\0\u1c6c\0\u1cb0\0\u1cf4\0\u1d38\0\314\0\u1d7c\0\u1dc0"+
- "\0\u1e04\0\u1e48\0\u1e8c\0\u1ed0\0\u1f14\0\u1f58\0\u1f9c\0\u1fe0"+
- "\0\u2024\0\u2068\0\u20ac\0\u20f0\0\u2134\0\u2178\0\u21bc\0\u2200"+
- "\0\u2244\0\u2288\0\u22cc\0\u2310\0\104\0\u2354\0\u2398\0\104"+
- "\0\u23dc\0\314\0\u2420\0\u2464\0\314\0\u24a8\0\314\0\314"+
- "\0\u24ec\0\u2530\0\u2574\0\u25b8\0\u25fc\0\u2640\0\314\0\u2684"+
- "\0\u26c8\0\u270c\0\u2750\0\u2794\0\u27d8\0\314\0\u281c\0\u2860"+
- "\0\u28a4\0\314\0\u28e8\0\314\0\u292c\0\u2970\0\u29b4\0\314"+
- "\0\u29f8\0\u2a3c\0\u2a80\0\u2ac4\0\u2b08\0\u2b4c\0\314\0\u2b90"+
- "\0\u2bd4\0\u2c18\0\u2c5c\0\u2ca0\0\314\0\u2ce4\0\104\0\u2d28"+
- "\0\u2d6c\0\u2db0\0\u2df4\0\u2e38\0\314\0\314\0\u2e7c\0\u2ec0"+
- "\0\u2f04\0\u2f48\0\u2f8c\0\314\0\u2fd0\0\314\0\u3014\0\u3058"+
- "\0\314\0\u309c\0\314\0\314\0\u30e0\0\314\0\u3124\0\u3168"+
- "\0\u31ac\0\u31f0\0\u3234\0\u3278\0\u32bc\0\u3300\0\u3344\0\u3388"+
- "\0\u33cc\0\314\0\u3410\0\314\0\314\0\u3454\0\u3498\0\314"+
- "\0\u34dc\0\u3520\0\314\0\u3564\0\314\0\314\0\u35a8\0\u35ec"+
- "\0\u3630\0\u3674\0\u36b8\0\314\0\u36fc\0\314\0\u3740\0\u3784"+
- "\0\314\0\u37c8\0\u380c\0\u3850\0\314\0\314\0\u3894\0\u38d8"+
- "\0\u391c\0\314\0\u3960\0\u39a4\0\u39e8\0\u3a2c\0\314\0\u3a70"+
- "\0\314\0\314\0\u3ab4\0\u3af8\0\314\0\314\0\u3b3c\0\314"+
- "\0\u3b80\0\u3bc4\0\u3c08\0\u3c4c\0\314\0\314\0\u3c90\0\314"+
- "\0\u3cd4\0\u3d18\0\314\0\u3d5c\0\314\0\314\0\u3da0\0\314";
-
- private static int [] zzUnpackRowMap() {
- int [] result = new int[320];
- int offset = 0;
- offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackRowMap(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int high = packed.charAt(i++) << 16;
- result[j++] = high | packed.charAt(i++);
- }
- return j;
- }
-
- /**
- * The transition table of the DFA
- */
- private static final int [] ZZ_TRANS = zzUnpackTrans();
-
- private static final String ZZ_TRANS_PACKED_0 =
- "\1\2\1\3\1\4\1\2\1\5\1\6\1\3\1\7"+
- "\3\4\1\10\4\4\1\11\1\4\1\12\1\4\1\13"+
- "\1\2\1\14\1\15\1\16\1\4\1\17\1\20\1\21"+
- "\1\22\1\23\1\24\1\25\1\26\4\4\1\27\1\30"+
- "\2\4\1\31\1\32\1\33\1\34\1\4\1\35\1\36"+
- "\1\37\1\40\1\41\1\42\1\43\1\44\1\45\1\46"+
- "\1\47\1\50\1\51\1\52\1\53\1\54\1\55\1\56"+
- "\1\57\1\60\1\61\105\0\1\3\4\0\1\3\77\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\30\4\31\0\1\62\1\63\51\0\1\64\103\0\1\65"+
- "\33\0\2\7\1\0\1\66\1\7\2\0\1\67\1\70"+
- "\1\71\1\72\10\0\1\72\1\67\1\0\1\66\11\0"+
- "\1\70\43\0\2\7\1\0\1\66\1\7\1\73\1\74"+
- "\1\67\1\70\1\71\1\72\10\0\1\72\1\67\1\0"+
- "\1\66\2\0\1\74\6\0\1\70\1\0\1\73\41\0"+
- "\1\71\3\0\1\71\4\0\1\75\105\0\1\76\34\0"+
- "\1\77\4\0\1\100\17\0\6\13\1\0\15\13\1\101"+
- "\1\102\56\13\6\14\1\0\16\14\1\103\1\104\55\14"+
- "\2\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\1\4\1\105\14\4\1\106\11\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\3\4"+
- "\1\107\24\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\6\4\1\110\1\4\1\111\11\4"+
- "\1\112\5\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\5\4\1\113\1\114\4\4\1\115"+
- "\3\4\1\116\10\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\7\4\1\117\1\4\1\120"+
- "\16\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\13\4\1\121\14\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\1\122\1\4"+
- "\1\123\12\4\1\124\1\125\7\4\1\126\1\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\2\4\1\127\1\130\1\4\1\131\22\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\1\4"+
- "\1\132\11\4\1\133\1\4\1\134\12\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\5\4"+
- "\1\135\1\136\4\4\1\137\2\4\1\140\11\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\4\4\1\141\3\4\1\142\10\4\1\143\6\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\3\4\1\144\7\4\1\145\14\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\13\4\1\146"+
- "\14\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\1\4\1\147\1\150\2\4\1\151\22\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\13\4\1\152\14\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\16\4\1\153\11\4"+
- "\104\0\1\154\103\0\1\155\103\0\1\156\1\0\1\157"+
- "\101\0\1\160\2\0\1\161\100\0\1\162\3\0\1\163"+
- "\77\0\1\164\5\0\1\165\75\0\1\166\103\0\1\167"+
- "\126\0\1\170\1\0\6\62\1\0\75\62\5\171\1\172"+
- "\76\171\7\0\2\71\2\0\1\71\2\0\1\67\1\70"+
- "\1\0\1\72\10\0\1\72\1\67\13\0\1\70\43\0"+
- "\2\173\2\0\1\173\2\0\1\67\1\70\2\0\1\173"+
- "\10\0\1\67\13\0\1\70\12\0\1\173\30\0\3\174"+
- "\1\66\1\174\1\0\3\174\1\175\1\174\10\0\3\174"+
- "\1\66\2\0\2\174\5\0\1\174\43\0\2\74\1\0"+
- "\1\66\1\74\21\0\1\66\66\0\1\176\63\0\6\13"+
- "\1\0\75\13\6\14\1\0\75\14\2\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\2\4\1\177"+
- "\2\4\1\200\7\4\1\201\12\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\1\4\1\202"+
- "\15\4\1\203\10\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\204\27\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\7\4"+
- "\1\205\20\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\2\4\1\206\25\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\1\207"+
- "\27\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\6\4\1\210\21\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\13\4\1\211"+
- "\14\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\1\4\1\212\26\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\10\4\1\213"+
- "\17\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\7\4\1\214\20\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\7\4\1\215"+
- "\20\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\10\4\1\216\17\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\1\4\1\217"+
- "\3\4\1\220\22\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\24\4\1\221\3\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\10\4\1\222\17\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\13\4\1\223\14\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\17\4\1\224\10\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\6\4\1\225\21\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\26\4\1\226\1\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\227\27\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\3\4"+
- "\1\230\24\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\13\4\1\231\14\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\1\232"+
- "\27\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\1\233\6\4\1\234\20\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\5\4"+
- "\1\235\22\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\10\4\1\236\17\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\5\4"+
- "\1\237\22\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\1\240\6\4\1\241\20\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\24\4\1\242\3\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\4\4\1\243\23\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\2\4\1\244\25\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\245\27\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\13\4"+
- "\1\246\3\4\1\247\10\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\11\4\1\250\16\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\12\4\1\251\15\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\6\4\1\252\10\4"+
- "\1\253\10\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\17\4\1\254\10\4\104\0\1\255"+
- "\24\0\5\171\1\256\76\171\4\257\1\260\1\172\76\257"+
- "\7\0\2\173\2\0\1\173\2\0\1\67\1\70\13\0"+
- "\1\67\13\0\1\70\43\0\3\174\1\66\1\174\1\0"+
- "\3\174\1\261\1\174\1\0\1\72\6\0\3\174\1\66"+
- "\2\0\2\174\5\0\1\174\3\0\1\72\37\0\3\261"+
- "\1\0\1\261\1\0\3\261\1\0\1\261\10\0\3\261"+
- "\3\0\2\261\5\0\1\261\36\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\3\4\1\262\24\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\10\4\1\263\17\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\13\4\1\264\14\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\7\4\1\265\20\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\2\4\1\266\25\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\3\4\1\267\24\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\21\4\1\270\6\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\3\4\1\271\24\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\7\4\1\272\20\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\5\4\1\273\22\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\5\4\1\274\22\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\3\4\1\275\24\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\1\276\27\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\23\4\1\277\4\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\17\4\1\300\10\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\1\301\27\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\3\4\1\302\24\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\12\4"+
- "\1\303\15\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\1\4\1\304\26\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\1\305"+
- "\27\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\6\4\1\306\21\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\17\4\1\307"+
- "\10\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\5\4\1\310\22\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\6\4\1\311"+
- "\21\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\3\4\1\312\24\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\12\4\1\313"+
- "\15\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\3\4\1\314\24\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\7\4\1\315"+
- "\20\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\1\316\6\4\1\317\20\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\1\4"+
- "\1\320\26\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\3\4\1\321\24\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\1\322"+
- "\27\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\6\4\1\323\4\4\1\324\14\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\5\4\1\325\22\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\11\4\1\326\16\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\13\4\1\327\14\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\330\27\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\25\4"+
- "\1\331\2\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\6\4\1\332\21\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\14\4"+
- "\1\333\13\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\5\4\1\334\22\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\20\4"+
- "\1\335\7\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\6\4\1\336\21\4\25\0\4\171"+
- "\1\337\1\256\76\171\5\257\1\340\76\257\7\0\3\261"+
- "\1\0\1\261\1\0\3\261\1\0\1\261\1\0\1\72"+
- "\6\0\3\261\3\0\2\261\5\0\1\261\3\0\1\72"+
- "\32\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\7\4\1\341\20\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\26\4\1\342\1\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\1\4\1\343\26\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\10\4\1\344\17\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\3\4\1\345\24\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\1\346\27\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\6\4\1\347\21\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\4\1\350\26\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\1\4\1\351\26\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\12\4\1\352\15\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\17\4\1\353\10\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\4\1\354\26\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\16\4\1\355\11\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\356\27\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\12\4"+
- "\1\357\15\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\25\4\1\360\2\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\14\4"+
- "\1\361\13\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\3\4\1\362\24\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\16\4"+
- "\1\363\11\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\7\4\1\364\20\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\17\4"+
- "\1\365\10\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\1\366\27\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\1\4\1\367"+
- "\26\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\5\4\1\370\22\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\3\4\1\371"+
- "\24\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\1\4\1\372\26\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\2\4\1\373"+
- "\25\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\6\4\1\374\21\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\3\4\1\375"+
- "\24\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\5\4\1\376\22\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\17\4\1\377"+
- "\10\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\5\4\1\u0100\22\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\1\u0101\27\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\3\4\1\u0102\24\4\25\0\4\257\1\260\1\340"+
- "\76\257\2\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\17\4\1\u0103\10\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\7\4\1\u0104"+
- "\20\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\10\4\1\u0105\17\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\20\4\1\u0106"+
- "\7\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\6\4\1\u0107\21\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\1\u0108\27\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\5\4\1\u0109\22\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\1\u010a\27\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\12\4\1\u010b\15\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\4\1\u010c\26\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\16\4\1\u010d\11\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\3\4\1\u010e\24\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\5\4\1\u010f\22\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\10\4\1\u0110\17\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\4\4\1\u0111\23\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\10\4\1\u0112\17\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\21\4\1\u0113\6\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\u0114\27\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\6\4"+
- "\1\u0115\21\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\3\4\1\u0116\24\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\12\4"+
- "\1\u0117\15\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\1\u0118\27\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\12\4\1\u0119"+
- "\15\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\23\4\1\u011a\4\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\17\4\1\u011b"+
- "\10\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\3\4\1\u011c\24\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\7\4\1\u011d"+
- "\20\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\15\4\1\u011e\12\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\12\4\1\u011f"+
- "\15\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\4\4\1\u0120\23\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\13\4\1\u0121"+
- "\14\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\10\4\1\u0122\17\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\2\4\1\u0123"+
- "\25\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\5\4\1\u0124\22\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\12\4\1\u0125"+
- "\15\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\3\4\1\u0126\24\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\1\u0127\27\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\1\u0128\27\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\3\4\1\u0129\24\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\3\4\1\u012a\24\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\6\4\1\u012b\21\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\10\4\1\u012c\17\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\1\u012d\27\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\24\4"+
- "\1\u012e\3\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\10\4\1\u012f\17\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\3\4"+
- "\1\u0130\24\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\12\4\1\u0131\15\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\3\4"+
- "\1\u0132\24\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\10\4\1\u0133\17\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\3\4"+
- "\1\u0134\24\4\27\0\2\4\3\0\11\4\1\0\1\4"+
- "\1\0\1\4\3\0\3\4\1\u0135\24\4\27\0\2\4"+
- "\3\0\11\4\1\0\1\4\1\0\1\4\3\0\1\u0136"+
- "\27\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\17\4\1\u0137\10\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\3\4\1\u0138"+
- "\24\4\27\0\2\4\3\0\11\4\1\0\1\4\1\0"+
- "\1\4\3\0\13\4\1\u0139\14\4\27\0\2\4\3\0"+
- "\11\4\1\0\1\4\1\0\1\4\3\0\1\u013a\27\4"+
- "\27\0\2\4\3\0\11\4\1\0\1\4\1\0\1\4"+
- "\3\0\20\4\1\u013b\7\4\27\0\2\4\3\0\11\4"+
- "\1\0\1\4\1\0\1\4\3\0\27\4\1\u013c\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\4\4\1\u013d\23\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\7\4\1\u013e\20\4\27\0"+
- "\2\4\3\0\11\4\1\0\1\4\1\0\1\4\3\0"+
- "\3\4\1\u013f\24\4\27\0\2\4\3\0\11\4\1\0"+
- "\1\4\1\0\1\4\3\0\20\4\1\u0140\7\4\25\0";
-
- private static int [] zzUnpackTrans() {
- int [] result = new int[15844];
- int offset = 0;
- offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackTrans(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- value--;
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
-
- /* error codes */
- private static final int ZZ_UNKNOWN_ERROR = 0;
- private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
- private static final char[] EMPTY_BUFFER = new char[0];
- private static final int YYEOF = -1;
- private static java.io.Reader zzReader = null; // Fake
-
- /* error messages for the codes above */
- private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
- /**
- * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
- */
- private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
-
- private static final String ZZ_ATTRIBUTE_PACKED_0 =
- "\1\0\1\11\37\1\1\11\3\1\12\11\1\1\1\11"+
- "\2\1\5\11\4\1\1\0\4\11\2\1\1\11\47\1"+
- "\7\11\1\1\5\11\4\1\1\0\1\11\56\1\1\11"+
- "\1\0\1\1\1\11\1\0\55\1\1\11\1\0\140\1";
-
- private static int [] zzUnpackAttribute() {
- int [] result = new int[320];
- int offset = 0;
- offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAttribute(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
- /** the current state of the DFA */
- private int zzState;
-
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private CharSequence zzBuffer = "";
-
- /** this buffer may contains the current text array to be matched when it is cheap to acquire it */
- private char[] zzBufferArray;
-
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int zzPushbackPos;
-
- /** the current text position in the buffer */
- private int zzCurrentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
-
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
-
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
-
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
-
- /* user code: */
- private boolean myAssertKeyword;
- private boolean myEnumKeyword;
-
- public _JavaLexer(LanguageLevel level) {
- this((java.io.Reader)null);
- myAssertKeyword = level.isAtLeast(LanguageLevel.JDK_1_4);
- myEnumKeyword = level.isAtLeast(LanguageLevel.JDK_1_5);
- }
-
- public void goTo(int offset) {
- zzCurrentPos = zzMarkedPos = zzStartRead = offset;
- zzPushbackPos = 0;
- zzAtEOF = offset < zzEndRead;
- }
-
-
- _JavaLexer(java.io.Reader in) {
- this.zzReader = in;
- }
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- _JavaLexer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] zzUnpackCMap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 2238) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do map[j++] = value; while (--count > 0);
- }
- return map;
- }
-
- public final int getTokenStart(){
- return zzStartRead;
- }
-
- public final int getTokenEnd(){
- return getTokenStart() + yylength();
- }
-
- public void reset(CharSequence buffer, int start, int end,int initialState){
- zzBuffer = buffer;
- zzBufferArray = com.intellij.util.text.CharArrayUtil.fromSequenceWithoutCopying(buffer);
- zzCurrentPos = zzMarkedPos = zzStartRead = start;
- zzPushbackPos = 0;
- zzAtEOF = false;
- zzAtBOL = true;
- zzEndRead = end;
- yybegin(initialState);
- }
-
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException if any I/O-Error occurs
- */
- private boolean zzRefill() throws java.io.IOException {
- return true;
- }
-
-
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- public final CharSequence yytext() {
- return zzBuffer.subSequence(zzStartRead, zzMarkedPos);
- }
-
-
- /**
- * Returns the character at position <tt>pos</tt> from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- public final char yycharat(int pos) {
- return zzBufferArray != null ? zzBufferArray[zzStartRead+pos]:zzBuffer.charAt(zzStartRead+pos);
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos-zzStartRead;
- }
-
-
- /**
- * Reports an error that occured while scanning.
- *
- * In a wellformed scanner (no or only correct usage of
- * yypushback(int) and a match-all fallback rule) this method
- * will only be called with things that "Can't Possibly Happen".
- * If this method is called, something is seriously wrong
- * (e.g. a JFlex bug producing a faulty scanner etc.).
- *
- * Usual syntax/scanner level error handling should be done
- * in error fallback rules.
- *
- * @param errorCode the code of the errormessage to display
- */
- private void zzScanError(int errorCode) {
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
-
- throw new Error(message);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- public void yypushback(int number) {
- if ( number > yylength() )
- zzScanError(ZZ_PUSHBACK_2BIG);
-
- zzMarkedPos -= number;
- }
-
-
- /**
- * Contains user EOF-code, which will be executed exactly once,
- * when the end of file is reached
- */
- private void zzDoEOF() {
- if (!zzEOFDone) {
- zzEOFDone = true;
-
- }
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception java.io.IOException if any I/O-Error occurs
- */
- public IElementType advance() throws java.io.IOException {
- int zzInput;
- int zzAction;
-
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- CharSequence zzBufferL = zzBuffer;
- char[] zzBufferArrayL = zzBufferArray;
- char [] zzCMapL = ZZ_CMAP;
-
- int [] zzTransL = ZZ_TRANS;
- int [] zzRowMapL = ZZ_ROWMAP;
- int [] zzAttrL = ZZ_ATTRIBUTE;
-
- while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- zzState = ZZ_LEXSTATE[zzLexicalState];
-
-
- zzForAction: {
- while (true) {
-
- if (zzCurrentPosL < zzEndReadL)
- zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
- else if (zzAtEOF) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- // store back cached positions
- zzCurrentPos = zzCurrentPosL;
- zzMarkedPos = zzMarkedPosL;
- boolean eof = zzRefill();
- // get translated positions and possibly new buffer
- zzCurrentPosL = zzCurrentPos;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- zzEndReadL = zzEndRead;
- if (eof) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- zzInput = (zzBufferArrayL != null ? zzBufferArrayL[zzCurrentPosL++] : zzBufferL.charAt(zzCurrentPosL++));
- }
- }
- int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
- if (zzNext == -1) break zzForAction;
- zzState = zzNext;
-
- int zzAttributes = zzAttrL[zzState];
- if ( (zzAttributes & 1) == 1 ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( (zzAttributes & 8) == 8 ) break zzForAction;
- }
-
- }
- }
-
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
-
- switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 68:
- { return JavaTokenType.LONG_KEYWORD;
- }
- case 111: break;
- case 99:
- { return JavaTokenType.PRIVATE_KEYWORD;
- }
- case 112: break;
- case 27:
- { return JavaTokenType.COMMA;
- }
- case 113: break;
- case 23:
- { return JavaTokenType.RBRACE;
- }
- case 114: break;
- case 22:
- { return JavaTokenType.LBRACE;
- }
- case 115: break;
- case 65:
- { return JavaTokenType.THIS_KEYWORD;
- }
- case 116: break;
- case 83:
- { return JavaTokenType.CLASS_KEYWORD;
- }
- case 117: break;
- case 14:
- { return JavaTokenType.PLUS;
- }
- case 118: break;
- case 54:
- { return JavaTokenType.XOREQ;
- }
- case 119: break;
- case 62:
- { return JavaTokenType.INT_KEYWORD;
- }
- case 120: break;
- case 80:
- { return JavaTokenType.SHORT_KEYWORD;
- }
- case 121: break;
- case 44:
- { return JavaTokenType.EQEQ;
- }
- case 122: break;
- case 67:
- { return myEnumKeyword ? JavaTokenType.ENUM_KEYWORD : JavaTokenType.IDENTIFIER;
- }
- case 123: break;
- case 101:
- { return JavaTokenType.ABSTRACT_KEYWORD;
- }
- case 124: break;
- case 69:
- { return JavaTokenType.NULL_KEYWORD;
- }
- case 125: break;
- case 95:
- { return JavaTokenType.EXTENDS_KEYWORD;
- }
- case 126: break;
- case 51:
- { return JavaTokenType.LTLT;
- }
- case 127: break;
- case 20:
- { return JavaTokenType.LPARENTH;
- }
- case 128: break;
- case 12:
- { return JavaTokenType.EXCL;
- }
- case 129: break;
- case 102:
- { return JavaTokenType.STRICTFP_KEYWORD;
- }
- case 130: break;
- case 34:
- { return JavaTokenType.DIVEQ;
- }
- case 131: break;
- case 89:
- { return JavaTokenType.STATIC_KEYWORD;
- }
- case 132: break;
- case 39:
- { return JavaTokenType.MINUSMINUS;
- }
- case 133: break;
- case 76:
- { return JavaTokenType.FALSE_KEYWORD;
- }
- case 134: break;
- case 1:
- { return JavaTokenType.BAD_CHARACTER;
- }
- case 135: break;
- case 90:
- { return JavaTokenType.SWITCH_KEYWORD;
- }
- case 136: break;
- case 26:
- { return JavaTokenType.SEMICOLON;
- }
- case 137: break;
- case 18:
- { return JavaTokenType.XOR;
- }
- case 138: break;
- case 38:
- { return JavaTokenType.DOUBLE_LITERAL;
- }
- case 139: break;
- case 46:
- { return JavaTokenType.OREQ;
- }
- case 140: break;
- case 11:
- { return JavaTokenType.EQ;
- }
- case 141: break;
- case 4:
- { return JavaTokenType.DIV;
- }
- case 142: break;
- case 66:
- { return JavaTokenType.ELSE_KEYWORD;
- }
- case 143: break;
- case 61:
- { return JavaTokenType.NEW_KEYWORD;
- }
- case 144: break;
- case 58:
- { return JavaTokenType.ELLIPSIS;
- }
- case 145: break;
- case 53:
- { return JavaTokenType.ANDAND;
- }
- case 146: break;
- case 81:
- { return JavaTokenType.BREAK_KEYWORD;
- }
- case 147: break;
- case 9:
- { return JavaTokenType.CHARACTER_LITERAL;
- }
- case 148: break;
- case 52:
- { return JavaTokenType.ANDEQ;
- }
- case 149: break;
- case 6:
- { return JavaTokenType.INTEGER_LITERAL;
- }
- case 150: break;
- case 77:
- { return JavaTokenType.FLOAT_KEYWORD;
- }
- case 151: break;
- case 10:
- { return JavaTokenType.STRING_LITERAL;
- }
- case 152: break;
- case 72:
- { return JavaTokenType.CHAR_KEYWORD;
- }
- case 153: break;
- case 91:
- { return JavaTokenType.NATIVE_KEYWORD;
- }
- case 154: break;
- case 43:
- { return JavaTokenType.DO_KEYWORD;
- }
- case 155: break;
- case 7:
- { return JavaTokenType.DOT;
- }
- case 156: break;
- case 28:
- { return JavaTokenType.TILDE;
- }
- case 157: break;
- case 110:
- { return JavaTokenType.SYNCHRONIZED_KEYWORD;
- }
- case 158: break;
- case 32:
- { return JavaTokenType.END_OF_LINE_COMMENT;
- }
- case 159: break;
- case 35:
- { return JavaTokenType.ASTERISKEQ;
- }
- case 160: break;
- case 79:
- { return JavaTokenType.SUPER_KEYWORD;
- }
- case 161: break;
- case 40:
- { return JavaTokenType.MINUSEQ;
- }
- case 162: break;
- case 63:
- { return JavaTokenType.LTLTEQ;
- }
- case 163: break;
- case 73:
- { return JavaTokenType.GOTO_KEYWORD;
- }
- case 164: break;
- case 25:
- { return JavaTokenType.RBRACKET;
- }
- case 165: break;
- case 33:
- { return JavaTokenType.C_STYLE_COMMENT;
- }
- case 166: break;
- case 15:
- { return JavaTokenType.LT;
- }
- case 167: break;
- case 42:
- { return JavaTokenType.IF_KEYWORD;
- }
- case 168: break;
- case 8:
- { return JavaTokenType.MINUS;
- }
- case 169: break;
- case 85:
- { return JavaTokenType.WHILE_KEYWORD;
- }
- case 170: break;
- case 70:
- { return JavaTokenType.BYTE_KEYWORD;
- }
- case 171: break;
- case 96:
- { return JavaTokenType.FINALLY_KEYWORD;
- }
- case 172: break;
- case 74:
- { return JavaTokenType.VOID_KEYWORD;
- }
- case 173: break;
- case 29:
- { return JavaTokenType.QUEST;
- }
- case 174: break;
- case 19:
- { return JavaTokenType.PERC;
- }
- case 175: break;
- case 109:
- { return JavaTokenType.IMPLEMENTS_KEYWORD;
- }
- case 176: break;
- case 86:
- { return JavaTokenType.THROWS_KEYWORD;
- }
- case 177: break;
- case 41:
- { return JavaTokenType.ARROW;
- }
- case 178: break;
- case 78:
- { return JavaTokenType.FINAL_KEYWORD;
- }
- case 179: break;
- case 93:
- { return JavaTokenType.DOUBLE_KEYWORD;
- }
- case 180: break;
- case 88:
- { return myAssertKeyword ? JavaTokenType.ASSERT_KEYWORD : JavaTokenType.IDENTIFIER;
- }
- case 181: break;
- case 107:
- { return JavaTokenType.PROTECTED_KEYWORD;
- }
- case 182: break;
- case 103:
- { return JavaTokenType.CONTINUE_KEYWORD;
- }
- case 183: break;
- case 100:
- { return JavaTokenType.PACKAGE_KEYWORD;
- }
- case 184: break;
- case 16:
- { return JavaTokenType.GT;
- }
- case 185: break;
- case 24:
- { return JavaTokenType.LBRACKET;
- }
- case 186: break;
- case 36:
- { return JavaTokenType.LONG_LITERAL;
- }
- case 187: break;
- case 60:
- { return JavaTokenType.FOR_KEYWORD;
- }
- case 188: break;
- case 98:
- { return JavaTokenType.DEFAULT_KEYWORD;
- }
- case 189: break;
- case 48:
- { return JavaTokenType.PLUSEQ;
- }
- case 190: break;
- case 87:
- { return JavaTokenType.RETURN_KEYWORD;
- }
- case 191: break;
- case 64:
- { return JavaTokenType.TRUE_KEYWORD;
- }
- case 192: break;
- case 49:
- { return JavaTokenType.PLUSPLUS;
- }
- case 193: break;
- case 47:
- { return JavaTokenType.OROR;
- }
- case 194: break;
- case 13:
- { return JavaTokenType.OR;
- }
- case 195: break;
- case 3:
- { return JavaTokenType.IDENTIFIER;
- }
- case 196: break;
- case 55:
- { return JavaTokenType.PERCEQ;
- }
- case 197: break;
- case 30:
- { return JavaTokenType.COLON;
- }
- case 198: break;
- case 104:
- { return JavaTokenType.VOLATILE_KEYWORD;
- }
- case 199: break;
- case 106:
- { return JavaTokenType.INTERFACE_KEYWORD;
- }
- case 200: break;
- case 108:
- { return JavaTokenType.INSTANCEOF_KEYWORD;
- }
- case 201: break;
- case 105:
- { return JavaTokenType.TRANSIENT_KEYWORD;
- }
- case 202: break;
- case 97:
- { return JavaTokenType.BOOLEAN_KEYWORD;
- }
- case 203: break;
- case 71:
- { return JavaTokenType.CASE_KEYWORD;
- }
- case 204: break;
- case 5:
- { return JavaTokenType.ASTERISK;
- }
- case 205: break;
- case 92:
- { return JavaTokenType.IMPORT_KEYWORD;
- }
- case 206: break;
- case 31:
- { return JavaTokenType.AT;
- }
- case 207: break;
- case 45:
- { return JavaTokenType.NE;
- }
- case 208: break;
- case 59:
- { return JavaTokenType.TRY_KEYWORD;
- }
- case 209: break;
- case 82:
- { return JavaTokenType.CATCH_KEYWORD;
- }
- case 210: break;
- case 37:
- { return JavaTokenType.FLOAT_LITERAL;
- }
- case 211: break;
- case 17:
- { return JavaTokenType.AND;
- }
- case 212: break;
- case 75:
- { return JavaTokenType.THROW_KEYWORD;
- }
- case 213: break;
- case 57:
- { return JavaDocElementType.DOC_COMMENT;
- }
- case 214: break;
- case 56:
- { return JavaTokenType.DOUBLE_COLON;
- }
- case 215: break;
- case 21:
- { return JavaTokenType.RPARENTH;
- }
- case 216: break;
- case 2:
- { return JavaTokenType.WHITE_SPACE;
- }
- case 217: break;
- case 94:
- { return JavaTokenType.PUBLIC_KEYWORD;
- }
- case 218: break;
- case 50:
- { return JavaTokenType.LE;
- }
- case 219: break;
- case 84:
- { return JavaTokenType.CONST_KEYWORD;
- }
- case 220: break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- zzDoEOF();
- return null;
- }
- else {
- zzScanError(ZZ_NO_MATCH);
- }
- }
- }
- }
-
-
-}
diff --git a/java/java-psi-impl/src/com/intellij/psi/PsiDiamondTypeImpl.java b/java/java-psi-impl/src/com/intellij/psi/PsiDiamondTypeImpl.java
index 49b0b557ef7e..e1116894f14f 100644
--- a/java/java-psi-impl/src/com/intellij/psi/PsiDiamondTypeImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/PsiDiamondTypeImpl.java
@@ -22,8 +22,13 @@ import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.util.Ref;
import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.pom.java.LanguageLevel;
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
+import com.intellij.psi.infos.CandidateInfo;
import com.intellij.psi.infos.MethodCandidateInfo;
+import com.intellij.psi.scope.PsiConflictResolver;
+import com.intellij.psi.scope.conflictResolvers.JavaMethodsConflictResolver;
+import com.intellij.psi.scope.processor.MethodCandidatesProcessor;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.util.PsiUtil;
@@ -33,9 +38,7 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.Set;
+import java.util.*;
/**
* @author anna
@@ -139,10 +142,7 @@ public class PsiDiamondTypeImpl extends PsiDiamondType {
final PsiSubstitutor inferredSubstitutor = ourDiamondGuard.doPreventingRecursion(context, false, new Computable<PsiSubstitutor>() {
@Override
public PsiSubstitutor compute() {
- final PsiMethod constructor = findConstructor(psiClass, newExpression);
- PsiTypeParameter[] params = getAllTypeParams(constructor, psiClass);
-
- final PsiMethod staticFactory = generateStaticFactory(constructor, psiClass, params, newExpression.getClassReference());
+ final PsiMethod staticFactory = findConstructorStaticFactory(psiClass, newExpression);
if (staticFactory == null) {
return null;
}
@@ -164,6 +164,11 @@ public class PsiDiamondTypeImpl extends PsiDiamondType {
final PsiJavaCodeReferenceElement classOrAnonymousClassReference = newExpression.getClassOrAnonymousClassReference();
LOG.assertTrue(classOrAnonymousClassReference != null);
final DiamondInferenceResult result = new DiamondInferenceResult(classOrAnonymousClassReference.getReferenceName() + "<>");
+
+ if (PsiUtil.isRawSubstitutor(staticFactory, inferredSubstitutor)) {
+ return result;
+ }
+
for (PsiTypeParameter parameter : parameters) {
for (PsiTypeParameter classParameter : classParameters) {
if (Comparing.strEqual(classParameter.getName(), parameter.getName())) {
@@ -177,14 +182,42 @@ public class PsiDiamondTypeImpl extends PsiDiamondType {
@Nullable
- private static PsiMethod findConstructor(PsiClass containingClass, PsiNewExpression newExpression) {
+ private static PsiMethod findConstructorStaticFactory(final PsiClass containingClass, PsiNewExpression newExpression) {
final PsiExpressionList argumentList = newExpression.getArgumentList();
- final Project project = newExpression.getProject();
- final JavaPsiFacade facade = JavaPsiFacade.getInstance(project);
- final PsiResolveHelper resolveHelper = facade.getResolveHelper();
- final JavaResolveResult result =
- resolveHelper.resolveConstructor(facade.getElementFactory().createType(containingClass, PsiSubstitutor.EMPTY), argumentList, argumentList);
- return (PsiMethod)result.getElement();
+ if (argumentList == null) return null;
+
+ final LanguageLevel languageLevel = PsiUtil.getLanguageLevel(newExpression);
+ final List<CandidateInfo> conflicts = new ArrayList<CandidateInfo>();
+ PsiMethod[] constructors = containingClass.getConstructors();
+ if (constructors.length == 0) {
+ //default constructor
+ constructors = new PsiMethod[] {null};
+ }
+
+ final PsiConflictResolver[] conflictResolvers = {new JavaMethodsConflictResolver(argumentList, languageLevel)};
+ final MethodCandidatesProcessor processor = new MethodCandidatesProcessor(argumentList, argumentList.getContainingFile(), conflictResolvers, conflicts) {
+ @Override
+ protected boolean isAccepted(PsiMethod candidate) {
+ return true;
+ }
+
+ @Override
+ protected PsiClass getContainingClass(PsiMethod method) {
+ return containingClass;
+ }
+ };
+ processor.setArgumentList(argumentList);
+
+ for (PsiMethod constructor : constructors) {
+ final PsiTypeParameter[] params = getAllTypeParams(constructor, containingClass);
+ final PsiMethod staticFactory = generateStaticFactory(constructor, containingClass, params, newExpression.getClassReference());
+ if (staticFactory != null) {
+ processor.add(staticFactory, PsiSubstitutor.EMPTY);
+ }
+ }
+
+ final JavaResolveResult[] result = processor.getResult();
+ return result.length == 1 ? (PsiMethod)result[0].getElement() : null;
}
@Nullable
@@ -220,7 +253,11 @@ public class PsiDiamondTypeImpl extends PsiDiamondType {
PsiTypeParameter[] params,
PsiJavaCodeReferenceElement reference) {
final StringBuilder buf = new StringBuilder();
- buf.append("public static ");
+ buf.append(constructor != null ? constructor.getModifierList().getText() : containingClass.getModifierList().getText());
+ if (buf.length() > 0) {
+ buf.append(" ");
+ }
+ buf.append("static ");
buf.append("<");
buf.append(StringUtil.join(params, new Function<PsiTypeParameter, String>() {
@Override
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/EmptySubstitutorImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/EmptySubstitutorImpl.java
index dc8a2e8eeef8..c03bb1ce3821 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/EmptySubstitutorImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/EmptySubstitutorImpl.java
@@ -75,4 +75,6 @@ public final class EmptySubstitutorImpl extends EmptySubstitutor {
return true;
}
+ @Override
+ public void ensureValid() { }
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/ExpressionConverter.java b/java/java-psi-impl/src/com/intellij/psi/impl/ExpressionConverter.java
new file mode 100644
index 000000000000..60c054aeb80c
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/ExpressionConverter.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.psi.impl;
+
+import com.intellij.lang.Language;
+import com.intellij.lang.LanguageExtension;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * @author Maxim.Medvedev
+ */
+public abstract class ExpressionConverter {
+ public static final LanguageExtension<ExpressionConverter> EP =
+ new LanguageExtension<ExpressionConverter>("com.intellij.expressionConverter");
+
+ protected abstract PsiElement convert(PsiElement expression, Project project);
+
+ @Nullable
+ public static PsiElement getExpression(PsiElement expression, Language language, Project project) {
+ if (expression.getLanguage() == language) return expression;
+
+ final ExpressionConverter converter = EP.forLanguage(language);
+ if (converter == null) return null;
+ return converter.convert(expression, project);
+ }
+}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java b/java/java-psi-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java
index 3f4cea44d90a..748d907aec47 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java
@@ -925,7 +925,7 @@ public class PsiClassImplUtil {
final PsiMethod[] methodsByName = psiClass.findMethodsByName(name, false);
final List<Pair<PsiMethod, PsiSubstitutor>> ret = new ArrayList<Pair<PsiMethod, PsiSubstitutor>>(methodsByName.length);
for (final PsiMethod method : methodsByName) {
- ret.add(new Pair<PsiMethod, PsiSubstitutor>(method, PsiSubstitutor.EMPTY));
+ ret.add(Pair.create(method, PsiSubstitutor.EMPTY));
}
return ret;
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/PsiImplUtil.java b/java/java-psi-impl/src/com/intellij/psi/impl/PsiImplUtil.java
index 22518474710f..2e666639d566 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/PsiImplUtil.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/PsiImplUtil.java
@@ -481,8 +481,8 @@ public class PsiImplUtil {
}
public static PsiType normalizeWildcardTypeByPosition(@NotNull PsiType type, @NotNull PsiExpression expression) {
- LOG.assertTrue(expression.isValid());
- LOG.assertTrue(type.isValid());
+ PsiUtilCore.ensureValid(expression);
+ PsiUtil.ensureValidType(type);
PsiExpression toplevel = expression;
while (toplevel.getParent() instanceof PsiArrayAccessExpression &&
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java
index 05819c471a27..2ededda029f8 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/PsiJavaParserFacadeImpl.java
@@ -168,7 +168,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, ANNOTATION, level(context)), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiAnnotation)) {
- throw new IncorrectOperationException("Incorrect annotation \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect annotation '" + text + "'");
}
return (PsiAnnotation)element;
}
@@ -194,7 +194,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final PsiJavaFile aFile = createDummyJavaFile(StringUtil.join("class _Dummy_ {\n", body, "\n}"));
final PsiClass[] classes = aFile.getClasses();
if (classes.length != 1) {
- throw new IncorrectOperationException("Incorrect class \"" + body + "\".");
+ throw new IncorrectOperationException("Incorrect class '" + body + "'");
}
return classes[0];
}
@@ -205,7 +205,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, DECLARATION, level(context)), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiField)) {
- throw new IncorrectOperationException("Incorrect field \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect field '" + text + "'");
}
return (PsiField)element;
}
@@ -216,7 +216,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, DECLARATION, level), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiMethod)) {
- throw newException("Incorrect method \"" + text + "\".", holder);
+ throw newException("Incorrect method '" + text + "'", holder);
}
return (PsiMethod)element;
}
@@ -234,7 +234,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, PARAMETER, level(context)), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiParameter)) {
- throw new IncorrectOperationException("Incorrect parameter \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect parameter '" + text + "'");
}
return (PsiParameter)element;
}
@@ -245,7 +245,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, RESOURCE, level(context)), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiResourceVariable)) {
- throw new IncorrectOperationException("Incorrect resource \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect resource '" + text + "'");
}
return (PsiResourceVariable)element;
}
@@ -259,10 +259,11 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
@NotNull
@Override
public PsiTypeElement createTypeElementFromText(@NotNull final String text, @Nullable final PsiElement context) throws IncorrectOperationException {
- final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, TYPE, level(context)), context);
+ final LanguageLevel level = level(context);
+ final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, TYPE, level), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiTypeElement)) {
- throw new IncorrectOperationException("Incorrect type \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect type '" + text + "' (" + level + ")");
}
return (PsiTypeElement)element;
}
@@ -289,7 +290,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, wrapper, level(context)), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiJavaCodeReferenceElement)) {
- throw new IncorrectOperationException("Incorrect reference \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect reference '" + text + "'");
}
return (PsiJavaCodeReferenceElement)element;
}
@@ -300,7 +301,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, CODE_BLOCK, level(context), true), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiCodeBlock)) {
- throw new IncorrectOperationException("Incorrect code block \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect code block '" + text + "'");
}
return (PsiCodeBlock)element;
}
@@ -311,7 +312,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, STATEMENT, level(context)), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiStatement)) {
- throw new IncorrectOperationException("Incorrect statement \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect statement '" + text + "'");
}
return (PsiStatement)element;
}
@@ -322,7 +323,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, EXPRESSION, level(context)), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiExpression)) {
- throw new IncorrectOperationException("Incorrect expression \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect expression '" + text + "'");
}
return (PsiExpression)element;
}
@@ -339,7 +340,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiTypeParameter)) {
- throw new IncorrectOperationException("Incorrect type parameter \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect type parameter '" + text + "'");
}
return (PsiTypeParameter)element;
}
@@ -359,7 +360,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
}
}
- throw new IncorrectOperationException("Incorrect comment \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect comment '" + text + "'");
}
@NotNull
@@ -368,7 +369,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
final DummyHolder holder = DummyHolderFactory.createHolder(myManager, new JavaDummyElement(text, ENUM_CONSTANT, level(context)), context);
final PsiElement element = SourceTreeToPsiMap.treeElementToPsi(holder.getTreeElement().getFirstChildNode());
if (!(element instanceof PsiEnumConstant)) {
- throw new IncorrectOperationException("Incorrect enum constant \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect enum constant '" + text + "'");
}
return (PsiEnumConstant)element;
}
@@ -378,7 +379,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
public PsiType createPrimitiveType(@NotNull final String text, @NotNull final PsiAnnotation[] annotations) throws IncorrectOperationException {
final PsiPrimitiveType primitiveType = getPrimitiveType(text);
if (primitiveType == null) {
- throw new IncorrectOperationException("Incorrect primitive type \"" + text + "\".");
+ throw new IncorrectOperationException("Incorrect primitive type '" + text + "'");
}
return annotations.length == 0 ? primitiveType : new PsiPrimitiveType(text, annotations);
}
@@ -396,9 +397,7 @@ public class PsiJavaParserFacadeImpl implements PsiJavaParserFacade {
if (root instanceof JavaDummyElement) {
final Throwable cause = ((JavaDummyElement)root).getParserError();
if (cause != null) {
- return new IncorrectOperationException(msg) {
- @Override public Throwable getCause() { return cause; }
- };
+ return new IncorrectOperationException(msg, cause);
}
}
return new IncorrectOperationException(msg);
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/PsiSubstitutorImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/PsiSubstitutorImpl.java
index e7e3dd073e3c..994bc1ef0976 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/PsiSubstitutorImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/PsiSubstitutorImpl.java
@@ -171,7 +171,7 @@ public class PsiSubstitutorImpl implements PsiSubstitutor {
return newBound;
}
- return rebound(wildcardType, newBound);
+ return newBound == PsiType.NULL ? newBound : rebound(wildcardType, newBound);
}
}
@@ -395,7 +395,7 @@ public class PsiSubstitutorImpl implements PsiSubstitutor {
final PsiType[] boundTypes = typeParameter.getExtendsListTypes();
for (PsiType boundType : boundTypes) {
if (TypeConversionUtil.isAssignable(erasure, boundType)) {
- return boundType;
+ return boundType.accept(mySimpleSubstitutionVisitor);
}
}
}
@@ -533,14 +533,22 @@ public class PsiSubstitutorImpl implements PsiSubstitutor {
@Override
public boolean isValid() {
- Collection<PsiType> substitutorValues = mySubstitutionMap.values();
- for (PsiType type : substitutorValues) {
+ for (PsiType type : mySubstitutionMap.values()) {
if (type != null && !type.isValid()) return false;
}
return true;
}
@Override
+ public void ensureValid() {
+ for (PsiType type : mySubstitutionMap.values()) {
+ if (type != null) {
+ PsiUtil.ensureValidType(type);
+ }
+ }
+ }
+
+ @Override
@NotNull
public Map<PsiTypeParameter, PsiType> getSubstitutionMap() {
return Collections.unmodifiableMap(mySubstitutionMap);
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/PsiSuperMethodImplUtil.java b/java/java-psi-impl/src/com/intellij/psi/impl/PsiSuperMethodImplUtil.java
index f4f9e881d4ba..d70fa1f4be4b 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/PsiSuperMethodImplUtil.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/PsiSuperMethodImplUtil.java
@@ -184,7 +184,7 @@ public class PsiSuperMethodImplUtil {
// methods must be inherited from unrelated classes, so flatten hierarchy here
// class C implements SAM1, SAM2 { void methodimpl() {} }
//hms.getSuperSignatures().remove(aSuper);
- flattened.add(new Pair<MethodSignature, HierarchicalMethodSignature>(signature, aSuper));
+ flattened.add(Pair.create(signature, aSuper));
}
}
putInMap(aClass, result, map, hms, signature);
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/ImplicitVariableImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/ImplicitVariableImpl.java
new file mode 100644
index 000000000000..b6333d42c796
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/ImplicitVariableImpl.java
@@ -0,0 +1,57 @@
+/*
+ * 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.psi.impl.light;
+
+import com.intellij.psi.*;
+import com.intellij.psi.search.SearchScope;
+import com.intellij.psi.search.LocalSearchScope;
+import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * @author dsl
+ */
+public abstract class ImplicitVariableImpl extends LightVariableBase implements ImplicitVariable {
+
+ public ImplicitVariableImpl(PsiManager manager, PsiIdentifier nameIdentifier, PsiType type, boolean writable, PsiElement scope) {
+ super(manager, nameIdentifier, type, writable, scope);
+ }
+
+ @Override
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof JavaElementVisitor) {
+ ((JavaElementVisitor)visitor).visitImplicitVariable(this);
+ }
+ else {
+ visitor.visitElement(this);
+ }
+ }
+
+ public String toString() {
+ return "Implicit variable:" + getName();
+ }
+
+ @Override
+ public void setInitializer(PsiExpression initializer) throws IncorrectOperationException {
+ throw new IncorrectOperationException();
+ }
+
+ @Override
+ @NotNull
+ public SearchScope getUseScope() {
+ return new LocalSearchScope(getDeclarationScope());
+ }
+}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightFieldBuilder.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightFieldBuilder.java
new file mode 100644
index 000000000000..72256079a0fd
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightFieldBuilder.java
@@ -0,0 +1,86 @@
+/*
+ * 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.psi.impl.light;
+
+import com.intellij.lang.java.JavaLanguage;
+import com.intellij.psi.*;
+import com.intellij.psi.javadoc.PsiDocComment;
+import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * @author Maxim.Medvedev
+ */
+public class LightFieldBuilder extends LightVariableBuilder<LightFieldBuilder> implements PsiField {
+ private PsiClass myContainingClass = null;
+ private PsiExpression myInitializer = null;
+ private PsiDocComment myDocComment = null;
+ private boolean myIsDeprecated = false;
+
+ public LightFieldBuilder(@NotNull String name, @NotNull String type, @NotNull PsiElement navigationElement) {
+ super(name, JavaPsiFacade.getElementFactory(navigationElement.getProject()).createTypeFromText(type, navigationElement),
+ navigationElement);
+ }
+
+ public LightFieldBuilder(@NotNull String name, @NotNull PsiType type, @NotNull PsiElement navigationElement) {
+ super(name, type, navigationElement);
+ }
+
+ public LightFieldBuilder(PsiManager manager, @NotNull String name, @NotNull PsiType type) {
+ super(manager, name, type, JavaLanguage.INSTANCE);
+ }
+
+ public LightFieldBuilder setContainingClass(PsiClass psiClass) {
+ myContainingClass = psiClass;
+ return this;
+ }
+
+ @Override
+ public void setInitializer(@Nullable PsiExpression initializer) throws IncorrectOperationException {
+ myInitializer = initializer;
+ }
+
+ @Override
+ public PsiExpression getInitializer() {
+ return myInitializer;
+ }
+
+ @Override
+ public PsiDocComment getDocComment() {
+ return myDocComment;
+ }
+
+ public LightFieldBuilder setDocComment(PsiDocComment docComment) {
+ myDocComment = docComment;
+ return this;
+ }
+
+ @Override
+ public boolean isDeprecated() {
+ return myIsDeprecated;
+ }
+
+ public LightFieldBuilder setIsDeprecated(boolean isDeprecated) {
+ myIsDeprecated = isDeprecated;
+ return this;
+ }
+
+ @Override
+ public PsiClass getContainingClass() {
+ return myContainingClass;
+ }
+}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightMethodBuilder.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightMethodBuilder.java
new file mode 100644
index 000000000000..ae2ab543eab9
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightMethodBuilder.java
@@ -0,0 +1,440 @@
+/*
+ * 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.psi.impl.light;
+
+import com.intellij.psi.OriginInfoAwareElement;
+import com.intellij.lang.Language;
+import com.intellij.lang.java.JavaLanguage;
+import com.intellij.navigation.ItemPresentation;
+import com.intellij.navigation.ItemPresentationProviders;
+import com.intellij.openapi.util.Computable;
+import com.intellij.psi.*;
+import com.intellij.psi.impl.ElementPresentationUtil;
+import com.intellij.psi.impl.PsiClassImplUtil;
+import com.intellij.psi.impl.PsiImplUtil;
+import com.intellij.psi.impl.PsiSuperMethodImplUtil;
+import com.intellij.psi.javadoc.PsiDocComment;
+import com.intellij.psi.search.SearchScope;
+import com.intellij.psi.util.MethodSignature;
+import com.intellij.psi.util.MethodSignatureBackedByPsiMethod;
+import com.intellij.ui.RowIcon;
+import com.intellij.util.IncorrectOperationException;
+import com.intellij.util.PlatformIcons;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.swing.*;
+import java.util.List;
+
+/**
+ * @author peter
+ */
+public class LightMethodBuilder extends LightElement implements PsiMethod, OriginInfoAwareElement {
+ private final String myName;
+ private Computable<PsiType> myReturnType;
+ private final PsiModifierList myModifierList;
+ private final PsiParameterList myParameterList;
+ private final PsiTypeParameterList myTypeParameterList;
+ private final PsiReferenceList myThrowsList;
+ private Icon myBaseIcon;
+ private PsiClass myContainingClass;
+ private boolean myConstructor;
+ private String myMethodKind = "LightMethodBuilder";
+ private String myOriginInfo = null;
+
+ public LightMethodBuilder(PsiClass constructedClass, Language language) {
+ this(constructedClass.getManager(), language, constructedClass.getName());
+ setContainingClass(constructedClass);
+ }
+
+ public LightMethodBuilder(PsiManager manager, String name) {
+ this(manager, JavaLanguage.INSTANCE, name);
+ }
+
+ public LightMethodBuilder(PsiManager manager, Language language, String name) {
+ this(manager, language, name, new LightParameterListBuilder(manager, language), new LightModifierList(manager, language));
+ }
+
+ public LightMethodBuilder(PsiManager manager,
+ Language language,
+ String name,
+ PsiParameterList parameterList,
+ PsiModifierList modifierList) {
+ this(manager, language, name, parameterList, modifierList,
+ new LightReferenceListBuilder(manager, language, PsiReferenceList.Role.THROWS_LIST),
+ new LightTypeParameterListBuilder(manager, language));
+ }
+
+ public LightMethodBuilder(PsiManager manager,
+ Language language,
+ String name,
+ PsiParameterList parameterList,
+ PsiModifierList modifierList,
+ PsiReferenceList throwsList,
+ PsiTypeParameterList typeParameterList) {
+ super(manager, language);
+ myName = name;
+ myParameterList = parameterList;
+ myModifierList = modifierList;
+ myThrowsList = throwsList;
+ myTypeParameterList = typeParameterList;
+ }
+
+ @Override
+ public ItemPresentation getPresentation() {
+ return ItemPresentationProviders.getItemPresentation(this);
+ }
+
+ @Override
+ public boolean hasTypeParameters() {
+ return PsiImplUtil.hasTypeParameters(this);
+ }
+
+ @Override
+ @NotNull
+ public PsiTypeParameter[] getTypeParameters() {
+ return PsiImplUtil.getTypeParameters(this);
+ }
+
+ @Override
+ public PsiTypeParameterList getTypeParameterList() {
+ return myTypeParameterList;
+ }
+
+ @Override
+ public PsiDocComment getDocComment() {
+ //todo
+ return null;
+ }
+
+ @Override
+ public boolean isDeprecated() {
+ return PsiImplUtil.isDeprecatedByDocTag(this) || PsiImplUtil.isDeprecatedByAnnotation(this);
+ }
+
+ @Override
+ public PsiElement setName(@NotNull String name) throws IncorrectOperationException {
+ final String className = myContainingClass == null ? "null" : myContainingClass.getQualifiedName();
+ throw new UnsupportedOperationException("Please don't rename light methods: writable=" + isWritable() +
+ "; class=" + getClass() +
+ "; name=" + getName() +
+ "; inClass=" + className);
+ }
+
+ @Override
+ @NotNull
+ public String getName() {
+ return myName;
+ }
+
+ @Override
+ @NotNull
+ public HierarchicalMethodSignature getHierarchicalMethodSignature() {
+ return PsiSuperMethodImplUtil.getHierarchicalMethodSignature(this);
+ }
+
+ @Override
+ public boolean hasModifierProperty(@NotNull String name) {
+ return getModifierList().hasModifierProperty(name);
+ }
+
+ @Override
+ @NotNull
+ public PsiModifierList getModifierList() {
+ return myModifierList;
+ }
+
+ public LightMethodBuilder addModifiers(String... modifiers) {
+ for (String modifier : modifiers) {
+ addModifier(modifier);
+ }
+ return this;
+ }
+
+ public LightMethodBuilder addModifier(String modifier) {
+ ((LightModifierList)myModifierList).addModifier(modifier);
+ return this;
+ }
+
+ public LightMethodBuilder setModifiers(String... modifiers) {
+ ((LightModifierList)myModifierList).clearModifiers();
+ addModifiers(modifiers);
+ return this;
+ }
+
+ @Override
+ public PsiType getReturnType() {
+ return myReturnType == null ? null : myReturnType.compute();
+ }
+
+ public LightMethodBuilder setMethodReturnType(Computable<PsiType> returnType) {
+ myReturnType = returnType;
+ return this;
+ }
+
+ public LightMethodBuilder setMethodReturnType(PsiType returnType) {
+ return setMethodReturnType(new Computable.PredefinedValueComputable<PsiType>(returnType));
+ }
+
+ public LightMethodBuilder setMethodReturnType(@NotNull final String returnType) {
+ return setMethodReturnType(new Computable.NotNullCachedComputable<PsiType>() {
+ @NotNull
+ @Override
+ protected PsiType internalCompute() {
+ return JavaPsiFacade.getInstance(myManager.getProject()).getElementFactory().createTypeByFQClassName(returnType, getResolveScope());
+ }
+ });
+ }
+
+ @Override
+ public PsiTypeElement getReturnTypeElement() {
+ return null;
+ }
+
+ @Override
+ @NotNull
+ public PsiParameterList getParameterList() {
+ return myParameterList;
+ }
+
+ public LightMethodBuilder addParameter(@NotNull PsiParameter parameter) {
+ ((LightParameterListBuilder)myParameterList).addParameter(parameter);
+ return this;
+ }
+
+ public LightMethodBuilder addParameter(@NotNull String name, @NotNull String type) {
+ return addParameter(name, JavaPsiFacade.getElementFactory(getProject()).createTypeFromText(type, this));
+ }
+
+ public LightMethodBuilder addParameter(@NotNull String name, @NotNull PsiType type) {
+ return addParameter(new LightParameter(name, type, this, JavaLanguage.INSTANCE));
+ }
+
+ public LightMethodBuilder addParameter(@NotNull String name, @NotNull PsiType type, boolean isVarArgs) {
+ if (isVarArgs && !(type instanceof PsiEllipsisType)) {
+ type = new PsiEllipsisType(type);
+ }
+ return addParameter(new LightParameter(name, type, this, JavaLanguage.INSTANCE, isVarArgs));
+ }
+
+ public LightMethodBuilder addException(PsiClassType type) {
+ ((LightReferenceListBuilder)myThrowsList).addReference(type);
+ return this;
+ }
+
+ public LightMethodBuilder addException(String fqName) {
+ ((LightReferenceListBuilder)myThrowsList).addReference(fqName);
+ return this;
+ }
+
+
+ @Override
+ @NotNull
+ public PsiReferenceList getThrowsList() {
+ return myThrowsList;
+ }
+
+ @Override
+ public PsiCodeBlock getBody() {
+ return null;
+ }
+
+ public LightMethodBuilder setConstructor(boolean constructor) {
+ myConstructor = constructor;
+ return this;
+ }
+
+ @Override
+ public boolean isConstructor() {
+ return myConstructor;
+ }
+
+ @Override
+ public boolean isVarArgs() {
+ return PsiImplUtil.isVarArgs(this);
+ }
+
+ @Override
+ @NotNull
+ public MethodSignature getSignature(@NotNull PsiSubstitutor substitutor) {
+ return MethodSignatureBackedByPsiMethod.create(this, substitutor);
+ }
+
+ @Override
+ public PsiIdentifier getNameIdentifier() {
+ return null;
+ }
+
+ @Override
+ @NotNull
+ public PsiMethod[] findSuperMethods() {
+ return PsiSuperMethodImplUtil.findSuperMethods(this);
+ }
+
+ @Override
+ @NotNull
+ public PsiMethod[] findSuperMethods(boolean checkAccess) {
+ return PsiSuperMethodImplUtil.findSuperMethods(this, checkAccess);
+ }
+
+ @Override
+ @NotNull
+ public PsiMethod[] findSuperMethods(PsiClass parentClass) {
+ return PsiSuperMethodImplUtil.findSuperMethods(this, parentClass);
+ }
+
+ @Override
+ @NotNull
+ public List<MethodSignatureBackedByPsiMethod> findSuperMethodSignaturesIncludingStatic(boolean checkAccess) {
+ return PsiSuperMethodImplUtil.findSuperMethodSignaturesIncludingStatic(this, checkAccess);
+ }
+
+ @Override
+ public PsiMethod findDeepestSuperMethod() {
+ return PsiSuperMethodImplUtil.findDeepestSuperMethod(this);
+ }
+
+ @Override
+ @NotNull
+ public PsiMethod[] findDeepestSuperMethods() {
+ return PsiSuperMethodImplUtil.findDeepestSuperMethods(this);
+ }
+
+ @Override
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof JavaElementVisitor) {
+ ((JavaElementVisitor)visitor).visitMethod(this);
+ }
+ }
+
+ @Override
+ public PsiClass getContainingClass() {
+ return myContainingClass;
+ }
+
+ public LightMethodBuilder setContainingClass(PsiClass containingClass) {
+ myContainingClass = containingClass;
+ return this;
+ }
+
+ public LightMethodBuilder setMethodKind(String debugKindName) {
+ myMethodKind = debugKindName;
+ return this;
+ }
+
+ public String toString() {
+ return myMethodKind + ":" + getName();
+ }
+
+ @Override
+ public Icon getElementIcon(final int flags) {
+ Icon methodIcon = myBaseIcon != null ? myBaseIcon :
+ hasModifierProperty(PsiModifier.ABSTRACT) ? PlatformIcons.ABSTRACT_METHOD_ICON : PlatformIcons.METHOD_ICON;
+ RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(methodIcon, this, false);
+ return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon);
+ }
+
+ @Override
+ protected boolean isVisibilitySupported() {
+ return true;
+ }
+
+ public LightMethodBuilder setBaseIcon(Icon baseIcon) {
+ myBaseIcon = baseIcon;
+ return this;
+ }
+
+ @Override
+ public boolean isEquivalentTo(final PsiElement another) {
+ return PsiClassImplUtil.isMethodEquivalentTo(this, another);
+ }
+
+ @Override
+ @NotNull
+ public SearchScope getUseScope() {
+ return PsiImplUtil.getMemberUseScope(this);
+ }
+
+ @Nullable
+ @Override
+ public PsiFile getContainingFile() {
+ final PsiClass containingClass = getContainingClass();
+ return containingClass == null ? null : containingClass.getContainingFile();
+ }
+
+ @Override
+ public PsiElement getContext() {
+ final PsiElement navElement = getNavigationElement();
+ if (navElement != this) {
+ return navElement;
+ }
+
+ final PsiClass cls = getContainingClass();
+ if (cls != null) {
+ return cls;
+ }
+
+ return getContainingFile();
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ LightMethodBuilder that = (LightMethodBuilder)o;
+
+ if (myConstructor != that.myConstructor) return false;
+ if (myBaseIcon != null ? !myBaseIcon.equals(that.myBaseIcon) : that.myBaseIcon != null) return false;
+ if (myContainingClass != null ? !myContainingClass.equals(that.myContainingClass) : that.myContainingClass != null) return false;
+ if (!myMethodKind.equals(that.myMethodKind)) return false;
+ if (!myModifierList.equals(that.myModifierList)) return false;
+ if (!myName.equals(that.myName)) return false;
+ if (!myParameterList.equals(that.myParameterList)) return false;
+ if (myReturnType != null ? !myReturnType.equals(that.myReturnType) : that.myReturnType != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = myName.hashCode();
+ result = 31 * result + (myReturnType != null ? myReturnType.hashCode() : 0);
+ result = 31 * result + myModifierList.hashCode();
+ result = 31 * result + myParameterList.hashCode();
+ result = 31 * result + (myBaseIcon != null ? myBaseIcon.hashCode() : 0);
+ result = 31 * result + (myContainingClass != null ? myContainingClass.hashCode() : 0);
+ result = 31 * result + (myConstructor ? 1 : 0);
+ result = 31 * result + myMethodKind.hashCode();
+ return result;
+ }
+
+ public LightMethodBuilder addTypeParameter(PsiTypeParameter parameter) {
+ ((LightTypeParameterListBuilder)myTypeParameterList).addParameter(new LightTypeParameter(parameter));
+ return this;
+ }
+
+ @Nullable
+ @Override
+ public String getOriginInfo() {
+ return myOriginInfo;
+ }
+
+ public void setOriginInfo(@Nullable String originInfo) {
+ myOriginInfo = originInfo;
+ }
+
+}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightModifierList.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightModifierList.java
index beabfe469619..4988c6b530ea 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightModifierList.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightModifierList.java
@@ -118,6 +118,23 @@ public class LightModifierList extends LightElement implements PsiModifierList {
return "PsiModifierList";
}
+ @Override
+ public String getText() {
+ StringBuilder buffer = new StringBuilder();
+
+ for (String modifier : PsiModifier.MODIFIERS) {
+ if (hasExplicitModifier(modifier)) {
+ buffer.append(modifier);
+ buffer.append(' ');
+ }
+ }
+
+ if (buffer.length() > 0) {
+ buffer.delete(buffer.length() - 1, buffer.length());
+ }
+ return buffer.toString();
+ }
+
public String[] getModifiers() {
return ArrayUtil.toStringArray(myModifiers);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightParameter.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightParameter.java
new file mode 100644
index 000000000000..44834f7999e9
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightParameter.java
@@ -0,0 +1,62 @@
+/*
+ * 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.psi.impl.light;
+
+import com.intellij.lang.Language;
+import com.intellij.psi.*;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * @author peter
+ */
+public class LightParameter extends LightVariableBuilder<LightVariableBuilder> implements PsiParameter {
+ public static final LightParameter[] EMPTY_ARRAY = new LightParameter[0];
+
+ private final PsiElement myDeclarationScope;
+ private final boolean myVarArgs;
+
+ public LightParameter(@NotNull String name, @NotNull PsiType type, PsiElement declarationScope, Language language) {
+ this(name, type, declarationScope, language, type instanceof PsiEllipsisType);
+ }
+
+ public LightParameter(@NotNull String name, @NotNull PsiType type, PsiElement declarationScope, Language language, boolean isVarArgs) {
+ super(declarationScope.getManager(), name, type, language);
+ myDeclarationScope = declarationScope;
+ myVarArgs = isVarArgs;
+ }
+
+ @NotNull
+ @Override
+ public PsiElement getDeclarationScope() {
+ return myDeclarationScope;
+ }
+
+ @Override
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof JavaElementVisitor) {
+ ((JavaElementVisitor)visitor).visitParameter(this);
+ }
+ }
+
+ public String toString() {
+ return "Light Parameter";
+ }
+
+ @Override
+ public boolean isVarArgs() {
+ return myVarArgs;
+ }
+}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightReferenceListBuilder.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightReferenceListBuilder.java
new file mode 100644
index 000000000000..cfcc7a9267d8
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightReferenceListBuilder.java
@@ -0,0 +1,106 @@
+/*
+ * 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.psi.impl.light;
+
+import com.intellij.lang.Language;
+import com.intellij.lang.java.JavaLanguage;
+import com.intellij.psi.*;
+import com.intellij.util.containers.ContainerUtil;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Max Medvedev
+ */
+public class LightReferenceListBuilder extends LightElement implements PsiReferenceList {
+ private final List<PsiJavaCodeReferenceElement> myRefs = new ArrayList<PsiJavaCodeReferenceElement>();
+ private PsiJavaCodeReferenceElement[] myCachedRefs = null;
+ private PsiClassType[] myCachedTypes = null;
+ private final Role myRole;
+ private final PsiElementFactory myFactory;
+
+ public LightReferenceListBuilder(PsiManager manager, Role role) {
+ this(manager, JavaLanguage.INSTANCE, role);
+ }
+
+ public LightReferenceListBuilder(PsiManager manager, Language language, Role role) {
+ super(manager, language);
+ myRole = role;
+ myFactory = JavaPsiFacade.getElementFactory(getProject());
+ }
+
+ @Override
+ public String toString() {
+ return "light reference list";
+ }
+
+ public void addReference(PsiClass aClass) {
+ addReference(aClass.getQualifiedName());
+ }
+
+ public void addReference(String qualifiedName) {
+ final PsiJavaCodeReferenceElement ref = myFactory.createReferenceElementByFQClassName(qualifiedName, getResolveScope());
+ myRefs.add(ref);
+ }
+
+ public void addReference(PsiClassType type) {
+ final PsiClass resolved = type.resolve();
+ if (resolved == null) return;
+
+ final PsiJavaCodeReferenceElement ref = myFactory.createReferenceElementByType(type);
+ myRefs.add(ref);
+ }
+
+ @NotNull
+ @Override
+ public PsiJavaCodeReferenceElement[] getReferenceElements() {
+ if (myCachedRefs == null) {
+ if (myRefs.isEmpty()) {
+ myCachedRefs = PsiJavaCodeReferenceElement.EMPTY_ARRAY;
+ }
+ else {
+ myCachedRefs = ContainerUtil.toArray(myRefs, new PsiJavaCodeReferenceElement[myRefs.size()]);
+ }
+ }
+ return myCachedRefs;
+ }
+
+ @NotNull
+ @Override
+ public PsiClassType[] getReferencedTypes() {
+ if (myCachedTypes == null) {
+ if (myRefs.isEmpty()) {
+ myCachedTypes = PsiClassType.EMPTY_ARRAY;
+ }
+ else {
+ final int size = myRefs.size();
+ myCachedTypes = new PsiClassType[size];
+ for (int i = 0; i < size; i++) {
+ myCachedTypes[i] = myFactory.createType(myRefs.get(i));
+ }
+ }
+ }
+
+ return myCachedTypes;
+ }
+
+ @Override
+ public Role getRole() {
+ return myRole;
+ }
+}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightVariableBase.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightVariableBase.java
new file mode 100644
index 000000000000..ca486682259b
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightVariableBase.java
@@ -0,0 +1,166 @@
+/*
+ * 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.psi.impl.light;
+
+import com.intellij.psi.OriginInfoAwareElement;
+import com.intellij.lang.Language;
+import com.intellij.lang.java.JavaLanguage;
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.psi.*;
+import com.intellij.psi.impl.ElementPresentationUtil;
+import com.intellij.psi.impl.PsiImplUtil;
+import com.intellij.ui.RowIcon;
+import com.intellij.util.IncorrectOperationException;
+import com.intellij.util.PlatformIcons;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.swing.*;
+
+/**
+ * @author ven
+ */
+public abstract class LightVariableBase extends LightElement implements PsiVariable, OriginInfoAwareElement {
+ protected PsiElement myScope;
+ protected PsiIdentifier myNameIdentifier;
+ protected PsiType myType;
+ protected final PsiModifierList myModifierList;
+ protected boolean myWritable;
+ private String myOriginInfo = null;
+
+ public LightVariableBase(PsiManager manager, PsiIdentifier nameIdentifier, PsiType type, boolean writable, PsiElement scope) {
+ this(manager, nameIdentifier, JavaLanguage.INSTANCE, type, writable, scope);
+ }
+
+ public LightVariableBase(PsiManager manager, PsiIdentifier nameIdentifier, Language language, PsiType type, boolean writable, PsiElement scope) {
+ super(manager, language);
+ myNameIdentifier = nameIdentifier;
+ myWritable = writable;
+ myType = type;
+ myScope = scope;
+ myModifierList = createModifierList();
+ }
+
+ protected PsiModifierList createModifierList() {
+ return new LightModifierList(getManager());
+ }
+
+ @NotNull
+ public PsiElement getDeclarationScope() {
+ return myScope;
+ }
+
+ @Override
+ public PsiIdentifier getNameIdentifier() {
+ return myNameIdentifier;
+ }
+
+ @Override
+ public boolean isValid() {
+ return myNameIdentifier == null || myNameIdentifier.isValid();
+ }
+
+ @Override
+ @NotNull
+ public String getName() {
+ return StringUtil.notNullize(getNameIdentifier().getText());
+ }
+
+ @Override
+ public PsiElement setName(@NotNull String name) throws IncorrectOperationException{
+ PsiImplUtil.setName(getNameIdentifier(), name);
+ return this;
+ }
+
+ @Override
+ @NotNull
+ public PsiType getType() {
+ if (myType == null) {
+ myType = computeType();
+ }
+ return myType;
+ }
+
+ @NotNull
+ protected PsiType computeType() {
+ return PsiType.VOID;
+ }
+
+ @Override
+ @NotNull
+ public PsiTypeElement getTypeElement() {
+ return JavaPsiFacade.getInstance(getProject()).getElementFactory().createTypeElement(myType);
+ }
+
+ @Override
+ public PsiModifierList getModifierList() {
+ return myModifierList;
+ }
+
+ @Override
+ public boolean hasModifierProperty(@NotNull String name) {
+ return getModifierList().hasModifierProperty(name);
+ }
+
+ @Override
+ public PsiExpression getInitializer() {
+ return null;
+ }
+
+ @Override
+ public boolean hasInitializer() {
+ return false;
+ }
+
+ @Override
+ public String getText() {
+ return myNameIdentifier.getText();
+ }
+
+ @Override
+ public Object computeConstantValue() {
+ return null;
+ }
+
+ @Override
+ public void normalizeDeclaration() throws IncorrectOperationException {
+ }
+
+ @Override
+ public boolean isWritable() {
+ return myWritable;
+ }
+ @Override
+ protected boolean isVisibilitySupported() {
+ return true;
+ }
+
+ @Override
+ public Icon getElementIcon(final int flags) {
+ final RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(PlatformIcons.VARIABLE_ICON, this, false);
+ return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon);
+ }
+
+ @Nullable
+ @Override
+ public String getOriginInfo() {
+ return myOriginInfo;
+ }
+
+ public void setOriginInfo(String originInfo) {
+ myOriginInfo = originInfo;
+ }
+}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightVariableBuilder.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightVariableBuilder.java
new file mode 100644
index 000000000000..fc2a90e24406
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightVariableBuilder.java
@@ -0,0 +1,156 @@
+/*
+ * 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.psi.impl.light;
+
+import com.intellij.psi.OriginInfoAwareElement;
+import com.intellij.lang.Language;
+import com.intellij.lang.java.JavaLanguage;
+import com.intellij.navigation.NavigationItem;
+import com.intellij.psi.*;
+import com.intellij.psi.impl.ElementPresentationUtil;
+import com.intellij.ui.RowIcon;
+import com.intellij.util.IncorrectOperationException;
+import com.intellij.util.PlatformIcons;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.swing.*;
+
+/**
+ * @author peter
+ */
+public class LightVariableBuilder<T extends LightVariableBuilder> extends LightElement implements PsiVariable, NavigationItem, OriginInfoAwareElement {
+ private final String myName;
+ private final PsiType myType;
+ private volatile LightModifierList myModifierList;
+ private volatile Icon myBaseIcon = PlatformIcons.VARIABLE_ICON;
+ private String myOriginInfo;
+
+ public LightVariableBuilder(@NotNull String name, @NotNull String type, @NotNull PsiElement navigationElement) {
+ this(name, JavaPsiFacade.getElementFactory(navigationElement.getProject()).createTypeFromText(type, navigationElement), navigationElement);
+ }
+
+ public LightVariableBuilder(@NotNull String name, @NotNull PsiType type, @NotNull PsiElement navigationElement) {
+ this(navigationElement.getManager(), name, type, JavaLanguage.INSTANCE);
+ setNavigationElement(navigationElement);
+ }
+
+ public LightVariableBuilder(PsiManager manager, @NotNull String name, @NotNull PsiType type, Language language) {
+ super(manager, language);
+ myName = name;
+ myType = type;
+ myModifierList = new LightModifierList(manager);
+ }
+
+ @Override
+ public String toString() {
+ return "LightVariableBuilder:" + getName();
+ }
+
+ @NotNull
+ @Override
+ public PsiType getType() {
+ return myType;
+ }
+
+ @Override
+ @NotNull
+ public PsiModifierList getModifierList() {
+ return myModifierList;
+ }
+
+ public T setModifiers(String... modifiers) {
+ myModifierList = new LightModifierList(getManager(), getLanguage(), modifiers);
+ return (T)this;
+ }
+
+ public T setModifierList(LightModifierList modifierList) {
+ myModifierList = modifierList;
+ return (T)this;
+ }
+
+ @Override
+ public boolean hasModifierProperty(@NonNls @NotNull String name) {
+ return myModifierList.hasModifierProperty(name);
+ }
+
+ @NotNull
+ @Override
+ public String getName() {
+ return myName;
+ }
+
+ @Override
+ public PsiTypeElement getTypeElement() {
+ return null;
+ }
+
+ @Override
+ public PsiExpression getInitializer() {
+ return null;
+ }
+
+ @Override
+ public boolean hasInitializer() {
+ return false;
+ }
+
+ @Override
+ public void normalizeDeclaration() throws IncorrectOperationException {
+ }
+
+ @Override
+ public Object computeConstantValue() {
+ return null;
+ }
+
+ @Override
+ public PsiIdentifier getNameIdentifier() {
+ return null;
+ }
+
+ @Override
+ public PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException {
+ throw new UnsupportedOperationException("setName is not implemented yet in com.intellij.psi.impl.light.LightVariableBuilder");
+ }
+
+ @Override
+ protected boolean isVisibilitySupported() {
+ return true;
+ }
+
+ @Override
+ public Icon getElementIcon(final int flags) {
+ final RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(myBaseIcon, this, false);
+ return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon);
+ }
+
+ public T setBaseIcon(Icon baseIcon) {
+ myBaseIcon = baseIcon;
+ return (T)this;
+ }
+
+ @Nullable
+ @Override
+ public String getOriginInfo() {
+ return myOriginInfo;
+ }
+
+ public void setOriginInfo(@Nullable String originInfo) {
+ myOriginInfo = originInfo;
+ }
+}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiImmediateClassType.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiImmediateClassType.java
index 77a45011144d..fe8193039998 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiImmediateClassType.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiImmediateClassType.java
@@ -169,7 +169,7 @@ public class PsiImmediateClassType extends PsiClassType.Stub {
private enum TextType { PRESENTABLE, CANONICAL, INT_CANONICAL }
private String getText(@NotNull TextType textType, boolean annotated) {
- assert mySubstitutor.isValid();
+ mySubstitutor.ensureValid();
StringBuilder buffer = new StringBuilder();
buildText(myClass, mySubstitutor, buffer, textType, annotated);
return buffer.toString();
@@ -184,6 +184,9 @@ public class PsiImmediateClassType extends PsiClassType.Stub {
ClassResolveResult baseResolveResult = ((PsiAnonymousClass)aClass).getBaseClassType().resolveGenerics();
PsiClass baseClass = baseResolveResult.getElement();
if (baseClass != null) {
+ if (textType == TextType.INT_CANONICAL) {
+ buffer.append("anonymous ");
+ }
buildText(baseClass, baseResolveResult.getSubstitutor(), buffer, textType, false);
}
return;
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaCodeReferenceElementImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaCodeReferenceElementImpl.java
index 1b60c157e248..60cb54cefe6b 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaCodeReferenceElementImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaCodeReferenceElementImpl.java
@@ -376,6 +376,7 @@ public class PsiJavaCodeReferenceElementImpl extends CompositePsiElement impleme
PsiFile containingFile = SharedImplUtil.getContainingFile(fileElement);
boolean valid = containingFile != null && containingFile.isValid();
if (!valid) {
+ PsiUtilCore.ensureValid(this);
LOG.error("invalid!");
return JavaResolveResult.EMPTY_ARRAY;
}
@@ -587,8 +588,8 @@ public class PsiJavaCodeReferenceElementImpl extends CompositePsiElement impleme
text += parameterList.getText();
}
PsiJavaCodeReferenceElement ref = facade.getParserFacade().createReferenceFromText(text, getParent());
- getTreeParent().replaceChildInternal(this, (TreeElement)ref.getNode());
((PsiJavaCodeReferenceElementImpl)ref).setAnnotations(annotations);
+ getTreeParent().replaceChildInternal(this, (TreeElement)ref.getNode());
if (!preserveQualification) {
JavaCodeStyleManager codeStyleManager = JavaCodeStyleManager.getInstance(project);
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/javadoc/PsiDocTokenImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/javadoc/PsiDocTokenImpl.java
index 5fcf7791b850..85301458d047 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/javadoc/PsiDocTokenImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/javadoc/PsiDocTokenImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 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.
@@ -23,7 +23,7 @@ import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.NotNull;
public class PsiDocTokenImpl extends LeafPsiElement implements PsiDocToken{
- public PsiDocTokenImpl(IElementType type, CharSequence text) {
+ public PsiDocTokenImpl(@NotNull IElementType type, CharSequence text) {
super(type, text);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveUtil.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveUtil.java
index ebeebe24b88d..663a76c66f42 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveUtil.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/JavaResolveUtil.java
@@ -130,8 +130,7 @@ public class JavaResolveUtil {
PsiClass topAccessClass = getTopLevelClass(accessObjectClass, memberClass);
if (!manager.areElementsEquivalent(topMemberClass, topAccessClass)) return false;
if (accessObjectClass instanceof PsiAnonymousClass && accessObjectClass.isInheritor(memberClass, true)) {
- if (place instanceof PsiMethodCallExpression &&
- ((PsiMethodCallExpression)place).getMethodExpression().getQualifierExpression() instanceof PsiThisExpression) {
+ if (place instanceof PsiMethodCallExpression) {
return false;
}
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiOldInferenceHelper.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiOldInferenceHelper.java
index 67b06a0e5629..84e3b27dd60a 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiOldInferenceHelper.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiOldInferenceHelper.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.
@@ -157,7 +157,7 @@ public class PsiOldInferenceHelper implements PsiInferenceHelper {
}
if (rawInference != null) return rawInference;
- if (lowerBound != PsiType.NULL) return new Pair<PsiType, ConstraintType>(lowerBound, ConstraintType.EQUALS);
+ if (lowerBound != PsiType.NULL) return Pair.create(lowerBound, ConstraintType.EQUALS);
if (parent != null) {
final Pair<PsiType, ConstraintType> constraint =
@@ -168,14 +168,14 @@ public class PsiOldInferenceHelper implements PsiInferenceHelper {
}
if (upperBound != PsiType.NULL) {
- return new Pair<PsiType, ConstraintType>(upperBound, ConstraintType.SUBTYPE);
+ return Pair.create(upperBound, ConstraintType.SUBTYPE);
}
return constraint;
}
}
- if (upperBound != PsiType.NULL) return new Pair<PsiType, ConstraintType>(upperBound, ConstraintType.SUBTYPE);
+ if (upperBound != PsiType.NULL) return Pair.create(upperBound, ConstraintType.SUBTYPE);
return null;
}
@@ -403,7 +403,7 @@ public class PsiOldInferenceHelper implements PsiInferenceHelper {
final boolean captureWildcard) {
if (arg instanceof PsiWildcardType && !captureWildcard) return FAILED_INFERENCE;
if (arg != PsiType.NULL) {
- return new Pair<PsiType, ConstraintType>(arg, constraintType);
+ return Pair.create(arg, constraintType);
}
return null;
}
@@ -460,7 +460,7 @@ public class PsiOldInferenceHelper implements PsiInferenceHelper {
arg instanceof PsiIntersectionType ||
(psiClass != null && (isContraVariantPosition || !CommonClassNames.JAVA_LANG_OBJECT.equals(psiClass.getQualifiedName()) || (arg instanceof PsiArrayType)))) {
PsiType bound = intersectAllExtends(typeParam, arg);
- return new Pair<PsiType, ConstraintType>(bound, ConstraintType.SUPERTYPE);
+ return Pair.create(bound, ConstraintType.SUPERTYPE);
}
if (psiClass == null && arg instanceof PsiClassType) {
return Pair.create(arg, ConstraintType.EQUALS);
@@ -512,16 +512,16 @@ public class PsiOldInferenceHelper implements PsiInferenceHelper {
PsiType patternType,
final ConstraintType constraintType,
final int depth) {
+ if (patternType.equals(param)) {
+ return processArgType(arg, constraintType, depth < 2);
+ }
+
if (arg instanceof PsiCapturedWildcardType && (depth < 2 ||
constraintType != ConstraintType.EQUALS ||
param instanceof PsiWildcardType)) {
arg = ((PsiCapturedWildcardType)arg).getWildcard(); //reopen
}
- if (patternType.equals(param)) {
- return processArgType(arg, constraintType, depth < 2);
- }
-
if (param instanceof PsiWildcardType) {
final PsiWildcardType wildcardParam = (PsiWildcardType)param;
final PsiType paramBound = wildcardParam.getBound();
@@ -651,8 +651,8 @@ public class PsiOldInferenceHelper implements PsiInferenceHelper {
}
}
- if (lowerBound != PsiType.NULL) return new Pair<PsiType, ConstraintType>(lowerBound, ConstraintType.SUPERTYPE);
- if (upperBound != PsiType.NULL) return new Pair<PsiType, ConstraintType>(upperBound, ConstraintType.SUBTYPE);
+ if (lowerBound != PsiType.NULL) return Pair.create(lowerBound, ConstraintType.SUPERTYPE);
+ if (upperBound != PsiType.NULL) return Pair.create(upperBound, ConstraintType.SUBTYPE);
return wildcardCaptured;
}
@@ -787,6 +787,6 @@ public class PsiOldInferenceHelper implements PsiInferenceHelper {
}
}
- return new Pair<PsiType, ConstraintType>(guess, constraint.getSecond());
+ return Pair.create(guess, constraint.getSecond());
}
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java
index 9d9c373159f9..f16231ac8d26 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceSession.java
@@ -23,10 +23,7 @@ import com.intellij.psi.*;
import com.intellij.psi.impl.source.resolve.graphInference.constraints.*;
import com.intellij.psi.infos.MethodCandidateInfo;
import com.intellij.psi.search.GlobalSearchScope;
-import com.intellij.psi.util.PsiTreeUtil;
-import com.intellij.psi.util.PsiTypesUtil;
-import com.intellij.psi.util.PsiUtil;
-import com.intellij.psi.util.TypeConversionUtil;
+import com.intellij.psi.util.*;
import com.intellij.util.ArrayUtilRt;
import com.intellij.util.Function;
import com.intellij.util.Processor;
@@ -77,7 +74,7 @@ public class InferenceSession {
for (int i = 0; i < leftTypes.length; i++) {
final PsiType rightType = mySiteSubstitutor.substitute(rightTypes[i]);
if (rightType != null) {
- myConstraints.add(new TypeCompatibilityConstraint(leftTypes[i], rightType));
+ addConstraint(new TypeCompatibilityConstraint(leftTypes[i], rightType));
}
}
}
@@ -118,7 +115,7 @@ public class InferenceSession {
for (int i = 0; i < args.length; i++) {
if (args[i] != null && isPertinentToApplicability(args[i], method)) {
PsiType parameterType = getParameterType(parameters, i, mySiteSubstitutor, varargs);
- myConstraints.add(new ExpressionCompatibilityConstraint(args[i], parameterType));
+ addConstraint(new ExpressionCompatibilityConstraint(args[i], parameterType));
}
}
}
@@ -288,11 +285,20 @@ public class InferenceSession {
}
}
- private void collectAdditionalConstraints(Set<ConstraintFormula> additionalConstraints,
- PsiCallExpression callExpression) {
+ private void collectAdditionalConstraints(final Set<ConstraintFormula> additionalConstraints,
+ final PsiCallExpression callExpression) {
PsiExpressionList argumentList = callExpression.getArgumentList();
if (argumentList != null) {
- final JavaResolveResult result = callExpression.resolveMethodGenerics();
+ final PsiLambdaExpression expression = PsiTreeUtil.getParentOfType(argumentList, PsiLambdaExpression.class);
+ final Computable<JavaResolveResult> computableResolve = new Computable<JavaResolveResult>() {
+ @Override
+ public JavaResolveResult compute() {
+ return callExpression.resolveMethodGenerics();
+ }
+ };
+ final JavaResolveResult result = expression == null
+ ? computableResolve.compute()
+ : PsiResolveHelper.ourGraphGuard.doPreventingRecursion(expression, false, computableResolve);
if (result instanceof MethodCandidateInfo) {
final PsiMethod method = ((MethodCandidateInfo)result).getElement();
//need to get type parameters for 2 level nested expressions (they won't be covered by expression constraints on this level?!)
@@ -374,7 +380,7 @@ public class InferenceSession {
if (!PsiType.VOID.equals(returnType) && returnType != null) {
PsiType targetType = getTargetType(context);
if (targetType != null) {
- registerConstraints(PsiUtil.isRawSubstitutor(method, mySiteSubstitutor) ? returnType : mySiteSubstitutor.substitute(returnType), targetType);
+ registerReturnTypeConstraints(PsiUtil.isRawSubstitutor(method, mySiteSubstitutor) ? returnType : mySiteSubstitutor.substitute(returnType), targetType);
}
}
}
@@ -387,13 +393,13 @@ public class InferenceSession {
}
}
- public void registerConstraints(PsiType returnType, PsiType targetType) {
+ public void registerReturnTypeConstraints(PsiType returnType, PsiType targetType) {
final InferenceVariable inferenceVariable = shouldResolveAndInstantiate(returnType, targetType);
if (inferenceVariable != null) {
final PsiSubstitutor substitutor = resolveSubset(Collections.singletonList(inferenceVariable), mySiteSubstitutor);
final PsiType substitutedReturnType = substitutor.substitute(inferenceVariable.getParameter());
if (substitutedReturnType != null) {
- myConstraints.add(new TypeCompatibilityConstraint(targetType, PsiUtil.captureToplevelWildcards(substitutedReturnType, myContext)));
+ addConstraint(new TypeCompatibilityConstraint(targetType, PsiUtil.captureToplevelWildcards(substitutedReturnType, myContext)));
}
}
else {
@@ -414,10 +420,10 @@ public class InferenceSession {
}
final PsiType substitutedCapture = PsiUtil.captureToplevelWildcards(subst.substitute(returnType), myContext);
myIncorporationPhase.addCapture(copy, (PsiClassType)returnType);
- myConstraints.add(new TypeCompatibilityConstraint(targetType, substitutedCapture));
+ addConstraint(new TypeCompatibilityConstraint(targetType, substitutedCapture));
}
} else {
- myConstraints.add(new TypeCompatibilityConstraint(targetType, myErased ? TypeConversionUtil.erasure(returnType) : returnType));
+ addConstraint(new TypeCompatibilityConstraint(targetType, myErased ? TypeConversionUtil.erasure(returnType) : returnType));
}
}
}
@@ -528,11 +534,22 @@ public class InferenceSession {
return getTargetType((PsiExpression)parent);
}
else if (parent instanceof PsiLambdaExpression) {
- if (PsiUtil.skipParenthesizedExprUp(parent.getParent()) instanceof PsiExpressionList) {
- final PsiType typeTypeByParentCall = getTargetType((PsiLambdaExpression)parent);
- return LambdaUtil.getFunctionalInterfaceReturnType(FunctionalInterfaceParameterizationUtil.getGroundTargetType(typeTypeByParentCall, (PsiLambdaExpression)parent));
+ return getTargetTypeByContainingLambda((PsiLambdaExpression)parent);
+ }
+ else if (parent instanceof PsiReturnStatement) {
+ return getTargetTypeByContainingLambda(PsiTreeUtil.getParentOfType(parent, PsiLambdaExpression.class));
+ }
+ return null;
+ }
+
+ private static PsiType getTargetTypeByContainingLambda(PsiLambdaExpression lambdaExpression) {
+ if (lambdaExpression != null) {
+ if (PsiUtil.skipParenthesizedExprUp(lambdaExpression.getParent()) instanceof PsiExpressionList) {
+ final PsiType typeTypeByParentCall = getTargetType(lambdaExpression);
+ return LambdaUtil.getFunctionalInterfaceReturnType(
+ FunctionalInterfaceParameterizationUtil.getGroundTargetType(typeTypeByParentCall, lambdaExpression));
}
- return LambdaUtil.getFunctionalInterfaceReturnType(((PsiLambdaExpression)parent).getFunctionalInterfaceType());
+ return LambdaUtil.getFunctionalInterfaceReturnType(lambdaExpression.getFunctionalInterfaceType());
}
return null;
}
@@ -857,7 +874,7 @@ public class InferenceSession {
try {
for (ConstraintFormula additionalConstraint : subset) {
- additionalConstraint.apply(substitutor);
+ additionalConstraint.apply(substitutor, true);
}
myConstraints.addAll(subset);
@@ -920,6 +937,76 @@ public class InferenceSession {
return subset;
}
+ public PsiSubstitutor collectApplicabilityConstraints(final PsiMethodReferenceExpression reference,
+ final MethodCandidateInfo candidateInfo,
+ final PsiType functionalInterfaceType) {
+ final PsiClassType.ClassResolveResult resolveResult = PsiUtil.resolveGenericsClassInType(functionalInterfaceType);
+ final PsiMethod interfaceMethod = LambdaUtil.getFunctionalInterfaceMethod(resolveResult);
+ LOG.assertTrue(interfaceMethod != null, myContext);
+ final PsiSubstitutor functionalInterfaceSubstitutor = LambdaUtil.getSubstitutor(interfaceMethod, resolveResult);
+ final MethodSignature signature = interfaceMethod.getSignature(functionalInterfaceSubstitutor);
+
+ final boolean varargs = candidateInfo.isVarargs();
+ final PsiMethod method = candidateInfo.getElement();
+
+ final PsiMethodReferenceUtil.QualifierResolveResult qualifierResolveResult = PsiMethodReferenceUtil.getQualifierResolveResult(reference);
+
+ final PsiClass containingClass = qualifierResolveResult.getContainingClass();
+ LOG.assertTrue(containingClass != null, myContext);
+
+ final PsiParameter[] functionalMethodParameters = interfaceMethod.getParameterList().getParameters();
+ final PsiParameter[] parameters = method.getParameterList().getParameters();
+
+ final boolean isStatic = method.hasModifierProperty(PsiModifier.STATIC);
+
+ if (parameters.length == functionalMethodParameters.length && !varargs || isStatic && varargs) {//static methods
+
+ if (method.isConstructor() && PsiUtil.isRawSubstitutor(containingClass, qualifierResolveResult.getSubstitutor())) {
+ initBounds(containingClass.getTypeParameters());
+ }
+
+ for (int i = 0; i < functionalMethodParameters.length; i++) {
+ final PsiType pType = signature.getParameterTypes()[i];
+ addConstraint(new TypeCompatibilityConstraint(getParameterType(parameters, i, PsiSubstitutor.EMPTY, varargs), pType));
+ }
+ }
+ else if (parameters.length + 1 == functionalMethodParameters.length && !varargs || !isStatic && varargs && functionalMethodParameters.length > 0) { //instance methods
+ initBounds(containingClass.getTypeParameters());
+
+ final PsiType pType = signature.getParameterTypes()[0];
+
+ PsiSubstitutor psiSubstitutor = qualifierResolveResult.getSubstitutor();
+ // 15.28.1 If the ReferenceType is a raw type, and there exists a parameterization of this type, T, that is a supertype of P1,
+ // the type to search is the result of capture conversion (5.1.10) applied to T;
+ // otherwise, the type to search is the same as the type of the first search. Again, the type arguments, if any, are given by the method reference.
+ if (PsiUtil.isRawSubstitutor(containingClass, qualifierResolveResult.getSubstitutor())) {
+ final PsiClassType.ClassResolveResult pResult = PsiUtil.resolveGenericsClassInType(pType);
+ final PsiClass pClass = pResult.getElement();
+ final PsiSubstitutor receiverSubstitutor = pClass != null ? TypeConversionUtil
+ .getClassSubstitutor(containingClass, pClass, pResult.getSubstitutor()) : null;
+ if (receiverSubstitutor != null) {
+ if (!method.hasTypeParameters()) {
+ if (signature.getParameterTypes().length == 1 || PsiUtil.isRawSubstitutor(containingClass, receiverSubstitutor)) {
+ return receiverSubstitutor;
+ }
+ }
+ psiSubstitutor = receiverSubstitutor;
+ }
+ }
+
+ final PsiType qType = JavaPsiFacade.getElementFactory(method.getProject()).createType(containingClass, psiSubstitutor);
+
+ addConstraint(new TypeCompatibilityConstraint(qType, pType));
+
+ for (int i = 0; i < signature.getParameterTypes().length - 1; i++) {
+ final PsiType interfaceParamType = signature.getParameterTypes()[i + 1];
+ addConstraint(new TypeCompatibilityConstraint(getParameterType(parameters, i, PsiSubstitutor.EMPTY, varargs), interfaceParamType));
+ }
+ }
+
+ return null;
+ }
+
public void setErased() {
myErased = true;
}
@@ -949,8 +1036,8 @@ public class InferenceSession {
final int paramsLength = !varargs ? parameters1.length : parameters1.length - 1;
for (int i = 0; i < paramsLength; i++) {
- PsiType sType = siteSubstitutor2.substitute(parameters1[i].getType());
- PsiType tType = siteSubstitutor2.substitute(getVarargParameterType(varargs, i, parameters2));
+ PsiType sType = getParameterType(parameters1, i, siteSubstitutor2, false);
+ PsiType tType = getParameterType(parameters2, i, siteSubstitutor2, varargs);
if (session.isProperType(sType) && session.isProperType(tType)) {
if (!TypeConversionUtil.isAssignable(tType, sType)) {
return false;
@@ -967,24 +1054,14 @@ public class InferenceSession {
}
if (varargs) {
- PsiType sType = siteSubstitutor2.substitute(getVarargParameterType(true, paramsLength, parameters1));
- PsiType tType = siteSubstitutor2.substitute(getVarargParameterType(true, paramsLength, parameters2));
+ PsiType sType = getParameterType(parameters1, paramsLength, siteSubstitutor2, true);
+ PsiType tType = getParameterType(parameters2, paramsLength, siteSubstitutor2, true);
session.addConstraint(new StrictSubtypingConstraint(tType, sType));
}
return session.repeatInferencePhases(true);
}
- public static PsiType getVarargParameterType(boolean varargs, int i, PsiParameter[] parameters2) {
- if (varargs && i >= parameters2.length - 1) {
- final PsiType lastParamType = parameters2[parameters2.length - 1].getType();
- if (lastParamType instanceof PsiEllipsisType) {
- return ((PsiEllipsisType)lastParamType).getComponentType();
- }
- }
- return parameters2[i].getType();
- }
-
/**
* 15.12.2.5 Choosing the Most Specific Method
* "a functional interface type S is more specific than a functional interface type T for an expression exp" part
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceVariable.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceVariable.java
index 13497e3d4557..a606e90e8a98 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceVariable.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceVariable.java
@@ -15,27 +15,30 @@
*/
package com.intellij.psi.impl.source.resolve.graphInference;
+import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiType;
import com.intellij.psi.PsiTypeParameter;
+import com.intellij.psi.impl.light.LightTypeParameter;
import java.util.*;
/**
* User: anna
*/
-public class InferenceVariable {
+public class InferenceVariable extends LightTypeParameter {
public PsiTypeParameter getParameter() {
- return myParameter;
+ return getDelegate();
}
private boolean myThrownBound = false;
private final Map<InferenceBound, List<PsiType>> myBounds = new HashMap<InferenceBound, List<PsiType>>();
- private final PsiTypeParameter myParameter;
private PsiType myInstantiation = PsiType.NULL;
- public InferenceVariable(PsiTypeParameter parameter) {
- myParameter = parameter;
+
+ InferenceVariable(PsiTypeParameter parameter) {
+ super(parameter);
}
+
public PsiType getInstantiation() {
return myInstantiation;
}
@@ -117,12 +120,13 @@ public class InferenceVariable {
myThrownBound = true;
}
- public void replaceBounds(InferenceBound boundType, LinkedHashSet<PsiType> bounds) {
-
+ @Override
+ public boolean isEquivalentTo(PsiElement another) {
+ return this == another || getDelegate() == another;
}
@Override
public String toString() {
- return myParameter.toString();
+ return getDelegate().toString();
}
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ConstraintFormula.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ConstraintFormula.java
index e9ca0b0179b2..0caaa075bb8a 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ConstraintFormula.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ConstraintFormula.java
@@ -25,5 +25,5 @@ import java.util.List;
*/
public interface ConstraintFormula {
boolean reduce(InferenceSession session, List<ConstraintFormula> constraints);
- void apply(PsiSubstitutor substitutor);
+ void apply(PsiSubstitutor substitutor, boolean cache);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ExpressionCompatibilityConstraint.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ExpressionCompatibilityConstraint.java
index 6fa5fb46cb07..c33e2c31fa12 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ExpressionCompatibilityConstraint.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/ExpressionCompatibilityConstraint.java
@@ -52,6 +52,11 @@ public class ExpressionCompatibilityConstraint extends InputOutputConstraintForm
}
final PsiType exprType = myExpression.getType();
+
+ if (exprType instanceof PsiLambdaParameterType) {
+ return false;
+ }
+
if (exprType != null && exprType != PsiType.NULL) {
constraints.add(new TypeCompatibilityConstraint(myT, exprType));
}
@@ -145,7 +150,9 @@ public class ExpressionCompatibilityConstraint extends InputOutputConstraintForm
if (!accepted) {
return false;
}
- callSession.registerConstraints(method != null && !PsiUtil.isRawSubstitutor(method, siteSubstitutor) ? siteSubstitutor.substitute(returnType) : returnType, substitutor.substitute(returnType));
+ callSession.registerReturnTypeConstraints(
+ method != null && !PsiUtil.isRawSubstitutor(method, siteSubstitutor) ? siteSubstitutor.substitute(returnType) : returnType,
+ substitutor.substitute(returnType));
if (callSession.repeatInferencePhases(true)) {
final Collection<InferenceVariable> inferenceVariables = callSession.getInferenceVariables();
if (sameMethodCall) {
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/InputOutputConstraintFormula.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/InputOutputConstraintFormula.java
index 67097df574a0..e5f5a8a8d483 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/InputOutputConstraintFormula.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/InputOutputConstraintFormula.java
@@ -109,14 +109,16 @@ public abstract class InputOutputConstraintFormula implements ConstraintFormula
}
@Override
- public void apply(PsiSubstitutor substitutor) {
+ public void apply(PsiSubstitutor substitutor, boolean cache) {
setT(substitutor.substitute(getT()));
- Map<PsiElement, PsiType> map = LambdaUtil.ourFunctionTypes.get();
- if (map == null) {
- map = new HashMap<PsiElement, PsiType>();
- LambdaUtil.ourFunctionTypes.set(map);
+ if (cache) {
+ Map<PsiElement, PsiType> map = LambdaUtil.ourFunctionTypes.get();
+ if (map == null) {
+ map = new HashMap<PsiElement, PsiType>();
+ LambdaUtil.ourFunctionTypes.set(map);
+ }
+ map.put(getExpression(), getT());
}
- map.put(getExpression(), getT());
}
@Override
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/LambdaExpressionCompatibilityConstraint.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/LambdaExpressionCompatibilityConstraint.java
index 8de976b55acd..cbed2ea59491 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/LambdaExpressionCompatibilityConstraint.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/LambdaExpressionCompatibilityConstraint.java
@@ -74,7 +74,7 @@ public class LambdaExpressionCompatibilityConstraint implements ConstraintFormul
}
@Override
- public void apply(PsiSubstitutor substitutor) {
+ public void apply(PsiSubstitutor substitutor, boolean cache) {
myT = substitutor.substitute(myT);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/PsiMethodReferenceCompatibilityConstraint.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/PsiMethodReferenceCompatibilityConstraint.java
index 6e5632847561..cd2e27f27b11 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/PsiMethodReferenceCompatibilityConstraint.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/PsiMethodReferenceCompatibilityConstraint.java
@@ -20,7 +20,7 @@ import com.intellij.psi.*;
import com.intellij.psi.impl.source.resolve.graphInference.FunctionalInterfaceParameterizationUtil;
import com.intellij.psi.impl.source.resolve.graphInference.InferenceSession;
import com.intellij.psi.impl.source.resolve.graphInference.PsiPolyExpressionUtil;
-import com.intellij.psi.impl.source.tree.java.PsiMethodReferenceExpressionImpl;
+import com.intellij.psi.infos.MethodCandidateInfo;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.util.PsiUtil;
import com.intellij.util.containers.ContainerUtil;
@@ -68,7 +68,7 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
} else {
final PsiMethodReferenceUtil.QualifierResolveResult qualifierResolveResult = PsiMethodReferenceUtil.getQualifierResolveResult(myExpression);
PsiSubstitutor psiSubstitutor = qualifierResolveResult.getSubstitutor();
- final PsiMember applicableMember = ((PsiMethodReferenceExpressionImpl)myExpression).getPotentiallyApplicableMember();
+ final PsiMember applicableMember = myExpression.getPotentiallyApplicableMember();
LOG.assertTrue(applicableMember != null);
PsiType applicableMethodReturnType = applicableMember instanceof PsiMethod ? ((PsiMethod)applicableMember).getReturnType() : null;
int idx = 0;
@@ -111,16 +111,17 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
final Map<PsiMethodReferenceExpression, PsiType> map = PsiMethodReferenceUtil.getFunctionalTypeMap();
final PsiType added = map.put(myExpression, groundTargetType);
- final PsiElement resolve;
+ final JavaResolveResult resolve;
try {
- resolve = myExpression.resolve();
+ resolve = myExpression.advancedResolve(true);
}
finally {
if (added == null) {
map.remove(myExpression);
}
}
- if (resolve == null) {
+ final PsiElement element = resolve.getElement();
+ if (element == null) {
return false;
}
@@ -128,8 +129,8 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
return true;
}
- if (resolve instanceof PsiMethod) {
- final PsiMethod method = (PsiMethod)resolve;
+ if (element instanceof PsiMethod) {
+ final PsiMethod method = (PsiMethod)element;
final PsiType referencedMethodReturnType;
final PsiClass containingClass = method.getContainingClass();
LOG.assertTrue(containingClass != null, method);
@@ -158,8 +159,8 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
ContainerUtil.newHashSet(method.getTypeParameters()))) {
//the constraint reduces to the bound set B3 which would be used to determine the method reference's invocation type
//when targeting the return type of the function type, as defined in 18.5.2.
- //as there is no parameters, only constraint for return types is left. Here you are:
- session.registerConstraints(referencedMethodReturnType, returnType);
+ session.collectApplicabilityConstraints(myExpression, ((MethodCandidateInfo)resolve), groundTargetType);
+ session.registerReturnTypeConstraints(referencedMethodReturnType, returnType);
return true;
}
}
@@ -191,21 +192,19 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
List<ConstraintFormula> constraints,
PsiSubstitutor substitutor,
PsiParameter[] targetParameters) {
- final PsiTypeElement qualifierTypeElement = myExpression.getQualifierType();
- final PsiExpression qualifierExpression = myExpression.getQualifierExpression();
- PsiType qualifierType;
- if (qualifierTypeElement != null) {
- qualifierType = qualifierTypeElement.getType();
+ final PsiElement qualifier = myExpression.getQualifier();
+ PsiType qualifierType = null;
+ if (qualifier instanceof PsiTypeElement) {
+ qualifierType = ((PsiTypeElement)qualifier).getType();
final PsiClass qualifierClass = PsiUtil.resolveClassInType(qualifierType);
if (qualifierClass != null) {
qualifierType = JavaPsiFacade.getElementFactory(myExpression.getProject()).createType(qualifierClass, PsiSubstitutor.EMPTY);
}
}
- else {
- LOG.assertTrue(qualifierExpression != null);
- qualifierType = qualifierExpression.getType();
- if (qualifierType == null && qualifierExpression instanceof PsiReferenceExpression) {
- final JavaResolveResult resolveResult = ((PsiReferenceExpression)qualifierExpression).advancedResolve(false);
+ else if (qualifier instanceof PsiExpression) {
+ qualifierType = ((PsiExpression)qualifier).getType();
+ if (qualifierType == null && qualifier instanceof PsiReferenceExpression) {
+ final JavaResolveResult resolveResult = ((PsiReferenceExpression)qualifier).advancedResolve(false);
final PsiElement res = resolveResult.getElement();
if (res instanceof PsiClass) {
PsiClass containingClass = (PsiClass)res;
@@ -224,7 +223,7 @@ public class PsiMethodReferenceCompatibilityConstraint implements ConstraintForm
}
@Override
- public void apply(PsiSubstitutor substitutor) {
+ public void apply(PsiSubstitutor substitutor, boolean cache) {
myT = substitutor.substitute(myT);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/StrictSubtypingConstraint.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/StrictSubtypingConstraint.java
index 92745cb14d01..412b09eadec3 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/StrictSubtypingConstraint.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/StrictSubtypingConstraint.java
@@ -37,7 +37,7 @@ public class StrictSubtypingConstraint implements ConstraintFormula {
}
@Override
- public void apply(PsiSubstitutor substitutor) {
+ public void apply(PsiSubstitutor substitutor, boolean cache) {
myT = substitutor.substitute(myT);
myS = substitutor.substitute(myS);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/SubtypingConstraint.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/SubtypingConstraint.java
index e539e943a433..f1502b248a79 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/SubtypingConstraint.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/SubtypingConstraint.java
@@ -36,7 +36,7 @@ public class SubtypingConstraint implements ConstraintFormula {
}
@Override
- public void apply(PsiSubstitutor substitutor) {
+ public void apply(PsiSubstitutor substitutor, boolean cache) {
myT = substitutor.substitute(myT);
myS = substitutor.substitute(myS);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeCompatibilityConstraint.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeCompatibilityConstraint.java
index 4038f9af5125..f01c82cae769 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeCompatibilityConstraint.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeCompatibilityConstraint.java
@@ -84,7 +84,7 @@ public class TypeCompatibilityConstraint implements ConstraintFormula {
}
@Override
- public void apply(PsiSubstitutor substitutor) {
+ public void apply(PsiSubstitutor substitutor, boolean cache) {
myT = substitutor.substitute(myT);
myS = substitutor.substitute(myS);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeEqualityConstraint.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeEqualityConstraint.java
index 1f4717ddc79e..fa3df6669cb9 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeEqualityConstraint.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/constraints/TypeEqualityConstraint.java
@@ -118,7 +118,7 @@ public class TypeEqualityConstraint implements ConstraintFormula {
}
@Override
- public void apply(PsiSubstitutor substitutor) {
+ public void apply(PsiSubstitutor substitutor, boolean cache) {
myT = substitutor.substitute(myT);
myS = substitutor.substitute(myS);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/CoreJavaASTFactory.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/CoreJavaASTFactory.java
index dc7b6e576871..9c888c006b99 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/CoreJavaASTFactory.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/CoreJavaASTFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2012 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.
@@ -27,6 +27,7 @@ import com.intellij.psi.impl.source.tree.java.PsiKeywordImpl;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.java.IJavaDocElementType;
import com.intellij.psi.tree.java.IJavaElementType;
+import org.jetbrains.annotations.NotNull;
/**
* @author yole
@@ -35,7 +36,7 @@ public class CoreJavaASTFactory extends ASTFactory implements Constants {
private final DefaultASTFactory myDefaultASTFactory = ServiceManager.getService(DefaultASTFactory.class);
@Override
- public LeafElement createLeaf(final IElementType type, final CharSequence text) {
+ public LeafElement createLeaf(@NotNull final IElementType type, final CharSequence text) {
if (type == C_STYLE_COMMENT || type == END_OF_LINE_COMMENT) {
return myDefaultASTFactory.createComment(type, text);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/MethodReferenceResolver.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/MethodReferenceResolver.java
index 503cbf48ddd3..ca40ef122c99 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/MethodReferenceResolver.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/MethodReferenceResolver.java
@@ -21,7 +21,6 @@ import com.intellij.psi.impl.source.resolve.ParameterTypeInferencePolicy;
import com.intellij.psi.impl.source.resolve.ResolveCache;
import com.intellij.psi.impl.source.resolve.graphInference.FunctionalInterfaceParameterizationUtil;
import com.intellij.psi.impl.source.resolve.graphInference.InferenceSession;
-import com.intellij.psi.impl.source.resolve.graphInference.constraints.TypeCompatibilityConstraint;
import com.intellij.psi.infos.CandidateInfo;
import com.intellij.psi.infos.ClassCandidateInfo;
import com.intellij.psi.infos.MethodCandidateInfo;
@@ -41,7 +40,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-class MethodReferenceResolver implements ResolveCache.PolyVariantContextResolver<PsiMethodReferenceExpressionImpl> {
+public class MethodReferenceResolver implements ResolveCache.PolyVariantContextResolver<PsiMethodReferenceExpressionImpl> {
private static final Logger LOG = Logger.getInstance("#" + MethodReferenceResolver.class.getName());
@NotNull
@@ -70,7 +69,7 @@ class MethodReferenceResolver implements ResolveCache.PolyVariantContextResolver
final PsiClassType returnType = composeReturnType(containingClass, substitutor);
final InferenceSession session = new InferenceSession(containingClass.getTypeParameters(), substitutor, reference.getManager(), null);
if (!(session.isProperType(returnType) && session.isProperType(interfaceMethodReturnType))) {
- session.registerConstraints(returnType, interfaceMethodReturnType);
+ session.registerReturnTypeConstraints(returnType, interfaceMethodReturnType);
substitutor = session.infer();
}
}
@@ -111,12 +110,11 @@ class MethodReferenceResolver implements ResolveCache.PolyVariantContextResolver
@NotNull
@Override
public PsiSubstitutor inferTypeArguments(@NotNull ParameterTypeInferencePolicy policy, boolean includeReturnConstraint) {
- return inferTypeArguments(varargs);
+ return inferTypeArguments();
}
- public PsiSubstitutor inferTypeArguments(boolean varargs) {
+ private PsiSubstitutor inferTypeArguments() {
if (interfaceMethod == null) return substitutor;
- final PsiSubstitutor qualifierResultSubstitutor = qualifierResolveResult.getSubstitutor();
final InferenceSession session = new InferenceSession(method.getTypeParameters(), substitutor, reference.getManager(), reference);
//lift parameters from outer call
@@ -125,53 +123,9 @@ class MethodReferenceResolver implements ResolveCache.PolyVariantContextResolver
session.initBounds(methodSubstitutorPair.getMethod().getTypeParameters());
}
- final PsiParameter[] functionalMethodParameters = interfaceMethod.getParameterList().getParameters();
- final PsiParameter[] parameters = method.getParameterList().getParameters();
- final boolean isStatic = method.hasModifierProperty(PsiModifier.STATIC);
- if (parameters.length == functionalMethodParameters.length && !varargs || isStatic && varargs) {//static methods
-
- if (method.isConstructor() && PsiUtil.isRawSubstitutor(containingClass, qualifierResultSubstitutor)) {
- session.initBounds(containingClass.getTypeParameters());
- }
-
- for (int i = 0; i < functionalMethodParameters.length; i++) {
- final PsiType pType = signature.getParameterTypes()[i];
- session.addConstraint(new TypeCompatibilityConstraint(getParameterType(parameters, i, varargs), pType));
- }
- }
- else if (parameters.length + 1 == functionalMethodParameters.length && !varargs || !isStatic && varargs && functionalMethodParameters.length > 0) { //instance methods
- final PsiClass aClass = qualifierResolveResult.getContainingClass();
- session.initBounds(aClass.getTypeParameters());
-
- final PsiType pType = signature.getParameterTypes()[0];
-
- PsiSubstitutor psiSubstitutor = qualifierResultSubstitutor;
- // 15.28.1 If the ReferenceType is a raw type, and there exists a parameterization of this type, T, that is a supertype of P1,
- // the type to search is the result of capture conversion (5.1.10) applied to T;
- // otherwise, the type to search is the same as the type of the first search. Again, the type arguments, if any, are given by the method reference.
- if (PsiUtil.isRawSubstitutor(containingClass, qualifierResultSubstitutor)) {
- final PsiClassType.ClassResolveResult pResult = PsiUtil.resolveGenericsClassInType(pType);
- final PsiClass pClass = pResult.getElement();
- final PsiSubstitutor receiverSubstitutor = pClass != null ? TypeConversionUtil
- .getClassSubstitutor(containingClass, pClass, pResult.getSubstitutor()) : null;
- if (receiverSubstitutor != null) {
- if (!method.hasTypeParameters()) {
- if (signature.getParameterTypes().length == 1 || PsiUtil.isRawSubstitutor(containingClass, receiverSubstitutor)) {
- return receiverSubstitutor;
- }
- }
- psiSubstitutor = receiverSubstitutor;
- }
- }
-
- final PsiType qType = JavaPsiFacade.getElementFactory(reference.getProject()).createType(containingClass, psiSubstitutor);
-
- session.addConstraint(new TypeCompatibilityConstraint(qType, pType));
-
- for (int i = 0; i < signature.getParameterTypes().length - 1; i++) {
- final PsiType interfaceParamType = signature.getParameterTypes()[i + 1];
- session.addConstraint(new TypeCompatibilityConstraint(getParameterType(parameters, i, varargs), interfaceParamType));
- }
+ final PsiSubstitutor psiSubstitutor = session.collectApplicabilityConstraints(reference, this, functionalInterfaceType);
+ if (psiSubstitutor != null) {
+ return psiSubstitutor;
}
if (!session.repeatInferencePhases(false)) {
@@ -181,19 +135,10 @@ class MethodReferenceResolver implements ResolveCache.PolyVariantContextResolver
if (interfaceMethodReturnType != PsiType.VOID && interfaceMethodReturnType != null) {
final PsiType returnType = method.isConstructor() ? composeReturnType(containingClass, substitutor) : method.getReturnType();
if (returnType != null) {
- session.registerConstraints(returnType, interfaceMethodReturnType);
+ session.registerReturnTypeConstraints(returnType, interfaceMethodReturnType);
}
}
- return session.infer(parameters, null, null);
- }
-
- private PsiType getParameterType(PsiParameter[] parameters, int i, boolean varargs) {
- if (varargs && i >= parameters.length - 1) {
- final PsiType type = parameters[parameters.length - 1].getType();
- LOG.assertTrue(type instanceof PsiEllipsisType);
- return ((PsiEllipsisType)type).getComponentType();
- }
- return parameters[i].getType();
+ return session.infer(method.getParameterList().getParameters(), null, null);
}
};
}
@@ -254,8 +199,7 @@ class MethodReferenceResolver implements ResolveCache.PolyVariantContextResolver
private static PsiClassType composeReturnType(PsiClass containingClass, PsiSubstitutor substitutor) {
final boolean isRawSubst = PsiUtil.isRawSubstitutor(containingClass, substitutor);
- return JavaPsiFacade.getElementFactory(containingClass.getProject())
- .createType(containingClass, isRawSubst ? PsiSubstitutor.EMPTY : substitutor);
+ return JavaPsiFacade.getElementFactory(containingClass.getProject()).createType(containingClass, isRawSubst ? PsiSubstitutor.EMPTY : substitutor);
}
private static class MethodReferenceConflictResolver extends JavaMethodsConflictResolver {
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiCodeBlockImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiCodeBlockImpl.java
index e530554341fd..5c8e425301fb 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiCodeBlockImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiCodeBlockImpl.java
@@ -18,7 +18,7 @@ package com.intellij.psi.impl.source.tree.java;
import com.intellij.lang.ASTNode;
import com.intellij.lang.java.JavaLanguage;
import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.util.Pair;
+import com.intellij.openapi.util.Couple;
import com.intellij.openapi.util.Ref;
import com.intellij.psi.*;
import com.intellij.psi.impl.PsiImplUtil;
@@ -92,7 +92,7 @@ public class PsiCodeBlockImpl extends LazyParseablePsiElement implements PsiCode
// return Pair(classes, locals) or null if there was conflict
@Nullable
- private Pair<Set<String>, Set<String>> buildMaps() {
+ private Couple<Set<String>> buildMaps() {
Set<String> set1 = myClassesSet;
Set<String> set2 = myVariablesSet;
boolean wasConflict = myConflict;
@@ -129,7 +129,7 @@ public class PsiCodeBlockImpl extends LazyParseablePsiElement implements PsiCode
myVariablesSet = set2 = localsSet.isEmpty() ? Collections.<String>emptySet() : localsSet;
myConflict = wasConflict = conflict.get();
}
- return wasConflict ? null : Pair.create(set1, set2);
+ return wasConflict ? null : Couple.newOne(set1, set2);
}
@Override
@@ -218,7 +218,7 @@ public class PsiCodeBlockImpl extends LazyParseablePsiElement implements PsiCode
// Parent element should not see our vars
return true;
}
- Pair<Set<String>, Set<String>> pair = buildMaps();
+ Couple<Set<String>> pair = buildMaps();
boolean conflict = pair == null;
final Set<String> classesSet = conflict ? null : pair.getFirst();
final Set<String> variablesSet = conflict ? null : pair.getSecond();
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiJavaTokenImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiJavaTokenImpl.java
index b5759a188084..38447a9bc324 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiJavaTokenImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiJavaTokenImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 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.
@@ -23,7 +23,7 @@ import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.NotNull;
public class PsiJavaTokenImpl extends LeafPsiElement implements PsiJavaToken{
- public PsiJavaTokenImpl(IElementType type, CharSequence text) {
+ public PsiJavaTokenImpl(@NotNull IElementType type, CharSequence text) {
super(type, text);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiKeywordImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiKeywordImpl.java
index fa69e5c28083..f39a88e8b35c 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiKeywordImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiKeywordImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2009 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.
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Field;
public class PsiKeywordImpl extends LeafPsiElement implements PsiKeyword, PsiJavaToken {
- public PsiKeywordImpl(IElementType type, CharSequence text) {
+ public PsiKeywordImpl(@NotNull IElementType type, CharSequence text) {
super(type, text);
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiMethodReferenceExpressionImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiMethodReferenceExpressionImpl.java
index 311b161df557..94cce501d521 100644
--- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiMethodReferenceExpressionImpl.java
+++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiMethodReferenceExpressionImpl.java
@@ -22,6 +22,7 @@ import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.*;
import com.intellij.psi.impl.PsiManagerEx;
+import com.intellij.psi.impl.source.resolve.JavaResolveUtil;
import com.intellij.psi.impl.source.resolve.ResolveCache;
import com.intellij.psi.impl.source.resolve.graphInference.FunctionalInterfaceParameterizationUtil;
import com.intellij.psi.impl.source.resolve.graphInference.InferenceSession;
@@ -43,6 +44,9 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
import java.util.Map;
public class PsiMethodReferenceExpressionImpl extends PsiReferenceExpressionBase implements PsiMethodReferenceExpression {
@@ -136,7 +140,14 @@ public class PsiMethodReferenceExpressionImpl extends PsiReferenceExpressionBase
if (containingClass != null) {
PsiMethod[] methods = null;
if (element instanceof PsiIdentifier) {
- methods = containingClass.findMethodsByName(element.getText(), !qualifierResolveResult.isReferenceTypeQualified());
+ final String identifierName = element.getText();
+ final List<PsiMethod> result = new ArrayList<PsiMethod>();
+ for (HierarchicalMethodSignature signature : containingClass.getVisibleSignatures()) {
+ if (identifierName.equals(signature.getName())) {
+ result.add(signature.getMethod());
+ }
+ }
+ methods = result.toArray(new PsiMethod[result.size()]);
}
else if (isConstructor()) {
final PsiElementFactory factory = JavaPsiFacade.getElementFactory(getProject());
diff --git a/java/java-psi-impl/src/com/intellij/psi/presentation/java/ClassPresentationUtil.java b/java/java-psi-impl/src/com/intellij/psi/presentation/java/ClassPresentationUtil.java
index 42171ad26d7e..9dfae2dda9fb 100644
--- a/java/java-psi-impl/src/com/intellij/psi/presentation/java/ClassPresentationUtil.java
+++ b/java/java-psi-impl/src/com/intellij/psi/presentation/java/ClassPresentationUtil.java
@@ -63,13 +63,14 @@ public class ClassPresentationUtil {
}
public static String getContextName(@NotNull PsiElement element, boolean qualified) {
- PsiElement parent = PsiTreeUtil.getParentOfType(element, PsiMember.class, PsiFile.class);
+ PsiElement parent = PsiTreeUtil.getStubOrPsiParentOfType(element, PsiMember.class);
+ if (parent == null) parent = element.getContainingFile();
while(true){
if (parent == null) return null;
String name = getNameForElement(parent, qualified);
if (name != null) return name;
if (parent instanceof PsiFile) return null;
- parent = parent.getParent();
+ parent = PsiTreeUtil.getStubOrPsiParent(parent);
}
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/scope/conflictResolvers/JavaMethodsConflictResolver.java b/java/java-psi-impl/src/com/intellij/psi/scope/conflictResolvers/JavaMethodsConflictResolver.java
index 93a444036bef..df053c53291e 100644
--- a/java/java-psi-impl/src/com/intellij/psi/scope/conflictResolvers/JavaMethodsConflictResolver.java
+++ b/java/java-psi-impl/src/com/intellij/psi/scope/conflictResolvers/JavaMethodsConflictResolver.java
@@ -153,6 +153,10 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
if (methodParameters.length == 0) continue;
final PsiParameter param = i < methodParameters.length ? methodParameters[i] : methodParameters[methodParameters.length - 1];
final PsiType paramType = param.getType();
+ // http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.12.2.1
+ // A lambda expression or a method reference expression is potentially compatible with a type variable if the type variable is a type parameter of the candidate method.
+ final PsiClass paramClass = PsiUtil.resolveClassInType(paramType);
+ if (paramClass instanceof PsiTypeParameter && ((PsiTypeParameter)paramClass).getOwner() == method) continue;
if (!lambdaExpression.isAcceptable(((MethodCandidateInfo)conflict).getSubstitutor(false).substitute(paramType), lambdaExpression.hasFormalParameterTypes())) {
iterator.remove();
}
@@ -719,9 +723,9 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
LOG.assertTrue(typeParameter != null);
if (!substitutor.getSubstitutionMap().containsKey(typeParameter)) {
PsiType type = siteSubstitutor.substitute(typeParameter);
- if (type instanceof PsiClassType) {
+ if (type instanceof PsiClassType && typeParameter.getOwner() == method) {
final PsiClass aClass = ((PsiClassType)type).resolve();
- if (aClass instanceof PsiTypeParameter && ((PsiTypeParameter)aClass).getOwner() == typeParameter.getOwner()) {
+ if (aClass instanceof PsiTypeParameter && ((PsiTypeParameter)aClass).getOwner() == method) {
type = TypeConversionUtil.erasure(type, siteSubstitutor);
}
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/scope/processor/MethodCandidatesProcessor.java b/java/java-psi-impl/src/com/intellij/psi/scope/processor/MethodCandidatesProcessor.java
index 7106063217b5..2b36a9c49b47 100644
--- a/java/java-psi-impl/src/com/intellij/psi/scope/processor/MethodCandidatesProcessor.java
+++ b/java/java-psi-impl/src/com/intellij/psi/scope/processor/MethodCandidatesProcessor.java
@@ -51,7 +51,7 @@ public class MethodCandidatesProcessor extends MethodsProcessor{
}
public void addMethod(@NotNull PsiMethod method, final PsiSubstitutor substitutor, final boolean staticProblem) {
- final boolean isAccessible = JavaResolveUtil.isAccessible(method, method.getContainingClass(), method.getModifierList(),
+ final boolean isAccessible = JavaResolveUtil.isAccessible(method, getContainingClass(method), method.getModifierList(),
myPlace, myAccessClass, myCurrentFileContext, myPlaceFile) &&
!isShadowed(method);
if (isAccepted(method)) {
@@ -63,6 +63,10 @@ public class MethodCandidatesProcessor extends MethodsProcessor{
}
}
+ protected PsiClass getContainingClass(PsiMethod method) {
+ return method.getContainingClass();
+ }
+
protected boolean acceptVarargs() {
return false;
}
@@ -106,10 +110,10 @@ public class MethodCandidatesProcessor extends MethodsProcessor{
if (!candidate.isConstructor()) return false;
if (myAccessClass == null) return true;
if (myAccessClass instanceof PsiAnonymousClass) {
- final PsiClass containingClass = candidate.getContainingClass();
+ final PsiClass containingClass = getContainingClass(candidate);
return containingClass != null && containingClass.equals(myAccessClass.getSuperClass());
}
- return myAccessClass.isEquivalentTo(candidate.getContainingClass());
+ return myAccessClass.isEquivalentTo(getContainingClass(candidate));
}
}
diff --git a/java/java-psi-impl/src/com/intellij/psi/scope/util/PsiScopesUtil.java b/java/java-psi-impl/src/com/intellij/psi/scope/util/PsiScopesUtil.java
index 2c3bb5cf9c80..2c2d8b2e1256 100644
--- a/java/java-psi-impl/src/com/intellij/psi/scope/util/PsiScopesUtil.java
+++ b/java/java-psi-impl/src/com/intellij/psi/scope/util/PsiScopesUtil.java
@@ -442,11 +442,9 @@ public class PsiScopesUtil {
if (!(qualifier instanceof PsiSuperExpression)) {
processor.setAccessClass((PsiClass)PsiUtil.getAccessObjectClass(qualifier).getElement());
}
- else if (((PsiSuperExpression)qualifier).getQualifier() != null && PsiUtil.isLanguageLevel8OrHigher(qualifier)) {
- final PsiClass accessClass = (PsiClass)PsiUtil.getAccessObjectClass(qualifier).getElement();
- if (accessClass != null && accessClass.isInterface()) {
- processor.setAccessClass(accessClass);
- }
+ else if (((PsiSuperExpression)qualifier).getQualifier() != null && PsiUtil.isLanguageLevel8OrHigher(qualifier) &&
+ CommonClassNames.JAVA_LANG_CLONEABLE.equals(((PsiClass)resolve).getQualifiedName()) && ((PsiClass)resolve).isInterface()) {
+ processor.setAccessClass((PsiClass)resolve);
}
}
diff --git a/java/java-psi-impl/src/com/intellij/refactoring/util/CanonicalTypes.java b/java/java-psi-impl/src/com/intellij/refactoring/util/CanonicalTypes.java
new file mode 100644
index 000000000000..131750f17179
--- /dev/null
+++ b/java/java-psi-impl/src/com/intellij/refactoring/util/CanonicalTypes.java
@@ -0,0 +1,346 @@
+/*
+ * 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.util;
+
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.psi.*;
+import com.intellij.psi.util.PsiUtil;
+import com.intellij.util.Function;
+import com.intellij.util.IncorrectOperationException;
+import com.intellij.util.ObjectUtils;
+import com.intellij.util.containers.ContainerUtil;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author dsl
+ */
+public class CanonicalTypes {
+ private CanonicalTypes() { }
+
+ public abstract static class Type {
+ @NotNull
+ public abstract PsiType getType(PsiElement context, PsiManager manager) throws IncorrectOperationException;
+
+ @NonNls
+ public abstract String getTypeText();
+
+ public void addImportsTo(JavaCodeFragment fragment) { }
+
+ public boolean isValid() {
+ return true;
+ }
+ }
+
+ private abstract static class AnnotatedType extends Type {
+ protected final PsiAnnotation[] myAnnotations;
+
+ protected AnnotatedType(PsiAnnotation[] annotations) {
+ myAnnotations = annotations;
+ }
+ }
+
+ private static class Primitive extends AnnotatedType {
+ private final PsiPrimitiveType myType;
+
+ private Primitive(PsiPrimitiveType type) {
+ super(type.getAnnotations());
+ myType = type;
+ }
+
+ @NotNull
+ @Override
+ public PsiType getType(PsiElement context, PsiManager manager) {
+ return myAnnotations.length == 0 ? myType : new PsiPrimitiveType(myType.getCanonicalText(false), myAnnotations);
+ }
+
+ @Override
+ public String getTypeText() {
+ return myType.getPresentableText();
+ }
+ }
+
+ private static class Array extends AnnotatedType {
+ protected final Type myComponentType;
+
+ private Array(PsiType original, Type componentType) {
+ super(original.getAnnotations());
+ myComponentType = componentType;
+ }
+
+ @NotNull
+ @Override
+ public PsiType getType(PsiElement context, PsiManager manager) throws IncorrectOperationException {
+ return myComponentType.getType(context, manager).createArrayType(myAnnotations);
+ }
+
+ @Override
+ public String getTypeText() {
+ return myComponentType.getTypeText() + "[]";
+ }
+
+ @Override
+ public void addImportsTo(JavaCodeFragment fragment) {
+ myComponentType.addImportsTo(fragment);
+ }
+
+ @Override
+ public boolean isValid() {
+ return myComponentType.isValid();
+ }
+ }
+
+ private static class Ellipsis extends Array {
+ private Ellipsis(PsiType original, Type componentType) {
+ super(original, componentType);
+ }
+
+ @NotNull
+ @Override
+ public PsiType getType(PsiElement context, PsiManager manager) throws IncorrectOperationException {
+ return new PsiEllipsisType(myComponentType.getType(context, manager), myAnnotations);
+ }
+
+ @Override
+ public String getTypeText() {
+ return myComponentType.getTypeText() + "...";
+ }
+ }
+
+ private static class WildcardType extends AnnotatedType {
+ private final boolean myIsExtending;
+ private final Type myBound;
+
+ private WildcardType(PsiType original, boolean isExtending, Type bound) {
+ super(original.getAnnotations());
+ myIsExtending = isExtending;
+ myBound = bound;
+ }
+
+ @NotNull
+ @Override
+ public PsiType getType(PsiElement context, PsiManager manager) throws IncorrectOperationException {
+ PsiWildcardType type;
+ if (myBound == null) {
+ type = PsiWildcardType.createUnbounded(manager);
+ }
+ else if (myIsExtending) {
+ type = PsiWildcardType.createExtends(manager, myBound.getType(context, manager));
+ }
+ else {
+ type = PsiWildcardType.createSuper(manager, myBound.getType(context, manager));
+ }
+ return type.annotate(myAnnotations);
+ }
+
+ @Override
+ public String getTypeText() {
+ if (myBound == null) {
+ return "?";
+ }
+ else {
+ return "? " + (myIsExtending ? "extends " : "super ") + myBound.getTypeText();
+ }
+ }
+
+ @Override
+ public void addImportsTo(JavaCodeFragment fragment) {
+ if (myBound != null) {
+ myBound.addImportsTo(fragment);
+ }
+ }
+
+ @Override
+ public boolean isValid() {
+ return myBound == null || myBound.isValid();
+ }
+ }
+
+ private static class UnresolvedType extends Type {
+ private final String myPresentableText;
+ private final String myCanonicalText;
+
+ private UnresolvedType(PsiType original) {
+ myPresentableText = original.getPresentableText();
+ myCanonicalText = original.getCanonicalText(true);
+ }
+
+ @NotNull
+ @Override
+ public PsiType getType(PsiElement context, PsiManager manager) throws IncorrectOperationException {
+ return JavaPsiFacade.getInstance(manager.getProject()).getElementFactory().createTypeFromText(myCanonicalText, context);
+ }
+
+ @Override
+ public String getTypeText() {
+ return myPresentableText;
+ }
+
+ @Override
+ public boolean isValid() {
+ return false;
+ }
+ }
+
+ private static class ClassType extends AnnotatedType {
+ private final String myPresentableText;
+ private final String myClassQName;
+ private final Map<String, Type> mySubstitutor;
+
+ private ClassType(PsiType original, String classQName, Map<String, Type> substitutor) {
+ super(original.getAnnotations());
+ myPresentableText = original.getPresentableText();
+ myClassQName = classQName;
+ mySubstitutor = substitutor;
+ }
+
+ @NotNull
+ @Override
+ public PsiType getType(PsiElement context, PsiManager manager) throws IncorrectOperationException {
+ JavaPsiFacade facade = JavaPsiFacade.getInstance(manager.getProject());
+ PsiElementFactory factory = facade.getElementFactory();
+
+ PsiClass aClass = facade.getResolveHelper().resolveReferencedClass(myClassQName, context);
+ if (aClass == null) {
+ return factory.createTypeFromText(myClassQName, context);
+ }
+
+ Map<PsiTypeParameter, PsiType> substitutionMap = ContainerUtil.newHashMap();
+ for (PsiTypeParameter typeParameter : PsiUtil.typeParametersIterable(aClass)) {
+ Type substitute = mySubstitutor.get(typeParameter.getName());
+ substitutionMap.put(typeParameter, substitute != null ? substitute.getType(context, manager) : null);
+ }
+ return factory.createType(aClass, factory.createSubstitutor(substitutionMap), null, myAnnotations);
+ }
+
+ @Override
+ public String getTypeText() {
+ return myPresentableText;
+ }
+
+ @Override
+ public void addImportsTo(JavaCodeFragment fragment) {
+ fragment.addImportsFromString(myClassQName);
+ for (Type type : mySubstitutor.values()) {
+ if (type != null) {
+ type.addImportsTo(fragment);
+ }
+ }
+ }
+ }
+
+ private static class DisjunctionType extends Type {
+ private final List<Type> myTypes;
+
+ private DisjunctionType(List<Type> types) {
+ myTypes = types;
+ }
+
+ @NotNull
+ @Override
+ public PsiType getType(final PsiElement context, final PsiManager manager) throws IncorrectOperationException {
+ List<PsiType> types = ContainerUtil.map(myTypes, new Function<Type, PsiType>() {
+ @Override
+ public PsiType fun(Type type) {
+ return type.getType(context, manager);
+ }
+ });
+ return new PsiDisjunctionType(types, manager);
+ }
+
+ @Override
+ public String getTypeText() {
+ return StringUtil.join(myTypes, new Function<Type, String>() {
+ @Override
+ public String fun(Type type) {
+ return type.getTypeText();
+ }
+ }, "|");
+ }
+
+ @Override
+ public void addImportsTo(JavaCodeFragment fragment) {
+ for (Type type : myTypes) {
+ type.addImportsTo(fragment);
+ }
+ }
+ }
+
+ private static class Creator extends PsiTypeVisitor<Type> {
+ public static final Creator INSTANCE = new Creator();
+
+ @Override
+ public Type visitPrimitiveType(PsiPrimitiveType type) {
+ return new Primitive(type);
+ }
+
+ @Override
+ public Type visitEllipsisType(PsiEllipsisType type) {
+ return new Ellipsis(type, type.getComponentType().accept(this));
+ }
+
+ @Override
+ public Type visitArrayType(PsiArrayType type) {
+ return new Array(type, type.getComponentType().accept(this));
+ }
+
+ @Override
+ public Type visitWildcardType(PsiWildcardType type) {
+ PsiType bound = type.getBound();
+ return new WildcardType(type, type.isExtends(), bound == null ? null : bound.accept(this));
+ }
+
+ @Override
+ public Type visitClassType(PsiClassType type) {
+ PsiClassType.ClassResolveResult resolveResult = type.resolveGenerics();
+ PsiClass aClass = resolveResult.getElement();
+ if (aClass instanceof PsiAnonymousClass) {
+ return visitClassType(((PsiAnonymousClass)aClass).getBaseClassType());
+ }
+ else if (aClass == null) {
+ return new UnresolvedType(type);
+ }
+ else {
+ Map<String, Type> substitutionMap = ContainerUtil.newHashMap();
+ PsiSubstitutor substitutor = resolveResult.getSubstitutor();
+ for (PsiTypeParameter typeParameter : PsiUtil.typeParametersIterable(aClass)) {
+ PsiType substitute = substitutor.substitute(typeParameter);
+ substitutionMap.put(typeParameter.getName(), substitute != null ? substitute.accept(this) : null);
+ }
+ String qualifiedName = ObjectUtils.notNull(aClass.getQualifiedName(), aClass.getName());
+ return new ClassType(type, qualifiedName, substitutionMap);
+ }
+ }
+
+ @Override
+ public Type visitDisjunctionType(PsiDisjunctionType type) {
+ List<Type> types = ContainerUtil.map(type.getDisjunctions(), new Function<PsiType, Type>() {
+ @Override
+ public Type fun(PsiType type) {
+ return type.accept(Creator.this);
+ }
+ });
+ return new DisjunctionType(types);
+ }
+ }
+
+ public static Type createTypeWrapper(@NotNull PsiType type) {
+ return type.accept(Creator.INSTANCE);
+ }
+}
diff --git a/java/java-psi-impl/src/messages/JavaErrorMessages.properties b/java/java-psi-impl/src/messages/JavaErrorMessages.properties
index 2ae02e90adbf..d8caec0670ca 100644
--- a/java/java-psi-impl/src/messages/JavaErrorMessages.properties
+++ b/java/java-psi-impl/src/messages/JavaErrorMessages.properties
@@ -219,6 +219,7 @@ exception.already.caught.warn=Unreachable section: {1, choice, 0#exception|2#exc
not.a.statement=Not a statement
invalid.statement=Invalid statement
incompatible.types=Incompatible types. Found: ''{1}'', required: ''{0}''
+incompatible.call.types=Wrong {0, choice, 1#1st|2#2nd|3#3rd|4#{0,number}th} argument type. Found: ''{2}'', required: ''{1}''
valid.switch.selector.types=byte, char, short or int
valid.switch.17.selector.types=char, byte, short, int, Character, Byte, Short, Integer, String, or an enum
dot.expected.after.super.or.this='.' expected