summaryrefslogtreecommitdiff
path: root/xml
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-02-27 16:41:16 -0700
committerTor Norbye <tnorbye@google.com>2014-02-27 16:41:38 -0700
commit88f318c9bf709fa5700350636925f2c46d6ae08d (patch)
tree56757c71de659269f7503764264777a3519d402e /xml
parent0ecdb5090b29e51adc5322347bafda41760653ea (diff)
downloadidea-88f318c9bf709fa5700350636925f2c46d6ae08d.tar.gz
Snapshot 34f078c3452e79ba209d28a551962857e0970e5d from idea/134.1342 of git://git.jetbrains.org/idea/community.git
34f078c: WEB-11147 NPM: Upgrade is disabled for package that was selected before it's version was fetched caa3d13: Slim. Parser skipps leading comments and line breaks 7b58b81: IDEA-121215 (Java 1.8: "Interface may be annotated with @FunctionalInterface" inspection should not report @interfaces) 4f97ffe: don't reuse progress indicator in ctrl+mouse handler (EA-53958) 95a36c3: IDEA-121294 Toggling breakpoint with a mouse causes unfolding of a section 583c5a7: IDEA-121301 Setting a breakpoint after navigation to a folded method 245f457: cache jar root path 56ca4df: drop memory usage indicator old style c049454: improve error reporting 72bac20: IDEA-109979 The ability to set breakpoints in the breakpoints edit window f400bdc: CR-IC-4385 move util method to util f6ff78b: notnull 847aa41: cleanup 5bd112a: Marking following plugins as broken NodeJS 134.1276 Php 133.982 Ruby 6.0.0.20140207 Karma 134.1163 JSTestDriver 134.1163 aea523f: Cleanup (deprecated code; formatting) 7d90896: Cleanup (missing delegation) f9371d5: Cleanup (loop invariant; duplicated code) 38269aa: Cleanup (formatting) 7d3368b: java: PsiType documentation corrected f288bdc: Cleanup (pointless null check; formatting) d173a3e: IDEA-46403 Breakpoint on an empty line e0e750e: don't queue breakpoint ui update if nothing changed reuse old CustomizedBreakpointPresentation 0ba4d7e: Gradle description 547cce7: Merge remote-tracking branch 'origin/master' dff66d2: add JDK statistics a90591f: Merge branch 'python-fixes' ae1e6ca: Better error recovery for lines with single 'class' or 'def' keywords and normal functions defined below 10c8b99: support UI state for toggleable selected actions b1dd00f: icon wrapper for selected toggleable actions' icons 8b4df90: re-think and make it usable in PoppedIcon 83f082f: dispose created marker for good a39c3b7: Better error recovery for blocks with missing ':' and non-empty bodies 9b8a6cc: Fixed unmached parentheses in test data 9186334: a test for IDEA-116706 Unselect word at caret doesn't work reversing through lambdarized anonymous class 2cb92f2: fix isEnabledCondition c47a26d: cleanup 60316b6: spelling 4a50ed6: use SmartList 788e5a0: cleanup 628b30a: cleanup 2efcf47: suppress warning 876a793: new test 3f8471c: @Nullable 18f2aee: optimize resolve. In some cases resolve() works faster than resolveGenerics (for example in LiteralClassType) and does not need to infer type parameters which can are needed only after some checks 3f460bc: language level is not @NotNull 37fcda8: simplify code 76d9c82: typo d85d9f7: lazy inference of closure parameters' types some renames and cleanups 7874795: Disable fullscreen for the sheet parent 88a57a0: Merge remote-tracking branch 'origin/master' 7788a2f: PY-12173 Extract Superclass: warn about conflicting names 0fb4704: diff: fix EditSource action description on toolbar feaf1fa: fix double icon in available plugins table c332536: move Sort Installed First to context menu 5ad1016: move Sort by Status to context menu 09bd5b3: Fixed error recovery after empty blocks with no indent 2956e56: PY-12179 Pull up: do not show dialog when there is nothing to pull up 17a06dc: EA-54364 - CCE: SuppressionAnnotationInspectionBase$SuppressionAnnotationVisitor.visitAnnotation 6033fa8: provide type parameter based type with site substitutor to be accepted during type arguments check 2f69c1e: notnull a575173: moved to community b8d01ff: CR-IC-4490 Make EnforcedPlainTextFileTypeManager use only project configurations (fixes IDEA-120941) 84279e1: warn only on method parameters cc9d5bb: IDEA-70465 Multi selection + making it working with live templates 792ea73: WEB-9670 'Surround with Emmet' doesn't work with block selection 1270d02: Live templates and multicaret: stop template at the first variable or end marker 14837f9: Enable multicaret for live templates 6fcc639: IDEA-121193 Don't show 'Class already exists' error if there are two groovy classes with the same qualified name in different modules 6e2687a: CR-IC-4514 @NotNull 2f8c679: cleanup d4e0fec: Merge remote-tracking branch 'origin/master' dd8e7fe: Merge branch 'svn_18_3' 78a3523: restored platform prefix autodetection to fix sql tests 5057388: svn: Fixed NPE in SvnConfiguration - initialize inner state to default value 1c5b685: IDEA-95011 diff: better handling of FilesTooBigForDiffException in merge dialog c599d55: IDEA-121140 Format spock DSL in script body 841e5c6: isRetina fix for headless mode reviewed by kb 685e871: Merge branch 'disable-strings-no-effect' be10b84: Disable 'Statement has no effect' for all string literals (PY-12194) ca00903: use embedded tokes for templates instead of injections #WEB-11115 fixed b671182: Platform: disabled image interpolation on resize in the viewer (IDEA-98635) f48afb5: Merge remote-tracking branch 'origin/master' 151071e: EA-54197 - IAE: HgTagBranchCommand.collectNames 6a669b7: avoid stripping whitespaces on caret lines on document save (IDEA-80056) 28437d6: diff: fix typo a10b616: Merge remote-tracking branch 'origin/master' ea29fa7: Fix incorrect foremost window detection (IDEA-121261). 6e9ac43: Merge branch 'svn_18_3' 9b637e5: for loop -> forEach call chain inspection e967a04: redundant lambda param types: take site subst into account 994eb2c: junit: do not treat config methods as tests (IDEA-121162) 470d4d0: PY-12213 When moving, members should be sorted according to their dependencies 8f75528: enable new DSM legend for retina & darcula 581f3c4: svn: Refactored SvnConfiguration - settings persistence implemented using PersistentStateComponent<State> class (and not using general PersistentStateComponent<Element> class) 1424a3a: svn: Refactored SvnConfiguration - removed SvnSupportOptions class (logic moved to SvnConfiguration itself) 8d03b3a: Merge remote-tracking branch 'origin/master' 7eb7546: DB props: reuse F4 as part of DataSourceElement.navigate() and drop 'Enter' shortcut d22be0b: make CaretModelImpl.setCaretsAndSelection() implementation follow contract of interface method (IDEA-80056) d1752c1: introduce IdeResourcesTestCase: Ultimate & DBE versions c6d8ea2: Merge remote-tracking branch 'origin/master' 1f69774: NPE fix 5fa2055: Merge branch 'python-live-templates' 76d43e8: WEB-9926 remove 0xhh postfix (property name) e9c49a1: Added Python live templates for '__main__', 'for' loops, comprehensions, properties (PY-2378) 5e2bf99: IDEA-121202 Step Into doesn't step into a lambda 1be8e04: IDEA-121057 Multiple Carets: Alt-N works in "whole word" mode if the whole word is initially selected cbbae06: cleanup bean code b865331: Merge remote-tracking branch 'origin/master' 94b34e9: Merge remote-tracking branch 'origin/master' 6e82d2d: Message header wraps long strings now e4bb391: IDEA-121227 latest IJ mac builds: Cannot load JVM bundle in case of Java 1.7 138f7f8: Icons improvement e200179: moved template language setting to the integrated tools 29068e1: png optimization 1686207: Merge branch 'svn_18_3' a2619760: new debug helpers 7e75d80: Mnemonics ff028dd: IDEA-103473 Correctly handle paths different only by case on case insensitive file system during commit - use just paths or specialized api for comparison 1ae54aa: IDEA-121099 Ctrl + Shift + Arrows doesn't work with multiple cursors a578b4a: svn: Use idea home directory as working directory for "move" operation when move paths differ only by case for case insensitive file systems 6aefd30: Resources/Template roots -> Project structure b8abb8f: add @NotNull to CompletionData.objectToLookupItem 75fdf53: don't choke on non-physical classes in resolve (EA-53892 - IAE: ResolveScopeManagerImpl$.compare) 1d44099: EA-54072 - assert: StubBasedPsiElementBase.getNode 38f2c99: EA-54221 - AIOOBE: ImmutableText.charAt a717fce: EA-54222 - NPE: TemplateState.setCurrentVariableNumber 0ecb335: IDEA-118988 completion could add 'value=' in annotation 30a899f: add an explanatory comment to com.intellij.ide.macro.EditorMacro.getColumnNumber e3fde06: use StubIndex.processElements where possible a91570c: CR-IC-4499: deprecate StubIndex.process, satisfy Maxim's sense of beauty 393b67f: tests repaired 968404a: Merge remote-tracking branch 'origin/master' 6ded813: new inference: most specifics, varargs case 89aefc8: new inference: non-wildcard parameterization 8d60b8d: drop secondary carets when entering/exiting column selection mode (IDEA-80056) bda5184: Merge remote-tracking branch 'origin/master' 9d41bae: Animator instead of Swing Timer cddde85: make multi-caret selection with keyboard in column mode work more like old block selection (IDEA-80056) 5601899: Slim formatter started 0826b4a: fix can't read message for IDEA-121207 87ef851: IDEA-121182 Plain text autodetection isn't rerun on file content change bbd2363: notnull 8248670: notnull ca9faaa: notnull 1490fb8: moved back to analysis d2bd356: moved to editor-ui 0b53dbe: IDEA-121220 Focus remains on Document tabs instead of Editor area when tabs switching 34a5343: cleanup 760c3b6: jps plugins to use 1.6 language and bytecode target level e699813: NodeJS 134.1163 isn't compatible with EAP e58ef02: Make EditorToggleColumnMode action work with multiple carets like previously with block selection (IDEA-80056) eb39a65: ensure API backward compatibility 4d26c0a: platform: system notifications reworked 8b2e547: force 1.6 language level for jps-builders ea1e764: Merge remote-tracking branch 'origin/master' 1b50ea2: lambda -> anonym: disable in unexpected context where cast won't help (IDEA-120165) f4e209c: lambda -> anonym: additionally process method calls as they may clash with resulted class methods (IDEA-120469) a745e5a: Merge remote-tracking branch 'origin/master' b178187: continue gutter layout (don't process all console lines to compute max width) e521e77: IDEA-111990 Don't close about on blur 82110ac: 1-to-1 mapping between Caret instances for injected and main editors (IDEA-80056) c074bd2: 1-to-1 mapping between Caret instances for injected and main editors (IDEA-80056) ff01b5b: get rid of duplicated code in editor fixtures (IDEA-80056) 70aaf37: external build: renamed system property to avoid clashes with user-defined properties for Maven resource filtering (ZD-22524) 78fcfe8: Platform: GenericKeymapManager for IDEs other than IDEA 7589de1: IDEA-2870 64721a2: methods usage index uses mappings da6e3d8: leave shift + F11 only for bookmarks in JBuilder keymap ef553f6: IDEA-96651 "Alphabetical order for tabs is ON" warning e796dc6: make myPressPointScreen accessible in processDragFinish f130fdc: Merge remote-tracking branch 'origin/master' ce2d2ec: IDEA-91530 Tab highlighting error when sorted alphabetically 43fdfb2: Spellchecker : IDEA-120568 add gzip (cherry picked from commit 9204f00) 24fbf80: anonym -> lambda: check initializer inside constructor for final fields (IDEA-120698) 44dde64: anonym -> lambda: do not suggest when forward references are detected (IDEA-120699) b716f47: more consistent highlight "type#selector" 7a9bf2a: reject 1.7 varargs hack as 1.8 reject the code again even with target 1.7 2df995f: More extensibility for CoreProjectEnvironment b4eba39: move xml descriptors to the module available from Upsource aa61e88: EA-54181 - NPE: NullableStuffInspectionBase.checkNullableStuffForMethod f64f1ef: do not suggest broken plugins 7a70428: lambda: accept ellipsis parameter when array expected (IDEA-117124) d7d0eec: extract method with new inference 351b9b1: tests left on 1.7 for now 8f7ff5b: wrap with command e0ce9de: testdata f1b256f: forbid lambda in conditional inside cast context 232f8bd: new inference: strict subtyping: skip raw types 828cb5a: new inference: erase return type if unchecked conversion was performed 01b095b: check myDisposed in read action too e29d48f: EA-53239 - UOE: VirtualFileImpl.getChildren 9d2947e: IDEA-121192 Fix query construction and update test 92ac042: RemoteSdkCredentials retrieval extracted from RemoteSdkAdditionalData. 17b78eb: show "native" description for node objects 84aa4e8: we must use case-sensitive natural compare — constants must be first, but our naturalCompare is "buggy", so, we perform manual sort before call platform function 5ef006c: WEB-9926 don't auto expand library scope, we must use case-sensitive natural compare — constants must be first 5ac875b: Correct API version is initialized next time JIRA repository is read from settings 4be43ba: WEB-10887 TypeScript: unexpected error occured when Import clause with immediate export a8c7d79: compact view for installed plugins a216ae3: DBE: manage data sources action cd5c3c9: check there are at least 2 tabs are open for move operations 479f584: move to right and move to down actions 0120c91: Generify to support move to right and move to down actions 1cc06ea: text will be assigned automatically e167ddf: github: fix tests 5a6339b: github: assert -> warning 4edfd8e: remove possible deadlock on network operation in EDT 3d789e3: temporary fix for completion issue (IDEA-80056, EA-54248) c598b17: @TestOnly a23a0a6: diff: do not forget about start offset e17305a: diff: optimise reindexer 0c614ba: IDEA-121031 Plugin Manager: "Update plugin" button does nothing f32b77f: use install icon and fg/bg on update button 48921af: console gutter component should use setAdditionalColumnsCount now (we use editor area) rename outdated historyAnnotation 32209cb: fix About dialog font on Windows 68e033e: IDEA-121138 Tab completion does not work in autopopup 1c21d1d: Platform: empty text accessor for NewErrorTreeViewPanel 8d25634: DBE: customize editor empty-text ad a96ee36: fix case in test data file name 5239b11: add help id e5fe842: better font sizes for Windows and Linux 621a2b3: Git Update tree stays black after switching to Darcula 9d167d2: IDEA-120787 MySQL Comment with Block Comment inside block comment should uncomment; affected for all SelfManagingCommenters 46061a0: introduced REFORMAT_BLOCK_ON_RBRACE property 2d4efe7: project structure dialog: hide library types irrelevant to the current project from 'Global Libraries' -> 'Add' action 9b71864: project structure dialog: hide irrelevant to current module libraries (e.g. JavaScript libraries in Java module) in 'Add Library to dependencies' chooser 1ca73f4: final 3f3e013: simplify ctor 63ec0ea: Merge remote-tracking branch 'origin/master' 17bc69d: added application root to the SDK search path on window (Education Edition attempt) e26dc5b: IDEA-120157 Reformat code ignores keep dependent methods together order 9173579: new DSM legend 26ff86f: typo 06933eb: IDEA-117902 Commit message wrapping behaves strangely adaef15: rearrange checkbox in reformat files dialog moved before "only VCS changed text" e52b01a7: an API to avoid CCEs when doing StubIndex.process d55d2bb: rename physical->eventSystemEnabled to reduce confusion when constructing FileViewProvider f786d1e: IDEA-120066 Auto indent on closing curly brace 7f105db: Compilation fix 57ebb86: Cleanup (interface adapter) 3686918: Merge remote-tracking branch 'origin/master' 41624fb: merged 0f39a4c: method refs: restore error on invalid array creation 07de151: AIOOBE b587af7: exact method refs most specific: void compatibility 527e1de: runSingleTest(Runnable) extracted for parameterized tests 7544243: platform project open processor starts to work as last one, to avoid its interception with SBT / Gradle / Maven / etc (IDEA-121111 ) e37b853: avoid invalid regions ca5b739: check disposed in read action (EA-53960 - assert: ComponentManagerImpl.getPicoContainer) 307a9b9: github: assertion relaxed for tests 19a1516: Cleanup (pointless exceptions dropped; test reformatted) dd456d2: Cleanup (typos) bdf35bd: Cleanup (unneeded cast) 7f5ae7e: Cleanup (formatting) b877311: Cleanup (unneeded test case inheritance) d128928: Cleanup (configuration tests correctly generified and annotated) d9dcac5: Cleanup (typos) 6cc57f8: EA-54183 (CCE: BooleanConstructorInspection$BooleanConstructorFix.doFix) cf00d70: delete old inference strategy for java 8 96af56c: AIOOBE 2f80e7d: new inference: reject partial computation 72c51dc: configurable oneLineInput 7130e5e: cleanup c2a4f0d: IDEA-80056 Column selection mode improvement a5c59c2: github: fix 'open in browser' url 4d7c38f: recover from EA-53754 - IOOBE: CharSequenceSubSequence.<init> (BlockSupportImpl) not only in internal mode 26a4855: hide psiFileFactory fdee766: IDEA-117332 Change signature refactoring should warn about @Contract conflict cc56534: IDEA-118094 smart completion in annotation: allow exclude a3548b0: Fix for focus traversal. 825f767: NPE fix in FormatterTagHandler.getFormatterTag() ac15549: structure view extracted 9739a4d: javadoc 68c3a40: nullable 53b173e: cleanup 1e7bbca: moved to xml-analysis 7693bbc: cleanup 75ca104: notnull cad71fe: notnull e65df65: cleanup b53845b: notnull e5df149: moved to core b4d9fc6: notnull aa5bc16: moved to core 8e38503: notnull 9a997d1: moved to editor-ui a816b5d: moved to editor-ui b1818fc: moved to editor-ui 64b597f: notnull 72e86eb: notnull a4b1105: cleanup 3c9e26a: removed dependency on FileEditorManager 5f12f65: moved to editor 001957a: moved to core 9f26603: moved to editor-ui bc83d33: moved to core 745381b: NotNull 4ef4bad: moved to core ca75131: NPE 4715a42: add file validation on show execution point 09954a9: nodejs doesn't report actual locations after set breakpoint f97c3ae: nullability 78ef38e: cleanup 6033db3: eliminate WebBrowserBase 0ea4a4b: IDEA-80056 Column selection mode improvement 99dab77: IDEA-80056 Column selection mode improvement 65fc838: Merge remote-tracking branch 'origin/master' 3abd020: fixed NPE 33a6a8c: EA-54164 - assert: FileManagerImpl.findFile a97592b: Search for unique names that don't clash with anything in mock SDK 569a8ba: Reset module name index in mock SDK setup for reproducible test results 62db067: Merge branch 'python-fixes' a7e01b8: Don't suggest Python live templates after '.' in qualified names 948ad3e: new inference: ensure type parameters are not modified during ground type evaluation 6a38fba: new inference: avoid current type calculation during conflict resolution for target type detection (IDEA-121052) edf1d19: don't load modules from disabled plugins 019aa0a: unused field 83a5ada: IDEA-117643 use a correct file for searching for binding variables. Complete binding variables in debugger's watch editor 45c7715: duplicated code 7b9be7e: IDEA-117643 don't add parameters for binding variables. Just try to infer them as they are. aeb3292: IDEA-119691 Groovy: References to outer class properties should be resolved to accessors if they exist. Fields are prefferable only inside its containing class (not inside inner classes of the outer class) c41376f: CPP build add0457: Merge branch 'goto-module' 5897600: Changed the visual representation of PyFileImpl to be more Python module-like (PY-6923) bdac622: Added Python modules to 'Navigate to class' and 'Navigate to symbol' results (PY-6923) 6c401b1: Added Python module names index (PY-6923) 751a087: EA-46543 (diagnostic) a91b1d0: Merge remote-tracking branch 'origin/master' 31ea501: grab focus in show all action from interpreter combobox f6be520: remove association if vEnv associated with different project was selected 6df7c8d: Move GroovyImporter back to org.jetbrains.idea.maven.importing , bacause it used from some plugins. 69b7118: WebBrowserManager API post review e051d7a: looks like there are a lot of clients assuming default JTable scrollable viewport size (450x400) 8111501: diff: fix action name 8c6f416: IDEA-121050 diff: fix typo 644139e: IDEA-120993 diff: fix diff range calculation in case of newline at the beginning of file 41921f7: diff: rename action 6be4951: diff: add generics 7458f32: github: add assertion 04d6c56: diff: do not fail completely on by-word comparison of two extremely big lines 997c1b2: diff: ask to show content of equal files 74153c9: diff: @Nullable b285dea: diff: do not call read action to access to local read-only document 7058ea2: IDEA-80056 Column selection mode improvement fe84447: IDEA-80056 Column selection mode improvement 24763b6: IDEA-121074 Make JIRA remote API version undefined only on actual URL change 964fcf5: java 8: final and default/static in interfaces d2c3b4b: more specific inference: do not compare functional types if both methods were generic e42ff74: testdata for IDEA-120992 217a1fd: new inference: address anonymous classes (IDEA-121063) 0f023fa: testdata for IDEA-121055 6900ca8: IDEA-121077 Fix JQL query construction in JIRA connector d2513fa: java: wrong method used 9fd2a22: groovy: not-so-fast performance test excluded from the suite 6c6ac37: java: ability to skip slow tests f2ed5a6: Cleanup (platform tests moved to platform) 9c85eb9: Cleanup (dead code; readability; typos; annotations) 0799e8b: Cleanup (common class extracted) 815bba3: pass project to psi file factory 00f817a: LanguageConsoleImpl is not intended to be extended 0b90dc8: add todo note 2c034c0: implement ConsoleJavaScriptInspectionFilter a38c63c: new inference: isAcceptable for method reference a4deb4d: new inference: isAcceptable for lambda de7f053: new inference: do not accept varargs when array is passed there 9fc4b68: new inference: take into account site substitutors during additional constraints gathering 6a5b57d: dispose previous root model when changing to a new one without events 751ec20: save one volatile read on each charAt in editor 5349f1e: language console: revert "disable DaemonCodeAnalyzer " db3a3d6: Fixed incorrect YesNoCancel behaviour, html in message is handled properly now, size of text in the message is taken into account, esc works properly, better message width and height calculation based on the text area and number of buttons in the message. c582c37: fix offset calculation remove incorrect call — it is right gutter responsibility 406255c: update notifications about not installed pip/setuptools fb25259: js repl: setOneLineMode true (will be or not moved as platform default after discussion) 3996201: disable DaemonCodeAnalyzer for console editor — the same as EditorTextField does +review 74f1397: fixing compiler storage data integrity for certain cases when classes are moved between modules 9491e6d: IDEA-120625 Save file as template 1a50247: IDEA-116706 Unselect word at caret doesn't work reversing through lambdarized anonymous class 374e421: IDEA-76185 Macro: $SelectionStartColumn$ and $SelectionEndColumn$ external tools macros count tabs as expanded spaces 4e1ae10: PathMacroMap: add clarifying comments about by-reference string comparison 3510a84: setAdditionalLinesCount = 1 0d4ce76: don't set setRightMarginShown twice — ConsoleViewUtil is enough a51adfb: LanguageConsoleImpl is not intended to be extended b792a8c: cleanup bcaeaeb: cleanup bbae05d: deprecate createActions — LanguageConsoleImpl is not intended to be extended (actually, it is not used in our code, but we keep method to ensure backward compatibility) 752e268: cleanup 0dbe448: add isEmptyCommandExecutionAllowed, by default true ec8a5d2: IDEA-80056 Column selection mode improvement 83550bf: Merge remote-tracking branch 'origin/master' f85aa38: IDEA-120866 Improve usability of 'Uninstall old version(s)' step ffd542c: CR-IC-4381#c22616 62acb09: Show error message when disable broken plugin. 5a79c28: CR-IC-4381#CFR-71852 90e7243: CR-IC-4381#CFR-71852 a5f7dd7: accidentally committed — revert 3437a1e: optimize imports on project: exception fixed, removed unused method invocation 638f8f1: don't setup delegating color scheme twice — ConsoleViewUtil is enough +review d785cf6: @NotNull 55e67f6: don't execute empty command 5febcfe: isEmptyOrSpaces accepts CharSequence +review 2610e6c: cleanup 5a83918: deprecate setTextToEditor 975ad62: overrides c76c841: Merge branch 'master' of git.labs.intellij.net:idea/community 8bd736a: show all in project interpreter combobox regardless virtualenv association 4518cf9: Merge remote-tracking branch 'origin/master' ce073a75: PY-12196 Members moving refactoring should handle dependencies b353744: IDEA-120038 - Redesing Git cloud frameworks UI - upload SSH key from account dbe4736: WEB-11067 Karma Plugin broken because of missing intellijCli Node module 3fb9b1a: fix layout (IDEA-121036) 61bac55: Add "JSTestDriver Plugin" plugin to brokenPlugins.txt 9583062: Postfix completion: do not show 'enable template in autopopup' checkbox if show.template.in.completion.list is enabled e896024: Postfix completion: apply throw template on Throwable only 79e95dc: Postfix completion: do not apply null, notnull and instanceof template on primitive types 4ddf754: Postfix completion: extract condition constant 1ae8c8c: notnull/nullable f124013: NPE fix dc27b12: Add SBT plugin to brokenPlugins.txt 406ebb4: Do not store virtual files in map that is never cleared for IDEA-120732 (Throwable at com.intellij.cvsSupport2.actions.IgnoreFileAction$1.run) 0cfd079: make final 68a8f15: fix CR-PY-5915 5d124b0: fix method isn|'t implemented: com.intellij.execution.console.ProcessBackedConsoleExecuteActionHandler com.intellij.execution.runners.AbstractConsoleRunnerWithHistory#createConsoleExecuteActionHandler() (in Pythonid:3.1.1.134.1462) 52ac45a: deprecate finishExecution() ce1c1a4: don't expose createConsoleExecAction c524fb2: cleanup 3ab1740: Merge remote-tracking branch 'origin/master' cd937d1: better class naming 709bbc0: better class naming c6ad195: Merge branch 'python-fixes' 4a5c63e: add MarkupModelListener.Adapter ff1625e: cleanup 8af73b7: Don't resolve to file-level '__metaclass__' in PyClass.getMetaClassExpression() (PY-12127) abd4c25: IDEA-80056 Column selection mode improvement 14d837e: IDEA-120526 Groovy: Inline super.call() 7065641: IDEA-120979 Static method call in instance context 970da58: fix contracts 4fdbc8c: IDEA-120885: complete 'as' keyword in appropriate place 8342f32: fix JsDebugConfigurationConverterTest 993f8c1: Test fix; cleanup (formatting) 987d9d4: IDEA-120931 Threads tree in "Debugger" pane displays incorrect thread name 9db0214: IDEA-120994 Debugger: tooltip on multiline string value - no need to escape quote characters ef685df: test fixed cd39c84: remote templates 3582560: Merge remote-tracking branch 'origin/master' 7de9df1: fixes according code review 59b76f6: suppressed for tests 6a696ee: create project from template: radio button replaced with checkbox 9e8ad70: IDEA-80056 Column selection mode improvement c1073f8: CR-IC-4035 aa2ed97: Add jira to build in community b11d66e: new inference: method refs: do not include containing class type params in inference bac3191: new inferencve: do not apply substitution twice for additional constraints 2a16fd1: new inference: lambda functional type detection 3093e7e: testdata fixed 97b25c1: BaseProgramRunner must be internal 68eb92a: EA-54083 (diagnostic) 0bff0b9: ProcessBackedExecutionEnabledCondition must not be public (and originally was not intended, but we keep backward compatibility) 1b0e049: cleanup 16ae520: ConsoleExecuteActionHandler renamed to ProcessBackedConsoleExecuteActionHandler, keep backward compatibility b7f131a: ConsoleExecuteActionHandler renamed to ProcessBackedConsoleExecuteActionHandler 415bd34: ConsoleExecuteActionHandler renamed to ProcessBackedConsoleExecuteActionHandler 78a6a8b: remove ruby variant of ConsoleExecuteAction — platform implementation is enough simplification — ConsoleExecuteActionHandler could be also as Condition (we must rename this class to ProcessBackedConsoleExecuteActionHandler — todo) 0912938: cleanup dec28d2: revert unfinished changes 9495ef2: IDEA-119396 (be picky about unfinished annotated new array expressions) ead0734: Cleanup (test moved to platform) 3f5ed3f: IDEA-120952 0850b33: Merge remote-tracking branch 'origin/master' 3e4618e: Modify test to attempt to set required initial state, if it's wrong c068d8e: Fix build due to moved jira module. eda25d0: Add missing module to layout.gant 9781b1d: IDEA-119819 (Cannot suppress warnings for inspection "Unnecessary unicode escape sequence") f1f14d5: use setRightMarginShown instead of nullify color +review 8d11adf: overrides 718ee80: IDEA-80056 Column selection mode improvement 62ec1ba: js repl: editor ask us to paint line 4-6, but we should draw line for line 3 (startLine - 1) also, otherwise it will be not rendered fix layout 30e3163: Taking into account Oracle bug 8019291 it is better do not set this property for this transient window than see strange decorations on the transient window. c814d70: do not embed js into "on" prefixed unknown attributes 3886bc2: Set location of splash screen basing on the current screen device. f56d570: CR-IC-4445 show whole table by default if it's inside scrollpane 821a6c3: js repl: fix layout 76637d3: LicenseDialog: tuning. LoadingDecorator: rollback eb161bf: Merge remote-tracking branch 'origin/master' 0c27db7: removed over logging, not informative messages from updater logger. 6abf38a: IDEA-80056 Column selection mode improvement ed0dc5c: Merge remote-tracking branch 'origin/master' fbafcac: fixed PY-12186 Project interpreter: not able to select element in appeared settings menu 22da9d4: Updating file properties -> Initializing file system cache (IDEA-115130) 567602b: IDEA-120976 'Complete' work is mentioned 3 times in a simple sentence 4392d23: reverted 089d059: updater: patch applier made tolerant to missing log dir parameter 1305416: zebra-mode enabled e024d71: WEB-11069 unexpected vertical scrollbar in Bower integration; Review CR-WS-326 d1af527: IDEA-83657 Can't find text in files under .idea 1d9e5df: walk non-indexed files when searching for whole words (IDEA-120648) 09450b1: make go to declaration shortcut also work on console hyperlinks (IDEA-120911) bfdc9c9: js repl: draw line separators using range marker highlighter e66c805: EditorEx returns MarkupModelEx (the same as DocumentEx) +review 8efac81: nullability, consistent parameter name a94a51e: IDEA-120054: Maven: war: non-filtered resource is not copied to output 99ca505: restore clicking on console hyperlinks f3e9a1e: IDEA-112815 (IDEA does not ignore directories specified in .cvsignore) 85db4a5: use balloon instead of error dialog 713c3d9: cache large leaf element text strings 2f36f24: enable show.live.templates.in.completion by default 16dab5a: IDEA-120911 follow link by keyboard 396d5ec: advance bomb d0e3130: add jira to tasks plugin 96c8508: remove excessive templates cbee5a3: clarification 44b16d0: Cleanup (manifest inspections .html files) 54bfa05: new inference: lift also unknown vars (IDEA-117530) 88d220f: new inference: cleanup from eliminateWildcards e104084: new inference: cleanup checkFunctionalType 1563225: new inference: cleanup from eliminateWildcards c0f1310: new inference: accept null = Object constraint 1b0e87f: java 8: allow to cast to intersection types d22feaa: meaningful toString bd681be: new inference: 18.5.2 adjustments 6103980: bound promotion for super wildcard (? super A (bound extends A) == A) a91c7f7: bound promotion for super wildcard (? super A (bound extends A) == A) f3bbc7a: new inference: cleanup 15740a3: new inference: cls copy replacement 4ba1e5f: NPE 1a5e473: AIOOBE c5d0b16: new inference: debug 555b8b3: new inference: 2 phase resolution 19ba9d8: new inference: resolve 694432f: new inference: capture conversions in return types initial; variable dependencies 758fa4a: rearrange on multiple files continues if no rearranger found for one of them 3e8ca79: IDEA-34877 (CVS: check whether the new-added file name exists in .cvsignore and don't prompt to add it) & IDEA-120736 (CVS: don't prompt to add new-created files ignored using IgnoredFiles list) 10a58c5: Cleanup (extra write action) 1c8930c: Cleanup (double commit) 4f1c289: License Dialog: windows tuning. cleanup a77da47: LicenseDialog: JetProfile assets choice & proceed c83ed1d: Merge branch 'svn_18_3' a472d35: svn: Optimized IdeaCommitHandler - track deleted files only if required (corresponding parameter is set) 045a753: Display conflicts if destination class already has some member 31c7494: let's start async cache update for EAP 342cf54: Merge branch 'svn_18_3' fbf5d55: js repl: in/out markers done cf9ace3: svn: Do not check repository protocol (just working copy format) when determining which implementation (SVNKit or command line) should be used for commit operation ff65c9f: platform: safe project model modification 93b33a3: svn: Refactored SvnCheckinEnvironment - utilize IdeaCommitHandler as event handler for SVNKit commit flow 45cf910: move prepareExecuteAction to LanguageConsoleImpl instance 06062ed: Retina support + no dialog resize (just image clip) 65531b1: fix test data 894d4bb: remove duplicated code — DocumentUtil.writeInRunUndoTransparentAction effd774: svn: Refactored SvnCheckinEnvironment - use common client factory model for file status detection c725668: Make BaseRepositoryImpl initialize HTTP client lazily on network settings updates 4af031a: svn: Refactored SvnCheckinEnvironment - not null, code simplifications, methods extracted, warnings fixes 81e72d4: + gruntfile 343a277: revert IDEA-120811 3e991eb: deprecate addCurrentToHistory, cleanup b22e89b: continue LanguageConsoleBuilder.registerExecuteAction — don't force client to know low-level details, cleanup NewSshConsole 3936b51: add LanguageConsoleBuilder.registerExecuteAction — This API doesn't look good, but it is much better than force client to know low-level details 50318ce: IDEA-120906 NPE at com.intellij.ide.util.projectWizard.SdkSettingsStep.<init> 4524244: Slightly update message in "Option" tab of YouTrack repository editor cdfd4d0: IDEA-116229 (Invalid Warning: Contents of array 'longs' are written to, but never read) 17dcc98: IDEA-120799 (Quick-fix for "Unnecessary parentheses" changes expression semantics) 0ced324: IDEA-120904 Debugger UI: watch variable text field is shown when debug tool window is hidden 5ed18af: Merge remote-tracking branch 'origin/master' 7d1d9c8: fixed PY-12185 Project interpreter: strange combobox size in settings 7039d82: store 'export to html' settings in workspace.xml instead of shared misc.xml (IDEA-96348) a3a8fa7: Merge remote-tracking branch 'origin/master' 817df93: Merge remote-tracking branch 'origin/master' 5c95f86: another fix for PY-12186 Project interpreter: not able to select element in appeared settings menu 0c1316c: Merge remote-tracking branch 'origin/master' ee07119: show word variants in custom file type completion autopopup f5e8ce0: PathMacroMap: add clarifying comments about by-reference string comparison f1ac105: use common ExceptionUtil 89e9ca0: do not loose type args on ratianalize static calls (IDEA-120767) c7b78f7: IDEA-120784 "Class is public should be declared in a file named <Classname>.java" for inner interface 65642d9: IDEA-118305 github: try to fix GH:E specific bug ada3f52: Merge remote-tracking branch 'origin/master' 3a9eef6: speed search 071a9d5: cleanup 2108e56: fix for PY-12186 Project interpreter: not able to select element in appeared settings menu 11069dc1: Merge remote-tracking branch 'origin/master' 6ec4b86: fixed PY-12184 Project Interpreter: Throwable at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.execute 08f79dc: diff: do not try to create empty LineFragment f0eed8c: IDEA-80056 Column selection mode improvement eec124a: IDEA-80056 Column selection mode improvement 81adc91: IDEA-120834 Same-class methods should be preferred over static imports 1ae2a82: IDEA-118234 Groovy 2.3: type inference of SAM-closure parameters d0507fc: IDEA-120595 Restore compatibility with JIRA < 4.2. Return support of JIRA SOAP API. Move all JIRA related classes to dedicated module 0fcb597: Add tests for CertificatesManager. Disable them for now, because SNI related patch in httpclient works only on Oracle JRE 1.7+ 3355e94: Update Apache HttpClient to 4.3.2 due to fix of HTTPCLIENT-1119 b2d5f76: svn: Refactored AbstractUpdateIntegrateCrawler - remove unnecessary SVNUpdateClient creation e266021: svn: Refactored GatheringChangelistBuilder - make inherit EmptyChangelistBuilder, renames, optimizations f042e76: svn: Refactored GatheringChangelistBuilder - use common client factory model to get svn properties (instead of direct SVNWCClient usage) 300839e: svn: Refactored GatheringChangelistBuilder - code simplifications, notnull, removed unused code 17b7bfa: svn: Make SvnKitBrowseClient not pass to handler separate entry for root folder (at which list() method was executed) - to have consistent behaviour for both CmdBrowseClient and SvnKitBrowseClient c4e1a04f: svn: Implemented correct element name and relative path calculation for CmdBrowseClient 4d8ae08: svn: Refactored SvnChangeList - use common client factory model (instead of direct SVNLogClient usage) 05913e6: svn: Refactored SvnUtil.createUrl - make it throw SvnBindException (instead of SVNException) 8a44f01: svn: Refactored SvnChangeList - SVNRepository usages replaced with "svn info" command a66c80b: svn: Refactored SvnChangeList - method extractions, code simplifications 56ca50d: svn: Ensure repository relative path is used in SvnChangeList logic (logic was broken and full path was returned after changes in commit 42c824) 58f70a1: svn: Refactored RemoteRevisionsNumberCache - code simplifications, warnings fixes 24e95a4: svn: Refactored SvnCommandLineInfoClient - code simplifications, warnings fixes 87bcdbd: svn: Refactored SvnChangeList - removed duplication, simplified code flow Change-Id: I25aae09c68ce6c702066c108dae46d17c32e2709
Diffstat (limited to 'xml')
-rw-r--r--xml/dom-impl/src/com/intellij/util/xml/impl/DomManagerImpl.java12
-rw-r--r--xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureTreeElement.java4
-rw-r--r--xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewBuilder.java6
-rw-r--r--xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewTreeModel.java24
-rw-r--r--xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomElementClassIndex.java21
-rw-r--r--xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java17
-rw-r--r--xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/InsertRequiredAttributeFix.java35
-rw-r--r--xml/impl/src/com/intellij/codeInsight/template/emmet/SurroundWithEmmetAction.java28
-rw-r--r--xml/impl/src/com/intellij/codeInsight/template/emmet/ZenCodingTemplate.java38
-rw-r--r--xml/impl/src/com/intellij/codeInspection/XmlQuickFixFactoryImpl.java5
-rw-r--r--xml/impl/src/com/intellij/ide/browsers/ConfigurableWebBrowser.java39
-rw-r--r--xml/impl/src/com/intellij/ide/browsers/WebBrowserBase.java69
-rw-r--r--xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java31
-rw-r--r--xml/impl/src/com/intellij/psi/impl/source/html/HtmlScriptLanguageInjector.java11
-rw-r--r--xml/impl/src/com/intellij/psi/impl/source/html/TemplateHtmlScriptContentProvider.java25
-rw-r--r--xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeManipulator.java10
-rw-r--r--xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java10
-rw-r--r--xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlProcessingInstructionManipulator.java5
-rw-r--r--xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTagManipulator.java9
-rw-r--r--xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTextManipulator.java10
-rw-r--r--xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTokenManipulator.java6
-rw-r--r--xml/impl/xml.iml1
-rw-r--r--xml/openapi/xml-openapi.iml2
-rw-r--r--xml/relaxng/src/org/intellij/plugins/relaxNG/RncFileReferenceManipulator.java22
-rw-r--r--xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java20
-rw-r--r--xml/tests/src/com/intellij/xml/structureView/HtmlFileStructureTest.java19
-rw-r--r--xml/xml-analysis-api/src/com/intellij/codeInspection/XmlQuickFixFactory.java5
-rw-r--r--xml/xml-analysis-api/src/com/intellij/xml/XmlTagRuleProvider.java (renamed from xml/openapi/src/com/intellij/xml/XmlTagRuleProvider.java)4
-rw-r--r--xml/xml-analysis-impl/src/com/intellij/xml/util/TagSetRuleProvider.java (renamed from xml/impl/src/com/intellij/xml/util/TagSetRuleProvider.java)2
-rw-r--r--xml/xml-analysis-impl/src/com/intellij/xml/util/XmlTagRuleProviderBase.java (renamed from xml/impl/src/com/intellij/xml/util/XmlTagRuleProviderBase.java)16
-rw-r--r--xml/xml-psi-api/src/com/intellij/psi/xml/XmlAttribute.java3
-rw-r--r--xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParser.java7
-rw-r--r--xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParserDefinition.java4
-rw-r--r--xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java11
-rw-r--r--xml/xml-psi-impl/src/com/intellij/psi/impl/source/html/HtmlEmbeddedContentImpl.java71
-rw-r--r--xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlAttributeImpl.java25
-rw-r--r--xml/xml-psi-impl/src/com/intellij/psi/xml/XmlElementType.java26
-rw-r--r--xml/xml-psi-impl/src/com/intellij/xml/util/IncludedXmlAttribute.java16
-rw-r--r--xml/xml-psi-impl/src/com/intellij/xml/util/documentation/HtmlDescriptorsTable.java2
-rw-r--r--xml/xml-psi-impl/src/com/intellij/xml/util/documentation/html5table.xml (renamed from xml/impl/src/com/intellij/xml/util/documentation/html5table.xml)0
-rw-r--r--xml/xml-psi-impl/src/com/intellij/xml/util/documentation/htmltable.xml (renamed from xml/impl/src/com/intellij/xml/util/documentation/htmltable.xml)0
-rw-r--r--xml/xml-psi-impl/src/com/intellij/xml/util/documentation/mathmltable.xml (renamed from xml/impl/src/com/intellij/xml/util/documentation/mathmltable.xml)0
-rw-r--r--xml/xml-psi-impl/src/com/intellij/xml/util/documentation/svgtable.xml (renamed from xml/impl/src/com/intellij/xml/util/documentation/svgtable.xml)0
-rw-r--r--xml/xml-structure-view-api/src/com/intellij/ide/structureView/xml/XmlStructureViewBuilderProvider.java (renamed from xml/openapi/src/com/intellij/ide/structureView/xml/XmlStructureViewBuilderProvider.java)2
-rw-r--r--xml/xml-structure-view-api/src/com/intellij/ide/structureView/xml/XmlStructureViewElementProvider.java (renamed from xml/openapi/src/com/intellij/ide/structureView/xml/XmlStructureViewElementProvider.java)2
-rw-r--r--xml/xml-structure-view-api/xml-structure-view-api.iml15
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/AbstractXmlTagTreeElement.java (renamed from xml/impl/src/com/intellij/ide/structureView/impl/xml/AbstractXmlTagTreeElement.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/DtdFileTreeElement.java (renamed from xml/impl/src/com/intellij/ide/structureView/impl/xml/DtdFileTreeElement.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlFileTreeElement.java (renamed from xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlFileTreeElement.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlStructureViewTreeModel.java (renamed from xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlStructureViewTreeModel.java)23
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlTagTreeElement.java (renamed from xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlTagTreeElement.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/dtd/DtdStructureViewBuilderFactory.java (renamed from xml/impl/src/com/intellij/lang/dtd/DtdStructureViewBuilderFactory.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionTreeElement.java (renamed from xml/impl/src/com/intellij/lang/html/structureView/Html5SectionTreeElement.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionsNodeProvider.java (renamed from xml/impl/src/com/intellij/lang/html/structureView/Html5SectionsNodeProvider.java)21
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionsProcessor.java (renamed from xml/impl/src/com/intellij/lang/html/structureView/Html5SectionsProcessor.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlFileTreeElement.java (renamed from xml/impl/src/com/intellij/lang/html/structureView/HtmlFileTreeElement.java)6
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlStructureViewBuilderProvider.java (renamed from xml/impl/src/com/intellij/lang/html/structureView/HtmlStructureViewBuilderProvider.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlStructureViewTreeModel.java (renamed from xml/impl/src/com/intellij/lang/html/structureView/HtmlStructureViewTreeModel.java)12
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlTagTreeElement.java (renamed from xml/impl/src/com/intellij/lang/html/structureView/HtmlTagTreeElement.java)2
-rw-r--r--xml/xml-structure-view-impl/src/com/intellij/lang/xml/XmlStructureViewBuilderFactory.java (renamed from xml/impl/src/com/intellij/lang/xml/XmlStructureViewBuilderFactory.java)2
-rw-r--r--xml/xml-structure-view-impl/xml-structure-view-impl.iml16
61 files changed, 498 insertions, 290 deletions
diff --git a/xml/dom-impl/src/com/intellij/util/xml/impl/DomManagerImpl.java b/xml/dom-impl/src/com/intellij/util/xml/impl/DomManagerImpl.java
index b9a93e147291..bef39afea905 100644
--- a/xml/dom-impl/src/com/intellij/util/xml/impl/DomManagerImpl.java
+++ b/xml/dom-impl/src/com/intellij/util/xml/impl/DomManagerImpl.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.
@@ -126,17 +126,17 @@ public final class DomManagerImpl extends DomManager {
final VirtualFileAdapter listener = new VirtualFileAdapter() {
private final List<DomEvent> myDeletionEvents = new SmartList<DomEvent>();
- public void contentsChanged(VirtualFileEvent event) {
+ public void contentsChanged(@NotNull VirtualFileEvent event) {
if (event.isFromSave()) return;
processVfsChange(event.getFile());
}
- public void fileCreated(VirtualFileEvent event) {
+ public void fileCreated(@NotNull VirtualFileEvent event) {
processVfsChange(event.getFile());
}
- public void beforeFileDeletion(final VirtualFileEvent event) {
+ public void beforeFileDeletion(@NotNull final VirtualFileEvent event) {
if (!myProject.isDisposed()) {
beforeFileDeletion(event.getFile());
}
@@ -158,7 +158,7 @@ public final class DomManagerImpl extends DomManager {
}
}
- public void fileDeleted(VirtualFileEvent event) {
+ public void fileDeleted(@NotNull VirtualFileEvent event) {
if (!myDeletionEvents.isEmpty()) {
if (!myProject.isDisposed()) {
for (DomEvent domEvent : myDeletionEvents) {
@@ -169,7 +169,7 @@ public final class DomManagerImpl extends DomManager {
}
}
- public void propertyChanged(VirtualFilePropertyEvent event) {
+ public void propertyChanged(@NotNull VirtualFilePropertyEvent event) {
final VirtualFile file = event.getFile();
if (!file.isDirectory() && VirtualFile.PROP_NAME.equals(event.getPropertyName())) {
processVfsChange(file);
diff --git a/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureTreeElement.java b/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureTreeElement.java
index 4794cf59fb2a..548276faf5e9 100644
--- a/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureTreeElement.java
+++ b/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureTreeElement.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.
@@ -52,10 +52,12 @@ public class DomStructureTreeElement implements StructureViewTreeElement, ItemPr
return myElement.isValid() ? myElement.getXmlElement() : null;
}
+ @NotNull
public ItemPresentation getPresentation() {
return this;
}
+ @NotNull
public TreeElement[] getChildren() {
if (!myElement.isValid()) return EMPTY_ARRAY;
final ArrayList<TreeElement> result = new ArrayList<TreeElement>();
diff --git a/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewBuilder.java b/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewBuilder.java
index a8fb409e7c2a..0b86f4365492 100644
--- a/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewBuilder.java
+++ b/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewBuilder.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.
@@ -59,8 +59,8 @@ public class DomStructureViewBuilder extends TreeBasedStructureViewBuilder {
@Override
@NotNull
- public StructureView createStructureView(final FileEditor fileEditor, final Project project) {
- return new StructureViewComponent(fileEditor, createStructureViewModel(fileEditor instanceof TextEditor ? ((TextEditor)fileEditor).getEditor() : null), project) {
+ public StructureView createStructureView(final FileEditor fileEditor, @NotNull final Project project) {
+ return new StructureViewComponent(fileEditor, createStructureViewModel(fileEditor instanceof TextEditor ? ((TextEditor)fileEditor).getEditor() : null), project, true) {
@Override
public AsyncResult<AbstractTreeNode> expandPathToElement(final Object element) {
if (element instanceof XmlElement) {
diff --git a/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewTreeModel.java b/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewTreeModel.java
index bb5b01b008f4..d7fd6d50a4e5 100644
--- a/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewTreeModel.java
+++ b/xml/dom-impl/src/com/intellij/util/xml/structure/DomStructureViewTreeModel.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.
@@ -19,10 +19,8 @@ package com.intellij.util.xml.structure;
import com.intellij.ide.structureView.StructureViewTreeElement;
import com.intellij.ide.structureView.impl.xml.XmlFileTreeElement;
import com.intellij.ide.structureView.impl.xml.XmlStructureViewTreeModel;
-import com.intellij.ide.util.treeView.smartTree.Sorter;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.editor.Editor;
-import com.intellij.psi.PsiFile;
import com.intellij.psi.xml.XmlFile;
import com.intellij.util.Function;
import com.intellij.util.xml.*;
@@ -33,20 +31,18 @@ import org.jetbrains.annotations.Nullable;
* @author Gregory.Shrago
*/
public class DomStructureViewTreeModel extends XmlStructureViewTreeModel implements Disposable {
- private final XmlFile myFile;
private final DomElementNavigationProvider myNavigationProvider;
private final Function<DomElement, DomService.StructureViewMode> myDescriptor;
- public DomStructureViewTreeModel(final XmlFile file, final Function<DomElement, DomService.StructureViewMode> descriptor, @Nullable Editor editor) {
+ public DomStructureViewTreeModel(@NotNull XmlFile file, @NotNull Function<DomElement, DomService.StructureViewMode> descriptor, @Nullable Editor editor) {
this(file, DomElementsNavigationManager.getManager(file.getProject()).getDomElementsNavigateProvider(DomElementsNavigationManager.DEFAULT_PROVIDER_NAME), descriptor, editor);
}
- public DomStructureViewTreeModel(final XmlFile file,
+ public DomStructureViewTreeModel(@NotNull XmlFile file,
final DomElementNavigationProvider navigationProvider,
- final Function<DomElement, DomService.StructureViewMode> descriptor,
+ @NotNull Function<DomElement, DomService.StructureViewMode> descriptor,
@Nullable Editor editor) {
super(file, editor);
- myFile = file;
myNavigationProvider = navigationProvider;
myDescriptor = descriptor;
}
@@ -54,6 +50,7 @@ public class DomStructureViewTreeModel extends XmlStructureViewTreeModel impleme
@Override
@NotNull
public StructureViewTreeElement getRoot() {
+ XmlFile myFile = getPsiFile();
final DomFileElement<DomElement> fileElement = DomManager.getDomManager(myFile.getProject()).getFileElement(myFile, DomElement.class);
return fileElement == null?
new XmlFileTreeElement(myFile) :
@@ -63,15 +60,4 @@ public class DomStructureViewTreeModel extends XmlStructureViewTreeModel impleme
protected DomElementNavigationProvider getNavigationProvider() {
return myNavigationProvider;
}
-
- @Override
- @NotNull
- public Sorter[] getSorters() {
- return new Sorter[]{Sorter.ALPHA_SORTER};
- }
-
- @Override
- protected PsiFile getPsiFile() {
- return myFile;
- }
}
diff --git a/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomElementClassIndex.java b/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomElementClassIndex.java
index 321626b9de4d..c36d684c936e 100644
--- a/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomElementClassIndex.java
+++ b/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomElementClassIndex.java
@@ -52,16 +52,17 @@ public class DomElementClassIndex extends StringStubIndexExtension<PsiFile> {
CommonProcessors.FindFirstProcessor<? super PsiFile> processor =
new CommonProcessors.FindFirstProcessor<PsiFile>();
- StubIndex.getInstance().process(KEY, clazzName,
- domFileElement.getFile().getProject(),
- GlobalSearchScope.fileScope(domFileElement.getFile()),
- new IdFilter() {
- @Override
- public boolean containsFileId(int id) {
- return id == virtualFileId;
- }
- },
- processor
+ StubIndex.getInstance().processElements(KEY, clazzName,
+ domFileElement.getFile().getProject(),
+ GlobalSearchScope.fileScope(domFileElement.getFile()),
+ new IdFilter() {
+ @Override
+ public boolean containsFileId(int id) {
+ return id == virtualFileId;
+ }
+ },
+ PsiFile.class,
+ processor
);
return processor.isFound();
diff --git a/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java b/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java
index d1ba5945f056..7b1b42c14219 100644
--- a/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java
+++ b/xml/dom-impl/src/com/intellij/util/xml/stubs/index/DomNamespaceKeyIndex.java
@@ -46,18 +46,19 @@ public class DomNamespaceKeyIndex extends StringStubIndexExtension<PsiFile> {
final int virtualFileId = ((VirtualFileWithId)file).getId();
CommonProcessors.FindFirstProcessor<PsiFile> processor = new CommonProcessors.FindFirstProcessor<PsiFile>();
- StubIndex.getInstance().process(
+ StubIndex.getInstance().processElements(
KEY,
namespaceKey,
domFileElement.getFile().getProject(),
GlobalSearchScope.fileScope(domFileElement.getFile()),
- new IdFilter() {
- @Override
- public boolean containsFileId(int id) {
- return id == virtualFileId;
- }
- },
- processor
+ new IdFilter() {
+ @Override
+ public boolean containsFileId(int id) {
+ return id == virtualFileId;
+ }
+ },
+ PsiFile.class,
+ processor
);
return processor.isFound();
}
diff --git a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/InsertRequiredAttributeFix.java b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/InsertRequiredAttributeFix.java
index 06f71c74c5b3..1a4a5842443d 100644
--- a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/InsertRequiredAttributeFix.java
+++ b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/InsertRequiredAttributeFix.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,12 +18,10 @@ package com.intellij.codeInsight.daemon.impl.analysis;
import com.intellij.codeInsight.FileModificationService;
import com.intellij.codeInsight.daemon.XmlErrorMessages;
import com.intellij.codeInsight.intention.HighPriorityAction;
-import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.lookup.LookupElementBuilder;
import com.intellij.codeInsight.template.*;
-import com.intellij.codeInspection.LocalQuickFix;
-import com.intellij.codeInspection.ProblemDescriptor;
+import com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;
import com.intellij.lang.ASTNode;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.CommandProcessor;
@@ -39,20 +37,20 @@ import com.intellij.xml.XmlElementDescriptor;
import com.intellij.xml.XmlExtension;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* User: anna
* Date: 18-Nov-2005
*/
-public class InsertRequiredAttributeFix implements IntentionAction, LocalQuickFix, HighPriorityAction {
- private final XmlTag myTag;
+public class InsertRequiredAttributeFix extends LocalQuickFixAndIntentionActionOnPsiElement implements HighPriorityAction {
private final String myAttrName;
private final String[] myValues;
@NonNls
private static final String NAME_TEMPLATE_VARIABLE = "name";
public InsertRequiredAttributeFix(@NotNull XmlTag tag, @NotNull String attrName,@NotNull String... values) {
- myTag = tag;
+ super(tag);
myAttrName = attrName;
myValues = values;
}
@@ -65,29 +63,18 @@ public class InsertRequiredAttributeFix implements IntentionAction, LocalQuickFi
@Override
@NotNull
- public String getName() {
- return getText();
- }
-
- @Override
- @NotNull
public String getFamilyName() {
return XmlErrorMessages.message("insert.required.attribute.quickfix.family");
}
@Override
- public void applyFix(@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) {
- invoke(project, null, myTag.getContainingFile());
- }
-
- @Override
- public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
- return myTag.isValid();
- }
-
- @Override
- public void invoke(@NotNull final Project project, final Editor editor, PsiFile file) {
+ public void invoke(@NotNull final Project project,
+ @NotNull PsiFile file,
+ @Nullable("is null when called from inspection") final Editor editor,
+ @NotNull PsiElement startElement,
+ @NotNull PsiElement endElement) {
if (!FileModificationService.getInstance().prepareFileForWrite(file)) return;
+ XmlTag myTag = (XmlTag)startElement;
ASTNode treeElement = SourceTreeToPsiMap.psiElementToTree(myTag);
final XmlElementDescriptor descriptor = myTag.getDescriptor();
diff --git a/xml/impl/src/com/intellij/codeInsight/template/emmet/SurroundWithEmmetAction.java b/xml/impl/src/com/intellij/codeInsight/template/emmet/SurroundWithEmmetAction.java
index 4ba881666bc1..4817aeabb791 100644
--- a/xml/impl/src/com/intellij/codeInsight/template/emmet/SurroundWithEmmetAction.java
+++ b/xml/impl/src/com/intellij/codeInsight/template/emmet/SurroundWithEmmetAction.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.
@@ -19,19 +19,17 @@ import com.intellij.application.options.emmet.EmmetOptions;
import com.intellij.codeInsight.CodeInsightActionHandler;
import com.intellij.codeInsight.actions.BaseCodeInsightAction;
import com.intellij.codeInsight.hint.HintManager;
-import com.intellij.codeInsight.template.CustomTemplateCallback;
+import com.intellij.codeInsight.template.CustomLiveTemplate;
+import com.intellij.codeInsight.template.impl.WrapWithCustomTemplateAction;
import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.SelectionModel;
-import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project;
-import com.intellij.openapi.vfs.ReadonlyStatusHandler;
-import com.intellij.openapi.vfs.VirtualFile;
-import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
+import java.util.Collections;
+
public class SurroundWithEmmetAction extends BaseCodeInsightAction {
public SurroundWithEmmetAction() {
setEnabledInModalContext(true);
@@ -56,19 +54,9 @@ public class SurroundWithEmmetAction extends BaseCodeInsightAction {
selectionModel.selectLineAtCaret();
}
- final Document document = editor.getDocument();
- final VirtualFile virtualFile = FileDocumentManager.getInstance().getFile(document);
- if (virtualFile != null) {
- ReadonlyStatusHandler.getInstance(project).ensureFilesWritable(virtualFile);
- }
-
- String selection = editor.getSelectionModel().getSelectedText();
-
- final ZenCodingTemplate template = new ZenCodingTemplate();
- if (selection != null && template.isApplicable(file, editor.getCaretModel().getOffset(), true)) {
- selection = selection.trim();
- PsiDocumentManager.getInstance(project).commitAllDocuments();
- template.wrap(selection, new CustomTemplateCallback(editor, file, true));
+ ZenCodingTemplate emmetCustomTemplate = CustomLiveTemplate.EP_NAME.findExtension(ZenCodingTemplate.class);
+ if (emmetCustomTemplate != null) {
+ new WrapWithCustomTemplateAction(emmetCustomTemplate, editor, file, Collections.<Character>emptySet()).actionPerformed(null);
}
else if (!ApplicationManager.getApplication().isUnitTestMode()) {
HintManager.getInstance().showErrorHint(editor, "Cannot invoke Surround with Emmet in the current context");
diff --git a/xml/impl/src/com/intellij/codeInsight/template/emmet/ZenCodingTemplate.java b/xml/impl/src/com/intellij/codeInsight/template/emmet/ZenCodingTemplate.java
index f4284e465f40..39cf1ed094e6 100644
--- a/xml/impl/src/com/intellij/codeInsight/template/emmet/ZenCodingTemplate.java
+++ b/xml/impl/src/com/intellij/codeInsight/template/emmet/ZenCodingTemplate.java
@@ -34,9 +34,7 @@ import com.intellij.ide.util.PropertiesComponent;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.editor.Editor;
-import com.intellij.openapi.editor.EditorModificationUtil;
-import com.intellij.openapi.editor.ScrollType;
+import com.intellij.openapi.editor.*;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.ui.popup.JBPopupListener;
@@ -318,7 +316,7 @@ public class ZenCodingTemplate extends CustomLiveTemplateBase {
case KeyEvent.VK_ENTER:
final String abbreviation = field.getText();
if (validateTemplateKey(field, balloon, abbreviation, callback)) {
- doWrap(selection, abbreviation, callback);
+ doWrap(abbreviation, callback);
PropertiesComponent.getInstance().setValue(EMMET_LAST_WRAP_ABBREVIATIONS_KEY, abbreviation);
field.addCurrentTextToHistory();
balloon.hide(true);
@@ -402,24 +400,32 @@ public class ZenCodingTemplate extends CustomLiveTemplateBase {
return applicableGenerator != null && applicableGenerator.isEnabled() && applicableGenerator.hasCompletionItem();
}
- public static void doWrap(final String selection, final String abbreviation, final CustomTemplateCallback callback) {
+ public static void doWrap(@NotNull final String abbreviation, @NotNull final CustomTemplateCallback callback) {
final ZenCodingGenerator defaultGenerator = findApplicableDefaultGenerator(callback.getContext(), true);
assert defaultGenerator != null;
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
CommandProcessor.getInstance().executeCommand(callback.getProject(), new Runnable() {
public void run() {
- callback.fixInitialState(true);
- ZenCodingNode node = parse(abbreviation, callback, defaultGenerator, selection);
- assert node != null;
- PsiElement context = callback.getContext();
- ZenCodingGenerator generator = findApplicableGenerator(node, context, true);
- List<ZenCodingFilter> filters = getFilters(node, context);
-
- EditorModificationUtil.deleteSelectedText(callback.getEditor());
- PsiDocumentManager.getInstance(callback.getProject()).commitAllDocuments();
-
- expand(node, generator, filters, selection, callback, true);
+ callback.getEditor().getCaretModel().runForEachCaret(new CaretAction() {
+ public void perform(Caret caret) {
+ callback.fixInitialState(true);
+ String selectedText = callback.getEditor().getSelectionModel().getSelectedText();
+ if (selectedText != null) {
+ String selection = selectedText.trim();
+ ZenCodingNode node = parse(abbreviation, callback, defaultGenerator, selection);
+ assert node != null;
+ PsiElement context = callback.getContext();
+ ZenCodingGenerator generator = findApplicableGenerator(node, context, true);
+ List<ZenCodingFilter> filters = getFilters(node, context);
+
+ EditorModificationUtil.deleteSelectedText(callback.getEditor());
+ PsiDocumentManager.getInstance(callback.getProject()).commitAllDocuments();
+
+ expand(node, generator, filters, selection, callback, true);
+ }
+ }
+ });
}
}, CodeInsightBundle.message("insert.code.template.command"), null);
}
diff --git a/xml/impl/src/com/intellij/codeInspection/XmlQuickFixFactoryImpl.java b/xml/impl/src/com/intellij/codeInspection/XmlQuickFixFactoryImpl.java
index 8065ebf5221f..c095bd1cf49f 100644
--- a/xml/impl/src/com/intellij/codeInspection/XmlQuickFixFactoryImpl.java
+++ b/xml/impl/src/com/intellij/codeInspection/XmlQuickFixFactoryImpl.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.
@@ -17,7 +17,6 @@ package com.intellij.codeInspection;
import com.intellij.codeInsight.daemon.impl.analysis.CreateNSDeclarationIntentionFix;
import com.intellij.codeInsight.daemon.impl.analysis.InsertRequiredAttributeFix;
-import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.psi.PsiElement;
import com.intellij.psi.xml.XmlTag;
import com.intellij.psi.xml.XmlToken;
@@ -27,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
public class XmlQuickFixFactoryImpl extends XmlQuickFixFactory {
@NotNull
@Override
- public IntentionAction insertRequiredAttributeFix(@NotNull XmlTag tag, @NotNull String attrName, @NotNull String... values) {
+ public LocalQuickFixAndIntentionActionOnPsiElement insertRequiredAttributeFix(@NotNull XmlTag tag, @NotNull String attrName, @NotNull String... values) {
return new InsertRequiredAttributeFix(tag, attrName, values);
}
diff --git a/xml/impl/src/com/intellij/ide/browsers/ConfigurableWebBrowser.java b/xml/impl/src/com/intellij/ide/browsers/ConfigurableWebBrowser.java
index d15c59d28581..7cae777e4163 100644
--- a/xml/impl/src/com/intellij/ide/browsers/ConfigurableWebBrowser.java
+++ b/xml/impl/src/com/intellij/ide/browsers/ConfigurableWebBrowser.java
@@ -1,6 +1,7 @@
package com.intellij.ide.browsers;
import com.intellij.icons.AllIcons;
+import com.intellij.ide.IdeBundle;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.PathUtil;
@@ -10,7 +11,10 @@ import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.util.UUID;
-final class ConfigurableWebBrowser extends WebBrowserBase {
+final class ConfigurableWebBrowser extends WebBrowser {
+ private final UUID id;
+ @NotNull private BrowserFamily family;
+ @NotNull private String name;
private boolean active;
private String path;
@@ -31,7 +35,9 @@ final class ConfigurableWebBrowser extends WebBrowserBase {
@Nullable String path,
boolean active,
@Nullable BrowserSpecificSettings specificSettings) {
- super(id, family, name);
+ this.id = id;
+ this.family = family;
+ this.name = name;
this.path = StringUtil.nullize(path);
this.active = active;
@@ -120,4 +126,33 @@ final class ConfigurableWebBrowser extends WebBrowserBase {
public int hashCode() {
return getId().hashCode();
}
+
+ @Override
+ @NotNull
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ @NotNull
+ public final UUID getId() {
+ return id;
+ }
+
+ @Override
+ @NotNull
+ public BrowserFamily getFamily() {
+ return family;
+ }
+
+ @Override
+ @NotNull
+ public String getBrowserNotFoundMessage() {
+ return IdeBundle.message("error.0.browser.path.not.specified", getName());
+ }
+
+ @Override
+ public String toString() {
+ return getName() + " (" + getPath() + ")";
+ }
} \ No newline at end of file
diff --git a/xml/impl/src/com/intellij/ide/browsers/WebBrowserBase.java b/xml/impl/src/com/intellij/ide/browsers/WebBrowserBase.java
deleted file mode 100644
index af7ff95ec08e..000000000000
--- a/xml/impl/src/com/intellij/ide/browsers/WebBrowserBase.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2000-2014 JetBrains s.r.o.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.intellij.ide.browsers;
-
-import com.intellij.ide.IdeBundle;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.UUID;
-
-public abstract class WebBrowserBase extends WebBrowser {
- protected @NotNull BrowserFamily family;
- protected @NotNull String name;
- private final UUID id;
-
- protected WebBrowserBase(@NotNull UUID id, @NotNull BrowserFamily family, @NotNull String name) {
- this.id = id;
- this.family = family;
- this.name = name;
- }
-
- @Override
- @NotNull
- public String getName() {
- return name;
- }
-
- @Override
- @NotNull
- public final UUID getId() {
- return id;
- }
-
- @Override
- @NotNull
- public BrowserFamily getFamily() {
- return family;
- }
-
- @Override
- @NotNull
- public String getBrowserNotFoundMessage() {
- return IdeBundle.message("error.0.browser.path.not.specified", getName());
- }
-
- @Override
- @Nullable
- public BrowserSpecificSettings getSpecificSettings() {
- return null;
- }
-
- @Override
- public String toString() {
- return getName() + " (" + getPath() + ")";
- }
-} \ No newline at end of file
diff --git a/xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java b/xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java
index 8b8b60a11e06..7800d8821778 100644
--- a/xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java
+++ b/xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java
@@ -40,7 +40,8 @@ public class WebBrowserManager implements PersistentStateComponent<Element>, Mod
// default standard browser ID must be constant across all IDE versions on all machines for all users
private static final UUID DEFAULT_CHROME_ID = UUID.fromString("98CA6316-2F89-46D9-A9E5-FA9E2B0625B3");
- private static final UUID DEFAULT_FIREFOX_ID = UUID.fromString("A7BB68E0-33C0-4D6F-A81A-AAC1FDB870C8");
+ // public, but only internal use
+ public static final UUID DEFAULT_FIREFOX_ID = UUID.fromString("A7BB68E0-33C0-4D6F-A81A-AAC1FDB870C8");
private static final UUID DEFAULT_SAFARI_ID = UUID.fromString("E5120D43-2C3F-47EF-9F26-65E539E05186");
private static final UUID DEFAULT_OPERA_ID = UUID.fromString("53E2F627-B1A7-4DFA-BFA7-5B83CC034776");
private static final UUID DEFAULT_EXPLORER_ID = UUID.fromString("16BF23D4-93E0-4FFC-BFD6-CB13575177B0");
@@ -304,17 +305,19 @@ public class WebBrowserManager implements PersistentStateComponent<Element>, Mod
}
@Nullable
- public WebBrowser findBrowserById(@Nullable String idOrName) {
- if (StringUtil.isEmpty(idOrName)) {
+ /**
+ * @param idOrFamilyName UUID or, due to backward compatibility, browser family name or JS debugger engine ID
+ */
+ public WebBrowser findBrowserById(@Nullable String idOrFamilyName) {
+ if (StringUtil.isEmpty(idOrFamilyName)) {
return null;
}
- UUID id = parseUuid(idOrName);
+ UUID id = parseUuid(idOrFamilyName);
if (id == null) {
for (ConfigurableWebBrowser browser : browsers) {
- if (browser.getName().equals(idOrName) ||
- browser.getFamily().name().equalsIgnoreCase(idOrName) ||
- browser.getFamily().getName().equalsIgnoreCase(idOrName)) {
+ if (browser.getFamily().name().equalsIgnoreCase(idOrFamilyName) ||
+ browser.getFamily().getName().equalsIgnoreCase(idOrFamilyName)) {
return browser;
}
}
@@ -330,14 +333,16 @@ public class WebBrowserManager implements PersistentStateComponent<Element>, Mod
}
@NotNull
+ @Deprecated
+ /**
+ * @deprecated Use {@link #getFirstBrowser(BrowserFamily)}
+ */
public WebBrowser getBrowser(@NotNull BrowserFamily family) {
- WebBrowser browser = findBrowser(family);
- LOG.assertTrue(browser != null, "Must be at least one browser per family");
- return browser;
+ return getFirstBrowser(family);
}
- @Nullable
- public WebBrowser findBrowser(@NotNull BrowserFamily family) {
+ @NotNull
+ public WebBrowser getFirstBrowser(@NotNull BrowserFamily family) {
for (ConfigurableWebBrowser browser : browsers) {
if (browser.isActive() && family.equals(browser.getFamily())) {
return browser;
@@ -350,7 +355,7 @@ public class WebBrowserManager implements PersistentStateComponent<Element>, Mod
}
}
- return null;
+ throw new IllegalStateException("Must be at least one browser per family");
}
public boolean isActive(@NotNull WebBrowser browser) {
diff --git a/xml/impl/src/com/intellij/psi/impl/source/html/HtmlScriptLanguageInjector.java b/xml/impl/src/com/intellij/psi/impl/source/html/HtmlScriptLanguageInjector.java
index ccde7d31801a..aeb08c970057 100644
--- a/xml/impl/src/com/intellij/psi/impl/source/html/HtmlScriptLanguageInjector.java
+++ b/xml/impl/src/com/intellij/psi/impl/source/html/HtmlScriptLanguageInjector.java
@@ -44,16 +44,7 @@ public class HtmlScriptLanguageInjector implements MultiHostInjector {
}
String mimeType = scriptTag.getAttributeValue("type");
Collection<Language> languages = Language.findInstancesByMimeType(mimeType);
- Language language;
- if (!languages.isEmpty()) {
- language = languages.iterator().next();
- }
- else if (mimeType != null && mimeType.contains("template")) {
- language = StdLanguages.HTML;
- }
- else {
- language = StdLanguages.TEXT;
- }
+ Language language = !languages.isEmpty() ? languages.iterator().next() : StdLanguages.TEXT;
if (LanguageUtil.isInjectableLanguage(language)) {
registrar
.startInjecting(language)
diff --git a/xml/impl/src/com/intellij/psi/impl/source/html/TemplateHtmlScriptContentProvider.java b/xml/impl/src/com/intellij/psi/impl/source/html/TemplateHtmlScriptContentProvider.java
new file mode 100644
index 000000000000..8f4e49203482
--- /dev/null
+++ b/xml/impl/src/com/intellij/psi/impl/source/html/TemplateHtmlScriptContentProvider.java
@@ -0,0 +1,25 @@
+package com.intellij.psi.impl.source.html;
+
+import com.intellij.ide.highlighter.HtmlFileType;
+import com.intellij.lang.HtmlScriptContentProvider;
+import com.intellij.lexer.HtmlHighlightingLexer;
+import com.intellij.lexer.Lexer;
+import com.intellij.psi.tree.IElementType;
+import com.intellij.psi.xml.XmlElementType;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * @author Dennis.Ushakov
+ */
+public class TemplateHtmlScriptContentProvider implements HtmlScriptContentProvider {
+ @Override
+ public IElementType getScriptElementType() {
+ return XmlElementType.HTML_EMBEDDED_CONTENT;
+ }
+
+ @Nullable
+ @Override
+ public Lexer getHighlightingLexer() {
+ return new HtmlHighlightingLexer(HtmlFileType.INSTANCE);
+ }
+}
diff --git a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeManipulator.java b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeManipulator.java
index 92135dd7e3da..f39f160047e6 100644
--- a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeManipulator.java
+++ b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeManipulator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import com.intellij.psi.xml.XmlAttribute;
import com.intellij.psi.xml.XmlAttributeValue;
import com.intellij.psi.xml.XmlChildRole;
import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NotNull;
/**
* @author Gregory.Shrago
@@ -33,7 +34,8 @@ public class XmlAttributeManipulator extends AbstractElementManipulator<XmlAttri
private static final Logger LOG = Logger.getInstance(XmlAttributeManipulator.class);
- public XmlAttribute handleContentChange(XmlAttribute attribute, TextRange range, String newContent) throws IncorrectOperationException {
+ @Override
+ public XmlAttribute handleContentChange(@NotNull XmlAttribute attribute, @NotNull TextRange range, String newContent) throws IncorrectOperationException {
String attr = attribute.getText();
ASTNode astNode = XmlChildRole.ATTRIBUTE_NAME_FINDER.findChild(attribute.getNode());
assert astNode != null;
@@ -66,7 +68,9 @@ public class XmlAttributeManipulator extends AbstractElementManipulator<XmlAttri
return attribute;
}
- public TextRange getRangeInElement(final XmlAttribute attribute) {
+ @Override
+ @NotNull
+ public TextRange getRangeInElement(@NotNull final XmlAttribute attribute) {
final XmlAttributeValue value = attribute.getValueElement();
if (value == null) return TextRange.from(0, 0);
TextRange range = attribute.getValueTextRange();
diff --git a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java
index b819c0bbbc21..a32b51f5fc3f 100644
--- a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java
+++ b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.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.
@@ -30,6 +30,7 @@ import com.intellij.psi.xml.XmlAttributeValue;
import com.intellij.psi.xml.XmlTokenType;
import com.intellij.util.CharTable;
import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NotNull;
/**
* Created by IntelliJ IDEA.
@@ -41,7 +42,8 @@ import com.intellij.util.IncorrectOperationException;
public class XmlAttributeValueManipulator extends AbstractElementManipulator<XmlAttributeValue> {
private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.source.resolve.reference.impl.manipulators.XmlAttributeValueManipulator");
- public XmlAttributeValue handleContentChange(XmlAttributeValue element, TextRange range, String newContent) throws IncorrectOperationException {
+ @Override
+ public XmlAttributeValue handleContentChange(@NotNull XmlAttributeValue element, @NotNull TextRange range, String newContent) throws IncorrectOperationException {
return handleContentChange(element, range, newContent, XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN);
}
@@ -73,7 +75,9 @@ public class XmlAttributeValueManipulator extends AbstractElementManipulator<Xml
return element;
}
- public TextRange getRangeInElement(final XmlAttributeValue xmlAttributeValue) {
+ @Override
+ @NotNull
+ public TextRange getRangeInElement(@NotNull final XmlAttributeValue xmlAttributeValue) {
final PsiElement child = xmlAttributeValue.getFirstChild();
if (child == null) {
return TextRange.EMPTY_RANGE;
diff --git a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlProcessingInstructionManipulator.java b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlProcessingInstructionManipulator.java
index 5c59a32d9502..61149c5db6ef 100644
--- a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlProcessingInstructionManipulator.java
+++ b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlProcessingInstructionManipulator.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.
@@ -20,6 +20,7 @@ import com.intellij.psi.AbstractElementManipulator;
import com.intellij.psi.xml.XmlProcessingInstruction;
import com.intellij.psi.xml.XmlTokenType;
import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NotNull;
/**
* User: anna
@@ -28,7 +29,7 @@ import com.intellij.util.IncorrectOperationException;
public class XmlProcessingInstructionManipulator extends AbstractElementManipulator<XmlProcessingInstruction> {
@Override
- public XmlProcessingInstruction handleContentChange(XmlProcessingInstruction element, TextRange range, String newContent) throws IncorrectOperationException {
+ public XmlProcessingInstruction handleContentChange(@NotNull XmlProcessingInstruction element, @NotNull TextRange range, String newContent) throws IncorrectOperationException {
return XmlAttributeValueManipulator.handleContentChange(element, range, newContent, XmlTokenType.XML_TAG_CHARACTERS);
}
}
diff --git a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTagManipulator.java b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTagManipulator.java
index cc6201e62f98..a1419c57733c 100644
--- a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTagManipulator.java
+++ b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTagManipulator.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.
@@ -28,7 +28,8 @@ import org.jetbrains.annotations.NotNull;
*/
public class XmlTagManipulator extends AbstractElementManipulator<XmlTag> {
- public XmlTag handleContentChange(XmlTag tag, TextRange range, String newContent) throws IncorrectOperationException {
+ @Override
+ public XmlTag handleContentChange(@NotNull XmlTag tag, @NotNull TextRange range, String newContent) throws IncorrectOperationException {
final StringBuilder replacement = new StringBuilder( tag.getValue().getText() );
final int valueOffset = tag.getValue().getTextRange().getStartOffset() - tag.getTextOffset();
@@ -42,7 +43,9 @@ public class XmlTagManipulator extends AbstractElementManipulator<XmlTag> {
return tag;
}
- public TextRange getRangeInElement(final XmlTag tag) {
+ @Override
+ @NotNull
+ public TextRange getRangeInElement(@NotNull final XmlTag tag) {
if (tag.getSubTags().length > 0) {
// Text range in tag with subtags is not supported, return empty range, consider making this function nullable.
return TextRange.EMPTY_RANGE;
diff --git a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTextManipulator.java b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTextManipulator.java
index cb7297db97d5..de4f9eb6cbc7 100644
--- a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTextManipulator.java
+++ b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTextManipulator.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.
@@ -21,13 +21,15 @@ import com.intellij.openapi.util.TextRange;
import com.intellij.psi.AbstractElementManipulator;
import com.intellij.psi.xml.XmlText;
import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NotNull;
/**
* @author Gregory.Shrago
*/
public class XmlTextManipulator extends AbstractElementManipulator<XmlText> {
- public XmlText handleContentChange(XmlText text, TextRange range, String newContent) throws IncorrectOperationException {
+ @Override
+ public XmlText handleContentChange(@NotNull XmlText text, @NotNull TextRange range, String newContent) throws IncorrectOperationException {
final String newValue;
final String value = text.getValue();
if (range.equals(getRangeInElement(text))) {
@@ -52,7 +54,9 @@ public class XmlTextManipulator extends AbstractElementManipulator<XmlText> {
return text;
}
- public TextRange getRangeInElement(final XmlText text) {
+ @Override
+ @NotNull
+ public TextRange getRangeInElement(@NotNull final XmlText text) {
return getValueRange(text);
}
diff --git a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTokenManipulator.java b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTokenManipulator.java
index e21796ab9fc7..1ce8eb17aeca 100644
--- a/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTokenManipulator.java
+++ b/xml/impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlTokenManipulator.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.
@@ -24,12 +24,14 @@ import com.intellij.psi.impl.source.tree.LeafElement;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.xml.XmlToken;
import com.intellij.util.IncorrectOperationException;
+import org.jetbrains.annotations.NotNull;
/**
* @author ven
*/
public class XmlTokenManipulator extends AbstractElementManipulator<XmlToken> {
- public XmlToken handleContentChange(XmlToken xmlToken, TextRange range, String newContent) throws IncorrectOperationException {
+ @Override
+ public XmlToken handleContentChange(@NotNull XmlToken xmlToken, @NotNull TextRange range, String newContent) throws IncorrectOperationException {
String oldText = xmlToken.getText();
String newText = oldText.substring(0, range.getStartOffset()) + newContent + oldText.substring(range.getEndOffset());
IElementType tokenType = xmlToken.getTokenType();
diff --git a/xml/impl/xml.iml b/xml/impl/xml.iml
index 20135bdba460..2fda30d0d4af 100644
--- a/xml/impl/xml.iml
+++ b/xml/impl/xml.iml
@@ -20,6 +20,7 @@
<orderEntry type="module" module-name="xml-psi-impl" exported="" />
<orderEntry type="module" module-name="xml-analysis-impl" exported="" />
<orderEntry type="library" name="swingx" level="project" />
+ <orderEntry type="module" module-name="xml-structure-view-impl" exported="" />
</component>
<component name="copyright">
<Base>
diff --git a/xml/openapi/xml-openapi.iml b/xml/openapi/xml-openapi.iml
index 934360bb80c9..ca52bae6ea88 100644
--- a/xml/openapi/xml-openapi.iml
+++ b/xml/openapi/xml-openapi.iml
@@ -9,6 +9,8 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="lang-api" />
<orderEntry type="module" module-name="xml-psi-api" exported="" />
+ <orderEntry type="module" module-name="xml-analysis-api" exported="" />
+ <orderEntry type="module" module-name="xml-structure-view-api" exported="" />
</component>
<component name="copyright">
<Base>
diff --git a/xml/relaxng/src/org/intellij/plugins/relaxNG/RncFileReferenceManipulator.java b/xml/relaxng/src/org/intellij/plugins/relaxNG/RncFileReferenceManipulator.java
index bc17a9db2287..73784ac15b57 100644
--- a/xml/relaxng/src/org/intellij/plugins/relaxNG/RncFileReferenceManipulator.java
+++ b/xml/relaxng/src/org/intellij/plugins/relaxNG/RncFileReferenceManipulator.java
@@ -1,3 +1,18 @@
+/*
+ * 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 org.intellij.plugins.relaxNG;
import com.intellij.lang.ASTNode;
@@ -8,12 +23,14 @@ import com.intellij.util.IncorrectOperationException;
import org.intellij.plugins.relaxNG.compact.RncTokenTypes;
import org.intellij.plugins.relaxNG.compact.psi.RncFileReference;
import org.intellij.plugins.relaxNG.compact.psi.util.RenameUtil;
+import org.jetbrains.annotations.NotNull;
/**
* @author peter
*/
public class RncFileReferenceManipulator extends AbstractElementManipulator<RncFileReference> {
- public RncFileReference handleContentChange(RncFileReference element, TextRange range, String newContent) throws
+ @Override
+ public RncFileReference handleContentChange(@NotNull RncFileReference element, @NotNull TextRange range, String newContent) throws
IncorrectOperationException {
final ASTNode node = element.getNode();
assert node != null;
@@ -28,8 +45,9 @@ public class RncFileReferenceManipulator extends AbstractElementManipulator<RncF
return element;
}
+ @NotNull
@Override
- public TextRange getRangeInElement(RncFileReference element) {
+ public TextRange getRangeInElement(@NotNull RncFileReference element) {
return element.getReferenceRange();
}
}
diff --git a/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java b/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java
index 09a756d25929..8d35d552d4a9 100644
--- a/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java
+++ b/xml/relaxng/src/org/intellij/plugins/relaxNG/compact/RngCompactLanguage.java
@@ -51,25 +51,30 @@ public class RngCompactLanguage extends Language {
}
public static class MyCommenter implements Commenter {
+ @Override
@Nullable
public String getLineCommentPrefix() {
return "#";
}
+ @Override
@Nullable
public String getBlockCommentPrefix() {
return null;
}
+ @Override
@Nullable
public String getBlockCommentSuffix() {
return null;
}
+ @Override
public String getCommentedBlockCommentPrefix() {
return null;
}
+ @Override
public String getCommentedBlockCommentSuffix() {
return null;
}
@@ -78,6 +83,7 @@ public class RngCompactLanguage extends Language {
public static class MyPairedBraceMatcher implements PairedBraceMatcher {
private BracePair[] myBracePairs;
+ @Override
public BracePair[] getPairs() {
if (myBracePairs == null) {
myBracePairs = new BracePair[]{
@@ -89,10 +95,12 @@ public class RngCompactLanguage extends Language {
return myBracePairs;
}
+ @Override
public boolean isPairedBracesAllowedBeforeType(@NotNull IElementType lbraceType, @Nullable IElementType contextType) {
return false;
}
+ @Override
public int getCodeConstructStart(PsiFile file, int openingBraceOffset) {
// TODO
return openingBraceOffset;
@@ -100,25 +108,30 @@ public class RngCompactLanguage extends Language {
}
public static class MyNamesValidator implements NamesValidator {
- public boolean isKeyword(String name, Project project) {
+ @Override
+ public boolean isKeyword(@NotNull String name, Project project) {
return RenameUtil.isKeyword(name);
}
- public boolean isIdentifier(String name, Project project) {
+ @Override
+ public boolean isIdentifier(@NotNull String name, Project project) {
return RenameUtil.isIdentifier(name);
}
}
public static class MyDocumentationProvider implements DocumentationProvider {
+ @Override
@Nullable
public String getQuickNavigateInfo(PsiElement element, PsiElement originalElement) {
return null;
}
+ @Override
public List<String> getUrlFor(PsiElement element, PsiElement originalElement) {
return null;
}
+ @Override
@Nullable
public String generateDoc(PsiElement element, PsiElement originalElement) {
if (element instanceof RncElement) {
@@ -143,11 +156,13 @@ public class RngCompactLanguage extends Language {
return null;
}
+ @Override
@Nullable
public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, Object object, PsiElement element) {
return null;
}
+ @Override
@Nullable
public PsiElement getDocumentationElementForLink(PsiManager psiManager, String link, PsiElement context) {
return null;
@@ -155,6 +170,7 @@ public class RngCompactLanguage extends Language {
}
public static class MySyntaxHighlighterFactory extends SingleLazyInstanceSyntaxHighlighterFactory {
+ @Override
@NotNull
protected SyntaxHighlighter createHighlighter() {
return new RncHighlighter();
diff --git a/xml/tests/src/com/intellij/xml/structureView/HtmlFileStructureTest.java b/xml/tests/src/com/intellij/xml/structureView/HtmlFileStructureTest.java
index 77aab443bd03..d71aa3b25e87 100644
--- a/xml/tests/src/com/intellij/xml/structureView/HtmlFileStructureTest.java
+++ b/xml/tests/src/com/intellij/xml/structureView/HtmlFileStructureTest.java
@@ -1,7 +1,22 @@
+/*
+ * 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.xml.structureView;
-import com.intellij.ide.util.FileStructurePopup;
import com.intellij.ide.util.PropertiesComponent;
+import com.intellij.ide.util.treeView.smartTree.TreeStructureUtil;
import com.intellij.lang.html.structureView.Html5SectionsNodeProvider;
import com.intellij.testFramework.FileStructureTestBase;
@@ -22,7 +37,7 @@ public class HtmlFileStructureTest extends FileStructureTestBase {
}
private static String getHtml5OutlineModePropertyName() {
- return FileStructurePopup.getPropertyName(Html5SectionsNodeProvider.HTML5_OUTLINE_PROVIDER_PROPERTY);
+ return TreeStructureUtil.getPropertyName(Html5SectionsNodeProvider.HTML5_OUTLINE_PROVIDER_PROPERTY);
}
@Override
diff --git a/xml/xml-analysis-api/src/com/intellij/codeInspection/XmlQuickFixFactory.java b/xml/xml-analysis-api/src/com/intellij/codeInspection/XmlQuickFixFactory.java
index e99bbab3d48a..c0c5b1081785 100644
--- a/xml/xml-analysis-api/src/com/intellij/codeInspection/XmlQuickFixFactory.java
+++ b/xml/xml-analysis-api/src/com/intellij/codeInspection/XmlQuickFixFactory.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.
@@ -15,7 +15,6 @@
*/
package com.intellij.codeInspection;
-import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.psi.PsiElement;
import com.intellij.psi.xml.XmlTag;
@@ -29,7 +28,7 @@ public abstract class XmlQuickFixFactory {
}
@NotNull
- public abstract IntentionAction insertRequiredAttributeFix(@NotNull XmlTag tag, @NotNull String attrName,@NotNull String... values);
+ public abstract LocalQuickFixAndIntentionActionOnPsiElement insertRequiredAttributeFix(@NotNull XmlTag tag, @NotNull String attrName,@NotNull String... values);
@NotNull
public abstract LocalQuickFix createNSDeclarationIntentionFix(@NotNull final PsiElement element,
diff --git a/xml/openapi/src/com/intellij/xml/XmlTagRuleProvider.java b/xml/xml-analysis-api/src/com/intellij/xml/XmlTagRuleProvider.java
index 69d3bbef1951..b81172014831 100644
--- a/xml/openapi/src/com/intellij/xml/XmlTagRuleProvider.java
+++ b/xml/xml-analysis-api/src/com/intellij/xml/XmlTagRuleProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2011 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.
@@ -30,7 +30,7 @@ public abstract class XmlTagRuleProvider {
public static final Rule[] EMPTY_ARRAY = new Rule[0];
- public void annotate(@NotNull XmlTag tag, ProblemsHolder holder) {
+ public void annotate(@NotNull XmlTag tag, @NotNull ProblemsHolder holder) {
}
diff --git a/xml/impl/src/com/intellij/xml/util/TagSetRuleProvider.java b/xml/xml-analysis-impl/src/com/intellij/xml/util/TagSetRuleProvider.java
index e4e20b9ac570..a3bef9d3ca2e 100644
--- a/xml/impl/src/com/intellij/xml/util/TagSetRuleProvider.java
+++ b/xml/xml-analysis-impl/src/com/intellij/xml/util/TagSetRuleProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2011 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.
diff --git a/xml/impl/src/com/intellij/xml/util/XmlTagRuleProviderBase.java b/xml/xml-analysis-impl/src/com/intellij/xml/util/XmlTagRuleProviderBase.java
index 66aed47b71d3..6f93f029bbbe 100644
--- a/xml/impl/src/com/intellij/xml/util/XmlTagRuleProviderBase.java
+++ b/xml/xml-analysis-impl/src/com/intellij/xml/util/XmlTagRuleProviderBase.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.
@@ -15,10 +15,10 @@
*/
package com.intellij.xml.util;
-import com.intellij.codeInsight.daemon.impl.analysis.InsertRequiredAttributeFix;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.codeInspection.ProblemsHolder;
+import com.intellij.codeInspection.XmlQuickFixFactory;
import com.intellij.codeInspection.htmlInspections.RemoveAttributeIntentionAction;
import com.intellij.lang.ASTNode;
import com.intellij.openapi.util.Condition;
@@ -117,7 +117,7 @@ public abstract class XmlTagRuleProviderBase extends XmlTagRuleProvider {
// ---=== Classes ===---
public abstract static class Effect {
- public abstract void annotate(@NotNull XmlTag tag, ProblemsHolder holder);
+ public abstract void annotate(@NotNull XmlTag tag, @NotNull ProblemsHolder holder);
}
public static class InvalidAttrEffect extends Effect {
@@ -132,7 +132,7 @@ public abstract class XmlTagRuleProviderBase extends XmlTagRuleProvider {
}
@Override
- public void annotate(@NotNull XmlTag tag, ProblemsHolder holder) {
+ public void annotate(@NotNull XmlTag tag, @NotNull ProblemsHolder holder) {
XmlAttribute attribute = tag.getAttribute(myAttrName);
if (attribute != null) {
PsiElement attributeNameElement = getAttributeNameElement(attribute);
@@ -155,7 +155,7 @@ public abstract class XmlTagRuleProviderBase extends XmlTagRuleProvider {
}
@Override
- public void annotate(@NotNull XmlTag tag, ProblemsHolder holder) {
+ public void annotate(@NotNull XmlTag tag, @NotNull ProblemsHolder holder) {
for (XmlAttribute xmlAttribute : tag.getAttributes()) {
String attrName = xmlAttribute.getName();
if (!ArrayUtil.contains(attrName, myAttrNames)) {
@@ -178,7 +178,7 @@ public abstract class XmlTagRuleProviderBase extends XmlTagRuleProvider {
}
@Override
- public void annotate(@NotNull XmlTag tag, ProblemsHolder holder) {
+ public void annotate(@NotNull XmlTag tag, @NotNull ProblemsHolder holder) {
if (myCondition.value(tag)) {
for (Effect effect : myEffect) {
effect.annotate(tag, holder);
@@ -214,7 +214,7 @@ public abstract class XmlTagRuleProviderBase extends XmlTagRuleProvider {
}
@Override
- public void annotate(@NotNull XmlTag tag, ProblemsHolder holder) {
+ public void annotate(@NotNull XmlTag tag, @NotNull ProblemsHolder holder) {
for (String attributeName : myAttributeNames) {
if (tag.getAttribute(attributeName) != null) {
return;
@@ -228,7 +228,7 @@ public abstract class XmlTagRuleProviderBase extends XmlTagRuleProvider {
LocalQuickFix[] fixes = new LocalQuickFix[myAttributeNames.length];
for (int i = 0; i < myAttributeNames.length; i++) {
- fixes[i] = new InsertRequiredAttributeFix(tag, myAttributeNames[i]);
+ fixes[i] = XmlQuickFixFactory.getInstance().insertRequiredAttributeFix(tag, myAttributeNames[i]);
}
holder.registerProblem(tagNameElement, "Tag should have one of following attributes: " + StringUtil.join(myAttributeNames, ", "),
diff --git a/xml/xml-psi-api/src/com/intellij/psi/xml/XmlAttribute.java b/xml/xml-psi-api/src/com/intellij/psi/xml/XmlAttribute.java
index fb2a1beefa07..fb39e91a4fad 100644
--- a/xml/xml-psi-api/src/com/intellij/psi/xml/XmlAttribute.java
+++ b/xml/xml-psi-api/src/com/intellij/psi/xml/XmlAttribute.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.
@@ -70,6 +70,7 @@ public interface XmlAttribute extends XmlElement, PsiNamedElement {
* @return TextRange of the XML attribute value.
* If quotes are present, it returns <code>new TextRange(1, getTextLength()-1)</code>, otherwise it is <code>new TextRange(0, getTextLength())</code>
*/
+ @NotNull
TextRange getValueTextRange();
/**
diff --git a/xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParser.java b/xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParser.java
index e4f89c6b7ef0..db0c3e263923 100644
--- a/xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParser.java
+++ b/xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParser.java
@@ -30,11 +30,14 @@ public class HTMLParser implements PsiParser {
@NotNull
public ASTNode parse(final IElementType root, final PsiBuilder builder) {
+ parseWithoutBuildingTree(root, builder);
+ return builder.getTreeBuilt();
+ }
+
+ public static void parseWithoutBuildingTree(IElementType root, PsiBuilder builder) {
builder.enforceCommentTokens(TokenSet.EMPTY);
final PsiBuilder.Marker file = builder.mark();
new HtmlParsing(builder).parseDocument();
file.done(root);
- return builder.getTreeBuilt();
}
-
} \ No newline at end of file
diff --git a/xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParserDefinition.java b/xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParserDefinition.java
index 13b0dccff4e5..0e3dc6685097 100644
--- a/xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParserDefinition.java
+++ b/xml/xml-psi-impl/src/com/intellij/lang/html/HTMLParserDefinition.java
@@ -25,6 +25,7 @@ import com.intellij.openapi.project.Project;
import com.intellij.psi.FileViewProvider;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
+import com.intellij.psi.impl.source.html.HtmlEmbeddedContentImpl;
import com.intellij.psi.impl.source.html.HtmlFileImpl;
import com.intellij.psi.tree.IFileElementType;
import com.intellij.psi.tree.TokenSet;
@@ -68,6 +69,9 @@ public class HTMLParserDefinition implements ParserDefinition {
@NotNull
public PsiElement createElement(ASTNode node) {
+ if (node.getElementType() == XmlElementType.HTML_EMBEDDED_CONTENT) {
+ return new HtmlEmbeddedContentImpl(node);
+ }
return PsiUtilCore.NULL_PSI_ELEMENT;
}
diff --git a/xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java b/xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java
index c0030d89ff57..7e2c1727d63b 100644
--- a/xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java
+++ b/xml/xml-psi-impl/src/com/intellij/lexer/BaseHtmlLexer.java
@@ -19,17 +19,20 @@ import com.intellij.codeInsight.completion.CompletionUtilCore;
import com.intellij.lang.HtmlScriptContentProvider;
import com.intellij.lang.Language;
import com.intellij.lang.LanguageHtmlScriptContentProvider;
+import com.intellij.lang.html.HTMLLanguage;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.impl.source.tree.TreeUtil;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.xml.XmlTokenType;
import com.intellij.util.text.CharArrayUtil;
+import com.intellij.xml.util.documentation.HtmlDescriptorsTable;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
/**
@@ -111,7 +114,8 @@ abstract class BaseHtmlLexer extends DelegateLexer {
final boolean style = name.equals(TOKEN_STYLE);
final int state = getState() & BASE_STATE_MASK;
final boolean script = name.equals(TOKEN_SCRIPT) ||
- ((name.startsWith(TOKEN_ON) && name.indexOf(':') == -1 && !isHtmlTagState(state)));
+ ((name.startsWith(TOKEN_ON) && name.indexOf(':') == -1 && !isHtmlTagState(state) &&
+ HtmlDescriptorsTable.getAttributeDescriptor(name) != null));
if (style || script) {
// encountered tag name in end of tag
@@ -176,7 +180,10 @@ abstract class BaseHtmlLexer extends DelegateLexer {
if (StringUtil.isEmpty(mimeType)) {
return ourDefaultLanguage != null ? LanguageHtmlScriptContentProvider.getScriptContentProvider(ourDefaultLanguage) : null;
}
- Collection<Language> instancesByMimeType = Language.findInstancesByMimeType(mimeType != null ? mimeType.trim() : null);
+ Collection<Language> instancesByMimeType = Language.findInstancesByMimeType(mimeType.trim());
+ if (instancesByMimeType.isEmpty() && mimeType.contains("template")) {
+ instancesByMimeType = Collections.<Language>singletonList(HTMLLanguage.INSTANCE);
+ }
for (Language language : instancesByMimeType) {
HtmlScriptContentProvider scriptContentProvider = LanguageHtmlScriptContentProvider.getScriptContentProvider(language);
if (scriptContentProvider != null) {
diff --git a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/html/HtmlEmbeddedContentImpl.java b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/html/HtmlEmbeddedContentImpl.java
new file mode 100644
index 000000000000..8cdeb23a0efe
--- /dev/null
+++ b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/html/HtmlEmbeddedContentImpl.java
@@ -0,0 +1,71 @@
+/*
+ * 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.source.html;
+
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.search.PsiElementProcessor;
+import com.intellij.psi.tree.IElementType;
+import com.intellij.psi.xml.XmlElementType;
+import com.intellij.psi.xml.XmlTag;
+import com.intellij.psi.xml.XmlTagChild;
+import com.intellij.util.IncorrectOperationException;
+
+/**
+* @author Dennis.Ushakov
+*/
+public class HtmlEmbeddedContentImpl extends ASTWrapperPsiElement implements XmlTagChild {
+ public HtmlEmbeddedContentImpl(final ASTNode node) {
+ super(node);
+ }
+
+ public XmlTag getParentTag() {
+ final PsiElement parent = getParent();
+ if (parent instanceof XmlTag) return (XmlTag)parent;
+ return null;
+ }
+
+ public XmlTagChild getNextSiblingInTag() {
+ PsiElement nextSibling = getNextSibling();
+ if (nextSibling instanceof XmlTagChild) return (XmlTagChild)nextSibling;
+ return null;
+ }
+
+ public XmlTagChild getPrevSiblingInTag() {
+ final PsiElement prevSibling = getPrevSibling();
+ if (prevSibling instanceof XmlTagChild) return (XmlTagChild)prevSibling;
+ return null;
+ }
+
+ public boolean processElements(PsiElementProcessor processor, PsiElement place) {
+ // TODO
+ return true;
+ }
+
+ public String toString() {
+ String s = super.toString();
+ final IElementType type = getNode().getElementType();
+ if (type != XmlElementType.HTML_EMBEDDED_CONTENT) s += ":" + type;
+ return s;
+ }
+
+ @Override
+ public void delete() throws IncorrectOperationException {
+ final ASTNode astNode = getNode();
+ astNode.getTreeParent().removeChild(astNode);
+ }
+}
diff --git a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlAttributeImpl.java b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlAttributeImpl.java
index 8dfb5d8ef862..1afa589c1516 100644
--- a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlAttributeImpl.java
+++ b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/xml/XmlAttributeImpl.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.
@@ -62,6 +62,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
super(XmlElementType.XML_ATTRIBUTE);
}
+ @Override
public int getChildRole(ASTNode child) {
LOG.assertTrue(child.getTreeParent() == this);
IElementType i = child.getElementType();
@@ -76,10 +77,12 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
}
}
+ @Override
public XmlAttributeValue getValueElement() {
return (XmlAttributeValue)XmlChildRole.ATTRIBUTE_VALUE_FINDER.findChild(this);
}
+ @Override
public void setValue(String valueText) throws IncorrectOperationException {
final ASTNode value = XmlChildRole.ATTRIBUTE_VALUE_FINDER.findChild(this);
final PomModel model = PomManager.getModel(getProject());
@@ -87,6 +90,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
final ASTNode newValue = XmlChildRole.ATTRIBUTE_VALUE_FINDER.findChild((ASTNode)attribute);
final XmlAspect aspect = model.getModelAspect(XmlAspect.class);
model.runTransaction(new PomTransactionBase(this, aspect) {
+ @Override
public PomModelEvent runInner() {
final XmlAttributeImpl att = XmlAttributeImpl.this;
if (value != null) {
@@ -112,6 +116,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
return (XmlElement)XmlChildRole.ATTRIBUTE_NAME_FINDER.findChild(this);
}
+ @Override
@NotNull
public String getNamespace() {
final String name = getName();
@@ -121,22 +126,26 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
return getParent().getNamespaceByPrefix(prefixByQualifiedName);
}
+ @Override
@NonNls
@NotNull
public String getNamespacePrefix() {
return XmlUtil.findPrefixByQualifiedName(getName());
}
+ @Override
public XmlTag getParent() {
final PsiElement parentTag = super.getParent();
return parentTag instanceof XmlTag ? (XmlTag)parentTag : null; // Invalid elements might belong to DummyHolder instead.
}
+ @Override
@NotNull
public String getLocalName() {
return XmlUtil.findLocalNameByQualifiedName(getName());
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof XmlElementVisitor) {
((XmlElementVisitor)visitor).visitXmlAttribute(this);
@@ -146,6 +155,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
}
}
+ @Override
public String getValue() {
final XmlAttributeValue valueElement = getValueElement();
return valueElement != null ? valueElement.getValue() : null;
@@ -160,6 +170,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
buffer.append(child.getChars());
}
+ @Override
public String getDisplayValue() {
String displayText = myDisplayText;
if (displayText != null) return displayText;
@@ -216,6 +227,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
return myDisplayText = buffer.toString();
}
+ @Override
public int physicalToDisplay(int physicalIndex) {
getDisplayValue();
if (physicalIndex < 0 || physicalIndex > myValueTextRange.getLength()) return -1;
@@ -239,6 +251,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
return Math.max(myGapDisplayStarts[gapIndex], physicalIndex - shift);
}
+ @Override
public int displayToPhysical(int displayIndex) {
String displayValue = getDisplayValue();
if (displayValue == null || displayIndex < 0 || displayIndex > displayValue.length()) return -1;
@@ -262,11 +275,14 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
return displayIndex + shift;
}
+ @NotNull
+ @Override
public TextRange getValueTextRange() {
getDisplayValue();
return myValueTextRange;
}
+ @Override
public void clearCaches() {
super.clearCaches();
myDisplayText = null;
@@ -275,17 +291,20 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
myValueTextRange = null;
}
+ @Override
@NotNull
public String getName() {
XmlElement element = getNameElement();
return element != null ? element.getText() : "";
}
+ @Override
public boolean isNamespaceDeclaration() {
@NonNls final String name = getName();
return name.startsWith("xmlns:") || name.equals("xmlns");
}
+ @Override
public PsiElement setName(@NotNull final String nameText) throws IncorrectOperationException {
final ASTNode name = XmlChildRole.ATTRIBUTE_NAME_FINDER.findChild(this);
final String oldName = name.getText();
@@ -294,6 +313,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
final ASTNode newName = XmlChildRole.ATTRIBUTE_NAME_FINDER.findChild((ASTNode)attribute);
final XmlAspect aspect = model.getModelAspect(XmlAspect.class);
model.runTransaction(new PomTransactionBase(getParent(), aspect) {
+ @Override
public PomModelEvent runInner() {
final PomModelEvent event = new PomModelEvent(model);
final XmlAspectChangeSetImpl xmlAspectChangeSet = new XmlAspectChangeSetImpl(model, (XmlFile)getContainingFile());
@@ -307,12 +327,14 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
return this;
}
+ @Override
public PsiReference getReference() {
final PsiReference[] refs = getReferences();
if (refs.length > 0) return refs[0];
return null;
}
+ @Override
@NotNull
public PsiReference[] getReferences() {
final PsiReference[] referencesFromProviders = ReferenceProvidersRegistry.getReferencesFromProviders(this);
@@ -342,6 +364,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
return refs;
}
+ @Override
@Nullable
public XmlAttributeDescriptor getDescriptor() {
final PsiElement parentElement = getParent();
diff --git a/xml/xml-psi-impl/src/com/intellij/psi/xml/XmlElementType.java b/xml/xml-psi-impl/src/com/intellij/psi/xml/XmlElementType.java
index 4b33722b7876..6e3d2db4f393 100644
--- a/xml/xml-psi-impl/src/com/intellij/psi/xml/XmlElementType.java
+++ b/xml/xml-psi-impl/src/com/intellij/psi/xml/XmlElementType.java
@@ -15,17 +15,18 @@
*/
package com.intellij.psi.xml;
-import com.intellij.lang.ASTNode;
+import com.intellij.lang.*;
import com.intellij.lang.dtd.DTDLanguage;
import com.intellij.lang.html.HTMLLanguage;
+import com.intellij.lang.html.HTMLParser;
import com.intellij.lang.xhtml.XHTMLLanguage;
import com.intellij.lang.xml.XMLLanguage;
+import com.intellij.psi.PsiFile;
import com.intellij.psi.impl.source.parsing.xml.DtdParsing;
-import com.intellij.psi.tree.CustomParsingType;
-import com.intellij.psi.tree.IElementType;
-import com.intellij.psi.tree.IFileElementType;
+import com.intellij.psi.tree.*;
import com.intellij.psi.tree.xml.IXmlElementType;
import com.intellij.util.CharTable;
+import com.intellij.util.diff.FlyweightCapableTreeStructure;
public interface XmlElementType extends XmlTokenType {
@@ -55,6 +56,7 @@ public interface XmlElementType extends XmlTokenType {
IElementType HTML_DOCUMENT = new IXmlElementType("HTML_DOCUMENT");
IElementType HTML_TAG = new IXmlElementType("HTML_TAG");
IFileElementType HTML_FILE = new IFileElementType(HTMLLanguage.INSTANCE);
+ IElementType HTML_EMBEDDED_CONTENT = new EmbeddedHtmlContentElementType();
IElementType XML_TEXT = new XmlTextElementType();
@@ -69,4 +71,20 @@ public interface XmlElementType extends XmlTokenType {
return new DtdParsing(text, XML_MARKUP_DECL, DtdParsing.TYPE_FOR_MARKUP_DECL, null).parse();
}
};
+
+ class EmbeddedHtmlContentElementType extends ILazyParseableElementType implements ILightLazyParseableElementType {
+ public EmbeddedHtmlContentElementType() {
+ super("HTML_EMBEDDED_CONTENT", HTMLLanguage.INSTANCE);
+ }
+
+ @Override
+ public FlyweightCapableTreeStructure<LighterASTNode> parseContents(LighterLazyParseableNode chameleon) {
+ final PsiFile file = chameleon.getContainingFile();
+ assert file != null : chameleon;
+
+ final PsiBuilder builder = PsiBuilderFactory.getInstance().createBuilder(file.getProject(), chameleon);
+ HTMLParser.parseWithoutBuildingTree(HTML_FILE, builder);
+ return builder.getLightTree();
+ }
+ }
}
diff --git a/xml/xml-psi-impl/src/com/intellij/xml/util/IncludedXmlAttribute.java b/xml/xml-psi-impl/src/com/intellij/xml/util/IncludedXmlAttribute.java
index 2aecdc7cf130..051918f1a819 100644
--- a/xml/xml-psi-impl/src/com/intellij/xml/util/IncludedXmlAttribute.java
+++ b/xml/xml-psi-impl/src/com/intellij/xml/util/IncludedXmlAttribute.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.
@@ -48,6 +48,7 @@ public class IncludedXmlAttribute extends IncludedXmlElement<XmlAttribute> imple
throw new UnsupportedOperationException("Can't modify included elements");
}
+ @Override
@NonNls
@NotNull
public String getLocalName() {
@@ -59,56 +60,69 @@ public class IncludedXmlAttribute extends IncludedXmlElement<XmlAttribute> imple
return getOriginal().getNameElement();
}
+ @Override
@NonNls
@NotNull
public String getNamespace() {
return getOriginal().getNamespace();
}
+ @Override
@NonNls
@NotNull
public String getNamespacePrefix() {
return getOriginal().getNamespacePrefix();
}
+ @Override
public XmlTag getParent() {
return (XmlTag)super.getParent();
}
+ @Override
public String getValue() {
return getOriginal().getValue();
}
+ @Override
public String getDisplayValue() {
return getOriginal().getDisplayValue();
}
+ @Override
public int physicalToDisplay(int offset) {
return getOriginal().physicalToDisplay(offset);
}
+ @Override
public int displayToPhysical(int offset) {
return getOriginal().displayToPhysical(offset);
}
+ @NotNull
+ @Override
public TextRange getValueTextRange() {
return getOriginal().getValueTextRange();
}
+ @Override
public boolean isNamespaceDeclaration() {
return getOriginal().isNamespaceDeclaration();
}
+ @Override
@Nullable
public XmlAttributeDescriptor getDescriptor() {
return getOriginal().getDescriptor();
}
+ @Override
@Nullable
public XmlAttributeValue getValueElement() {
return getOriginal().getValueElement();
}
+ @Override
public void setValue(String value) throws IncorrectOperationException {
throw new UnsupportedOperationException("Can't modify included elements");
}
diff --git a/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/HtmlDescriptorsTable.java b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/HtmlDescriptorsTable.java
index ed02f3af1c14..c19805412628 100644
--- a/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/HtmlDescriptorsTable.java
+++ b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/HtmlDescriptorsTable.java
@@ -192,7 +192,7 @@ public class HtmlDescriptorsTable {
return ourTagTable.get(tagName);
}
- static HtmlAttributeDescriptor getAttributeDescriptor(String attributeName) {
+ public static HtmlAttributeDescriptor getAttributeDescriptor(String attributeName) {
return ourAttributeTable.get(attributeName);
}
diff --git a/xml/impl/src/com/intellij/xml/util/documentation/html5table.xml b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/html5table.xml
index bd4aa46595fb..bd4aa46595fb 100644
--- a/xml/impl/src/com/intellij/xml/util/documentation/html5table.xml
+++ b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/html5table.xml
diff --git a/xml/impl/src/com/intellij/xml/util/documentation/htmltable.xml b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/htmltable.xml
index 6a76727cd83e..6a76727cd83e 100644
--- a/xml/impl/src/com/intellij/xml/util/documentation/htmltable.xml
+++ b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/htmltable.xml
diff --git a/xml/impl/src/com/intellij/xml/util/documentation/mathmltable.xml b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/mathmltable.xml
index 6e659ccbcd3d..6e659ccbcd3d 100644
--- a/xml/impl/src/com/intellij/xml/util/documentation/mathmltable.xml
+++ b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/mathmltable.xml
diff --git a/xml/impl/src/com/intellij/xml/util/documentation/svgtable.xml b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/svgtable.xml
index 478a2b2bac79..478a2b2bac79 100644
--- a/xml/impl/src/com/intellij/xml/util/documentation/svgtable.xml
+++ b/xml/xml-psi-impl/src/com/intellij/xml/util/documentation/svgtable.xml
diff --git a/xml/openapi/src/com/intellij/ide/structureView/xml/XmlStructureViewBuilderProvider.java b/xml/xml-structure-view-api/src/com/intellij/ide/structureView/xml/XmlStructureViewBuilderProvider.java
index 8099e2de1107..6ca6a5953729 100644
--- a/xml/openapi/src/com/intellij/ide/structureView/xml/XmlStructureViewBuilderProvider.java
+++ b/xml/xml-structure-view-api/src/com/intellij/ide/structureView/xml/XmlStructureViewBuilderProvider.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.
diff --git a/xml/openapi/src/com/intellij/ide/structureView/xml/XmlStructureViewElementProvider.java b/xml/xml-structure-view-api/src/com/intellij/ide/structureView/xml/XmlStructureViewElementProvider.java
index 74b0aae2965d..4ff17cac86b4 100644
--- a/xml/openapi/src/com/intellij/ide/structureView/xml/XmlStructureViewElementProvider.java
+++ b/xml/xml-structure-view-api/src/com/intellij/ide/structureView/xml/XmlStructureViewElementProvider.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.
diff --git a/xml/xml-structure-view-api/xml-structure-view-api.iml b/xml/xml-structure-view-api/xml-structure-view-api.iml
new file mode 100644
index 000000000000..15af705d61aa
--- /dev/null
+++ b/xml/xml-structure-view-api/xml-structure-view-api.iml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="core-api" />
+ <orderEntry type="module" module-name="xml-psi-api" exported="" />
+ <orderEntry type="module" module-name="structure-view-api" />
+ </component>
+</module>
+
diff --git a/xml/impl/src/com/intellij/ide/structureView/impl/xml/AbstractXmlTagTreeElement.java b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/AbstractXmlTagTreeElement.java
index fde490604718..2383784267ae 100644
--- a/xml/impl/src/com/intellij/ide/structureView/impl/xml/AbstractXmlTagTreeElement.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/AbstractXmlTagTreeElement.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.
diff --git a/xml/impl/src/com/intellij/ide/structureView/impl/xml/DtdFileTreeElement.java b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/DtdFileTreeElement.java
index c8f23585d100..8ca2b8933572 100644
--- a/xml/impl/src/com/intellij/ide/structureView/impl/xml/DtdFileTreeElement.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/DtdFileTreeElement.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.
diff --git a/xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlFileTreeElement.java b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlFileTreeElement.java
index e1cd6a213410..f13fe1ccba61 100644
--- a/xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlFileTreeElement.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlFileTreeElement.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.
diff --git a/xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlStructureViewTreeModel.java b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlStructureViewTreeModel.java
index 19408e7eff1c..34790afb56d3 100644
--- a/xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlStructureViewTreeModel.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlStructureViewTreeModel.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.
@@ -23,24 +23,23 @@ import com.intellij.ide.util.treeView.smartTree.Sorter;
import com.intellij.lang.dtd.DTDLanguage;
import com.intellij.openapi.editor.Editor;
import com.intellij.psi.PsiElement;
-import com.intellij.psi.PsiFile;
import com.intellij.psi.xml.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class XmlStructureViewTreeModel extends TextEditorBasedStructureViewModel {
- private final XmlFile myFile;
- private static final Class[] myClasses = new Class[]{XmlTag.class, XmlFile.class, XmlEntityDecl.class, XmlElementDecl.class, XmlAttlistDecl.class, XmlConditionalSection.class};
- private static final Sorter[] mySorters = {Sorter.ALPHA_SORTER};
+ private static final Class[] CLASSES =
+ {XmlTag.class, XmlFile.class, XmlEntityDecl.class, XmlElementDecl.class, XmlAttlistDecl.class, XmlConditionalSection.class};
+ private static final Sorter[] SORTERS = {Sorter.ALPHA_SORTER};
- public XmlStructureViewTreeModel(XmlFile file, @Nullable Editor editor) {
+ public XmlStructureViewTreeModel(@NotNull XmlFile file, @Nullable Editor editor) {
super(editor, file);
- myFile = file;
}
@Override
@NotNull
public StructureViewTreeElement getRoot() {
+ XmlFile myFile = getPsiFile();
if (myFile.getLanguage() == DTDLanguage.INSTANCE) return new DtdFileTreeElement(myFile);
return new XmlFileTreeElement(myFile);
}
@@ -51,21 +50,21 @@ public class XmlStructureViewTreeModel extends TextEditorBasedStructureViewModel
}
@Override
- protected PsiFile getPsiFile() {
- return myFile;
+ protected XmlFile getPsiFile() {
+ return (XmlFile)super.getPsiFile();
}
@Override
@NotNull
protected Class[] getSuitableClasses() {
- return myClasses;
+ return CLASSES;
}
@Override
public Object getCurrentEditorElement() {
final Object editorElement = super.getCurrentEditorElement();
if (editorElement instanceof XmlTag) {
- for (StructureViewExtension extension : StructureViewFactoryEx.getInstanceEx(myFile.getProject()).getAllExtensions(XmlTag.class)) {
+ for (StructureViewExtension extension : StructureViewFactoryEx.getInstanceEx(getPsiFile().getProject()).getAllExtensions(XmlTag.class)) {
final Object element = extension.getCurrentEditorElement(getEditor(), (PsiElement)editorElement);
if (element != null) return element;
}
@@ -76,6 +75,6 @@ public class XmlStructureViewTreeModel extends TextEditorBasedStructureViewModel
@Override
@NotNull
public Sorter[] getSorters() {
- return mySorters;
+ return SORTERS;
}
} \ No newline at end of file
diff --git a/xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlTagTreeElement.java b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlTagTreeElement.java
index ee75742ad237..eddd19cf5b4c 100644
--- a/xml/impl/src/com/intellij/ide/structureView/impl/xml/XmlTagTreeElement.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/ide/structureView/impl/xml/XmlTagTreeElement.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.
diff --git a/xml/impl/src/com/intellij/lang/dtd/DtdStructureViewBuilderFactory.java b/xml/xml-structure-view-impl/src/com/intellij/lang/dtd/DtdStructureViewBuilderFactory.java
index fcccefe44f88..d6dc3c8cade3 100644
--- a/xml/impl/src/com/intellij/lang/dtd/DtdStructureViewBuilderFactory.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/dtd/DtdStructureViewBuilderFactory.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.
diff --git a/xml/impl/src/com/intellij/lang/html/structureView/Html5SectionTreeElement.java b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionTreeElement.java
index f18222f69592..baee9a1534ec 100644
--- a/xml/impl/src/com/intellij/lang/html/structureView/Html5SectionTreeElement.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionTreeElement.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.
diff --git a/xml/impl/src/com/intellij/lang/html/structureView/Html5SectionsNodeProvider.java b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionsNodeProvider.java
index dd3341df4133..97409f894622 100644
--- a/xml/impl/src/com/intellij/lang/html/structureView/Html5SectionsNodeProvider.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionsNodeProvider.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.
@@ -16,18 +16,19 @@
package com.intellij.lang.html.structureView;
import com.intellij.icons.AllIcons;
+import com.intellij.ide.util.ActionShortcutProvider;
import com.intellij.ide.util.FileStructureNodeProvider;
import com.intellij.ide.util.treeView.smartTree.ActionPresentation;
import com.intellij.ide.util.treeView.smartTree.ActionPresentationData;
import com.intellij.ide.util.treeView.smartTree.TreeElement;
import com.intellij.openapi.actionSystem.Shortcut;
-import com.intellij.openapi.keymap.KeymapManager;
import com.intellij.openapi.util.PropertyOwner;
import com.intellij.psi.filters.XmlTagFilter;
import com.intellij.psi.scope.processor.FilterElementProcessor;
import com.intellij.psi.xml.XmlDocument;
import com.intellij.psi.xml.XmlFile;
import com.intellij.psi.xml.XmlTag;
+import com.intellij.util.IncorrectOperationException;
import com.intellij.xml.XmlBundle;
import org.jetbrains.annotations.NotNull;
@@ -36,7 +37,8 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
-public class Html5SectionsNodeProvider implements FileStructureNodeProvider<Html5SectionTreeElement>, PropertyOwner {
+public class Html5SectionsNodeProvider implements FileStructureNodeProvider<Html5SectionTreeElement>, PropertyOwner,
+ ActionShortcutProvider {
public static final String ACTION_ID = "HTML5_OUTLINE_MODE";
public static final String HTML5_OUTLINE_PROVIDER_PROPERTY = "html5.sections.node.provider";
@@ -53,14 +55,22 @@ public class Html5SectionsNodeProvider implements FileStructureNodeProvider<Html
return new ActionPresentationData(XmlBundle.message("html5.outline.mode"), null, AllIcons.Xml.Html5);
}
+ @NotNull
@Override
public String getCheckBoxText() {
return XmlBundle.message("html5.outline.mode");
}
+ @NotNull
+ @Override
+ public String getActionIdForShortcut() {
+ return "FileStructurePopup";
+ }
+
+ @NotNull
@Override
public Shortcut[] getShortcut() {
- return KeymapManager.getInstance().getActiveKeymap().getShortcuts("FileStructurePopup");
+ throw new IncorrectOperationException("see getActionIdForShortcut()");
}
@Override
@@ -69,8 +79,9 @@ public class Html5SectionsNodeProvider implements FileStructureNodeProvider<Html
return HTML5_OUTLINE_PROVIDER_PROPERTY;
}
+ @NotNull
@Override
- public Collection<Html5SectionTreeElement> provideNodes(final TreeElement node) {
+ public Collection<Html5SectionTreeElement> provideNodes(@NotNull final TreeElement node) {
if (!(node instanceof HtmlFileTreeElement)) return Collections.emptyList();
final XmlFile xmlFile = ((HtmlFileTreeElement)node).getElement();
diff --git a/xml/impl/src/com/intellij/lang/html/structureView/Html5SectionsProcessor.java b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionsProcessor.java
index ea1761222ad0..2ca1c8b3ca63 100644
--- a/xml/impl/src/com/intellij/lang/html/structureView/Html5SectionsProcessor.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/Html5SectionsProcessor.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.
diff --git a/xml/impl/src/com/intellij/lang/html/structureView/HtmlFileTreeElement.java b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlFileTreeElement.java
index de191736db75..244f16677c3b 100644
--- a/xml/impl/src/com/intellij/lang/html/structureView/HtmlFileTreeElement.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlFileTreeElement.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@ package com.intellij.lang.html.structureView;
import com.intellij.ide.structureView.StructureViewFactoryEx;
import com.intellij.ide.structureView.StructureViewTreeElement;
import com.intellij.ide.structureView.impl.common.PsiTreeElementBase;
-import com.intellij.ide.util.FileStructurePopup;
import com.intellij.ide.util.PropertiesComponent;
+import com.intellij.ide.util.treeView.smartTree.TreeStructureUtil;
import com.intellij.psi.filters.XmlTagFilter;
import com.intellij.psi.scope.processor.FilterElementProcessor;
import com.intellij.psi.xml.XmlDocument;
@@ -88,7 +88,7 @@ class HtmlFileTreeElement extends PsiTreeElementBase<XmlFile> {
if (xmlFile == null) return false;
if (myInStructureViewPopup) {
- final String propertyName = FileStructurePopup.getPropertyName(Html5SectionsNodeProvider.HTML5_OUTLINE_PROVIDER_PROPERTY);
+ final String propertyName = TreeStructureUtil.getPropertyName(Html5SectionsNodeProvider.HTML5_OUTLINE_PROVIDER_PROPERTY);
if (PropertiesComponent.getInstance().getBoolean(propertyName, false)) {
return true;
}
diff --git a/xml/impl/src/com/intellij/lang/html/structureView/HtmlStructureViewBuilderProvider.java b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlStructureViewBuilderProvider.java
index 9a8741d308a8..91e17be3b451 100644
--- a/xml/impl/src/com/intellij/lang/html/structureView/HtmlStructureViewBuilderProvider.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlStructureViewBuilderProvider.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.
diff --git a/xml/impl/src/com/intellij/lang/html/structureView/HtmlStructureViewTreeModel.java b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlStructureViewTreeModel.java
index 8a9f6f7fe54b..6efe68c75ceb 100644
--- a/xml/impl/src/com/intellij/lang/html/structureView/HtmlStructureViewTreeModel.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlStructureViewTreeModel.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.
@@ -17,7 +17,6 @@ package com.intellij.lang.html.structureView;
import com.intellij.icons.AllIcons;
import com.intellij.ide.IdeBundle;
-import com.intellij.ide.actions.ViewStructureAction;
import com.intellij.ide.structureView.StructureViewTreeElement;
import com.intellij.ide.structureView.impl.xml.XmlStructureViewTreeModel;
import com.intellij.ide.util.treeView.smartTree.*;
@@ -36,7 +35,8 @@ class HtmlStructureViewTreeModel extends XmlStructureViewTreeModel implements Pl
private final Collection<NodeProvider> myNodeProviders;
private String myStructureViewPlace;
- private static Sorter HTML_ALPHA_SORTER = new Sorter() {
+ private static final Sorter HTML_ALPHA_SORTER = new Sorter() {
+ @NotNull
@Override
public Comparator getComparator() {
return new Comparator() {
@@ -93,7 +93,7 @@ class HtmlStructureViewTreeModel extends XmlStructureViewTreeModel implements Pl
}
@Override
- public void setPlace(final String place) {
+ public void setPlace(@NotNull final String place) {
myStructureViewPlace = place;
}
@@ -105,7 +105,7 @@ class HtmlStructureViewTreeModel extends XmlStructureViewTreeModel implements Pl
@Override
@NotNull
public Sorter[] getSorters() {
- if (ViewStructureAction.isInStructureViewPopup(this)) {
+ if (TreeStructureUtil.isInStructureViewPopup(this)) {
return Sorter.EMPTY_ARRAY; // because in popup there's no option to disable sorter
}
@@ -121,6 +121,6 @@ class HtmlStructureViewTreeModel extends XmlStructureViewTreeModel implements Pl
@Override
@NotNull
public StructureViewTreeElement getRoot() {
- return new HtmlFileTreeElement(ViewStructureAction.isInStructureViewPopup(this), (XmlFile)getPsiFile());
+ return new HtmlFileTreeElement(TreeStructureUtil.isInStructureViewPopup(this), (XmlFile)getPsiFile());
}
}
diff --git a/xml/impl/src/com/intellij/lang/html/structureView/HtmlTagTreeElement.java b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlTagTreeElement.java
index f896146608db..ad060e2261e3 100644
--- a/xml/impl/src/com/intellij/lang/html/structureView/HtmlTagTreeElement.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/html/structureView/HtmlTagTreeElement.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.
diff --git a/xml/impl/src/com/intellij/lang/xml/XmlStructureViewBuilderFactory.java b/xml/xml-structure-view-impl/src/com/intellij/lang/xml/XmlStructureViewBuilderFactory.java
index ba2721457763..97bb3ec1460c 100644
--- a/xml/impl/src/com/intellij/lang/xml/XmlStructureViewBuilderFactory.java
+++ b/xml/xml-structure-view-impl/src/com/intellij/lang/xml/XmlStructureViewBuilderFactory.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.
diff --git a/xml/xml-structure-view-impl/xml-structure-view-impl.iml b/xml/xml-structure-view-impl/xml-structure-view-impl.iml
new file mode 100644
index 000000000000..538b123a1fc9
--- /dev/null
+++ b/xml/xml-structure-view-impl/xml-structure-view-impl.iml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="xml-structure-view-api" />
+ <orderEntry type="module" module-name="xml-psi-impl" />
+ <orderEntry type="module" module-name="structure-view-impl" />
+ <orderEntry type="module" module-name="core-impl" />
+ </component>
+</module>
+