diff options
author | Tor Norbye <tnorbye@google.com> | 2014-06-10 18:12:50 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-06-10 18:12:57 -0700 |
commit | 9ea67227e8fdcf8ed37e65bb96e32767291d0f4f (patch) | |
tree | b9d56f49fde137a6098f7cec1aebeda51af705ef /java/java-tests/testData/codeInsight | |
parent | c667c1f74abd96a2098520effdd5afdff7f0d34b (diff) | |
download | idea-9ea67227e8fdcf8ed37e65bb96e32767291d0f4f.tar.gz |
Snapshot idea/138.538 from git://git.jetbrains.org/idea/community.git
a18cb3f: fix CCE
d7d596e: Groovy: Remove extra spaces after deleted statements. So no extra line feed in Introduce Variable appears
25032fc: Groovy traits : abstract trait methods are not clashing
acf850e: IDEA-126013 fix SOE : maps and lists declared recursively should not fail type inference into recursion
75e06bf: clashing trait methods inspection
7ae9c94: TypesUtil.getQualifiedName(type) should return qname even if type is not resolved
beaa518: GrClassReferenceType.rawType() should return raw type even if type is not resolved
2e95615: Groovy: don't use type.getCanonicalText() to infer type qualified name since it can lead to inferring of type parameters and wasting time
08c6e63: Skipping Ant "After Compilation" task if compilation completed with errors (IDEA-125901)
1856d07: SoftWrapModelImpl refactoring. Mocking SoftWrapPainter to make tests platform-independent.
6246ee2: unlock under finally
9ab9a99: corrected 'contains' for library scopes for files from library sources
2e7fcc7: Merge remote-tracking branch 'origin/master'
5928bf7: Merge remote-tracking branch 'origin/master'
718a6a5: removed explicit virtual file inequality
08cab53: Fixed shebang formatting (PY-12775).
24be689: http://ea.jetbrains.com/browser/ea_problems/57321
bf4c84d: http://ea.jetbrains.com/browser/ea_problems/57321
65944db: Merge remote-tracking branch 'origin/master'
5106fdd: better name: reuseActivation -> reuseToolWindowActivation
e1c9f77: Merge pull request 191 from suman-ganta for IDEA-123890
b66574a: Karma auto-rerun tests shouldn't activate Run toolwindow
56409a9: Karma auto-rerun tests shouldn't activate Run toolwindow every time
880a4db: added test for SurroundWithQuotesAnnotationParameterValueFix that checks that char '\n' replaces by "\n" correctly
f6a393d: lambda: fix parameter types comparing order (IDEA-126056)
ccdc69a: method references: avoid double substitution (IDEA-126062)
e05cddc: JavaFx SceneBuilder b-14 fix
c4e8b2c: Merge remote-tracking branch 'origin/master'
879c23d: PY-13210 Unused star import in Django settings.py
a4351eb: platform: profiling actions overhauled
5ec97cf: IDEA-81568 (ignore FS events from /private unless asked explicitly)
236752e: unused library: use existing graph instead of custom dependency analysis
2a1a7c8: IDEA-126047 - Git Clouds: show commit dialog on deploy
d05243d: prefer junit/testng pattern configuration: detect multiple selection directly by context component (IDEA-126045)
27f10a6: check to prevent contradicted intersection type (IDEA-67600)
046b90c: IDEA-114252 WebStorm clipboard history conflicts with external clipboard manager (ClipMenu) Fix native hangup (steps: periodical "Paste action" update() for toolbar button during Drag&Drop in AppCode UI Designer)
885a24d: don't even schedule excluded files for update upon before contents changed events
122cd32: check for invaild file
de3bf99: optimisation: reduce instances of DirectoryScope created
e2efe2e: cleanup
000bd7a: cleanup
68a5b6e: performance
732238f: performance
2f08301: check for type param numbers in java 1.6 should not rise error if super methods have type params (IDEA-57338)
598f921: testdata for IDEA-61415
6deb5bb: testdata for IDEA-65473
9853fb6: suspicious removeAll: compare type arguments, not qualifiers
1dc83a9: Added ability to pass command-line args to Gradle on project sync/refresh.
e61c327: fix binary compatibility
ef92f2f: fix binary compatibility
40875a7: fix binary compatibility
79d53fd: IDEA-118400 Update Project dialog redesigned, IDEA-106435 ability to perform only update, IDEA-75768 checks saved for Update dialog
d218629: Remove 'zen coding' from emmet support configurable
150b674: HTML: ignore unknown filters
2fac634: @NotNull
99d5348: Emmet CSS completion
2989429: EA-57291 (severity reduced as the real reason is logged earlier)
491dc5f: contract inference initial
bc12a14: extract contract checking to a separatate inspection
75c4257: MethodContract.createConstraintArray
109906e: WEB-12316 PhpStorm performing awful when typing in HTML zones in PHP files
91b7c69: check file on updateExecutionPoint
1591844: WEB-11678 JavaScript debug: step into and step over do not change the line
ec43ad0: Merge remote-tracking branch 'origin/master'
e58ce76: try unnecessary module dependencies to support exported dependencies
a9c8a08: IDEA-125568 (possible NPE in some test setup paths fixed)
2fdb004: Merge remote-tracking branch 'origin/master'
39cc27d: suggest to restart IDEA if user accepted to enable/disable plugins from startup notification (IDEA-121369)
693bbf6: encapsulate fields: preserve comments inside (IDEA-124747)
fcaa3e2: add java specific debugger settings into common settings node
1a3c6c6: code cleanup optimization: run inspections over exactly one element
4c3bda0: Get rid of direct "dispose" call
539f90a: WI-23626 Breakpoint muting does not disable after run. Regression from 7.1.3 to EAP 8.
ffcf607: junit: accept custom matcher descriptions (IDEA-125942)
de7387f: provide remove assignment fix for silly assignment inspection (IDEA-125993)
54e38ee: IDEA-121664 Search Everywhere: results from different categories appear mixed
99adcfd: EA-55292 (NPE fixed)
a87bf9b: Unneeded exception dropped
128b05b: Merge remote-tracking branch 'origin/master'
abc4ba7: GWT builder: test added
f76fea5: test added
30fe2c4: invoke 'save' after 'mark root' action to update iml files immediately
9f6fa54: registering output-to-buildTarget mapping instead of output-to-source mapping to address cases when multiple sources compile into the same output (e.g. Kotlin)
f06f5a6: Handle '@' symbol in ssh username
c142a3c: OC-9609 [Refactoring: common approach for Non-DumbAware mode in folding] +review CR-OC-1561
e4dbc27: fix problem with extending sorted set by one and attempting to increase random access capacity in case of value removal
aa0e217: use more detailed path to file only when opened file name is not unique (IDEA-125958)
fe72975: Marking DuplicateIndex as PsiDependentIndex to attempt to avoid problems with unsaved document indexing being asynchronously committed (EA-36001)
22db3a8: get rid of RowSorters to fix a few exceptions. New Plugin UI has its own table header without swing's row sorters
e5541c8: deprecation inspection uses default serialization
24077b1: push 'change method return type' fix down when variable is checked
65ec59f: icon decoration for external annotations (IDEA-39633)
8f10d71: option to warn about members in deprecated classes (IDEA-112084)
27ec65a: optimize imports under progress (IDEA-125761)
14d3780: Cleanup (formatting)
e5fcad3: revert (java: minor optimization)
f8e2be2: do not recreate breakpoint highlighter if not requested implicitly, this fixes jumping breakpoints on several quick line insertions
44fc624: sql: better varchar and varchar2 completion
b5d09fe: getEqualityObject() fixed for JS debugger
dc3bd73: call applyInformation for all EditorBoundPass for each editor
47336a6: cleanup
67c4e4b: calculate default inspection name by trimming Inspection or InspectionBase
4a0d396: notnull
a3f3988: cleanup
c8337a2: cleanup
8ad9eb1: moved long-running tests into performance suite
395ae29: expand javadoc on PSI validity
48c2fc4: special PIEAE handling for NULL_PSI_ELEMENT (its getUserData throws exceptions)
f3fe82e: IDEA-114252 WebStorm clipboard history conflicts with external clipboard manager (ClipMenu)
3d7f7d2: IDEA-125820 DOM Generator: problem with XML element names matching default/generated imports CR-IC-5549
eadc889: build initial foldings in background (improvements as per CR-IC-5531)
350760c: rename: detect "field would hide local" conflict (IDEA-125934)
0de6aa9: move: do not convert classes to files before move
35005bc: IDEA-125947 not initialized final field should not be raised on any refs from inner classes
62f7acd: plugins: take into account already installed plugins during dependencies check (IDEA-123767)
a673a47: softReference to cache known plugin extensions
3995088: update info: link to the product home page (IDEA-124023)
aa9a7b1: move: filter out nested dirs/files on actionPerformed, update should be fast (IDEA-111413)
e887cc3: Merge remote-tracking branch 'origin/master'
24c1fab: fix thread crash in debug console after syntax error (PY-12600)
49b602b: java: minor optimization
f5f8124: java: helper method for Kotlin
e674dd1: fixed PY-13177 PyCharm hangs on adding incorrect interpreter (python3-pyinotify)
5c41c76: Maven: manifest generation fixes - use ApplicationNamesInfo#getFullProductName for "Created-By" attribute value, redundant code removed
d2752f1: invalidNames is a bit confusing, let's use existingNames; also small cleanup
7b282c4: lots of EA-57109 - PIEAE: LeafPsiElement.invalid. attempt 2.
cf78c48: External System + Gradle: support for running a task before launch of another configuration added. Related issue for Gradle: IDEA-113437 'Before Launch' should support running a Gradle task
6396cd8: IDEA-125900 (resolve of synthetic enum methods in class files fixed)
bb35b26: Cleanup (cached value manager instead of boilerplate)
6f417af: reuse LocalQuickFix because several instances can be handled badly
c44d318: IDEA-104484 Console ExceptionFilters are added twice for debugging java app
e67157d: IDEA-125470 While in editor, wild re-displaying occurs when soft wraps are enabled
2de7658: folding model implementation cleanup
c7a1fbb: fixed NPE in debuggers that do not use value markers
159a46b: JavaRearranger: fixed field caching in case of multiple classes in java file (IDEA-123733)
b3f67525: Added scope and file mask filter to reformat directory/project/module dialogs (IDEA-59850) [CR-IC-5534]
c3a1eb8: Merge remote-tracking branch 'origin/master'
9d5429e: remove variable: do not leave tailing loops/ifs (IDEA-124489)
d6c14fb: Delete LightLexerTestCase
83abbd0: fixing OOME in tests
fd0acc2: temp disable 6520348e0292c4bb47389cb12926dc83826796e7
22c687d: Merge remote-tracking branch 'origin/master'
9102909: use goto.nonProjectScopeDisabler EP to show/hide 'include non-project files' checkbox
0dca1c3: use goto.nonProjectScopeDisabler EP to show/hide non-project items checkbox
def9b6f: EP to disable using Non-project scope for IDEs where this doesn't make sence
6520348: lots of EA-57109 - PIEAE: LeafPsiElement.invalid
1ecc94f: don't set Darcula UI in search text field if it's already set
2357251: rollback NPE fix (found the real problem)
f52fccd: Cleanup (optimization; formatting)
5d85b2b: spped search by value in debugger trees
7e5f8a2: fixed VM leak in debugger tree listener
8771d61: fixed VM leak in object marks
b9abbfb: template ConstructorInsertHandler test (IDEA-101429)
6713978: start type template if at least object was inferred
8540bac: RefCountHolder: allow referenced files' ast to be gc-ed during highlighting
716aa5a: generate name for save scheme dialog
c86e3af: external annotation change should drop all psi cachedValues
ae0bd0f: cleanup
26af3f5: implement equals and hashCode to make two LocalQuickFix instances equal if they refer to one and the same IntentionAction
0ade045: IDEA-125645 On breakpoint hit, opens file in new tab in "active" split -- even if file is already open in tab in "inactive" split
1881ceb: test — auto expressions: filter out expression contained unresolved local variable
3677585: IDEA-103523 MethodMayBeStaticInspection replace qualified usages by class name (reused MakeMethodStaticProcessor)
89905f6: don't hold reference to PsiFile
83bc4af: move AddSpaceInsertHandler.java to lang-impl
769a599: WEB-12348 Quick fixes not always working in Inspection window
18b220c: IDEA-90008 (editor files are refreshed elsewhere, no need to watch)
894818e: Cleanup (deprecated code dropped)
aba3f2f: CreateSwitchIntention removed all operations with Document to exclude possible problems
4c6818a: removed from IdeaPlugin SurroundWithQoutesIntention
044671d: Merge remote-tracking branch 'origin/master'
a109c22: IDEA-121370 Failed Gradle task doesn't block the dependent run configurations
fbf4eb5: Merge remote-tracking branch 'origin/master'
89f5018: imports optimized
baa6389: SurroundWithQuotesAnnotationParameter: intention replaced by quick fix to the corresponding error
5f7a426: no later runnable for anonymous class creation template
05d13a3: Get rid of needless filtering
a8660f4: use "OS user" term
cb71334: fix NPE on linux
930235e: notnull and remove unused field
c7cd901: notnull
83d5484: Color & Fonts panel: generate new name when copy
6cc553f: cleanup
fa4e0deb: remove unused class
e291480: correct checking read-only status for CreateSwitchIntention
cdd07a4: CreateSwitchIntention checks language level and that file is witable
11adc57: Cleanup (warning; unneeded reflection)
b6b5bbd: start template when anonymous class is completed with Object params (need better heuristic)
f9a561c: enable change type signature for anonymous classes
d645cf9: optimize icon
b393a47: IDEA-125825 Surround with quotes annotation parameter value intention
f5f2f31: IDEA-99541 New run configuration type to run Ant Return back ProcessHandler.waitFor() for standard task execution (not Run Configuration)
4112da6: IDEA-125872 (avoid resetting mod. stamp)
4b93641: fix html parsing (big thanks to cdr)
0b6b37c: notnull
4ffddd7: IDEA-125829 ClassInheritorSearch should find traits
2fe5331: fix compilation
9ddfbc8: IDEA-125730 Declare explicit type: broken template should revert all its changes and move the caret back to the original position.
8f5e205: IDEA-125759 correct assert check
59aef31: IDEA-125781 ReadAction in GroovyTraitFieldSearcher
d946471: IDEA-125730 correct item order in ChooseTypeExpression
9c99488: JS debugger in Chrome: support breakpoint conditions, better support for 'log evaluated expression', non-strict column number comparison
6b9f4a4: goto related localizations for properties files
3c06c05: fixed truncated object id
ee5bba7: ResourceBundleEditor: subeditors without virtual spaces (part of IDEA-85572)
9e358f4: CR-IC-5505 (cleanup)
69b649e: Offer to launch vagrant on skeletons generation in popup balloon.
82b7f75: Merge remote-tracking branch 'origin/master'
86ada28: Don't show modal dialog about vagrant start from packages list (PY-12838).
af40fe8: DataPointHolderConversionIntention not supports fields without initializer for conflicts escapings
0455ae8: NPE
02ca2bd: PsiBundle: fix typo in bundle name, cleanup
cc8d259: don't cache language level in JavaDirectoryService
60cbfb0: allow to create java classes named pkg.Class (IDEA-125442, CR-IC-5537)
b673277: ensure canonical module order in CE modules.xml
1388cfb: BaseElementAtCaretIntentionAction extends BaseElementAtCaretIntentionAction
a777074: IDEA-125558 new debugger: double result in evaluate expression - updated fix
add5377: reverted fix for IDEA-125558
5ad334b: AddJavadocIntention moved to "Declaration" category
b4f899b: notnull
dd53334: allow com.intellij.openapi.roots.impl.ModuleRootManagerImpl#getFileIndex to work in upsource
a28c2f4: register ExternalResourceManagerExImpl
9aa5346: EA-53941 - assert: FileManagerImpl.getCachedPsiFile
3b946e3: Merge remote-tracking branch 'origin/master'
62eeced: show notification if power save mode is on on startup (IDEA-125847)
d13982b: most specific: do not start java 8 algorithm for provided type args (IDEA-125855)
12a99d8: virtual array by selection rule (IDEA-125862)
610b0ba: IDEA-125820 DOM Generator: problem with XML element names matching default/generated imports
80199b4: DBE-19 0xDBE: edit description at Settings / Passwords
85c5cf1: Merge remote-tracking branch 'origin/master'
3efe19e: added help id for evaluate dialog
8456e04: IDEA-123787 "No live templates selected" label in multiple selection
9ce90b8: IDEA-124362 No scrollbar in Settings | Code Style | General
c04939b: auto expressions: don't compute for nested values
56917b3: make it by default and look at the performance
f30498b: Merge remote-tracking branch 'origin/master'
adae926: Don't ask to start Vagrant in a modal dialog on skeleton generation (PY-12838).
1315295: watches in tasks
57f4bbf: IDEA-125462 Unable to execute simple platform test with IDEA Ultimate Plugin SDK
9a56986: do not evaluate values twice
b7b995b: IDEA-54137 All alarms in RBE deleted. Save to file on focus change
c3b697a: IDEA-39879 Background color and gutter stripe color for bookmarks should be configurable
b893466: close editors only
08d3b73: NPE fixed
37cb86b6: fixed Color object icon renderer
a1ecb55: fixed switching multiple suspended threads in java
0c7e893: correctly load old enabled state of debugger expressions
6847fc3: IDEA-119364 (not introduces case statements for enum)
673d730: wrong shortcut suggested in goto test popup (IDEA-125857)
6a73a71: IDEA-108141 reused code of FixDocCommentAction
d03289c: IDEA-85274 Tasks: the detached editors are not affected by context change
a375d1e: java: correct stub for enums compiled by Groovy
c4edd41: aware of debugger communication error on break event
fd6ccfc: IDEA-125678 ConvertInterfaceToClassIntention.moveExtendsToImplements improved
0b0873d: IDEA-58422 implemented in IPP
ef6b09a: more possible reasons for non-physical file invalidation
745c9b0: IDEA-68916 "Zoom" for Mac OS
5372371: cleanup
c1810c1: cleanup
24cc395: Merge remote-tracking branch 'origin/master'
fd72f3e: javac 6 workaround (from IDEA-16723)
19af1ec: refactoring (following CR-IC-5531)
784512b: enum constants access inside enum constant initializers fixed (IDEA-125816)
b1b3b1d: accept intersection types in foreach stmts (IDEA-125800)
f1d927b: Mac: add app-title if project-title is empty
08f4caf: fix sorting
4559c7f: IDEA-123189 Project wizard: tree entries text cutoff
90bd11d: javadoc
6a6fa53: cleanup
b8be4e2: IDEA-125805 (language level increase quickfix for switch on enum/string)
75a492a: Cleanup (less repeated checks; less parameter pinballing)
b159632: testdata for IDEA-57388
656ce72: testdata for IDEA-67578
88a9ace: old inference: take only EQUALS bounds from sibling param (IDEA-119757)
dc3b3a9: try 'generate missed tests' without names check (IDEA-125818)
1dfcabe: javadoc fix
9b09325: moved to psi, register more services
f3cc359: register find usage providers
a0f8840: moved to psi
25fe38e: javadoc fix
6f7574c: dfa: invalid type diagnostics (IDEA-125179)
c9dff24: don't advertise Quick Definition when completion doesn't contain psi items (IDEA-87208)
43c06cfc: always use forward slashes in copy reference (IDEA-125292)
3dd0451: IDEA-125442 Strip .java from classname when creating new class
571196f: IDEA-125749 Create New Class Dialog - Pressing 'e' in Kind selects 'Interface' instead of 'Enum'
7a71a4d: External system: code cleanup
a635296: fix popup width jumping
9ea2438: IDEA-125609 - Built-in Git SSH executable ignores IDEA http proxy settings
f894389: IDEA-122962 - Clouds: perform connection test in background - auto-reload in CloudFoundry run configuration
494fbfe: renamed and more factories
309e1b1: provide empty quick fix factories for upsource
b78b8d0: initialize and register stub serializers
da59ab8: IDEA-125498 Search Everywhere: sometimes after navigation the list of search results reappears in the left corner of the screen
6549903: External System: IDEA-123031 Import sources and docs for module level libraries
b8d02c9: isValid
c59fbba: Reimplement parameter info test
50e11e6: fixed PY-13150 Pyramid run configuration fails when specifing '--reload' in additional option
320ecac: IDEA-39879 Background color and gutter stripe color for bookmarks should be configurable
ab780e0: WEB-12346 Watches pane: Adding/removing variable not possible when dragged out
4cdca43: Merge remote-tracking branch 'origin/master'
347094c: Merge remote-tracking branch 'origin/master'
b75e6ed: fixed tests
ae2b6c6: testdata fixed
37b352f: changelist preselection for file fixed and refactored
982e039: fix rendering issues
4dbfccf: registry ui improvements
16ce85a: notnull
4568663: IDEA-114011 Github: work with HTTP, not only with HTTPS
8cb550e: ExternalResourceManagerImpl inlined, moved to psi
ecff152: moved to core
2ff189c: removed "new in" which are not that new anymore
8787917: toString
6afd4f4: build initial foldings in background
9a121b2: EA-57104 - assert: PsiFileImpl.navigate
1080da4: IDEA-77640 Warn if the current subscription license will not work with the new version in the Update Info dialog
478fc87: test fixes and code unification
fda1430: update inspection and quickfix
287c944: OC-9609 [Java doc only] +review CR-OC-1561
71594cc: OC-9609 broken based on AST-tree folding at project opening +review CR-OC-1561
80ea2b9: better name for static method newOne -> of
b97e528: suppress contract validation for wrong Logger.assertTrue
5d8ee45: IDEA-112222 Validate @Contract annotation is related to the code
b09762d: cache properties files by bundle name and module
f25f58e: fix invalid PsiTreeUtil contract
97e0bde: remove unused VfsUtil.virtualToIFile
1f4d0df: notify BuildManager only if file events affect opened and watched projects (second part of IDEA-122685)
c503439: quickfix for IDEA-125710 (Wrong selection behavior in file history window)
5318e0e: fix assertion / comments / better transformation policy of array of changes / sorted ints into bit set
edeb5d2: testdata for IDEA-57290
b1b3964: testdata for IDEA-58692
af3e413: testdata for IDEA-24496
ae57176: provide 'place' language level for convertible check to allow types from old libraries to be casted to primitives (IDEA-117684)
2f6d5c9: testdata for IDEA-118362
f55b7ff: equality asymmetry fixed (IDEA-118533)
fdcb20b: type distinct prover asymmetry fixed (IDEA-118533)
6b5c924: suspicious collections call: process removeAll (IDEA-108755)
e9e9523: IDEA-125414 DB keys/indices to columns navigation
756b77b: accumulate index changes into array and convert it into bitset as needed
29f2788: track index info when encountering duplicated inputId
5803a5f: to Peter: addAll for emptySet doesn't work
61dbfe9: Merge remote-tracking branch 'origin/master'
95bc1fb: some more @MagicConstant
c3c31bd: EA-57052 - assert: MasterKeyPasswordSafe.decryptPassword
e761dd8: @NotNull'ed for EA-56831 - NPE: RemoteProcessSupport.release
9463bb3: Merge remote-tracking branch 'origin/master'
ff49bd1: use VirtualFile.nameSequence for isProjectOrWorkspaceFile check
248d752: restore classes merge with fix of foreach processing
fedbba7: Merge remote-tracking branch 'origin/master'
a494959: WeakReference objects used for vfile->document mapping should not stay in memory forever
8110e0b: less allocations in FileBasedIndexImpl.getUnsavedDocuments
180df2c: completion: don't suggest true/false literals where boolean is not expected
76939c8: restore query mismatch inspection
fffde12: new inference: mark erased for type params/raw types compatibility (IDEA-122932)
a2615d0: new inference: accept raw equality
67daae0: leave capture during bound composition of unbounded wildcards (IDEA-125423)
01c9bba: old inference: ignore java 1.6 bug in new versions (IDEA-125744)
b7ab465: old inference: choose child type between types in subtypes constraint (IDEA-118536)
d311a4e: perform target.findUsages() if no psi found
98302cc: IDEA-125186 Shorten reference with an import even if there is a conflicting class from Groovy default packages
d47756d: show initial value only for strings and primitive types
13986db: IDEA-125693 Creating a project in dir '~/Desktop/test' creates the project in the dir '/Applications/IntelliJ IDEA 13 CE.app/bin/test'
ae7d190: NPE when using from UML
530189b: a little bit smarter methods matching
8150b8b: IDEA-125566 Start From Scratch: can't close Customize IDEA dialog
ab7b2a0: IDEA-122962 - Clouds: perform connection test in background - auto-reload in frameworks
1a7ab39: restore (wrong) Logger.assertTrue contracts
c12b68d: dumb-aware error dropping actions
ac9d1e8: get java language level from the root model when pushers haven't finished yet
bd93483: IDEA-125565 Start from Scratch: Customize IDEA dialog: UI Themes page looks bad on Linux
6ea44e9: Gradle: use module library level for local dependencies, update library name to contain groupId
7d4dae9: IDEA-125565 Start from Scratch: Customize IDEA dialog: UI Themes page looks bad on Linux
fb173cc: IDEA-124461 New Module (Maven, Gradle) created in Empty project don't get the specified jdk
be064c3: cleanup
89dc105: show mark for a stack frame executing a method from marked object
f48b9fa: Merge remote-tracking branch 'origin/master'
c4dc543: IDEA-125745 Controls on breakpoints dialog resize differently
a105b5b: IDEA-125736 new debugger: disabled all exceptions breakpoint stops at every exception even in mute mode
5fd6a23: IDEA-124082 default changelist for Commit dialog fixed when 'commit directory' called
3a9e539: IDEA-124347 Master Password prompt strategy changed for mercurial authentication
74d52dd: introduce CvsFilePath to prevent public api changes
a489967: fix typo
f2c14b5: Start plugins wizard #30 for Mac OS X should be "native" keymap by default
a16bfe6: External-system: IDEA-124927 Don't refresh projects on opening when auto-import is disabled
78ee0a2: IDEA-125551 Start From Scratch: Customize IDEA dialog: JBoss plugin should not appear in JavaFrameworks group
e276bfa: unregistering obsolete service components
fbb0f39: jasper validation tests: fixes and cleanup
0d5f295: clean up: - replaced 2 usages isAssociated method from ValueContainer with getValueAssociationPredicate() delegation - rewrote serialization of input ids to be independent from concrete input id set implementation via usage of int iterator - inlined saveInvalidateCommand in ValueContainermpl and added comments
7321069: ad text in 'go to' actions
b57a8ca: get python language level from the root model when pushers haven't finished yet
a30a74e8: fix dfa contract believing that nullable is always null
9c29b95: fix dfa contract IOOBE with varargs
31be027: relax time in MessageBusTest.testPostingPerformanceWithLowListenerDensityInHierarchy
4955009: remove mostly non-useful Integer.valueOf completion suggestions
41b974e: anonym -> lambda: disable if target SAM type is raw and methods are called on params with Object erasure (IDEA-125613)
032faad: EIAE
2f4d4fb: register container provider
ba6e884: initialize file types
2f3db6a: UOE
73bfc96: NPE
3a8647f: reverted changes blocking inner classes in libraries to work
b66623a: do not fail position manager if assert happened in one of the providers
6dc93a1: skip binary files earlier, no need to get psi for that
91f7c25: do not scan all files when trigram index is available
7d81587: register extension points
4489140: -contributor
5fe5352: rw detector
707e584: IDEA-125649
6a28780: notnull
a7d14fe: IDEA-107588 (Mismatched query and update of collection - include Collections.addAll())
39d4dfb: fix 'as Trait' result type
b1e9f66: EA-57003 - NPE: WatchInplaceEditor.doOKAction
2d0aa2a: BlockMarkerCommentsInspection changes after review
98954e2: EA-57004 - NPE: XBreakpointManagerImpl.createBreakpointDefaults
3b09eea: fix compilation
40f7150: low priority 'create getters/setters' quickfixes
a34a01d: duplicated code
c6d539f: disable assert for Groovy clients
7459b0b: cleanup
f008f98: IDEA-125584 Groovy: NPE at org.jetbrains.plugins.groovy.annotator.intentions.CreateMethodFromUsageFix.invokeImpl
93d7ac9: IDEA-125576 Groovy: 'Create trait' could be added to 'Create From Usage'
6975411: get rid of 'public' keyword in templates
53fbe15: IDEA-125556 New Groovy class dialog contains trait option IDEA-125577 new icons for Groovy traits
90ec82d: more diagnostics for gdsl scripts
60c7d6f: EA-57072 - IOOBE: EditorImpl.offsetToLogicalLine
5801886: External-system: IDEA-124927 Don't refresh projects on opening when auto-import is disabled
2b0a1b9: One more condition for go to actions history
3ab65e6: (EA-55107) case with empty parents in history fixed
d67e9b4: IDEA-118279 create constructor params: apply cleanup
11d1e29: one test rewritten in Kotlin
9b3b90d: EA-56987 - NPE: DebuggerTreeNodeImpl.updateCaches
91005a8: added a separator above annotate action
32874b1: renamed to PropertiesPlugin.xml to avoid conflict inside upsource jar
05191a3: renamed to GroovyPlugin.xml to avoid conflict inside upsource jar
08caf4f: add to watches action should work from evaluate and inspect
d85d443: more moves to groovy-psi
fadd451: moved properties to properties-psi
b9fa2ab: register folding builder in env
ab8b582: moved to psi
c1da4f3: moved away from openapi
4bf725a: moved away from java-impl
41f2d2c: moved to core
5366e96: moved to psi
cf298fc: ensure editor is released in EDT
5b09e28: EA-57008 (pair was good enough)
1144d7b: extend java-class instead of groovy-class (to migrate to Kotlin)
3b85f7c: removing obsolete extension point
7ac28ba: remove outdated action id
53ddc21: Simplify condition in go to actions history
2807e38: rerun failed: include concrete class if containing is abstract (IDEA-125425)
9758f97: return inside finally: stop at lambda (IDEA-125605)
b90111f: more reliable keeping of reference on stack (following CR-IC-5487)
203d7fb: remove unused code
75c7630: cleanup
dc11403: cleanup
9d2b9ae: maven compiler tests to use external compiler only
ff05505: standalone jps updated: load path variables specified in gant scripts
05c2f31: history for go to actions, initial
0918150: combine two classes into one to reduce duplication
806c8d2: more accurate collection query detection for method references
19bf6b9: add "stream" and "parallelStream" query names
c0a470f: EA-57015 - SOE: AbstractTreeUi.access$
48a01b0: add common actions to all variable views
0529ff5: NPE if a previous focus owner is null.
d27fd1e: plugin updater: accept older plugin versions for broken plugins (IDEA-125646)
eeca5a8: search for package everywhere again (IDEA-125688)
04a7434: EA-56966 - IAE: XRegularValuePresentation.<init>
f1b4acc: Enabling dialog based implementation because of always on top regression.
5ef4a59: fixing java compilers configuration UI
7322427: EA-56894 - AIOOBE: AppCodeDesignerEditor.findModule - for AppCode designer module don't needed
05e2292: IDEA-125684 appearance of JTextField component in disabled state
4660916: IDEA-125500 Terminal is not locale aware
e3c14f5: following review CR-IC-5487
80a7f69: IDEA-25183
80eba2a: IDEA-42954 Watches are not saved on restart of debug sessions
d174c22: refactoring - following review #525
535844a: IDEA-104441 Wrong auto-completion of closed XML tags: handling unbalanced xml psi
220964b: BlockMarkerCommentInspection moved to java-analysis-impl
6c6a682: Shortcut Promoter initial
dff9280: IDEA-93040
622c1df: NPE
8f1d011: reverted
31d0a47: moved to analysis
a518606: moved to psi
e0d0ffd: moved to core
282862d: moved to core
1ccdeb0: more moved to psi
5d21da5: added equals to LocalsControlFlowPolicy, notnull
15ecfbd: deleting old make implementation
fa243c5: IdePlugin fixed
0427d8e: change default action
487d93d: remove useless source roots
b5fb0b6: IDEA-100200 - Clouds: deployment to clouds ignores the http proxy settings - CloudBees
cef9a6c: IDEA-71997
05b1763: deleting old make implementation
29b98db: deleting old make implementation
f723b07: Tips added (PY-12484).
de95451: Merge remote-tracking branch 'origin/master'
2d108ef: Tips updated (PY-12982).
cc4b248: java: parsing of complex bounds in stub signatures fixed
66d70ab: Cleanup (unneeded concatenation)
259d59a: added dependency from devkit module to its jps-plugin
cff9f70: JPS: added method to process modules and libraries in order
36e275f: Gradle: handling of project build classpath resolving errors related issues: http://youtrack.jetbrains.com/issue/IDEA-125592 http://youtrack.jetbrains.com/issue/IDEA-124839
6e512d0: [ review #701 ] introduce field where required to avoid multiple objects creation
98edcf4: Ruby highlighting lexer refactored for upsource core environment
bbb4d67: removed jsf-iml
c8b081a: DevKit: Goto EP declaration in plugin.xml (IDEA-86100) CR-IC-5473
c96948d: show initial value in "set value" editor
758adbb: make sure document reference is cached reliably
19cd6d5: show progress for editors opening
311406c: select only required editor in window
68aadaf: init foldings for all opened editors (otherwise saved folding state will not be restored for them)
c0511af: remove dead code
e5708cd: open editors in EDT
ffcd49d: IDEA-41226 Reference debugger-marked objects in expressions
0034f61: Merge remote-tracking branch 'origin/master'
a7e0137: externalization: suppress unused to .xml compatibility
0f8912f: enforce string copying (trim substring() result for java 6)
152503a: new exception creation without args: completely ignore exceptions with only no param constructor (IDEA-125660)
d64d714: customizations: check group is included in correct root group; allow to invoke moved action group, e.g. Create Run Configurations group (IDEA-125484)
aaa01e4: fix module leaks via CompilerTester
1551266: Added output folders to ModuleExtendedModel.
9874668: IDEA-104441 Wrong auto-completion of closed XML tags
b71fe91: simplification & cleanup postfix templates
9835800: Maven: plexus-archiver lib added to licenses
a7aa0df: lambda: extract parameters incompatibility check
0fac1ec: Merge remote-tracking branch 'origin/master'
5eeea43: PY-13084 Variables passed to url kwargs are not suggested to template
8a3ad93: hide lang-api refactoring actions if no handlers present
86d0ff8: Merge branch 'fix4' of https://github.com/krasa/intellij-community into fix4
6b46fcf: dfa: contracts validation should not exclude notnull validation
0212832: Better comments
463a90c: force check for update on exception from non-bundled plugin
4e95814: nullify: to run on pooled thread without progress
90b27a4: IDEA-122929 Hg: remove unrelated urls paths from pull/push dialog.
e2e243b: CompositeFilter#forceUseAllFilters=false by default to restore previous behaviour Deprecated public fields in Filter#Result and getters to give warning about possible danger
aa83182: Merge branch 'python-fixes'
a9aaf0c: Maven: fix artifact layouts tests for added generated manifest.mf
a1d93e0: Use union of types of members as iteration type for tuples
06a130f: Interpret tuple default parameter value as a weak type (PY-10967)
24b18f8: IDEA-119804 second click on item in watches panel should toggle edit mode
a479d46: IDEA-81789 Expression Evaluation goes crazy when multiline expression is inserted
3f1d913: Merge remote-tracking branch 'origin/master'
1b010d0: PY-12981 django apps don't resolve when INSTALLED_APPS is set with '+='
846b42a: Nullity annotations and explicit TypeEvalContext for PyUnionType.excludeNull()
5352177: IDEA-97915 Mercurial incoming/outgoing widgets updated
e618345: EA-51820 check that root from mappings is a valid vcs root
2f5f8f9: IDEA-122562 - Warning from SettingsEditor#applyEditorTo prevents runconfig editor from closing
12272ec: cosmetic: "Remember on disk" -> "Save on disk" in all places
ef5ae1c: ensure rename is performed inside project only, do not search for a package inside libraries!
0dd4ead: generate missed tests intention (IDEA-90247; IDEA-122790)
8ee7f6d: ignore setup/teardown generation when methods already exist and additional methods are not expected
dc043ce: IDEA-121972 - Map help button of the Clouds page
71f507b: Cleanup
2322568: Don't suggest Python live templates inside parameter list (PY-12395)
9b96bc0: common style for expressions
f9685fd: Don't suggest Python live templates in string literals (PY-12349)
a554bba: Don't suggest Python live templates in comments (PY-13076)
511b7db: IDEA-125624 Run tool window does not have deployments list in debug mode
73dce39: Use 'Python' context for 'super' live template (PY-13080)
8e0bbd5: cover with tests
ce036b5: IDEA-125129 I would like to reopen IDEA-117698: regression fixed
2475299: IDEA-61480 DocBook5: complains about xlink:href in <link>
2fd7151: IDEA-125557 Start From Scratch: on Darcula selecting as UI Theme in the Customize IDEA wisard it is applied incorrectly
fa9f7fe: Fixed messy usage of colons in the Breakpoints window
6b7841e: format
f3c2fa2: IDEA-117949 Xml editor doesn't treat xml namespace correctly
08c14cb: Cleanup (optimization)
298bf22: Cleanup (formatting)
c026ff3: java: missing deprecated attribute on inner classes fixed
301b5e7: java: injected methods excluded from enum stub
06f261c: Maven: artifact's manifest generation support related issues: http://youtrack.jetbrains.com/issue/IDEA-82725 http://youtrack.jetbrains.com/issue/IDEA-91497 http://youtrack.jetbrains.com/issue/IDEA-47990
1913bdc: IDEA-119640 Problem with goto declaration of XML attribute defined in XSD: re-fixed, completion fixed
ee89d4f: cleanup
560924a: Merge remote-tracking branch 'origin/master'
80dbfb5: byte code viewer in same colors as editor
7fea4ff: fix failing tests: OverrideImplementTest.testEnumConstant ImplementMethodsTest.runSingle(EnumConstantWithoutClassInitializer.java)
590e025: add example to postfix templates tree
9457946: cleanup
9307a77: better colors for ctrl + shift + a
Change-Id: I63f543234051b4bfd5588e9307dad56cdff7aa1b
Diffstat (limited to 'java/java-tests/testData/codeInsight')
100 files changed, 1144 insertions, 31 deletions
diff --git a/java/java-tests/testData/codeInsight/addJavadoc/afterClass.java b/java/java-tests/testData/codeInsight/addJavadoc/afterClass.java new file mode 100644 index 000000000000..c8afa98295ce --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/afterClass.java @@ -0,0 +1,8 @@ +// "Add Javadoc" "true" + +/** + * + */ +class Foo { + +} diff --git a/java/java-tests/testData/codeInsight/addJavadoc/afterField.java b/java/java-tests/testData/codeInsight/addJavadoc/afterField.java new file mode 100644 index 000000000000..96c53712f0b2 --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/afterField.java @@ -0,0 +1,10 @@ +// "Add Javadoc" "true" + +class A { + + /** + * + */ + private int myFoo; + +} diff --git a/java/java-tests/testData/codeInsight/addJavadoc/afterMethod.java b/java/java-tests/testData/codeInsight/addJavadoc/afterMethod.java new file mode 100644 index 000000000000..d5d21088c837 --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/afterMethod.java @@ -0,0 +1,10 @@ +// "Add Javadoc" "true" + +class A { + /** + * + */ + public void foo() { + + } +} diff --git a/java/java-tests/testData/codeInsight/addJavadoc/afterMethod2.java b/java/java-tests/testData/codeInsight/addJavadoc/afterMethod2.java new file mode 100644 index 000000000000..a86a2f943c81 --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/afterMethod2.java @@ -0,0 +1,12 @@ +// "Add Javadoc" "true" + +class A { + /** + * @param s + * @return + * @throws Exception + */ + public int foo(final String s) throws Exception { + + } +} diff --git a/java/java-tests/testData/codeInsight/addJavadoc/beforeClass.java b/java/java-tests/testData/codeInsight/addJavadoc/beforeClass.java new file mode 100644 index 000000000000..c6c284928e24 --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/beforeClass.java @@ -0,0 +1,5 @@ +// "Add Javadoc" "true" + +class Fo<caret>o { + +} diff --git a/java/java-tests/testData/codeInsight/addJavadoc/beforeClass2.java b/java/java-tests/testData/codeInsight/addJavadoc/beforeClass2.java new file mode 100644 index 000000000000..0d1d456256d6 --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/beforeClass2.java @@ -0,0 +1,13 @@ +// "Add Javadoc" "false" + +class A { + + void m() { + + Object o<caret> = new Object() { + + } + + } + +} diff --git a/java/java-tests/testData/codeInsight/addJavadoc/beforeField.java b/java/java-tests/testData/codeInsight/addJavadoc/beforeField.java new file mode 100644 index 000000000000..cf27dadb93e5 --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/beforeField.java @@ -0,0 +1,7 @@ +// "Add Javadoc" "true" + +class A { + + private int myFo<caret>o; + +} diff --git a/java/java-tests/testData/codeInsight/addJavadoc/beforeMethod.java b/java/java-tests/testData/codeInsight/addJavadoc/beforeMethod.java new file mode 100644 index 000000000000..c428f80c85cd --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/beforeMethod.java @@ -0,0 +1,7 @@ +// "Add Javadoc" "true" + +class A { + public void f<caret>oo() { + + } +} diff --git a/java/java-tests/testData/codeInsight/addJavadoc/beforeMethod2.java b/java/java-tests/testData/codeInsight/addJavadoc/beforeMethod2.java new file mode 100644 index 000000000000..0fb87904cc0c --- /dev/null +++ b/java/java-tests/testData/codeInsight/addJavadoc/beforeMethod2.java @@ -0,0 +1,7 @@ +// "Add Javadoc" "true" + +class A { + public int f<caret>oo(final String s) throws Exception { + + } +} diff --git a/java/java-tests/testData/codeInsight/completion/className/template/after1.java b/java/java-tests/testData/codeInsight/completion/className/template/after1.java new file mode 100644 index 000000000000..26e269fc5089 --- /dev/null +++ b/java/java-tests/testData/codeInsight/completion/className/template/after1.java @@ -0,0 +1,12 @@ +import pack.Foo; +class Test { + { + m(new Foo<String>() { + @Override + public void foo(String s) { + + } + }) + } + <T> void m(Foo<T> foo){} +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/completion/className/template/after2.java b/java/java-tests/testData/codeInsight/completion/className/template/after2.java new file mode 100644 index 000000000000..3cc7fd50d897 --- /dev/null +++ b/java/java-tests/testData/codeInsight/completion/className/template/after2.java @@ -0,0 +1,12 @@ +import pack.Foo; +class Test { + { + m(new Foo<String>() { + @Override + public void foo(String s) { + + } + }) + } + void m(Foo<String> foo){} +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/completion/className/template/before1.java b/java/java-tests/testData/codeInsight/completion/className/template/before1.java new file mode 100644 index 000000000000..db664b23c886 --- /dev/null +++ b/java/java-tests/testData/codeInsight/completion/className/template/before1.java @@ -0,0 +1,7 @@ +import pack.Foo; +class Test { + { + m(new <caret>) + } + <T> void m(Foo<T> foo){} +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/completion/className/template/before2.java b/java/java-tests/testData/codeInsight/completion/className/template/before2.java new file mode 100644 index 000000000000..bf1ca0b36978 --- /dev/null +++ b/java/java-tests/testData/codeInsight/completion/className/template/before2.java @@ -0,0 +1,7 @@ +import pack.Foo; +class Test { + { + m(new <caret>) + } + void m(Foo<String> foo){} +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/completion/normalSorting/NoBooleansInMultiplication.java b/java/java-tests/testData/codeInsight/completion/normalSorting/NoBooleansInMultiplication.java new file mode 100644 index 000000000000..befcf40a26ab --- /dev/null +++ b/java/java-tests/testData/codeInsight/completion/normalSorting/NoBooleansInMultiplication.java @@ -0,0 +1,7 @@ +public class Foo { + + int foo(Object fact) { + return 42 * fa<caret>x + } +} + diff --git a/java/java-tests/testData/codeInsight/completion/normalSorting/NoNumberValueOf.java b/java/java-tests/testData/codeInsight/completion/normalSorting/NoNumberValueOf.java new file mode 100644 index 000000000000..d53e3c294eb5 --- /dev/null +++ b/java/java-tests/testData/codeInsight/completion/normalSorting/NoNumberValueOf.java @@ -0,0 +1,7 @@ +public class Foo { + + void foo(Object value) { + Integer i = val<caret>x + } +} + diff --git a/java/java-tests/testData/codeInsight/createSwitch/enum.java b/java/java-tests/testData/codeInsight/createSwitch/enum.java new file mode 100644 index 000000000000..23d180ddbe3b --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/enum.java @@ -0,0 +1,11 @@ +class X { + + enum MyEnum { + a,b,c + } + + void m(MyEnum e) { + e<caret> + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/enum2.java b/java/java-tests/testData/codeInsight/createSwitch/enum2.java new file mode 100644 index 000000000000..8464e6213e22 --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/enum2.java @@ -0,0 +1,11 @@ +class X { + + enum MyEnum { + a,b,c + } + + void m(MyEnum e) { + <caret>e + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/enum2_after.java b/java/java-tests/testData/codeInsight/createSwitch/enum2_after.java new file mode 100644 index 000000000000..61803f4e0f6b --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/enum2_after.java @@ -0,0 +1,12 @@ +class X { + + enum MyEnum { + a,b,c + } + + void m(MyEnum e) { + switch (e) {<caret> + } + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/enum_after.java b/java/java-tests/testData/codeInsight/createSwitch/enum_after.java new file mode 100644 index 000000000000..61803f4e0f6b --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/enum_after.java @@ -0,0 +1,12 @@ +class X { + + enum MyEnum { + a,b,c + } + + void m(MyEnum e) { + switch (e) {<caret> + } + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/notAvailable.java b/java/java-tests/testData/codeInsight/createSwitch/notAvailable.java new file mode 100644 index 000000000000..2cdae544482e --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/notAvailable.java @@ -0,0 +1,13 @@ +class X { + + void m() { + + int foo = 10; + m2(fo<caret>o); + + } + + void m2(int i) { + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/notAvailable2.java b/java/java-tests/testData/codeInsight/createSwitch/notAvailable2.java new file mode 100644 index 000000000000..112e2d450d9b --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/notAvailable2.java @@ -0,0 +1,13 @@ +class X { + + void m() { + + int foo = 10; + int bar = fo<caret>o + 10; + + } + + void m2(int i) { + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/primitive.java b/java/java-tests/testData/codeInsight/createSwitch/primitive.java new file mode 100644 index 000000000000..332325ce4029 --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/primitive.java @@ -0,0 +1,10 @@ +class X { + + void m() { + + int foo = 10; + fo<caret>o + + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/primitive_after.java b/java/java-tests/testData/codeInsight/createSwitch/primitive_after.java new file mode 100644 index 000000000000..0f04c947694b --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/primitive_after.java @@ -0,0 +1,11 @@ +class X { + + void m() { + + int foo = 10; + switch (foo) {<caret> + } + + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/string.java b/java/java-tests/testData/codeInsight/createSwitch/string.java new file mode 100644 index 000000000000..aca5f90aa689 --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/string.java @@ -0,0 +1,10 @@ +class X { + + void m() { + + String s = getStr(); + s<caret> + + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/createSwitch/string_after.java b/java/java-tests/testData/codeInsight/createSwitch/string_after.java new file mode 100644 index 000000000000..3acf5d1e5b59 --- /dev/null +++ b/java/java-tests/testData/codeInsight/createSwitch/string_after.java @@ -0,0 +1,11 @@ +class X { + + void m() { + + String s = getStr(); + switch (s) {<caret> + } + + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/FinalFieldInit.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/FinalFieldInit.java index a7450bd6e3e4..16f89fd887cd 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/FinalFieldInit.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/FinalFieldInit.java @@ -236,9 +236,19 @@ class IDEA100237 { } final Object baz = new Object() { - final int qux = <error descr="Variable 'bar' might not have been initialized">bar</error>.hashCode() + 1; + final int qux = bar.<error descr="Cannot resolve method 'hashCode()'">hashCode</error>() + 1; }; } + + static class Outer { + final String a; + class Inner { + String b = a; + } + Outer() { + a = ""; + } + } } class StaticInitializerUsedInAnotherStaticField { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/UnsupportedFeatures.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/UnsupportedFeatures.java index 326c24bbbbf5..87891d0d5bc3 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/UnsupportedFeatures.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/UnsupportedFeatures.java @@ -1,19 +1,3 @@ -/* - * Copyright 2000-2012 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. - */ - import java.io.*; import java.util.*; @@ -34,16 +18,7 @@ class UnsupportedFeatures { <error descr="Incompatible types. Found: 'boolean', required: 'java.lang.Boolean'">Boolean b = true;</error> <error descr="Incompatible types. Found: 'java.lang.Boolean', required: 'boolean'">boolean b1 = Boolean.TRUE;</error> - try { Reader r = new FileReader("/dev/null"); } - catch (<error descr="Multi-catches are not supported at this language level">FileNotFoundException | IOException e</error>) { e.printStackTrace(); } - - try <error descr="Try-with-resources are not supported at this language level">(Reader r = new FileReader("/dev/null"))</error> { } - - I i1 = <error descr="Method references are not supported at this language level">UnsupportedFeatures::m</error>; - I i2 = <error descr="Lambda expressions are not supported at this language level">() -> { }</error>; - } - - interface I { - <error descr="Extension methods are not supported at this language level">default void m() { }</error> + java.lang.annotation.ElementType t = null; + switch (<error descr="Incompatible types. Found: 'java.lang.annotation.ElementType', required: 'byte, char, short or int'">t</error>) { } } } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/EnumSynthetics.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/EnumSynthetics.java new file mode 100644 index 000000000000..fa25bbff5ab4 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/EnumSynthetics.java @@ -0,0 +1,8 @@ +import java.lang.annotation.ElementType; + +class EnumSynthetics { + void m() { + //ElementType[] values = ElementType.values(); + ElementType type = ElementType.valueOf("TYPE"); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA61415.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA61415.java new file mode 100644 index 000000000000..8f86c8ed4058 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA61415.java @@ -0,0 +1,10 @@ +class Test { + Runnable r = new Runnable() { + <error descr="Modifier 'private' not allowed here">private</error> class Foo {} + @Override + public void run() { + + } + }; +} + diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA65473.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA65473.java new file mode 100644 index 000000000000..13e19fe40572 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/IDEA65473.java @@ -0,0 +1,13 @@ + +class FirstClass { + public FirstClass(int i) { + } + + public FirstClass() { + this(Point.FOO); + } + + public class Point { + public static final int FOO = 0; + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java index ac3eb042da5f..168b31bcf55a 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/UnsupportedFeatures7.java @@ -41,6 +41,10 @@ class UnsupportedFeatures { I i1 = <error descr="Method references are not supported at this language level">UnsupportedFeatures::m</error>; I i2 = <error descr="Lambda expressions are not supported at this language level">() -> { }</error>; + + switch (<error descr="Incompatible types. Found: 'java.lang.String', required: 'byte, char, short or int'">list.get(0)</error>) { + case "foo": break; + } } interface I { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/SwitchByInaccessibleEnum.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/SwitchByInaccessibleEnum.java index 7cdd90fece61..70f2fa1656c1 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/SwitchByInaccessibleEnum.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/SwitchByInaccessibleEnum.java @@ -13,7 +13,7 @@ interface A { class D { public static void f(A a) { A.B b = a.getB(); - switch (<error descr="A.B.C is inaccessible here">b.c</error>) { + switch (<error descr="'A.B.C' is inaccessible here">b.c</error>) { case SOME: break; } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/CastObjectToIntJdk14.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/CastObjectToIntJdk14.java new file mode 100644 index 000000000000..4dc0dae7765d --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/CastObjectToIntJdk14.java @@ -0,0 +1,7 @@ +class Test { + + Object getObj() {return null;} + { + int a = (int) getObj(); + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA112117.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA112117.java new file mode 100644 index 000000000000..57b1c73999d9 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA112117.java @@ -0,0 +1,15 @@ +import java.io.Serializable; +import java.util.Set; + +class IdeaGenericsFail { + + public IdeaGenericsFail(Set<Klass<? extends Serializable>> map) { + } + + public static class Klass<T extends Serializable> { + } + + public static void main(final Set<Klass<?>> map) { + new IdeaGenericsFail(map); + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA118533.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA118533.java new file mode 100644 index 000000000000..56a140091dbe --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA118533.java @@ -0,0 +1,11 @@ +abstract class Test { + + interface InputFormat<K, V> { + } + + @SuppressWarnings("unchecked") + private static Class<? extends InputFormat<?, ?>> getInputFormatClass(final Class<? extends InputFormat> aClass) + throws ClassNotFoundException { + return (Class<? extends InputFormat<?, ?>>) aClass; + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA118536.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA118536.java new file mode 100644 index 000000000000..b747456247fe --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA118536.java @@ -0,0 +1,10 @@ +import java.util.Comparator; + +class MyTest { + void foo(final Ordering<Comparable> natural){ + compound(natural); + } + <U extends String> Ordering<U> compound(Comparator<? super U> secondaryComparator) { return null; } +} +abstract class Ordering <T> implements Comparator<T> {} + diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA119757.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA119757.java new file mode 100644 index 000000000000..d3e018e64c34 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA119757.java @@ -0,0 +1,16 @@ +import java.util.List; + +class Foo<T extends V,V> { + Foo(List<? extends T> l) { + } +} +class Bar { + void foo(Foo<String,String> foo) {} + + void bar(List<String> l) { + foo<error descr="'foo(Foo<java.lang.String,java.lang.String>)' in 'Bar' cannot be applied to '(Foo<java.lang.String,java.lang.Object>)'">(new Foo<>(l))</error>; + foo<error descr="'foo(Foo<java.lang.String,java.lang.String>)' in 'Bar' cannot be applied to '(Foo<java.lang.String,java.lang.Object>)'">(f(l))</error>; + } + + <T1 extends V1, V1> Foo<T1, V1> f(List<? extends T1> l) {return null;} +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125423.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125423.java new file mode 100644 index 000000000000..d2515eef82eb --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125423.java @@ -0,0 +1,15 @@ +class FooBar<T> { + void foo(final FooBar<?> fooBar){ + fooBar.supertype<error descr="'supertype(java.lang.Class<capture<?>>)' in 'FooBar' cannot be applied to '(java.lang.Class<java.lang.Iterable>)'">(Iterable.class)</error>; + } + + void foo1(final FooBar<? super T> fooBar){ + fooBar.supertype<error descr="'supertype(java.lang.Class<capture<? super T>>)' in 'FooBar' cannot be applied to '(java.lang.Class<java.lang.Iterable>)'">(Iterable.class)</error>; + } + + void foo2(final FooBar<? extends T> fooBar){ + fooBar.supertype<error descr="'supertype(java.lang.Class<? super capture<? extends T>>)' in 'FooBar' cannot be applied to '(java.lang.Class<java.lang.Iterable>)'">(Iterable.class)</error>; + } + + void supertype(Class<? super T> superclass) {} +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125744.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125744.java new file mode 100644 index 000000000000..38580705a3c4 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125744.java @@ -0,0 +1,14 @@ +class A {} +interface B {} + +class MyTest { + public <M extends A & B> M getInvokedMember() { + return null; + } +} + +class Bar { + void f(MyTest myTest) { + B member = myTest.getInvokedMember(); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125800.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125800.java new file mode 100644 index 000000000000..1ec56b8a6c52 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125800.java @@ -0,0 +1,10 @@ +import java.util.List; + +abstract class Test { + abstract <T extends List<String> & Runnable> T list(); + + public void test() + { + for (String s : list()) {} + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125816.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125816.java new file mode 100644 index 000000000000..e17d850a9106 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA125816.java @@ -0,0 +1,8 @@ +public enum State { + STATE1 { + State s = <error descr="It is illegal to access static member 'STATE2' from enum constructor or instance initializer">STATE2</error>; + }, + STATE2 { + State s = <error descr="It is illegal to access static member 'STATE1' from enum constructor or instance initializer">STATE1</error>; + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA24496.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA24496.java new file mode 100644 index 000000000000..454e43d33f08 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA24496.java @@ -0,0 +1,17 @@ +import java.util.List; +import java.util.ArrayList; + +class GenericsError { + + public <T> List<List<T>> method(List<T> list) { + List<List<T>> retVal = new ArrayList<List<T>>(); + retVal.add(list); + return retVal; + } + + public List<List<?>> otherMethod() { + List<?> list = null; + <error descr="Incompatible types. Found: 'java.util.List<java.util.List<capture<?>>>', required: 'java.util.List<java.util.List<?>>'">List<List<?>> result = method(list);</error> + return result; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57290.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57290.java new file mode 100644 index 000000000000..1898d59e9316 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57290.java @@ -0,0 +1,11 @@ + +class A<T,S> { + class B{} +} + +class C { + void foo(A<?,?>.B x){ + bar<error descr="'bar(A<capture<?>,capture<?>>.B)' in 'C' cannot be applied to '(A<capture<?>,capture<?>>.B)'">(x)</error>; + } + <T> void bar(A<T,T>.B x){} +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57338.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57338.java new file mode 100644 index 000000000000..06e25b11f772 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57338.java @@ -0,0 +1,17 @@ +abstract class A { + abstract <T> void foo(); +} + +abstract class B extends A { + void foo() + { + this.<Integer>foo(); + } +} + +abstract class C { + void foo() + { + this.<error descr="Method 'foo()' does not have type parameters"><Integer></error>foo(); + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57388.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57388.java new file mode 100644 index 000000000000..9a5502a47700 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA57388.java @@ -0,0 +1,7 @@ + +class B<T extends Cloneable> {} +class A<T> { + A<B<? extends Cloneable>> foo(A<B<?>> x){ + return x; + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA58692.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA58692.java new file mode 100644 index 000000000000..6571375f3fdc --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA58692.java @@ -0,0 +1,20 @@ +class ExposeAnotherProblem { + + class OneClass<T> { + public T get(){ + return null; + } + } + + class AnotherClass<T> {} + + + static <T, R extends OneClass<T>> R method1(AnotherClass<T> param) { + return null; + } + + <E> E method2(AnotherClass<E> param){ + return method1(param).get(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67578.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67578.java new file mode 100644 index 000000000000..d2e602c6fdb2 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67578.java @@ -0,0 +1,8 @@ +class X<T> { } + +class A<T, S extends X<T>> {} + +class C { + void foo(A<?, X<?>> a){ <error descr="Inferred type 'X<?>' for type parameter 'S' is not within its bound; should extend 'X<capture<?>>'">bar(a)</error>; } + <T, S extends X<T>> void bar(A<T, S> a){ } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67600.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67600.java new file mode 100644 index 000000000000..6f0e625e21c2 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA67600.java @@ -0,0 +1,24 @@ +abstract class A<T, S extends T> +{ + abstract S bar(); + void foo(A<Runnable[], ? extends Cloneable[]> a){ + <error descr="Incompatible types. Found: 'java.lang.Cloneable[]', required: 'java.lang.Runnable[]'">Runnable[] x = a.bar();</error> + } +} + +abstract class AB<T, S extends T> +{ + abstract S bar(); + void foo(AB<Runnable, ? extends Cloneable> a){ + Runnable x = a.bar(); + } +} + +abstract class AC<T, S> +{ + abstract S bar(); + void foo(AC<Runnable[], ? extends Cloneable[]> a){ + <error descr="Incompatible types. Found: 'java.lang.Cloneable[]', required: 'java.lang.Runnable[]'">Runnable[] x = a.bar();</error> + } +} + diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/RawTypeFromParent.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/RawTypeFromParent.java new file mode 100644 index 000000000000..49c8f5bbeaad --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/RawTypeFromParent.java @@ -0,0 +1,18 @@ +import java.util.ArrayList; +import java.util.List; + +class Foo<T> { + + public void test(Foo parent) { + List<Foo> elements = getElements(parent); + + + for (<error descr="Incompatible types. Found: 'java.lang.Object', required: 'Foo'">Foo foo : getElements(parent)</error>) { + System.out.println(foo); + } + } + + public static <E extends Foo<E>> List<E> getElements(E parent) { + return new ArrayList<>(); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA125855.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA125855.java new file mode 100644 index 000000000000..3021604f0768 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA125855.java @@ -0,0 +1,18 @@ + +import java.util.Collection; +import java.util.List; + +class Test { + + private static <E> void <warning descr="Private method 'x(java.util.Collection<E>)' is never used">x</warning>(Collection<E> collection) { + System.out.println(collection); + } + + private static <E> void x(List<E> list) { + System.out.println(list); + } + + public static void main(List list) { + Test.<Object[]>x(list); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA118362.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA118362.java new file mode 100644 index 000000000000..111a23a7e8d7 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA118362.java @@ -0,0 +1,20 @@ +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.stream.Collectors; + +class Test { + private static final String[] decimalStrings = {"1.1", "+1.25"}; + + { + Arrays.stream(decimalStrings).map(BigDecimal::new).reduce(BigDecimal::add).ifPresent(bd -> System.out.print("Sum is " + bd)); + } + + void foo(final ArrayList<Pair> points) { + points.stream().filter(p -> p.x > 0).collect(Collectors.toCollection(ArrayList::new)); + } +} + +class Pair { + int x; +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA126056.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA126056.java new file mode 100644 index 000000000000..6cd13fd8df23 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA126056.java @@ -0,0 +1,27 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.function.Predicate; +import java.util.stream.Stream; + +class StreamTest { + public class Foo {} + + List<? super Foo> all = new ArrayList<>(); + + void foo(final Predicate<Object> predicate, final Stream<? super Foo> stream){ + long the_count= stream.filter((a) -> predicate.test(a)).count(); + } + + void foo1(final Predicate<Object> predicate, final Stream<? extends Foo> stream){ + long the_count= stream.filter((a) -> predicate.test(a)).count(); + } + + void foo2(final Predicate<Object> predicate, final Stream<Foo> stream){ + long the_count= stream.filter((a) -> predicate.test(a)).count(); + } + +} + + + + diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA126062.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA126062.java new file mode 100644 index 000000000000..c8b023a2b38b --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/IDEA126062.java @@ -0,0 +1,12 @@ +import java.util.function.Consumer; +class Pipeline<I, O> implements Consumer<I> { + @Override public final void accept(I input) {} + + public <K> void then(Pipeline<O, K> pipeline, final Observable<O> observable) { + observable.subscribe(pipeline::accept); + } +} + +interface Observable<T> { + void subscribe(Consumer<T> x); +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParameters.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParameters.java new file mode 100644 index 000000000000..889b0a118252 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParameters.java @@ -0,0 +1,15 @@ +// "Add missing annotation parameters - value3, value2, value1" "true" +class Test { + + @MyAnnotation(value3 = , value2 = , value1 = ) + void m() { + + } + + @interface MyAnnotation { + String value3(); + String value2(); + String value1(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParameters2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParameters2.java new file mode 100644 index 000000000000..67886a6bb979 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParameters2.java @@ -0,0 +1,16 @@ +// "Add missing annotation parameters - value4, value1" "true" +class Test { + + @MyAnnotation(value4 = , value3 = "", value2 = "", value1 = ) + void m() { + + } + + @interface MyAnnotation { + String value4(); + String value3(); + String value2(); + String value1(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParametersWithoutOrder.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParametersWithoutOrder.java new file mode 100644 index 000000000000..414eb2bf7f35 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterFewParametersWithoutOrder.java @@ -0,0 +1,16 @@ +// "Add missing annotation parameters - value4, value1" "true" +class Test { + + @MyAnnotation(value2 = "", value3 = "", value4 = , value1 = ) + void m() { + + } + + @interface MyAnnotation { + String value4(); + String value3(); + String value2(); + String value1(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterSingleParameter.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterSingleParameter.java new file mode 100644 index 000000000000..14f71e51a151 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterSingleParameter.java @@ -0,0 +1,13 @@ +// "Add missing annotation parameter 'value'" "true" +class Test { + + @MyAnnotation() + void m() { + + } + + @interface MyAnnotation { + String value(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterValueTyping.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterValueTyping.java new file mode 100644 index 000000000000..d6efb38f0792 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/afterValueTyping.java @@ -0,0 +1,14 @@ +class Test { + + @MyAnnotation(value3 = "value33", value2 = "value22", value1 = "value11") + void m() { + + } + + @interface MyAnnotation { + String value3(); + String value2(); + String value1(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParameters.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParameters.java new file mode 100644 index 000000000000..d8e6b5afbe7a --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParameters.java @@ -0,0 +1,15 @@ +// "Add missing annotation parameters - value3, value2, value1" "true" +class Test { + + @MyAnnotati<caret>on + void m() { + + } + + @interface MyAnnotation { + String value3(); + String value2(); + String value1(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParameters2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParameters2.java new file mode 100644 index 000000000000..bb0ad03903bf --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParameters2.java @@ -0,0 +1,16 @@ +// "Add missing annotation parameters - value4, value1" "true" +class Test { + + @MyAnnotati<caret>on(value3 = "", value2 = "") + void m() { + + } + + @interface MyAnnotation { + String value4(); + String value3(); + String value2(); + String value1(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParametersWithoutOrder.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParametersWithoutOrder.java new file mode 100644 index 000000000000..4f210601e287 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeFewParametersWithoutOrder.java @@ -0,0 +1,16 @@ +// "Add missing annotation parameters - value4, value1" "true" +class Test { + + @MyAnnotati<caret>on(value2 = "", value3 = "") + void m() { + + } + + @interface MyAnnotation { + String value4(); + String value3(); + String value2(); + String value1(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeParameterWithDefaultValue.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeParameterWithDefaultValue.java new file mode 100644 index 000000000000..15862bc3f427 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeParameterWithDefaultValue.java @@ -0,0 +1,13 @@ +// "Add missing annotation parameter 'value'" "false" +class Test { + + @MyAnnotati<caret>on + void m() { + + } + + @interface MyAnnotation { + String value() default ""; + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeSingleParameter.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeSingleParameter.java new file mode 100644 index 000000000000..a627372e6db8 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeSingleParameter.java @@ -0,0 +1,13 @@ +// "Add missing annotation parameter 'value'" "true" +class Test { + + @MyAnnotati<caret>on + void m() { + + } + + @interface MyAnnotation { + String value(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeValueTyping.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeValueTyping.java new file mode 100644 index 000000000000..139f523bff7a --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/addMissingRequiredAnnotationParameters/beforeValueTyping.java @@ -0,0 +1,14 @@ +class Test { + + @MyAnnotati<caret>on + void m() { + + } + + @interface MyAnnotation { + String value3(); + String value2(); + String value1(); + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeRaw.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeRaw.java new file mode 100644 index 000000000000..e9389d73da1b --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeRaw.java @@ -0,0 +1,24 @@ +// "Replace with lambda" "false" +class DbTableBinder { + + public Binder build() { + return new Bin<caret>der<DbTable>() { + public void bind(A q, DbTable dbTable) { + q.bind("name", dbTable.name); + } + }; + } +} + +class DbTable { + String name; +} + +interface Binder <ArgType> { + void bind(A<?> sqlStatement, ArgType argType); +} + +interface A<P> { + void bind(String s, String p); +} + diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorParameterFromField/afterSameParameterSimpleNames.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorParameterFromField/afterSameParameterSimpleNames.java index 3f64bdcda609..3b65e88d8bb8 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorParameterFromField/afterSameParameterSimpleNames.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createConstructorParameterFromField/afterSameParameterSimpleNames.java @@ -3,7 +3,7 @@ class A { private final int _field; private final int field; A(int field, int field1) { - _field = field; + this._field = field; this.field = field1; } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeUnusedVariable/afterIfNoBlock.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeUnusedVariable/afterIfNoBlock.java new file mode 100644 index 000000000000..19fcc59c4a64 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeUnusedVariable/afterIfNoBlock.java @@ -0,0 +1,9 @@ +// "Remove variable 'foo'" "true" +class a { + private int refactorTest(int i) { + int bar = 0; + if (i >0) ; + return bar; + } +} + diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeUnusedVariable/beforeIfNoBlock.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeUnusedVariable/beforeIfNoBlock.java new file mode 100644 index 000000000000..5648eaec5c28 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/removeUnusedVariable/beforeIfNoBlock.java @@ -0,0 +1,10 @@ +// "Remove variable 'foo'" "true" +class a { + private int refactorTest(int i) { + int f<caret>oo = 0; + int bar = 0; + if (i >0) foo++; + return bar; + } +} + diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterSillyAssignment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterSillyAssignment.java new file mode 100644 index 000000000000..8b0859f170f3 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/afterSillyAssignment.java @@ -0,0 +1,7 @@ +// "Remove redundant assignment" "true" +class A { + { + String ss = ""; + + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeSillyAssignment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeSillyAssignment.java new file mode 100644 index 000000000000..81147747a999 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/unusedAssignment/beforeSillyAssignment.java @@ -0,0 +1,8 @@ +// "Remove redundant assignment" "true" +class A { + { + String ss = ""; + + s<caret>s = ss; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/afterFewParameters.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/afterFewParameters.java new file mode 100644 index 000000000000..868cf5e74f5c --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/afterFewParameters.java @@ -0,0 +1,14 @@ +// "Wrap 4th parameter using 'Arrays.asList'" "true" +import java.util.Arrays; +import java.util.List; + +public class Test { + + void list(int i, int j, int k, List<String> l, String s) { + + } + + void m(String[] a) { + list(1, 2, 3, Arrays.asList(a), "asd"); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/afterSingleParameter.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/afterSingleParameter.java new file mode 100644 index 000000000000..9544df9a4c52 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/afterSingleParameter.java @@ -0,0 +1,14 @@ +// "Wrap using 'Arrays.asList'" "true" +import java.util.Arrays; +import java.util.List; + +public class Test { + + void list(List<String> l) { + + } + + void m(String[] a) { + list(Arrays.asList(a)); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeFewParameters.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeFewParameters.java new file mode 100644 index 000000000000..92ed4293c63b --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeFewParameters.java @@ -0,0 +1,13 @@ +// "Wrap 4th parameter using 'Arrays.asList'" "true" +import java.util.List; + +public class Test { + + void list(int i, int j, int k, List<String> l, String s) { + + } + + void m(String[] a) { + list(1, 2, 3, a<caret>, "asd"); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeNotConvertible.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeNotConvertible.java new file mode 100644 index 000000000000..8a8e0153aed4 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeNotConvertible.java @@ -0,0 +1,13 @@ +// "Wrap using 'Arrays.asList'" "false" +import java.util.LinkedList; + +public class Test { + + void list(LinkedList<String> l) { + + } + + void m(String[] a) { + list(a<caret>); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeNotConvertible2.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeNotConvertible2.java new file mode 100644 index 000000000000..c27ca44463db --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeNotConvertible2.java @@ -0,0 +1,13 @@ +// "Wrap using 'Arrays.asList'" "false" +import java.util.LinkedList; + +public class Test { + + void list(LinkedList<String> l) { + + } + + void m(Long[] a) { + list(a<caret>); + } +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeSingleParameter.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeSingleParameter.java new file mode 100644 index 000000000000..fcc446717771 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/wrapArrayToArraysAsList/beforeSingleParameter.java @@ -0,0 +1,13 @@ +// "Wrap using 'Arrays.asList'" "false" +import java.util.List; + +public class Test { + + void list(List<String> l) { + + } + + void m(String[] a) { + list(a<caret>); + } +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterBoolean.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterBoolean.java new file mode 100644 index 000000000000..9b101a0a3f08 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterBoolean.java @@ -0,0 +1,13 @@ +// "Surround annotation parameter value with quotes" "true" +class X { + + @interface MyAnnotation { + String value(); + } + + @MyAnnotation("true") + void m() { + + } + +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterChar.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterChar.java new file mode 100644 index 000000000000..7e4931578a58 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterChar.java @@ -0,0 +1,13 @@ +// "Surround annotation parameter value with quotes" "true" +class X { + + @interface MyAnnotation { + String value(); + } + + @MyAnnotation(value= "x") + void m() { + + } + +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterChar2.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterChar2.java new file mode 100644 index 000000000000..6167c3873f85 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterChar2.java @@ -0,0 +1,13 @@ +// "Surround annotation parameter value with quotes" "true" +class X { + + @interface MyAnnotation { + String value(); + } + + @MyAnnotation(value= "\n") + void m() { + + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterLong.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterLong.java new file mode 100644 index 000000000000..b434e4774a82 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/afterLong.java @@ -0,0 +1,15 @@ +// "Surround annotation parameter value with quotes" "true" +class X { + + @interface MyAnnotation { + int value0(); + String value(); + long value1(); + } + + @MyAnnotation(value0 = 1, value= "1000L", value1 = 10L) + void m() { + + } + +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeBoolean.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeBoolean.java new file mode 100644 index 000000000000..04bba2333bd8 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeBoolean.java @@ -0,0 +1,13 @@ +// "Surround annotation parameter value with quotes" "true" +class X { + + @interface MyAnnotation { + String value(); + } + + @MyAnnotation(tr<caret>ue) + void m() { + + } + +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeChar.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeChar.java new file mode 100644 index 000000000000..92dc9c53b345 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeChar.java @@ -0,0 +1,13 @@ +// "Surround annotation parameter value with quotes" "true" +class X { + + @interface MyAnnotation { + String value(); + } + + @MyAnnotation(value='<caret>x') + void m() { + + } + +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeChar2.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeChar2.java new file mode 100644 index 000000000000..1f988b4e4f91 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeChar2.java @@ -0,0 +1,13 @@ +// "Surround annotation parameter value with quotes" "true" +class X { + + @interface MyAnnotation { + String value(); + } + + @MyAnnotation(value='<caret>\n') + void m() { + + } + +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeLong.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeLong.java new file mode 100644 index 000000000000..9e8ee1565404 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeLong.java @@ -0,0 +1,15 @@ +// "Surround annotation parameter value with quotes" "true" +class X { + + @interface MyAnnotation { + int value0(); + String value(); + long value1(); + } + + @MyAnnotation(value0 = 1, value=1<caret>000L, value1 = 10L) + void m() { + + } + +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable.java new file mode 100644 index 000000000000..a03677e097a8 --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable.java @@ -0,0 +1,10 @@ +// "Surround annotation parameter value with quotes" "false" +class X { + + void m() { + + String s = 123<caret>45; + + } + +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable2.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable2.java new file mode 100644 index 000000000000..c5d5fd8115be --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable2.java @@ -0,0 +1,13 @@ +// "Surround annotation parameter value with quotes" "false" +class X { + + @interface MyAnnotation { + int value(); + } + + @MyAnnotation(tr<caret>ue) + void m() { + + } + +} diff --git a/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable3.java b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable3.java new file mode 100644 index 000000000000..c04ce8f94a7c --- /dev/null +++ b/java/java-tests/testData/codeInsight/surroundWithQuotesStringAnnotationParameterValue/beforeNotAvailable3.java @@ -0,0 +1,13 @@ +// "Surround annotation parameter value with quotes" "false" +class X { + + @interface MyAnnotation { + String c(); + } + + @MyAnnotation(tr<caret>ue) + void m() { + + } + +} diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/assert/beforeAssignment.java b/java/java-tests/testData/codeInsight/template/postfix/templates/assert/beforeAssignment.java new file mode 100644 index 000000000000..451aca185cdf --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/assert/beforeAssignment.java @@ -0,0 +1,7 @@ +public class Foo { + void m(boolean b) { + + b.assert<caret> + value = null; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/assert/beforeAssignment_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/assert/beforeAssignment_after.java new file mode 100644 index 000000000000..e5ecf0627526 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/assert/beforeAssignment_after.java @@ -0,0 +1,7 @@ +public class Foo { + void m(boolean b) { + + assert b;<caret> + value = null; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/assert/simpleWithSemicolon.java b/java/java-tests/testData/codeInsight/template/postfix/templates/assert/simpleWithSemicolon.java new file mode 100644 index 000000000000..7d92853b4e95 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/assert/simpleWithSemicolon.java @@ -0,0 +1,9 @@ +public class Foo { + void m() { + is();.assert<caret> + } + + boolean is() { + return false; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/assert/simpleWithSemicolon_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/assert/simpleWithSemicolon_after.java new file mode 100644 index 000000000000..11e8bdefe6d0 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/assert/simpleWithSemicolon_after.java @@ -0,0 +1,9 @@ +public class Foo { + void m() { + assert is();<caret> + } + + boolean is() { + return false; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/if/beforeAssignment.java b/java/java-tests/testData/codeInsight/template/postfix/templates/if/beforeAssignment.java new file mode 100644 index 000000000000..30ce3f4060b7 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/if/beforeAssignment.java @@ -0,0 +1,7 @@ +public class Foo { + void m(boolean b) { + + b.if<caret> + value = null; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/if/beforeAssignment_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/if/beforeAssignment_after.java new file mode 100644 index 000000000000..342bfe01434a --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/if/beforeAssignment_after.java @@ -0,0 +1,9 @@ +public class Foo { + void m(boolean b) { + + if (b) { + <caret> + } + value = null; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/if/simpleWithSemicolon.java b/java/java-tests/testData/codeInsight/template/postfix/templates/if/simpleWithSemicolon.java new file mode 100644 index 000000000000..4d67eaa05b0f --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/if/simpleWithSemicolon.java @@ -0,0 +1,9 @@ +public class Foo { + void m() { + is();.if<caret> + } + + boolean is() { + return false; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/if/simpleWithSemicolon_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/if/simpleWithSemicolon_after.java new file mode 100644 index 000000000000..a05e92eb1136 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/if/simpleWithSemicolon_after.java @@ -0,0 +1,11 @@ +public class Foo { + void m() { + if (is()) { + <caret> + } + } + + boolean is() { + return false; + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/throw/beforeAssignment.java b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/beforeAssignment.java new file mode 100644 index 000000000000..689f16d7dc02 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/beforeAssignment.java @@ -0,0 +1,9 @@ +import java.lang.Exception; + +public class Foo { + void m(Exception e) { + + e.throw<caret> + value = null + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/throw/beforeAssignment_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/beforeAssignment_after.java new file mode 100644 index 000000000000..e6dbc1d08a27 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/beforeAssignment_after.java @@ -0,0 +1,9 @@ +import java.lang.Exception; + +public class Foo { + void m(Exception e) { + + throw e;<caret> + value = null + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/throw/notThrowable_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/notThrowable_after.java index 900e720607eb..9ffb89507938 100644 --- a/java/java-tests/testData/codeInsight/template/postfix/templates/throw/notThrowable_after.java +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/notThrowable_after.java @@ -1,5 +1,5 @@ public class Foo { void m(Object o) { - throw o;<caret> + o.throw <caret> } }
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/throw/simpleWithSemicolon.java b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/simpleWithSemicolon.java new file mode 100644 index 000000000000..75267946a8a6 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/simpleWithSemicolon.java @@ -0,0 +1,7 @@ +import java.lang.RuntimeException; + +public class Foo { + void m() { + new RuntimeException("error");.throw<caret> + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/template/postfix/templates/throw/simpleWithSemicolon_after.java b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/simpleWithSemicolon_after.java new file mode 100644 index 000000000000..a0219e42ffc7 --- /dev/null +++ b/java/java-tests/testData/codeInsight/template/postfix/templates/throw/simpleWithSemicolon_after.java @@ -0,0 +1,7 @@ +import java.lang.RuntimeException; + +public class Foo { + void m() { + throw new RuntimeException("error"); + } +}
\ No newline at end of file |