diff options
author | Tor Norbye <tnorbye@google.com> | 2013-08-29 10:40:28 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-08-29 10:40:35 -0700 |
commit | 932259520ebaedeb2ccf4b7594bad50c700963d7 (patch) | |
tree | 2b52334b8a019d9652625b1432deac11a7c4b31e /jps | |
parent | e47d04f1f804b9e725b768725da436af6788f19b (diff) | |
download | idea-932259520ebaedeb2ccf4b7594bad50c700963d7.tar.gz |
Snapshot 1c7917945d4706cdbb32b599f81abd05c0251e32 from idea/132.27 branch of git://git.jetbrains.org/idea/community.git
1c79179: 2013-08-29 Yann Cébron - DevKit: smart EP "implementation" highlighting/completion
f3a83bc: 2013-08-29 Roman Shevchenko - IDEA-112827 (NPE in error reporter)
464a45b: 2013-08-29 Anna Kozlova - move pin button to the right side of popup (IDEA-112435)
1635be8: 2013-08-29 Yann Cébron - Dom EPs: add some <with> tags
6bcac42: 2013-08-29 Roman Shevchenko - IDEA-112824 (suppress SVN logging for normal use)
16d0ba4: 2013-08-29 Anna Kozlova - NPE
285509c4c: 2013-08-28 Max Medvedev - IDEA-111110 Groovy: Introduce Field Refactoring doesn't suggest to choose destination class
5415af1: 2013-08-28 Yann Cébron - Merge remote-tracking branch 'origin/master'
8462f3b: 2013-08-28 Dmitry Jemerov - cleanup
2ad6100: 2013-08-28 Yann Cébron - Merge remote-tracking branch 'origin/master'
9de8bfc: 2013-08-28 Dmitry Jemerov - Merge branch 'master' of git://github.com/niktrop/intellij-community into pull92
6315415: 2013-08-28 Dmitry Jemerov - cleanup
7281b73: 2013-08-28 Dmitry Jemerov - Merge branch 'cjfm3' of git://github.com/max-kammerer/intellij-community into pull87
6e31350: 2013-08-28 Dmitry Jemerov - fix couple of issues with https://github.com/JetBrains/intellij-community/pull/94
3695aa0: 2013-08-28 Dmitry Jemerov - Merge branch 'master' of git://github.com/asedunov/intellij-community into pull94
ce2c15f: 2013-08-28 Yann Cébron - fix javadoc @see link
6794ead: 2013-08-28 Anna Kozlova - skip adverts when server doesn't accept provided info
851da00: 2013-08-28 Anna Kozlova - skip advs in tests and headless mode
cddbc28: 2013-08-28 Anna Kozlova - EA-48802 - assert: JavaFileManagerBase.findClass
1eafaae: 2013-08-28 Anna Kozlova - EA-49147 - NPE: UnusedDeclarationInspection.isReadObjectMethod
f1a2040: 2013-08-28 Anna Kozlova - EA-49155 - NPE: JavaChangeSignatureDialog.doCalculateSignature
2684709: 2013-08-28 Dmitry Jemerov - MalformedFormatStringInspectionTest fixed
ce8088e: 2013-08-28 Evgeny Gerashchenko - Removed extra checking for duplicate annotations in one file. It is performed when reading file anyway.
9d4c7ca: 2013-08-28 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
2fd8641: 2013-08-28 Eugene Kudelevsky - add possibility to setup lookup element for XML attribute values; IDEA-102167 layout_* attributes should go first
3b065b1: 2013-08-28 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
d8d9168: 2013-08-28 Dmitry Trofimov - Libs update.
28a95a6: 2013-08-28 Alexey Kudravtsev - compilation
d4a0d69: 2013-08-28 Alexey Kudravtsev - notnull
f9f8006: 2013-08-28 Alexey Kudravtsev - moved to appropriate package
4d058f8: 2013-08-28 Alexey Kudravtsev - cleanup
111301a: 2013-08-28 Alexey Kudravtsev - extra method
01e59b0: 2013-08-28 Alexey Kudravtsev - doc
da966ae: 2013-08-28 Alexey Kudravtsev - cleanup
7503616: 2013-08-28 Alexey Kudravtsev - add method to javaversionservice
7d6de4f: 2013-08-28 Alexey Kudravtsev - notnull
dee081f: 2013-08-27 Alexey Kudravtsev - statistics
dd327c0: 2013-08-28 Dmitry Trofimov - Focus fixes.
7231931: 2013-08-28 Vladimir Krivosheev - WEB-8988 Return "open in browser" in context menu
2102255: 2013-08-28 Roman Shevchenko - app: install-over range extended for next EAPs
ddad3bb: 2013-08-28 Dmitry Avdeev - IDEA-112728 Can't create new task from tasks menu in toolbar: no need to fix lost typing for Go To Task
a8160c2: 2013-08-28 Dmitry Avdeev - typo
7328cbd: 2013-08-28 Dmitry Avdeev - cleanup
abbdb5a: 2013-08-28 Dmitry Avdeev - cleanup
a5c8503: 2013-08-28 Dmitry Avdeev - do not allow empty task name
e8daf37: 2013-08-28 Dmitry Avdeev - simplified
dff28d3: 2013-08-28 Dmitry Avdeev - simplified
38513a8: 2013-08-28 Dmitry Avdeev - cleanup
c09dd55: 2013-08-28 Vladimir Krivosheev - VariablesGroup — avoid array copy
8f3c91f: 2013-08-28 Roman Shevchenko - java: correct character escaping in decompiler
9a19e30: 2013-08-28 Dmitry Trofimov - Fixed hiding and activating of the terminal (PY-10669).
df672ba: 2013-08-28 Dmitry Trofimov - Terminal system settings refactored.
4653b54: 2013-08-28 Anna Kozlova - unknown features equality fixed
2896270: 2013-08-28 Anna Kozlova - ensure read access
ccff3af: 2013-08-28 Anna Kozlova - suggest to download plugins by unknown run configurations
9c8a3d2: 2013-08-28 Konstantin Bulenkov - include os.arch and jdk build number in about
861984c: 2013-08-28 Denis Fokin - IDEA-108265. We should not do anything if an empty array is passed.
a6b3441: 2013-08-28 Sergey Simonchik - EA-49063 - AIOOBE: ScriptRunnerUtil$ScriptOutput.onTextAvailable
845ee5c: 2013-08-28 Vladimir Krivosheev - value nullability
36121a2: 2013-08-28 Konstantin Kolosovsky - Merge branch 'svn1_8_new'
1515b70: 2013-08-28 Mikhail Golubev - Merge remote-tracking branch 'origin/master'
33d684e0: 2013-08-28 Mikhail Golubev - IDEA-110012 Not all Redmine Issues Available on "Open Task" (Limited to 100?)
39899b1: 2013-08-28 Bas Leijdekkers - IDEA-112782 (Change signature dialog shows unexpected 'cannot resolve symbol' message)
e469928: 2013-08-28 Anna Kozlova - accept test config methods in non-test classes (IDEA-112537)
b53abed: 2013-08-27 Anna Kozlova - fix typo
3074f49: 2013-08-28 Dmitry Avdeev - IDEA-112781 Open YouTrack task: Create changelist doesn't work with SVN ?
43c8897: 2013-08-27 Dmitry Avdeev - cleanup
ff6217a: 2013-08-28 Kirill Likhodedov - Annotate overriding methods
8e2d0e1: 2013-08-28 Roman Shevchenko - terminal: platform's Guava should be good enough for the plugin
2055780: 2013-08-27 Roman Shevchenko - EA-49123 (do not load extensions from static initializer)
116dc30: 2013-08-27 Roman Shevchenko - EA-49235 (check proxy port)
2b4f96f: 2013-08-27 Roman Shevchenko - EA-49235 (code readability)
ed03bca: 2013-08-27 Roman Shevchenko - EA-49142 (NPE, cleanup)
e6053d0: 2013-08-27 Roman Shevchenko - EA-49102 (face user with printing errors)
a748474: 2013-08-28 Vladimir Krivosheev - 4.1.0. update netty (now it is not patched build, https://github.com/netty/netty/pull/1762)
3c60901: 2013-08-28 Konstantin Bulenkov - better selection for mixed languages
20decc3: 2013-08-28 Konstantin Bulenkov - fix selection for files with multiple languages
878ad26: 2013-08-27 Max Medvedev - IDEA-111100 Groovy: Introduce Variable/Parameter Refactorings don't suggest to replace occurrences if applied to expressions inside code blocks
8a60662: 2013-08-27 Max Medvedev - IDEA-110981 Groovy: "Split into declaration and assignment" intention leaves unnecessary "=" if applied to closures
77912c1: 2013-08-27 Max Medvedev - IDEA-111101 Groovy: In-Place Introduce Field: Alt+I mnemonic doesn't work in the refactoring preview
088f68e: 2013-08-27 Max Medvedev - IDEA-111027 Groovy: In-Place Introduce Variable: PIEAE at GrInplaceIntroducer.<init> on introducing a variable within one-line method/closure
a2210a4: 2013-08-27 Aleksei Sedunov - Extract inheritor candidate check into separate InheritanceChecker interface
f40be5e: 2013-08-27 Alexander Zolotov - Filter moduleAwareConfigurables by module
cf7704f: 2013-08-26 Alexander Zolotov - WEB-6452 SASS suggests functions at the top, instead of property values
165ccf7: 2013-08-27 Konstantin Kolosovsky - IDEA-94942 Fixed diff, annotate errors in history view after rename/move
7b6396a: 2013-08-27 Dmitry Jemerov - branch number 132
e176d25: 2013-08-27 Sergey Evdokimov - IDEA-112754 Maven import: NCDFE for org/jetbrains/plugins/groovy/util/ClassInstanceCache
43c49f6: 2013-08-27 Sergey Evdokimov - IDEA-112754 Maven import: NCDFE for org/jetbrains/plugins/groovy/util/ClassInstanceCache
377dd45: 2013-08-27 Konstantin Bulenkov - fix memory leak
203fb69: 2013-08-27 Sergey Simonchik - WEB-9011 Karma plugin ignored tests
3b896f2: 2013-08-27 Sergey Evdokimov - Make project unignored when new module is created by ignored project
9ae29c6: 2013-08-27 Sergey Evdokimov - Remove maven project from project tree when user deletes module. +review CR-IC-2084
0f0f39e: 2013-08-27 Vladimir Krivosheev - cleanup, Overrides
3dddec4: 2013-08-27 Vladimir Krivosheev - cleanup
a2fff55: 2013-08-27 Aleksey Pivovarov - Github: Add API function for loading Commit Comments
9bd1660: 2013-08-27 Aleksey Pivovarov - fix IndexOutOfBoundsException on inserting empty collection to empty model
46b8998: 2013-08-27 Nadya Zabrodina - exception during annotate copied file fixed
66640b2: 2013-08-27 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
c597bcc: 2013-08-27 Sergey Evdokimov - Remove maven project from project tree when user deletes module. +review CR-IC-2084
33e932a: 2013-08-27 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
7cc9cca: 2013-08-27 Vladislav.Soroka - IDEA-79466 gradle support should generate web module configuration
42e649d: 2013-08-27 Dmitry Jemerov - better names for couple of new classes added to API
5c70eaf: 2013-08-27 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
2e0f1fa: 2013-08-27 Dmitry Trofimov - Update lib.
dcc2c4b: 2013-08-27 Dmitry Trofimov - Override isRetina.
05b716b: 2013-08-27 nik - processing dependencies in JPS: @NotNull annotations and javadoc added
6314b6e: 2013-08-27 Dmitry Trofimov - Fixed for Retina.
9d1886c: 2013-08-27 Dmitry Avdeev - navigatable xsd documentation
0f389c5: 2013-08-27 Vladimir Krivosheev - hide internal class XValuePresenterAdapter
a0386eb: 2013-08-27 Mikhail Golubev - Merge remote-tracking branch 'origin/master'
53248dc: 2013-08-27 Vladimir Krivosheev - fix createPresenter
d0355b3: 2013-08-27 Sergey Evdokimov - Remove maven project from project tree when user deletes module. +review CR-IC @Anton.Makeev
fb48f62: 2013-08-27 Sergey Evdokimov - Optimization of MavenProjectsTree.isManagedFile()
6b123aa: 2013-08-27 nik - JPS dependencies enumerator: convenient method added
d4579e1: 2013-08-27 Dmitry Avdeev - UrlPsiReference promoted
3b1feea: 2013-08-27 Dmitry Avdeev - cleanup
ee18443: 2013-08-27 Dmitry Avdeev - cleanup
ca2484e: 2013-08-27 Dmitry Avdeev - cleanup
c9e045b: 2013-08-27 Vladimir Krivosheev - 1) methods "void setPresentation(@NonNls String name, @Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String separator, @NonNls @NotNull String value, boolean hasChildren);" and "void setPresentation(@NonNls String name, @Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String value, boolean hasChildren);"
b38d58a: 2013-08-27 Konstantin Kolosovsky - IDEA-94942 Fixed treating svn client warnings as errors
8cab12c: 2013-08-27 Dmitry Jemerov - separate UI and non-UI parts of MalformedFormatStringInspection
93e3fa6: 2013-08-20 Jason Holmes - Custom "Malformed format string" inspection
b9f6fde: 2013-08-27 nik - actions to mark/unmark roots in Project View refactored to support custom root types
0455e46: 2013-08-27 Aleksey Pivovarov - Github: remove useless listener
7f40613: 2013-08-27 Aleksey Pivovarov - Github: reset User on token change
c8a5402: 2013-08-27 Aleksey Pivovarov - Github: change layout
89769be: 2013-08-27 Aleksey Pivovarov - Github: add test
0d8ab04: 2013-08-27 Aleksey Pivovarov - Github: comment
cba103c: 2013-08-27 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
d6ca049: 2013-08-27 Anna Kozlova - allow autoPopup after custom symbols (IDEA-112571)
a70c338: 2013-08-27 Konstantin Bulenkov - IDEA-110846 File Structure pop-up doesn't work properly for template languages
4896775: 2013-08-27 Konstantin Bulenkov - recent files duplicates
05835fa: 2013-08-27 Fedor Korotkov - WEB-6328 Add support for HTML5 <main> element
2407d7b: 2013-08-27 Anna Kozlova - allow to call getValue without readAction as it was before
29cb25d: 2013-08-27 Dmitry Avdeev - fixing the leak
7d3932a: 2013-08-27 Dmitry Avdeev - IDEA-112708 Static classes in JSP class block are considered an error
f6dbce2: 2013-08-26 Mikhail Golubev - IDEA-112605 Task management: can't add Generic server: NoClassDefFoundError: XPathFileType
82c1dc1: 2013-08-27 Konstantin Kolosovsky - Merge branch 'svn1_8_new'
08d46f1: 2013-08-27 Alexey Kudravtsev - highlightVisitor moves and cleanup
e0fec9d: 2013-08-27 Alexey Kudravtsev - Merge remote-tracking branch 'origin/master'
e9b1dfc: 2013-08-27 Anna Kozlova - dumb smart lambda completion (IDEA-112553)
6da30a4: 2013-08-26 Alexey Kudravtsev - calculate column/offset: optimisation of the no-tabs case
c0990c4: 2013-08-26 Alexey Kudravtsev - race conditions?
135e250: 2013-08-26 Alexey Kudravtsev - notnull, cleanup
75b28ba: 2013-08-26 Alexey Kudravtsev - file was not rehighlighted on some changes
5647d35: 2013-08-26 Sergey Evdokimov - Make myManagedFilesPaths a Set to avoid duplication.
680dd76: 2013-08-27 Aleksey Pivovarov - Github: fix memory leak on Exception in setUp();
e3092b7: 2013-08-27 Dmitry Avdeev - IDEA-112611 Task management: DVCS: closing a task fails: "Cannot delete the branch master"
d12d4fe: 2013-08-27 Anna Kozlova - logging for EA-49099 - PIEAE: PsiAnchor$StubIndexReference.getStartOffset
3cc53fe: 2013-08-27 Anna Kozlova - revert changes in api
10fbef9: 2013-08-27 Roman Shevchenko - Test data updated
a5455ba: 2013-08-27 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
8ed3ae8: 2013-08-27 Dmitry Trofimov - Updated lib.
e6df583: 2013-08-27 Dmitry Trofimov - Added guava lib to terminal.
1853090: 2013-08-27 Dmitry Trofimov - Draw image Retina support.
a7ebcaf: 2013-08-27 Dmitry Trofimov - Open session action moved to constructor.
5176bfa: 2013-08-26 Sergey Evdokimov - Fix maven tests
291f740: 2013-08-26 Vladimir Krivosheev - we must check if any port free too
18d4be6: 2013-08-26 Vassiliy Kudryashov - IDEA-70769 Settings panel: increase speed of scrollbars
0c76aca: 2013-08-26 Vassiliy Kudryashov - IDEA-112524 Working directory for default rake tasks is changed to $MODULE_DIR$ after project's reopening
e2b7f6b: 2013-08-26 Konstantin Bulenkov - pattern dependent delay
1916142: 2013-08-26 Vladimir Krivosheev - cleanup
3da9dcd: 2013-08-26 Vladimir Krivosheev - done: custom binary request handler
e02eba9: 2013-08-26 Aleksey Pivovarov - Github: do not produce dozens of notifications
8e41d59: 2013-08-26 Aleksey Pivovarov - Simplify
78c800d: 2013-08-26 Aleksey Pivovarov - Github: respect 'max' parameter
3afb19f: 2013-08-26 Maxim.Mossienko - proper versioning of stub index when persistent enumerator version changes
c853e9e: 2013-08-26 Eugene Kudelevsky - IDEA-112376 add "importFilter" extension point to force using FQN when importing class
31281a9: 2013-08-26 Kirill Likhodedov - [git] Don't write empty lines to LOG.debug.
493b9fb: 2013-08-26 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
60384ba: 2013-08-26 Dmitry Trofimov - Enable Run local terminal action for Windows.
bfa8e61: 2013-08-26 Dmitry Jemerov - stupid typo fixed
04a76c3: 2013-08-26 Anna Kozlova - IDEA-112555 Bad code is green with method references on instance
8f5139d: 2013-08-26 Denis Fokin - IDEA-108265. Now user is asked whether the project should be opened in a new frame.
da958ab: 2013-08-26 Natalia Ukhorskaya - Decompile chars, bytes and shorts correctly
8008709: 2013-08-26 Roman Shevchenko - java: incorrect annotation decoding fixed
9f07ea5: 2013-08-26 Roman Shevchenko - logging
e07c905: 2013-08-26 Dmitry Trofimov - Merge remote-tracking branch 'origin/master'
e81832d: 2013-08-26 Dmitry Trofimov - This update fixes pty on windows.
e36607b: 2013-08-26 Konstantin Bulenkov - new renderer
9ea47a5: 2013-08-26 nik - source roots editors: obtain icons for content tree from extension
d52dfb8: 2013-08-26 nik - constants moved
710d3ba: 2013-08-26 niktrop - Code style fixed
aa8832d: 2013-08-26 Sergey Simonchik - code style: two subsequent ifs merged to reduce inner indent
ed88487: 2013-08-26 Konstantin Kolosovsky - IDEA-94942 Provide detailed error messages to user instead of general ones
e0df7a3: 2013-08-26 Vassiliy Kudryashov - IDEA-112524 Working directory for default rake tasks is changed to $MODULE_DIR$ after project's reopening
e60a55b: 2013-08-26 nik - source roots editors refactored: root type specific UI moved to extension
928ea20: 2013-08-26 Mikhail Golubev - Merge remote-tracking branch 'origin/master'
70d526d: 2013-08-26 Anna Kozlova - guardedBy itself support (IDEA-112565)
2e23cb8: 2013-08-26 Anna Kozlova - restore bytecode viewer for java classes
89dffc9: 2013-08-26 Anna Kozlova - cal property name: accept without any other checks non-letter prefixes (IDEA-112585)
bab044f: 2013-08-26 Vladimir Krivosheev - restore Alarm.cancelRequest
dd817dc: 2013-08-26 Sergey Simonchik - simplification
7046dc4: 2013-08-26 niktrop - Some refactoring for reusing GenerateEquals UI in scala plugin
44e4219: 2013-08-26 Sergey Evdokimov - IDEA-112529 Maven: code completion could work in file path value with property references
867be29: 2013-08-26 Denis Fokin - Jumplist libraries changes. This is a release version of dll with eliminated MSVCRT dependencies.
7b0029d: 2013-08-26 Anton Makeev - CIDR: language tests in windows +review CR-OC @micha
9bef3a2: 2013-08-26 Konstantin Kolosovsky - IDEA-94942 Updated cleanup behavior after previous command failed
8447776: 2013-08-26 Mikhail Golubev - Remove SelectorBasedResponseHandler#getSelectorFileType, delegate to #getResponseType instead. Add missing @NotNull annotation, update doc comments.
d7ecb44: 2013-08-26 Anna Kozlova - treat classes with before/after methods as test classes for bad declared exceptions (IDEA-112537)
4be2bcf: 2013-08-26 Anna Kozlova - restore suggestion to remove 'abstract' when method has body
c57c308: 2013-08-26 Anna Kozlova - local can be final inside lambda body (IDEA-112630)
b8170a6: 2013-08-26 Vladimir Krivosheev - isValuesCustomSorted, add or not SortValuesAction (alphabetically sort) TODO: this action should be moved to "Variables" as gear action
b56b744: 2013-08-26 Mikhail Golubev - Merge remote-tracking branch 'origin/master'
ba7e194: 2013-08-23 Mikhail Golubev - Migrate Assembla to new GenericRepository
dd0885d: 2013-08-23 Mikhail Golubev - Refactor TemplateVariable
aa94a3c: 2013-08-23 Mikhail Golubev - Add several tests of date parsing
0e7e61e: 2013-08-23 Mikhail Golubev - Reflective PsiElements creation in JqlParserDefinition
a5f3011: 2013-08-26 Konstantin Kolosovsky - IDEA-94942 Short refactoring (removed duplication)
01cd38b: 2013-08-26 Sergey Simonchik - unnecessary line removed
7c34a2a: 2013-08-26 Dmitry Avdeev - IDEA-60895 No completion for enumerated and boolean values of xml tags
8b83a30: 2013-08-26 Vladislav.Soroka - gradle: cosmetic UI fix
8ee6a76: 2013-08-26 Roman Shevchenko - Convenient debug logging
cde5373: 2013-08-26 Dmitry Avdeev - IDEA-60895 No completion for enumerated and boolean values of xml tags
75d9b47: 2013-08-24 Max Medvedev - IDEA-112621 Groovy: Remove explicit type declaration intention
d1c29fb: 2013-08-23 Max Medvedev - separate visit methods for all types of classes, enums, interfaces, annotation types, and anonymous classes
5eca3d0: 2013-08-23 Max Medvedev - Byte code viewer shows byte code for groovy scripts
c96d27f: 2013-08-23 Max Medvedev - Convert anonymous class to closure: don't insert 'as Runnable' if groovy version is at least 2.2
7e993a0: 2013-08-23 Max Medvedev - IDEA-112560 process only applicable mixins to a ref
c33dc4a: 2013-08-26 Roman Shevchenko - platform: unified loading of system libraries (done right)
d492a6f: 2013-08-25 Roman Shevchenko - logging
2f2b546: 2013-08-25 Roman Shevchenko - IDEA-112462 (allow plugins to extend lib search path)
2a39bf2: 2013-08-25 Maxim.Mossienko - restart lexer from 0 offset when searching from start
a0858dbf: 2013-08-25 Maxim.Mossienko - 20% more compact compiler caches (-50M for IDEA project)
5ce3373: 2013-08-25 Maxim.Mossienko - IDEA-111918 Find: comments / string literals only: just 1 entry is found in each comment or literal
68ffc65: 2013-08-25 Maxim.Mossienko - faster contol + shift + N / control + N by default
eb67af1: 2013-08-24 Vassiliy Kudryashov - IDEA-107413 Cannot drag'n'drop more than one item in Changes View
d5ed7b5: 2013-08-24 nik - store properties of source folder in JPS element
b3dd357: 2013-08-24 nik - typo
5b8b1ff: 2013-08-24 Kirill Likhodedov - Merge remote-tracking branch 'origin/master'
0dd284a: 2013-08-24 Kirill Likhodedov - Better assertion error in the DefaultLogger
3146c0b: 2013-08-23 Bas Leijdekkers - foreach can also initialize field
6356a11: 2013-08-23 Konstantin Bulenkov - completely refacrored
6ad3452: 2013-08-23 Anna Kozlova - show conflict on invert boolean and method references (IDEA-112572)
4726276: 2013-08-23 Anna Kozlova - extract method from lambda body: accept parameters of parent method (IDEA-112570)
16a5e32: 2013-08-23 Gregory.Shrago - EditorEx: permanent header API
edc3497: 2013-08-23 Konstantin Kolosovsky - IDEA-94942 Content retrieval from svn refactored to ClientFactory model
0f40312: 2013-08-23 Mikhail Golubev - Change JqlQuery methods, JqlTerminalClause should extend JqlClause
c335f2b: 2013-08-23 Mikhail Golubev - IDEA-111811 Task management: JIRA: JQL: code completion suggests nothing after closing parenthesis
6e6972a: 2013-08-23 Konstantin Kolosovsky - IDEA-94942 Annotate action
e9d5412: 2013-08-23 Mikhail Golubev - Update description of NATIVE_SEARCH feature in TaskRepository
3c948a8: 2013-08-22 Konstantin Kolosovsky - IDEA-94942 Code cleanup - unused parameters removed
64706df: 2013-08-22 Konstantin Kolosovsky - IDEA-112184
0e41cad: 2013-08-22 Konstantin Kolosovsky - IDEA-94942 Simple property client to fix SvnMergeProvider.isBinary implementation
8091bb0: 2013-08-22 Konstantin Kolosovsky - IDEA-94942 Implemented file conflicts resolving Updated "svn info" result parsing
040f405: 2013-08-21 Konstantin Kolosovsky - IDEA-94942 SvnBindClient - unsupported methods removed
cef0440: 2013-08-21 Konstantin Kolosovsky - IDEA-94942 "bindSvn" module classes moved to "svn4idea" SvnBindClient unsupported methods will be removed in next commit (to track change like "rename" instead of "delete" + "add" to preserve history)
6c36a93: 2013-08-20 Konstantin Kolosovsky - IDEA-112184 Added logging to detect authentication issues
928c01e: 2013-08-07 Konstantin Kolosovsky - IDEA-94942 - Basic svn 1.8 test support
d880599: 2013-08-20 Konstantin Kolosovsky - IDEA-94942 Small text fixes Ignoring tests for old/not used functionality
71384c1: 2013-08-19 Konstantin Kolosovsky - IDEA-94942 Copy and move actions
a5f7e7c: 2013-08-19 Konstantin Kolosovsky - IDEA-94942 Delete action
e197c08: 2013-08-19 Konstantin Kolosovsky - IDEA-94942 Fixed authentication for svn protocol
c28c127: 2013-08-19 Konstantin Kolosovsky - IDEA-94942 Short add, revert commands refactoring
e06a346: 2013-08-19 Konstantin Kolosovsky - IDEA-94942 Revert action Fixed status command for single file Fixed status result parsing for normal (non-modified versioned) file
0f66f9d: 2013-08-19 Konstantin Kolosovsky - IDEA-94942 Logging and comments for some commands
c928fe5: 2013-08-16 Konstantin Kolosovsky - IDEA-94942 Force command line client usage if working copy of svn 1.8 format detected
d6e4e38: 2013-08-16 Konstantin Kolosovsky - IDEA-94942 Fixed "add" action output parsing for binary files
1236be5: 2013-08-15 Konstantin Kolosovsky - IDEA-94942 Small refactoring and fixes after review
e05b576: 2013-08-15 Konstantin Kolosovsky - IDEA-94942 "Add" action for files and directories
ccf6085: 2013-08-15 Konstantin Kolosovsky - IDEA-94942 "Subversion" -> "Show History" for files and folders
aba7390: 2013-08-14 Konstantin Kolosovsky - IDEA-94942 Add command refactored
555d597: 2013-08-14 Konstantin Kolosovsky - IDEA-94942 Fixing status, info commands to use correct arguments
b083f31: 2013-08-14 Konstantin Kolosovsky - IDEA-94942 Diff provider (without revision properties) Small command refactoring
f657dc8: 2013-08-13 Konstantin Kolosovsky - IDEA-94942 Authentication updates Authentication for remote status command Result parsing for remote info command 2 way SSL support (could be issues with ordinary password entering after 2 way SSL)
2785122: 2013-07-29 Konstantin Kolosovsky - IDEA-94942 initial svn 1.8 support with already existing command line functionality
857bfd5: 2013-08-12 max-kammerer - Update CoreJavaFileManagerTest.java
13539bc: 2013-08-09 Mikhael Bogdanov - CoreJavaFileManager.findClass: properly resolve $ in inner class names
Change-Id: Ica3d3d647183983bcd88ce2fb3450deb86343cdb
Diffstat (limited to 'jps')
23 files changed, 309 insertions, 368 deletions
diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ClassRepr.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ClassRepr.java index 83b1ce253569..fdc84abf785f 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ClassRepr.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ClassRepr.java @@ -16,6 +16,8 @@ package org.jetbrains.jps.builders.java.dependencyView; import com.intellij.util.io.DataExternalizer; +import com.intellij.util.io.DataInputOutputUtil; +import gnu.trove.THashSet; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.asm4.Opcodes; @@ -235,7 +237,7 @@ public class ClassRepr extends Proto { this.myContext = context; myFileName = fn; mySuperClass = TypeRepr.createClassType(context, sup); - myInterfaces = (Set<TypeRepr.AbstractType>)TypeRepr.createClassType(context, i, new HashSet<TypeRepr.AbstractType>()); + myInterfaces = (Set<TypeRepr.AbstractType>)TypeRepr.createClassType(context, i, new THashSet<TypeRepr.AbstractType>(1)); myFields = f; myMethods = m; this.myAnnotationTargets = targets; @@ -250,41 +252,45 @@ public class ClassRepr extends Proto { super(in); try { this.myContext = context; - myFileName = in.readInt(); + myFileName = DataInputOutputUtil.readINT(in); mySuperClass = (TypeRepr.ClassType)TypeRepr.externalizer(context).read(in); - myInterfaces = (Set<TypeRepr.AbstractType>)RW.read(TypeRepr.externalizer(context), new HashSet<TypeRepr.AbstractType>(), in); - myFields = (Set<FieldRepr>)RW.read(FieldRepr.externalizer(context), new HashSet<FieldRepr>(), in); - myMethods = (Set<MethodRepr>)RW.read(MethodRepr.externalizer(context), new HashSet<MethodRepr>(), in); + myInterfaces = (Set<TypeRepr.AbstractType>)RW.read(TypeRepr.externalizer(context), new THashSet<TypeRepr.AbstractType>(1), in); + myFields = (Set<FieldRepr>)RW.read(FieldRepr.externalizer(context), new THashSet<FieldRepr>(), in); + myMethods = (Set<MethodRepr>)RW.read(MethodRepr.externalizer(context), new THashSet<MethodRepr>(), in); myAnnotationTargets = (Set<ElemType>)RW.read(UsageRepr.AnnotationUsage.elementTypeExternalizer, EnumSet.noneOf(ElemType.class), in); - final String s = in.readUTF(); + final String s = RW.readUTF(in); myRetentionPolicy = s.length() == 0 ? null : RetentionPolicy.valueOf(s); - myOuterClassName = in.readInt(); - myIsLocal = in.readBoolean(); - myIsAnonymous = in.readBoolean(); - myUsages =(Set<UsageRepr.Usage>)RW.read(UsageRepr.externalizer(context), new HashSet<UsageRepr.Usage>(), in); + myOuterClassName = DataInputOutputUtil.readINT(in); + int flags = DataInputOutputUtil.readINT(in); + myIsLocal = (flags & LOCAL_MASK) != 0; + myIsAnonymous = (flags & ANONYMOUS_MASK) != 0; + myUsages =(Set<UsageRepr.Usage>)RW.read(UsageRepr.externalizer(context), new THashSet<UsageRepr.Usage>(), in); } catch (IOException e) { throw new RuntimeException(e); } } + private static final int LOCAL_MASK = 1; + private static final int ANONYMOUS_MASK = 2; + @Override public void save(final DataOutput out) { try { super.save(out); - out.writeInt(myFileName); + DataInputOutputUtil.writeINT(out, myFileName); mySuperClass.save(out); RW.save(myInterfaces, out); RW.save(myFields, out); RW.save(myMethods, out); RW.save(myAnnotationTargets, UsageRepr.AnnotationUsage.elementTypeExternalizer, out); - out.writeUTF(myRetentionPolicy == null ? "" : myRetentionPolicy.toString()); - out.writeInt(myOuterClassName); - out.writeBoolean(myIsLocal); - out.writeBoolean(myIsAnonymous); + RW.writeUTF(out, myRetentionPolicy == null ? "" : myRetentionPolicy.toString()); + DataInputOutputUtil.writeINT(out, myOuterClassName); + DataInputOutputUtil.writeINT(out, (myIsLocal ? LOCAL_MASK:0) | (myIsAnonymous ? ANONYMOUS_MASK : 0)); + RW.save(myUsages, UsageRepr.externalizer(myContext), out); } catch (IOException e) { diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ClassfileAnalyzer.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ClassfileAnalyzer.java index ebcb39a8fd3b..98dffabc70e6 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ClassfileAnalyzer.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ClassfileAnalyzer.java @@ -16,6 +16,8 @@ package org.jetbrains.jps.builders.java.dependencyView; import com.intellij.openapi.util.Pair; +import gnu.trove.THashMap; +import gnu.trove.THashSet; import gnu.trove.TIntHashSet; import org.jetbrains.asm4.*; import org.jetbrains.asm4.signature.SignatureReader; @@ -302,14 +304,14 @@ class ClassfileAnalyzer { myAnonymousClassFlag.set(false); } - private final Set<MethodRepr> myMethods = new HashSet<MethodRepr>(); - private final Set<FieldRepr> myFields = new HashSet<FieldRepr>(); - private final Set<UsageRepr.Usage> myUsages = new HashSet<UsageRepr.Usage>(); + private final Set<MethodRepr> myMethods = new THashSet<MethodRepr>(); + private final Set<FieldRepr> myFields = new THashSet<FieldRepr>(); + private final Set<UsageRepr.Usage> myUsages = new THashSet<UsageRepr.Usage>(); private final Set<ElemType> myTargets = EnumSet.noneOf(ElemType.class); private RetentionPolicy myRetentionPolicy = null; - final Map<TypeRepr.ClassType, TIntHashSet> myAnnotationArguments = new HashMap<TypeRepr.ClassType, TIntHashSet>(); - final Map<TypeRepr.ClassType, Set<ElemType>> myAnnotationTargets = new HashMap<TypeRepr.ClassType, Set<ElemType>>(); + final Map<TypeRepr.ClassType, TIntHashSet> myAnnotationArguments = new THashMap<TypeRepr.ClassType, TIntHashSet>(); + final Map<TypeRepr.ClassType, Set<ElemType>> myAnnotationTargets = new THashMap<TypeRepr.ClassType, Set<ElemType>>(); public ClassCrawler(final int fn) { super(Opcodes.ASM4); diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/IntIntPersistentMaplet.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/IntIntPersistentMaplet.java deleted file mode 100644 index 34883524988a..000000000000 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/IntIntPersistentMaplet.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * 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. - */ -package org.jetbrains.jps.builders.java.dependencyView; - -import com.intellij.util.Processor; -import com.intellij.util.containers.SLRUCache; -import com.intellij.util.io.DataExternalizer; -import com.intellij.util.io.KeyDescriptor; -import com.intellij.util.io.PersistentHashMap; -import gnu.trove.TIntIntProcedure; -import org.jetbrains.annotations.NotNull; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.File; -import java.io.IOException; - -/** - * @author: db - * Date: 05.11.11 - */ -public class IntIntPersistentMaplet extends IntIntMaplet { - private static final Object NULL_OBJ = new Object(); - private static final int CACHE_SIZE = 512; - private final PersistentHashMap<Integer, Integer> myMap; - private final SLRUCache<Integer, Object> myCache; - - public IntIntPersistentMaplet(final File file, final KeyDescriptor<Integer> k) { - try { - myMap = new PersistentHashMap<Integer, Integer>(file, k, new DataExternalizer<Integer>() { - @Override - public void save(DataOutput out, Integer value) throws IOException { - out.writeInt(value); - } - - @Override - public Integer read(DataInput in) throws IOException { - return in.readInt(); - } - }); - myCache = new SLRUCache<Integer, Object>(CACHE_SIZE, CACHE_SIZE) { - @NotNull - @Override - public Object createValue(Integer key) { - try { - final Integer v1 = myMap.get(key); - return v1 == null? NULL_OBJ : v1; - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - }; - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public boolean containsKey(final int key) { - try { - return myMap.containsMapping(key); - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public int get(final int key) { - final Object obj = myCache.get(key); - return obj == NULL_OBJ? 0 : (Integer)obj; - } - - @Override - public void put(final int key, final int value) { - try { - myCache.remove(key); - myMap.put(key, value); - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void putAll(final IntIntMaplet m) { - m.forEachEntry(new TIntIntProcedure() { - @Override - public boolean execute(int key, int value) { - put(key, value); - return true; - } - }); - } - - @Override - public void remove(final int key) { - try { - myCache.remove(key); - myMap.remove(key); - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public void close() { - try { - myCache.clear(); - myMap.close(); - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - - public void flush(boolean memoryCachesOnly) { - if (memoryCachesOnly) { - if (myMap.isDirty()) { - myMap.dropMemoryCaches(); - } - } - else { - myMap.force(); - } - } - - @Override - public void forEachEntry(final TIntIntProcedure proc) { - try { - myMap.processKeysWithExistingMapping(new Processor<Integer>() { - @Override - public boolean process(Integer key) { - try { - final Integer value = myMap.get(key); - return value == null? proc.execute(key, -1) : proc.execute(key, value); - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - }); - } - catch (IOException e) { - throw new RuntimeException(e); - } - } -} diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/IntIntPersistentMultiMaplet.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/IntIntPersistentMultiMaplet.java index 1d724cf10a94..f37ce8fbe03e 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/IntIntPersistentMultiMaplet.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/IntIntPersistentMultiMaplet.java @@ -19,6 +19,7 @@ import com.intellij.openapi.util.Ref; import com.intellij.util.Processor; import com.intellij.util.containers.SLRUCache; import com.intellij.util.io.DataExternalizer; +import com.intellij.util.io.DataInputOutputUtil; import com.intellij.util.io.KeyDescriptor; import com.intellij.util.io.PersistentHashMap; import gnu.trove.TIntHashSet; @@ -98,7 +99,7 @@ class IntIntPersistentMultiMaplet extends IntIntMultiMaplet { @Override public boolean execute(int value) { try { - out.writeInt(value); + DataInputOutputUtil.writeINT(out, value); } catch (IOException e) { exRef.set(e); @@ -125,7 +126,7 @@ class IntIntPersistentMultiMaplet extends IntIntMultiMaplet { myCache.remove(key); myMap.appendData(key, new PersistentHashMap.ValueDataAppender() { public void append(final DataOutput out) throws IOException { - out.writeInt(value); + DataInputOutputUtil.writeINT(out, value); } }); } @@ -260,7 +261,7 @@ class IntIntPersistentMultiMaplet extends IntIntMultiMaplet { @Override public boolean execute(int elem) { try { - out.writeInt(elem); + DataInputOutputUtil.writeINT(out, elem); } catch (IOException e) { exRef.set(e); @@ -280,7 +281,7 @@ class IntIntPersistentMultiMaplet extends IntIntMultiMaplet { final TIntHashSet result = new TIntHashSet(); final DataInputStream stream = (DataInputStream)in; while (stream.available() > 0) { - result.add(in.readInt()); + result.add(DataInputOutputUtil.readINT(in)); } return result; } diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Mappings.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Mappings.java index f81f6c1cd414..346b65be500e 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Mappings.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Mappings.java @@ -52,7 +52,8 @@ public class Mappings { private static final float DEFAULT_SET_LOAD_FACTOR = 0.98f; private static final CollectionFactory<ClassRepr> ourClassSetConstructor = new CollectionFactory<ClassRepr>() { public Set<ClassRepr> create() { - return new HashSet<ClassRepr>(DEFAULT_SET_CAPACITY, DEFAULT_SET_LOAD_FACTOR); + // for IDEA codebase on average there is no more than 2.5 classes out of one source file, so we use smaller estimate + return new THashSet<ClassRepr>(5, DEFAULT_SET_LOAD_FACTOR); } }; diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/MethodRepr.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/MethodRepr.java index 62d811847c12..b358e1189b81 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/MethodRepr.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/MethodRepr.java @@ -16,16 +16,15 @@ package org.jetbrains.jps.builders.java.dependencyView; import com.intellij.util.io.DataExternalizer; +import com.intellij.util.io.DataInputOutputUtil; +import gnu.trove.THashSet; import org.jetbrains.asm4.Type; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.io.PrintStream; -import java.util.Arrays; -import java.util.Comparator; -import java.util.HashSet; -import java.util.Set; +import java.util.*; /** * @author: db @@ -127,7 +126,9 @@ class MethodRepr extends ProtoMember { final String[] e, final Object value) { super(a, s, n, TypeRepr.getType(context, Type.getReturnType(d)), value); - myExceptions = (Set<TypeRepr.AbstractType>)TypeRepr.createClassType(context, e, new HashSet<TypeRepr.AbstractType>()); + Set<TypeRepr.AbstractType> typeCollection = + e != null ? new THashSet<TypeRepr.AbstractType>(e.length) : Collections.<TypeRepr.AbstractType>emptySet(); + myExceptions = (Set<TypeRepr.AbstractType>)TypeRepr.createClassType(context, e, typeCollection); myArgumentTypes = TypeRepr.getType(context, Type.getArgumentTypes(d)); } @@ -135,9 +136,9 @@ class MethodRepr extends ProtoMember { super(context, in); try { final DataExternalizer<TypeRepr.AbstractType> externalizer = TypeRepr.externalizer(context); - final int size = in.readInt(); + final int size = DataInputOutputUtil.readINT(in); myArgumentTypes = RW.read(externalizer, in, new TypeRepr.AbstractType[size]); - myExceptions = (Set<TypeRepr.AbstractType>)RW.read(externalizer, new HashSet<TypeRepr.AbstractType>(), in); + myExceptions = (Set<TypeRepr.AbstractType>)RW.read(externalizer, new THashSet<TypeRepr.AbstractType>(0), in); } catch (IOException e) { throw new RuntimeException(e); diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Proto.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Proto.java index 593128edb982..62e0ebf3a23c 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Proto.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Proto.java @@ -15,6 +15,7 @@ */ package org.jetbrains.jps.builders.java.dependencyView; +import com.intellij.util.io.DataInputOutputUtil; import org.jetbrains.asm4.Opcodes; import java.io.DataInput; @@ -39,9 +40,9 @@ class Proto implements RW.Savable, Streamable { protected Proto(final DataInput in) { try { - access = in.readInt(); - signature = in.readInt(); - name = in.readInt(); + access = DataInputOutputUtil.readINT(in); + signature = DataInputOutputUtil.readINT(in); + name = DataInputOutputUtil.readINT(in); } catch (IOException e) { throw new RuntimeException(e); @@ -51,9 +52,9 @@ class Proto implements RW.Savable, Streamable { @Override public void save(final DataOutput out) { try { - out.writeInt(access); - out.writeInt(signature); - out.writeInt(name); + DataInputOutputUtil.writeINT(out, access); + DataInputOutputUtil.writeINT(out, signature); + DataInputOutputUtil.writeINT(out, name); } catch (IOException e) { throw new RuntimeException(e); diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ProtoMember.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ProtoMember.java index ff430e00e887..fb3cb474b79b 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ProtoMember.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/ProtoMember.java @@ -15,6 +15,7 @@ */ package org.jetbrains.jps.builders.java.dependencyView; +import com.intellij.util.io.DataInputOutputUtil; import org.jetbrains.asm4.Type; import java.io.DataInput; @@ -52,11 +53,11 @@ abstract class ProtoMember extends Proto { try { switch (in.readByte()) { case STRING: - return in.readUTF(); + return RW.readUTF(in); case NONE: return null; case INTEGER: - return in.readInt(); + return DataInputOutputUtil.readINT(in); case LONG: return in.readLong(); case FLOAT: @@ -64,7 +65,7 @@ abstract class ProtoMember extends Proto { case DOUBLE: return in.readDouble(); case TYPE : - return Type.getType(in.readUTF()); + return Type.getType(RW.readUTF(in)); } } catch (IOException e) { @@ -94,11 +95,12 @@ abstract class ProtoMember extends Proto { try { if (myValue instanceof String) { out.writeByte(STRING); - out.writeUTF((String)myValue); + String value = (String)myValue; + RW.writeUTF(out, value); } else if (myValue instanceof Integer) { out.writeByte(INTEGER); - out.writeInt(((Integer)myValue).intValue()); + DataInputOutputUtil.writeINT(out, ((Integer)myValue).intValue()); } else if (myValue instanceof Long) { out.writeByte(LONG); @@ -114,7 +116,7 @@ abstract class ProtoMember extends Proto { } else if (myValue instanceof Type) { out.writeByte(TYPE); - out.writeUTF(((Type)myValue).getDescriptor()); + RW.writeUTF(out, ((Type)myValue).getDescriptor()); } else { out.writeByte(NONE); diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/RW.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/RW.java index 43871811a47b..f9d32b0708d9 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/RW.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/RW.java @@ -16,6 +16,8 @@ package org.jetbrains.jps.builders.java.dependencyView; import com.intellij.util.io.DataExternalizer; +import com.intellij.util.io.DataInputOutputUtil; +import com.intellij.util.io.IOUtil; import gnu.trove.TIntHashSet; import gnu.trove.TIntProcedure; @@ -27,17 +29,31 @@ import java.util.Collection; * Date: 29.01.11 */ public class RW { + private static final byte[] ourStringBuffer = IOUtil.allocReadWriteUTFBuffer(); + private RW() { } + protected static String readUTF(DataInput in) throws IOException { + synchronized (ourStringBuffer) { + return IOUtil.readUTFFast(ourStringBuffer, in); + } + } + + protected static void writeUTF(DataOutput out, String value) throws IOException { + synchronized (ourStringBuffer) { + IOUtil.writeUTFFast(ourStringBuffer, out, value); + } + } + public interface Savable { void save(DataOutput out); } public static <X extends Savable> void save(final X[] x, final DataOutput out) { try { - out.writeInt(x.length); + DataInputOutputUtil.writeINT(out, x.length); for (Savable s : x) { s.save(out); } @@ -49,12 +65,12 @@ public class RW { public static <X> void save(final TIntHashSet x, final DataOutput out) { try { - out.writeInt(x.size()); + DataInputOutputUtil.writeINT(out, x.size()); x.forEach(new TIntProcedure() { @Override public boolean execute(int value) { try { - out.writeInt(value); + DataInputOutputUtil.writeINT(out, value); return true; } catch (IOException e) { @@ -70,7 +86,7 @@ public class RW { public static <X> void save(final Collection<X> x, final DataExternalizer<X> e, final DataOutput out) { try { - out.writeInt(x.size()); + DataInputOutputUtil.writeINT(out, x.size()); for (X y : x) { e.save(out, y); @@ -85,7 +101,7 @@ public class RW { try { final int size = x.size(); - out.writeInt(size); + DataInputOutputUtil.writeINT(out, size); for (X s : x) { s.save(out); @@ -111,10 +127,10 @@ public class RW { public static TIntHashSet read(final TIntHashSet acc, final DataInput in) { try { - final int size = in.readInt(); + final int size = DataInputOutputUtil.readINT(in); for (int i = 0; i<size; i++) { - acc.add(in.readInt()); + acc.add(DataInputOutputUtil.readINT(in)); } return acc; @@ -126,7 +142,7 @@ public class RW { public static <X> Collection<X> read(final DataExternalizer<X> e, final Collection<X> acc, final DataInput in) { try { - final int size = in.readInt(); + final int size = DataInputOutputUtil.readINT(in); for (int i = 0; i<size; i++) { acc.add(e.read(in)); @@ -143,32 +159,6 @@ public class RW { void write(BufferedWriter w); } - public static <T extends Comparable> void writeln(final BufferedWriter w, final Collection<T> c, final ToWritable<T> t) { - if (c == null) { - writeln(w, "0"); - return; - } - - writeln(w, Integer.toString(c.size())); - - for (T e : c) { - t.convert(e).write(w); - } - } - - public static void writeln(final BufferedWriter w, final Collection<? extends Writable> c) { - if (c == null) { - writeln(w, "0"); - return; - } - - writeln(w, Integer.toString(c.size())); - - for (Writable e : c) { - e.write(w); - } - } - public interface ToWritable<T> { Writable convert(T x); } @@ -202,51 +192,6 @@ public class RW { } }; - public static Reader<String> myStringReader = new Reader<String>() { - public String read(final BufferedReader r) { - try { - return r.readLine(); - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - }; - - public static <T> Collection<T> readMany(final BufferedReader r, final Reader<T> c, final Collection<T> acc) { - final int size = readInt(r); - - for (int i = 0; i < size; i++) { - acc.add(c.read(r)); - } - - return acc; - } - - public static String lookString(final BufferedReader r) { - try { - r.mark(256); - final String s = r.readLine(); - r.reset(); - - return s; - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - - public static void readTag(final BufferedReader r, final String tag) { - try { - final String s = r.readLine(); - - if (!s.equals(tag)) System.err.println("Parsing error: expected \"" + tag + "\", but found \"" + s + "\""); - } - catch (IOException e) { - throw new RuntimeException(e); - } - } - public static String readString(final BufferedReader r) { try { return r.readLine(); @@ -267,31 +212,4 @@ public class RW { return 0; } } - - public static int readInt(final BufferedReader r) { - final String s = readString(r); - - try { - return Integer.parseInt(s); - } - catch (Exception n) { - System.err.println("Parsing error: expected integer, but found \"" + s + "\""); - return 0; - } - } - - public static String readStringAttribute(final BufferedReader r, final String tag) { - try { - final String s = r.readLine(); - - if (s.startsWith(tag)) return s.substring(tag.length()); - - System.err.println("Parsing error: expected \"" + tag + "\", but found \"" + s + "\""); - - return null; - } - catch (IOException e) { - throw new RuntimeException(e); - } - } } diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/TypeRepr.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/TypeRepr.java index 3a9fb53c6326..b341eaebe4dc 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/TypeRepr.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/TypeRepr.java @@ -17,6 +17,7 @@ package org.jetbrains.jps.builders.java.dependencyView; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.io.DataExternalizer; +import com.intellij.util.io.DataInputOutputUtil; import org.jetbrains.asm4.Type; import java.io.DataInput; @@ -64,7 +65,7 @@ class TypeRepr { public void save(final DataOutput out) { try { out.writeByte(PRIMITIVE_TYPE); - out.writeInt(type); + DataInputOutputUtil.writeINT(out, type); } catch (IOException e) { throw new RuntimeException(e); @@ -77,7 +78,7 @@ class TypeRepr { PrimitiveType(final DataInput in) { try { - type = in.readInt(); + type = DataInputOutputUtil.readINT(in); } catch (IOException e) { throw new RuntimeException(e); @@ -175,8 +176,8 @@ class TypeRepr { ClassType(final DependencyContext context, final DataInput in) { try { - className = in.readInt(); - final int size = in.readInt(); + className = DataInputOutputUtil.readINT(in); + final int size = DataInputOutputUtil.readINT(in); if (size == 0) { typeArgs = EMPTY_TYPE_ARRAY; } @@ -217,8 +218,8 @@ class TypeRepr { public void save(final DataOutput out) { try { out.writeByte(CLASS_TYPE); - out.writeInt(className); - out.writeInt(typeArgs.length); + DataInputOutputUtil.writeINT(out, className); + DataInputOutputUtil.writeINT(out, typeArgs.length); for (AbstractType t : typeArgs) { t.save(out); } @@ -241,18 +242,6 @@ class TypeRepr { return acc; } - public static Collection<AbstractType> createClassType(final DependencyContext context, - final Collection<String> args, - final Collection<AbstractType> acc) { - if (args != null) { - for (String a : args) { - acc.add(createClassType(context, context.get(a))); - } - } - - return acc; - } - public static ClassType createClassType(final DependencyContext context, final int s) { return (ClassType)context.getType(new ClassType(s)); } @@ -277,6 +266,7 @@ class TypeRepr { } public static AbstractType[] getType(final DependencyContext context, final Type[] t) { + if(t.length == 0) return AbstractType.EMPTY_TYPE_ARRAY; final AbstractType[] r = new AbstractType[t.length]; for (int i = 0; i < r.length; i++) { diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/UsageRepr.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/UsageRepr.java index abe9df363ba6..f5201a7f6001 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/UsageRepr.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/UsageRepr.java @@ -16,6 +16,7 @@ package org.jetbrains.jps.builders.java.dependencyView; import com.intellij.util.io.DataExternalizer; +import com.intellij.util.io.DataInputOutputUtil; import gnu.trove.TIntHashSet; import gnu.trove.TIntProcedure; import org.jetbrains.asm4.Type; @@ -77,8 +78,8 @@ class UsageRepr { private FMUsage(final DataInput in) { try { - myName = in.readInt(); - myOwner = in.readInt(); + myName = DataInputOutputUtil.readINT(in); + myOwner = DataInputOutputUtil.readINT(in); } catch (IOException e) { throw new RuntimeException(e); @@ -88,8 +89,8 @@ class UsageRepr { protected final void save(final byte tag, final DataOutput out) { try { out.writeByte(tag); - out.writeInt(myName); - out.writeInt(myOwner); + DataInputOutputUtil.writeINT(out, myName); + DataInputOutputUtil.writeINT(out, myOwner); } catch (IOException e) { throw new RuntimeException(e); @@ -215,7 +216,8 @@ class UsageRepr { super(in); try { final DataExternalizer<TypeRepr.AbstractType> externalizer = TypeRepr.externalizer(context); - myArgumentTypes = RW.read(externalizer, in, new TypeRepr.AbstractType[in.readInt()]); + int argumentTypes = DataInputOutputUtil.readINT(in); + myArgumentTypes = RW.read(externalizer, in, argumentTypes != 0 ? new TypeRepr.AbstractType[argumentTypes]: TypeRepr.AbstractType.EMPTY_TYPE_ARRAY); myReturnType = externalizer.read(in); } catch (IOException e) { @@ -284,7 +286,7 @@ class UsageRepr { public MetaMethodUsage(final DataInput in) { super(in); try { - myArity = in.readInt(); + myArity = DataInputOutputUtil.readINT(in); } catch (IOException e) { throw new RuntimeException(e); @@ -295,7 +297,7 @@ class UsageRepr { public void save(final DataOutput out) { save(METAMETHOD_USAGE, out); try { - out.writeInt(myArity); + DataInputOutputUtil.writeINT(out, myArity); } catch (IOException e) { throw new RuntimeException(e); @@ -348,7 +350,7 @@ class UsageRepr { private ClassUsage(final DataInput in) { try { - myClassName = in.readInt(); + myClassName = DataInputOutputUtil.readINT(in); } catch (IOException e) { throw new RuntimeException(e); @@ -359,7 +361,7 @@ class UsageRepr { public void save(final DataOutput out) { try { out.writeByte(CLASS_USAGE); - out.writeInt(myClassName); + DataInputOutputUtil.writeINT(out, myClassName); } catch (IOException e) { throw new RuntimeException(e); @@ -405,7 +407,7 @@ class UsageRepr { public void save(final DataOutput out) { try { out.writeByte(CLASS_AS_GENERIC_BOUND_USAGE); - out.writeInt(myClassName); + DataInputOutputUtil.writeINT(out, myClassName); } catch (IOException e) { throw new RuntimeException(e); @@ -427,7 +429,7 @@ class UsageRepr { private ClassExtendsUsage(final DataInput in) { try { - myClassName = in.readInt(); + myClassName = DataInputOutputUtil.readINT(in); } catch (IOException e) { throw new RuntimeException(e); @@ -438,7 +440,7 @@ class UsageRepr { public void save(final DataOutput out) { try { out.writeByte(CLASS_EXTENDS_USAGE); - out.writeInt(myClassName); + DataInputOutputUtil.writeINT(out, myClassName); } catch (IOException e) { throw new RuntimeException(e); @@ -481,7 +483,7 @@ class UsageRepr { public void save(final DataOutput out) { try { out.writeByte(CLASS_NEW_USAGE); - out.writeInt(myClassName); + DataInputOutputUtil.writeINT(out, myClassName); } catch (IOException e) { throw new RuntimeException(e); @@ -503,12 +505,12 @@ class UsageRepr { public static final DataExternalizer<ElemType> elementTypeExternalizer = new DataExternalizer<ElemType>() { @Override public void save(final DataOutput out, final ElemType value) throws IOException { - out.writeInt(value.ordinal()); + DataInputOutputUtil.writeINT(out, value.ordinal()); } @Override public ElemType read(final DataInput in) throws IOException { - final int ordinal = in.readInt(); + final int ordinal = DataInputOutputUtil.readINT(in); for (ElemType value : ElemType.values()) { if (value.ordinal() == ordinal) { return value; @@ -682,11 +684,6 @@ class UsageRepr { return context.getUsage(new ClassAsGenericBoundUsage(name)); } - - public static Usage createClassExtendsUsage(final DependencyContext context, final int name) { - return context.getUsage(new ClassExtendsUsage(name)); - } - public static Usage createClassNewUsage(final DependencyContext context, final int name) { return context.getUsage(new ClassNewUsage(name)); } diff --git a/jps/jps-builders/src/org/jetbrains/jps/incremental/FSOperations.java b/jps/jps-builders/src/org/jetbrains/jps/incremental/FSOperations.java index 3285a21a7339..63e538022160 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/incremental/FSOperations.java +++ b/jps/jps-builders/src/org/jetbrains/jps/incremental/FSOperations.java @@ -142,7 +142,7 @@ public class FSOperations { } private static Set<JpsModule> getDependentModulesRecursively(final JpsModule module, final JpsJavaClasspathKind kind) { - return JpsJavaExtensionService.dependencies(module).includedIn(kind).recursively().exportedOnly().getModules(); + return JpsJavaExtensionService.dependencies(module).includedIn(kind).recursivelyExportedOnly().getModules(); } public static void processFilesToRecompile(CompileContext context, ModuleChunk chunk, FileProcessor<JavaSourceRootDescriptor, ModuleBuildTarget> processor) throws IOException { diff --git a/jps/jps-builders/src/org/jetbrains/jps/incremental/storage/BuildDataManager.java b/jps/jps-builders/src/org/jetbrains/jps/incremental/storage/BuildDataManager.java index 3c9ac5b4e194..1a0ce3bdc1d6 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/incremental/storage/BuildDataManager.java +++ b/jps/jps-builders/src/org/jetbrains/jps/incremental/storage/BuildDataManager.java @@ -41,7 +41,7 @@ import java.util.concurrent.ConcurrentMap; * Date: 10/7/11 */ public class BuildDataManager implements StorageOwner { - private static final int VERSION = 19; + private static final int VERSION = 20; private static final Logger LOG = Logger.getInstance("#org.jetbrains.jps.incremental.storage.BuildDataManager"); private static final String SRC_TO_FORM_STORAGE = "src-form"; private static final String MAPPINGS_STORAGE = "mappings"; diff --git a/jps/model-api/src/org/jetbrains/jps/model/java/JpsJavaDependenciesEnumerator.java b/jps/model-api/src/org/jetbrains/jps/model/java/JpsJavaDependenciesEnumerator.java index 78d6d622fc06..82cec24868b2 100644 --- a/jps/model-api/src/org/jetbrains/jps/model/java/JpsJavaDependenciesEnumerator.java +++ b/jps/model-api/src/org/jetbrains/jps/model/java/JpsJavaDependenciesEnumerator.java @@ -16,31 +16,97 @@ package org.jetbrains.jps.model.java; import com.intellij.openapi.util.Condition; +import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.model.module.JpsDependenciesEnumerator; import org.jetbrains.jps.model.module.JpsDependencyElement; /** + * Interface for convenient processing dependencies of a java module or a java project. Allows to process {@link org.jetbrains.jps.model.module.JpsDependencyElement}s and collect classes + * and source roots. + * <p/> + * Use {@link org.jetbrains.jps.model.java.JpsJavaExtensionService#dependencies(org.jetbrains.jps.model.module.JpsModule)} to process dependencies of a module + * and use {@link org.jetbrains.jps.model.java.JpsJavaExtensionService#dependencies(org.jetbrains.jps.model.JpsProject)} to process dependencies of all modules in a project.<p> + * + * Note that all configuration methods modify {@link org.jetbrains.jps.model.module.JpsDependenciesEnumerator} instance instead of creating a new one. + * * @author nik */ public interface JpsJavaDependenciesEnumerator extends JpsDependenciesEnumerator { + /** + * Skip test dependencies + * + * @return this instance + */ + @NotNull JpsJavaDependenciesEnumerator productionOnly(); + + /** + * Skip runtime-only dependencies + * + * @return this instance + */ + @NotNull JpsJavaDependenciesEnumerator compileOnly(); + + /** + * Skip compile-only dependencies + * + * @return this instance + */ + @NotNull JpsJavaDependenciesEnumerator runtimeOnly(); + + /** + * Skip not exported dependencies. If this method is called after {@link #recursively()} direct non-exported dependencies won't be skipped + * + * @return this instance + */ + @NotNull JpsJavaDependenciesEnumerator exportedOnly(); + @NotNull + @Override + JpsJavaDependenciesEnumerator recursively(); + + /** + * Process all direct dependencies and recursively process transitive dependencies which marked with 'exported' + * + * @return this instance + */ + @NotNull + JpsJavaDependenciesEnumerator recursivelyExportedOnly(); + + + @NotNull JpsJavaDependenciesEnumerator withoutLibraries(); + @NotNull JpsJavaDependenciesEnumerator withoutDepModules(); + @NotNull JpsJavaDependenciesEnumerator withoutSdk(); + @NotNull JpsJavaDependenciesEnumerator withoutModuleSourceEntries(); + @NotNull @Override - JpsJavaDependenciesEnumerator recursively(); + JpsJavaDependenciesEnumerator satisfying(@NotNull Condition<JpsDependencyElement> condition); - @Override - JpsJavaDependenciesEnumerator satisfying(Condition<JpsDependencyElement> condition); - - JpsJavaDependenciesEnumerator includedIn(JpsJavaClasspathKind classpathKind); + /** + * Process only dependencies which should be included in the classpath specified by {@code classpathKind} parameter + * @param classpathKind + * @return this instance + */ + @NotNull + JpsJavaDependenciesEnumerator includedIn(@NotNull JpsJavaClasspathKind classpathKind); + /** + * @return enumerator for processing classes roots of the dependencies + */ + @NotNull JpsJavaDependenciesRootsEnumerator classes(); + + /** + * @return enumerator for processing source roots of the dependencies + */ + @NotNull JpsJavaDependenciesRootsEnumerator sources(); } diff --git a/jps/model-api/src/org/jetbrains/jps/model/module/JpsDependenciesEnumerator.java b/jps/model-api/src/org/jetbrains/jps/model/module/JpsDependenciesEnumerator.java index c31ab23ad8d6..d3102473a3c3 100644 --- a/jps/model-api/src/org/jetbrains/jps/model/module/JpsDependenciesEnumerator.java +++ b/jps/model-api/src/org/jetbrains/jps/model/module/JpsDependenciesEnumerator.java @@ -17,23 +17,63 @@ package org.jetbrains.jps.model.module; import com.intellij.openapi.util.Condition; import com.intellij.util.Consumer; +import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.model.library.JpsLibrary; import java.util.Set; /** + * Interface for convenient processing dependencies of a module or a project + * <p/> + * Use {@link org.jetbrains.jps.model.java.JpsJavaDependenciesEnumerator JpsJavaDependenciesEnumerator} for java-specific dependencies processing + * <p/> + * Note that all configuration methods modify {@link org.jetbrains.jps.model.module.JpsDependenciesEnumerator} instance instead of creating a new one. + * * @author nik */ public interface JpsDependenciesEnumerator { + @NotNull JpsDependenciesEnumerator withoutLibraries(); + @NotNull JpsDependenciesEnumerator withoutDepModules(); + @NotNull JpsDependenciesEnumerator withoutSdk(); + @NotNull JpsDependenciesEnumerator withoutModuleSourceEntries(); + + /** + * Recursively process modules on which the module depends + * + * @return this instance + */ + @NotNull JpsDependenciesEnumerator recursively(); - JpsDependenciesEnumerator satisfying(Condition<JpsDependencyElement> condition); + /** + * Process only dependencies which satisfies the specified condition + * + * @param condition filtering condition + * @return this instance + */ + @NotNull + JpsDependenciesEnumerator satisfying(@NotNull Condition<JpsDependencyElement> condition); + + /** + * @return all modules processed by enumerator + */ + @NotNull Set<JpsModule> getModules(); + + /** + * @return all libraries processed by enumerator + */ + @NotNull Set<JpsLibrary> getLibraries(); - void processModules(Consumer<JpsModule> consumer); + /** + * Runs <code>consumer.consume()</code> for each module processed by this enumerator + * + * @param consumer consumer + */ + void processModules(@NotNull Consumer<JpsModule> consumer); } diff --git a/jps/model-api/src/org/jetbrains/jps/model/module/JpsModuleSourceRoot.java b/jps/model-api/src/org/jetbrains/jps/model/module/JpsModuleSourceRoot.java index 713b18d2e70e..87af19012421 100644 --- a/jps/model-api/src/org/jetbrains/jps/model/module/JpsModuleSourceRoot.java +++ b/jps/model-api/src/org/jetbrains/jps/model/module/JpsModuleSourceRoot.java @@ -35,6 +35,9 @@ public interface JpsModuleSourceRoot extends JpsElement { <P extends JpsElement> JpsTypedModuleSourceRoot<P> asTyped(@NotNull JpsModuleSourceRootType<P> type); @NotNull + JpsTypedModuleSourceRoot<?> asTyped(); + + @NotNull JpsElement getProperties(); @NotNull diff --git a/jps/model-impl/src/com/intellij/openapi/fileTypes/WildcardFileNameMatcher.java b/jps/model-impl/src/com/intellij/openapi/fileTypes/WildcardFileNameMatcher.java index afbaaafbd292..8e22fe2cefa0 100644 --- a/jps/model-impl/src/com/intellij/openapi/fileTypes/WildcardFileNameMatcher.java +++ b/jps/model-impl/src/com/intellij/openapi/fileTypes/WildcardFileNameMatcher.java @@ -40,6 +40,7 @@ public class WildcardFileNameMatcher implements FileNameMatcher { myMatcher = PatternUtil.fromMask(pattern).matcher(""); } + @Override public boolean matches(final String filename) { synchronized (myMatcher) { myMatcher.reset(filename); @@ -55,6 +56,7 @@ public class WildcardFileNameMatcher implements FileNameMatcher { mySuffix = suffix; } + @Override public boolean matches(final String filename) { return filename.endsWith(mySuffix); } @@ -67,6 +69,7 @@ public class WildcardFileNameMatcher implements FileNameMatcher { myPrefix = prefix; } + @Override public boolean matches(final String filename) { return filename.startsWith(myPrefix); } @@ -79,6 +82,7 @@ public class WildcardFileNameMatcher implements FileNameMatcher { myInfix = infix; } + @Override public boolean matches(final String filename) { return filename.contains(myInfix); } @@ -108,10 +112,12 @@ public class WildcardFileNameMatcher implements FileNameMatcher { return new RegexpMatcher(pattern); } + @Override public boolean accept(@NotNull String fileName) { return myMatcher.matches(fileName); } + @Override @NonNls @NotNull public String getPresentableString() { diff --git a/jps/model-impl/src/org/jetbrains/jps/model/java/impl/JpsJavaDependenciesEnumeratorImpl.java b/jps/model-impl/src/org/jetbrains/jps/model/java/impl/JpsJavaDependenciesEnumeratorImpl.java index 17edcceb6271..c3ee73665f26 100644 --- a/jps/model-impl/src/org/jetbrains/jps/model/java/impl/JpsJavaDependenciesEnumeratorImpl.java +++ b/jps/model-impl/src/org/jetbrains/jps/model/java/impl/JpsJavaDependenciesEnumeratorImpl.java @@ -15,6 +15,7 @@ */ package org.jetbrains.jps.model.java.impl; +import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.model.java.*; import org.jetbrains.jps.model.library.JpsOrderRootType; import org.jetbrains.jps.model.module.JpsDependencyElement; @@ -44,24 +45,28 @@ public class JpsJavaDependenciesEnumeratorImpl extends JpsDependenciesEnumerator myHandlers = handlers != null ? handlers : Collections.<JpsJavaDependenciesEnumerationHandler>emptyList(); } + @NotNull @Override public JpsJavaDependenciesEnumerator productionOnly() { myProductionOnly = true; return this; } + @NotNull @Override public JpsJavaDependenciesEnumerator compileOnly() { myCompileOnly = true; return this; } + @NotNull @Override public JpsJavaDependenciesEnumerator runtimeOnly() { myRuntimeOnly = true; return this; } + @NotNull @Override public JpsJavaDependenciesEnumerator exportedOnly() { if (myRecursively) { @@ -73,17 +78,26 @@ public class JpsJavaDependenciesEnumeratorImpl extends JpsDependenciesEnumerator return this; } + @NotNull @Override - public JpsJavaDependenciesEnumerator includedIn(JpsJavaClasspathKind classpathKind) { + public JpsJavaDependenciesEnumerator recursivelyExportedOnly() { + return recursively().exportedOnly(); + } + + @NotNull + @Override + public JpsJavaDependenciesEnumerator includedIn(@NotNull JpsJavaClasspathKind classpathKind) { myClasspathKind = classpathKind; return this; } + @NotNull @Override public JpsJavaDependenciesRootsEnumerator classes() { return new JpsJavaDependenciesRootsEnumeratorImpl(this, JpsOrderRootType.COMPILED); } + @NotNull @Override public JpsJavaDependenciesRootsEnumerator sources() { return new JpsJavaDependenciesRootsEnumeratorImpl(this, JpsOrderRootType.SOURCES); diff --git a/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsDependenciesEnumeratorBase.java b/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsDependenciesEnumeratorBase.java index 86e248ea1916..c6dee7b8cce1 100644 --- a/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsDependenciesEnumeratorBase.java +++ b/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsDependenciesEnumeratorBase.java @@ -20,6 +20,7 @@ import com.intellij.util.CollectConsumer; import com.intellij.util.Consumer; import com.intellij.util.Processor; import gnu.trove.THashSet; +import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.model.library.JpsLibrary; import org.jetbrains.jps.model.module.*; @@ -43,36 +44,42 @@ public abstract class JpsDependenciesEnumeratorBase<Self extends JpsDependencies myRootModules = rootModules; } + @NotNull @Override public Self withoutLibraries() { myWithoutLibraries = true; return self(); } + @NotNull @Override public Self withoutDepModules() { myWithoutDepModules = true; return self(); } + @NotNull @Override public Self withoutSdk() { myWithoutSdk = true; return self(); } + @NotNull @Override public Self withoutModuleSourceEntries() { myWithoutModuleSourceEntries = true; return self(); } + @NotNull @Override - public Self satisfying(Condition<JpsDependencyElement> condition) { + public Self satisfying(@NotNull Condition<JpsDependencyElement> condition) { myCondition = condition; return self(); } + @NotNull @Override public Self recursively() { myRecursively = true; @@ -81,6 +88,7 @@ public abstract class JpsDependenciesEnumeratorBase<Self extends JpsDependencies protected abstract Self self(); + @NotNull @Override public Set<JpsModule> getModules() { Set<JpsModule> result = new HashSet<JpsModule>(); @@ -89,7 +97,7 @@ public abstract class JpsDependenciesEnumeratorBase<Self extends JpsDependencies } @Override - public void processModules(final Consumer<JpsModule> consumer) { + public void processModules(@NotNull final Consumer<JpsModule> consumer) { processDependencies(new Processor<JpsDependencyElement>() { @Override public boolean process(JpsDependencyElement dependencyElement) { @@ -167,6 +175,7 @@ public abstract class JpsDependenciesEnumeratorBase<Self extends JpsDependencies return myRootModules.contains(module); } + @NotNull @Override public Set<JpsLibrary> getLibraries() { Set<JpsLibrary> libraries = new HashSet<JpsLibrary>(); diff --git a/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsModuleSourceRootImpl.java b/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsModuleSourceRootImpl.java index 90369b816b4b..7ba971b0ade5 100644 --- a/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsModuleSourceRootImpl.java +++ b/jps/model-impl/src/org/jetbrains/jps/model/module/impl/JpsModuleSourceRootImpl.java @@ -62,6 +62,12 @@ public class JpsModuleSourceRootImpl<P extends JpsElement> extends JpsCompositeE return myRootType.equals(type) ? (JpsTypedModuleSourceRoot<P>)this : null; } + @NotNull + @Override + public JpsTypedModuleSourceRoot<?> asTyped() { + return this; + } + @Override public JpsElementType<?> getType() { return myRootType; diff --git a/jps/model-impl/testSrc/org/jetbrains/jps/model/JpsDependenciesEnumeratorTest.java b/jps/model-impl/testSrc/org/jetbrains/jps/model/JpsDependenciesEnumeratorTest.java index 744077ab89fc..95f3a63a6035 100644 --- a/jps/model-impl/testSrc/org/jetbrains/jps/model/JpsDependenciesEnumeratorTest.java +++ b/jps/model-impl/testSrc/org/jetbrains/jps/model/JpsDependenciesEnumeratorTest.java @@ -177,7 +177,7 @@ public class JpsDependenciesEnumeratorTest extends JpsJavaModelTestCase { assertClassRoots(orderEntries(myModule).withoutSdk(), getAsmJar()); assertClassRoots(orderEntries(myModule).withoutSdk().recursively(), getAsmJar(), getJDomJar()); - assertClassRoots(orderEntries(myModule).withoutSdk().recursively().exportedOnly(), getAsmJar()); + assertClassRoots(orderEntries(myModule).withoutSdk().recursivelyExportedOnly(), getAsmJar()); assertClassRoots(orderEntries(myModule).withoutSdk().exportedOnly().recursively()); } diff --git a/jps/model-serialization/src/org/jetbrains/jps/model/serialization/module/JpsModuleRootModelSerializer.java b/jps/model-serialization/src/org/jetbrains/jps/model/serialization/module/JpsModuleRootModelSerializer.java index e5adc2275384..62f76ff809d0 100644 --- a/jps/model-serialization/src/org/jetbrains/jps/model/serialization/module/JpsModuleRootModelSerializer.java +++ b/jps/model-serialization/src/org/jetbrains/jps/model/serialization/module/JpsModuleRootModelSerializer.java @@ -178,7 +178,7 @@ public class JpsModuleRootModelSerializer { rootModelElement.addContent(contentElement); for (JpsModuleSourceRoot root : sourceRoots) { if (FileUtil.startsWith(root.getUrl(), url)) { - saveSourceRoot(contentElement, (JpsTypedModuleSourceRoot<?>)root); + saveSourceRoot(contentElement, root.asTyped().getUrl(), root.asTyped()); } } for (String excludedUrl : excludedUrls) { @@ -241,9 +241,11 @@ public class JpsModuleRootModelSerializer { } } - public static <P extends JpsElement> void saveSourceRoot(Element contentElement, JpsTypedModuleSourceRoot<P> root) { + public static <P extends JpsElement> void saveSourceRoot(@NotNull Element contentElement, + final @NotNull String rootUrl, + @NotNull JpsTypedModuleSourceRoot<P> root) { Element sourceElement = new Element(SOURCE_FOLDER_TAG); - sourceElement.setAttribute(URL_ATTRIBUTE, root.getUrl()); + sourceElement.setAttribute(URL_ATTRIBUTE, rootUrl); JpsModuleSourceRootPropertiesSerializer<P> serializer = getSerializer(root.getRootType()); if (serializer != null) { String typeId = serializer.getTypeId(); diff --git a/jps/model-serialization/src/org/jetbrains/jps/model/serialization/module/JpsModuleSourceRootPropertiesSerializerImpl.java b/jps/model-serialization/src/org/jetbrains/jps/model/serialization/module/JpsModuleSourceRootPropertiesSerializerImpl.java new file mode 100644 index 000000000000..706ef83ab0c1 --- /dev/null +++ b/jps/model-serialization/src/org/jetbrains/jps/model/serialization/module/JpsModuleSourceRootPropertiesSerializerImpl.java @@ -0,0 +1,40 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jetbrains.jps.model.serialization.module; + +import org.jdom.Element; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.jps.model.JpsDummyElement; +import org.jetbrains.jps.model.JpsElementFactory; +import org.jetbrains.jps.model.module.JpsModuleSourceRootType; + +/** + * @author nik + */ +public class JpsModuleSourceRootPropertiesSerializerImpl extends JpsModuleSourceRootPropertiesSerializer<JpsDummyElement> { + public JpsModuleSourceRootPropertiesSerializerImpl(JpsModuleSourceRootType<JpsDummyElement> type, String typeId) { + super(type, typeId); + } + + @Override + public JpsDummyElement loadProperties(@NotNull Element sourceRootTag) { + return JpsElementFactory.getInstance().createDummyElement(); + } + + @Override + public void saveProperties(@NotNull JpsDummyElement properties, @NotNull Element sourceRootTag) { + } +} |