summaryrefslogtreecommitdiff
path: root/java/debugger/impl/src
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2013-09-27 10:19:19 -0700
committerTor Norbye <tnorbye@google.com>2013-09-27 10:19:28 -0700
commitf7998d05c40c24ae66d1972abfcb070552b1d7b5 (patch)
treeb0b97491f6e6591e53ea6a8f6c3a79a7dc685771 /java/debugger/impl/src
parentbeca9839b2866f90da9dc517c29df2ec25a6f6a8 (diff)
downloadidea-f7998d05c40c24ae66d1972abfcb070552b1d7b5.tar.gz
Snapshot cd724ea5e27634f1c84f893f10b646937a677d56 from idea/132.425 of git://git.jetbrains.org/idea/community.git
cd724ea: Code cleanup - Idea's warnings fixed - message moved to .properties file c84855b: for performance use processNames api for java symbol contributor 334c509: IDEA-114064 Create "From Maven" library dialog doesn't handle full coords correctly (as advertised) 4e10a17: IDEA-109943 Download Library from Maven Repository: artifacts from repository with provider != maven2 are suggested, but repository is filtered off d4bc48d: IDEA-114037 Code completion should prefer variable names to unimported class names b7e5e6c: refix RUBY-11716: do not play with fire, always save and load in UTF-8 ! bb7ed8a: cleanup 15bd24e: cleanup e56b270: ProjectId, don't add project level provider if project is not mapped a0fb6a5: let IsNullCheck mean null->true, the former !null->false meaning was useless 26402542: test data fixed f800733: new inference: input/output inference variables 56d872d: NPE: find usage for db element 3ffd6a0: IDEA-114003 XDebuger breakpoint properties: strage selection jumps in breakpoint tree bbdef54: IDEA-114001 XDebuger Breakpoint Properties: enable in tree is not saved IDEA-114002 XDebuger breakpoint properties: don't close the dialog by double click IDEA-114004 XDebugger breakpoint properties: checkboxes synchronization is broken f6ff871: IDEA-114001 XDebuger Breakpoint Properties: enable in tree is not saved IDEA-114002 XDebuger breakpoint properties: don't close the dialog by double click IDEA-114004 XDebugger breakpoint properties: checkboxes synchronization is broken 8f3d962: IDEABKL-6897 Enter inserts closing brace in wrong place 6a78643: IDEABKL-6897 Enter inserts closing brace in wrong place 06b899c: IDEA-114001 XDebuger Breakpoint Properties: enable in tree is not saved IDEA-114002 XDebuger breakpoint properties: don't close the dialog by double click IDEA-114004 XDebugger breakpoint properties: checkboxes synchronization is broken aeda985: don't give focus to ant messages view f525708: new inference: overload resolution for SAM return type for implicit lambda should be ignored 6692602: cleanup current file from highlighting markup 27c6645: compilation fix 1936bb2: IDEA-107453 Compilation error if overriding methods have different access modifiers 0ddcc36: api a7f05e1: card layout fixed b007608: IDEA-110203 IDEA ignores space after comma setting for methods declaration/call [CR-IC-2022] ae02c17: hiding artifacts 90e6ed2: back to AddModuleWizard 4a029e9: Groovy: Pull-up members 6f9e810: NPE fc48bab: pull-up cbf7531: prepare pull-up refactoring for Groovy 6762d5f: cleanup b26ffb2: spaces around inner classes 41e8e70: IDEA-113333 Java formatter breaks source code: Merges statements into line comments [CR-IC-2245] ea91b55: IDEA-113815 keep "simple methods in one line" does not keep long methods [CR-IC-2486] ecd65ad: Import Eclipse code style settings from XML profile (a part of IDEA-104068) [CR-IC-2219] aacf1e4: IDEA-113844 (handling of core component initialization failures when spoiled by plugins) 8dc3ede: IDEA-112387 Reformat code with rearrange entires on = fail on enum [CR-IC-2205] 72ddb9e: Merge remote-tracking branch 'origin/master' 209340b: Add the description for MavenDuplicatePluginInspection. de367e1: Merge branch 'svn1_8_new' 1a70497: IdeaTestAssistant: fix test data d6a2510: svn: Fixed "Import" when path/url contains '@' symbol 94c4223: svn: Implemented "Export" action for command line 8913712: parameter popup: escape for annotation methods (IDEA-113971) fdf7312: svn: Made event handler for checkout/export utilize passed progress indicator (instead of just current thread progress indicator) f653713: IDEA-105758: Contradiction between error and fix actions (Java EE artifact) eac456f: Platform: ability to provide native icons for PsiElements (PsiFile/Directory) AppCode: blue icons for folders 4d5c47a: IDEA-77519: Project fails to open when workspace.xml is empty c40e732: two classes temporary restored to fix backward compatibility b6b3bc6: added optional dependencies for framework support providers a9dae78: IDEA-90661: recognize IBM JDK jars 6b44958: cleanup & javadoc 0c0a6a6: IDEA-108785 Allow applying the same context to many selected live templates 247661b: don't search for unknown path macros in the middle of xml unless asked so by PathMacroFilter (IDEA-102674) 90222d5: hopefully fix control flow building stack inconsistency assertions in case when a PCE is thrown 241e44b: EA-50288 - CCE: RefJavaUtilImpl.getTopLevelClass 22d5c2f: ensure to filter already inserted annotations (IDEA-113785) 27b76b4: inplace introducer: another case to restore expression (IDEA-113352) 603e138: add mnemonics (IDEA-113889) a8c374c: XSuspendPolicyPanel "Make default" (requires for new JavaBreakpointType) remove unused methods 4f19472: CR-IC-2485 (deprecation policy specified; deprecated API usage upgraded) 7231807: JavaBreakpointType isSuspendThreadSupported true 8637e89: register JavaBreakpointType, but hide under system property java.debugger.xBreakpoint 0b2d5f0: cleanup 5cc1f5e: EA-50289 (CCE: TooBroadScopeInspection$TooBroadScopeInspectionFix.getCommentText) 505b86e: new inference: pertinent to applicability 8ac21fd: cleanup 2c5f39e: cleanup f6efaa9: simplify DebuggerInvocationUtil bf8865f: overrides 0d49e5b: JavaBreakpointType canPutAt 33ebea3: extract XLineBreakpointTypeBase de7d963: extract XDebuggerEditorsProviderBase, init JavaBreakpointType (is not registered, so, not in action now) ed777e6: remove deprecated canPutAt 9163435: overrides 44af67f8: extract XDebuggerUtil.getInstance().getGroupingByFileRuleAsList() b93b27c: add missing Overrides 0857036: cleanup ae791a7: new inference: test preparations 48120ab: IdeaTestAssistant: add resolving and completion inside TestDataPath annotation 971544b: remove empty unused class c5642d9: hippie completion: split complex tokens by spaces e1383b1: refix and add test for IDEA-90294 Don't use substring match in word completion fbae94c: EA-49809 Made client factories final in SvnVcs 2b4b70f: Fix OC-8127: Appcode hangs on reformatting (endless right shift) +review CR-OC @Anton.Makeev, @Rustam.Vishnyakov b7314cf: fix pycharm detection 5f0bb3c: revert error checking 5f99590: svn: Implemented "Import" action for command line ad04905: svn: Changed import logic to use common commit event handler (instead of checkout event handler) 1a45be0: custom options 8d278a3: MavenArchetypesPanel extracted 32eeb4c: aggregation panel invisible 9388cc4: new project wizard: project type sorting 2c02a07: svn: Add "Skipped" event processing in commit/import output for command line d365580: svn: Refactored commit output parsing for command line b1cc312: immutable dfa offset stack 5c494fb: toolbarIcon is nullable 4304880: dfa: traverse only flushable variables, not all ed08eab: immutable EqClass 03de519: overrides f8661d9: return empty collection if list of storage files is empty 81a998c: IDEA-111030: Add Framework Support: Ok is disabled for the only selected Web Application 4ce1cc8: unused class removed 84f7401: svn: Added final status bar message for Import ("Committed revision xxx") aa1d479: library editor: 'attach javadoc' extracted to separate button so the main '+' button won't show popup 1612198: cleanup e180456: cleanup 546fffe: Merge remote-tracking branch 'origin/master' c3caf6c: Merge remote-tracking branch 'origin/master' 5cd2b37: assertion for EA-45385 - NPE: XmlTagImpl.getDescriptor 99563ea: EA-49418 - NPE: InjectLanguageAction.invokeImpl dc82859: cleanup f70ef96: EA-50139 - assert: TextRange.<init> 990e410: svn: Removed unused code (from "Ignore" functionality) 6604613: svn: Implemented "Ignore" functionality on subversion level d544d03: cleanup after notnullification 5330d9e: plugin suggester: suggest plugins from repository by unknown facet 1ccf92a: error which should never happen replaced by assertion 889d3ce: improved dialog for choosing root types of added roots 0eb34fa: hide "use out of process build" option from UI d79e13e: plugin suggester: suggest plugins from repository by unknown facet 00a127b: Use shell options only if applicable. b4f21b9: Don't fail to create SSH terminal session if we failed to create local terminal session. 8e5cb57: test for "Unnecessary unicode escape sequence" inspection dc8acce: temp revert c7c4431: fix SliceBackwardTest 3e16a04: svn: Implemented "Edit Revision Comment" action for command line c54948a: 'async' added e4f7950: svn: Correctly create externals that have '@' in url - add '@' at url end 9b66e1c: svn: Fix line separators duplication for "Create External" action for SVNKit a98dc14: svn: Implemented "Create External" action for command line 32e30d1: EA-50206 - assert: FileManagerImpl.findFile 4a4c0cc: svn: Unify line separator for multiline properties 4b9422b: Reverted: Semantic highlighting level to avoid conflicts with "unused symbol" annotations [CR-IC-2435] ad970ef: lambda: propagate wildcards elimination e78ab51: lambda: check formal params for equality, eliminate wildcards during inference according to 15.27.3 fc9a196: new inference: ignore proper types in mutual eq constraints generation 7bc0048: new inference: void compatible according to return values 939fc45: prepare for test new inference eef6eb2: new inference: exact method reference 172daec: new inference: eliminate delayed constrains according to 0.6.3 ec93384: postpone type evaluation e689d68: new inference: make use of ex constraint 7838f8e: Merge branch 'safe-sudo-escaping' 1c22df9: Add grails-app/resources as resources folder, not a source folder. a7f094d: fix NPE e1fe819: Added ExecUtil.sudoAndGetOutput() with safe escaping and quoting for Mac and Linux 6bf3a02: fixed EA-48905 - SIOOBE: ParameterInfoComponent$OneLineComponent.buildLabelText c853c69: system dependent paths in groovy shell db7d97f: Merge remote-tracking branch 'origin/master' 65426f9: mark as DumbAware 0d1a074: Support active links in GotIt panel c7297a0: debugging blinking test 755c6b2: IDEA-113938 "Submit feedback" should pre-fill project and affected version ff45141: dfa: don't go into the same instruction twice with the same state 3361944: a bit more parsimonous DfaMemoryStateImpl.createCopy 028d28b: dfa states should not change while in queue => no need to copy them 1709382: dfa: use UnorderedPair instead of two-element set e8dbc21: immutable DfaVariableState, for faster copying and less memory usage 666ed52: IDEA-70241 (Replace with '{@code}' inspection doesn't replace all occurrences in file.) 71bd9cf: Merge remote-tracking branch 'origin/master' c923098: EA-47881 - IOE: GroovyPsiElementFactoryImpl.createGroovyFileChecked 8b97940: cleanup logging 6e4b81e: EA-50137 - assert: TestObject.addClassesListToJavaParameters 5381d51: cleanup dc2d1b2: notnull f419fab: "todo" moved out of lang-impl 97cd633: attributes cleanup 75b3eaa: notnull c7fa9af: cleanup f5b5bf4: cleanup 776b16b: cleanup bf3cea4: made fields final 87913f7: cleanup 798e94e: cleanup, get rid of buggy duplicate node renderer 50f13e4: removed deprecated methods from ExternalAnnotator 6d9c887: avoid deprecated methods 4852116: minor 9cd549c: now Searchable. fixes test. 302302a: typo 26d8885: - handle strings with more than one quote used for start / end delimiters - proper retrieving syntax highlighter in case of non languge based syntaxhighlighter (quite often it is bound to file type) - Find: String literals only: Throwable at StringSearcher.scan() on XML with a string (IDEA-113885) - fix for backward search not ending when whole word option used 4dfd0c7: Encapsulate field dialog: explicit value for "Use accessors when field is accessible" when "as is" visibility is selected e1aff45: typo :((( 6237b9b: test fixed 6c0d31b: test fixed 493cfae: update test data 711bca1: update test data f1bc615: update test data 8dd18de: update test data e61a901: update test data 0be96e9: update test data aac178b: dfa: remove queued state duplication 6a25f5d: dfa: don't reschedule already processed states, cleanup 7559dfc: Semantic highlighting level to avoid conflicts with "unused symbol" annotations [CR-IC-2435], for WI-19396, WI-20126 (cherry picked from commit 56d66dc) 7c27aef: extract collectUsedJars() function 12f59ff: update test data 03df890: update test data 1efd604: update test data 2c1726e: update test data 24bf1d1: Merge remote-tracking branch 'origin/master' 8f26a8b: improved duplicates search in python extract method 9bfcbbe: setup resource roots when project is imported from Maven (IDEA-57398) 64594cd: diagnostics for EA-49831 0d76c32: add support for frameworks step: sorting restored b510334: IDEA-113294 indentation of brace in a lambda expression corrected [CR-IC-2426] 9651be4: IDEA-113910 Gradle: code insight; dependencies DSL resolving 25595c8: new inference: checked exceptions compatibility constraint 6b8f295: dump highlighting test data without markup 636719b: now that we have dfa state hashing, use it instead of linear lookup 3813120: dfa: don't merge states when there's only one 3fd9ba8: IDEA-113910 Gradle: code insight; dependencies DSL resolving 57a6aeb: IDEA-113910 Gradle: code insight; dependencies resolving da23b6c: Merge remote-tracking branch 'origin/master' 7ca6ea3: Merge remote branch 'origin/master' cdc6d6a: show deprecated make implementation warning once on first compilation after project opening 090c4e3: dfa state merging: cache copies e6ee024: Allows getting Gradle home without having a Project. 0391639: Gradle VM Options are now saved in between sessions. f5412f0: resource root: show 'New Directory' action instead of 'New Package' under resource roots 1637f6b: notnullification 87f394f: IDEA-113904 (Add New Module from Project Structure dialog wants to create new project) a7c75f6: IDEA-113865 ('Equals should check class of parameter' shouldn't warn on identity equals) 2486e9e: dfa: merge several states to account for variables with several possible values 4d4f4b0: dfa: some minor things and caching c14961f: UnorderedPair in platform 5ad442d: Merge remote-tracking branch 'origin/master' 946a281: Scroll to bottom on typing in terminal (PY-10344). e5a0548: Close all connections on dispose. f61f6a2: changes from tech-writers b82b0bb: dfa: state merging interruptibility 3893373: VcsDirtyScopeManagerImpl: log who marks everything dirty 41e5381: Merge remote-tracking branch 'origin/master' da21efb: JediTerm updated. beb1d1a: Merge remote-tracking branch 'origin/master' ed3a2b5: skip the whole document if some component has disabled roaming type (details CR-IU-308) d66309b: Fix antialiasing. e55fae1: dfa: abstract out eq class into EqClass class 370d44d: dfa: remove trivial state facts that constant != another constant 4ccfcf7: UsagesStatistic must specify roaming disabled 75894ae: cleanup 784b4e3: DimensionService: cleanup, order of stored data should be stable 36443b6: overrides b70b1dc: overrides dfe38fb: simplify some constant conditions and greenify 9a08478: IDEA-85961 (Pattern BACKSLASH_PATTERN = Pattern.compile("\\", Pattern.LITERAL) is always marked red.) d0bdc3b: simplify load from providers – we don't need to filter again (our save do it, in any case it is absurd to store component with global roaming in the project level file, — should be refine later) bf85e1b: cleanup 9c30823: remove unused methods f671c09: overrides 3bd62bc: ComponentRoamingManager should not keep defaults (we use RoamingType.PER_USER by default) a8f1063: CR-IU-300 remove outdated EP ComponentRoamingType b182751: CR-IU-300 remove outdated RoamingTypePerPlatform 994389c: another java.util.regex.Pattern.compile() parameter annotation 301710d: IDEA-113866 (this. not suggested for fields of anonymous inner classes) f5d03c4: dfa: don't consider final getters same as immutable fields 272a6d0: Corresponding parents for console colors. 71298ce: Bright console colors for Monokai. f39c34b: Console colors for WarmNeon scheme. 7548e47: Black is invisible on dark background (in RegExps for example). ca6b784: Change bloody red to light pink for numbers (pink is specific to Neon color schemes while red is not, also eyes say thanks). 7f627d9: Console colors for Twilight scheme fixed. a5eb2fc: Console colors for Monokai scheme fixed. f7da145: DfaPsiType: add @NotNull b216102: rebomb test b349547: diagnostics for inconsistencies during control flow building 6823425: dfa: only perform costly state merging when it has chances - after jumps fea8871: dfa: fighting too complex methods; join complementary memory states after fork to avoid having too many states 0ac2084: DfaMemoryStateImpl: introduce unwrap; compare variable values with their non-initialized counterparts e919b8b: dfa: only goto catch on non-trivial method calls and throws e2ea04f: new inference: initial method reference constraint a9dde36: new inference: check substituted descriptor return type 3e5b164: new inference: expression inside condition should be poly, target type for conditional expression ff9f2e9: new inference: emulate fresh variable - do not override vars with captured ones f415702: new inference: default constructor as poly expression argument ee56497: new inference: symmetric variable bounds 4a46b24: new inference: init inter call inference 06829c5: Merge remote-tracking branch 'origin/master' e3f213f: Console colors for Darcula. f748505: IDEA-57940 Cyclic expand word should take into account all open files 460ef47: StreamProvider.isVersioningRequired 8029f47: Bright yellow made more visible on white background. 96006be: Default console colors as in xterm palette, gray and dark gray from standard vga palette for better readability. a378414: Bight console colors added to settings. 54e6582: builder-based project types b0b2cf8: template-based project types? e741484: CPU hogging fix again eb22a99: fix todo duplication when several pattern match -> prefer finding match with last pattern (in settings list), thus default TODO pattern is matched last a4d4371: fix compilation 2f823ba: Difference Groovy Shell & Groovy Console actions 3e876f4: IDEA-113590 annotations as annotation values 732cafd: dead code a712f87: pull up 'isQualified()' method 4edd102: extract base class from PullUpDialog 10d89d6: remove obsolete test a0750e4: delete envFile manually 114cbb2: IDEA-113861 Gradle: it could be possible to hide 'Gradle: download' progress to the background ca416b8: 'More' element for classes, files, action, and settings. Better renderer. b2a550c: test framework: drop temp directory on light project close 8aaf53b: greenify ActionsTreeUtil a bit 922d41a: layout 2cd7326: adding frameworks support 2bd8fb0: cleanup 4ea6442: ProjectSummaryStep 9fdcdcd: commit project name bd39918: new project wizard: first test 630fc14: External system: use URLs in compile output paths 85dbe5f: IDEA-65114 "Add Maven projects" cannot be undone 5041ae5: test framework: returning of the data provider 16e2072: @Nullable XBreakpoint.getProperties reverted +review CR-IC-2418 df4da38: dump shell environment to a temporary file to reduce probability of malformed lines occurrence 280d52a: let event log warning color be orange (IDEA-113802) a30b2ae: IDEA-113836 Console folding: add TestNG related patterns cbeb0f1: don't change mouse cursor during goto name population (IDEA-113800) fb5ad5b: IDEA-113638 ChooseByName restart on write action spawns a new thread 89b3767: disable autopopup in groovy shell if selection by chars is enabled (IDEA-112820) 9fa36be: CompletionConfidence: don't force API users to implement unused method 34cf7eb: Console Folding: proper capitalization 5e8aa44: IDEA-113855 Search Everywhere looks scrambled at first start 71723cb: svn: Refactored executable validation - use separate version client 1114cfe: javadoc 0738800: jps model: simplification, source roots always have default properties b1d5062: jps model: JpsElementType converted to interface to allow reusing common base class 229deb0: test framework: ok, put light project file into ephemeral directory, but keep it for a project's life 6e8b950: ensure "thread" suspend policy for logging breakpoints d67c04e: EA-49809 Move client factories creation to SvnVcs constructor (instead of active() method) 935cdba: new inference: initial tests 970a180: encapsulate read access to USE_COMPILE_SERVER option b9b3fc8: remote agents - extract to remote servers cfe8e2b: WEB-9335 Bad insert pair brace in CSS 2815c22: WEB-9334 Incremental selection works bad with negative CSS values d023471: new "Unnecessary unicode escape sequence" inspection 945b069: unicode escape needs at least one 'u' 8e7797b: chrome still crashed, revert to old, not-recursive speed search 1917d86: Merge remote-tracking branch 'origin/master' c18e6bd: Lense mode "internal" preview db88427: Merge branch 'svn1_8_new' 7c64e8b: test framework: do not put light project file into ephemeral directory af09e11: remove @Nullable from key.get as it's too generic d49df32: svn: Refactored prompting for working copy format - make return not null format d6086ae: dfa: types with wildcard parameters are not equal 3d28aa5: Optimization: check exiting of griffon-app first b016c04: correct ephemeral state copy (IDEA-113143 Calling method with contract shouldn't result in nullability suspicion) 189573f: svn: Refactored upgrade working copy format dialog - use list of available formats (instead of separate fields for each format) 60c471b: Rename test 1a42f59: Remove using of unnecessary StringBuilder a56db90: Use MultiMap 340cf22: Calling method with contract shouldn't result in nullability suspicion (IDEA-113763, IDEA-113699, almost IDEA-113143) f2a563b: dfa: unify nullability violation processing 709af86: dfa: expand contract test 1cddfb4: dfa cleanup: skipping reports on method calls is now done via unknown variable mechanism 2765dab: dfa: spare some minor cpu cycles 8bc7465: svn: Added "1.8" option to upgrade/checkout dialogs c266bd2: IDEA-66603 Maven3: provide inspection that checks duplicate declarations of plugins af32923: SpellChecker: "cyclomatic" 5f4f98f: svn: Refactored working copy format selection dialog to use WorkingCopyFormat instances instead of just strings e33b58b: MismatchedCollectionQueryUpdateInspection -- added "compute" prefix (from j.u.Map in JDK8) 7d54b2e: new inference: accept nonProper eq bounds 457d95b: new inference: distinguish different captures 5b5f52e: new inference: assertions caused by raw types 3848de4: new inference: open top level captured wildcards 35d59c0: new inference: extend usage of already inferred variables 4f7b572: new inference: inference of calls in arguments during outer call inference bfa7879: new inference: captured variables from outer calls to be included ed95269: new inference: eq bound for S<=T constraint reduction 12a0faf: better positioning 13029b7: different position layout algorithms 39e6e21: EA-49923 - Fixed working copy format detection for default project d521e9d: JDK combobox should show JDK home 17fe05e: Fix typo 7ab769b: IDEA-16077 Maven embedder runs in the 'wrong' JDK add "embedder JDK" option 418ddc0: Inline string constant 6a8f1e2: IDEA-16077 Maven embedder runs in the 'wrong' JDK extract MavenJdkCombobox 46078c4: svn: Refactored detection if command line implementation should be used (use utility method) 24106fc: XDebugger: @Nullable XBreakpoint.getProperties() 3dc6f07: extract util method 476dac4: Reinit checkbox state on create 39cf1fd: Structure viewer for simple editors support fixed a38a251: Show filters only for table editor + a few model and UI fixes cbd5630: Initial dynamic filters model + columns header improved 281c008: svn: Support nullable SVNStatusClient in status implementation for SVNKit 1840d42: simplification fbcba0f: svn: Make command line clients (info, status) use vcs instead of project instances ae8b41b: Merge remote-tracking branch 'origin/master' a97397c: Extract method. 3b9eca4: new project wizard: preparing test infrastructure 327ddb0: Lense mode "internal" preview 0ede5e1: new project wizard: AbstractProjectWizard extracted a94b556: IDEA-111335 Gradle: task tree is incorrectly displayed if tasks are added to sub-projects via 'subprojects' method bfd366f: Merge remote-tracking branch 'origin/master' 0ef2a82: calls to obsolete method removed from build scripts 2df016f: AntLoggerFactory inner class made static to fix NoSuchMethodException in Logger.setFactory fe876e2: svn: Clients for update command renamed and moved to corresponding package a38d90e: Terminal color settings. bd285b8: svn: Refactored update logic to common ClientFactory model 9cc13da: platform: ignore hidden Windows files d87664c: test framework: relic property dropped 5f6ef06: svn: Removed unused "common ancestor" behavior from command line update client 3667fe1: Find in strings with reg exp with start / end match markers doesn't work without string delimiters (IDEA-113788) 94a079f: svn: Refactored "update" command - explicitly create new SVNKit update client for each update/switch operation 0344e91: new project wizard: added option to use framework libraries from an app server 2882ac0: svn: Removed unused methods from "update" client 17ea275: svn: Removed unused SvnProxies class c926181: WEB-9342 External Tool fails on OSX if an executable file basename specified a3433f9: svn: Removed unused methods from "info" client ec3112d: Optimize SassExtensionFunctionsIndex 9f1abf7: nosplash shouldn't prevent from plugin update 4c7154d: dfa: use cached nullability b81e9c3: dfa: less frequent "too long" check 0b0eba9: DfaValueFactory: use List instead of TIntObjectHashMap for sequential keys 95d5433: introduce DfaPsiType without nullability, to quickly check assignability/convertibility in DfaVariableState b901d90: IDEA-96713 Incorrect options shown for 'implements' e02e2c4: IDEA-113780 "Annotate" from history fixed for renamed/moved files fe00f73: test framework: stability improvements 76d664d: platform: suspicious event logging b204bdf: Cleanup (de-duplication) 7ba9ff0: spelling ece939c: make public for Upsource 496db4d: xdebugger: rebuild standalone variables view on EDT eae27cb: xdebugger: supported rebuilding of standalone variables view 8bf5204: xdebugger api: added convenient method 43dbb6f: Terminal options. 3db1f5c: Blink period and antialiasing settings. 88264bd: IDEA-108147 Use "merge sources" wrapper object instead of just string representation as data model for "Merge Sources" column (to correctly get file revision object and show details panel) 111e6ba: IDEA-108147 While building history for element make check "if element parent or child was changed in given revision" only be performed for non-"merge source" revisions e07828d: svn: Implemented support for "merged revisions" parsing in history logic for command line 1586c4a: svn: history logic refactored for command line - get and parse history data in xml format 0ac1dd2: IDEA-94942 Refactored "Annotate" implementation for command line - use utility method for parsing ba1e5e0: IDEA-94942 Implemented merge history support for "Annotate" action 4c3b0a8: IDEA-94942 Implemented "Switch" logic (during update) Change-Id: I7092ae66ff47d353a5b9770d1d91f77369bb7734
Diffstat (limited to 'java/debugger/impl/src')
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/DebuggerInvocationUtil.java91
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/actions/JavaEditBreakpointActionHandler.java48
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/actions/ToggleFieldBreakpointAction.java20
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/engine/requests/RequestManagerImpl.java2
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/AnyExceptionBreakpointFactory.java12
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointFactory.java12
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointManager.java39
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java21
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/ExceptionBreakpointFactory.java47
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/FieldBreakpointFactory.java21
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/JavaBreakpointItem.java25
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java35
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpointFactory.java22
-rw-r--r--java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpointFactory.java26
-rw-r--r--java/debugger/impl/src/org/jetbrains/java/debugger/JavaDebuggerEditorsProvider.java24
-rw-r--r--java/debugger/impl/src/org/jetbrains/java/debugger/breakpoints/JavaBreakpointType.java67
16 files changed, 248 insertions, 264 deletions
diff --git a/java/debugger/impl/src/com/intellij/debugger/DebuggerInvocationUtil.java b/java/debugger/impl/src/com/intellij/debugger/DebuggerInvocationUtil.java
index c0dfbb9fd386..ebb5bef81ece 100644
--- a/java/debugger/impl/src/com/intellij/debugger/DebuggerInvocationUtil.java
+++ b/java/debugger/impl/src/com/intellij/debugger/DebuggerInvocationUtil.java
@@ -22,76 +22,79 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Computable;
import com.intellij.psi.PsiDocumentManager;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
import javax.swing.*;
public class DebuggerInvocationUtil {
- public static void swingInvokeLater(final Project project, @NotNull final Runnable runnable) {
+ public static void swingInvokeLater(@Nullable final Project project, @NotNull final Runnable runnable) {
+ if (project == null) {
+ return;
+ }
+
SwingUtilities.invokeLater(new Runnable() {
+ @Override
public void run() {
- if (project != null && !project.isDisposed()) {
- runnable.run();
- }
- }
- });
- }
- public static void invokeLater(final Project project, @NotNull final Runnable runnable) {
- ApplicationManager.getApplication().invokeLater(new Runnable() {
- public void run() {
- if (project != null && !project.isDisposed()) {
+ if (!project.isDisposed()) {
runnable.run();
}
}
});
}
- public static void invokeLater(final Project project, @NotNull final Runnable runnable, ModalityState state) {
- ApplicationManager.getApplication().invokeLater(new Runnable() {
- public void run() {
- if(project == null || project.isDisposed()) return;
+ public static void invokeLater(@Nullable Project project, @NotNull Runnable runnable) {
+ if (project != null) {
+ ApplicationManager.getApplication().invokeLater(runnable, project.getDisposed());
+ }
+ }
- runnable.run();
- }
- }, state);
+ public static void invokeLater(@Nullable Project project, @NotNull Runnable runnable, ModalityState state) {
+ if (project != null) {
+ ApplicationManager.getApplication().invokeLater(runnable, state, project.getDisposed());
+ }
}
public static void invokeAndWait(final Project project, @NotNull final Runnable runnable, ModalityState state) {
- ApplicationManager.getApplication().invokeAndWait(new Runnable() {
- public void run() {
- if(project == null || project.isDisposed()) return;
-
- runnable.run();
- }
- }, state);
+ if (project != null) {
+ ApplicationManager.getApplication().invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ if (!project.isDisposed()) {
+ runnable.run();
+ }
+ }
+ }, state);
+ }
}
- public static <T> T commitAndRunReadAction(Project project, final EvaluatingComputable<T> computable) throws EvaluateException {
- final Throwable[] ex = new Throwable[] { null };
+ public static <T> T commitAndRunReadAction(Project project, final EvaluatingComputable<T> computable) throws EvaluateException {
+ final Throwable[] ex = new Throwable[]{null};
T result = PsiDocumentManager.getInstance(project).commitAndRunReadAction(new Computable<T>() {
- public T compute() {
- try {
- return computable.compute();
- }
- catch (RuntimeException e) {
- ex[0] = e;
- }
- catch (Exception th) {
- ex[0] = th;
- }
+ @Override
+ public T compute() {
+ try {
+ return computable.compute();
+ }
+ catch (RuntimeException e) {
+ ex[0] = e;
+ }
+ catch (Exception th) {
+ ex[0] = th;
+ }
- return null;
- }
- });
+ return null;
+ }
+ });
- if(ex[0] != null) {
- if(ex[0] instanceof RuntimeException) {
+ if (ex[0] != null) {
+ if (ex[0] instanceof RuntimeException) {
throw (RuntimeException)ex[0];
}
else {
- throw (EvaluateException) ex[0];
+ throw (EvaluateException)ex[0];
}
}
return result;
}
-}
+} \ No newline at end of file
diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/JavaEditBreakpointActionHandler.java b/java/debugger/impl/src/com/intellij/debugger/actions/JavaEditBreakpointActionHandler.java
index deb575205157..54cef880be0f 100644
--- a/java/debugger/impl/src/com/intellij/debugger/actions/JavaEditBreakpointActionHandler.java
+++ b/java/debugger/impl/src/com/intellij/debugger/actions/JavaEditBreakpointActionHandler.java
@@ -19,8 +19,8 @@ import com.intellij.debugger.ui.breakpoints.BreakpointFactory;
import com.intellij.debugger.ui.breakpoints.BreakpointPropertiesPanel;
import com.intellij.debugger.ui.breakpoints.BreakpointWithHighlighter;
import com.intellij.openapi.actionSystem.AnActionEvent;
+import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DataContext;
-import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.markup.GutterIconRenderer;
@@ -28,7 +28,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.ui.popup.JBPopupListener;
import com.intellij.openapi.ui.popup.LightweightWindowEvent;
-import com.intellij.openapi.util.Key;
+import com.intellij.openapi.util.EmptyRunnable;
import com.intellij.openapi.util.Pair;
import com.intellij.openapi.wm.IdeFocusManager;
import com.intellij.util.ui.UIUtil;
@@ -41,48 +41,31 @@ import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
-/**
- * Created with IntelliJ IDEA.
- * User: zajac
- * Date: 04.05.12
- * Time: 4:10
- * To change this template use File | Settings | File Templates.
- */
public class JavaEditBreakpointActionHandler extends EditBreakpointActionHandler {
@Override
protected void doShowPopup(final Project project, final JComponent component, final Point whereToShow, final Object breakpoint) {
- if (!(breakpoint instanceof BreakpointWithHighlighter)) return;
+ if (!(breakpoint instanceof BreakpointWithHighlighter)) {
+ return;
+ }
final BreakpointWithHighlighter javaBreakpoint = (BreakpointWithHighlighter)breakpoint;
- Key<? extends BreakpointWithHighlighter> category = javaBreakpoint.getCategory();
-
- final BreakpointFactory[] allFactories = ApplicationManager.getApplication().getExtensions(BreakpointFactory.EXTENSION_POINT_NAME);
BreakpointFactory breakpointFactory = null;
- for (BreakpointFactory factory : allFactories) {
- if (factory.getBreakpointCategory().equals(category)) {
+ for (BreakpointFactory factory : BreakpointFactory.EXTENSION_POINT_NAME.getExtensions()) {
+ if (factory.getBreakpointCategory().equals(javaBreakpoint.getCategory())) {
breakpointFactory = factory;
}
}
assert breakpointFactory != null : "can't find factory for breakpoint " + javaBreakpoint;
final BreakpointPropertiesPanel propertiesPanel = breakpointFactory.createBreakpointPropertiesPanel(project, true);
+ assert propertiesPanel != null;
propertiesPanel.initFrom(javaBreakpoint, false);
final JComponent mainPanel = propertiesPanel.getPanel();
- final String displayName = javaBreakpoint.getDisplayName();
-
- final JBPopupListener saveOnClose = new JBPopupListener() {
- @Override
- public void beforeShown(LightweightWindowEvent event) {
- }
-
+ final JBPopupListener saveOnClose = new JBPopupListener.Adapter() {
@Override
public void onClosed(LightweightWindowEvent event) {
- propertiesPanel.saveTo(javaBreakpoint, new Runnable() {
- @Override
- public void run() {
- }
- });
+ propertiesPanel.saveTo(javaBreakpoint, EmptyRunnable.getInstance());
}
};
@@ -93,13 +76,12 @@ public class JavaEditBreakpointActionHandler extends EditBreakpointActionHandler
@Override
public void run() {
BreakpointsDialogFactory.getInstance(project).showDialog(javaBreakpoint);
-
}
});
}
};
- final Balloon balloon = DebuggerUIUtil.showBreakpointEditor(project, mainPanel, displayName, whereToShow, component, showMoreOptions,
- breakpoint);
+
+ final Balloon balloon = DebuggerUIUtil.showBreakpointEditor(project, mainPanel, whereToShow, component, showMoreOptions, breakpoint);
balloon.addListener(saveOnClose);
propertiesPanel.setDelegate(new BreakpointPropertiesPanel.Delegate() {
@@ -107,9 +89,7 @@ public class JavaEditBreakpointActionHandler extends EditBreakpointActionHandler
public void showActionsPanel() {
propertiesPanel.setActionsPanelVisible(true);
balloon.hide();
- final Balloon newBalloon =
- DebuggerUIUtil.showBreakpointEditor(project, mainPanel, displayName, whereToShow, component, showMoreOptions, breakpoint);
- newBalloon.addListener(saveOnClose);
+ DebuggerUIUtil.showBreakpointEditor(project, mainPanel, whereToShow, component, showMoreOptions, breakpoint).addListener(saveOnClose);
}
});
@@ -124,7 +104,7 @@ public class JavaEditBreakpointActionHandler extends EditBreakpointActionHandler
@Override
public boolean isEnabled(@NotNull Project project, AnActionEvent event) {
DataContext dataContext = event.getDataContext();
- Editor editor = PlatformDataKeys.EDITOR.getData(dataContext);
+ Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
if (editor == null) {
return false;
}
diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/ToggleFieldBreakpointAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/ToggleFieldBreakpointAction.java
index 02477905ec49..54d1545f74f6 100644
--- a/java/debugger/impl/src/com/intellij/debugger/actions/ToggleFieldBreakpointAction.java
+++ b/java/debugger/impl/src/com/intellij/debugger/actions/ToggleFieldBreakpointAction.java
@@ -19,9 +19,9 @@ import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.DebuggerManagerEx;
import com.intellij.debugger.InstanceFilter;
import com.intellij.debugger.SourcePosition;
+import com.intellij.debugger.engine.DebuggerUtils;
import com.intellij.debugger.engine.requests.RequestManagerImpl;
import com.intellij.debugger.impl.DebuggerSession;
-import com.intellij.debugger.impl.DebuggerUtilsEx;
import com.intellij.debugger.ui.breakpoints.Breakpoint;
import com.intellij.debugger.ui.breakpoints.BreakpointManager;
import com.intellij.debugger.ui.breakpoints.FieldBreakpoint;
@@ -33,7 +33,6 @@ import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.fileTypes.FileType;
-import com.intellij.openapi.fileTypes.FileTypeManager;
import com.intellij.openapi.fileTypes.StdFileTypes;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
@@ -50,8 +49,9 @@ import org.jetbrains.annotations.Nullable;
*/
public class ToggleFieldBreakpointAction extends AnAction {
+ @Override
public void actionPerformed(AnActionEvent e) {
- Project project = e.getData(PlatformDataKeys.PROJECT);
+ Project project = e.getData(CommonDataKeys.PROJECT);
if (project == null) {
return;
}
@@ -83,7 +83,7 @@ public class ToggleFieldBreakpointAction extends AnAction {
RequestManagerImpl.createRequests(fieldBreakpoint);
- manager.editBreakpoint(fieldBreakpoint, PlatformDataKeys.EDITOR.getData(e.getDataContext()));
+ manager.editBreakpoint(fieldBreakpoint, CommonDataKeys.EDITOR.getData(e.getDataContext()));
}
}
else {
@@ -93,6 +93,7 @@ public class ToggleFieldBreakpointAction extends AnAction {
}
}
+ @Override
public void update(AnActionEvent event){
SourcePosition place = getPlace(event);
boolean toEnable = place != null;
@@ -105,7 +106,7 @@ public class ToggleFieldBreakpointAction extends AnAction {
}
else if(DebuggerAction.isContextView(event)) {
presentation.setText(DebuggerBundle.message("action.add.field.watchpoint.text"));
- Project project = event.getData(PlatformDataKeys.PROJECT);
+ Project project = event.getData(CommonDataKeys.PROJECT);
if(project != null && place != null) {
Document document = PsiDocumentManager.getInstance(project).getDocument(place.getFile());
if (document != null) {
@@ -125,14 +126,14 @@ public class ToggleFieldBreakpointAction extends AnAction {
@Nullable
public static SourcePosition getPlace(AnActionEvent event) {
final DataContext dataContext = event.getDataContext();
- Project project = event.getData(PlatformDataKeys.PROJECT);
+ Project project = event.getData(CommonDataKeys.PROJECT);
if(project == null) {
return null;
}
if (ActionPlaces.PROJECT_VIEW_POPUP.equals(event.getPlace()) ||
ActionPlaces.STRUCTURE_VIEW_POPUP.equals(event.getPlace()) ||
ActionPlaces.FAVORITES_VIEW_POPUP.equals(event.getPlace())) {
- final PsiElement psiElement = event.getData(LangDataKeys.PSI_ELEMENT);
+ final PsiElement psiElement = event.getData(CommonDataKeys.PSI_ELEMENT);
if(psiElement instanceof PsiField) {
return SourcePosition.createFromElement(psiElement);
}
@@ -152,7 +153,7 @@ public class ToggleFieldBreakpointAction extends AnAction {
if(node != null && node.getDescriptor() instanceof FieldDescriptorImpl) {
Field field = ((FieldDescriptorImpl)node.getDescriptor()).getField();
DebuggerSession session = tree.getDebuggerContext().getDebuggerSession();
- PsiClass psiClass = DebuggerUtilsEx.findClass(field.declaringType().name(), project, (session != null) ? session.getSearchScope(): GlobalSearchScope.allScope(project));
+ PsiClass psiClass = DebuggerUtils.findClass(field.declaringType().name(), project, (session != null) ? session.getSearchScope() : GlobalSearchScope.allScope(project));
if(psiClass != null) {
psiClass = (PsiClass) psiClass.getNavigationElement();
final PsiField psiField = psiClass.findFieldByName(field.name(), true);
@@ -165,7 +166,7 @@ public class ToggleFieldBreakpointAction extends AnAction {
return null;
}
- Editor editor = event.getData(PlatformDataKeys.EDITOR);
+ Editor editor = event.getData(CommonDataKeys.EDITOR);
if(editor == null) {
editor = FileEditorManager.getInstance(project).getSelectedTextEditor();
}
@@ -173,7 +174,6 @@ public class ToggleFieldBreakpointAction extends AnAction {
final Document document = editor.getDocument();
PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(document);
if (file != null) {
- FileTypeManager fileTypeManager = FileTypeManager.getInstance();
final VirtualFile virtualFile = file.getVirtualFile();
FileType fileType = virtualFile != null ? virtualFile.getFileType() : null;
if (StdFileTypes.JAVA == fileType || StdFileTypes.CLASS == fileType) {
diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/requests/RequestManagerImpl.java b/java/debugger/impl/src/com/intellij/debugger/engine/requests/RequestManagerImpl.java
index 9d10487564ae..63a2ce8b7f77 100644
--- a/java/debugger/impl/src/com/intellij/debugger/engine/requests/RequestManagerImpl.java
+++ b/java/debugger/impl/src/com/intellij/debugger/engine/requests/RequestManagerImpl.java
@@ -142,7 +142,7 @@ public class RequestManagerImpl extends DebugProcessAdapterImpl implements Reque
}
private void addLocatableRequest(FilteredRequestor requestor, EventRequest request) {
- if(DebuggerSettings.SUSPEND_ALL.equals(requestor.SUSPEND_POLICY)) {
+ if(DebuggerSettings.SUSPEND_ALL.equals(requestor.getSuspendPolicy())) {
request.setSuspendPolicy(EventRequest.SUSPEND_ALL);
}
else {
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/AnyExceptionBreakpointFactory.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/AnyExceptionBreakpointFactory.java
index 79398de4991e..f595c1d81c65 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/AnyExceptionBreakpointFactory.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/AnyExceptionBreakpointFactory.java
@@ -15,13 +15,10 @@
*/
package com.intellij.debugger.ui.breakpoints;
-import com.intellij.debugger.ui.breakpoints.actions.BreakpointPanelAction;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Key;
import org.jdom.Element;
-import org.jetbrains.annotations.Nullable;
import javax.swing.*;
@@ -58,19 +55,10 @@ public class AnyExceptionBreakpointFactory extends BreakpointFactory{
}
@Override
- protected BreakpointPanelAction[] createBreakpointPanelActions(Project project, DialogWrapper parentDialog) {
- return new BreakpointPanelAction[0]; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- @Override
public boolean breakpointCanBeRemoved(Breakpoint breakpoint) {
return false;
}
- public @Nullable BreakpointPanel createBreakpointPanel(Project project, DialogWrapper parentDialog) {
- return null;
- }
-
public Key<AnyExceptionBreakpoint> getBreakpointCategory() {
return AnyExceptionBreakpoint.ANY_EXCEPTION_BREAKPOINT;
}
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointFactory.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointFactory.java
index 6389fdd1693e..2077b56dc34e 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointFactory.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointFactory.java
@@ -15,11 +15,9 @@
*/
package com.intellij.debugger.ui.breakpoints;
-import com.intellij.debugger.ui.breakpoints.actions.BreakpointPanelAction;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Key;
import com.intellij.xdebugger.impl.breakpoints.ui.BreakpointItem;
import org.jdom.Element;
@@ -42,14 +40,6 @@ public abstract class BreakpointFactory {
public abstract Key<? extends Breakpoint> getBreakpointCategory();
- public BreakpointPanel createBreakpointPanel(final Project project, final DialogWrapper parentDialog) {
- BreakpointPanel panel =
- new BreakpointPanel(project, createBreakpointPropertiesPanel(project, false), createBreakpointPanelActions(project, parentDialog),
- getBreakpointCategory(), getDisplayName(), getHelpID());
- configureBreakpointPanel(panel);
- return panel;
- }
-
public abstract Icon getIcon();
public abstract Icon getDisabledIcon();
@@ -75,8 +65,6 @@ public abstract class BreakpointFactory {
@Nullable
public abstract BreakpointPropertiesPanel createBreakpointPropertiesPanel(Project project, boolean compact);
- protected abstract BreakpointPanelAction[] createBreakpointPanelActions(Project project, DialogWrapper parentDialog);
-
@Nullable
public Breakpoint addBreakpoint(Project project) {
return null;
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointManager.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointManager.java
index dd52bcf0a849..686965f03626 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointManager.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointManager.java
@@ -25,7 +25,6 @@ import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.DebuggerInvocationUtil;
import com.intellij.debugger.SourcePosition;
import com.intellij.debugger.engine.DebugProcessImpl;
-import com.intellij.debugger.engine.DebuggerUtils;
import com.intellij.debugger.engine.evaluation.CodeFragmentKind;
import com.intellij.debugger.engine.evaluation.TextWithImportsImpl;
import com.intellij.debugger.engine.requests.RequestManagerImpl;
@@ -47,12 +46,12 @@ import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.fileEditor.FileEditor;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.fileEditor.TextEditor;
-import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.StdFileTypes;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupManager;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.util.*;
+import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiField;
import com.intellij.psi.PsiFile;
@@ -73,6 +72,7 @@ import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import org.jetbrains.java.debugger.breakpoints.JavaBreakpointType;
import javax.swing.*;
import java.awt.event.MouseEvent;
@@ -182,14 +182,10 @@ public class BreakpointManager implements JDOMExternalizable {
}
final Document document = editor.getDocument();
final PsiFile psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(document);
- if (psiFile == null) {
- return null;
- }
- final FileType fileType = psiFile.getFileType();
- boolean isInsideCompiledClass = StdFileTypes.CLASS.equals(fileType);
- if (!isInsideCompiledClass && !(DebuggerUtils.supportsJVMDebugging(fileType) || DebuggerUtils.supportsJVMDebugging(psiFile))) {
+ if (!JavaBreakpointType.doCanPutAt(psiFile)) {
return null;
}
+
PsiDocumentManager.getInstance(myProject).commitDocument(document);
int offset = editor.getCaretModel().getOffset();
@@ -205,6 +201,7 @@ public class BreakpointManager implements JDOMExternalizable {
Breakpoint breakpoint = findBreakpoint(document, offset, null);
if (breakpoint == null) {
+ boolean isInsideCompiledClass = StdFileTypes.CLASS.equals(psiFile.getFileType());
if (mostSuitingBreakpoint || isInsideCompiledClass) {
breakpoint = addFieldBreakpoint(document, offset);
if (breakpoint == null) {
@@ -298,7 +295,8 @@ public class BreakpointManager implements JDOMExternalizable {
return;
}
- if (XDebuggerUtil.getInstance().canPutBreakpointAt(myProject, FileDocumentManager.getInstance().getFile(document), line)) {
+ VirtualFile file = FileDocumentManager.getInstance().getFile(document);
+ if (file != null && XDebuggerUtil.getInstance().canPutBreakpointAt(myProject, file, line)) {
return;
}
e.consume();
@@ -346,6 +344,7 @@ public class BreakpointManager implements JDOMExternalizable {
@Override
public void documentChanged(@NotNull final DocumentEvent e) {
final Document document = e.getDocument();
+ //noinspection SynchronizeOnThis
synchronized (BreakpointManager.this) {
List<BreakpointWithHighlighter> breakpoints = myDocumentBreakpoints.get(document);
@@ -374,8 +373,7 @@ public class BreakpointManager implements JDOMExternalizable {
DebuggerInvocationUtil.swingInvokeLater(myProject, new Runnable() {
@Override
public void run() {
- final GutterIconRenderer renderer =
- (GutterIconRenderer)((BreakpointWithHighlighter)breakpoint).getHighlighter().getGutterIconRenderer();
+ final GutterIconRenderer renderer = ((BreakpointWithHighlighter)breakpoint).getHighlighter().getGutterIconRenderer();
if (renderer != null) {
DebuggerSupport.getDebuggerSupport(JavaDebuggerSupport.class).getEditBreakpointAction()
.editBreakpoint(myProject, editor, breakpoint, renderer);
@@ -539,6 +537,7 @@ public class BreakpointManager implements JDOMExternalizable {
for (final Breakpoint breakpoint : getBreakpoints()) {
if (breakpoint instanceof BreakpointWithHighlighter && ((BreakpointWithHighlighter)breakpoint).isAt(document, offset)) {
if (category == null || category.equals(breakpoint.getCategory())) {
+ //noinspection CastConflictsWithInstanceof,unchecked
return (T)breakpoint;
}
}
@@ -662,18 +661,15 @@ public class BreakpointManager implements JDOMExternalizable {
public synchronized void addBreakpoint(Breakpoint breakpoint) {
myBreakpoints.add(breakpoint);
myBreakpointsListForIteration = null;
- if(breakpoint instanceof BreakpointWithHighlighter) {
+ if (breakpoint instanceof BreakpointWithHighlighter) {
BreakpointWithHighlighter breakpointWithHighlighter = (BreakpointWithHighlighter)breakpoint;
Document document = breakpointWithHighlighter.getDocument();
- if(document != null) {
- List<BreakpointWithHighlighter> breakpoints = myDocumentBreakpoints.get(document);
-
- if(breakpoints == null) {
- breakpoints = new ArrayList<BreakpointWithHighlighter>();
- myDocumentBreakpoints.put(document, breakpoints);
- }
- breakpoints.add(breakpointWithHighlighter);
+ List<BreakpointWithHighlighter> breakpoints = myDocumentBreakpoints.get(document);
+ if (breakpoints == null) {
+ breakpoints = new ArrayList<BreakpointWithHighlighter>();
+ myDocumentBreakpoints.put(document, breakpoints);
}
+ breakpoints.add(breakpointWithHighlighter);
}
myDispatcher.getMulticaster().breakpointsChanged();
}
@@ -812,7 +808,7 @@ public class BreakpointManager implements JDOMExternalizable {
/**
* @return breakpoints of one of the category:
- * LINE_BREAKPOINTS, EXCEPTION_BREKPOINTS, FIELD_BREAKPOINTS, METHOD_BREAKPOINTS
+ * LINE_BREAKPOINTS, EXCEPTION_BREAKPOINTS, FIELD_BREAKPOINTS, METHOD_BREAKPOINTS
*/
public <T extends Breakpoint> Breakpoint[] getBreakpoints(@NotNull final Key<T> category) {
ApplicationManager.getApplication().assertIsDispatchThread();
@@ -977,7 +973,6 @@ public class BreakpointManager implements JDOMExternalizable {
public void removeBreakpointManagerListener(@NotNull BreakpointManagerListener listener) {
myDispatcher.removeListener(listener);
}
-
private boolean myAllowMulticasting = true;
private final Alarm myAlarm = new Alarm(Alarm.ThreadToUse.SWING_THREAD);
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java
index 1217e166a4ea..5ed3c1034bc5 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java
@@ -196,6 +196,7 @@ public abstract class BreakpointPropertiesPanel {
public MyTextField() {
}
+ @Override
public String getToolTipText(MouseEvent event) {
reloadClassFilters();
updateClassFilterEditor(false);
@@ -205,6 +206,7 @@ public abstract class BreakpointPropertiesPanel {
return getToolTipText().length() == 0 ? null : toolTipText;
}
+ @Override
public JToolTip createToolTip() {
JToolTip toolTip = new JToolTip(){{
setUI(new MultiLineTooltipUI());
@@ -230,6 +232,7 @@ public abstract class BreakpointPropertiesPanel {
updateSuspendPolicyRbFont();
final ItemListener suspendPolicyChangeListener = new ItemListener() {
+ @Override
public void itemStateChanged(final ItemEvent e) {
final BreakpointDefaults defaults = getBreakpointManager(myProject).getBreakpointDefaults(breakpointCategory);
myMakeDefaultButton.setEnabled(!defaults.getSuspendPolicy().equals(getSelectedSuspendPolicy()) || defaults.isConditionEnabled() != myConditionCheckbox.isSelected());
@@ -251,6 +254,7 @@ public abstract class BreakpointPropertiesPanel {
myConditionCheckbox.addItemListener(suspendPolicyChangeListener);
myMakeDefaultButton.addActionListener(new ActionListener() {
+ @Override
public void actionPerformed(final ActionEvent e) {
final BreakpointManager breakpointManager = getBreakpointManager(myProject);
final String suspendPolicy = getSelectedSuspendPolicy();
@@ -306,6 +310,7 @@ public abstract class BreakpointPropertiesPanel {
myInstanceFiltersField = new FieldPanel(new MyTextField(), "", null,
new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
reloadInstanceFilters();
EditInstanceFiltersDialog _dialog = new EditInstanceFiltersDialog(myProject);
@@ -322,6 +327,7 @@ public abstract class BreakpointPropertiesPanel {
myClassFiltersField = new FieldPanel(new MyTextField(), "", null,
new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
reloadClassFilters();
@@ -365,6 +371,7 @@ public abstract class BreakpointPropertiesPanel {
DebuggerUIUtil.enableEditorOnCheck(myLogExpressionCheckBox, myLogExpressionCombo);
ActionListener updateListener = new ActionListener() {
+ @Override
public void actionPerformed(ActionEvent e) {
updateCheckboxes();
}
@@ -458,6 +465,7 @@ public abstract class BreakpointPropertiesPanel {
ClassFilter classFilter;
if(myBreakpointPsiClass != null) {
classFilter = new ClassFilter() {
+ @Override
public boolean isAccepted(PsiClass aClass) {
return myBreakpointPsiClass == aClass || aClass.isInheritor(myBreakpointPsiClass, true);
}
@@ -641,7 +649,7 @@ public abstract class BreakpointPropertiesPanel {
}
}
- private TextWithImportsImpl emptyText() {
+ private static TextWithImportsImpl emptyText() {
return new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, "");
}
@@ -653,14 +661,14 @@ public abstract class BreakpointPropertiesPanel {
saveMasterBreakpoint();
try {
String text = myPassCountField.getText().trim();
- int count = !"".equals(text)? Integer.parseInt(text) : 0;
- breakpoint.COUNT_FILTER = count;
+ breakpoint.COUNT_FILTER = !text.isEmpty() ? Integer.parseInt(text) : 0;
if (breakpoint.COUNT_FILTER < 0) {
breakpoint.COUNT_FILTER = 0;
}
}
- catch (Exception e) {
+ catch (Exception ignored) {
}
+
breakpoint.COUNT_FILTER_ENABLED = breakpoint.COUNT_FILTER > 0 && myPassCountCheckbox.isSelected();
breakpoint.setCondition(myConditionCombo.getText());
breakpoint.CONDITION_ENABLED = myConditionCheckbox.isSelected();
@@ -867,8 +875,10 @@ public abstract class BreakpointPropertiesPanel {
myDialogTitle = dialogTitle;
}
+ @Override
public void actionPerformed(final ActionEvent e) {
new DialogWrapper(myTargetEditor, true){
+ @Override
public void show() {
setTitle(myDialogTitle);
setModal(true);
@@ -876,10 +886,12 @@ public abstract class BreakpointPropertiesPanel {
super.show();
}
+ @Override
public JComponent getPreferredFocusedComponent() {
return myEditor;
}
+ @Override
@Nullable
protected JComponent createCenterPanel() {
final JPanel panel = new JPanel(new BorderLayout());
@@ -890,6 +902,7 @@ public abstract class BreakpointPropertiesPanel {
return panel;
}
+ @Override
protected void doOKAction() {
myTargetEditor.setText(myEditor.getText());
super.doOKAction();
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/ExceptionBreakpointFactory.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/ExceptionBreakpointFactory.java
index f1742f00ad89..465a96828347 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/ExceptionBreakpointFactory.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/ExceptionBreakpointFactory.java
@@ -19,12 +19,10 @@ import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.DebuggerManagerEx;
import com.intellij.debugger.HelpID;
import com.intellij.debugger.engine.JVMNameUtil;
-import com.intellij.debugger.ui.breakpoints.actions.*;
import com.intellij.icons.AllIcons;
import com.intellij.ide.util.TreeClassChooser;
import com.intellij.ide.util.TreeClassChooserFactory;
import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Key;
import com.intellij.psi.JavaPsiFacade;
import com.intellij.psi.PsiClass;
@@ -72,51 +70,6 @@ public class ExceptionBreakpointFactory extends BreakpointFactory {
return new ExceptionBreakpointPropertiesPanel(project, compact);
}
- @Override
- protected BreakpointPanelAction[] createBreakpointPanelActions(final Project project, DialogWrapper parentDialog) {
- return new BreakpointPanelAction[]{
- new SwitchViewAction(),
- new AddAction(this, project),
- new RemoveAction(project) {
- public void update() {
- super.update();
- if (getButton().isEnabled()) {
- Breakpoint[] selectedBreakpoints = getPanel().getSelectedBreakpoints();
- for (Breakpoint bp : selectedBreakpoints) {
- if (bp instanceof AnyExceptionBreakpoint) {
- getButton().setEnabled(false);
- }
- }
- }
- }
- }, new ToggleGroupByClassesAction(), new ToggleFlattenPackagesAction(),};
- }
-
- public BreakpointPanel createBreakpointPanel(final Project project, final DialogWrapper parentDialog) {
- BreakpointPanel panel =
- new BreakpointPanel(project, createBreakpointPropertiesPanel(project, false), createBreakpointPanelActions(project, parentDialog),
- getBreakpointCategory(), getDisplayName(), getHelpID()) {
- public void resetBreakpoints() {
- super.resetBreakpoints();
- Breakpoint[] breakpoints = getBreakpointManager().getBreakpoints(getBreakpointCategory());
- final AnyExceptionBreakpoint anyExceptionBreakpoint =
- DebuggerManagerEx.getInstanceEx(project).getBreakpointManager().getAnyExceptionBreakpoint();
- boolean found = false;
- for (Breakpoint breakpoint : breakpoints) {
- if (breakpoint.equals(anyExceptionBreakpoint)) {
- found = true;
- break;
- }
- }
- if (!found) {
- insertBreakpointAt(anyExceptionBreakpoint, 0);
- }
- }
- };
- configureBreakpointPanel(panel);
- return panel;
- }
-
public Key<ExceptionBreakpoint> getBreakpointCategory() {
return ExceptionBreakpoint.CATEGORY;
}
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/FieldBreakpointFactory.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/FieldBreakpointFactory.java
index 496e01313621..18d30f74b2d1 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/FieldBreakpointFactory.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/FieldBreakpointFactory.java
@@ -19,11 +19,9 @@ import com.intellij.CommonBundle;
import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.DebuggerManagerEx;
import com.intellij.debugger.HelpID;
-import com.intellij.debugger.ui.breakpoints.actions.*;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.Ref;
@@ -32,7 +30,6 @@ import com.intellij.psi.search.GlobalSearchScope;
import org.jdom.Element;
import javax.swing.*;
-import java.awt.event.ActionEvent;
/**
* @author Eugene Zhuravlev
@@ -71,24 +68,6 @@ public class FieldBreakpointFactory extends BreakpointFactory{
return new FieldBreakpointPropertiesPanel(project, compact);
}
- @Override
- protected BreakpointPanelAction[] createBreakpointPanelActions(final Project project, final DialogWrapper parentDialog) {
- return new BreakpointPanelAction[] {
- new SwitchViewAction(),
- new AddAction(this, project),
- new GotoSourceAction(project) {
- public void actionPerformed(ActionEvent e) {
- super.actionPerformed(e);
- parentDialog.close(DialogWrapper.OK_EXIT_CODE);
- }
- },
- new ViewSourceAction(project),
- new RemoveAction(project),
- new ToggleGroupByClassesAction(),
- new ToggleFlattenPackagesAction(),
- };
- }
-
public Key<FieldBreakpoint> getBreakpointCategory() {
return FieldBreakpoint.CATEGORY;
}
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/JavaBreakpointItem.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/JavaBreakpointItem.java
index 052cfd7f950a..65cbf2d9ee94 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/JavaBreakpointItem.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/JavaBreakpointItem.java
@@ -18,6 +18,7 @@ package com.intellij.debugger.ui.breakpoints;
import com.intellij.debugger.DebuggerManagerEx;
import com.intellij.debugger.SourcePosition;
import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.EmptyRunnable;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.SimpleColoredComponent;
@@ -31,6 +32,7 @@ import javax.swing.*;
class JavaBreakpointItem extends BreakpointItem {
private final Breakpoint myBreakpoint;
private BreakpointFactory myBreakpointFactory;
+ private BreakpointPropertiesPanel myBreakpointPropertiesPanel;
public JavaBreakpointItem(@Nullable BreakpointFactory breakpointFactory, Breakpoint breakpoint) {
myBreakpointFactory = breakpointFactory;
@@ -68,17 +70,19 @@ class JavaBreakpointItem extends BreakpointItem {
@Override
protected void doUpdateDetailView(DetailView panel, boolean editorOnly) {
- BreakpointPropertiesPanel breakpointPropertiesPanel = null;
+ saveState();
+ myBreakpointPropertiesPanel = null;
+
if (!editorOnly) {
- breakpointPropertiesPanel = myBreakpointFactory != null ? myBreakpointFactory
+ myBreakpointPropertiesPanel = myBreakpointFactory != null ? myBreakpointFactory
.createBreakpointPropertiesPanel(myBreakpoint.getProject(), false) : null;
- if (breakpointPropertiesPanel != null) {
- breakpointPropertiesPanel.initFrom(myBreakpoint, true);
+ if (myBreakpointPropertiesPanel != null) {
+ myBreakpointPropertiesPanel.initFrom(myBreakpoint, true);
- breakpointPropertiesPanel.setSaveOnRemove(true);
+ myBreakpointPropertiesPanel.setSaveOnRemove(true);
- final JPanel mainPanel = breakpointPropertiesPanel.getPanel();
+ final JPanel mainPanel = myBreakpointPropertiesPanel.getPanel();
panel.setPropertiesPanel(mainPanel);
}
else {
@@ -93,8 +97,8 @@ class JavaBreakpointItem extends BreakpointItem {
} else {
panel.clearEditor();
}
- if (breakpointPropertiesPanel != null) {
- breakpointPropertiesPanel.setDetailView(panel);
+ if (myBreakpointPropertiesPanel != null) {
+ myBreakpointPropertiesPanel.setDetailView(panel);
}
}
@@ -127,6 +131,11 @@ class JavaBreakpointItem extends BreakpointItem {
}
@Override
+ public void saveState() {
+ myBreakpointPropertiesPanel.saveTo(myBreakpoint, EmptyRunnable.INSTANCE);
+ }
+
+ @Override
public Object getBreakpoint() {
return myBreakpoint;
}
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java
index ae21b113df88..beacd1996b5f 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpoint.java
@@ -24,11 +24,11 @@ import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.DebuggerManagerEx;
import com.intellij.debugger.SourcePosition;
import com.intellij.debugger.actions.ThreadDumpAction;
+import com.intellij.debugger.engine.ContextUtil;
import com.intellij.debugger.engine.DebugProcessImpl;
import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.debugger.engine.evaluation.EvaluationContextImpl;
import com.intellij.debugger.impl.DebuggerUtilsEx;
-import com.intellij.debugger.impl.PositionUtil;
import com.intellij.debugger.jdi.StackFrameProxyImpl;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.application.ApplicationManager;
@@ -82,6 +82,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
super(project, highlighter);
}
+ @Override
protected Icon getDisabledIcon(boolean isMuted) {
final Breakpoint master = DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager().findMasterBreakpoint(this);
if (isMuted) {
@@ -92,6 +93,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
}
}
+ @Override
protected Icon getSetIcon(boolean isMuted) {
if (REMOVE_AFTER_HIT) {
return isMuted ? AllIcons.Debugger.Db_muted_temporary_breakpoint : AllIcons.Debugger.Db_temporary_breakpoint;
@@ -99,10 +101,12 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
return isMuted? AllIcons.Debugger.Db_muted_breakpoint : AllIcons.Debugger.Db_set_breakpoint;
}
+ @Override
protected Icon getInvalidIcon(boolean isMuted) {
return isMuted? AllIcons.Debugger.Db_muted_invalid_breakpoint : AllIcons.Debugger.Db_invalid_breakpoint;
}
+ @Override
protected Icon getVerifiedIcon(boolean isMuted) {
if (REMOVE_AFTER_HIT) {
return isMuted ? AllIcons.Debugger.Db_muted_temporary_breakpoint : AllIcons.Debugger.Db_temporary_breakpoint;
@@ -110,25 +114,30 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
return isMuted? AllIcons.Debugger.Db_muted_verified_breakpoint : AllIcons.Debugger.Db_verified_breakpoint;
}
+ @Override
protected Icon getVerifiedWarningsIcon(boolean isMuted) {
return isMuted? AllIcons.Debugger.Db_muted_verified_warning_breakpoint : AllIcons.Debugger.Db_verified_warning_breakpoint;
}
+ @Override
public Key<LineBreakpoint> getCategory() {
return CATEGORY;
}
+ @Override
protected void reload(PsiFile file) {
super.reload(file);
myMethodName = findMethodName(file, getHighlighter().getStartOffset());
}
+ @Override
protected void createOrWaitPrepare(DebugProcessImpl debugProcess, String classToBeLoaded) {
if (isInScopeOf(debugProcess, classToBeLoaded)) {
super.createOrWaitPrepare(debugProcess, classToBeLoaded);
}
}
+ @Override
protected void createRequestForPreparedClass(final DebugProcessImpl debugProcess, final ReferenceType classType) {
if (!isInScopeOf(debugProcess, classType.name())) {
if (LOG.isDebugEnabled()) {
@@ -137,13 +146,13 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
return;
}
try {
- List<Location> locs = debugProcess.getPositionManager().locationsOfLine(classType, getSourcePosition());
- if (!locs.isEmpty()) {
- for (Location loc : locs) {
+ List<Location> locations = debugProcess.getPositionManager().locationsOfLine(classType, getSourcePosition());
+ if (!locations.isEmpty()) {
+ for (Location loc : locations) {
if (LOG.isDebugEnabled()) {
LOG.debug("Found location [codeIndex=" + loc.codeIndex() +"] for reference type " + classType.name() + " at line " + getLineIndex() + "; isObsolete: " + (debugProcess.getVirtualMachineProxy().versionHigher("1.4") && loc.method().isObsolete()));
}
- BreakpointRequest request = debugProcess.getRequestsManager().createBreakpointRequest(LineBreakpoint.this, loc);
+ BreakpointRequest request = debugProcess.getRequestsManager().createBreakpointRequest(this, loc);
debugProcess.getRequestsManager().enableRequest(request);
if (LOG.isDebugEnabled()) {
LOG.debug("Created breakpoint request for reference type " + classType.name() + " at line " + getLineIndex() + "; codeIndex=" + loc.codeIndex());
@@ -152,7 +161,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
}
else {
// there's no executable code in this class
- debugProcess.getRequestsManager().setInvalid(LineBreakpoint.this, DebuggerBundle.message(
+ debugProcess.getRequestsManager().setInvalid(this, DebuggerBundle.message(
"error.invalid.breakpoint.no.executable.code", (getLineIndex() + 1), classType.name())
);
if (LOG.isDebugEnabled()) {
@@ -176,7 +185,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
if (LOG.isDebugEnabled()) {
LOG.debug("InvalidLineNumberException: " + ex.getMessage());
}
- debugProcess.getRequestsManager().setInvalid(LineBreakpoint.this, DebuggerBundle.message("error.invalid.breakpoint.bad.line.number"));
+ debugProcess.getRequestsManager().setInvalid(this, DebuggerBundle.message("error.invalid.breakpoint.bad.line.number"));
}
catch (InternalException ex) {
LOG.info(ex);
@@ -251,6 +260,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
final int dollarIndex = className.indexOf("$");
final String topLevelClassName = dollarIndex >= 0? className.substring(0, dollarIndex) : className;
return ApplicationManager.getApplication().runReadAction(new Computable<Collection<VirtualFile>>() {
+ @Override
@Nullable
public Collection<VirtualFile> compute() {
final PsiClass[] classes = JavaPsiFacade.getInstance(myProject).findClasses(topLevelClassName, scope);
@@ -292,6 +302,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
});
}
+ @Override
public boolean evaluateCondition(EvaluationContextImpl context, LocatableEvent event) throws EvaluateException {
if(CLASS_FILTERS_ENABLED){
String className = null;
@@ -335,6 +346,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
return getDisplayInfoInternal(false, 30);
}
+ @Override
public String getDisplayName() {
return getDisplayInfoInternal(true, -1);
}
@@ -399,6 +411,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
}
if (file instanceof PsiClassOwner) {
return ApplicationManager.getApplication().runReadAction(new Computable<String>() {
+ @Override
public String compute() {
final PsiMethod method = DebuggerUtilsEx.findPsiMethod(file, offset);
return method != null? method.getName() + "()" : null;
@@ -408,9 +421,10 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
return null;
}
+ @Override
public String getEventMessage(LocatableEvent event) {
final Location location = event.location();
- String sourceName = "Unknown Source";
+ String sourceName;
try {
sourceName = location.sourceName();
}
@@ -452,8 +466,9 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
}
}
+ @Override
public PsiElement getEvaluationElement() {
- return PositionUtil.getContextElement(getSourcePosition());
+ return ContextUtil.getContextElement(getSourcePosition());
}
protected static LineBreakpoint create(Project project, Document document, int lineIndex) {
@@ -471,6 +486,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
return (LineBreakpoint)breakpoint.init();
}
+ @Override
public boolean canMoveTo(SourcePosition position) {
if (!super.canMoveTo(position)) {
return false;
@@ -493,6 +509,7 @@ public class LineBreakpoint extends BreakpointWithHighlighter {
final boolean[] canAdd = new boolean[]{false};
XDebuggerUtil.getInstance().iterateLine(project, document, lineIndex, new Processor<PsiElement>() {
+ @Override
public boolean process(PsiElement element) {
if ((element instanceof PsiWhiteSpace) || (PsiTreeUtil.getParentOfType(element, PsiComment.class, false) != null)) {
return true;
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpointFactory.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpointFactory.java
index dede7de736de..0042074dc798 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpointFactory.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/LineBreakpointFactory.java
@@ -17,29 +17,29 @@ package com.intellij.debugger.ui.breakpoints;
import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.HelpID;
-import com.intellij.debugger.ui.breakpoints.actions.*;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Key;
import org.jdom.Element;
import javax.swing.*;
-import java.awt.event.ActionEvent;
/**
* @author Eugene Zhuravlev
* Date: Apr 26, 2005
*/
public class LineBreakpointFactory extends BreakpointFactory {
+ @Override
public Breakpoint createBreakpoint(Project project, final Element element) {
return new LineBreakpoint(project);
}
+ @Override
public Icon getIcon() {
return AllIcons.Debugger.Db_set_breakpoint;
}
+ @Override
public Icon getDisabledIcon() {
return AllIcons.Debugger.Db_disabled_breakpoint;
}
@@ -60,22 +60,6 @@ public class LineBreakpointFactory extends BreakpointFactory {
}
@Override
- protected BreakpointPanelAction[] createBreakpointPanelActions(Project project, final DialogWrapper parentDialog) {
- return new BreakpointPanelAction[]{new SwitchViewAction(),
- new GotoSourceAction(project) {
- public void actionPerformed(ActionEvent e) {
- super.actionPerformed(e);
- parentDialog.close(DialogWrapper.OK_EXIT_CODE);
- }
- },
- new ViewSourceAction(project),
- new RemoveAction(project),
- new ToggleGroupByMethodsAction(),
- new ToggleGroupByClassesAction(),
- new ToggleFlattenPackagesAction(),
- };
- }
-
public Key<LineBreakpoint> getBreakpointCategory() {
return LineBreakpoint.CATEGORY;
}
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpointFactory.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpointFactory.java
index c2ad3dc3f1be..2574e224efbd 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpointFactory.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpointFactory.java
@@ -18,29 +18,29 @@ package com.intellij.debugger.ui.breakpoints;
import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.DebuggerManagerEx;
import com.intellij.debugger.HelpID;
-import com.intellij.debugger.ui.breakpoints.actions.*;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
-import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Key;
import org.jdom.Element;
import javax.swing.*;
-import java.awt.event.ActionEvent;
/**
* @author Eugene Zhuravlev
* Date: Apr 26, 2005
*/
public class MethodBreakpointFactory extends BreakpointFactory{
+ @Override
public Breakpoint createBreakpoint(Project project, final Element element) {
return element.getAttributeValue(WildcardMethodBreakpoint.JDOM_LABEL) != null? new WildcardMethodBreakpoint(project) : new MethodBreakpoint(project);
}
+ @Override
public Icon getIcon() {
return AllIcons.Debugger.Db_method_breakpoint;
}
+ @Override
public Icon getDisabledIcon() {
return AllIcons.Debugger.Db_disabled_method_breakpoint;
}
@@ -61,29 +61,12 @@ public class MethodBreakpointFactory extends BreakpointFactory{
}
@Override
- protected BreakpointPanelAction[] createBreakpointPanelActions(Project project, final DialogWrapper parentDialog) {
- return new BreakpointPanelAction[]{
- new SwitchViewAction(),
- new AddAction(this, project),
- new GotoSourceAction(project) {
- public void actionPerformed(ActionEvent e) {
- super.actionPerformed(e);
- parentDialog.close(DialogWrapper.OK_EXIT_CODE);
- }
- },
- new ViewSourceAction(project),
- new RemoveAction(project),
- new ToggleGroupByClassesAction(),
- new ToggleFlattenPackagesAction(),
- };
- }
-
- @Override
protected void configureBreakpointPanel(BreakpointPanel panel) {
super.configureBreakpointPanel(panel);
panel.getTree().setGroupByMethods(false);
}
+ @Override
public Key<MethodBreakpoint> getBreakpointCategory() {
return MethodBreakpoint.CATEGORY;
}
@@ -93,6 +76,7 @@ public class MethodBreakpointFactory extends BreakpointFactory{
return true;
}
+ @Override
public WildcardMethodBreakpoint addBreakpoint(Project project) {
AddWildcardBreakpointDialog dialog = new AddWildcardBreakpointDialog(project);
dialog.show();
diff --git a/java/debugger/impl/src/org/jetbrains/java/debugger/JavaDebuggerEditorsProvider.java b/java/debugger/impl/src/org/jetbrains/java/debugger/JavaDebuggerEditorsProvider.java
new file mode 100644
index 000000000000..21cdb36a3a4e
--- /dev/null
+++ b/java/debugger/impl/src/org/jetbrains/java/debugger/JavaDebuggerEditorsProvider.java
@@ -0,0 +1,24 @@
+package org.jetbrains.java.debugger;
+
+import com.intellij.ide.highlighter.JavaFileType;
+import com.intellij.openapi.fileTypes.FileType;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.JavaCodeFragmentFactory;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
+import com.intellij.xdebugger.evaluation.XDebuggerEditorsProviderBase;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+public class JavaDebuggerEditorsProvider extends XDebuggerEditorsProviderBase {
+ @NotNull
+ @Override
+ public FileType getFileType() {
+ return JavaFileType.INSTANCE;
+ }
+
+ @Override
+ protected PsiFile createExpressionCodeFragment(@NotNull Project project, @NotNull String text, @Nullable PsiElement context, boolean isPhysical) {
+ return JavaCodeFragmentFactory.getInstance(project).createExpressionCodeFragment(text, context, null, isPhysical);
+ }
+} \ No newline at end of file
diff --git a/java/debugger/impl/src/org/jetbrains/java/debugger/breakpoints/JavaBreakpointType.java b/java/debugger/impl/src/org/jetbrains/java/debugger/breakpoints/JavaBreakpointType.java
new file mode 100644
index 000000000000..d3e6545cced1
--- /dev/null
+++ b/java/debugger/impl/src/org/jetbrains/java/debugger/breakpoints/JavaBreakpointType.java
@@ -0,0 +1,67 @@
+package org.jetbrains.java.debugger.breakpoints;
+
+import com.intellij.debugger.DebuggerBundle;
+import com.intellij.debugger.engine.DebuggerUtils;
+import com.intellij.facet.FacetManager;
+import com.intellij.openapi.fileTypes.FileType;
+import com.intellij.openapi.fileTypes.StdFileTypes;
+import com.intellij.openapi.module.Module;
+import com.intellij.openapi.module.ModuleUtilCore;
+import com.intellij.openapi.project.Project;
+import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.PsiManager;
+import com.intellij.util.SystemProperties;
+import com.intellij.xdebugger.XDebuggerUtil;
+import com.intellij.xdebugger.breakpoints.XBreakpointProperties;
+import com.intellij.xdebugger.breakpoints.XLineBreakpoint;
+import com.intellij.xdebugger.breakpoints.XLineBreakpointTypeBase;
+import com.intellij.xdebugger.breakpoints.ui.XBreakpointGroupingRule;
+import org.jetbrains.annotations.Contract;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.jetbrains.java.debugger.JavaDebuggerEditorsProvider;
+
+import java.util.List;
+
+public class JavaBreakpointType extends XLineBreakpointTypeBase {
+ public JavaBreakpointType() {
+ super("java", DebuggerBundle.message("java.breakpoint.title"), new JavaDebuggerEditorsProvider());
+ }
+
+ @Override
+ public boolean canPutAt(@NotNull final VirtualFile file, final int line, @NotNull Project project) {
+ if (SystemProperties.getBooleanProperty("java.debugger.xBreakpoint", false)) {
+ boolean result = doCanPutAt(PsiManager.getInstance(project).findFile(file));
+
+ // todo now applicable only if modules has facets, remove this check when java xbreakpoint will work
+ if (result && SystemProperties.getBooleanProperty("java.debugger.xBreakpoint.onlyIfHasFacets", false)) {
+ Module module = ModuleUtilCore.findModuleForFile(file, project);
+ return module != null && FacetManager.getInstance(module).getAllFacets().length > 0;
+ }
+
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isSuspendThreadSupported() {
+ return true;
+ }
+
+ @Override
+ public List<XBreakpointGroupingRule<XLineBreakpoint<XBreakpointProperties>, ?>> getGroupingRules() {
+ return XDebuggerUtil.getInstance().getGroupingByFileRuleAsList();
+ }
+
+ @Contract("null -> false")
+ public static boolean doCanPutAt(@Nullable PsiFile psiFile) {
+ if (psiFile == null) {
+ return false;
+ }
+
+ FileType fileType = psiFile.getFileType();
+ return StdFileTypes.CLASS.equals(fileType) || DebuggerUtils.supportsJVMDebugging(fileType) || DebuggerUtils.supportsJVMDebugging(psiFile);
+ }
+} \ No newline at end of file