diff options
author | Tor Norbye <tnorbye@google.com> | 2013-10-15 19:49:27 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-10-15 19:49:46 -0700 |
commit | 767536605379e492929a763f4a585cb4f499b9f6 (patch) | |
tree | b82400bd5a1609a29dfb9d40d4b54cfac2daaabd /xml/impl | |
parent | 32218cc024d27dc92563b5b45007c94057c1c423 (diff) | |
download | idea-767536605379e492929a763f4a585cb4f499b9f6.tar.gz |
Snapshot 246ebf4786ef75849985fa5fba6015155ebac527 from idea/132.637 of git://git.jetbrains.org/idea/community.git
246ebf4: better gradient colors for Darcula
8833be9: should be opaque
9a1a2f2: fix darcula text fields
001ed5d: add "perflib" from tools-base module to build
c348af4: Github: do not provide Git AuthData for wrong host
7424aca: Github: compare hosts case-insensitive
7ce90f4: fix double Shift on Windows
050b38c: check value of Required annotation; do not check required attributes of dom elements in XmlHighlightingVisitor; revive testing of required attribute validation in PluginXmlFunctionalTest
59d7274: IDEA-114873 (Add Package Info item to New submenu)
c4d7c3e: codestyle fix
9f3e60a: trace about substitutor once per derived class, in order to avoid excessive logging
27952b2: moved FinderRecursivePanel to platform-impl
94b9f06: IDEA-114850 Unreadable "No files are open" text
1fd5b2d: removing nested frameworks
4098566: capitalization (IDEA-81968)
10f8420: diagnose incorrect MixinEP registration (IDEA-113506)
35689ca: add apiVersion parameter to build.xml so that Android Studio can use exact platform build they're compatible with (IDEA-114596)
cb53ae1: Multiline support for regexp editor
ddef70e: Lens mode (hint location fixes)
f8d6bf8: disable escaper for balloons
99d486d: check for language
26fa119: support for java regexp modifiers
925000e: Ability to handle regexps with modifiers
67f1c14: automake is run only for the project where current user activity is going on (IDEA-104064)
d5cad13: fix naturalCompare() edge case
c1f7724: Merge remote-tracking branch 'origin/master'
862fb67: proper bounds for search everywhere button
d21dc3f: new shortcut for search everywhere
4283182: completely new UI
50e5c52: colors for white theme
08f4c9e: don't paint parent's background
0ed4058: active icon for Search Everywhere
17a6674: don't reset row height
52f84a7: IDEA-114694 Shift-Space is a terrible default shortcut for Search Everywhere
099ead0: dfa: exception handling reworked no more gosub-return causing equal states differing by offset stack only don't visit outer finally without visiting inner one
3744d2c: IDEA-114736 Bug in code completion inside instanceof block
377acad: correctly initialize semaphore for all BasicFuture implementations
81bfb1e: Lens mode (mouse wheel support & many fixes)
81d90a7: Get rid of extra UISettings notifications
2fb0092: Github: fix UrlToHost function
75f4e1f3: plugin advertisement: show disabled plugin name
8ed1b68: plugins advertisement: enabled installed plugin
53ad76d: IDEA-114708 Wrong Up/Down action interpretation in consoles (irb/Bash)
e818b6e: use fileEditor's editor instead of some random editor from dataContext
bd152a4: IDEA-89857 automatically adds required attributes in dom-based xml; insert correct endings for View/ViewGroup tags
7988d09: test for not building stubs for java files in module but not under source roots, in library but not in class root
131353b: IDEA-112134 $SELECTION$ variable doesn't work as true variable, but as $END$
cac9208f: item 1 of IDEA-95649 (Darcula: Settings -> File Templates doesn't follow theme colors)
ab2d2ca: remove color to display file template descriptions nicely under Darcula
7fb7911: use correct company name in version info (IDEA-82623)
5bd4249: WEB-8027 long single line values in debugger hang IntelliJ + review
4710a08: show editor notification for text mapped files about known plugins from the repository
62c87af: logging for incorrect move
eab3d4c: plugin advertising: stop if update was disabled
25584ad: Add MONTH_NAME_SHORT and MONTH_NAME_FULL definition & improve file template descriptions
4f10bd1: CR-IC-2706 (logging added)
eef188b: Add diagnostic info of invalid template ranges
fd7c9d0: EA-50616
618a573: license added?
d29c66e: Drivers management refactored
f280f8b: update netty (attempt to understand why nodejs disconnected on second run, but it was not netty fault)
15d9033: selecting right project type
4111497: http://ea.jetbrains.com/browser/ea_problems/50978
65eff28: EA-50605 - NPE: AbstractExternalSystemTaskConfigurationType.generateName
f43865d: Slightly reworked formatter markers' UI in accordance with IDEA-114583
8e51528: give file template description a bit more room
9d2f4f9: CR-IC-2705, fixed for Mac
55b6603: fix default file template descriptions
6fd90c1: Revert optimization, because MAC tests fail.
d11966f: IDEA-114766 Gradle: module dependency scope ignored while project info resolving
359ddf8: IDEA-114647 (fsnotifier size check updated)
0f10404: license added
780fa6e: allow watching exFAT (IDEA-114647)
f8dc1eb: lib license added
efb3281: testdata for IDEA-67591
993fb34: highlighting for incompatible return types in type parameter inheritors (IDEA-57274)
e03245e: Cleanup (comment)
51a77de: platform: garbage production by FIleWatcher reduced
06b198e: Cleanup (typo; dead code)
d8729d5: platform: partial refresh fixed
af0637c: Merge remote-tracking branch 'origin/master'
121ee3e: Add helper method for pretty-printing JSON in TaskUtil class. Improve logging in GenericRepository.
461c6d7: testng: parameterized template (IDEA-114746)
5a50ed8: do not detach copyright updater on project closed (IDEA-114186)
f06771b: restart infer nullity when library already exist (IDEA-114163)
b33fa7f: effectively final: check flow at variable start (IDEA-114737)
46e9f4b: testdata for IDEA-57252
82b6b16: testdata for IDEA-67518
6a9313c: type parameter in bounds check: separate wildcards with type param in bound
efc19ab: new inference: do not ignore meaningful upper bounds
cbff339: Optimization: don't use FileUtil.pathsEqual() , paths returned by FileWatcher is already canonical.
2723de7: don't fold already concise getters (EA-50804)
17dae78: IDEA-114699 Live template without description shows "NULL"
56e5602: a simpler way to setup live templates in tests
3ea2e38: Jediterm updated.
a47f9d3: Change cache lookup logic in XML and JSON response handlers
4ce5dec: Don't urlencode "serverUrl" template variable in GenericRepository fields
38c05d9: IDEA-114076 Unit tests can't be executed with a JRE 1.5 because junit-rt.jar is compiled with JRE 6.0 as target
bb8bb2a: moved to analysis
376fe99: moved to analysis
ff48d6d: moved to analysis
3fcf2d5: moved to analysis
1825351: moved to analysis
563ffda: moved to analysis
dc477a1: moved to analysis
3c18086: moved to analysis
472bab7: moved to analysis
473e45d: moved to analysis
65f35d7: moved to analysis
a36aaf6: moved to analysis
5f10c64: moved to analysis
c3bf35d: moved to analysis
b6fbbb6: moved to analysis
6a9d91b: moved to analysis
7582706: moved to analysis
ef37a6c: moved to analysis
1ea667f: moved to analysis
8985a7e: moved to analysis
37691e0: moved to analysis
08ba033: moved to analysis
f069df4: moved to analysis
3ac7210: moved to analysis
5e9a1e1: moved to analysis
74ecd51: moved to analysis
33f20b1: moved to analysis
936f232: read action
da37289: moved to analysis
e0e3724: moved to analysis
53e0050: moved to analysis
5240818: moved to analysis
50f7722: moved to analysis
8b64b6d: moved to analysis
62c27c4: moved to analysis
0dba483: moved to analysis
c7bfbeb: moved to analysis
6bf16de: moved to analysis
180ea57: moved to analysis
b8fcd01: moved to analysis
b19c765: moved to analysis
636378c: moved to analysis
7c63c331: moved to analysis
b47e90d: moved to analysis
44e0bd5: moved to analysis
4957a2c: moved to analysis
bad582a: moved to analysis
2a4c6df: moved to analysis
bf5ae61: moved to analysis
f547ee5: moved to analysis
c6d5ca6: moved to analysis
c3dc3f2: moved to analysis
27f40d2: moved to analysis
82cc0c1: moved to analysis
e309872: moved to analysis
c6806d7: moved to analysis
66b131c: test fix
5819121: moved to analysis
ace2035: moved to analysis
300fed6: moved to analysis
73d5646: moved to analysis
1efaa3b: moved to analysis
930eabe: moved to analysis
34c381d: moved to analysis
8094570: moved to analysis
bb3273c: moved to analysis
aec65a6: moved to analysis
cbc892a: moved to analysis
b42dc77: moved to analysis
ba6923d: moved to analysis
2283aa0: moved to analysis
1aeb0d3: moved to analysis
e08c9f1: moved to analysis
03cd373: moved to analysis
caaf810: moved to analysis
0e924cf: moved to analysis
f3e0d0a: moved to analysis
51ec5ea: moved to analysis
94fb66f: moved to analysis
6aaaaae: moved to analysis
08e51ae: moved to analysis
cf12745: moved to analysis
b34f44f: moved to analysis
37f3cdc: moved to analysis
036a2b6: moved to analysis
4931ffa: moved to analysis
8e59ca1: moved to analysis
02c0c01: moved to analysis
89a55b0: moved to analysis
cba23f4: moved to analysis
1b1fb1c: moved to analysis
bd725cd: moved to analysis
dfcc51d: moved to analysis
fad8af3: moved to analysis
827e5a5: moved to analysis
2360dcd: moved to analysis
008c56a: moved to analysis
758ba60: moved to analysis
731c642: moved to analysis
d5adf28: moved to analysis
b892f8b: moved to analysis
7513254: moved to analysis
e3a752c: moved to analysis
03219ce: moved to analysis
f06ad8a: moved to analysis
2c4614a: moved to analysis
4e076dd: moved to analysis
7f3ee23: moved to analysis
50835cc: moved to analysis
ff01a67: moved to analysis
084113a: moved to analysis
e197319: moved to analysis
1d7f251: moved to analysis
e2fc894: moved to analysis
d48b36b: EA-50870 - IAE: GroovyPropertyUtils.getGetterNameNonBoolean
0fb3c6e: IDEA-57747 (Idea X - CTRL+SHIFT+Left/Right Arrow functionality)
2cbff34: Github: use standard YesNoDialog
53782b5: Github: use strict class check
a42b1d9: when launching build process or javac server suppress libraries from 'ext' directories to ensure compiler is loaded from correct location
f40dfd1: OC-8512 Exception when typing on empty line at non-zero column during indexing
917a3a1: cleanup
c821ba0: moved to analysis
56da4ee: moved to core
38dbce1: cleanup
d8bd506: ForkJoin support
9f4a9d0: moved to analysis
da9996b: moved to analysis
f44d265: fix due to CR-IC-2640 comment
75b7026: Merge remote-tracking branch 'origin/master'
48e70d3: used lower level char buffer instead of document.getText() due to CR-IC-2640 comment
1271549: project structure: increased default size of source roots tree
a24ebae: Merge remote-tracking branch 'origin/master'
a9fc3c6: cleanup
adb2f16: diagnostics for EA-50397 - assert: TextRange.<init>
2244946: EA-50612 - NPE: EditorWindow$.run
a64cbc3: Logger renamed to more specific name
2cbf40b: EA-50756 - NPE: DefaultXmlExtension.getAvailableTagNames diagnostics
c25431e: new inference: skip inference for nested call when nested call was initially requested to be inferred
5fda195: detailed diagnostic for compiler class loading problems
c178ebf: workaround for EA-49915, EA-50599
5e7f578: go to the errors first by default
42ad23d: when matching local variables slots and variable names from sources take into account loop and catch statements
69424d4: run test method from abstract class: ignore non-runnable inheritors; try to retrieve from context implicitly selected inheritor (IDEA-114551)
8e51c80: override: fix param names in javadoc (IDEA-114557)
977e332: PY-11027 (ignore placeholder argument from non-compliant DEs)
c3af1f1: Merge remote-tracking branch 'origin/master'
fa5fa39: Test skipped for Win XP
bad439d: execution tests probably fixed
1e54387: range changed (IDEA-114528)
93c8631: infer nullity: more pessimistic check: check variables first (IDEA-114630)
6fb01cd: global inspections documentation cleanup
087b52a: WEB-445 "Select word at caret" a bit to grabby in class attributes
046efd8: highlight missing package-info.java in editor too
b525330: Errors
beef6c6: GroovyDirectInheritorsSearcher: avoid unnecessary collection->array copying
0596f3d: remove @NotNull from SortedMap#comparator (IDEA-114655)
eb9828f: IDEA-114203: Add new "Options" tab in YouTrack repository editor where user can customize states names
4371063: Delete repository problem notification
b8d1054: CR-IC-2693
3f3b474: CR-IC-2690
0ce5ae9: displaying version number in tree
2271eaf: IDEA-114633 (symlink deletion regression fixed)
569a70d: Cleanup (FileUtil tests grouped)
9fdcf65: Cleanup (formatting)
ca49f7d: Cleanup (unnecessary condition)
46d04cb: FrameworkLibraryVersion separated from FrameworkVersion
a8fc158: recognize IBM JDK from WebSphere 8 (IDEA-90661)
65f1157: Merge branch 'svn1_8_new'
f165eb7: named NodeRendererImpl constructor; adjust test expectations
117f86f: corrected
e173999: FrameworkGroupVersion dropped
9948d9d: Merge remote-tracking branch 'origin/master'
76f6788: fix exception on some linux machines
f6f6664: IDEA-114517 Use server url (and not repository url) as authentication realm for https server certificate
5e77c10: IDEA-114517 Force certificate errors checking before credentials error checking
13c6c0a: Merge remote-tracking branch 'origin/master'
784bfa5: Merge remote-tracking branch 'origin/master'
9f25ff8: jdk8 compilation
80265c1: plugin advertiser: escape # in feature implementation
efc8a3d: EA-50528 - MJE: JsonReader.syntaxError
2e10f33: IDEA-99241 (Report package naming convention violations in the editor)
1cc2fa4: made fields final
4374c69: replace exception-driven control flow with the proper one
f0cba21: moved to analysis
d9b6c0f: moved to psi
f8c15cf: moved to psi
836e381: cleanup
2e0029d: moved to analysis
6484602: make TempFileSystem extends LocalFileSystem to simplify clients and tests
662eb80: cleanup
0ebcf72: moved to analysis
250fff4: moved to analysis
3906227: moved to analysis
a24ae6d: moved to analysis
e8fc8c6: moved to psi
7a468ca: moved method to core
82060fd: cleanup
04c524c: reduce dependency on LocalFileSystem
8cdab66: frameworks tree refactored
9b45d86: WEB-9563 There is a bug with Emmet and BEM namings
29ecf27: guess DTD by public id #WEB-9546 fixed
c697898: JavaEE frameworks sorted out
6dc8386: less side effects
99e0eae: test is back
e2d2093: Gradle: gradle-native deps added
7507dc5: do not autoscroll when in focus, e.g. selection changing action may be triggered directly from structure
346c501: add model change support & some formatting
d6ff1a1: Merge remote-tracking branch 'origin/master'
b6a044a: Respect auto-save and auto-sync settings.
e1f4afb: IDEA-60234 Automatically unwrap groovy.lang.Reference in the debugger
0dcb367: make topic final
c5ce0b8: IDEA-114604 Evaluate Expression doesn't change context after navigating call stack +review
f9411d3: cleanup
89d03b1: overrides
147d5ea: cleanup
aef6c9e: extracted method to avoid code duplication
4cffaf3: on rebuild clear system caches for compilers run internally in IDEA
f72bc3d: add darcula green color
31d24b4: better colors for darcula
4ef7b0c: glow color for IntelliJ laf
36aad83: refactor button and checkbox
9181562: search field style for IntelliJ LaF
cff6f4b: use triangles in IntelliJ LaF trees
c4ebcef: add IntelliJ LaF
dee1ff7: IntelliJ laf
a152352: customize Darcula LaF from IntelliJ LaF
6e97b12: tree icons for IntelliJ LaF
69dbc89: inference: do not check return type during inference; separate highlighting check
9e060c7: cast
51f471a: Format pom.xml on create new module.
2624ec6: IDEA-114593 Debugger: Show variable information when no debug info
1918d6e: overrides, nullability
c463545: platform: race between JNA and environment loading fixed
943cea6: Accidentally forget to add annotator to plugin.xml
0dc87d5: IDEA-50801 Evaluate expression: expand root node automatically +review
79c7ba5: overrides
5e841a7: fix testdata
7c84b97: Update JqlAnnotator to highlight JqlIdentifiers as constants, not as strings, to be consistent with YouTrack queries colors
e0ac1f1: Merge remote-tracking branch 'origin/master'
dfc9912: fixed PY-10964 Extract variable doesn't work as expected inside brackets fixed PY-10221 Refactor->Extract->Variable may break square bracket symmetry and may break user input
9c38ae3: Extract pretty-printing of XML responses to helper method in TaskUtil, use StringUtil.notNullize in YouTrackIntellisense models.
6c49b66: IDEA-114523 Fixed svn executable version parsing - support arbitrary text after version (in executable output)
7157489: Make myWorkspaceMap and myUnresolvedCollector volatile.
35e76f4: Comment for getNameThroughCopies method added
cb377a5: spelling fixed
b5eeae5: svn: Refactored RootUrlInfo - utilize underlying Node instance (instead of just copying fields)
b615000: IDEA-113670 Reformat+rearrange per-language setting [CR-IC-2682]
b37e22e: Merge remote-tracking branch 'origin/master'
7a40a2c: svn: @NotNull/@Nullable for NestedCopyInfo and RootUrlInfo parameters
05e6734: cleanup
60b90f9: cleanup
6e534ce: update netty (07 oct 4.1 Alpha build) Updated, but ref error was our fault, it is not netty bug.
b1d9994: inference: filter out inaccessible for method ref methods
56be1b2: svn: Updated detection if svn roots were changed - added error roots tracking
265806c: svn: Simplified svn executable validation logic - removed explicit major version check
3aadab0: svn: Removed check "if working copy format of project root is compatible with command line client" (during svn executable validation)
be91b71: svn: Added notification about errors during svn roots detection
7e742f4: Merge remote-tracking branch 'origin/master'
1c1e2ee: svn: Extracted showing "Subversion Working Copies Information" panel to separate method
16b2321: EA-50707 - assert: TextRange.<init>
35546a0: new inference: ignore captured variables incorporation phase
8c0d7a1: testRunner: wording (IDEA-114500) as attached state is everywhere checked separately
9641ede: plugins notification: hide notification before dialog is shown
3ecdadc: ctors closed
199a379: framework roles
2d68bc5: platform: hidden Windows root dir with NIO2 attribute reader fixed
5ff5b2e: IDEA-113961 (ownership checking)
498d04f: IDEA-113961 (permissions in file attributes deprecated and interned)
d9f1d4f: Cleanup (pointless assertion)
415b782: svn: Implemented ability to view svn roots detection errors in "Subversion Working Copies Information" panel
f1ecb53: svn: Refactored RootUrlInfo - utilize Node instance on which RootUrlInfo is based
b726526: svn: Implemented ability to detect svn roots when working copy format does not correspond to used client (SVNKit or executable could not perform commands on the working copy - for instance, when client is old or working copy upgrade required)
67bdd3a: svn: Implemented ability to resolve client factory and working copy format without checking detected svn roots
b15784f: add some ways for reuse in DB part & cleanup
8dae62f: do not proceed with painting if placeHolder text was really painted, i.e. skip error markup, selection, etc
5795402: new inference: reject explicitly typed lambda as pertinent to applicability if its return statements are poly
ae3b46c: new inference: temp: ignore inferred Object at first stage
8d2b3e3: new inference: accept methods in lambda return statement as poly without additional checks
5c40157: fixed NPE
5bf3698: Reimplement select word tests for CSS, CoffeeScript, Ruby, Python, Sass, Scss and Less
a99db1d: Add test utility method for select word action testing
203e791: prefer variants without leading underscores when case sensitivity=first letter (OC-3547)
4af89f65: IDEA-114514 Grammar error in "Library already exists" dialog
215044f: Allow current element selection in StructureViewer for non-editors.
4ddd1f8: dont' copy editor markup model in language console
f2ec48d: extends and implements clauses should always exist in type definitions
c3ef7a1: GroovyBlockWithRange
f0b2208: Merge remote-tracking branch 'origin/master'
c495919: Merge remote-tracking branch 'origin/master'
7ae82a0: Save documents on switch to terminal refresh VFS on switch from it (PY-10944).
14cc2d5: IDEA-114534 Gradle: cancelation of gradle tasks for "out-of-process" mode
4684ba7: Add package-info.java checking to "Declaration has problems in Javadoc references" inspection
53c1eff: [log] Move logProvider extension point to the right place: vcs-log.xml
b667798: decode file name for quickfix #WEB-9559 fixed
bb34511: new inference: ignore inferred wildcards in return position
74aa35f: new inference: postpone resolve as long as possible
506188d: new inference: mark unresolved calls as poly expressions
3b99b77: Refactor annotator to use visitor
57f9383: Add annotator for inspecting some common errors in JQL queries
c889c0a: svn: Refactored vcs roots detection - CopiesDetector moved/renamed to separate class, detection output extracted to separate class
cf66975: svn: Forced status command result contain repository root url (resolved with corresponding info command)
2a7389c: svn: Refactored Node class to have notnull fields
69d918e: svn: Refactored WCInfo - utilize RootUrlInfo on which WCInfo is based (instead of just copying fields)
a9da4bc: svn: Refactored RootUrlInfo - removed setType() usages where possible
5f09493: svn: Refactored nested copy detection - removed unused code
6eee591: svn: Refactored nested copy detection - extractions, renames, simplified logic
b3eeb5e: svn: Refactored nested copy detection - use instance instead of static methods
238c879: svn: Refactored nested copy detection - removed Real class
38db9bf: svn: Refactored nested copy detection - moves, renames
dd8b94c: svn: Refactored nested copy detection - simplified data structures for storing nested copies (while collecting changes with ChangeProvider)
8fbc758: svn: Refactored filtering roots that are not actually working copies - methods extracted, logic simplified
66608ee: svn: Refactored inner/external working copies detection - removed unused code
06f90ae: svn: Refactored inner/external working copies detection - methods extracted, logic simplified
b44d86f: svn: Refactored nested copies detection by folder status - simplified code flow
e397390: svn: Replaced working copy format detection using SVNStatus.getWorkingCopyFormat() with SvnVcs.getWorkingCopyFormat() (1.7 and 1.8 both have "12" entries file format and previously 1.7 was always returned for command line status command)
f0a4f49: svn: Refactored working copy format detection for rollback missing files/directories - do not use SVNStatus.getWorkingCopyFormat()
0bdd518: svn: Refactored getting changelist name from SVNStatus - removed duplication and check if working copy format supports change lists
054bf7f: svn: Refactored CommandUtil.escape (simplified)
e211be2: svn: Removed unused WorkingCopyFormat parameter from StatusReceiver
8d5fffd: svn: Fixed "upgrade working copy format" dialog - always make current working copy format enabled
Change-Id: I928a2caf9bf9d566fb9f556ce39acb5111119c9c
Diffstat (limited to 'xml/impl')
11 files changed, 108 insertions, 50 deletions
diff --git a/xml/impl/src/com/intellij/application/options/XmlLanguageCodeStyleSettingsProvider.java b/xml/impl/src/com/intellij/application/options/XmlLanguageCodeStyleSettingsProvider.java index 0541efe026b1..651c71e7ee7d 100644 --- a/xml/impl/src/com/intellij/application/options/XmlLanguageCodeStyleSettingsProvider.java +++ b/xml/impl/src/com/intellij/application/options/XmlLanguageCodeStyleSettingsProvider.java @@ -44,6 +44,7 @@ public class XmlLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSetti public CommonCodeStyleSettings getDefaultCommonSettings() { CommonCodeStyleSettings xmlSettings = new CommonCodeStyleSettings(getLanguage()); CommonCodeStyleSettings.IndentOptions indentOptions = xmlSettings.initIndentOptions(); + xmlSettings.setForceArrangeMenuAvailable(true); // HACK [yole] if (PlatformUtils.isRubyMine()) { indentOptions.INDENT_SIZE = 2; diff --git a/xml/impl/src/com/intellij/application/options/emmet/EmmetOptions.java b/xml/impl/src/com/intellij/application/options/emmet/EmmetOptions.java index d41799aab632..01f0e5d84428 100644 --- a/xml/impl/src/com/intellij/application/options/emmet/EmmetOptions.java +++ b/xml/impl/src/com/intellij/application/options/emmet/EmmetOptions.java @@ -18,6 +18,7 @@ package com.intellij.application.options.emmet; import com.intellij.application.options.editor.WebEditorOptions; import com.intellij.openapi.application.PathManager; import com.intellij.openapi.components.*; +import com.intellij.util.containers.ContainerUtil; import com.intellij.util.xmlb.XmlSerializerUtil; import com.intellij.xml.XmlBundle; import org.jetbrains.annotations.NotNull; @@ -43,8 +44,8 @@ public class EmmetOptions implements PersistentStateComponent<EmmetOptions>, Exp private int myEmmetExpandShortcut = WebEditorOptions.getInstance().getZenCodingExpandShortcut(); private boolean myFuzzySearchEnabled = true; private boolean myAutoInsertCssPrefixedEnabled = true; - @Nullable - private Map<String, Integer> prefixes = null; + @NotNull + private Map<String, Integer> prefixes = ContainerUtil.newHashMap(); public boolean isBemFilterEnabledByDefault() { @@ -121,7 +122,7 @@ public class EmmetOptions implements PersistentStateComponent<EmmetOptions>, Exp return ServiceManager.getService(EmmetOptions.class); } - @Nullable + @NotNull @Deprecated //use {@link CssEmmetOptions} public Map<String, Integer> getPrefixes() { @@ -131,7 +132,7 @@ public class EmmetOptions implements PersistentStateComponent<EmmetOptions>, Exp @SuppressWarnings("UnusedDeclaration") @Deprecated //use {@link CssEmmetOptions} - public void setPrefixes(@Nullable Map<String, Integer> prefixes) { + public void setPrefixes(@NotNull Map<String, Integer> prefixes) { this.prefixes = prefixes; } } diff --git a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java index ed7102fd314b..d56b27def7ba 100644 --- a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java +++ b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightVisitor.java @@ -289,7 +289,10 @@ public class XmlHighlightVisitor extends XmlElementVisitor implements HighlightV } } - checkRequiredAttributes(tag, name, elementDescriptor); + if (!(elementDescriptor instanceof XmlHighlightingAwareElementDescriptor) || + ((XmlHighlightingAwareElementDescriptor)elementDescriptor).shouldCheckRequiredAttributes()) { + checkRequiredAttributes(tag, name, elementDescriptor); + } if (elementDescriptor instanceof Validator) { //noinspection unchecked diff --git a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightingAwareElementDescriptor.java b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightingAwareElementDescriptor.java new file mode 100644 index 000000000000..2ef2f498151c --- /dev/null +++ b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/XmlHighlightingAwareElementDescriptor.java @@ -0,0 +1,24 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight.daemon.impl.analysis; + +/** + * @author Eugene.Kudelevsky + */ +public interface XmlHighlightingAwareElementDescriptor { + + boolean shouldCheckRequiredAttributes(); +} diff --git a/xml/impl/src/com/intellij/codeInsight/editorActions/HtmlSelectioner.java b/xml/impl/src/com/intellij/codeInsight/editorActions/HtmlSelectioner.java index 8cc670ecc513..cae403a9d85a 100644 --- a/xml/impl/src/com/intellij/codeInsight/editorActions/HtmlSelectioner.java +++ b/xml/impl/src/com/intellij/codeInsight/editorActions/HtmlSelectioner.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,11 +41,21 @@ import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.xml.*; import com.intellij.util.containers.ContainerUtil; import com.intellij.xml.util.HtmlUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import java.util.LinkedList; import java.util.List; public class HtmlSelectioner extends AbstractWordSelectioner { + private static final SelectWordUtil.CharCondition JAVA_IDENTIFIER_AND_HYPHEN_CONDITION = new SelectWordUtil.CharCondition() { + @Override + public boolean value(char ch) { + return Character.isJavaIdentifierPart(ch) || ch == '-'; + } + }; + public boolean canSelect(PsiElement e) { return canSelectElement(e); } @@ -57,7 +67,7 @@ public class HtmlSelectioner extends AbstractWordSelectioner { return false; } - public List<TextRange> select(PsiElement e, CharSequence editorText, int cursorOffset, Editor editor) { + public List<TextRange> select(PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result; if (!(e instanceof XmlToken) || @@ -77,11 +87,11 @@ public class HtmlSelectioner extends AbstractWordSelectioner { PsiFile psiFile = e.getContainingFile(); FileType fileType = psiFile.getVirtualFile().getFileType(); - addAttributeSelection(result, e); + addAttributeSelection(result, editor, editorText, e); final FileViewProvider fileViewProvider = psiFile.getViewProvider(); for (Language lang : fileViewProvider.getLanguages()) { final PsiFile langFile = fileViewProvider.getPsi(lang); - if (langFile != psiFile) addAttributeSelection(result, fileViewProvider.findElementAt(cursorOffset, lang)); + if (langFile != psiFile) addAttributeSelection(result, editor, editorText, fileViewProvider.findElementAt(cursorOffset, lang)); } EditorHighlighter highlighter = HighlighterFactory.createHighlighter(e.getProject(), psiFile.getVirtualFile()); @@ -92,11 +102,8 @@ public class HtmlSelectioner extends AbstractWordSelectioner { return result; } - private static void addTagSelection(CharSequence editorText, - int cursorOffset, - FileType fileType, - EditorHighlighter highlighter, - List<TextRange> result) { + private static void addTagSelection(CharSequence editorText, int cursorOffset, FileType fileType, + @NotNull EditorHighlighter highlighter, @NotNull List<TextRange> result) { int start = cursorOffset; while (true) { @@ -136,7 +143,8 @@ public class HtmlSelectioner extends AbstractWordSelectioner { } } - private static void addAttributeSelection(List<TextRange> result, PsiElement e) { + private static void addAttributeSelection(@NotNull List<TextRange> result, @NotNull Editor editor, + @NotNull CharSequence editorText, @Nullable PsiElement e) { final XmlAttribute attribute = PsiTreeUtil.getParentOfType(e, XmlAttribute.class); if (attribute != null) { @@ -144,6 +152,9 @@ public class HtmlSelectioner extends AbstractWordSelectioner { final XmlAttributeValue value = attribute.getValueElement(); if (value != null) { + if ("class".equalsIgnoreCase(attribute.getName())) { + addClassAttributeRanges(result, editor, editorText, value); + } final TextRange range = value.getTextRange(); result.add(range); if (value.getFirstChild() != null && @@ -153,4 +164,17 @@ public class HtmlSelectioner extends AbstractWordSelectioner { } } } + + private static void addClassAttributeRanges(@NotNull List<TextRange> result, @NotNull Editor editor, + @NotNull CharSequence editorText, @NotNull XmlAttributeValue attributeValue) { + final TextRange attributeValueTextRange = attributeValue.getTextRange(); + final LinkedList<TextRange> wordRanges = ContainerUtil.newLinkedList(); + SelectWordUtil.addWordSelection(editor.getSettings().isCamelWords(), editorText, editor.getCaretModel().getOffset(), wordRanges, + JAVA_IDENTIFIER_AND_HYPHEN_CONDITION); + for (TextRange range : wordRanges) { + if (attributeValueTextRange.contains(range)) { + result.add(range); + } + } + } } diff --git a/xml/impl/src/com/intellij/codeInsight/template/HtmlContextType.java b/xml/impl/src/com/intellij/codeInsight/template/HtmlContextType.java index 566309103d25..8dc1f1abfb4f 100644 --- a/xml/impl/src/com/intellij/codeInsight/template/HtmlContextType.java +++ b/xml/impl/src/com/intellij/codeInsight/template/HtmlContextType.java @@ -21,7 +21,7 @@ import com.intellij.lang.html.HTMLLanguage; import com.intellij.lang.xhtml.XHTMLLanguage; import com.intellij.openapi.fileTypes.StdFileTypes; import com.intellij.psi.PsiFile; -import com.intellij.psi.util.PsiUtilBase; +import com.intellij.psi.util.PsiUtilCore; import org.jetbrains.annotations.NotNull; /** @@ -34,7 +34,7 @@ public class HtmlContextType extends FileTypeBasedContextType { @Override public boolean isInContext(@NotNull PsiFile file, int offset) { - return isMyLanguage(PsiUtilBase.getLanguageAtOffset(file, offset)) && !XmlContextType.isEmbeddedContent(file, offset); + return isMyLanguage(PsiUtilCore.getLanguageAtOffset(file, offset)) && !XmlContextType.isEmbeddedContent(file, offset); } static boolean isMyLanguage(Language language) { diff --git a/xml/impl/src/com/intellij/codeInsight/template/XmlContextType.java b/xml/impl/src/com/intellij/codeInsight/template/XmlContextType.java index 478fc007f063..7e9eb9cb8c3f 100644 --- a/xml/impl/src/com/intellij/codeInsight/template/XmlContextType.java +++ b/xml/impl/src/com/intellij/codeInsight/template/XmlContextType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ import com.intellij.lang.Language; import com.intellij.lang.xml.XMLLanguage; import com.intellij.openapi.fileTypes.StdFileTypes; import com.intellij.psi.PsiFile; -import com.intellij.psi.util.PsiUtilBase; +import com.intellij.psi.util.PsiUtilCore; import org.jetbrains.annotations.NotNull; /** @@ -34,12 +34,12 @@ public class XmlContextType extends TemplateContextType { @Override public boolean isInContext(@NotNull PsiFile file, int offset) { return file.getLanguage().isKindOf(XMLLanguage.INSTANCE) && !isEmbeddedContent(file, offset) && - !HtmlContextType.isMyLanguage(PsiUtilBase.getLanguageAtOffset(file, offset)) && + !HtmlContextType.isMyLanguage(PsiUtilCore.getLanguageAtOffset(file, offset)) && file.getFileType() != StdFileTypes.JSPX && file.getFileType() != StdFileTypes.JSP; } public static boolean isEmbeddedContent(@NotNull final PsiFile file, final int offset) { - Language languageAtOffset = PsiUtilBase.getLanguageAtOffset(file, offset); + Language languageAtOffset = PsiUtilCore.getLanguageAtOffset(file, offset); return !(languageAtOffset.isKindOf(XMLLanguage.INSTANCE) || languageAtOffset instanceof XMLLanguage); } } 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 f259f1741cf4..6fc27d723a62 100644 --- a/xml/impl/src/com/intellij/codeInsight/template/emmet/ZenCodingTemplate.java +++ b/xml/impl/src/com/intellij/codeInsight/template/emmet/ZenCodingTemplate.java @@ -248,9 +248,7 @@ public class ZenCodingTemplate implements CustomLiveTemplate { }); } - public void wrap(final String selection, - @NotNull final CustomTemplateCallback callback - ) { + public void wrap(final String selection, @NotNull final CustomTemplateCallback callback) { InputValidatorEx validator = new InputValidatorEx() { public String getErrorText(String inputString) { if (!checkTemplateKey(inputString, callback)) { @@ -267,9 +265,9 @@ public class ZenCodingTemplate implements CustomLiveTemplate { return checkInput(inputString); } }; - final String abbreviation = Messages - .showInputDialog(callback.getProject(), XmlBundle.message("zen.coding.enter.abbreviation.dialog.label"), - XmlBundle.message("zen.coding.title"), Messages.getQuestionIcon(), "", validator); + final String abbreviation = Messages.showInputDialog(callback.getProject(), + XmlBundle.message("zen.coding.enter.abbreviation.dialog.label"), + XmlBundle.message("zen.coding.title"), Messages.getQuestionIcon(), "", validator); if (abbreviation != null) { doWrap(selection, abbreviation, callback); } diff --git a/xml/impl/src/com/intellij/codeInsight/template/emmet/filters/BemEmmetFilter.java b/xml/impl/src/com/intellij/codeInsight/template/emmet/filters/BemEmmetFilter.java index 69b1adf67d8f..de39319a1726 100644 --- a/xml/impl/src/com/intellij/codeInsight/template/emmet/filters/BemEmmetFilter.java +++ b/xml/impl/src/com/intellij/codeInsight/template/emmet/filters/BemEmmetFilter.java @@ -29,6 +29,8 @@ import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.Collection; +import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.regex.Pattern; @@ -36,6 +38,7 @@ import java.util.regex.Pattern; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.collect.Iterables.*; +import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.newLinkedList; /** @@ -53,15 +56,17 @@ public class BemEmmetFilter extends ZenCodingFilter { private static final String MODIFIER_SEPARATOR = "_"; private static final String SHORT_ELEMENT_PREFIX = "-"; + private static final Joiner ELEMENTS_JOINER = Joiner.on(ELEMENT_SEPARATOR).skipNulls(); private static final Splitter ELEMENTS_SPLITTER = Splitter.on(ELEMENT_SEPARATOR); private static final Splitter MODIFIERS_SPLITTER = Splitter.on(MODIFIER_SEPARATOR).limit(2); private static final Splitter CLASS_NAME_SPLITTER = Splitter.on(' ').trimResults().omitEmptyStrings(); private static final Joiner CLASS_NAME_JOINER = Joiner.on(' '); private static final Function<String, String> CLASS_NAME_NORMALIZER = new Function<String, String>() { + @NotNull @Override public String apply(@NotNull String input) { - if(!input.startsWith(SHORT_ELEMENT_PREFIX)) { + if (!input.startsWith(SHORT_ELEMENT_PREFIX)) { return input; } @@ -122,7 +127,7 @@ public class BemEmmetFilter extends ZenCodingFilter { return node; } - private static Iterable<String> processClassName(String className, GenerationNode node) { + private static Iterable<String> processClassName(String className, @NotNull GenerationNode node) { className = fillWithBemElements(className, node); className = fillWithBemModifiers(className, node); @@ -155,20 +160,29 @@ public class BemEmmetFilter extends ZenCodingFilter { @NotNull private static BemState extractBemStateFromClassName(@NotNull String className) { - BemState result = new BemState(); + final BemState result = new BemState(); if (className.contains(ELEMENT_SEPARATOR)) { - List<String> blockElements = newLinkedList(ELEMENTS_SPLITTER.split(className)); - result.setBlock(getFirst(blockElements, "")); - if (blockElements.size() > 1) { - List<String> elementModifiers = newLinkedList(MODIFIERS_SPLITTER.split(blockElements.get(1))); - result.setElement(getFirst(elementModifiers, "")); - if (elementModifiers.size() > 1) { - result.setModifier(getLast(elementModifiers, "")); + final Iterator<String> elementsIterator = ELEMENTS_SPLITTER.split(className).iterator(); + result.setBlock(elementsIterator.next()); + + final Collection<String> elementParts = newLinkedList(); + while (elementsIterator.hasNext()) { + final String elementPart = elementsIterator.next(); + if (!elementsIterator.hasNext()) { + final List<String> elementModifiers = newArrayList(MODIFIERS_SPLITTER.split(elementPart)); + elementParts.add(getFirst(elementModifiers, null)); + if (elementModifiers.size() > 1) { + result.setModifier(getLast(elementModifiers, "")); + } + } + else { + elementParts.add(elementPart); } } + result.setElement(ELEMENTS_JOINER.join(elementParts)); } else if (className.contains(MODIFIER_SEPARATOR)) { - Iterable<String> blockModifiers = MODIFIERS_SPLITTER.split(className); + final Iterable<String> blockModifiers = MODIFIERS_SPLITTER.split(className); result.setBlock(getFirst(blockModifiers, "")); result.setModifier(getLast(blockModifiers, "")); } @@ -322,6 +336,7 @@ public class BemEmmetFilter extends ZenCodingFilter { return isNullOrEmpty(block) && isNullOrEmpty(element) && isNullOrEmpty(modifier); } + @Nullable public BemState copy() { return new BemState(block, element, modifier); } diff --git a/xml/impl/src/com/intellij/html/index/Html5CustomAttributesIndex.java b/xml/impl/src/com/intellij/html/index/Html5CustomAttributesIndex.java index ed4c271996f2..ed0538bf6820 100644 --- a/xml/impl/src/com/intellij/html/index/Html5CustomAttributesIndex.java +++ b/xml/impl/src/com/intellij/html/index/Html5CustomAttributesIndex.java @@ -24,9 +24,7 @@ import com.intellij.lexer.XHtmlHighlightingLexer; import com.intellij.openapi.fileTypes.FileTypeManager; import com.intellij.openapi.fileTypes.LanguageFileType; import com.intellij.openapi.fileTypes.StdFileTypes; -import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.openapi.vfs.ex.temp.TempFileSystem; import com.intellij.psi.tree.IElementType; import com.intellij.psi.xml.XmlTokenType; import com.intellij.util.containers.HashMap; @@ -98,11 +96,7 @@ public class Html5CustomAttributesIndex extends ScalarIndexExtension<String> { return new DefaultFileTypeSpecificInputFilter(StdFileTypes.HTML, StdFileTypes.XHTML) { @Override public boolean acceptInput(final VirtualFile file) { - if (file.getFileSystem() != LocalFileSystem.getInstance() && !(file.getFileSystem() instanceof TempFileSystem)) { - return false; - } - - return true; + return file.isInLocalFileSystem(); } }; } diff --git a/xml/impl/src/com/intellij/xml/refactoring/XmlTagRenameHandler.java b/xml/impl/src/com/intellij/xml/refactoring/XmlTagRenameHandler.java index 10ef18756a18..d913b72782d3 100644 --- a/xml/impl/src/com/intellij/xml/refactoring/XmlTagRenameHandler.java +++ b/xml/impl/src/com/intellij/xml/refactoring/XmlTagRenameHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,6 @@ import com.intellij.ide.TitledHandler; import com.intellij.lang.Language; import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.actionSystem.DataContext; -import com.intellij.openapi.actionSystem.LangDataKeys; -import com.intellij.openapi.actionSystem.PlatformDataKeys; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; @@ -36,7 +34,7 @@ import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; -import com.intellij.psi.util.PsiUtilBase; +import com.intellij.psi.util.PsiUtilCore; import com.intellij.psi.xml.XmlFile; import com.intellij.psi.xml.XmlTag; import com.intellij.refactoring.actions.BaseRefactoringAction; @@ -115,7 +113,7 @@ public class XmlTagRenameHandler implements RenameHandler, TitledHandler { return file.getViewProvider().findElementAt(offset); } if (file != null) { - final Language language = PsiUtilBase.getLanguageAtOffset(file, offset); + final Language language = PsiUtilCore.getLanguageAtOffset(file, offset); if (language != file.getLanguage()) { final PsiFile psiAtOffset = file.getViewProvider().getPsi(language); if (psiAtOffset instanceof XmlFile) { |