February 06, 2006

IntelliJ IDEA 6.0 "Demetra": The EAP has begun!

When we announced that the EAP for Demetra, the next version of IntelliJ IDEA, would start as soon as the version 5.1 is released, I don’t think people thought “as soon as” meant “a few hours after”. But it did, and the first EAP build of Demetra is now available, along with a list of new features.

I’m so tired of writing announcements that I won’t go into more detail right now, but I’ll definitely do so later… stay tuned to this blog. :-)

Posted by Dmitry Jemerov at 10:05 PM | Comments (3)

IntelliJ IDEA 5.1: What's new in OpenAPI

Now that the version 5.1 has been released, I decided to summarize the changes in OpenAPI for this version. None of them are major, but I hope that some of them enable new integration scenarios. An important point is that almost all of the changes are backward-compatible: if a plugin developed for the version 5.0 does not use any APIs which are not part of our OpenAPI, the plugin will work just as fine with version 5.1. All of the reports of actual plugin breakage that we have received during the 5.1 EAP cycle are related to usages of non-open APIs.

The major areas where new APIs have been added are:

PSI and Repository

  • Package-level annotations support: PsiPackage.getAnnotationList(). Version 5.1 has improved support for processing and validating package-level annotations, and the new method provides access to the annotation list.
  • Hierarchical method signatures: PsiClass.getVisibleSignatures(). The main motivation for this API is performance: it allows to calculate the information about the super methods of a method only once and not repeat any calculations for every superclass.
  • Indexing occurrences of specified regex patterns in comments: IndexPatternProvider and IndexPatternSearch. This is effectively a generalization of the TODO API: TODO has been decoupled from the word index system, and it’s now possible to extend the word indexing. Possible uses for this API are, for example, finding occurrences of bug tracker request IDs in the comments. The query framework on which the IndexPatternSearch API is based (QueryFactory, QueryExecutor and related classes) has been backported from Demetra, and will be used much more extensively in the new version.
  • Possibility to delegate getChildAttributes() processing to a child block of the current block: ChildAttributes.DELEGATE_TO_PREV_CHILD and ChildAttributes.DELEGATE_TO_NEXT_CHILD. In additional to these API additions, there have been a number of fixes in the formatter core (in particular, the fixes are required for correct operation of the Python formatter).

Version Control Integration

  • Checkin handlers: CheckinHandlerFactory, CheckinHandler. This API allows any plugin to add actions which are executed before and/or after files are checked in to VCS. The new feature of version 5.1 “Before check-in / Perform code analysis on affected files” is based on this API, and in fact the entire source code of that feature is supplied in the CodeAnalysisBeforeCheckinHandler class.
  • Code analysis API: AbstractVcsHelper.findCodeSmells(), CodeSmellInfo. These APIs are used by the “Perform code analysis on affected files” feature, but can also be useful for some other cases.
  • Custom actions in the “Commit Project” dialog: Vcs.MessageActionGroup standard action group. There are no new APIs here besides the action group ID: all actions added to this group are shown as buttons in the Commit Project dialog. The standard “History” button is now provided by such an action, and its source code is supplied as ShowMessageHistoryAction class.
  • External access to the “Browse Changes” functionality of VCS plugins: AbstractVcs.getVersionsProvider(). An extrernal plugin can now query that interface from a particular VCS and use it to load the history of changes for a file, directory or an entire project.

IDE and User Interface

  • Querying the complete list of registered actions: ActionManager.getActionIds(), ActionManager.isGroup(). The APIs are used in the “New Action…” dialog of the DevKit plugin.
  • API for creating classes from templates: CreateElementActionBase and PsiDirectory.createClass(name, templateName). Sample usages of this API are CreateClassAction in the OpenAPI and GeneratePluginClassAction in the DevKit plugin. The IdeView interface and DataConstants.IDE_VIEW have been moved to the OpenAPI because they are used by this code.
  • Clickable annotations in the editor gutter: EditorGutterAction. Sample can be found in the implementation of the “Annotate” action of the Perforce plugin (PerforceFileAnnotation.PerforceRevisionAnnotationAspect).
  • Automatic mnemonic registration: MnemonicHelper class. Used everywhere in IDEA, and particularly in the DialogWrapper class.

There are also a number of smaller changes and additions (for example, some new methods in the utility classes).

Posted by Dmitry Jemerov at 06:47 PM | Comments (0)

IntelliJ IDEA 5.1 Released

Download, New Features

I’m very happy to announce this release because it’s the first major release of IntelliJ IDEA in which I was significantly involved. I joined the IDEA team at the end of 5.0 release cycle, and my contributions to the 5.0 release were mostly limited to documentation and occasional bugfixes. In this release, I was involved to some degree in three of the four main new features: i18n support, JavaScript support (originally developed for 6.0 and then mostly back-ported to 5.1) and plug-in development support. However, what I personally consider the most important for this release is the very large amount of work that the entire team has spent on bugfixing and performance improvements. It’s our users who will make the final judgement on the quality of version 5.1, but the perception of our team is that the quality is noticeably better than the last release, version 5.0.2.

Develop with Pleasure!

Posted by Dmitry Jemerov at 06:18 PM | Comments (2)